34
| <![CDATA[<script type="text/javascript">
(function($) {
$(document).ready(function() {
$.fancybox.defaults.i18n.en = {
CLOSE: 'Close',
NEXT: 'Next',
PREV: 'Previous',
ERROR: 'The requested content cannot be loaded.<br/>Please try again later.',
PLAY_START: 'Start slideshow',
PLAY_STOP: 'Pause slideshow',
FULL_SCREEN: 'Full screen',
THUMBS: 'Thumbnails',
DOWNLOAD: 'Download',
SHARE: 'Share',
ZOOM: 'Zoom'
};
$.fancybox.defaults.lang = 'en';
$('a.fancybox-gallery').fancybox({
buttons: [
'slideShow',
'fullScreen',
'thumbs',
'share',
'download',
//'zoom',
'close'
],
beforeShow: function(instance, current) {
if (current.type === 'image') {
var title = current.opts.$orig.attr('title');
current.opts.caption = (title.length ? '<b class="fancyboxCounter">Image ' + (current.index + 1) + ' of ' + instance.group.length + '</b>' + ' | ' + title : '');
}
}
});
});
})(jQuery);
jQuery(function($) {
SqueezeBox.initialize({});
initSqueezeBox();
$(document).on('subform-row-add', initSqueezeBox);
function initSqueezeBox(event, container)
{
SqueezeBox.assign($(container || document).find('a.modal').get(), {
parse: 'rel'
});
}
});
window.jModalClose = function () {
SqueezeBox.close();
};
// Add extra modal close functionality for tinyMCE-based editors
document.onreadystatechange = function () {
if (document.readyState == 'interactive' && typeof tinyMCE != 'undefined' && tinyMCE)
{
if (typeof window.jModalClose_no_tinyMCE === 'undefined')
{
window.jModalClose_no_tinyMCE = typeof(jModalClose) == 'function' ? jModalClose : false;
jModalClose = function () {
if (window.jModalClose_no_tinyMCE) window.jModalClose_no_tinyMCE.apply(this, arguments);
tinyMCE.activeEditor.windowManager.close();
};
}
if (typeof window.SqueezeBoxClose_no_tinyMCE === 'undefined')
{
if (typeof(SqueezeBox) == 'undefined') SqueezeBox = {};
window.SqueezeBoxClose_no_tinyMCE = typeof(SqueezeBox.close) == 'function' ? SqueezeBox.close : false;
SqueezeBox.close = function () {
if (window.SqueezeBoxClose_no_tinyMCE) window.SqueezeBoxClose_no_tinyMCE.apply(this, arguments);
tinyMCE.activeEditor.windowManager.close();
};
}
}
};
</script>]]>
|