// JavaScript Document

	function handlePageEvent(type, value)
	{
		try
		{
			_gaq.push(['_trackEvent', type, value]);
		}
		catch  (err)
		{
			//
			if (console)
			{
				if (console.log)
				{
					console.log("error tracking event '" + type + "' " + err.toString());
				}
			}
		}
	}

	function prepRollovers()
	{
		$(".rollover").css({'opacity':'0.0', 'visibility':'visible'});
		
		$('.rolloverpt').hover(
			function() 
			{
				$(this).find('.rollover').stop().fadeTo(250, 0.99);
			},
			function() 
			{
				$(this).find('.rollover').stop().fadeTo(250, 0.0);
			}
		);
	}
	
	function prepIERollovers()
	{
		$(".rollover").hide();
		
		$('.rolloverpt a img').hover(
			function() 
			{
				this.src = this.src.replace("_out","_over");
			},
			function() 
			{
				this.src = this.src.replace("_over","_out");
			}
		);
	}
	
	var flashVersion = 0;
	
	$(document).ready(function() 
	{
		if (!isIE6)
		{
			flashVersion = swfobject.getFlashPlayerVersion()["major"];
			
			if (flashVersion >= 8)
			{
				$('#flashbowl').html('<div id="bowldiv" class="innerflashbowl"></div>');
				$('#flashbowl').css('height', '170');	
				$('#flashbowl').css('width', '100%');	
				$('#thebowl').css('background', 'none');
				$('#thebowlinner').css('background', 'none');
				$('#topnavouter').css('background', 'none');
				$('#topnavouter').css('backgroundColor', '#f6f6f6');
				
				var flashvars = {
				};
				var params = {
				wmode: "transparent",
				scale: "noscale",
				background: "#f6f6f6"
				};
				var attributes = {
				id: "bowldiv",
				name: "bowldiv"
				};
				
				swfobject.embedSWF("assets/swfs/milkbowl.swf", "bowldiv", "100%", "170", "9.0.0", false, flashvars, params, attributes);
			}
		}
		
		if (isIE7 || isIE6 || isIE8) 
		{
			prepIERollovers();
		}
		else
		{
			prepRollovers();
		}
	});