$(document).ready(function(){

	/* INIT SLIDERS / VALIDATE / FANCYBOX */
	
	$("#formcreer").validationEngine();
	
	$("#formID").validationEngine();
	$("#form1").validationEngine();
	
	$("#inscription").validationEngine();
	
	$("#formcreer_free").validationEngine();
	
	$('#infos_facturation_bloc').hide();

		
	$( "#radio" ).buttonset();
	$( "#radio_genre" ).buttonset();

	
	
	$("a[rel=fonctionnalites]").fancybox({
		'padding' : 5,
		'opacity' 			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'easingIn' 			: 'swing',
		'easingOut'			: 'swing',
		'type'				: 'inline',
		'overlayOpacity'    : '0',
		'width'	: '50%'
	});
	
	$("a[rel=designframe]").fancybox({
				'width'				: 1100,
				'height'			: 700,
				'autoScale'			: false,
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'type'				: 'iframe',
				'showNavArrows'		: false
			});
	
			
	
	$('#temoignagesbox').bxSlider({
		infiniteLoop: true,
		mode: 'vertical',
		controls: false,
		speed: 1000, 
		pause: 8000,
		auto: true
	
	});
			
	$('#topsites').bxSlider({
		infiniteLoop: true,
		controls: false,
		speed: 2000, 
		pause: 6000,
		auto: true
	
	});
			
	$('#banniere_slide').bxSlider({
		infiniteLoop: true,
		controls: false,
		 mode: 'fade',
		speed: 1000, 
		pause: 7000,
		auto: true
	
	});
	
	

	
	
	
	/* FONCTIONNALITE DE LA PAGE D'ACCUEIL */
	
	
		 $('a.home_perso ').append('<span class="hover"></span>').each(function () {  
            var span = $('span.hover', this).css('opacity', 0);  
            $(this).hover(function () {  
                span.stop().fadeTo(800, 1);
				//Change the number 500 to change the speed of the Fade In  
            }, function () {  
        span.stop().fadeTo(800, 0); //Change the number 500 to change the speed of the Fade Out  
		// span.css('display','none');
            });  
        });

	 $('a.home_initie ').append('<span class="hover"></span>').each(function () {  
            var span = $('span.hover', this).css('opacity', 0);  
            $(this).hover(function () {  
                span.stop().fadeTo(800, 1);
				//Change the number 500 to change the speed of the Fade In  
            }, function () {  
        span.stop().fadeTo(800, 0); //Change the number 500 to change the speed of the Fade Out  
		// span.css('display','none');
            });  
        });
		
	$('a.home_zen').append('<span class="hover"></span>').each(function () {  
            var span = $('span.hover', this).css('opacity', 0);  
            $(this).hover(function () {  
                span.stop().fadeTo(800, 1); //Change the number 500 to change the speed of the Fade In  
				$('span.top_ventes_flag').fadeTo(800, 0);
            }, function () {  
        span.stop().fadeTo(800, 0); //Change the number 500 to change the speed of the Fade Out  
		$('span.top_ventes_flag').fadeTo(800, 1);
            });  
        });
		
	$('a.home_premium').append('<span class="hover"></span>').each(function () {  
            var span = $('span.hover', this).css('opacity', 0);  
            $(this).hover(function () {  
                span.stop().fadeTo(800, 1); //Change the number 500 to change the speed of the Fade In  
				$('span.nouveau_flag').fadeTo(800, 0);
            }, function () {  
        span.stop().fadeTo(800, 0); //Change the number 500 to change the speed of the Fade Out  
		$('span.nouveau_flag').fadeTo(800, 1);
            });  
        });
	
	$('a.home_pro').append('<span class="hover"></span>').each(function () {  
            var span = $('span.hover', this).css('opacity', 0);  
            $(this).hover(function () {  
                span.stop().fadeTo(800, 1); //Change the number 500 to change the speed of the Fade In  
				$('span.nouveau_flag').fadeTo(800, 0);
            }, function () {  
        span.stop().fadeTo(800, 0); //Change the number 500 to change the speed of the Fade Out  
		$('span.nouveau_flag').fadeTo(800, 1);
            });  
        });
		

	
	/* fonctionnalite du module creer en formule decouverte */
	
	$('#home_creer #book').click(function(){
		if($(this).attr('value') == 'www.'){
		$(this).attr('value','');
		}
	});

	$('#home_creer form').submit(function(){
		var url = $('#home_creer #bookindex').val();
		var email = $('#home_creer #emailindex').val();
		
		$('#home_banniere').hide(function(){$('#home_creer').hide(function(){$('#home_creer2').fadeIn(function(){
		
		if(url != '' || email != ''){
		$('#home_creer2 #book').focus();
		$('#home_creer2 #email').focus();
		$('#home_creer2 #login').focus();
		}
		// $("#formcreer").validationEngine();
	
		
		});});});
	
		$('#home_creer2 #book').attr('value',url);
		
		
		$('#home_creer2 #email').attr('value',email);
		
	
		return false;
	});	

		$('a.decouverte').click(function(){
			
			$('#create_decouverte_fancy').fadeToggle();
			$('#home_creer2').validationEngine('hideAll');
			return false;
		});
		$('.btn_decouverte').click(function(){
		
			$('#create_decouverte_fancy').fadeToggle();
			$('#home_creer2').validationEngine('hideAll');
			return false;
		});
		
		
	if($('#accueilcreate').length > 0){
		$('#accueilcreate').attr('action','#');
	}	
		
	/* FONCTIONNALITES DU TABLEAU */
	
	/* clignotement de la box boutique */
	startAnim();
	setTimeout('stopAnim()',5000);
	
	$('td.listfonctionnalites a').hover(
		
		function(){
			$(this).parent().parent().find('td.oui').addClass('tdoui');
			if($(this).parent().parent().find('td.oui.num img').length > 0){
				$(this).parent().parent().find('td.oui.num img').fadeOut(function() {
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'').slideDown();
			  });
			}
			if($(this).parent().parent().find('td.oui.mus img').length > 0){
				$(this).parent().parent().find('td.oui.mus img').fadeOut(function() {
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'').slideDown();
			  });
			}
			if($(this).parent().parent().find('td.oui.dsn img').length > 0){
				$(this).parent().parent().find('td.oui.dsn img').fadeOut(function() {
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'').slideDown();
			  });
			}
			if($(this).parent().parent().find('td.oui.perso img').length > 0){
				$(this).parent().parent().find('td.oui.perso img').fadeOut(function() {
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'').slideDown();
			  });
			}
			if($(this).parent().parent().find('td.oui.mail img').length > 0){
				$(this).parent().parent().find('td.oui.mail img').fadeOut(function() {
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'').slideDown();
			  });
			}
			if($(this).parent().parent().find('td.oui.stats img').length > 0){
				$(this).parent().parent().find('td.oui.stats img').fadeOut(function() {
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'').slideDown();
			  });
			}
			if($(this).parent().parent().find('td.oui.prio img').length > 0){
				$(this).parent().parent().find('td.oui.prio img').fadeOut(function() {
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'').slideDown();
			  });
			}
			if($(this).parent().parent().find('td.oui.opt img').length > 0){
				$(this).parent().parent().find('td.oui.opt img').fadeOut(function() {
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'').slideDown();
			  });
			}
			if($(this).parent().parent().find('td.oui.default img').length > 0){
				$(this).parent().parent().find('td.oui.default img').fadeOut(function() {
				$(this).parent().parent().find('td.oui.default img').attr('src','images/tableau_new/oui_hover.png').slideDown();
			  });
			}

			$(this).parent().parent().find('td.non img').css('opacity','0.2');
			$(this).parent().parent().find('td.non').addClass('tdnon');
		
		},
		function(){
			$(this).parent().parent().find('td.oui img').stop(true, true);
			$(this).parent().parent().find('td.oui').removeClass('tdoui');
			if($(this).parent().parent().find('td.oui.num img').length > 0){
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'');
			}
			if($(this).parent().parent().find('td.oui.mus img').length > 0){
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'');
			}
			if($(this).parent().parent().find('td.oui.perso img').length > 0){
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'');
			}
			if($(this).parent().parent().find('td.oui.prio img').length > 0){
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'');
			}
			if($(this).parent().parent().find('td.oui.mail img').length > 0){
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'');
			}
			if($(this).parent().parent().find('td.oui.dsn img').length > 0){
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'');
			}
			if($(this).parent().parent().find('td.oui.stats img').length > 0){
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'');
			}
			if($(this).parent().parent().find('td.oui.opt img').length > 0){
				var num = $(this).attr('src');
				$(this).attr('src',''+num+'');
			}
			if($(this).parent().parent().find('td.oui.default img').length > 0){
				$(this).parent().parent().find('td.oui.default img').attr('src','images/tableau_new/oui.png');
			}
			$(this).parent().parent().find('td.non').removeClass('tdnon');
			$(this).parent().parent().find('td.non img').css('opacity','1');
			
		}
	
	);

	
	
	 $('td.tdboxformule a').append('<span class="hover"></span>').each(function () {  
            var $span = $('span.hover', this).css('opacity', 0);  
            $(this).hover(function () {  
                $span.stop().fadeTo(1000, 1); //Change the number 500 to change the speed of the Fade In  
            }, function () {  
        $span.stop().fadeTo(1000, 0); //Change the number 500 to change the speed of the Fade Out  
            });  
        });
		
		
		
	 $('a.formule_image_big').append('<span class="hover"></span>').each(function () {  
            var $span = $('span.hover', this).css('opacity', 0);  
            $(this).hover(function () {  
                $span.stop().fadeTo(1000, 1); //Change the number 500 to change the speed of the Fade In  
            }, function () {  
        $span.stop().fadeTo(1000, 0); //Change the number 500 to change the speed of the Fade Out  
            });  
        });
		

	
	 $('#boxformule_pro a.pro').append('<span class="hover"></span>').each(function () {  
            var $span = $('span.hover', this).css('opacity', 0);  
            $(this).hover(function () {  
                $span.stop().fadeTo(1000, 1); //Change the number 500 to change the speed of the Fade In  
            }, function () {  
        $span.stop().fadeTo(1000, 0); //Change the number 500 to change the speed of the Fade Out  
            });  
        });
    
	
	
	/* VERIF NDD */
	
	/* Verif NDD .fr,etc... */
	
	$('.verifndd').live('click',function(){
		if($('#imgloading').length > 0){
			return false;
		}
		$('input.ndddispo').attr('value','0');
		$('#msgintro').remove();
		$('#msg').empty();
		$('#msg2').empty();
		$('#disposndd').hide();
		$('#disposndd').empty();
		
		var nddaverif = $('input.choosendd').val();
		
		nddaverif = nddaverif.replace(/ /g,'');
		$('input.choosendd').attr('value',nddaverif);

		if(nddaverif == ''){
			$('#msg').append('<p class="redinfos">Veuillez choisir un nom de domaine !</p>');
		}
		else if(nddaverif == 'nom-de-votre-site.com'){
			$('#msg').append('<p class="redinfos">Veuillez entrer un nom de domaine valide !</p>');

		}

		else if((/^[^.-][a-z0-9.-]{2,}[^.-]$/gi).exec(nddaverif) == null){
			$('#msg').append('<p class="redinfos">Veuillez entrer un nom de domaine valide !<br />Votre nom de domaine ne doit pas commencer ni se terminer par un point ou un tiret !</p>');
		}	
		else{
			$('#loading').append('<img id="imgloading" src="images/loader.gif" />');
			
			var ndd = $('.choosendd').attr('value');
			if(ndd.toLowerCase().indexOf("www.") >= 0){
			ndd = ndd.replace('www','');
				ndd = ndd.substring(1);
			}
			var nddsplit = ndd.split('.');
			var nddsansext = nddsplit[0];
			var nddext = nddsplit[1];
			
			$.ajax({  
				type: "GET",  
				url: "recherche_ndd.php",  
				data: {ndd : ndd}, 
				success: function(onsuccess) {
					
					tab = jQuery.parseJSON(onsuccess);

					if(tab[nddext] == true){
	
						$('#msg').append('<p class="greeninfos">Le nom de domaine www.'+ndd+' est disponible !</p>');
						$('input.ndddispo').attr('value','1');
						
					}
					else if(onsuccess == 9999){
					
						$('#msg').append('<p class="redinfos">Vous ne pouvez pas effectuer plus de 10 recherches par minute !</p>');
					}	
					else if(onsuccess == 0){
						$('#msg').append('<p class="redinfos">Ce nom de domaine n\'est pas disponible !</p>');
		
						$('#msg2').append('<br /><input type="checkbox" name="transfertndd" id="transfertndd" /><label class="transfertndd">Je suis le propriétaire de ce nom de domaine et je souhaite le transférer</label>');
						$('input.ndddispo').attr('value','0');
					}
					
					else{
						$('#msg').append('<p class="redinfos">Ce nom de domaine est disponible avec les extensions ci-dessous !</p>');
						$('#disposndd').fadeIn('fast');
						
												
								// $('#disposndd').append('<p>Ce domaine est disponible avec d\'autres extensions !</p><br />');
								$('#disposndd').append('<div id="listedispos">');
								
								// element sur lequel on doit boucler
								var ext = ''
								for(ext in tab){
									$('#disposndd').append('<input type="radio" id="'+nddsansext+ext+'" name="listendddispos" class="listendddispos" value="'+nddsansext+ext+'" /> <label for="'+nddsansext+ext+'">www.'+nddsansext+ext+'</label><br /><br />');
								}
								$('#disposndd').append('</div>');
						
						
						$('#disposndd a').live('click',function(){$('#disposndd #listedispos').slideDown();});
						
						$('input#transfertndd').live('click',function(){
						
							$('#disposndd').hide();
						
						});
						
						$('input.listendddispos').live('click',function(){
						
							var nddautreext = $('input.listendddispos:checked').val();
							
							$('#disposndd').hide();
							$('input.choosendd').empty();
							$('#msg').empty();
							$('#msg').append('<p class="greeninfos">Le nom de domaine www.'+nddautreext+' est disponible !</p>');
							$('#msg2').empty();
							$('input.choosendd').val(nddautreext);
							$('input.nddautredispo').attr('value','1');
							
						});
						$('#msg2').append('<br /><input type="checkbox" name="transfertndd" id="transfertndd" /><label class="transfertndd">Je suis le propriétaire de ce nom de domaine et je souhaite le transférer</label>');
						
						$('input.ndddispo').attr('value','2');
					}
						
					
					$('#loading').empty();
				}  
			}); 
			
		
		}
	return false;
	
	
	});
	
	/* Verif dispo ndd cmonsite.fr */
	
	$('input.choosenddcmonsite').focus(function(){	
	
		$('input.nddcmonsitedispo').attr('value','2');	
		
	});
	$('input.choosenddcmonsite').blur(function(){	
		$('#msgintro').remove();
		$('#msg').empty();
		$('#msg2').empty();
		$('.redmsg').remove();
		
		var nddcmonsiteaverif = $('input.choosenddcmonsite').val();
		
		nddcmonsiteaverif = nddcmonsiteaverif.replace(/ /g,'');
		$('input.choosenddcmonsite').attr('value',nddcmonsiteaverif);

		if(nddcmonsiteaverif == ''){
			$('#msg').append('<p class="redinfos">Veuillez choisir une adresse de site !</p>');
		}
		else if(nddcmonsiteaverif == 'nom-de-votre-site'){
			$('#msg').append('<p class="redinfos">Veuillez entrer une adresse de site valide !</p>');

		}

		else if((/^[a-z0-9][a-z0-9-]{1,}[a-z0-9]$/gi).exec(nddcmonsiteaverif) == null){
			$('#msg').append('<p class="redinfos">Veuillez entrer une adresse de site valide !<br />Minimum 3 caracteres, seulement des lettres et des chiffres.</p>');
		}
		
		
		else{
			$('#loading').append('<img src="images/loader.gif" />');
			var nddcmonsite = nddcmonsiteaverif;
			$.ajax({  
				type: "POST",  
				url: "verifs_ajax_v5.php",  
				data: {nddcmonsite : nddcmonsite, action : 'verifnddbook'}, 
				success: function(onsuccess) {
						$('input.nddcmonsitedispo').attr('value',onsuccess);
						if(onsuccess == 1){
							$('#msg').append('<p class="greeninfos">Cette adresse est disponible !</p>');
						}
						else{
							$('#msg').append('<p class="redinfos">Cette adresse est déja utilisée !</p>');
						}	
					$('#loading').empty();
				}  
			}); 
			
			
		}
		return false;
	});
	
	/* VERIF NDD etape suivante */

	$('#etapesuivantendd').live('click',function(){
	
		var nddaverif = $('input.choosendd').val();
		nddaverif = nddaverif.replace(/ /g,'');
		$('input.choosendd').attr('value',nddaverif);
				
			
		if($('input.ndddispo').val() == 1 || $('input.ndddispo').val() == 0 && $('input#transfertndd').is(':checked') || $('input.ndddispo').val() == 2 && $('input#transfertndd').is(':checked') || $('input.ndddispo').val() == 2 && $('input.nddautredispo').val() == 1 || $('input#nddplustard').is(':checked')){}
		
		else{
		
			$('#msg').empty();
			$('#msg2').empty();
			$('#disposndd').hide();
			if(nddaverif == ''){
			$('#msg').append('<p class="redinfos">Veuillez choisir un nom de domaine !</p>');
			}
			else if(nddaverif == 'nom-de-votre-site.com'){
				$('#msg').append('<p class="redinfos">Veuillez entrer un nom de domaine valide !</p>');

			}
			
			else if($('input.ndddispo').val() == 0 || $('input.ndddispo').val() == 1)
			{
				$('#msg').append('<p class="redinfos">Veuillez re-verifier la disponibilité d\'un nom de domaine !</p>');

			}

			else {
				$('#msg').append('<p class="redinfos">Veuillez verifier la disponibilité d\'un nom de domaine !</p>');

			}

			return false;
		}
	
	});
	
	
		
	/* ETAPE SUIVANTE pour .cmonsite.fr */
	$('#etapesuivantenddcmonsite').live('click',function(){
				
		if($('input.nddcmonsitedispo').val() == 2){
			return false;
		}
		
		else if($('input.nddcmonsitedispo').val() == 1){}
		
		else{
		
		
			$('#msg').empty();
			$('#msg2').empty();
			$('#disposndd').hide();
			
			var nddcmonsiteaverif = $('input.choosenddcmonsite').val();
		
			nddcmonsiteaverif = nddcmonsiteaverif.replace(/ /g,'');
			$('input.choosenddcmonsite').attr('value',nddcmonsiteaverif);
			
			if(nddcmonsiteaverif == ''){
			$('#msg').append('<p class="redinfos">Veuillez choisir une adresse de site !</p>');

			}
			else if(nddcmonsiteaverif == 'nom-de-votre-site'){
				$('#msg').append('<p class="redinfos">Veuillez choisir une adresse de site valide !</p>');

			}
			
			else if($('input.nddcmonsitedispo').val() == 0)
			{
				$('#msg').append('<p class="redinfos">Veuillez re-verifier la disponibilité d\'une adresse de site !</p>');

			}

			else {
				$('#msg').append('<p class="redinfos">Veuillez verifier la disponibilité d\'une adresse de site !</p>');
	
			}

			return false;
		}
	
	});

	// REMOVE DES ESPACES BLANCS
	$('input#book').blur(function(){ var booktrim = $(this).val(); booktrim = booktrim.replace(/ /g,''); $(this).attr('value',booktrim); });
	$('input#login').blur(function(){ var logintrim = $(this).val(); logintrim = logintrim.replace(/ /g,''); $(this).attr('value',logintrim); });
	
	
	
	/* FONCTIONNALITE PAGE CREATE COMMANDE*/ 
	
	/* Transforme les prix selon la durée choisie */
	$("#formuleduree").live('change',function () {
		
		var id_offre = getUrlVars()["id"];
		
		var value = $("#formuleduree").val(); // nb de mois 	
		var pxparmois = $('.pxparmois').text(); // prix par mois
		var pxtotal = $('.pxtotal').text();
		var pxttc = $('.pxttc').val();
		
		var pxht = pxparmois*value;

		var pxtotal = pxttc*value;
		var tva = pxtotal - pxht;
	
		pxht = pxht.toFixed(2);
		tva = pxtotal-pxht;
		tva = tva.toFixed(2);

		$('.pxht').text(pxht);
		$('.pxtva').text(tva);
		$('.pxtotal').text(pxtotal);
		$('#loadingduree').append('<img src="images/loader.gif" />');
		$.ajax({ 	
			type: "POST",  
			url: "verifs_ajax_v5.php",  
			data: {action : 'calculduree', id_offre : id_offre, duree : value},  
			success: function(onsuccess) {		
				$('.datefinformule').text(onsuccess);
				$('#loadingduree').empty();
			}
		});
	});
	
	/* Verif si le code soumis est correct */
	$('input#submitcode').click(function(){
	$('#msgcode').empty();
		var code = $('input#code_reduc').val();
		var duree = $("#formuleduree").val();
		var id_formule = getUrlVars()["id"];
		var pxtotal = $('.pxtotal').text();
		if(code == ''){
			$('#msgcode').append('<span class="redinfos">Veuillez entrer un code</span>');
			return false;
		}
		else{
		$.ajax({ 	
			type: "POST",  
			url: "verifs_ajax_v5.php",  
			data: {code : code,id_formule : id_formule,action : 'verifcode',duree : duree,pxtotal : pxtotal },  
			success: function(onsuccess) {
			
				$('#msgcode').append(onsuccess);
				if(onsuccess.toLowerCase().indexOf("greeninfos") >= 0){
					$('input#code_reduc').attr('readonly','readonly');
					$('select#formuleduree').attr('readonly','readonly');
					$('span#msgcodeok').empty();
					$('span#msgcodeok').text('Activé :');
					$('input#code_reduc').hide();
					$('input#submitcode').hide();
					$('.pxparmois').css('text-decoration','line-through').css('color','#ccc');
					$('.pxht').css('text-decoration','line-through').css('color','#ccc');
					$('.pxtva').css('text-decoration','line-through').css('color','#ccc');
					$('.darkinfostotal').css('background','#eee').css('color','#ccc').css('text-decoration','line-through');
					$('select#formuleduree').change(function(){ 
					
						$('span#msgcodeok').empty();
						$('span#msgcodeok').text('Si vous avez un code promotionnel saisissez-le ici :');
						$('input#code_reduc').show();
						$('input#submitcode').show();
						$('.msgreducok').remove();
						$('input#submitcode').show();
						$('.pxparmois').css('text-decoration','none').css('color','black');
						$('.pxht').css('text-decoration','none').css('color','black');
						$('.pxtva').css('text-decoration','none').css('color','black');
						$('.darkinfostotal').css('background','#444').css('color','#b9d52e').css('text-decoration','none');
						
						
					});
				}
			
			}	
		});
		
		}
		return false;
	});
	

	$('input#nddplustard').click(function(){
		if($('input#nddplustard').is(':checked')){
			$('#etapesuivantendd').fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);
		}
	});
	
	
	$('input#transfertndd').live('click',function(){
		if($('input#transfertndd').is(':checked')){
			$('#etapesuivantendd').fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);
		}
	});

	

});
/* FIN DU DOM READY */	




/* ---------------- FONCTIONS ---------------- */ 
function closeVE(){
	jQuery('#formcreer').validationEngine('hide');
}

function startAnim(){
	var varCounter = 0;
	window.blinker = setInterval(function(){
		if(window.blink == true){
		   $('a.boutique').parent().css('background','#b9d52e');
		   window.blink=false;
			  varCounter++;
		 }
		else{
				$('a.boutique').parent().css('background','#eee');
				window.blink = true;
				varCounter++;
		}
	},300);
}

// function clignote(element){

	// if(animz = true){
		// element.css('background','#000').css('color','white');
		// anim = false;
	// }
	// if(animz = false){	
			// element.css('background','#eee').css('color','black');
			// anim = true;
		// }
	
	
// }

function stopAnim(){
	clearInterval(window.blinker);
	$('a.boutique').parent().css('background','#eee');
};

function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}
