/*----------------------------------------------------------------------------------- Smooth Scrolling -----------------------------------------------------------------------------------*/ /*! * jQuery Smooth Scroll Plugin v1.4 * * Date: Mon Apr 25 00:02:30 2011 EDT * Requires: jQuery v1.3+ * * Copyright 2010, Karl Swedberg * Dual licensed under the MIT and GPL licenses (just like jQuery): * https://www.opensource.org/licenses/mit-license.php * https://www.gnu.org/licenses/gpl.html * * * * */ (function(c){function k(b){return b.replace(/^\//,"").replace(/(index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")}var l=k(location.pathname),m=function(b){var d=[],a=false,e=b.dir&&b.dir=="left"?"scrollLeft":"scrollTop";this.each(function(){if(!(this==document||this==window)){var f=c(this);if(f[e]()>0)d.push(this);else{f[e](1);a=f[e]()>0;f[e](0);a&&d.push(this)}}});if(b.el==="first"&&d.length)d=[d.shift()];return d};c.fn.extend({scrollable:function(b){return this.pushStack(m.call(this,{dir:b}))}, firstScrollable:function(b){return this.pushStack(m.call(this,{el:"first",dir:b}))},smoothScroll:function(b){b=b||{};var d=c.extend({},c.fn.smoothScroll.defaults,b);this.die("click.smoothscroll").live("click.smoothscroll",function(a){var e=c(this),f=location.hostname===this.hostname||!this.hostname,g=d.scrollTarget||(k(this.pathname)||l)===l,i=this.hash,h=true;if(!d.scrollTarget&&(!f||!g||!i))h=false;else{f=d.exclude;g=0;for(var j=f.length;h&&g 1025) { jQuery(document).ready(function() { jQuery('a.site-nav-btn').smoothScroll(); }); } /*--------------------------------------------------------------------------------------------- Flexible width for embedded videos (see https://github.com/davatron5000/FitVids.js/) ----------------------------------------------------------------------------------------------*/ jQuery(document).ready(function(){ // Target your .container, .wrapper, .post, etc. jQuery('#wrap').fitVids(); }); /*--------------------------------------------------------------------------------------------- Support Placeholder input text in IE (see https://github.com/danielstocks/jQuery-Placeholder) ----------------------------------------------------------------------------------------------*/ jQuery(document).ready(function(){ jQuery('input[placeholder], textarea[placeholder]').placeholder(); }); /*-------------------------------------------------------------------------------------------- Show/Hide effect site navigation and share-btn on mobile ----------------------------------------------------------------------------------------------*/ jQuery(document).ready(function(){ jQuery('#site-nav').hide(); jQuery('a#mobile-menu-btn').click(function () { jQuery(this).next('#site-nav').slideToggle('200'); }); }); jQuery(document).ready(function(){ jQuery('.share').hide(); jQuery('a.share-btn').click(function () { jQuery(this).next('.share').slideToggle('fast'); }); });