jQuery.noConflict();
var $j = jQuery;
var isIE6 = false; var isSafari = false;
$j(document).ready(function() {
	/* Checks for IE6 using object detection, then applies the fix for background flicker bug */
	if($j.browser.msie) { if (typeof document.body.style.maxHeight == "undefined") { try { isIE6 = true; document.execCommand('BackgroundImageCache', false, true); } catch(e) { } } }
	/* Checks for Safari, apply Class for CSS Hooks */
	if($j.browser.safari) { isSafari = true; $j("div#Checksontainer").addClass("safari"); }
	/* Checks for Mozilla and applies the Opacity fix for Mac */
	if($j.browser.mozilla) { $j("body").css('opacity', '.9999'); }
	$j("div#NavigationPrimary ul li").hover(function () { $j(this).addClass("hover"); }, function () { $j(this).removeClass("hover"); });
	if (typeof initPage == "function"){
		initPage();
	}
	externalLinksInit();
})

/* Run these things last otherwise they can't get bound to functions exicuted during initPage
----------------------------------------------- */
function externalLinksInit() {
	$j("a.music-player").each(function(){
		$j(this).click(function(){return !window.open($j(this).attr("href"),'','height=540,width=455,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=yes,toolbar=no');});
	});
	$j("a.external").each(function(){
		$j(this).click(function(){return !window.open($j(this).attr("href"));});
	});
};