If you tried to add a link to your YouTube channel in Connect With Us widget, you probably experienced strange behavior: click will trigger a prettyPhoto (lightbox) pop-up which ends with error: “Image cannot be loaded“.
Explanation is very simple: in our main script is a jQuery function which adds a prettyPhoto rel attribute to each YouTube link (this will enable opening of desirable video without redirecting your visitor to YouTube site).
Fix is very simple. Please follow these instructions:
1. open js/themeblossom.js
2. find these lines:
$('a[href$=".mov"] , a[href$=".swf"] , a[href*="vimeo.com"] , a[href*="youtube.com"]').each(function() { if(!$(this).attr('rel') != undefined && !$(this).attr('rel') != '') { $(this).attr('rel', 'prettyPhoto'); } $(this).append('<span class="play"></span>'); });
and change them to read:
$('a[href$=".mov"] , a[href$=".swf"] , a[href*="vimeo.com"] , a[href*="youtube.com"]').each(function() { if ($(this).parent().parent().hasClass('cwu')) { // do nothing } else { if(!$(this).attr('rel') != undefined && !$(this).attr('rel') != '') { $(this).attr('rel', 'prettyPhoto'); } $(this).append('<span class="play"></span>'); } });
3. save file and refresh your site in front-end