$(document).ready(function() 
{
	$("body").pngFix();

	var elems = $("#Navigation li").map(function() {
		var submenu = $(this).find(".submenu"); 
		if (submenu.length > 0) {
			$(this).mouseover(function() {
				$(this).find("a").first().addClass("On");
				submenu.first().css({ display: "block" });
			});
			
			$(this).mouseout(function() {
				$(this).find("a").first().removeClass("On");
				submenu.first().css({ display: "none" });
			});
		}
	});  

});

function onHeaderOver() {
	$("#Header").css("zIndex", "1000"); 
}
function onHeaderOut() {
	$("#Header").css("zIndex", "0");
}	

function build_swat_wt_tag(locale, pagename) {

	switch (pagename) {
		case "homepage.html":
		  page = "Homepage";
		  break;
		case "landing.html":
		  page = "Become A SWAT";
		  break;
		case "recruits.html":
		  page = "Video Gallery";
		  break;
		case "submit_skill.html":
		  page = "Submit You Skill";
		  break;
		case "games.html":
		  page = "Training Tools Games";
		  break;
		case "media.html":
		  page = "Media Downloads";
		  break;
		case "products.html":
		  page = "Products";
		  break;
		case "rules.html":
		  page = "Contest Rules";
		  break;
		case "terms.html":
		  page = "Terms of Use";
		  break;
		case "privacy_policy.html":
		  page = "Privacy Policy";
		  break;
		case "extensions.html":
		  page = "Browser Extensions Download";
		  break;
		case "simulator.html":
		  page = "Simulator Game";
		  break;
		case "swatyourself.html":
		  page = "SWAT Yourself Game";
		  break;

		default:
		  page = pagename;
	}

	var locale_info = locale.toUpperCase().split("_");

	return locale_info[1] + "_" + locale_info[0] + "_Coke Zero_" + page;

}
