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 */
	if($j.browser.safari) { isSafari = true; $j("div#Container").addClass("safari"); }	

	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.tc-link, a.external").each(function(){
		$j(this).click(function(){return !window.open($j(this).attr("href"));});
	});
};