$(function(){ //TEST IE6 var reg = new RegExp("(MSIE 6)","gi"); var ie6 = false; if (reg.test(navigator.userAgent)) { ie6 = true; } if(ie6) { $('img.principale, .vignettep').bind('click',function(){ $('body').append('
'); $('body').append('
'); $('#f_zoom').click(function(){ $('#zoom, #f_zoom').remove(); }); var type = $(this).attr('id').split('_')[0]; var ind_p = $(this).attr('id').split('_')[1]; if(type == ''){ ind_p = 1; } $.post('../websvc/zoom.ws.php?nocache='+Math.random(),{ idproduit: $(this).attr('rel').split('_')[0], idmarque: $(this).attr('rel').split('_')[1], type:type, ind_p:ind_p },function(theResponse){ $('#zoom').html(theResponse); var w = $('#zoom_picture').css('width').split('px')[0]; var h = $('#zoom_picture').css('height').split('px')[0]; var zml = '-'+((parseInt(w))/2)+'px'; //$('#zoom').animate({'margin-right':zml,'margin-top':'-300px'},'fast'); $('#zoom').css({'margin-right':zml,'margin-top':'-300px'}); }); }); $('.zoom_close').live('click',function(){ $('#zoom, #f_zoom').remove(); }); } else { $(".fancybox-thumb").each(function(i){ var href = $(this).attr('alt'); $(this).removeAttr('alt'); $(this).attr('href', href); }); $(".fancybox-thumb").fancybox({ prevEffect : 'none', nextEffect : 'none', //arrows : false, padding : '10', helpers : { overlay : { opacity : 0.6, css : { 'background-color' : '#000' }, closeClick: true }, thumbs : { width : 80, height : 80 } } }); $(".principale").click(function(){ $('.fancybox-thumb:first').click(); }); } }); function zoom_change_image(img,path,w,h){ $('img').removeClass('selected'); $(img).addClass('selected'); $('#zoom_picture').remove(); $('#zoom_zoom').append('image'); var zml = '-'+((parseInt(w))/2)+'px'; //$('#zoom').animate({'width':(parseInt(w)+38)+'px','margin-right':zml,'margin-top':'-300px'},'fast'); $('#zoom').css({'width':(parseInt(w)+38)+'px','margin-right':zml,'margin-top':'-300px'}); } function zoom_load_movie(img,path,player){ var vignettes = img.parentNode.getElementsByTagName('img'); for(var i=0,max=vignettes.length;i