// JavaScript Document

	$(document).ready(function() {
    
	
	 $("a#add2cart").click(function(){
		 tb_show('CLINIQUE MOTIVATION MINCEUR', 'http://www.webloft.ca/shop/shopNew.asp?siteid=299&lang=&TB_iframe=true&height=400&width=800', '','FERMER')						 
	    })
	 
	 $("a#add2carten").click(function(){
		 tb_show('CLINIQUE MOTIVATION MINCEUR', 'http://www.webloft.ca/shop/shopNew.asp?siteid=299&lang=en&TB_iframe=true&height=400&width=800', '','CLOSE')						 
	    })
	 
//	 $("a#english").click(function(){
//		 var x=window.confirm("English version is coming soon!\n\nWe have english products, do you want to see them?.\n\nClick 'OK' to visit our ENGLISH PRODUCTS.")
//			  if (x)
//			   document.location.href="Books_BC349.html?en=true"; 
//			   return false
//	    })
	 
		 $("div#calculette").click(function(){
			 document.location.href="Calculez-votre-IMC_P2594.html"; 
			 return false
			})
	 
 
//		 $("a#link4").click(function(){
//			 alert('Je n\'ai pas le contenu de la page des 4 trucs!');
//			 return false
//			})
	
	
	
	
						var options = { 
						    url: 'functions.asp', 
							target:  '.result',   // target element(s) to be updated with server response 
							  beforeSubmit:   function() { 
							   $('#envoyer').hide();
							   $('.result').html('<img src="images/wait.gif">'); 
							},  // pre-submit callback 
							success:  function(msg) { 
							//$('#envoyer').show();
							  if(msg.indexOf("courriel") > -1 ){$('#envoyer').show();} 				
							
							$(this).css({ color: "red",  font_weight: "800"}); 
							},      // post-submit callback 
					 
							// other available options: 
							//url:       url         // override for form's 'action' attribute 
							//type:      type        // 'get' or 'post', override for form's 'method' attribute 
							//dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
							//clearForm: true        // clear all form fields after successful submit 
							resetForm: false        // reset the form after successful submit 
					 
							// $.ajax options can be used here too, for example: 
							//timeout:   3000 
						}; 		
					
						 $('#send_appointement').submit(function() { 
															//	 alert('ok');
								$(this).ajaxSubmit(options); 
								return false; 
						  }); 
	

	  });


		jQuery.preloadImages = function()
		{
		  for(var i = 0; i<arguments.length; i++)
		  {
			jQuery("<img>").attr("src", arguments[i]);
		  }
		}
		
		$.preloadImages(
		"images/temoignages_JC.jpg",
		"images/temoignages_Jean_louis.jpg",
		"images/temoignages_Mona.jpg",
		"images/bg.png",
		"images/bg_page.png",
		"images/box_orange.png",
		"images/box_bleu.png",
		"images/bg_page.png", 
		"images/news.jpg",
		"images/produit_promo.jpg",
		"images/produit_promo2.jpg"
		);	 


