$(document).ready(function() {
	// BBB Seal alert on contextmenu (right click)
	$("#bbbSeal").bind("contextmenu", function(e){
		alert("Use without permission is prohibited. The BBB Accreditation seal is a trademark of the Council of Better Business Bureaus, Inc.");
		return false;
	});

	
	//png hack for ie6
	$('div#categoryTop, div#categoryHeader, div#resourceHeader, div.sideColumnFooter, div#customerHeader, div#ideasFormHeader, div#ideasFormFooter, div#experienceHeader, div#acceptedCreditHeader, div#acceptedCreditFooter').ifixpng();
	
	//navigation
	$("#nav-right #nav-home").hover(function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-home-hover.png";
				$("#nav-right #nav-home").ifixpng();
			}
		}, function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-home.png";
				$("#nav-right #nav-home").ifixpng();
			}
		});
	$("#nav-right #nav-products").hover(function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-products-hover.png";
				$("#nav-right #nav-products").ifixpng();
			}
		}, function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-products.png";
				$("#nav-right #nav-products").ifixpng();
			}
		});
	$("#nav-right #nav-services").hover(function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-services-hover.png";
				$("#nav-right #nav-services").ifixpng();
			}
		}, function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-services.png";
				$("#nav-right #nav-services").ifixpng();
			}
		});
	$("#nav-right #nav-resources").hover(function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-resources-hover.png";
				$("#nav-right #nav-resources").ifixpng();
			}
		}, function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-resources.png";
				$("#nav-right #nav-resources").ifixpng();
			}
		});
	$("#nav-right #nav-about").hover(function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-about-hover.png";
				$("#nav-right #nav-about").ifixpng();
			}
		}, function() {
			if ($(this)[0].className != "active") {
				$(this)[0].src="/images/nav-about.png";
				$("#nav-right #nav-about").ifixpng();
			}
		});
	
	//tabs used in the content main column
	$('#specials ul').tabs();
	$('#media ul').tabs();
	
	$("#errorExit img").click(function() {
			$("#errorMessage").css("display", "none");
			$("#ideasFormTop.hiddenMessage").css("display", "block");
	});
	
	$("#formSuccessExit img").click(function() {
			$("#formComplete").css("display", "none");
			$("#ideasFormTop.hiddenMessage").css("display", "block");
	});
	
	jQuery('#ulCategories').accordion({
			header: '.head',
			navigation: true,
			event: 'mouseover',
			autoheight: false,
			animated: 'easeslide'
	});
	
	// initialize other page stuff
	if (typeof window.pageLoaded == "function") {
		pageLoaded();
	}
	
});
