/* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - EASING EQUATIONS * * Open source under the BSD License. * * Copyright © 2001 Robert Penner * All rights reserved. * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g * * @param f onMouseOver function || An object with configuration options * @param g onMouseOut function || Nothing (use configuration options object) * @author Brian Cherne brian(at)cherne(dot)net */ (function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))g?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(d,c.pauseOnAction)});c.pausePlay&&f.pausePlay.setup();c.slideshow&&(c.pauseOnHover&&a.hover(function(){!a.manualPlay&&!a.manualPause&&a.pause()}, function(){!a.manualPause&&!a.manualPlay&&a.play()}),0');if(1':""+b+"",a.controlNavScaffold.append("
  • "+g+"
  • "),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",t,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});p&&a.controlNavScaffold.delegate("a", "click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(t,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});p&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"), a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1"+a.count+"")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1
  • '+c.prevText+'
  • '+c.nextText+"
  • ");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(t,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)}); p&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('
    ');a.controlsContainer? (a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(t,function(b){b.preventDefault();d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())});p&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+"pause").addClass(e+ "play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){j=l?d-b.touches[0].pageY:d-b.touches[0].pageX;p=l?Math.abs(j)j||a.currentSlide===a.last&&0Number(new Date)-k&&50q/2)?a.flexAnimate(l,c.pauseOnAction):r||a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}i.removeEventListener("touchend",g,!1);f=j=e=d=null}var d,e,f,q,j,k,p=!1;i.addEventListener("touchstart",function(j){a.animating?j.preventDefault():1===j.touches.length&&(a.pause(),q=l?a.h:a.w,k=Number(new Date),f=h&&m&&a.animatingTo=== a.last?0:h&&m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:m?(a.last-a.currentSlide+a.cloneOffset)*q:(a.currentSlide+a.cloneOffset)*q,d=l?j.touches[0].pageY:j.touches[0].pageX,e=l?j.touches[0].pageX:j.touches[0].pageY,i.addEventListener("touchmove",b,!1),i.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),r?f.smoothHeight():h?(a.slides.width(a.computedW), a.update(a.pagingCount),a.setProps()):l?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!l||r){var c=r?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case "animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case "play":!g.playing&& !g.asNav&&g.play();break;case "pause":g.pause()}}};a.flexAnimate=function(b,g,n,i,k){s&&1===a.pagingCount&&(a.direction=a.currentItema.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo,b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?m?(a.count+a.cloneOffset)* q:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?m?0:(a.count+1)*q:m?(a.count-1-b+a.cloneOffset)*q:(b+a.cloneOffset)*q;a.setProps(b,"",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend",function(){a.wrapup(q)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(q)})}c.smoothHeight&& f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!r&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause=function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")}; a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=s?a.pagingCount-1:a.last;return g?!0:s&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:s&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&&!s?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0=== b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:m&&a.animatingTo===a.last?0:m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:f;switch(g){case "setTotal":return m?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+ a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return m?b:a.count*b;case "jumpStart":return m?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=l?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(r)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(p?a.slides.css({opacity:0, display:"block",webkitTransition:"opacity "+c.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing)),c.smoothHeight&&f.smoothHeight();else{var g,n;"init"===b&&(a.viewport=d('
    ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,m&&(n=d.makeArray(a.slides).reverse(),a.slides=d(n),a.container.empty().append(a.slides))); c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=m?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;l&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h); a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide")};a.doMath=function(){var b=a.slides.first(),d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()- b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxWa.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0a.w?(a.itemW+2*d)*a.count-a.w-d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW- a.boxPadding};a.update=function(b,d){a.doMath();h||(ba.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1),f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f= d(b);a.count+=1;a.last=a.count-1;l&&m?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():l&&m?a.slides.eq(a.last).remove():a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup(); c.removed(a)};f.init()};d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"", manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(i){void 0===i&&(i={});if("object"===typeof i)return this.each(function(){var a=d(this),c=a.find(i.selector?i.selector:".slides > li");1===c.length?(c.fadeIn(400),i.start&&i.start(a)):void 0===a.data("flexslider")&&new d.flexslider(this,i)});var k=d(this).data("flexslider"); switch(i){case "play":k.play();break;case "pause":k.pause();break;case "next":k.flexAnimate(k.getTarget("next"),!0);break;case "prev":case "previous":k.flexAnimate(k.getTarget("prev"),!0);break;default:"number"===typeof i&&k.flexAnimate(i,!0)}}})(jQuery); /* * Superfish v1.5 - jQuery menu widget * Copyright (c) 2012 Bob Gregor * Copyright (c) 2008 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * CHANGELOG: https://github.com/bobbravo2/superfish/blob/master/changelog.txt */ ;(function($){ //Set up global SF object var sf = {}; sf.c = { menuClass : 'js-enabled', subClass : 'sub-menu-indicator', anchorClass : 'has-sub-menu' }; sf.defaults = { hoverClass : 'sfHover', pathClass : 'overideThisToUse', pathLevels : 1, delay : 700, animIn : {opacity:'show'},//What animation object to use to show the submenus animOut : {opacity:'hide'},// " " " " " " hide " " easeIn : "swing", easeOut : "swing", speedIn : 'normal', speedOut : 'normal', autoArrows : true, arrow : '»',//Markup to use for sub-menu indicators disableHI : false, // true disables hoverIntent detection //All Callbacks are passed the current superfish instance as an argument onInit : function(){}, // Called on init, after plugin data initialized onAfterInit : function(){}, // callback functions onBeforeShow: function(){}, //Passed the UL to be animated onShow : function(){}, //Passed the UL just animated onBeforeHide: function(){}, onHide : function(){} }; $.fn.superfish = function(method) { // Method calling logic if ( methods[method] ) { return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $.error( 'Method ' + method + ' does not exist on jQuery.superfish' ); } }; /*****************************END jQuery Plugin **********/ var methods = { init: function (opts) { return this.each(function() { //Set up local variables var _ = $(this), //Namespace instance data data = _.data('superfish'), o = $.extend({},sf.defaults,opts); if (! data ) { //Initialize data var lis = _.find('li'); //Get all instance LI's var uls = lis.find('ul'); //Get all instance UL's _.data('superfish', { //Set namaspaced instance data target: _, timer: null, uls : uls, //Save all child UL dom nodes lis: lis, options: o }) data = _.data('superfish');//make it easy for the rest of init() } //Sanity Checks //Check if jQuery.superfish has already been intitialized if (data.initialized) { if (typeof(console) != 'undefined') console.warn('superfish already initialized on',this); return this; } data.initialized = true; //Parse jquery strings for out speed if (typeof(o.speedOut) === 'string') o.speedOut = 600; if ($.browser.msie && (parseInt($.browser.version) <= 6)) return;//Degrade to CSS menus for IE6 //make sure passed in element actually has submenus if (data.uls.length == 0 ) { if (typeof(console) != 'undefined') console.warn('no ul\'s found on parent menu item, exiting'); return this; } //Add root menu CSS class _.addClass(sf.c.menuClass) //Call onInit Callback o.onInit.call(null,_); //Add Arrows if (o.autoArrows) { $('li:has(ul)',data.target).addClass(sf.c.anchorClass).children('A').append(o.arrow); } //Set all UL's to hidden data.uls.hide(); data.lis.delegate('a','mouseenter mouseleave', function (e) { //this is the event target, var $this = $(this), $li = $this.parent('li') $next = $li.children('UL').first(); if (e.type == 'mouseenter') { //Clear Timeout clearTimeout(data.timer); //Clean up adjacent hover classes, but not the current xpath data.lis.not($li).not($li.parents()).removeClass(o.hoverClass); //Add hover class to current LI $li.addClass(o.hoverClass); //Find next UL and animate it if ($next.is(':hidden')) { o.onBeforeShow.call(null,$next); $next.animate(o.animIn,o.speedIn,o.easeIn, function(){ o.onShow.call(null,$next); }) } } else if (e.type == "mouseleave") { data.timer = setTimeout(function(){ methods.close(_); },o.delay); } else { console.warn(' $(this), event.type', $(this), e.type) } e.preventDefault(); e.stopPropagation(); return false; }); //@TODO if (o.pathClass !== sf.defaults.pathClass) { console.warn('@TODO pathClass enabled') $('li.'+o.pathClass,_).slice(0,o.pathLevels) } o.onAfterInit.call(null,_); })//End jQuery.each },//END INIT METHOD close: function (elem) { //Handle API invoked method if (typeof(elem) == "undefined") var elem = $(this); return elem.each( function () { var data = elem.data('superfish'), o = data.options; o.onBeforeHide.call(null,elem); data.uls.animate(o.animOut,o.speedOut,o.easeOut, function(){ o.onHide.call(null,$(this)); }); //Second timeout to run after animation is complete setTimeout( function () { data.uls.hide(); data.lis.removeClass(o.hoverClass); }, o.speedOut); }) }, destroy: function () { return this.each( function () { if ($(this).data('superfish')) { var data = $(this).data('superfish'), o = data.options; data.target.removeClass(sf.c.menuClass); data.uls.removeAttr('style'); if (o.autoArrows) { $('li:has(ul)',data.target).removeClass(sf.c.anchorClass) $("."+sf.c.subClass,data.target).remove(); } data.lis.undelegate('a','mouseenter mouseleave'); $(this).removeData('superfish'); } else { if (typeof(console) !== "undefined") console.warn('Superfish not initialized on that dom element') } }) } }//End Methods })(jQuery); (function($) { $(window).bind('resize load',function() { if( $(this).width() > 599 ) { /* if screen is wider than 600px, use Superfish */ $('#site-nav ul').superfish({ hoverClass :'menu-hover', /* change hover class from default sfHover */ delay : 600, /* delay on mouseout, in ms */ animIn : {opacity:'show',height:'show'}, /* fade-in and slide-down animation */ animOut : {opacity:'hide',height:'hide'}, speedIn : 'normal', speedOut : 'slow', easeIn : 'easeOutExpo', easeOut : 'easeInExpo' }); } }); })(jQuery); (function($) { $(window).bind('resize',function() { if( $(this).width() < 600 ) { $('ul.main-nav ul.sub-menu').removeAttr('style'); $('ul.main-nav').removeClass('sf-js-enabled'); }; }); })(jQuery); jQuery( document ).ready( function( $ ) { if(window.location.hash) { $(window.location.hash).addClass( 'highlight' ); } }); /* Lifted from _s & modified to suit, Handles toggling main nav for small screens. */ jQuery( document ).ready( function( $ ) { var $masthead = $( '#masthead' ), timeout = false; $.fn.smallMenu = function() { $masthead.find( '#site-nav' ).removeClass( 'main-nav' ).addClass( 'main-nav-small' ); $masthead.find( '#site-nav h1' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' ); /* $masthead.find( '.sub-menu' ).removeAttr( 'style' ); */ $( '.menu-toggle' ).unbind( 'click' ).click( function() { $masthead.find( '.menu' ).toggle(); $( this ).toggleClass( 'toggled-on' ); } ); }; /* Check viewport width on first load. */ if ( $( window ).width() < 600 ) $.fn.smallMenu(); /* Check viewport width when user resizes the browser window. */ $( window ).resize( function() { var browserWidth = $( window ).width(); if ( false !== timeout ) clearTimeout( timeout ); timeout = setTimeout( function() { if ( browserWidth < 600 ) { $.fn.smallMenu(); } else { $masthead.find( '#site-nav' ).removeClass( 'main-nav-small' ).addClass( 'main-nav' ); $masthead.find( '#site-nav h1' ).removeClass( 'menu-toggle' ).addClass( 'assistive-text' ); $masthead.find( '.menu' ).removeAttr( 'style' ); } }, 200 ); } ); } ); /* scripts by Matt Weibe et al for device detection, resizing media, and enabling touch events for hover */ (function($){ function supportsTouch() { var android = navigator.userAgent.indexOf('Android') != -1 return android || !!('createTouch' in document) } $.support.touch = supportsTouch /* Use $('a').touchOrClick instead of $('a').click in your code. */ $.fn.touchOrClick = function(efunc) { if (typeof efunc == 'undefined') { return this.trigger(supportsTouch() ? 'touchstart' : 'click') } else { return this.bind(supportsTouch() ? 'touchstart' : 'click', efunc) } } })(jQuery); jQuery(document).ready(function($) { var mainMenu = $("nav .main-nav"); /* mainMenu.fitText(6.5, {minWidth:1600}) $("hgroup h1").fitText(3.2, {minWidth:420}) */ /* menus on touch devices can't exactly hover. */ if ( $.support.touch ) { $.addOutsideEvent('touchstart', 'touchoutside') function openMenu() { mainMenu.addClass('hover').unbind('touchstart').bind('touchoutside', closeMenu) } function closeMenu() { mainMenu.removeClass('hover').unbind('touchoutside').bind('touchstart', openMenu) } closeMenu() } mainMenu.click(function(event) { $(this).toggleClass("hover") }) /* $("#main .main").fitVids({cusomSelector: 'iframe[src^="http://maps.google"]:first'}) */ /* pseudo color-inherit on linked steps */ /* if ( $.browser.msie && $.browser.version.substring(0, 1) < 8 ) { $("h1 > a, h2 > a").each(function(index) { var me = $(this), color = me.parent().css('color') me.css('color', color) }) } */ }); /* * FitText.js 1.2 * * Copyright 2011, Dave Rupert http://daverupert.com * Contribution by Matt Wiebe http://somadesign.ca/ * Released under the WTFPL license * http://sam.zoy.org/wtfpl/ * * Date: Mon Sep 05 12:31:00 2011 -0600 */ (function(a){a.fn.fitText=function(d,b){var c={minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY,minWidth:0,maxWidth:Number.POSITIVE_INFINITY};return this.each(function(){var e=a(this);var g=d||1;if(b){a.extend(c,b);}var f=function(){var h=a(window).width();if(h>=c.minWidth&&h<=c.maxWidth){e.css("fontSize",Math.max(Math.min(e.width()/(g*10),parseFloat(c.maxFontSize)),parseFloat(c.minFontSize)));}else{e.css("fontSize","");}};f();a(window).resize(f);});};})(jQuery); /* * FitVids 1.0 * * Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ * * Date: Thu Sept 01 18:00:00 2011 -0500 */ (function(a){a.fn.fitVids=function(b){var c={customSelector:null};var e=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];e.className="fit-vids-style";e.innerHTML="­";d.parentNode.insertBefore(e,d);if(b){a.extend(c,b);}return this.each(function(){var f=["iframe[src^='http://player.vimeo.com']","iframe[src^='http://www.youtube.com']","iframe[src^='http://www.kickstarter.com']","object","embed"];if(c.customSelector){f.push(c.customSelector);}var g=a(this).find(f.join(","));g.each(function(){var j=a(this),h=this.tagName=="OBJECT"?j.attr("height"):j.height(),i=h/j.width();j.wrap('
    ').parent(".fluid-width-video-wrapper").css("padding-top",(i*100)+"%");j.removeAttr("height").removeAttr("width");});});};})(jQuery); /* * jQuery outside events - v1.1 - 3/16/2010 * http://benalman.com/projects/jquery-outside-events-plugin/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ (function($,c,b){$.map("click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup".split(" "),function(d){a(d)});a("focusin","focus"+b);a("focusout","blur"+b);$.addOutsideEvent=a;function a(g,e){e=e||g+b;var d=$(),h=g+"."+e+"-special-event";$.event.special[e]={setup:function(){d=d.add(this);if(d.length===1){$(c).bind(h,f)}},teardown:function(){d=d.not(this);if(d.length===0){$(c).unbind(h)}},add:function(i){var j=i.handler;i.handler=function(l,k){l.target=k;j.apply(this,arguments)}}};function f(i){$(d).each(function(){var j=$(this);if(this!==i.target&&!j.has(i.target).length){j.triggerHandler(e,[i.target])}})}}})(jQuery,document,"outside");