isAndroid){var e=0,t=n.$el.find(".player").data("ratio"),r=function(){e++;var i=n.$engine.height()/n.$engine.width(),s=Math.abs(i-t);e<50&&(n.onDebouncedResize(),s>.05&&setTimeout(r,300))};setTimeout(r,300)}}}),n.videoAPI.bind("fullscreen fullscreen-exit",function(e){n.$engine=n.$el.find(".fp-engine"),a.forceWebkitRedraw();var r=n.$player.closest(".pdp-slideshow-outer");e.type==="fullscreen"?(n.isFullScreen=!0,n.$engine.css("top",0),n.$engine.css("left",""),n.variation==="normal"&&(n.$el.css("height","0"),n.$el.find(".fp-ratio").css("padding-top",""),n.isFullEditorial&&n.$engine.css({width:"",height:"",top:"",left:""})),t("body").css("overflow","hidden"),t("body").addClass("has-fullscreen-video"),n.$el.css({overflow:"visible",zIndex:9999}),r.length&&r.css("zIndex",999)):(n.isFullScreen=!1,n.isFullEditorial&&n.onDebouncedResize(),t("body").css("overflow",""),t("body").removeClass("has-fullscreen-video"),n.$el.css({overflow:"",zIndex:""}),n.$el.find(".fp-ratio").css({"padding-top":n.$el.find(".player").data("ratio")*100+"%"}),n.$engine.css("top",0),n.$el.hasClass("normal")&&n.$el.css("height",""),r.length&&r.css("zIndex",""))}),n.$el.hasClass("normal")&&n.$el.find(".fp-play-btn-lrg").removeClass("fp-play-btn-lrg").addClass("fp-play-btn-sml"),n.isFullEditorial&&(o.on("global:resizeDebounced",t.proxy(n.onDebouncedResize,n)),n.onDebouncedResize()),n.setFullScreenforIE(),n.isNormal||n.isFullEditorial||n.isLetterBox||n.$el.addClass("sony-large-video"),r.update()},api:function(){var e=this;return e.videoAPI},sizeFlashFullBleedVideo:function(){var e=this;if(e.videoAPI.engine==="flash"){var t=e.$el.find(".player").data("ratio"),n,r,i;if(s.$window.width()<=479)r="100%",i="";else{var o=e.$el.width(),u=e.$el.height(),a=u/o;a>=t?(r=Math.round(u/t)+"px",i=u+"px"):(r=o+"px",i=Math.round(o*t)+"px")}e.isEditorialChapter&&(n="620px"),e.$engine.css({width:r,height:i,maxHeight:n})}},onDebouncedResize:function(){var e=this,t=s.$window.width();e.$engine=e.$el.find(".fp-engine"),e.isEditorialChapter&&e.$el.css("max-height",620);if(e.isFullScreen)return;t>980?e.$el.css("height",Math.round(Math.min(640,520+(t-980)/5))):(e.$el.css("height",""),s.isLTIE10&&e.$el.css("height","560px")),t<=479?(e.$el.find(".fp-ratio").css({"padding-top":e.$el.find(".player").data("ratio")*100+"%"}),e.$engine.css("width","100%"),e.$engine.css({top:"0",left:"0"})):(e.$el.find(".fp-ratio").css({"padding-top":""}),e.$engine.css("width","")),e.sizeFlashFullBleedVideo();var n=Math.abs(e.$el.height()-e.$engine.height());n>0?(e.$engine.css("top",-n/2+"px"),s.isLTIE10&&e.$engine.css("top","0")):e.$engine.css("top","");var r=Math.abs(e.$el.width()-e.$engine.width());r>0?(e.$engine.css("left",-r/2+"px"),s.isLTIE10&&e.$engine.css("left","0")):e.$engine.css("left","")},setFullScreenforIE:function(){if(t.browser.msie){var e=!0;t(".fp-fullscreen").on("click",function(n){e?(t(".scroll-to-top").addClass("set-me-below"),e=!1):(t(".scroll-to-top").removeClass("set-me-below"),e=!0)})}}},t.fn.sonyVideo=function(e){var n=Array.prototype.slice.call(arguments,1);return this.each(function(){var r=t(this),i=r.data("sonyVideo");i||(i=new c(r,e),r.data("sonyVideo",i)),typeof e=="string"&&i[e].apply(i,n)})},t.fn.sonyVideo.defaults={},t.fn.sonyVideo.settings={},l}),define("modules/sony_video/index",["require","modules/sony_video/module"],function(e){var t=e("modules/sony_video/module");return t.init(),{SonyVideo:t}}),imageSource=new ImageSource,define("imageSource",function(){}),define("modules/recently_viewed/sony_carousel_in_module",["require","jquery","modernizr","require/sony-global-utilities","require/sony-global-environment","require/sony-global-settings","iQ","enquire","secondary/index","secondary/index","secondary/index"],function(e){var t=e("jquery"),n=e("modernizr"),r=e("require/sony-global-utilities"),i=e("require/sony-global-environment"),s=e("require/sony-global-settings"),o=e("iQ"),u=e("enquire"),a=e("secondary/index").sonyFavorites,f=e("secondary/index").sonyCarousel,l=e("secondary/index").sonyScroller,c={init:function(e){var n=t(e);n.length&&new h(n[0])}},h=function(e){var n=this;n.isDesktop=!1,n.isMobile=!1,n.useBounce=!s.isVita&&!s.isLTIE9,n.useMomentum=!s.isVita&&!s.isLTIE9,n.$el=t(e),n.init(),log("SONY : SonyCarousel : Initialized")};return h.prototype={constructor:h,init:function(){var e=this;e.setVars().setupBreakpoints(),e.hasFavorites&&e.initExtendedModule(),setTimeout(function(){e.$wrapper.addClass("in")},0),e.onResize()},setVars:function(){var e=this,t=e.$el.data("paddleWrapper");return e.$paddleWrapper=t?e.$el.find(t):undefined,e.$wrapper=e.$el.find(".sony-carousel-wrapper"),e.$carousel=e.$el.find(".sony-carousel"),e.$favorites=e.$el.find(".js-favorite"),e.$productNames=e.$el.find(".product-name-wrap"),e.hasFavorites=e.$favorites.length>0,e},onResize:function(){var e=this;e.$productNames.evenHeights(),t(".product-price").each(function(){var e=t(this).find(".price-prefix");e.hasClass("wrap")&&e.removeClass("wrap"),this.offsetWidth<this.scrollWidth&&e.addClass("wrap")})},initFavorites:function(){this.favorites=new a(this.$carousel,{itemSelector:".gallery-item .js-favorite",tooltip:!0}),this.favorites.highlightFavoritedProducts()},initExtendedModule:function(){var e=this;e.$productNames.evenHeights(),e.initFavorites(),i.on("global:resizeDebounced",t.proxy(e.onResize,e))},initCarousel:function(){var e=this;return e.$carousel.sonyCarousel({wrapper:".sony-carousel-wrapper",slides:".sony-carousel-slide",pagination:!0,paddles:!0,useSmallPaddles:!0,paddlePosition:"outset",$paddleWrapper:e.$paddleWrapper}),e},initScroller:function(){var e=this;e.$wrapper.scrollerModule({itemElementSelector:".gallery-item",iscrollProps:{bounce:e.useBounce,momentum:e.useMomentum,hScrollbar:!1,isOverflowHidden:!1,onAnimationEnd:o.update},getContentWidth:function(){var n=0,r=[],i=e.$el.find(".sony-carousel-slide");return i.css("width",""),i.each(function(){var e=0,i=t(this);i.find(".gallery-item").each(function(){e+=t(this).outerWidth(!0)}),e=Math.ceil(e),r.push(e),n+=e}),i.each(function(e){t(this).css("width",r[e])}),n}})},destroyCarousel:function(){return this.$carousel.sonyCarousel("destroy"),this},setupBreakpoints:function(){var e=this,t=e.
Back to home |
File page
Subscribe |
Register |
Login
| N