         $(document).ready(function(){
			// $('#menuproduit, #download, #head ul').corner("round 10px");
			 
			 $('a').click(function(){
				// alert('En construction');
				// return false
			    })
				
	 $(".add2cart").click(function(){
		 strSplit = $("select#iddetail").val().split("|");
		 theID = strSplit[0];
		 tb_show('BRUNELLI', 'http://www.webloft.ca/shop/shopNew.asp?siteid=294&idproduit=&iddetail=' + theID + '&lang=en&TB_iframe=true&height=400&width=800', '','CLOSE')					 
		})
				
	 $("#cart").click(function(){
		 tb_show('BRUNELLI', 'http://www.webloft.ca/shop/shopNew.asp?siteid=294&lang=en&TB_iframe=true&height=400&width=800', '','CLOSE')					 
		})
				
			 
			 $(document).pngFix(); 
			 
 			$('#home #maincolumn ul.animation').innerfade({
 				speed: 500,
 				timeout: 8000,
				animationtype: 'fade',
 				type: 'sequence',
 				containerheight: '440px'
 			});
			
			$('.sitemap ul').prepend('<li><a title="Termes & conditions" href="Termes-conditions_P3830.html">Termes & conditions</a></li>');
			 
			/* $("#maincolumn h1").hide();*/
			
			
			$(".send-btn22").click(function(){ alert('Disponible bientôt!');return false})
			
			
			$(".post").hide();
			
			setTimeout("$('.post').fadeIn('slow');", 100);
			
			
			
						$("form#trouverdetaillant").submit(function() {
																 
							 var theForm = $(this) 
							 var theFormID = $(this).attr('id') 
							 var theName = $("#" + theFormID + " input#NOM").val();
							 var theVille = $("#" + theFormID + " input#VILLE").val();
							// var theMessage = $("#" + theFormID + " input#MESSAGE").val();
							 var theEmail = $("#" + theFormID + " input#EMAIL").val();
							 var themessage = 'S.v.p verifier le(s) champ(s) suivant: \n'
							 
							 var hasError = false;
		                     var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
							// $("#" + theFormID + " .error").remove(); 
							 $("#" + theFormID + " .error").removeClass('error'); 
							 
							 
							if(theName == '') {
								//$("#" + theFormID + " input#NOM").before('<span class="error">*</span>');
								$("#" + theFormID + " input#NOM").addClass('error');
								
								themessage = themessage + "\n- Votre Nom";
								hasError = true;
							}
							
							if(theVille == '') {
								//$("#" + theFormID + " input#NOM").before('<span class="error">*</span>');
								$("#" + theFormID + " input#VILLE").addClass('error');
								
								themessage = themessage + "\n- Votre Ville";
								hasError = true;
							}
							

							if(theEmail == '') {
								//$("#" + theFormID + " input#EMAIL").before('<span class="error">*</span>');
								$("#" + theFormID + " input#EMAIL").addClass('error');
								themessage = themessage + "\n- Votre Courriel";
								hasError = true;
							} else if(!emailReg.test(theEmail)) {
								//$("#" + theFormID + " input#EMAIL").before('<span class="error">*</span>');
								$("#" + theFormID + " input#EMAIL").addClass('error');
								themessage = themessage + "\n- Votre Courriel";
								hasError = true;
							}
					
							
						  if(hasError == false) {
							  // theForm.submit();
									
								$.ajax({
								  type: "POST",
								  url: 'ajax/clients_request.asp',
								  cache: false,
								  data: $("form#" + theFormID ).serialize(),
								  success: function(msg){
									  
										if(msg.indexOf("error") > 0 ){
											alert(msg);
											return false;
										 } else {  
										   $("form#" + theFormID + " input[type='submit']").before('<span class="good">' + msg + '</span>');
										   $("form#" + theFormID + " input[type='submit']").remove() ;
									   }
									  
								  }
								});				   
					
								
							   
						  }	else {
							  
							  alert(themessage);
							  return false;
						 }						
						   return false;
						 });
			
			
						$("form#trouverdetaillanten").submit(function() {
																 
							 var theForm = $(this) 
							 var theFormID = $(this).attr('id') 
							 var theName = $("#" + theFormID + " input#NOM").val();
							 var theVille = $("#" + theFormID + " input#VILLE").val();
							// var theMessage = $("#" + theFormID + " input#MESSAGE").val();
							 var theEmail = $("#" + theFormID + " input#EMAIL").val();
							 var themessage = 'Please check field(s): \n'
							 
							 var hasError = false;
		                     var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
							// $("#" + theFormID + " .error").remove(); 
							 $("#" + theFormID + " .error").removeClass('error'); 
							 
							 
							if(theName == '') {
								//$("#" + theFormID + " input#NOM").before('<span class="error">*</span>');
								$("#" + theFormID + " input#NOM").addClass('error');
								
								themessage = themessage + "\n- Your Name";
								hasError = true;
							}
							
							if(theVille == '') {
								//$("#" + theFormID + " input#NOM").before('<span class="error">*</span>');
								$("#" + theFormID + " input#VILLE").addClass('error');
								
								themessage = themessage + "\n- Your City";
								hasError = true;
							}
							

							if(theEmail == '') {
								//$("#" + theFormID + " input#EMAIL").before('<span class="error">*</span>');
								$("#" + theFormID + " input#EMAIL").addClass('error');
								themessage = themessage + "\n- Your Email";
								hasError = true;
							} else if(!emailReg.test(theEmail)) {
								//$("#" + theFormID + " input#EMAIL").before('<span class="error">*</span>');
								$("#" + theFormID + " input#EMAIL").addClass('error');
								themessage = themessage + "\n- Your Email";
								hasError = true;
							}
					
							
						  if(hasError == false) {
							  // theForm.submit();
									
								$.ajax({
								  type: "POST",
								  url: 'ajax/clients_request.asp',
								  cache: false,
								  data: $("form#" + theFormID ).serialize(),
								  success: function(msg){
									  
										if(msg.indexOf("error") > 0 ){
											alert(msg);
											return false;
										 } else {  
										   $("form#" + theFormID + " input[type='submit']").before('<span class="good">' + msg + '</span>');
										   $("form#" + theFormID + " input[type='submit']").remove() ;
									   }
									  
								  }
								});				   
					
								
							   
						  }	else {
							  
							  alert(themessage);
							  return false;
						 }						
						   return false;
						 });
			
			
        });





