Сломалась галерейка , теперь переключает только после клика по иконке с видео. Ни как не могу понять , что сделать для того , что бы работало сразу.
<script>
jQuery(document).ready(function(){
var enable_lightbox = '<?php echo $enable_lightbox;?>';
if(enable_lightbox == 'no'){
jQuery('.thumbnails .zoom').click(function(e){
e.preventDefault();
var photo_fullsize = jQuery(this).attr('href');
if (jQuery('.images iframe').length > 0)
{
if(photo_fullsize.indexOf('youtube') > (-1) || photo_fullsize.indexOf('vimeo') > (-1)){
jQuery('.images iframe:first').attr('src', photo_fullsize);
} else {
jQuery('.images iframe:first').replaceWith('<img src="'+photo_fullsize+'" alt="Placeholder">');
}
} else {
if(photo_fullsize.indexOf('youtube') > (-1) || photo_fullsize.indexOf('vimeo') > (-1)){
jQuery('.images img:first').replaceWith( '<iframe src="'+photo_fullsize+'" frameborder="0" allowfullscreen></iframe>' );
} else {
jQuery('.images img:first').attr('src', photo_fullsize);
}
}
});
}
else{
jQuery("a[rel^='prettyPhoto[product-gallery]']").prettyPhoto();
}
});
jQuery('#tabmenu a').click(function(e) {
if($(this).hasClass('disabled'))
e.preventDefault();
});
</script>