/*Author: Alexandre GautierSummary:	SLIDER HEADER	SLIDER CONTENT	FORM CONTACT	DIAPO CYCLE	FLYOUT	CUSTOM TABLE LISTING*/function formatText(index, panel) {  return index + "";}$(function(){	$('#menu li a').each(function(){		$(this).hover(function(){			$(this).stop().animate({opacity:0.8},500);										}, function(){			$(this).stop().animate({opacity:1},500);			});	});	if ($('.bt-vente')[0]) {		$('.bt-vente').each(function(){			$(this).css({backgroundPosition:'0 0'});		 			$(this).hover(function(){				$(this).stop().animate({backgroundPosition:'+15px 0px'},500);											}, function(){				$(this).stop().animate({backgroundPosition:'+0px 0px'},500);				});		});	}	/*********************/	/*SLIDER HEADER*/	/********************/	$('.slide-style1').anythingSlider({		easing: "easeInOutExpo",		autoPlay: false,		delay: 3000,		startStopped: false, 		animationTime: 600,		hashTags: true,      		buildNavigation: false,   		pauseOnHover: true, 		startText: "Go", 		stopText: "Stop", 		navigationFormatter: formatText	});	/*********************/	/*SLIDER CONTENT*/	/********************/		if ($('.slide-style2')[0]) { 		if ($('#slideIndus')[0]) { 			$('#slideIndus').anythingSlider({				buildNavigation: false											});		}else{			$('.slide-style2').anythingSlider({				easing: "easeInOutExpo",       				autoPlay: false,                 				delay: 3000,                    				startStopped: false,            				animationTime: 600,             				hashTags: true,                				buildNavigation: true,         				pauseOnHover: true,             				startText: "Go",             				stopText: "Stop",             				navigationFormatter: formatText			});		} 	}			/*********************/	/*FORM CONTACT*/	/********************/			if ($('#formContact')[0]) { 		$("#formContact").validate({		rules: {			nom: "required",			prenom: "required",			tel: "required",			email: {				required:true,				email: true			},			cp:"required",			commentaire:"required"								},		meta: "validate",		errorClass:"error",		highlight: function(element, errorClass) {			$(element).fadeIn("slow",function() {			$(element).addClass(errorClass);			$(element).prev().animate({"marginLeft": "5px"},"fast",				function(){					$(this).animate({"marginLeft": "0"},"fast" ).css({'color':'#ff0000'});				});			});		},		unhighlight: function(element, errorClass) {			$(element).removeClass(errorClass)			$(element).prev().css({'color':'#fff'});		}		});	}	/*********************/	/*DIAPO CYCLE*/	/********************/	if ($('.cycleshow')[0]) {	   	$('.cycleshow').cycle({			fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...		});	}	/*********************/	/*FLYOUT*/	/********************/	if ($('.flyout')[0]) {		flyOutAjax();	}	/*********************/	/*CUSTOM TABLE LISTING*/	/********************/	if ($('.listing')[0]) {		$( 'tr:odd').css({'background':'#f6f6f6'});	};	if ($('.bt-achat')[0]) {		$('.bt-achat').css({backgroundPosition: '0 0'})		$('.bt-achat').hover(function(){			$(this).stop().animate({'background-position':'0px -102px'},500);			},function(){			$(this).stop().animate({'background-position':'0px 0px'},500);		});	};});/*****************************************************//*                   FONCTION *//*****************************************************/function flyOutAjax() {	$('.flyout').flyout({		loadingSrc:'module/flyout/images/preloader.gif',		outEase:'easeOutQuad',		inEase:'easeInBack',		loader:'loader2'	});}