﻿$(document).ready(function(){

    //track events with Google analytics
    $('.track-download').click( function() {
        if (pageTracker) {
            //alert( $(this).attr('google_action'));
            //alert($(this).attr('google_label'));
            pageTracker._trackEvent('Downloads', $(this).attr('google_action'), $(this).attr('google_label'));
        }
      });
      
    //Don't use with IE6
    //Zoom images
    if(!($.browser.msie && $.browser.version=="6.0")) {setupZoom();}

    
    // Set up the open and close behaviours for the side bar external links menu
    var slideUpTimer;
    $('#externalLinks ul').hide();
    
    $('#externalLinks').click(function(){
        clearTimeout(slideUpTimer);
        $('#externalLinks ul').stop(true,true).slideDown();
        });
    
    $('#externalLinks').hover(
        function(){clearTimeout(slideUpTimer);},
        function(){    
            slideUpTimer = setTimeout(function(){
            $('#externalLinks ul').stop(true,true).slideUp();
            },1000);
        }
    ); 
});