// JavaScript Document

		jQuery.preloadImages = function(){  
		    for(var i = 0; i<arguments.length; i++){
			  jQuery("<img>").attr("src", arguments[i]);
		     }
          }
		  
      //   $.preloadImages("documents/images/anim/1.jpg","documents/images/anim/2.jpg","documents/images/anim/3.jpg","documents/images/anim/4.jpg","documents/images/anim/5.jpg","documents/images/anim/6.jpg","documents/images/anim/7.jpg","documents/images/anim/8.jpg","documents/images/anim/9.jpg","documents/images/anim/10.jpg");

         $(document).ready(function(){
//
//                $('#animation ul').innerfade({
//                    speed: 1000,
//                    timeout: 5000,
//                    type: 'sequence',
//                    containerheight: '247px' 
//                })
    $('a.cart').click(function(){ tb_show('WEB PROMO PLUS', 'http://www.webloft.ca/shop/shopNew.asp?siteid=269&idproduit=5011&iddetail=7908&add=true&lang=&TB_iframe=true&height=400&width=800', '','FERMER') ; return false ;})
  
  
				  $('a.googlemap').click(function(){
						 //theLink = encodeURI($(this).attr('href'))	
						 theLink = $(this).attr('href') 	
						 theName = $('#fichepromo h3').html()	
							tb_show(theName, 'http://maps.google.com/?q=' + theLink + '&TB_iframe=true&height=400&width=800', '','FERMER') ;
							return false
						 })
				  
				      $('a.printerlink').click(function(){
					        window.print() ;
							return false
						 })
					  
				      $('#menusalternatif a[@title*=English]').click(function(){
					        alert('Coming soon!') ;
							return false
						 })
					  
				  
				  $('ul#menusecond li').eq(1).jFav();
				  
			 $('#header').append("<div id='animation'><ul></ul></div>");  
		       var i=1;
			   for (i=1;i<=5;i++)
			{ $('#animation ul').append("<li><img src='documents/images/animation/" + i + ".jpg'></li>"); }
				  

           $('#animation ul').innerfade({
 				speed: 1000,
 				timeout: 3000,
 				type: 'random',
 				containerheight: '167px'
 			});
	  
        });
		
	function pageload(hash) {
		if(hash) {
		
		//$("#loader").show('fast');
		
		//var myStringUrl = hash.split('=');
		//var idpage = myStringUrl[1];
		idpage = window.location.hash.substr(1);
		doImages(idpage);
		
 	    $("#contentbox").fadeOut('slow', function(){ 
		   $("#contentbox").load('default.asp?idpage=' + hash + ' #contentbox',  function(){ 
			 $("#contentbox").fadeIn('slow',function(){$("#loader").hide();});
			 })
		   })
		} 
	}
	

