css("height","")},setNavTrayContentNaturalFlow:function(e){e.css("height","").find(".navtray").removeClass("navtray-absolute").css("height","")},activateNavBtn:function(e){var n=this,r=e.data("target"),i=!!r,s,o;e.addClass("active").parent().addClass("nav-li-selected");if(!i)return!1;s=t("."+r),o=s.hasClass("navtray-w"),o?n.showNavTray(s):n.showNavMenu(s,e)},showNavTray:function(e){var t=this;r.csstransitions?e.one(t.transitionEnd,s.update):s.update(),t.slideNavTray(e,!0)},showNavMenu:function(e,t){function a(e){e.removeClass("transition-height"),setTimeout(function(){e.css("height","")},0)}var n=this,i=e.hasClass("navmenu-w-search"),s=e.hasClass("navmenu-w-account"),o=e.find(".reveal-transition-container"),u=o.height();setTimeout(function(){o.addClass("transition-height"),setTimeout(function(){e.addClass("navmenu-w-visible"),r.csstransitions?(o.height(u),o.one(n.transitionEnd,function(){a(o)})):a(o)},0)},0);if(i){var f=t.parent().position().left+parseInt(t.css("marginLeft"),10)+t.innerWidth(),l=f-e.innerWidth();e.css({right:"auto",left:l+"px"})}else if(s){var c=parseInt(t.css("marginLeft"),10),h=e.find(".nav-indicator"),p=(parseInt(t.outerWidth(),10)-parseInt(h.outerWidth(),10))/2;e.css({right:"auto",left:c+"px"}),h.css("left",p+"px")}o.css("height","1px")},blurSearchInput:function(){this.$searchInput.trigger("blur")},prepMobileNav:function(){var e=this;e.preSetNavTrayImageHeights();var n=t("#nav-outer-container"),r=n.find(".nav-mobile-scroller"),i=r.height(),s=o.isIPhone||o.isAndroid?window.innerHeight:e.$window.height();n.css("height",s),r.css("height",i),e.$pageWrapOuter.css("height",s)},preSetNavTrayImageHeights:function(){var e=.556,n=t("#navtrayElectronics").add(t("#navtrayEntertainment")).find(".nav-img-w"),r=t();n.each(function(){var n=t(this).find("img");if(!n.attr("src")){var i=n.width()*e;n.data("customHeight",i),r=r.add(n)}}),r.each(function(){var e=t(this);e.height(e.data("customHeight")),e.on("load",function(){e.css("height","")})})},initMobileNav:function(){var e=this;t("#btn-mobile-nav").on(e.tapOrClick,function(t){t.preventDefault(),e.mobileNavVisible?e.hideMobileNav():e.showMobileNav()});var n=e.$searchInput;if(t("html").hasClass("cssgradients")&&!e.mobileNavHasShadow){var r=t("<i/>",{"class":"nav-mobile-nav-shadow"});t(".nav-mobile-scroller").append(r),e.mobileNavHasShadow=!0}n.on("focus",function(){e.$html.hasClass("bp-nav-mobile")&&h.initMobileNavIScroll(),t(".page-wrap-inner").addClass("show-mobile-search-results")}).on("blur",function(){e.$html.hasClass("bp-nav-mobile")||t(".page-wrap-inner").removeClass("show-mobile-search-results")}).closest(".input-group").find(".input-clear-btn").on(e.tapOrClick,function(){e.$html.hasClass("bp-nav-mobile")&&(h.initMobileNavIScroll(),t(".page-wrap-inner").removeClass("show-mobile-search-results"),setTimeout(t.proxy(e.blurSearchInput,e),0))}),a.on("global:resizeDebounced",t.proxy(e.resizeUpdateMobileNav,e)),a.on("global:resizeDebounced",t.proxy(e.removeStyledHeightFromNavTrayMainSection,e)),t("html").addClass("nav-ready")},removeStyledHeightFromNavTrayMainSection:function(){var e=this;e.$container.find(".navtray-section-main").css("height","")},resizeUpdateMobileNav:function(){var e=this;t("#page-wrap-inner").hasClass("show-mobile-menu")&&(e.prepMobileNav(),setTimeout(function(){h.initMobileNavIScroll()},10))},resetMobileNav:function(){var e=this;e.hideMobileNav(),t("#btn-mobile-nav").off(e.tapOrClick),t(".mobile-screen-overlay").remove()},showMobileNav:function(){var e=this;o.isAndroid&&e.$searchInput.hide(),e.showMobileBackdrop(),e.mobileNavIScroll||(t("#page-wrap-inner").addClass("show-mobile-menu"),e.mobileNavVisible=!0,e.prepMobileNav(),setTimeout(function(){h.initMobileNavIScroll(),o.isAndroid&&e.$searchInput.show()},10))},hideMobileNav:function(){var e=this;e.hideMobileBackdrop(),e.mobileNavVisible&&t("#page-wrap-inner").one(e.transitionEnd,function(){h.destroyMobileNavIScroll()}),t("#page-wrap-inner").removeClass("show-mobile-menu"),e.mobileNavVisible=!1},showMobileBackdrop:function(){var e=this;e.$mobileScreenOverlay=t('<div class="modal-backdrop mobile-screen-overlay opacity0" />').appendTo(t("#page-wrap-inner")),setTimeout(function(){e.$mobileScreenOverlay.removeClass("opacity0").addClass("opacity1"),o.isAndroid&&u.forceWebkitRedraw()},1)},hideMobileBackdrop:function(){var e=this;!e.$mobileScreenOverlay||e.$mobileScreenOverlay.one(e.transitionEnd,function(){e.$mobileScreenOverlay.remove()}),!e.$mobileScreenOverlay||e.$mobileScreenOverlay.removeClass("opacity1").addClass("opacity0")},initMobileFooter:function(){var e=this;e.footerNavCollapseHeight=49,t("#footer-wrapper .footer-mobile-section h5").each(function(){var n=t(this).parent();e.collapseMobileFooterSec(n,!0),e.hasTouch?t(this).hammer().on("tap",function(){e.toggleMobileFooterSec(n)}):t(this).on("click",function(){e.toggleMobileFooterSec(n)})})},toggleMobileFooterSec:function(e){var t=this;e.hasClass("collapsed")?t.expandMobileFooterSec(e):t.collapseMobileFooterSec(e)},resetMobileFooter:function(){var e=this;t("#footer-wrapper .footer-mobile-section h5").each(function(){var n=t(this).parent();n.css("height","").removeClass("collapsed transition-height"),t(this).off(e.tapOrClick)})},collapseMobileFooterSec:function(e,n){var r=this;n=typeof n!="undefined"?n:!1;var i=e.height();e.data("expHeight",i),n?(e.height(r.footerNavCollapseHeight).addClass("collapsed"),setTimeout(function(){e.addClass("transition-height"),a.trigger("SONY:Footer:mobileFooterSecCollapsed")},1)):(e.height(i),setTimeout(function(){e.addClass("transition-height"),setTimeout(function(){e.height(r.footerNavCollapseHeight).addClass("collapsed")},1)},1),r.hasTouch&&e.hasClass("footer-store-locator")&&t("#store-locator-search-input").is(":focus")&&t("#store-locator-search-input").blur())},expandMobileFooterSec:function(e){var t=this;e.height(e.data("expHeight")).removeClass("collapsed").one(t.transitionEnd,function(){e.removeClass("transition-height"),setTimeout(function(){e.css("height","")},1)})}},t.fn.globalNav=function(e){var n=Array.prototype.slice.apply(arguments);return this.each(function(){var r=t(this),i=r.data("globalNav");i||(i=new p(r),r.
Back to home |
File page
Subscribe |
Register |
Login
| N