$(document).ready(function() {
	// Check to see if the page is being viewed with css and prevent jquery from firing if not.
	// if($("#header h1 a").css("position") == "absolute"){		
		// Set up the main menu
		$('.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     
        }).superfish({ 
            delay:       200,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed
			disableHI:    false              // set to true to disable hoverIntent detection 
        });  
	// }
	
	$("#highlightpanenav a").click(function () {
		var pane = $(this).attr('href');
		$("#highlightpanenav a, #highlightpanenav li, .highlightpane").removeClass('active');
		$(this).parent('li').addClass('active')
		$(pane).addClass('active');
		return false;
    });
	
	$('.newsblocks-tips a').cluetip({
    	splitTitle: '::',
		tracking: true,
		positionBy: 'mouse',
		topOffset: -20
	});
	// END IF CSS
});
