


 jQuery(document).ready(function(){
  jQuery("#menu div.abscontainer:last").addClass("last");	
  jQuery("p.active").hide();
	jQuery("p.active").hide();
				
	jQuery("a.active").mouseover(function(){
					jQuery("p.active:not(p.active:eq("+ jQuery("a.active").index(this) + "))").hide();
					jQuery("p.active:eq("+ jQuery("a.active").index(this) + ")").show();
 	});
	jQuery("a.active").attr("href","#");
	jQuery("a.active").click(function(){
					return false;
	});
	jQuery("#dnn_ContentPane,a.empty").mouseover(function(){
					jQuery("p.active").hide();
 	});
	
	imagePreview();
	preloadTour();
 });
 
 this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 150;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	jQuery("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		jQuery("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");								 
		jQuery("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		jQuery("#preview").remove();
    });	
	jQuery("a.preview").mousemove(function(e){
		jQuery("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

function preloadTour() {

	tour1 = new Image(); 
	tour1.src = "/Portals/0/tour/1a.jpg";
	tour2 = new Image(); 
	tour2.src = "/Portals/0/tour/1b.jpg";
	tour3 = new Image(); 
	tour3.src = "/Portals/0/tour/3.jpg";
	tour4 = new Image(); 
	tour4.src = "/Portals/0/tour/4.jpg";
	tour5 = new Image(); 
	tour5.src = "/Portals/0/tour/5.jpg";
	tour6 = new Image(); 
	tour6.src = "/Portals/0/tour/6.jpg";
	tour7 = new Image(); 
	tour7.src = "/Portals/0/tour/7.jpg";
	tour8 = new Image(); 
	tour8.src = "/Portals/0/tour/8.jpg";
	tour9 = new Image(); 
	tour9.src = "/Portals/0/tour/9.jpg";
	
}

function runSiteScripts(path) {


//here's the sIfr
//code for the h1 tags
var scriptina = {  src: path + 'scriptina.swf' };
sIFR.activate(scriptina);
sIFR.replace(scriptina, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  path +  'scriptina.swf', 
  css: [ '.sIFR-root {color:#083a81; }'  ]
});

var zapfino = {  src: path + 'zapfino.swf' };
sIFR.activate(zapfino);
sIFR.replace(zapfino, {
  selector: '.contestTitle', 
  wmode: 'transparent', 
  src:  path +  'zapfino.swf', 
  css: [ '.sIFR-root {color:#083a81; }'  ]
});

// gets rid of focus box on click
if(document.getElementsByTagName) {
var a = document.getElementsByTagName("a");
//collect all anchors A
for(var i = 0; i < a.length; i++){
// mouse onfocus, blur anchors
a[i].onfocus = function(){this.blur();};
}
}


}