1/****** 2 * @package WordPress 3 * @subpackage RMTheme 4 * @since version 5.0 5 * @author RM Web Lab 6 *****/ 7 8 /*! 9 * Smooth Scroll - v1.4.10 - 2013-03-02 10 * https://github.com/kswedberg/jquery-smooth-scroll 11 * Copyright (c) 2013 Karl Swedberg 12 * Licensed MIT (https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT) 13 */ 14 (function(l){function t(l){return l.replace(/(:|\.)/g,"\\$1")}var e="1.4.10",o={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficent:2},r=function(t){var e=[],o=!1,r=t.dir&&"left"==t.dir?"scrollLeft":"scrollTop";return this.each(function(){if(this!=document&&this!=window){var t=l(this);t[r]()>0?e.push(this):(t[r](1),o=t[r]()>0,o&&e.push(this),t[r](0))}}),e.length||this.each(function(){"BODY"===this.nodeName&&(e=[this])}),"first"===t.el&&e.length>1&&(e=[e[0]]),e};l.fn.extend({scrollable:function(l){var t=r.call(this,{dir:l});return this.pushStack(t)},firstScrollable:function(l){var t=r.call(this,{el:"first",dir:l});return this.pushStack(t)},smoothScroll:function(e){e=e||{};var o=l.extend({},l.fn.smoothScroll.defaults,e),r=l.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(e){var n=this,s=l(this),c=o.exclude,i=o.excludeWithin,a=0,f=0,h=!0,u={},d=location.hostname===n.hostname||!n.hostname,m=o.scrollTarget||(l.smoothScroll.filterPath(n.pathname)||r)===r,p=t(n.hash);if(o.scrollTarget||d&&m&&p){for(;h&&c.length>a;)s.is(t(c[a++]))&&(h=!1);for(;h&&i.length>f;)s.closest(i[f++]).length&&(h=!1)}else h=!1;h&&(e.preventDefault(),l.extend(u,o,{scrollTarget:o.scrollTarget||p,link:n}),l.smoothScroll(u))}),this}}),l.smoothScroll=function(t,e){var o,r,n,s,c=0,i="offset",a="scrollTop",f={},h={};"number"==typeof t?(o=l.fn.smoothScroll.defaults,n=t):(o=l.extend({},l.fn.smoothScroll.defaults,t||{}),o.scrollElement&&(i="position","static"==o.scrollElement.css("position")&&o.scrollElement.css("position","relative"))),o=l.extend({link:null},o),a="left"==o.direction?"scrollLeft":a,o.scrollElement?(r=o.scrollElement,c=r[a]()):r=l("html, body").firstScrollable(),o.beforeScroll.call(r,o),n="number"==typeof t?t:e||l(o.scrollTarget)[i]()&&l(o.scrollTarget)[i]()[o.direction]||0,f[a]=n+c+o.offset,s=o.speed,"auto"===s&&(s=f[a]||r.scrollTop(),s/=o.autoCoefficent),h={duration:s,easing:o.easing,complete:function(){o.afterScroll.call(o.link,o)}},o.step&&(h.step=o.step),r.length?r.stop().animate(f,h):o.afterScroll.call(o.link,o)},l.smoothScroll.version=e,l.smoothScroll.filterPath=function(l){return l.replace(/^\//,"").replace(/(index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},l.fn.smoothScroll.defaults=o})(jQuery); 15 16 17 /* 18 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 19 * 20 * Uses the built in easing capabilities added In jQuery 1.1 21 * to offer multiple easing options 22 * 23 * TERMS OF USE - jQuery Easing 24 * 25 * Open source under the BSD License. 26 * 27 * Copyright © 2008 George McGinley Smith 28 * All rights reserved. 29 * 30 * Redistribution and use in source and binary forms, with or without modification, 31 * are permitted provided that the following conditions are met: 32 * 33 * Redistributions of source code must retain the above copyright notice, this list of 34 * conditions and the following disclaimer. 35 * Redistributions in binary form must reproduce the above copyright notice, this list 36 * of conditions and the following disclaimer in the documentation and/or other materials 37 * provided with the distribution. 38 * 39 * Neither the name of the author nor the names of contributors may be used to endorse 40 * or promote products derived from this software without specific prior written permission. 41 * 42 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 43 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 44 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 45 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
vendor: 5,376 bytes, lines 46-191
46 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 47 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 48 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 49 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50 * OF THE POSSIBILITY OF SUCH DAMAGE. 51 * 52 */ 53 54 // t: current time, b: begInnIng value, c: change In value, d: duration 55 jQuery.easing['jswing'] = jQuery.easing['swing']; 56 57 jQuery.extend( jQuery.easing, 58 { 59 def: 'easeOutQuad', 60 swing: function (x, t, b, c, d) { 61 //alert(jQuery.easing.default); 62 return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 63 }, 64 easeInQuad: function (x, t, b, c, d) { 65 return c*(t/=d)*t + b; 66 }, 67 easeOutQuad: function (x, t, b, c, d) { 68 return -c *(t/=d)*(t-2) + b; 69 }, 70 easeInOutQuad: function (x, t, b, c, d) { 71 if ((t/=d/2) < 1) return c/2*t*t + b; 72 return -c/2 * ((--t)*(t-2) - 1) + b; 73 }, 74 easeInCubic: function (x, t, b, c, d) { 75 return c*(t/=d)*t*t + b; 76 }, 77 easeOutCubic: function (x, t, b, c, d) { 78 return c*((t=t/d-1)*t*t + 1) + b; 79 }, 80 easeInOutCubic: function (x, t, b, c, d) { 81 if ((t/=d/2) < 1) return c/2*t*t*t + b; 82 return c/2*((t-=2)*t*t + 2) + b; 83 }, 84 easeInQuart: function (x, t, b, c, d) { 85 return c*(t/=d)*t*t*t + b; 86 }, 87 easeOutQuart: function (x, t, b, c, d) { 88 return -c * ((t=t/d-1)*t*t*t - 1) + b; 89 }, 90 easeInOutQuart: function (x, t, b, c, d) { 91 if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 92 return -c/2 * ((t-=2)*t*t*t - 2) + b; 93 }, 94 easeInQuint: function (x, t, b, c, d) { 95 return c*(t/=d)*t*t*t*t + b; 96 }, 97 easeOutQuint: function (x, t, b, c, d) { 98 return c*((t=t/d-1)*t*t*t*t + 1) + b; 99 }, 100 easeInOutQuint: function (x, t, b, c, d) { 101 if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 102 return c/2*((t-=2)*t*t*t*t + 2) + b; 103 }, 104 easeInSine: function (x, t, b, c, d) { 105 return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 106 }, 107 easeOutSine: function (x, t, b, c, d) { 108 return c * Math.sin(t/d * (Math.PI/2)) + b; 109 }, 110 easeInOutSine: function (x, t, b, c, d) { 111 return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 112 }, 113 easeInExpo: function (x, t, b, c, d) { 114 return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 115 }, 116 easeOutExpo: function (x, t, b, c, d) { 117 return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 118 }, 119 easeInOutExpo: function (x, t, b, c, d) { 120 if (t==0) return b; 121 if (t==d) return b+c; 122 if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 123 return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 124 }, 125 easeInCirc: function (x, t, b, c, d) { 126 return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 127 }, 128 easeOutCirc: function (x, t, b, c, d) { 129 return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 130 }, 131 easeInOutCirc: function (x, t, b, c, d) { 132 if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 133 return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 134 }, 135 easeInElastic: function (x, t, b, c, d) { 136 var s=1.70158;var p=0;var a=c; 137 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 138 if (a < Math.abs(c)) { a=c; var s=p/4; } 139 else var s = p/(2*Math.PI) * Math.asin (c/a); 140 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 141 }, 142 easeOutElastic: function (x, t, b, c, d) { 143 var s=1.70158;var p=0;var a=c; 144 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 145 if (a < Math.abs(c)) { a=c; var s=p/4; } 146 else var s = p/(2*Math.PI) * Math.asin (c/a); 147 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 148 }, 149 easeInOutElastic: function (x, t, b, c, d) { 150 var s=1.70158;var p=0;var a=c; 151 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 152 if (a < Math.abs(c)) { a=c; var s=p/4; } 153 else var s = p/(2*Math.PI) * Math.asin (c/a); 154 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 155 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 156 }, 157 easeInBack: function (x, t, b, c, d, s) { 158 if (s == undefined) s = 1.70158; 159 return c*(t/=d)*t*((s+1)*t - s) + b; 160 }, 161 easeOutBack: function (x, t, b, c, d, s) { 162 if (s == undefined) s = 1.70158; 163 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 164 }, 165 easeInOutBack: function (x, t, b, c, d, s) { 166 if (s == undefined) s = 1.70158; 167 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 168 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 169 }, 170 easeInBounce: function (x, t, b, c, d) { 171 return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 172 }, 173 easeOutBounce: function (x, t, b, c, d) { 174 if ((t/=d) < (1/2.75)) { 175 return c*(7.5625*t*t) + b; 176 } else if (t < (2/2.75)) { 177 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 178 } else if (t < (2.5/2.75)) { 179 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 180 } else { 181 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 182 } 183 }, 184 easeInOutBounce: function (x, t, b, c, d) { 185 if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 186 return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 187 } 188 }); 189 190 /* 191 *
192 * TERMS OF USE - EASING EQUATIONS 193 * 194 * Open source under the BSD License. 195 * 196 * Copyright © 2001 Robert Penner 197 * All rights reserved. 198 * 199 * Redistribution and use in source and binary forms, with or without modification, 200 * are permitted provided that the following conditions are met: 201 * 202 * Redistributions of source code must retain the above copyright notice, this list of 203 * conditions and the following disclaimer. 204 * Redistributions in binary form must reproduce the above copyright notice, this list 205 * of conditions and the following disclaimer in the documentation and/or other materials 206 * provided with the distribution. 207 * 208 * Neither the name of the author nor the names of contributors may be used to endorse 209 * or promote products derived from this software without specific prior written permission. 210 * 211 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 212 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 213 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 214 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 215 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 216 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 217 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 218 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 219 * OF THE POSSIBILITY OF SUCH DAMAGE. 220 * 221 */ 222 223 /*! 224 * jQuery Tools v1.2.7 - The missing UI library for the Web 225 * 226 * tabs/tabs.js 227 * 228 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE. 229 * 230 * http://flowplayer.org/tools/ 231 * 232 */ 233 (function(a){a.tools=a.tools||{version:"v1.2.7"},a.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialEffect:!1,initialIndex:0,event:"click",rotate:!1,slideUpSpeed:400,slideDownSpeed:400,history:!1},addEffect:function(a,c){b[a]=c}};var b={"default":function(a,b){this.getPanes().hide().eq(a).show(),b.call()},fade:function(a,b){var c=this.getConf(),d=c.fadeOutSpeed,e=this.getPanes();d?e.fadeOut(d):e.hide(),e.eq(a).fadeIn(c.fadeInSpeed,b)},slide:function(a,b){var c=this.getConf();this.getPanes().slideUp(c.slideUpSpeed),this.getPanes().eq(a).slideDown(c.slideDownSpeed,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}},c,d;a.tools.tabs.addEffect("horizontal",function(b,e){if(!c){var f=this.getPanes().eq(b),g=this.getCurrentPane();d||(d=this.getPanes().eq(0).width()),c=!0,f.show(),g.animate({width:0},{step:function(a){f.css("width",d-a)},complete:function(){a(this).hide(),e.call(),c=!1}}),g.length||(e.call(),c=!1)}});function e(c,d,e){var f=this,g=c.add(this),h=c.find(e.tabs),i=d.jquery?d:c.children(d),j;h.length||(h=c.children()),i.length||(i=c.parent().find(d)),i.length||(i=a(d)),a.extend(this,{click:function(d,i){var k=h.eq(d),l=!c.data("tabs");typeof d=="string"&&d.replace("#","")&&(k=h.filter("[href*=\""+d.replace("#","")+"\"]"),d=Math.max(h.index(k),0));if(e.rotate){var m=h.length-1;if(d<0)return f.click(m,i);if(d>m)return f.click(0,i)}if(!k.length){if(j>=0)return f;d=e.initialIndex,k=h.eq(d)}if(d===j)return f;i=i||a.Event(),i.type="onBeforeClick",g.trigger(i,[d]);if(!i.isDefaultPrevented()){var n=l?e.initialEffect&&e.effect||"default":e.effect;b[n].call(f,d,function(){j=d,i.type="onClick",g.trigger(i,[d])}),h.removeClass(e.current),k.addClass(e.current);return f}},getConf:function(){return e},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return f.click(j+1)},prev:function(){return f.click(j-1)},destroy:function(){h.off(e.event).removeClass(e.current),i.find("a[href^=\"#\"]").off("click.T");return f}}),a.each("onBeforeClick,onClick".split(","),function(b,c){a.isFunction(e[c])&&a(f).on(c,e[c]),f[c]=function(b){b&&a(f).on(c,b);return f}}),e.history&&a.fn.history&&(a.tools.history.init(h),e.event="history"),h.each(function(b){a(this).on(e.event,function(a){f.click(b,a);return a.preventDefault()})}),i.find("a[href^=\"#\"]").on("click.T",function(b){f.click(a(this).attr("href"),b)}),location.hash&&e.tabs=="a"&&c.find("[href=\""+location.hash+"\"]").length?f.click(location.hash):(e.initialIndex===0||e.initialIndex>0)&&f.click(e.initialIndex)}a.fn.tabs=function(b,c){var d=this.data("tabs");d&&(d.destroy(),this.removeData("tabs")),a.isFunction(c)&&(c={onBeforeClick:c}),c=a.extend({},a.tools.tabs.conf,c),this.each(function(){d=new e(a(this),b,c),a(this).data("tabs",d)});return c.api?d:this}})(jQuery); 234 235/*! Magnific Popup - v1.1.0 - 2016-02-20 236Script placement... 237**/ 238 239/****** 240* @package global slider script 241*****/ 242/* jshint undef: true, unused: false */ 243/* global rm_options, jQuery */ 244 245var $ = jQuery.noConflict(); 246jQuery(document).ready(function ($) { 247 "use strict"; 248 function bool_of(bool_string) { 249 var bool_value = ((bool_string === "true" || bool_string === "1") ? true : false); 250 return bool_value; 251 } 252 function toggle_of(bool_string) { 253 var toggle_value = (bool_string === "true" ? 1 : 0); 254 return toggle_value; 255 } 256 if (typeof rm_options.slider_chosen === 'undefined') { 257 return; 258 } 259 if (rm_options.slider_chosen === 'Nivo') { 260 $('#nivo-slider').nivoSlider({ 261 effect: rm_options.nivo_effect, // Specify sets like: 'fold,fade,sliceDown' 262 slices: parseInt(rm_options.nivo_slices, 10), // For slice animations 263 animSpeed: parseInt(rm_options.nivo_animation_speed, 10), // Slide transition speed 264 pauseTime: parseInt(rm_options.nivo_pause_time, 10), // How long each slide will show 265 startSlide: 0, // Set starting Slide (0 index) 266 directionNav: bool_of(rm_options.nivo_dir_navigation), // Next & Prev navigation 267 controlNav: bool_of(rm_options.nivo_controls), // 1,2,3... navigation 268 keyboardNav: false, // Use left & right arrows 269 pauseOnHover: bool_of(rm_options.nivo_pause_on_hover), // Stop animation while hovering 270 manualAdvance: false, // Force manual transitions 271 randomStart: bool_of(rm_options.nivo_start_random_slide), // Start on a random slide 272 prevText: 'Prev<span></span>', 273 nextText: 'Next<span></span>' 274 }); 275 } else if (rm_options.slider_chosen === 'FlexSlider') { 276 $('#slider-area .flexslider').flexslider({ 277 animation: rm_options.flex_slider_effect, 278 slideshowSpeed: parseInt(rm_options.flex_slider_pause_time, 10), //Integer: Set the speed of the slideshow cycling, in milliseconds 279 animationSpeed: parseInt(rm_options.flex_slider_animation_speed, 10), 280 pauseOnHover: toggle_of(rm_options.flex_slider_pause_on_hover), 281 randomize: toggle_of(rm_options.flex_slider_display_random_slide), 282 nextText: 'Next<span></span>', 283 prevText: 'Previous<span></span>' 284 }); 285 } 286 287}); 288 289jQuery(window).load(function () { 290 // Wait till all images have loaded before unwrapping 291 setTimeout(function () {
292 jQuery('.flex-slider-container, #nivo-slider, .carousel-wrap').removeClass('loading'); 293 }, 400); 294}); 295 296 297 298/* 299 * jQuery Superfish Menu Plugin - v1.7.4 300 * Copyright (c) 2013 Joel Birch 301 * 302 * Dual licensed under the MIT and GPL licenses: 303 * http://www.opensource.org/licenses/mit-license.php 304 * http://www.gnu.org/licenses/gpl.html 305 */ 306 307;(function ($) { 308 "use strict"; 309 310 var methods = (function () { 311 // private properties and methods go here 312 var c = { 313 bcClass: 'sf-breadcrumb', 314 menuClass: 'sf-js-enabled', 315 anchorClass: 'sf-with-ul', 316 menuArrowClass: 'sf-arrows' 317 }, 318 ios = (function () { 319 var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent); 320 if (ios) { 321 // iOS clicks only bubble as far as body children 322 $(window).load(function () { 323 $('body').children().on('click', $.noop); 324 }); 325 } 326 return ios; 327 })(), 328 wp7 = (function () { 329 var style = document.documentElement.style; 330 return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent)); 331 })(), 332 toggleMenuClasses = function ($menu, o) { 333 var classes = c.menuClass; 334 if (o.cssArrows) { 335 classes += ' ' + c.menuArrowClass; 336 } 337 $menu.toggleClass(classes); 338 }, 339 setPathToCurrent = function ($menu, o) { 340 return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels) 341 .addClass(o.hoverClass + ' ' + c.bcClass) 342 .filter(function () { 343 return ($(this).children(o.popUpSelector).hide().show().length); 344 }).removeClass(o.pathClass); 345 }, 346 toggleAnchorClass = function ($li) { 347 $li.children('a').toggleClass(c.anchorClass); 348 }, 349 toggleTouchAction = function ($menu) { 350 var touchAction = $menu.css('ms-touch-action'); 351 touchAction = (touchAction === 'pan-y') ? 'auto' : 'pan-y'; 352 $menu.css('ms-touch-action', touchAction); 353 }, 354 applyHandlers = function ($menu, o) { 355 var targets = 'li:has(' + o.popUpSelector + ')'; 356 if ($.fn.hoverIntent && !o.disableHI) { 357 $menu.hoverIntent(over, out, targets); 358 } 359 else { 360 $menu 361 .on('mouseenter.superfish', targets, over) 362 .on('mouseleave.superfish', targets, out); 363 } 364 var touchevent = 'MSPointerDown.superfish'; 365 if (!ios) { 366 touchevent += ' touchend.superfish'; 367 } 368 if (wp7) { 369 touchevent += ' mousedown.superfish'; 370 } 371 $menu 372 .on('focusin.superfish', 'li', over) 373 .on('focusout.superfish', 'li', out) 374 .on(touchevent, 'a', o, touchHandler); 375 }, 376 touchHandler = function (e) { 377 var $this = $(this), 378 $ul = $this.siblings(e.data.popUpSelector); 379 380 if ($ul.length > 0 && $ul.is(':hidden')) { 381 $this.one('click.superfish', false); 382 if (e.type === 'MSPointerDown') { 383 $this.trigger('focus'); 384 } else { 385 $.proxy(over, $this.parent('li'))(); 386 } 387 } 388 }, 389 over = function () { 390 var $this = $(this), 391 o = getOptions($this); 392 clearTimeout(o.sfTimer); 393 $this.siblings().superfish('hide').end().superfish('show'); 394 }, 395 out = function () { 396 var $this = $(this), 397 o = getOptions($this); 398 if (ios) { 399 $.proxy(close, $this, o)(); 400 } 401 else { 402 clearTimeout(o.sfTimer); 403 o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay); 404 } 405 }, 406 close = function (o) { 407 o.retainPath = ($.inArray(this[0], o.$path) > -1); 408 this.superfish('hide'); 409 410 if (!this.parents('.' + o.hoverClass).length) { 411 o.onIdle.call(getMenu(this)); 412 if (o.$path.length) { 413 $.proxy(over, o.$path)(); 414 } 415 } 416 }, 417 getMenu = function ($el) { 418 return $el.closest('.' + c.menuClass); 419 }, 420 getOptions = function ($el) { 421 return getMenu($el).data('sf-options'); 422 }; 423 424 return { 425 // public methods 426 hide: function (instant) { 427 if (this.length) { 428 var $this = this, 429 o = getOptions($this); 430 if (!o) { 431 return this; 432 } 433 var not = (o.retainPath === true) ? o.$path : '', 434 $ul = $this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), 435 speed = o.speedOut; 436 437 if (instant) { 438 $ul.show(); 439 speed = 0; 440 } 441 o.retainPath = false; 442 o.onBeforeHide.call($ul); 443 $ul.stop(true, true).animate(o.animationOut, speed, function () { 444 var $this = $(this); 445 o.onHide.call($this); 446 });
447 } 448 return this; 449 }, 450 show: function () { 451 var o = getOptions(this); 452 if (!o) { 453 return this; 454 } 455 var $this = this.addClass(o.hoverClass), 456 $ul = $this.children(o.popUpSelector); 457 458 o.onBeforeShow.call($ul); 459 $ul.stop(true, true).animate(o.animation, o.speed, function () { 460 o.onShow.call($ul); 461 }); 462 return this; 463 }, 464 destroy: function () { 465 return this.each(function () { 466 var $this = $(this), 467 o = $this.data('sf-options'), 468 $hasPopUp; 469 if (!o) { 470 return false; 471 } 472 $hasPopUp = $this.find(o.popUpSelector).parent('li'); 473 clearTimeout(o.sfTimer); 474 toggleMenuClasses($this, o); 475 toggleAnchorClass($hasPopUp); 476 toggleTouchAction($this); 477 // remove event handlers 478 $this.off('.superfish').off('.hoverIntent'); 479 // clear animation's inline display style 480 $hasPopUp.children(o.popUpSelector).attr('style', function (i, style) { 481 return style.replace(/display[^;]+;?/g, ''); 482 }); 483 // reset 'current' path classes 484 o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); 485 $this.find('.' + o.hoverClass).removeClass(o.hoverClass); 486 o.onDestroy.call($this); 487 $this.removeData('sf-options'); 488 }); 489 }, 490 init: function (op) { 491 return this.each(function () { 492 var $this = $(this); 493 if ($this.data('sf-options')) { 494 return false; 495 } 496 var o = $.extend({}, $.fn.superfish.defaults, op), 497 $hasPopUp = $this.find(o.popUpSelector).parent('li'); 498 o.$path = setPathToCurrent($this, o); 499 500 $this.data('sf-options', o); 501 502 toggleMenuClasses($this, o); 503 toggleAnchorClass($hasPopUp); 504 toggleTouchAction($this); 505 applyHandlers($this, o); 506 507 $hasPopUp.not('.' + c.bcClass).superfish('hide', true); 508 509 o.onInit.call(this); 510 }); 511 } 512 }; 513 })(); 514 515 $.fn.superfish = function (method, args) { 516 if (methods[method]) { 517 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 518 } 519 else if (typeof method === 'object' || ! method) { 520 return methods.init.apply(this, arguments); 521 } 522 else { 523 return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); 524 } 525 }; 526 527 $.fn.superfish.defaults = { 528 popUpSelector: 'ul,.sf-mega', // within menu context 529 hoverClass: 'sfHover', 530 pathClass: 'overrideThisToUse', 531 pathLevels: 1, 532 delay: 800, 533 animation: {opacity: 'show'}, 534 animationOut: {opacity: 'hide'}, 535 speed: 'normal', 536 speedOut: 'fast', 537 cssArrows: true, 538 disableHI: false, 539 onInit: $.noop, 540 onBeforeShow: $.noop, 541 onShow: $.noop, 542 onBeforeHide: $.noop, 543 onHide: $.noop, 544 onIdle: $.noop, 545 onDestroy: $.noop 546 }; 547 548 // soon to be deprecated 549 $.fn.extend({ 550 hideSuperfishUl: methods.hide, 551 showSuperfishUl: methods.show 552 }); 553 554})(jQuery); 555 556 557 558 559/*global jQuery */ 560/*! 561* FitVids 1.0 562* 563* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 564* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 565* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 566* 567* Date: Thu Sept 01 18:00:00 2011 -0500 568*/ 569 570(function( $ ){ 571 572 $.fn.fitVids = function( options ) { 573 var settings = { 574 customSelector: null 575 } 576 577 var div = document.createElement('div'), 578 ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0]; 579 580 div.className = 'fit-vids-style'; 581 div.innerHTML = '­<style> \ 582 .fluid-width-video-wrapper { \ 583 width: 100%; \ 584 position: relative; \ 585 padding: 0; \ 586 } \ 587 \ 588 .fluid-width-video-wrapper iframe, \ 589 .fluid-width-video-wrapper object, \ 590 .fluid-width-video-wrapper embed { \ 591 position: absolute; \ 592 top: 0; \ 593 left: 0; \ 594 width: 100%; \ 595 height: 100%; \ 596 } \ 597 </style>'; 598 599 ref.parentNode.insertBefore(div,ref); 600 601 if ( options ) { 602 $.extend( settings, options ); 603 } 604 605 return this.each(function(){ 606 var selectors = [ 607 "iframe[src*='player.vimeo.com']", 608 "iframe[src*='www.youtube.com']", 609 "iframe[src*='www.kickstarter.com']", 610 "object", 611 "embed" 612 ]; 613 614 if (settings.customSelector) { 615 selectors.push(settings.customSelector); 616 } 617 618 var $allVideos = $(this).find(selectors.join(',')); 619 620 $allVideos.each(function(){ 621 var $this = $(this); 622 if (this.tagName.toLowerCase() == 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 623 var height = ( this.tagName.toLowerCase() == 'object' || $this.attr('height') ) ? $this.attr('height') : $this.height(), 624 width = $this.attr('width') ? $this.attr('width') : $this.width(), 625 aspectRatio = height / width; 626 if(!$this.attr('id')){ 627 var videoID = 'fitvid' + Math.floor(Math.random()*999999); 628 $this.attr('id', videoID); 629 } 630 $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 631 $this.removeAttr('height').removeAttr('width'); 632 }); 633 });
vendor: 4,406 bytes, lines 634-795
634 } 635})( jQuery ); 636 637 638 639 640 641 642 643 644 645 646 647/* 648 * jQuery.appear 649 * https://github.com/bas2k/jquery.appear/ 650 * http://code.google.com/p/jquery-appear/ 651 * http://bas2k.ru/ 652 * 653 * Copyright (c) 2009 Michael Hixson 654 * Copyright (c) 2012-2014 Alexander Brovikov 655 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) 656 */ 657(function($) { 658 $.fn.appear = function(fn, options) { 659 660 var settings = $.extend({ 661 662 //arbitrary data to pass to fn 663 data: undefined, 664 665 //call fn only on the first appear? 666 one: true, 667 668 // X & Y accuracy 669 accX: 0, 670 accY: 0 671 672 }, options); 673 674 return this.each(function() { 675 676 var t = $(this); 677 678 //whether the element is currently visible 679 t.appeared = false; 680 681 if (!fn) { 682 683 //trigger the custom event 684 t.trigger('appear', settings.data); 685 return; 686 } 687 688 var w = $(window); 689 690 //fires the appear event when appropriate 691 var check = function() { 692 693 //is the element hidden? 694 if (!t.is(':visible')) { 695 696 //it became hidden 697 t.appeared = false; 698 return; 699 } 700 701 //is the element inside the visible window? 702 var a = w.scrollLeft(); 703 var b = w.scrollTop(); 704 var o = t.offset(); 705 var x = o.left; 706 var y = o.top; 707 708 var ax = settings.accX; 709 var ay = settings.accY; 710 var th = t.height(); 711 var wh = w.height(); 712 var tw = t.width(); 713 var ww = w.width(); 714 715 if (y + th + ay >= b && 716 y <= b + wh + ay && 717 x + tw + ax >= a && 718 x <= a + ww + ax) { 719 720 //trigger the custom event 721 if (!t.appeared) t.trigger('appear', settings.data); 722 723 } else { 724 725 //it scrolled out of view 726 t.appeared = false; 727 } 728 }; 729 730 //create a modified fn with some additional logic 731 var modifiedFn = function() { 732 733 //mark the element as visible 734 t.appeared = true; 735 736 //is this supposed to happen only once? 737 if (settings.one) { 738 739 //remove the check 740 w.unbind('scroll', check); 741 var i = $.inArray(check, $.fn.appear.checks); 742 if (i >= 0) $.fn.appear.checks.splice(i, 1); 743 } 744 745 //trigger the original fn 746 fn.apply(this, arguments); 747 }; 748 749 //bind the modified fn to the element 750 if (settings.one) t.one('appear', settings.data, modifiedFn); 751 else t.bind('appear', settings.data, modifiedFn); 752 753 //check whenever the window scrolls 754 w.scroll(check); 755 756 //check whenever the dom changes 757 $.fn.appear.checks.push(check); 758 759 //check now 760 (check)(); 761 }); 762 }; 763 764 //keep a queue of appearance checks 765 $.extend($.fn.appear, { 766 767 checks: [], 768 timeout: null, 769 770 //process the queue 771 checkAll: function() { 772 var length = $.fn.appear.checks.length; 773 if (length > 0) while (length--) ($.fn.appear.checks[length])(); 774 }, 775 776 //check the queue asynchronously 777 run: function() { 778 if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); 779 $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20); 780 } 781 }); 782 783 //run checks when these methods are called 784 $.each(['append', 'prepend', 'after', 'before', 'attr', 785 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 786 'remove', 'css', 'show', 'hide'], function(i, n) { 787 var old = $.fn[n]; 788 if (old) { 789 $.fn[n] = function() { 790 var r = old.apply(this, arguments); 791 $.fn.appear.run(); 792 return r; 793 } 794 } 795 });
vendor: 7,516 bytes, lines 796-811
796 797})(jQuery); 798 799 800 801 802 803 804// Generated by CoffeeScript 1.4.0 805/* 806jQuery Waypoints - v2.0.2 807Copyright (c) 2011-2013 Caleb Troughton 808Dual licensed under the MIT license and GPL license. 809https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt 810*/ 811(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(this,function(n,r){var i,o,l,s,f,u,a,c,h,d,p,y,v,w,g,m;i=n(r);c=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t,e){t.each(function(){var t;t=l.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(a,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=a[n(t).data(u)])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);
811return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); 812 813/* 814 Sticky Elements Shortcut for jQuery Waypoints - v2.0.2 815 Copyright (c) 2011-2013 Caleb Troughton 816 Dual licensed under the MIT license and GPL license. 817 https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt 818 */ 819 820 821(function(){(function(e,t){if(typeof define==="function"&&define.amd){return define(["jquery","waypoints"],t)}else{return t(e.jQuery)}})(this,function(e){var t,n;t={wrapper:'<div class="sticky-wrapper" />',stuckClass:"stuck"};n=function(t,n){t.wrap(n.wrapper);t.each(function(){var t;t=e(this);t.parent().height(t.outerHeight());return true});return t.parent()};return e.waypoints("extendFn","sticky",function(r){var i,s;r=e.extend({},e.fn.waypoint.defaults,t,r);i=n(this,r);s=r.handler;r.handler=function(t){var n,i;n=e(this).children(":first");i=t==="down"||t==="right";n.toggleClass(r.stuckClass,i);if(s!=null){return s.call(this,t)}};i.waypoint(r);return this})})}).call(this)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.