var treeOptions = new Array(			{name: 'hvcom_colors', prefix : 'c_', length : 9},			{name: 'hvcom_vikings', prefix : 'v_',  length  : 31},			{name: 'hvcom_vikings', prefix : 'v_', length  : 31},			{name: 'hvcom_vikings', prefix : 'v_', length  : 31},			{name: 'hvcom_work', prefix : 'w_', length  : 161},			{name: 'hvcom_work', prefix : 'w_', length  : 161},			{name: 'hvcom_work', prefix : 'w_', length  : 161},			{name: 'hvcom_work', prefix : 'w_', length  : 161},			{name: 'hvcom_work', prefix : 'w_', length  : 161},			{name: 'hvcom_work', prefix : 'w_', length  : 161}	);	$(document).ready(function() {	var leftOffset = 0;	var topOffset= 0;							if (typeof(doIndex) != "undefined" && doIndex) 	{						//setTimeout("loadEmUp()", 100);				// randomize the H and V 				var helloImage = Math.round(Math.random() * 36) + 1 + "";		if (helloImage.length == 1) helloImage = "00" + helloImage;		if (helloImage.length == 2) helloImage = "0" + helloImage;		$('#hello').css({background: "#fff url(images/hvcom_hello-viking/hello_"+helloImage+".jpg) center no-repeat"});				var vikingImage = Math.round(Math.random() * 9) + 1 + "";		if (vikingImage.length == 1) vikingImage = "00" + vikingImage;		if (vikingImage.length == 2) vikingImage = "0" + vikingImage;		$('#viking').css({background: "#fff url(images/hvcom_hello-viking/viking_"+vikingImage+".jpg) center no-repeat"});							for (var x=0; x<6; x++)		{			for (var i=0; i<8; i++) 			{				var b = document.createElement('div');								var indx = Math.round(Math.random() * (treeOptions.length-1));											var tree = treeOptions[indx].name;				var img = Math.round(Math.random() * treeOptions[indx].length) + 1 + "";								if (img.length == 1) img = "00" + img;				if (img.length == 2) img = "0" + img;																//var bgString = "#e82d08 url(images/"+tree+"/"+treeOptions[indx].prefix+img+".jpg) center no-repeat";								var bgString = "#e82d08";								$(b).addClass('hvbox superovertacular');				$(b).css({					background: bgString,					left: leftOffset,					top: topOffset				});												$('#hv-gridbox').append(b);								leftOffset += 99;							}			leftOffset = 0;			topOffset += 99;		}			}		$('.superovertacular').hover(function() {		var sft = $(this)			sft.empty();				var mod = typeof(doIndex) != "undefined" && doIndex ? "" : "../" ;			var b = document.createElement('div');		var indx = Math.round(Math.random() * (treeOptions.length-1));		var tree = treeOptions[indx].name;		var img = Math.round(Math.random() * treeOptions[indx].length) + 1 + "";						if (img.length == 1) img = "00" + img;		if (img.length == 2) img = "0" + img;								var bgString = "#e82d08 url("+mod+"images/"+tree+"/"+treeOptions[indx].prefix+img+".jpg) center no-repeat";					var d = Math.random() * 10;		d = d>6 ? 100 : -100;					$(b).css({				background: bgString,				left: 0,				top: d,				width: 96,				height: 96,				position: 'relative'			});					sft.append(b);								var len = Math.round(Math.random() * 700) + 200;					$(b).animate({top: 0}, len, 'bounceout', function() {			sft.css({ background: bgString });		});			/*	$(b).click(function() {			var p = treeOptions[indx].prefix;						if(p == "v_") {				window.location = "/viking";			}						else if (p == "w_") {				window.location = "/featured";			}						else if (p == "c_") {				window.location = "/hello";			}						else {				// if you want something else to happen?						}				});*/						}, function() {});		$('.superfadetacular').each(function() {					var sft = $(this);			var sfAnimation = setInterval(function() {								sft.empty();						var mod = typeof(doIndex) != "undefined" && doIndex ? "" : "../" ;				var b = document.createElement('div');			var indx = Math.round(Math.random() * (treeOptions.length-1));			var tree = treeOptions[indx].name;			var img = Math.round(Math.random() * treeOptions[indx].length) + 1 + "";								if (img.length == 1) img = "00" + img;			if (img.length == 2) img = "0" + img;										var bgString = "#e82d08 url("+mod+"images/"+tree+"/"+treeOptions[indx].prefix+img+".jpg) center no-repeat";							//var d = Math.random() * 10;			//d = d>6 ? 100 : -100;						var d = -100;							$(b).css({					background: bgString,					left: 0,					top: d,					width: 96,					height: 96,					position: 'relative'				});							$(b).click(function() {				var p = treeOptions[indx].prefix;								if(p == "v_") {					window.location = "/participate";				}								else if (p == "w_") {					window.location = "/featured";				}								else {					// if you want something else to happen?								}						});			sft.append(b);										var len = Math.round(Math.random() * 700) + 200;							$(b).animate({top: 0}, len, 'bounceout', function() {				sft.css({ background: bgString });			});									}, 3200);		});				//$('.hvbox')	//	.bind('mouseover', function() {	//		//		$(this).fadeTo("fast", 0.8);	//		//	})	//	.bind('mouseout', function() {	//		$(this).fadeTo("fast", 1.0);	//});	});function loadEmUp() {  // a little preload				var preloadV = new Array(				{name: 'hvcom_colors', prefix : 'c_', length : 9},				{name: 'hvcom_vikings', prefix : 'v_',  length  : 31},				{name: 'hvcom_work', prefix : 'w_', length  : 161}			);				$(preloadV).each(function() {							for (i=1; i< this.length; i++) {									var img = i + "";					if (img.length == 1) img = "00" + img;					if (img.length == 2) img = "0" + img;									var pim = document.createElement('div') 					var bgString = "url(images/"+this.name+"/"+this.prefix+img+".jpg) center no-repeat";					$(pim).css({background: bgString});					$('#footer').append(pim);								}						});							}function getPointer(event){		var x = event.pageX || (event.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)) || 0;		var y = event.pageY || (event.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) || 0;		return {x:x, y:y};}$(window).load(function() {	if (typeof(doIndex) != "undefined" && doIndex) 	{		loadEmUp();			}		/*	alert('starting');	var sfAnimation = setInterval(function() {						var mod = typeof(doIndex) != "undefined" && doIndex ? "" : "../" ;		$('.superfadetacular').each(function() {								$(this).empty();									var b = document.createElement('div');					var indx = Math.round(Math.random() * (treeOptions.length-1));			var tree = treeOptions[indx].name;			var img = Math.round(Math.random() * treeOptions[indx].length) + 1 + "";							if (img.length == 1) img = "00" + img;			if (img.length == 2) img = "0" + img;									var bgString = "url("+mod+"images/"+tree+"/"+treeOptions[indx].prefix+img+".jpg) center no-repeat";						var d = Math.random() * 10;			d = d>6 ? 100 : -100;			//d = -100;						$(b).css({					background: bgString,					left: 0,					top: d,					width: 96,					height: 96,					position: 'relative'				});						$(this).append(b);						var tx = $(this);			var len = Math.round(Math.random() * 700) + 200;						$(b).animate({top: 0}, len, 'bounceout', function() {				tx.css({ background: bgString });			});								});				//$('#vikingmap').animate({opacity: 0},'slow');			}, 3200);		*/});/*ABQIAAAAKK8tLijah3Q8em65_tslBhQ3fZXjnqf2JHgyU9MVy9uiZzQz9RQXGGsw_NAVSc6Owmxvc5kfS5uJPg*/
