$(window).load(function() {
	
	// IE6 SuckerFish Menu Fix
	if (jQuery.browser.msie == true && jQuery.browser.version.indexOf("6") == 0) {
		$("#nav > li").hover(
			function () {
			$(this).addClass("hover");
			}, 
			function () {
			$(this).removeClass("hover");
			}
		);
		//$(document).pngFix();
	}
	
	// Open external links in a new window
	$("a[rel='external']").attr("target", "_blank");
	
	
	/*
	// Enable for Google Analytics event tracking test
	$('.ui-accordion, .ui-tabs').bind('accordionchange', function(event, ui) {
		alert($(ui.newHeader).find("a").text());
	});
	*/
	
	$(".table thead td:first-child, .table th:first-child").addClass("first-child");
	$(".table thead td:last-child, .table th:last-child").addClass("last-child");
	
	// Pre-load menu background images
	var menuimages = ["w","s","w1","w2","s1"];
	for (var i = 0; i < menuimages.length; i++) {
		var img = new Image();
		img.src = "http://img.hosting.com/ui/images/bg-drop-" + menuimages[i] + ".gif";
	}
	
});

function liveChatSales()
{
	lpButtonCTTUrl = 'https://server.iad.liveperson.net/hc/89479940/?cmd=file&file=visitorWantsToChat&site=89479940&imageUrl=https://www.hosting.com/liveperson&referrer='+escape(document.location);
	lpButtonCTTUrl = (typeof(lpAppendVisitorCookies) != 'undefined' ? lpAppendVisitorCookies(lpButtonCTTUrl) : lpButtonCTTUrl);
	lpButtonCTTUrl = ((typeof(lpMTag)!='undefined' && typeof(lpMTag.addFirstPartyCookies)!='undefined')?lpMTag.addFirstPartyCookies(lpButtonCTTUrl):lpButtonCTTUrl);
	window.open(lpButtonCTTUrl,'chat89479940','width=475,height=400,resizable=yes');
	return false;
}

function liveChatSupport()
{
	 var e = window.open('https://chat.safesecureweb.com/SightMaxAgentInterface/PreChatSurvey.aspx?accountID=1&siteID=1&queueID=2&AllQueues=yes&IncludedQ0=2&IncludedQ1=3','chatWindow','width=490,height=404,resizable=0,scrollbars=no,menubar=no,status=no');
	 return false;
}
