jQuery(document).ready(function(){
								
	jQuery("#menu div.abscontainer:last").addClass("last");	
	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) + ")").slideDown();
	});
	
	jQuery("#dnn_ContentPane,a.empty").mouseover(function(){
		jQuery("p.active").hide();
	});		
	
	jQuery("div.scrollable").scrollable({
		size: 5,
		steps: 1	
	});
	
	/*image gallery for smile gallery page* || More info at http://flowplayer.org/tools/demos/scrollable/gallery.html */
	jQuery(".items img").click(function() { 
 
		// calclulate large image's URL based on the thumbnail URL (flickr specific) 
		var url = jQuery(this).attr("src").replace("_t", ""); 
	 
		// get handle to element that wraps the image and make it semitransparent 
		var wrap = jQuery(this).parent().parent().parent().find('#image_wrap').fadeTo("medium", 0.5); 
	 
		// the large image from flickr 
		var img = new Image(); 
	 
		// call this function after it's loaded 
		img.onload = function() { 
	 
			// make wrapper fully visible 
			wrap.fadeTo("fast", 1); 
	 
			// change the image 
			wrap.find("img").attr("src", url); 
	 
		}; 
	 
		// begin loading the image
		img.src = url; 

	// when page loads simulate a "click" on the first image 
	});
	
	/*hide all the players*/		
		jQuery("#dickerson_gallery .switch").click(function() {
			jQuery("#dickerson_gallery .gallery").fadeOut("slow");
			jQuery("#dickerson_gallery > .imggallery").fadeIn('slow');
			jQuery("#dickerson_gallery > .imggallery > .scrollable > .items").children().filter(":first").click();
			return false;
		});
			/*X OUT*/
			jQuery("#dickerson_gallery .x").click(function() {
				jQuery("#dickerson_gallery > .imggallery").fadeOut("slow");
				jQuery("#dickerson_gallery .gallery").fadeIn("slow");
			});
		
		jQuery("#fairbanks_gallery .switch").click(function() {
			jQuery("#fairbanks_gallery .gallery").fadeOut("slow");
			jQuery("#fairbanks_gallery > .imggallery").fadeIn('slow');
			jQuery("#fairbanks_gallery > .imggallery > .scrollable > .items").children().filter(":first").click();
			return false;
		});
			/*X OUT*/
			jQuery("#fairbanks_gallery .x").click(function() {
				jQuery("#fairbanks_gallery > .imggallery").fadeOut("slow");
				jQuery("#fairbanks_gallery .gallery").fadeIn("slow");
			});
		
		jQuery("#firebrace_gallery .switch").click(function() {
			jQuery("#firebrace_gallery .gallery").fadeOut("slow");
			jQuery("#firebrace_gallery > .imggallery").fadeIn('slow');
			 jQuery("#firebrace_gallery > .imggallery > .scrollable > .items").children().filter(":first").click();
			return false;
		});
			/*X OUT*/
			jQuery("#firebrace_gallery .x").click(function() {
				jQuery("#firebrace_gallery > .imggallery").fadeOut("slow");
				jQuery("#firebrace_gallery .gallery").fadeIn("slow");
			});
		
		jQuery("#glass_gallery .switch").click(function() {
			jQuery("#glass_gallery .gallery").fadeOut("slow");
			jQuery("#glass_gallery > .imggallery").fadeIn('slow');
			 jQuery("#glass_gallery > .imggallery > .scrollable > .items").children().filter(":first").click();
			return false;
		});
			/*X OUT*/
			jQuery("#glass_gallery .x").click(function() {
				jQuery("#glass_gallery > .imggallery").fadeOut("slow");
				jQuery("#glass_gallery .gallery").fadeIn("slow");
			});
		
		jQuery("#gray_gallery .switch").click(function() {
			jQuery("#gray_gallery .gallery").fadeOut("slow");
			jQuery(".gray").fadeIn('slow');
			jQuery(".gray > .scrollable > .items").children().filter(":first").click();
			return false;
		});
			/*X OUT*/
			jQuery("#gray_gallery .x").click(function() {
				jQuery("#gray_gallery > .imggallery").fadeOut("slow");
				jQuery("#gray_gallery .gallery").fadeIn("slow");
			});
		
		jQuery("#minker_gallery .switch").click(function() {
			jQuery("#minker_gallery .gallery").fadeOut("slow");
			jQuery("#minker_gallery > .imggallery").fadeIn('slow');
			 jQuery("#minker_gallery > .imggallery > .scrollable > .items").children().filter(":first").click();
			return false;
		});
		
			/*X OUT*/
			jQuery("#minker_gallery .x").click(function() {
				jQuery("#minker_gallery > .imggallery").fadeOut("slow");
				jQuery("#minker_gallery .gallery").fadeIn("slow");
			});

		jQuery("#new_gallery .switch").click(function() {
			jQuery("#new_gallery .gallery").fadeOut("slow");
			jQuery("#new_gallery > .imggallery").fadeIn('slow');
			 jQuery("#new_gallery > .imggallery > .scrollable > .items").children().filter(":first").click();
			return false;
		});
		
			/*X OUT*/
			jQuery("#new_gallery .x").click(function() {
				jQuery("#new_gallery > .imggallery").fadeOut("slow");
				jQuery("#new_gallery .gallery").fadeIn("slow");
			});


		jQuery("#soto_gallery .switch").click(function() {
			jQuery("#soto_gallery .gallery").fadeOut("slow");
			jQuery("#soto_gallery > .imggallery").fadeIn('slow');
			 jQuery("#soto_gallery > .imggallery > .scrollable > .items").children().filter(":first").click();
			return false;
		});
			/*X OUT*/
			jQuery("#soto_gallery .x").click(function() {
				jQuery("#soto_gallery > .imggallery").fadeOut("slow");
				jQuery("#soto_gallery .gallery").fadeIn("slow");
			});
});
function runSiteScripts(path) {
	//here's the sIfr
	//code for the h1 tags
	var Eurostile = {  src: path + 'Eurostile.swf' };
	sIFR.activate(Eurostile);
	sIFR.replace(Eurostile, {
	  selector: 'h1', 
	  wmode: 'transparent', 
	  src:  path +  'Eurostile.swf', 
	  css: [ '.sIFR-root {color:#ffffff; }'  ]
	});
	
	//here's the sIfr
	//code for the h1 tags
	/*var freestylescript = {  src: path + 'freestylescript.swf' };
	sIFR.activate(freestylescript);
	sIFR.replace(freestylescript, {
	  selector: 'p.hometxt', 
	  wmode: 'transparent', 
	  src:  path +  'freestylescript.swf', 
	  css: [ '.sIFR-root {color:#000000; }'  ]
	});*/
}

