$(function() { if ( $('#mycarousel').length > 0 ) $('#mycarousel').jcarousel({ scroll: 4 }); $('.imgsmall').click(function() { var strImgL = $(this).attr('href'); var strImgXL = $(this).attr('name'); var strTitolo = $(this).attr('title'); $('.imgmain > img').hide(); $('#zoomloader').html('... Caricamento dettagli...'); $('.imgmain > div').remove(); $('.mojozoom_imgctr').remove(); $('.ingrandisci > a').attr('href','javascript:void(0);'); var img = new Image(); $(img).load(function() { $('.imgmain > img').attr( 'src', strImgL ); $('.imgmain > img').attr( 'alt', strTitolo ); $('.imgmain > img').attr( 'data-zoomsrc', strImgXL ); $('.imgmain > img').show(); var imgXL = new Image(); $(imgXL).load(function() { MojoZoom.init(); $('#zoomloader').html('Muovi il mouse sulla foto per i dettagli.'); }).attr('src', strImgXL); }).attr('src', strImgL); $('.ingrandisci > a').attr('href',strImgXL); return false; }); }); function fCaricaPrimaImmagine( pstrImgL, pstrImgXL ) { $('#zoomloader').html('... Caricamento dettagli...'); var img = new Image(); $(img).load(function() { $('.imgmain > img').show(); var imgXL = new Image(); $(imgXL).load(function() { MojoZoom.init(); $('#zoomloader').html('Muovi il mouse sulla foto per i dettagli.'); }).attr('src', pstrImgXL); }).attr('src', pstrImgL); }