/**
* Quick and dirty ajax statistics reporter.
*
* Depends on:
*   - jQuery -- underlying ajax framework
*
* Note: this script will send ajax request on each user click. Dialup users will hate me... =)
*
* Author: Sardar (ja [.} doma {at] gmail dot com) 
*/

/** Receives clicks. */
var statistics_ping_url = '/stat/ping.php';

/**
* Send log request to the server.
* This function performs non-blocking lightweight ajax request sending:
*   - zone_id:          what was clicked (icon, menu link etc)
*   - university_id:    to which university belongs the link/button/icon/etc
*
* Do not call this function for timer-based clicks, we need real user clicks.
*
* @param integer university_id id of corresponding university
* @param integer zone_id id of clicked zone
* @return void
*/
function statistics_logUniversityView(university_id, zone_id) {
    jQuery.get(statistics_ping_url, {'univid': university_id, 'zoneid': zone_id}, null, 'text'); //fire-and-forget
}
