// JavaScript Document
 $(document).ready(function(){
       
	
			
		if(openMenu){
		
			$('.menu_body:eq('+n+')').show();
			
					
			
		
		}
		
		//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked 
		$("#firstpane div.menu_head").click(function()
		{
		$(this).css({backgroundImage:"url(template/images/nav/bgBottone_f1.jpg)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
       //	$(this).siblings().css({backgroundImage:"url(template/images/nav/bgBottone.jpg)"});
		});
		
		
		$("#firstpane div.menu_head").hover(null,function()
		{
			$(this).css({backgroundImage:"url(template/images/nav/bgBottone.jpg)"})
		});
	
		
		
		
		
		
		
		///////Pretty foto plugin:: Gestione
		
		if(prettyYes){
			
		
			$("a[rel^='prettyPhoto']").prettyPhoto({
				animationSpeed: 'normal', /* fast/slow/normal */
				padding: 40, /* padding for each side of the picture */
				opacity: 0.80, /* Value betwee 0 and 1 */
				showTitle: true, /* true/false */
				allowresize: true, /* true/false */
				counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
				theme: 'dark_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
				hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
				modal: false, /* If set to true, only the close button will close the window */
				changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
				callback: function(){} /* Called when prettyPhoto is closed */
			});
			
			
			
			
	
			
			
		}
		
		
		
		if(thisP=="siteMap"){
			
			
			$('ul.quickTree').quickTree();	
			$('span.expand').toggleClass('contract').nextAll('ul').slideDown();
			
			
		}
		
		
		if(thisP=="verticalScrollers"){
			
			
			
				////////Vertical scroller //  http://flowplayer.org/tools/demos/scrollable/vertical.html
			
			
				$(function() {         
         
					// initialize scrollable  
					$("div.scrollable").scrollable({ 
						vertical:true,  
						size: 1 
						 
					// use mousewheel plugin 
					}).mousewheel();     
     
}); 
	
			
			
			
			
			
			
			
			
			
			
		}
			
			
		
	
	
	/*
	$('.menu_head:eq(1)').css({backgroundImage:"url(template/images/nav/bgBottone_f1.jpg)"})
	
	*/
	
	
	// $(function() {
      
		/*if(thisP=="gallery"){
		 // Use this example, or...
		$('a[rel=imgTestoScheda]').lightBox(); // Select all links that contains lightbox in the attribute rel
		// This, or...
		$('#gallery a').lightBox(); // Select all links in object with gallery ID
		// This, or...
		//$('a.lightbox').lightBox(); // Select all links with lightbox class
		// This, or...
		//	$('a').lightBox(); // Select all links in the page
		// ... The possibility are many. Use your creative or choose one in the examples above
 		//   });
	
		}
	
	
	*/
	
	
	
	//SETTO IL CSS per impostare l'immagine di sfondo dell'header sul div id col_2
	
	//$('#col_2').css({background:"url(template/images/header/img_"+thisP+"_1.jpg) right top no-repeat"})
	
	
	});
 
 
 
 


