$j=jQuery.noConflict();$j(document).ready(function(){
	$j('input#poser_question').click(function(){
		  	$j('#poser_question').hide();
		  	$j('#no_question').hide();
		    $j('#reponse_poser_question').show();
 	});
        
        $j('#autre_marque_display').click(function(){
            $j('#autre_marque_display').hide();
           $j('.bloc_categorie221h').fadeIn(); 
        });

  
  
          $j('.pub').click(function(e){
            $j(location).attr('href','/promotions.php');
        });
  
        var totalwidth = $j('body').width();
        var globalwidth = $j('#global').width();
        var globalheight = $j('#global').height();

        var pubwidth = (totalwidth - globalwidth) / 2;
        $j('.pub').css('width',pubwidth + 'px');

        $j('#mettre_avis').click(function(){
            $j('#mettre_avis').hide();
           $j('#reponse_mettre_avis').show(); 
        });

	$j('input#submit_question').click(function(){
		valname = $j('#name_formulaire').val()
		valmail = $j('#mail_formulaire').val()
		valpid = $j('#pid').val()
		valquestion = $j('#question_formulaire').val()
		$j.ajax({
		  type: 'POST',
		  url: '../questions_form.php',
		  data: 'pid=' + valpid + '&name=' + valname + '&mail=' + valmail + '&question=' + valquestion,
		  success: function(data) {
		  	$j('#poser_question').fadeOut('200');
		    $j('#reponse_poser_question').html(data);
		  }
		});
 	});
 	
 	rec = function(numelement){
		valname = $j('#name' + numelement).val()
		valmail = $j('#mail' + numelement).val()
		valpqid = $j('#pqid' + numelement).val()
		valpid = $j('#pid' + numelement).val()
                valnote = $j('#note' + numelement).val()
		valvisible = $j('#visible' + numelement).attr('checked')
		valquestion = $j('#question' + numelement).val()
		valreponse = $j('#reponse' + numelement).val()
		$j.ajax({
		  type: 'POST',
		  url: '../admin_bbq/index/questions_ajax.php',
		  data: 'valpid=' + valpid + '&name=' + valname + '&mail=' + valmail + '&pqid=' + valpqid + '&question=' + valquestion + '&visible=' + valvisible + '&reponse=' + valreponse,
		  success: function(data) {
		    $j('#rep_ajax' + numelement).html(data);
		    $j('#qr_content' + numelement).css('background-color', '#dbedd6');
		  }
		});
 	};
 	
 	 suppr = function(numelement){
		valpqid = $j('#pqid' + numelement).val()
		valsuppr = 1;
		$j.ajax({
		  type: 'POST',
		  url: '../admin_bbq/index/questions_ajax.php',
		  data: 'valpqid=' + valpqid + '&valsuppr=' + valsuppr,
		  success: function(data) {
		  	if (confirm("Confirmer la suppression ?")) {
		    $j('#rep_ajax' + numelement).html(data);
		    $j('#qr_content' + numelement).fadeOut();
		   }
		  }
		});
 	};
        refreshFiltre = function(numelement){
                $j('#page_cur').val(numelement);
                $j('#page' + numelement).css('fontWeight', 'bold');
                var catid = $j('#catid').val()
                var prixmin = $j('#prixmin').val()
                var prixmax = $j('#prixmax').val()
                var page = $j('#page_cur').val()
                var f_marque = $j('#filtre_fab').val()
                var f_dispo = $j('#filtre_dispo').val()
		$j.ajax({
		  type: 'POST',
		  url: 'product_listing_ajax.php',
		  data: 'prixmin=' + prixmin + '&prixmax=' + prixmax + '&filtre_fabricant=' + f_marque + '&filtre_dispo=' + f_dispo + '&page=' + page + '&catid=' + catid,
		  success: function(data) {
		    $j('#resultat_list').html(data);
		  }
		});
 	};
        
	$j('input#submit_avis').click(function(){
		var valname = $j('#name_avis_formulaire').val()
		var valmail = $j('#mail_avis_formulaire').val()
		var valpid = $j('#pid').val()
		var valavis = $j('#avis_formulaire').val()
                var valtitre = $j('#titre_avis_formulaire').val()
                var valnote = $j('#note').val()
		$j.ajax({
		  type: 'POST',
		  url: '../avis_form.php',
		  data: 'pid=' + valpid + '&name=' + valname + '&mail=' + valmail + '&avis  =' + valavis + '&note=' + valnote + '&titre=' + valtitre,
		  success: function(data) {
		  	$j('#mettre_avis').fadeOut('200');
                        $j('#no_avis').hide();
		    $j('#reponse_mettre_avis').html(data);
		  }
		});
 	});
        
         rec_avis = function(numelement){
		valname = $j('#name' + numelement).val()
		valmail = $j('#mail' + numelement).val()
		valapid = $j('#apid' + numelement).val()
		valpid = $j('#pid' + numelement).val()
		valvisible = $j('#visible' + numelement).attr('checked')
		valavis = $j('#avis' + numelement).val()
                valnote = $j('#note' + numelement).val()
		$j.ajax({
		  type: 'POST',
		  url: '../admin_bbq/index/avis_ajax.php',
		  data: 'valpid=' + valpid + '&name=' + valname + '&mail=' + valmail + '&apid=' + valapid + '&avis=' + valavis + '&visible=' + valvisible + '&note=' + valnote,
		  success: function(data) {
		    $j('#rep_ajax' + numelement).html(data);
		    $j('#ap_content' + numelement).css('background-color', '#dbedd6');
		  }
		});
 	};
        suppr_avis = function(numelement){
		valapid = $j('#apid' + numelement).val()
		valsuppr = 1;
		$j.ajax({
		  type: 'POST',
		  url: '../admin_bbq/index/avis_ajax.php',
		  data: 'valapid=' + valapid + '&valsuppr=' + valsuppr,
		  success: function(data) {
		  	if (confirm("Confirmer la suppression ?")) {
		    $j('#rep_ajax' + numelement).html(data);
		    $j('#ap_content' + numelement).fadeOut();
		   }
		  }
		});
 	};

        $j('#form1click').click(function(){
		  	$j('#presentation').hide();
                        $j('#couponscadeaux').hide();
                        $j('#cadeauxentreprise').hide();
		  	$j('#commandegroupee').fadeIn('200');

 	});
        $j('#form2click').click(function(){
		  	$j('#presentation').hide();
                        $j('#cadeauxentreprise').hide();
                        $j('#commandegroupee').hide();
		  	$j('#couponscadeaux').fadeIn('200');
 	}); 
        $j('#form3click').click(function(){
		  	$j('#presentation').hide();
                        $j('#couponscadeaux').hide();
                        $j('#commandegroupee').hide();
		  	$j('#cadeauxentreprise').fadeIn('200');
 	});

        $j('#envoyer1').click(function(){
		valnom = $j('#nom1').val()
		valprenom = $j('#prenom1').val()
		valmail = $j('#mail1').val()
		valtelephone = $j('#telephone1').val()
		valsociete = $j('#societe1').val()
                valnbsalaries = $j('#nbsalaries1').val()
                valtypeproduit = $j('#typeproduit1').val()
                valbudget = $j('#budget1').val()
                valprecision = $j('#precision1').val()
		$j.ajax({
		  type: 'POST',
		  url: 'pro_ajax.php',
		  data: 'nom=' + valnom + '&prenom=' + valprenom + '&mail=' + valmail + '&telephone=' + valtelephone + '&societe=' + valsociete + '&nbsalaries=' + valnbsalaries + '&typeproduit=' + valtypeproduit + '&budget=' + valbudget+ '&precision=' + valprecision + '&part=1',
		  success: function(data) {
		    $j('#commandegroupee').html(data);
		  }
                });
 	}); 
        
        $j('#envoyer2').click(function(){
		valnom = $j('#nom2').val()
		valprenom = $j('#prenom2').val()
		valmail = $j('#mail2').val()
		valtelephone = $j('#telephone2').val()
		valsociete = $j('#societe2').val()
                valnbsalaries = $j('#nbsalaries2').val()
                valcoupon = $j('#coupon2').val()
                valbudget = $j('#budget2').val()
                valprecision = $j('#precision2').val()
		$j.ajax({
		  type: 'POST',
		  url: 'pro_ajax.php',
		  data: 'nom=' + valnom + '&prenom=' + valprenom + '&mail=' + valmail + '&telephone=' + valtelephone + '&societe=' + valsociete + '&nbsalaries=' + valnbsalaries + '&coupon=' + valcoupon + '&budget=' + valbudget+ '&precision=' + valprecision + '&part=2',
		  success: function(data) {
		    $j('#couponscadeaux').html(data);
		  }
                });
 	}); 

        $j('#envoyer3').click(function(){
		valnom = $j('#nom3').val()
		valprenom = $j('#prenom3').val()
		valmail = $j('#mail3').val()
		valtelephone = $j('#telephone3').val()
		valsociete = $j('#societe3').val()
                valnbsalaries = $j('#nbsalaries3').val()
                valcible = $j('#cible3').val()
                valbudget = $j('#budget3').val()
                valprecision = $j('#precision3').val()
		$j.ajax({
		  type: 'POST',
		  url: 'pro_ajax.php',
		  data: 'nom=' + valnom + '&prenom=' + valprenom + '&mail=' + valmail + '&telephone=' + valtelephone + '&societe=' + valsociete + '&nbsalaries=' + valnbsalaries + '&cible=' + valcible + '&budget=' + valbudget+ '&precision=' + valprecision + '&part=3',
		  success: function(data) {
		    $j('#cadeauxentreprise').html(data);
		  }
                });
 	}); 

	
	$j('div.description_menu li').click(function(){$j('div.description_menu li').removeClass('current');$j(this).addClass('current');id=$j(this).attr('id').replace('desc_menu_','');$j('div.description_content li').removeClass('current');$j('li#desc_content_'+id).addClass('current');});$j('div.description_menu li.first').corner('tl 3px');$j('div.description_menu li.last').corner('tr 3px');$j('a.zoombox').zoombox();$j('form#cart_quantity').submit(function(e){e.preventDefault();var popup_add2basket=$j('<div class="addToBasket"></div>').appendTo('body');popup_add2basket.load('addcart_popup.php?products_id='+$j('#product_id').text());$j.zoombox.html(popup_add2basket,{height:504});});});$j.fn.imageZoom=function(b){var settings=$j.extend({openSpeed:200,closeSpeed:200},b);var hoverLink=false;var hoverImg=false;$j(this).hover(function(){console.log('event enter lien');hoverLink=true;var objectLink=$j.extend({offsetTop:$j(this).offset().top,offsetLeft:$j(this).offset().left,urlImg:$j('span',this).text()},settings);var zoomImageBox=$j('<img id="zoom_image_box" src="'+objectLink.urlImg+'">')
.appendTo('body')
.css({'top':objectLink.offsetTop+'px','left':objectLink.offsetLeft+'px'})
.animate({'left':'-=100','top':'-=100','width':'320px','height':'320px'},200,function(){})
.hover(function(){hoverImg=true;console.log('event enter image');},function(){if(!hoverLink){$j('#zoom_image_box').remove();}
hoverImg=false;});},function(){if(!hoverImg){$j('#zoom_image_box').animate();}
hoverLink=false;});};(function($){$.fn.easySlider=function(options){var defaults={choix0:'',choix1:'',choix2:'',choix3:'',prevId:'prevBtn',prevText:'Previous',nextId:'nextBtn',nextText:'Next',controlsShow:true,controlsBefore:'',controlsAfter:'',controlsFade:true,firstId:'firstBtn',firstText:'First',firstShow:false,lastId:'lastBtn',lastText:'Last',lastShow:false,vertical:false,speed:800,auto:false,pause:3300,continuous:false};var options=$.extend(defaults,options);this.each(function(){var obj=$(this);var s=$("li",obj).length;var w=$("li",obj).width();var h=$("li",obj).height();obj.width(w);obj.height(h);obj.css("overflow","hidden");var ts=s-1;var t=0;$("ul",obj).css('width',s*w);if(!options.vertical)$("li",obj).css('float','left');if(options.controlsShow){var html=options.controlsBefore;if(options.firstShow)html+='<span id="'+options.firstId+'"><a href=\"javascript:void(0);\">'+options.firstText+'</a></span>';html+=' <span id="'+options.prevId+'"><a href=\"javascript:void(0);\">'+options.prevText+'</a></span>';html+=' <span id="'+options.nextId+'"><a href=\"javascript:void(0);\">'+options.nextText+'</a></span>';if(options.lastShow)html+=' <span id="'+options.lastId+'"><a href=\"javascript:void(0);\">'+options.lastText+'</a></span>';html+=options.controlsAfter;$(obj).after(html);};$("a","#"+options.nextId).click(function(){animate("next",true);});$("a","#"+options.prevId).click(function(){animate("prev",true);});$("a","#"+options.choix0).click(function(){animate("choix",true,0);});$("a","#"+options.choix1).click(function(){animate("choix",true,1);});$("a","#"+options.choix2).click(function(){animate("choix",true,2);});$("a","#"+options.choix3).click(function(){animate("choix",true,3);});$("a","#"+options.firstId).click(function(){animate("first",true);});$("a","#"+options.lastId).click(function(){animate("last",true);});function animate(dir,clicked,nbr){var ot=t;switch(dir){case"choix":t=nbr;break;case"next":t=(ot>=ts)?(options.continuous?0:ts):t+1;break;case"prev":t=(t<=0)?(options.continuous?ts:0):t-1;break;case"first":t=0;break;case"last":t=ts;break;default:break;};var diff=Math.abs(ot-t);var speed=diff*options.speed;if(!options.vertical){p=(t*w*-1);$("ul",obj).animate({marginLeft:p},speed);}else{p=(t*h*-1);$("ul",obj).animate({marginTop:p},speed);};if(!options.continuous&&options.controlsFade){if(t==ts){$("a","#"+options.nextId).hide();$("a","#"+options.lastId).hide();}else{$("a","#"+options.nextId).show();$("a","#"+options.lastId).show();};if(t==0){$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide();}else{$("a","#"+options.prevId).show();$("a","#"+options.firstId).show();};};if(clicked)clearTimeout(timeout);if(options.auto&&dir=="next"&&!clicked){;timeout=setTimeout(function(){animate("next",false);},diff*options.speed+options.pause);};};var timeout;if(options.auto){;timeout=setTimeout(function(){animate("next",false);},options.pause);};if(!options.continuous&&options.controlsFade){$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide();};});};})(jQuery);var scr=document.getElementsByTagName('script');var zoombox_path=scr[scr.length-1].getAttribute("src").replace('zoombox.js','');var zoombox_images_path="_images/zoombox/";(function($){var options={theme:'zoombox',opacity:0.8,duration:800,animation:true,width:600,height:400,gallery:true,autoplay:false,overflow:false}
var images=new Array();var elem;var isOpen=false;var link;var width;var height;var timer;var i=0;var content;var type='multimedia';var position=false;var imageset=false;var state='closed';var html='<div id="zoombox"> \
            <div class="mask"></div>\
            <div class="container">\
                <div class="content"></div>\
                <div class="title"></div>\
                <div class="next"></div>\
                <div class="prev"></div>\
                <div class="close"></div>\
                <div class="gallery"></div>\
            </div>\
        </div>';var filtreImg=/(\.jpg)|(\.jpeg)|(\.bmp)|(\.gif)|(\.png)/i;var filtreMP3=/(\.mp3)/i;var filtreFLV=/(\.flv)/i;var filtreSWF=/(\.swf)/i;var filtreQuicktime=/(\.mov)|(\.mp4)/i;var filtreWMV=/(\.wmv)|(\.avi)/i;var filtreDailymotion=/(http:\/\/www.dailymotion)|(http:\/\/dailymotion)/i;var filtreVimeo=/(http:\/\/www.vimeo)|(http:\/\/vimeo)/i;var filtreYoutube=/(youtube\.)/i;var filtreKoreus=/(http:\/\/www\.koreus)|(http:\/\/koreus)/i;$.zoombox=function(el,options){}
$.zoombox.options=options;$.zoombox.close=function(){close();}
$.zoombox.open=function(tmplink,opts){elem=null;link=tmplink;options=$.extend({},$.zoombox.options,opts);load();}
$.zoombox.html=function(cont,opts){content=cont;options=$.extend({},$.zoombox.options,opts);width=options.width;height=options.height;elem=null;open();}
$.fn.zoombox=function(opts){return this.each(function(){if($.browser.msie&&$.browser.version<7&&!window.XMLHttpRequest){return false;}
var obj=this;var galleryRegExp=/zgallery([0-9]+)/;var gallery=galleryRegExp.exec($(this).attr("class"));var tmpimageset=false;if(gallery!=null){if(!images[gallery[1]]){images[gallery[1]]=new Array();}
images[gallery[1]].push($(this));var pos=images[gallery[1]].length-1;tmpimageset=images[gallery[1]];}
$(this).unbind('click');$(this).click(function(){options=$.extend({},$.zoombox.options,opts);if(state!='closed')return false;elem=$(obj);link=elem.attr('href');imageset=tmpimageset;position=pos;load();return false;});});}
function load(){if(state=='closed')isOpen=false;state='load';setDim();if(filtreImg.test(link)){img=new Image();img.src=link;$("body").append('<div id="zoombox_loader"></div>');$("#zoombox_loader").css("marginTop",scrollY());timer=window.setInterval(function(){loadImg(img);},100);}else{setContent();open();}}
function build(){$('body').append(html);$(window).keydown(function(event){shortcut(event.which);});$(window).resize(function(){resize();});$('#zoombox .mask').hide();$('#zoombox .gallery').hide();$('#zoombox').addClass(options.theme);$('#zoombox .close,#zoombox .mask,.zoombox_close').click(function(){close();return false;});$('#zoombox .mask').mouseover(function(){$('#zoombox .gallery').stop().fadeTo(500,0);});$('#zoombox .mask').mouseout(function(){$('#zoombox .gallery').stop().fadeTo(500,0.9);});if(imageset==false){$('#zoombox .next,#zoombox .prev').remove();}else{$('#zoombox .next').click(function(){next();});$('#zoombox .prev').click(function(){prev();});if(options.gallery){for(var i in imageset){var img=$('<img src="'+zoombox_images_path+'blank.png'+'" class="video gallery'+(i*1)+'"/>');if(filtreImg.test(imageset[i].attr('href'))){img=$('<img src="'+imageset[i].attr('href')+'" class="gallery'+(i*1)+'"/>');}
img.appendTo('#zoombox .gallery');img.click(function(){gotoSlide($(this).attr('class').replace('gallery',''));$('#zoombox .gallery img').removeClass('current');$(this).addClass('current');});if(i==position){img.addClass('current');}}}}}
function open(){if(isOpen==false){build();}else{$('#zoombox .title').empty();}
$('#zoombox .close').hide();$('#zoombox .container').removeClass('multimedia').removeClass('img');$('#zoombox .container').addClass(type);if(elem!=null&&elem.attr('title')){$('#zoombox .title').append(elem.attr('title'));}
$('#zoombox .content').empty();if(type=='img'&&isOpen==false&&options.animation==true){$('#zoombox .content').append(content);}
if(elem!=null&&elem.find('img').length!=0&&isOpen==false){var min=elem.find('img');$('#zoombox .container').css({width:min.width(),height:min.height(),top:min.offset().top,left:min.offset().left,opacity:0,marginTop:min.css('marginTop')});}else if(elem!=null&&isOpen==false){$('#zoombox .container').css({width:elem.width(),height:elem.height(),top:elem.offset().top,left:elem.offset().left});}else if(isOpen==false){$('#zoombox .container').css({width:100,height:100,top:windowH()/2-50,left:windowW()/2-50})}
var css={width:width,height:height,left:(windowW()-width)/2,top:(windowH()-height)/2,marginTop:scrollY(),opacity:1};if(options.animation==true){$('#zoombox .title').hide();$('#zoombox .container').animate(css,options.duration,function(){if(type=='multimedia'||isOpen==true){$('#zoombox .content').append(content);}
if(type=='image'||isOpen==true){$('#zoombox .content img').css('opacity',0).fadeTo(300,1);}
$('#zoombox .close').fadeIn();$('#zoombox .gallery').fadeIn();$('#zoombox .title').fadeIn(300);state='opened';isOpen=true;});$('#zoombox .mask').fadeTo(200,options.opacity);}else{$('#zoombox .content').append(content);$('#zoombox .close').show();$('#zoombox .gallery').show();$('#zoombox .container').css(css);$('#zoombox .mask').show();$('#zoombox .mask').css('opacity',options.opacity);isOpen=true;state='opened';}}
function close(){state='closing';window.clearInterval(timer);$(window).unbind('keydown');$(window).unbind('resize');if(type=='multimedia'){$('#zoombox .container').empty();}
var css={};if(elem!=null&&elem.find('img').length!=0){var min=elem.find('img');css={width:min.width(),height:min.height(),top:min.offset().top,left:min.offset().left,opacity:0,marginTop:min.css('marginTop')};}else if(elem!=null){css={width:elem.width(),height:elem.height(),top:elem.offset().top,left:elem.offset().left,opacity:0};}else{css={width:100,height:100,top:windowH()/2-50,left:windowW()/2-50,opacity:0};}
if(options.animation==true){$('#zoombox .mask').fadeOut(200);$('#zoombox .container').animate(css,options.duration,function(){$('#zoombox').remove();state='closed';isOpen=false;});}else{$('#zoombox').remove();state='closed';isOpen=false;}}
function setContent(){if(options.overflow==false){if(width*1+50>windowW()){height=(windowW()-50)*height/width;width=windowW()-50;}
if(height*1+50>windowH()){width=(windowH()-50)*width/height;height=windowH()-50;}}
var url=link;type='multimedia';if(filtreImg.test(url)){type='img';content='<img src="'+link+'" width="'+width+'" height="'+height+'"/>';}else if(filtreMP3.test(url)){width=300;height=40;content='<object type="application/x-shockwave-flash" data="'+MP3Player+'?son='+url+'" width="'+width+'" height="'+height+'">';content+='<param name="movie" value="'+MP3Player+'?son='+url+'" /></object>';}else if(filtreFLV.test(url)){var autostart=0;if(options.autoplay==true){autostart=1;}
content='<object type="application/x-shockwave-flash" data="'+zoombox_images_path+'FLVPlayer.swf" width="'+width+'" height="'+height+'">\
<param name="allowFullScreen" value="true">\
<param name="scale" value="noscale">\
<param name="wmode" value="transparent">\
<param name="flashvars" value="flv='+url+'&autoplay='+autostart+'">\
<embed src="'+zoombox_images_path+'FLVPlayer.swf" width="'+width+'" height="'+height+'" allowscriptaccess="always" allowfullscreen="true" flashvars="flv='+url+'" wmode="transparent" />\
</object>';}else if(filtreSWF.test(url)){content='<object width="'+width+'" height="'+height+'"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="'+url+'" /><embed src="'+url+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+width+'" height="'+height+'" wmode="transparent"></embed></object>';}else if(filtreQuicktime.test(url)){content='<embed src="'+url+'" width="'+width+'" height="'+height+'" controller="true" cache="true" autoplay="true"/>';}else if(filtreWMV.test(url)){content='<embed src="'+url+'" width="'+width+'" height="'+height+'" controller="true" cache="true" autoplay="true" wmode="transparent" />';}else if(filtreDailymotion.test(url)){var id=url.split('_');id=id[0].split('/');id=id[id.length-1];if(options.autoplay==true){id=id+'&autostart=1';}
content='<object width="'+width+'" height="'+height+'"><param name="movie" value="http://www.dailymotion.com/swf/'+id+'&colors=background:000000;glow:000000;foreground:FFFFFF;special:000000;&related=0"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/'+id+'&colors=background:000000;glow:000000;foreground:FFFFFF;special:000000;&related=0" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" allowFullScreen="true" allowScriptAccess="always" wmode="transparent" ></embed></object>';}else if(filtreVimeo.test(url)){var id=url.split('/');id=id[3];if(options.autoplay==true){id=id+'&autoplay=1';}
content='<object width="'+width+'" height="'+height+'"><param name="allowfullscreen" value="true" />	<param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id='+id+'&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00AAEB&amp;fullscreen=1" />	<embed src="http://www.vimeo.com/moogaloop.swf?clip_id='+id+'&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00AAEB&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+width+'" height="'+height+'" wmode="transparent" ></embed></object>';}else if(filtreYoutube.test(url)){var id=url.split('watch?v=');id=id[1].split('&');id=id[0];if(options.autoplay==true){id=id+'&autoplay=1';}
content='<object width="'+width+'" height="'+height+'"><param name="movie" value="http://www.youtube.com/v/'+id+'&hl=fr&rel=0&color1=0xFFFFFF&color2=0xFFFFFF&hd=1"></param><embed src="http://www.youtube.com/v/'+id+'&hl=fr&rel=0&color1=0xFFFFFF&color2=0xFFFFFF&hd=1" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" wmode="transparent"></embed></object>';}else if(filtreKoreus.test(url)){url=url.split('.html');url=url[0];content='<object type="application/x-shockwave-flash" data="'+url+'" width="'+width+'" height="'+height+'"><param name="movie" value="'+url+'"><embed src="'+url+'" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"  wmode="transparent"></embed></object>';}else{content='<iframe src="'+url+'" width="'+width+'" height="'+height+'" border="0"></iframe>';}
return content;}
function loadImg(img){if(img.complete){i=0;window.clearInterval(timer);width=img.width;height=img.height;$('#zoombox_loader').remove();setContent();open();}
$('#zoombox_loader').css({'background-position':"0px "+i+"px"});i=i-40;if(i<(-440)){i=0;}}
function gotoSlide(i){if(state!='opened'){return false;}
position=i;elem=imageset[position];link=elem.attr('href');if($('#zoombox .gallery img').length>0){$('#zoombox .gallery img').removeClass('current');$('#zoombox .gallery img:eq('+i+')').addClass('current');}
load();return false;}
function next(){i=position+1;if(i>imageset.length-1){i=0;}
gotoSlide(i);}
function prev(){i=position-1;if(i<0){i=imageset.length-1;}
gotoSlide(i);}
function resize(){$('#zoombox .container').css({top:(windowH()-$('#zoombox .container').height())/2,left:(windowW()-$('#zoombox .container').width())/2});}
function shortcut(key){if(key==37){prev();}
if(key==39){next();}
if(key==27){close();}}
function setDim(){width=options.width;height=options.height;if(elem!=null){var widthReg=/w([0-9]+)/;var w=widthReg.exec(elem.attr("class"));if(w!=null){if(w[1]){width=w[1];}}
var heightReg=/h([0-9]+)/;var h=heightReg.exec(elem.attr("class"));if(h!=null){if(h[1]){height=h[1];}}}
return false;}
function windowH(){if(window.innerHeight)return window.innerHeight;else{return $(window).height();}}
function windowW(){if(window.innerWidth)return window.innerWidth;else{return $(window).width();}}
function scrollY(){scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;}else if(document.body&&(document.body.scrollTop)){scrOfY=document.body.scrollTop;}else if(document.documentElement&&(document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;}
return scrOfY;}
function scrollX(){scrOfX=0;if(typeof(window.pageXOffset)=='number'){scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft)){scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft)){scrOfX=document.documentElement.scrollLeft;}
return scrOfX;}})(jQuery);
