// <!--
var $1 = typeof $ == 'undefined' ? window.parent.$ : $;
$1(document).ready(function () {
new Slideshow().generate('banner12','1','5',false,false,0);
$('#ssPlay-btn-banner12').addClass('isHidden');
});
var $pages = typeof window.Pages == 'undefined' ? window.parent.Pages : window.Pages;
$1.when($pages.rwdReady).done(function () {
var divSlideshowID = 'divSlideshowbanner12';
var mediaQuerySize = 0;
if (mediaQuerySize == 0)
mediaQuerySize = 25; //default for not widget slide show
var mediaElementQuery = '#' + divSlideshowID + ':media(this-min-width:' + mediaQuerySize + 'em)';
var $cpMedia = typeof window.cpMedia == 'undefined' ? window.parent.cpMedia : window.cpMedia;
var $divSlideShow = $('#' + divSlideshowID);
var $arrows = $divSlideShow.find('a.arrow');
var $arrowsNew = $divSlideShow.find('a.arrowNew');
var $divExternalSlideshow = $('.bannerSlideshowControlsNew').last();
var $overlays = $(document.getElementsByName('captionOverlay_banner12'));
if(window.isMobileBrowserIncludingTablets){
$overlays.each(function (overlay) {
$(overlay).removeClass('overlay')
});
}
$cpMedia.unregister(mediaElementQuery)
.register(mediaElementQuery,
{
deferSetup: false,
setup: function () {
cpMedia.diag('$(element).removeClass("wide"), mediaQuery: ' + mediaElementQuery);
$divSlideShow.removeClass('wide').addClass('narrow');
if ($divExternalSlideshow.length > 0) {
$divExternalSlideshow.hide();
}
if ($arrows.length > 0) {
$arrows.hide();
if (typeof ($$) !== 'undefined') {
$$('#' + divSlideshowID)
.on('swipeRight',
function (e, a) {
$arrows.filter('.prev').click();
});
$$('#' + divSlideshowID)
.on('swipeLeft',
function (e) {
$arrows.filter('.next').click();
});
}
}
if ($arrowsNew.length > 0) {
if (!(false && !window.isMobileBrowserIncludingTablets)) {
$arrowsNew.hide();
}
if (typeof ($$) !== 'undefined') {
$$('#' + divSlideshowID)
.on('swipeRight',
function (e, a) {
$arrowsNew.filter('.prev').click();
});
$$('#' + divSlideshowID)
.on('swipeLeft',
function (e) {
$arrowsNew.filter('.next').click();
});
}
}
if ($overlays.length > 0 && window.isMobileBrowserIncludingTablets) {
if (2 == 1) {
$overlays.hide();
} else if (2 == 2) {
$overlays.removeClass('overlay');
}
}
},
match: function () {
cpMedia.diag('$(element).addClass("wide"), mediaQuery: ' + mediaElementQuery);
$divSlideShow.addClass('wide').removeClass('narrow');
if ($divExternalSlideshow.length > 0 && !$divExternalSlideshow.hasClass('none')) {
$divExternalSlideshow.show();
}
if ($arrows.length > 0) {
$arrows.show();
if (typeof ($$) !== 'undefined') {
$$('#' + divSlideshowID).off('swipeRight');
$$('#' + divSlideshowID).off('swipeLeft');
}
}
if ($arrowsNew.length > 0) {
$arrowsNew.show();
if (typeof ($$) !== 'undefined') {
$$('#' + divSlideshowID).off('swipeRight');
$$('#' + divSlideshowID).off('swipeLeft');
}
}
if ($overlays.length > 0) {
if (2 == 1) {
$overlays.show();
} else if (2 == 2 && !window.isMobileBrowserIncludingTablets) {
$overlays.addClass('overlay');
}
}
},
unmatch: function () {
cpMedia.diag('$(element).removeClass("wide"), mediaQuery: ' + mediaElementQuery);
$divSlideShow.removeClass('wide').addClass('narrow');
if ($divExternalSlideshow.length > 0) {
$divExternalSlideshow.hide();
}
if ($arrows.length > 0) {
$arrows.hide();
if (typeof ($$) !== 'undefined') {
$$('#' + divSlideshowID).on('swipeRight', function (e) {
$arrows.filter('.prev').click();
});
$$('#' + divSlideshowID).on('swipeLeft', function (e) {
$arrows.filter('.next').click();
});
}
}
if ($arrowsNew.length > 0) {
if (typeof ($$) !== 'undefined') {
$$('#' + divSlideshowID).on('swipeRight', function (e) {
$arrowsNew.filter('.prev').click();
});
$$('#' + divSlideshowID).on('swipeLeft', function (e) {
$arrowsNew.filter('.next').click();
});
}
}
if ($overlays.length > 0 && window.isMobileBrowserIncludingTablets) {
if (2 == 1) {
$overlays.hide();
} else if (2 == 2) {
$overlays.removeClass('overlay');
}
}
}
});
});
// -->