diff --git a/js/largoCore.js b/js/largoCore.js index 6c4e1d38c..a2d500654 100644 --- a/js/largoCore.js +++ b/js/largoCore.js @@ -126,7 +126,7 @@ jQuery(document).ready(function($) { if (mainEl.length) { mainEl.waypoint(function(direction) { - if ($(window).width() < 768) + if ($(window).width() <= 768) return false; stickyNavEl.toggleClass('show', direction == 'down'); @@ -135,13 +135,13 @@ jQuery(document).ready(function($) { offset: $('#wpadminbar').height() + parseInt(mainEl.css('marginTop')) }); - if ($(window).width() < 768) { + if ($(window).width() <= 768) { stickyNavEl.addClass('show'); stickyNavEl.data('hideAtTop', false); } $(window).on('resize', function() { - if ($(window).width() < 768) { + if ($(window).width() <= 768) { stickyNavEl.addClass('show'); stickyNavEl.data('hideAtTop', false); } else { diff --git a/js/largoCore.min.js b/js/largoCore.min.js index 609862af3..d2ed0ab9a 100644 --- a/js/largoCore.min.js +++ b/js/largoCore.min.js @@ -1 +1 @@ -jQuery(document).ready(function(a){a("input[placeholder], textarea[placeholder]").placeholder(),a(window).scroll(function(){a(this).scrollTop()>300&&document.documentElement.clientWidth>=767?a(".showey-hidey").animate({opacity:"0.5"},100):a(this).scrollTop()<300&&a(".showey-hidey").animate({opacity:"1"},100)}),document.documentElement.clientWidth>=767&&a(".showey-hidey").hover(function(){a(this).animate({opacity:"1"},100)},function(){a(window).scrollTop()<300?a(this).animate({opacity:"1"},100):a(this).animate({opacity:"0.5"},100)}),banner_img_src?(a(".header_img").attr("src",banner_img_src),a(window).resize(function(){a(".header_img").attr("src",whichHeader())})):a(".header_img").parent().remove(),a().carousel&&a(".carousel").carousel({interval:6e3}),a("a.clean-read").on("click",function(){return a("body").addClass("clean-read").append('Exit "Clean Read" mode'),a(".clean-read-container").append('Exit "Clean Read" mode'),a("a.clean-read").hide(),!1}),a(document).on("click",".clean-read-close",function(){return a("body").removeClass("clean-read"),a("a.clean-read").show(),a(".clean-read-close").remove(),!1}),a(document).keyup(function(b){27==b.keyCode&&a("body").hasClass("clean-read")&&a(".clean-read-close").trigger("click")}),a("a.image-click-track").on("click",function(){"object"==typeof _gaq&&_gaq.push(["_trackEvent","Click","Image Widget",this.getAttribute("title")])}),function(){if(Modernizr.touch){var b=/Mobile\/.+Safari/.test(navigator.userAgent)?"touchstart":"click",c=!1;a("ul.nav").on(b+".largo","li",function(b){var e=a(b.currentTarget);return e.hasClass("dropdown")?void(e.is(".open")?a(b.target).is("b.caret")&&(e.removeClass("open"),c=!1,b.preventDefault(),b.stopPropagation()):(d(),e.addClass("open"),c=e,b.preventDefault(),b.stopPropagation())):(window.location.href=e.find("a").attr("href"),b.preventDefault(),b.stopPropagation(),!1)});var d=function(){c&&(c.removeClass("open"),c=!1)};a("body").on(b,d)}}(),function(){var b=a(".sticky-nav-holder"),c=a(".home #main");c.length&&(c.waypoint(function(c){return a(window).width()<768?!1:(b.toggleClass("show","down"==c),void b.data("hideAtTop",!0))},{offset:a("#wpadminbar").height()+parseInt(c.css("marginTop"))}),a(window).width()<768&&(b.addClass("show"),b.data("hideAtTop",!1)),a(window).on("resize",function(){a(window).width()<768?(b.addClass("show"),b.data("hideAtTop",!1)):(a(window).scrollTop()<=c.offset().top&&b.removeClass("show"),b.data("hideAtTop",!0))}));var d=a(".sticky-nav-wrapper");d.length&&!a("body").hasClass("home")&&d.height(b.outerHeight());var e=a(".sticky-footer-holder");e.length&&(e.addClass("show"),a("#site-footer").waypoint(function(a){e.toggleClass("show","up"==a)},{offset:"100%"}),a(".dismiss a").on("click",function(){return e.remove(),!1}))}(),function(){var b={init:function(){this.buttons=a(".custom-share-button"),0!=this.buttons.length&&this.buttons.on("click",a.proxy(this,"onClick"))},getPageData:function(){if(!this._data){var b=a("meta");this._data={},this._data.title=b.filter('[property="og:title"]').attr("content")||document.title,this._data.url=b.filter('[property="og:url"]').attr("content")||document.location,this._data.description=b.filter('[property="og:description"]').attr("content")||b.filter('[name="description"]').attr("content")}return this._data},onClick:function(b){var c=a(b.target),d=c.data("service");return this["do_"+d]&&this["do_"+d](this.getPageData()),!1},do_twitter:function(b){var c="https://twitter.com/intent/tweet?"+a.param({original_referer:document.title,text:b.title,url:b.url});this.popup({url:c,name:"twitter_share"})},do_facebook:function(b){var c="https://www.facebook.com/sharer/sharer.php?"+a.param({u:b.url});this.popup({url:c,name:"facebook_share"})},do_email:function(b){var c="mailto:friend@example.com?"+a.param({subject:b.title,body:b.description+"\n"+b.url});this.popup({url:c,name:"email_share"})},do_googleplus:function(b){var c="https://plus.google.com/share?"+a.param({url:b.url});this.popup({url:c,name:"googleplus_share"})},do_linkedin:function(b){var c="http://www.linkedin.com/shareArticle?"+a.param({mini:"true",url:b.url,title:b.title,summary:b.description});this.popup({url:c,name:"linkedin_share"})},popup:function(b){if(b.url){a.extend(b,{name:"_blank",height:608,width:845,menubar:"no",status:"no",toolbar:"no",resizable:"yes",left:Math.floor(screen.width/2-422.5),top:Math.floor(screen.height/2-304)});for(var c="height width menubar status toolbar resizable left top".split(" "),d=[],e=0;e300&&document.documentElement.clientWidth>=767?a(".showey-hidey").animate({opacity:"0.5"},100):a(this).scrollTop()<300&&a(".showey-hidey").animate({opacity:"1"},100)}),document.documentElement.clientWidth>=767&&a(".showey-hidey").hover(function(){a(this).animate({opacity:"1"},100)},function(){a(window).scrollTop()<300?a(this).animate({opacity:"1"},100):a(this).animate({opacity:"0.5"},100)}),banner_img_src?(a(".header_img").attr("src",banner_img_src),a(window).resize(function(){a(".header_img").attr("src",whichHeader())})):a(".header_img").parent().remove(),a().carousel&&a(".carousel").carousel({interval:6e3}),a("a.clean-read").on("click",function(){return a("body").addClass("clean-read").append('Exit "Clean Read" mode'),a(".clean-read-container").append('Exit "Clean Read" mode'),a("a.clean-read").hide(),!1}),a(document).on("click",".clean-read-close",function(){return a("body").removeClass("clean-read"),a("a.clean-read").show(),a(".clean-read-close").remove(),!1}),a(document).keyup(function(b){27==b.keyCode&&a("body").hasClass("clean-read")&&a(".clean-read-close").trigger("click")}),a("a.image-click-track").on("click",function(){"object"==typeof _gaq&&_gaq.push(["_trackEvent","Click","Image Widget",this.getAttribute("title")])}),function(){if(Modernizr.touch){var b=/Mobile\/.+Safari/.test(navigator.userAgent)?"touchstart":"click",c=!1;a("ul.nav").on(b+".largo","li",function(b){var e=a(b.currentTarget);return e.hasClass("dropdown")?void(e.is(".open")?a(b.target).is("b.caret")&&(e.removeClass("open"),c=!1,b.preventDefault(),b.stopPropagation()):(d(),e.addClass("open"),c=e,b.preventDefault(),b.stopPropagation())):(window.location.href=e.find("a").attr("href"),b.preventDefault(),b.stopPropagation(),!1)});var d=function(){c&&(c.removeClass("open"),c=!1)};a("body").on(b,d)}}(),function(){var b=a(".sticky-nav-holder"),c=a(".home #main");c.length&&(c.waypoint(function(c){return a(window).width()<=768?!1:(b.toggleClass("show","down"==c),void b.data("hideAtTop",!0))},{offset:a("#wpadminbar").height()+parseInt(c.css("marginTop"))}),a(window).width()<=768&&(b.addClass("show"),b.data("hideAtTop",!1)),a(window).on("resize",function(){a(window).width()<=768?(b.addClass("show"),b.data("hideAtTop",!1)):(a(window).scrollTop()<=c.offset().top&&b.removeClass("show"),b.data("hideAtTop",!0))}));var d=a(".sticky-nav-wrapper");d.length&&!a("body").hasClass("home")&&d.height(b.outerHeight());var e=a(".sticky-footer-holder");e.length&&(e.addClass("show"),a("#site-footer").waypoint(function(a){e.toggleClass("show","up"==a)},{offset:"100%"}),a(".dismiss a").on("click",function(){return e.remove(),!1}))}(),function(){var b={init:function(){this.buttons=a(".custom-share-button"),0!=this.buttons.length&&this.buttons.on("click",a.proxy(this,"onClick"))},getPageData:function(){if(!this._data){var b=a("meta");this._data={},this._data.title=b.filter('[property="og:title"]').attr("content")||document.title,this._data.url=b.filter('[property="og:url"]').attr("content")||document.location,this._data.description=b.filter('[property="og:description"]').attr("content")||b.filter('[name="description"]').attr("content")}return this._data},onClick:function(b){var c=a(b.target),d=c.data("service");return this["do_"+d]&&this["do_"+d](this.getPageData()),!1},do_twitter:function(b){var c="https://twitter.com/intent/tweet?"+a.param({original_referer:document.title,text:b.title,url:b.url});this.popup({url:c,name:"twitter_share"})},do_facebook:function(b){var c="https://www.facebook.com/sharer/sharer.php?"+a.param({u:b.url});this.popup({url:c,name:"facebook_share"})},do_email:function(b){var c="mailto:friend@example.com?"+a.param({subject:b.title,body:b.description+"\n"+b.url});this.popup({url:c,name:"email_share"})},do_googleplus:function(b){var c="https://plus.google.com/share?"+a.param({url:b.url});this.popup({url:c,name:"googleplus_share"})},do_linkedin:function(b){var c="http://www.linkedin.com/shareArticle?"+a.param({mini:"true",url:b.url,title:b.title,summary:b.description});this.popup({url:c,name:"linkedin_share"})},popup:function(b){if(b.url){a.extend(b,{name:"_blank",height:608,width:845,menubar:"no",status:"no",toolbar:"no",resizable:"yes",left:Math.floor(screen.width/2-422.5),top:Math.floor(screen.height/2-304)});for(var c="height width menubar status toolbar resizable left top".split(" "),d=[],e=0;e