jQuery.noConflict();
jQuery(document).ready(function(){ 

    jQuery('ul.sf-menu').supersubs({ 
        minWidth:    12,                                // minimum width of sub-menus in em units 
        maxWidth:    27,                                // maximum width of sub-menus in em units 
        extraWidth:  1                                  // extra width can ensure lines don't sometimes turn over 
                                                        // due to slight rounding differences and font-family 
    }).superfish({ 
        delay:       200,                               // delay on mouseout 
        animation:   {opacity:'show',height:'show'},    // fade-in and slide-down animation 
        speed:       'fast',                            // faster animation speed 
        dropShadows: false                              // disable drop shadows 
    });
    
    jQuery('#site-logo a')
    .mouseover(function(){ jQuery(this).find('img').hide(); })
    .mouseout(function(){ jQuery(this).find('img').show(); }); 
	
	jQuery('a').click(function () {
		var thisel = jQuery(this);
		var href = thisel.attr('href');
		
		// see if the link is external
		if ( (href.match(/^http/)) && (! href.match(document.domain)) ) {
			// Outbound Link
			try {
				_gaq.push(['_trackEvent', 'Outbound Link', href],['_trackPageview', '/oubound/'+href]);
			} catch (err) {}
		} else {
			// Track internal click event		
			try {
				_gaq.push(['_trackEvent', thisel.parents('[id!=""]:first').get(0).id, 'clicked', (thisel.text() || thisel.children('img:first').attr('alt'))]);
			} catch (err) {}
		}
	});
	
});