var flag_on_menu1 = false;

// -----------------------------------------------------------------------------------
// http://wowslider.com/
// JavaScript Wow Slider is a free software that helps you easily generate delicious 
// slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
// Last updated: 2011-09-27
//
//***********************************************
// Obfuscated by Javascript Obfuscator
// http://javascript-source.com
//***********************************************
function ws_kenburns(options,images,container){var $=jQuery;var w=options.width,h=options.height;var useCanvas=document.createElement("canvas").getContext;var paths=[{from:[0,0,1.2],to:[1,0,1.2]},{from:[0,0,1.3],to:[0,1,1]},{from:[1,0,1.3],to:[0,1,1.3]},{from:[1,0,1.3],to:[1,1,1.3]},{from:[0,1,1.3],to:[0,0,1]},{from:[0,1,1.2],to:[1,1,1.2]},{from:[1,0,1.2],to:[1,1,1.2]}];var paths2=[{from:[0.5,1,1],to:[0.5,0,1.15]},{from:[1,0.5,1.2],to:[1,0.5,1]},{from:[0.5,0.5,1],to:[0.5,0.5,1.2]},{from:[0.5,0.5,1.3],to:[0.5,0.5,1]},{from:[1,0.5,1],to:[1,0.5,1.3]},{from:[0,0.5,1.2],to:[0,0.5,1]},{from:[1,0.5,1],to:[1,0.5,1.2]},{from:[1,0.5,1.2],to:[1,0.5,1]},{from:[0.5,0.5,1],to:[0.5,0.5,1.2]},{from:[0.5,1,1],to:[0.5,1,1.3]}];function getPath(ind){var path=paths[Math.floor(Math.random()*paths.length)];if(useCanvas){path=paths2[Math.floor(Math.random()*paths2.length)];}return path;}function process(func,delay){var busy,a=0,da=40/delay;var timer=setInterval(function(){if(a<1){if(!busy){busy=1;func(a);busy=0;}a+=da;}else{stop(1);}},40);function stop(end){clearInterval(timer);if(end){func(1);}}return{stop:stop};}var ctx;var proc;if(useCanvas){var canvas=$("<canvas width=\""+w+"\" height=\""+h+"\"/>");canvas.appendTo(container);canvas.css({'z-index':8,position:"absolute",left:0,top:0});ctx=canvas.get(0).getContext("2d");}function calcPos(path,hProp,vProp){var an={width:w*path[2]+"px",left:"auto",right:"auto",top:"auto",bottom:"auto"};an[hProp?"right":"left"]=-w*(path[2]-1)*(hProp?1-path[0]:path[0])+"px";an[vProp?"bottom":"top"]=-h*(path[2]-1)*(vProp?1-path[1]:path[1])+"px";return an;}function setAnimate(img,path,needFade){if(ctx){if(proc){proc.stop();}proc=process(function(a){var p=[path.from[0]*(1-a)+a*path.to[0],path.from[1]*(1-a)+a*path.to[1],path.from[2]*(1-a)+a*path.to[2]];ctx.globalAlpha=needFade?Math.min(a*(1+options.delay/options.duration),1):1;ctx.drawImage(img,-w*(p[2]-1)*p[0],-h*(p[2]-1)*p[1],w*p[2],h*p[2]);},options.duration+options.delay);}else{img=$(img);with(path){img.css(calcPos(from,from[0]>0.5,from[1]>0.5));img.stop(1,1).animate(calcPos(to,from[0]>0.5,from[1]>0.5),{easing:"linear",queue:false,duration:options.duration+options.delay});if(needFade){img.fadeIn(options.duration);}}}}images.each(function(Index){$(this).css({left:"auto",top:"auto",right:"auto",bottom:"auto"});if(!Index){setAnimate(this,getPath(0),0);}else{$(this).hide();}});this.go=function(new_index,curIdx){setAnimate(images.get(new_index),getPath(new_index),1);if(!ctx){$(images.get(curIdx)).fadeOut(options.duration);}return new_index;};}// -----------------------------------------------------------------------------------

// -----------------------------------------------------------------------------------
// http://wowslider.com/
// JavaScript Wow Slider is a free software that helps you easily generate delicious 
// slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
// Last updated: 2011-09-27
//
//***********************************************
// Obfuscated by Javascript Obfuscator
// http://javascript-source.com
//***********************************************
function ws_blast(options,images,aCont){var $=jQuery;var boxSize=Math.min(options.width,options.height)/3;var distance=1;var columns=Math.round(options.width/boxSize);var rows=Math.round(options.height/boxSize);var $partCont=$("<div></div>");aCont.css({overflow:"visible"}).append($partCont);$partCont.css({position:"absolute",right:(options.outWidth-options.width)/2+"px",top:(options.outHeight-options.height)/2+"px",width:options.width+"px",height:options.height+"px"});var partsOut=[];var partsIn=[];for(var index=0;index<columns*rows;index++){var i=index%columns;var j=Math.floor(index/columns);var left0=Math.round(options.width*i/columns);var top0=Math.round(options.height*j/rows);var left1=Math.round(options.width*(i+1)/columns);var top1=Math.round(options.height*(j+1)/rows);$([partsIn[index]=document.createElement("div"),partsOut[index]=document.createElement("div")]).css({position:"absolute",width:left1-left0,height:top1-top0,'background-position':-left0+"px -"+top0+"px"}).appendTo($partCont);}partsOut=$(partsOut);partsIn=$(partsIn);function setPos(parts,random,animate){var pWidth=options.width/columns;var pHeight=options.width/rows;var wpos={left:$(window).scrollLeft(),top:$(window).scrollTop(),width:$(window).width(),height:$(window).height()};$(parts).each(function(index){if(random){var left0=distance*options.width*(2*Math.random()-1)+options.width/2;var top0=distance*options.height*(2*Math.random()-1)+options.height/2;var gpos=$partCont.offset();gpos.left+=left0;gpos.top+=top0;if(gpos.left<wpos.left){left0-=gpos.left+wpos.left;}if(gpos.top<wpos.top){top0-=gpos.top+wpos.top;}if(gpos.left>wpos.left+wpos.width-pWidth){left0-=gpos.left-(wpos.left+wpos.width)+pWidth;}if(gpos.top>wpos.top+wpos.height-pHeight){top0-=gpos.top-(wpos.top+wpos.height)+pHeight;}}else{var left0=Math.round(options.width*(index%columns)/columns);var top0=Math.round(options.height*Math.floor(index/columns)/rows);}if(animate){$(this).animate({left:left0,top:top0},{queue:false,duration:options.duration});}else{$(this).css({left:left0,top:top0});}});}setPos(partsOut);setPos(partsIn,true);this.go=function(new_index,curIdx){$partCont.show();$(partsOut).stop(1).css({opacity:1,'z-index':3,'background-image':"url(\""+images.get(curIdx).src+"\")"});$(partsIn).stop(1).css({opacity:0,'z-index':2,'background-image':"url(\""+images.get(new_index).src+"\")"});setPos(partsIn,false,true);$(partsIn).animate({opacity:1},{queue:false,easing:"easeInOutExpo",duration:options.duration,complete:function(){$(images.get(curIdx)).hide();}});setPos(partsOut,true,true);$(partsOut).animate({opacity:0},{queue:false,easing:"easeInOutExpo",duration:options.duration,complete:function(){$(images.get(new_index)).show();for(var i=0;i<images.length;i++){if(new_index!=i){$(images.get(i)).hide();}}$partCont.hide();}});var tmp=partsIn;partsIn=partsOut;partsOut=tmp;return new_index;};}// -----------------------------------------------------------------------------------

// -----------------------------------------------------------------------------------
// http://wowslider.com/
// JavaScript Wow Slider is a free software that helps you easily generate delicious 
// slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
// Last updated: 2011-09-27
//
//***********************************************
// Obfuscated by Javascript Obfuscator
// http://javascript-source.com
//***********************************************
function ws_basic_linear(options,images,container){var $=jQuery;var movingDiv=$("<div></div>").css({position:"absolute",display:"none",'z-index':2,width:options.width*2+"px",height:options.height+"px"}).appendTo(container);images.each(function(Index){$(this).css({'z-index':0});if(!Index){$(this).show();}else{$(this).hide();}});this.go=function(new_index,curIdx){movingDiv.stop(1,1);var dir=(new_index-curIdx+1)%images.length?"left":"right";$(images[curIdx]).clone().css({position:"absolute",left:"auto",right:"auto",top:0}).appendTo(movingDiv).css(dir,0);$(images[new_index]).clone().css({position:"absolute",left:"auto",right:"auto",top:0}).appendTo(movingDiv).css(dir,options.width+"px").show();movingDiv.css({left:"auto",right:"auto",top:0}).css(dir,0).show();$(images[curIdx]).hide();var an={};an[dir]=-options.width+"px";movingDiv.animate(an,options.duration,"easeInOutExpo",function(){$(images[new_index]).show();$(this).hide().html("");});return new_index;};}// -----------------------------------------------------------------------------------

function setMenuSide() {
	$('#pce_menuside ul').hide();
	$('#pce_menuside li.pce_n1').append('<div class="hover"></div>');
	$('#pce_menuside li.pce_n1').append('<div class="picto"></div>');	
	$('#pce_menuside li.pce_n1').hover(
	function() {
		flag_on_menu1 = true;
		$(this).children('div.hover').fadeIn('1000');
		$('#pce_menuside ul').slideUp('1000');
		$(this).find('ul').slideDown('1000');
		$('#pce_menuside li a').removeClass("on");
		
		$(this).find('a').addClass("on");
		},
	function() {
		flag_on_menu1 = false;
		$(this).children('div.hover').fadeOut('1000');		
		window.setTimeout('tempoMenu1()', 500);
		}
	);
	$('#pce_menuside > li > a').focus(function() {$('#pce_menuside ul').hide(); $(this).next('ul').show();});
}
function tempoMenu1() {
	if( ! flag_on_menu1) {
		$('#pce_menuside ul').slideUp('1000');
		$('#pce_menuside li a').removeClass("on");
		}
}


$(document).ready(function () {

	setMenuSide();



// http://wowslider.com/
// JavaScript Wow Slider is a free software that helps you easily generate delicious 
// slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
// Last updated: 2011-09-27
//
//***********************************************
// Obfuscated by Javascript Obfuscator
// http://javascript-source.com
//***********************************************
	if($("#wowslider-container1").length) {
		jQuery("#wowslider-container1").wowSlider({effect:"basic_linear",prev:"",next:"",duration:10*100,delay:60*100,outWidth:960,outHeight:400,width:960,height:400,autoPlay:true,stopOnHover:false,loop:false,bullets:0,caption:false,controls:false});
	}
	

	if($("#wowslider-container2").length) {
		jQuery("#wowslider-container2").wowSlider({effect:"basic_linear",prev:"",next:"",duration:10*100,delay:25*100,outWidth:315,outHeight:215,width:315,height:215,autoPlay:true,stopOnHover:false,loop:false,bullets:0,caption:false,controls:true});
	}


});
