// Global jquery ready events
$(document).ready(function(){
						
	// Make sure setPageIdentifier() has been called by this point.
						
	// Add a visual page identifier to the selected nav
	var target = $('.sf-topnav-' + getPageIdentifier());
	target.prepend('<div id="nav_page_indicator"></div>');

	// Round corners of the nav page indicator
	$('#nav_page_indicator').corner({
		tl: false,
		tr: false,
		bl: { radius: 3 },
		br: { radius: 3 },
		antiAlias: true,
		autoPad: false,
		validTags: ["div"]
	});

	// Add class to pad first and last item in each dropdown
	$("ul.sf-menu li ul li:first-child").addClass('sf-first-item');
	$("ul.sf-menu li ul li:last-child").addClass('sf-last-item');

	// Add bg iframe for form elements (IE6)
	$("ul.sf-menu").superfish().find('ul').bgIframe({opacity:false});

	// Set default text for search panel's input
	$("#q").toggleVal();
	
	// Assign default tooltip properties to classes named 'tooltip'
	$('.tooltip').cluetip({
		cluetipClass: 'rounded',
		dropShadow: false,
		ajaxCache: false, 
		sticky: false, 
		arrows: true,
		width: 220,
		cluezIndex: 999,
		attribute: 'href',
		showTitle: false
	});		
	
});