1// Sticky Plugin v1.0.0 for jQuery 2(function($) { 3 var defaults = { 4 topSpacing: 0, 5 bottomSpacing: 0, 6 className: 'is-sticky', 7 wrapperClassName: 'sticky-wrapper', 8 center: false, 9 getWidthFrom: '' 10 }, 11 $window = $(window), 12 $document = $(document), 13 sticked = [], 14 windowHeight = $window.height(), 15 scroller = function() { 16 var scrollTop = $window.scrollTop(), 17 documentHeight = $document.height(), 18 dwh = documentHeight - windowHeight, 19 extra = (scrollTop > dwh) ? dwh - scrollTop : 0; 20 for (var i = 0; i < sticked.length; i++) { 21 var s = sticked[i], 22 elementTop = s.stickyWrapper.offset().top, 23 etse = elementTop - s.topSpacing - extra; 24 if (scrollTop <= etse) { 25 if (s.currentTop !== null) { 26 s.stickyElement 27 .css('position', '') 28 .css('top', ''); 29 s.stickyElement.parent().removeClass(s.className); 30 s.currentTop = null; 31 } 32 } 33 else { 34 var newTop = documentHeight - s.stickyElement.outerHeight() 35 - s.topSpacing - s.bottomSpacing - scrollTop - extra; 36 if (newTop < 0) { 37 newTop = newTop + s.topSpacing; 38 } else { 39 newTop = s.topSpacing; 40 } 41 if (s.currentTop != newTop) { 42 s.stickyElement 43 .css('position', 'fixed') 44 .css('top', newTop); 45 if (typeof s.getWidthFrom !== 'undefined') { 46 s.stickyElement.css('width', $(s.getWidthFrom).width()); 47 } 48 s.stickyElement.parent().addClass(s.className); 49 s.currentTop = newTop; 50 } 51 } 52 } 53 }, 54 resizer = function() { 55 windowHeight = $window.height(); 56 }, 57 methods = { 58 init: function(options) { 59 var o = $.extend(defaults, options); 60 return this.each(function() { 61 var stickyElement = $(this); 62 var stickyId = stickyElement.attr('id'); 63 var wrapper = $('<div></div>') 64 .attr('id', stickyId + '-sticky-wrapper') 65 .addClass(o.wrapperClassName); 66 stickyElement.wrapAll(wrapper); 67 if (o.center) { 68 stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); 69 } 70 if (stickyElement.css("float") == "right") { 71 stickyElement.css({"float":"none"}).parent().css({"float":"right"}); 72 } 73 var stickyWrapper = stickyElement.parent(); 74 stickyWrapper.css('height', stickyElement.outerHeight()); 75 sticked.push({ 76 topSpacing: o.topSpacing, 77 bottomSpacing: o.bottomSpacing, 78 stickyElement: stickyElement, 79 currentTop: null, 80 stickyWrapper: stickyWrapper, 81 className: o.className, 82 getWidthFrom: o.getWidthFrom 83 }); 84 }); 85 }, 86 update: scroller 87 }; 88 // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer): 89 if (window.addEventListener) { 90 window.addEventListener('scroll', scroller, false); 91 window.addEventListener('resize', resizer, false); 92 } else if (window.attachEvent) { 93 window.attachEvent('onscroll', scroller); 94 window.attachEvent('onresize', resizer); 95 } 96 $.fn.sticky = function(method) { 97 if (methods[method]) { 98 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 99 } else if (typeof method === 'object' || !method ) { 100 return methods.init.apply( this, arguments ); 101 } else { 102 $.error('Method ' + method + ' does not exist on jQuery.sticky'); 103 } 104 }; 105 $(function() { 106 setTimeout(scroller, 0); 107 }); 108})(jQuery); 109/** 110 * Isotope v1.5.25 111 * An exquisite jQuery plugin for magical layouts 112 * http://isotope.metafizzy.co 113 * 114 * Commercial use requires one-time license fee 115 * http://metafizzy.co/#licenses 116 * 117 * Copyright 2012 David DeSandro / Metafizzy 118 */ 119(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1}
vendor: 12,310 bytes, line 119
119,containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;f<g;f++)e=d[f],this.originalStyle[e]=c[e]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var h={"original-order":function(a,b){return b.elemCount++,b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,h),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var i=this;setTimeout(function(){i.element.addClass(i.options.containerClass)},0),this.options.resizable&&w.bind("smartresize.isotope",function(){i.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};return c=c.filter(function(a,b){return b.nodeType===1}),this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0),c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=a?this._translate:this._positionAbs},_filter:function(a){var b=this.options.filter===""?"*":this.options.filter;if(!b)return a;var c=this.options.hiddenClass,d="."+c,e=a.filter(d),f=e;if(b!=="*"){f=e.filter(b);var g=a.not(d).not(b).addClass(c);this.styleQueue.push({$el:g,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:f,style:this.options.visibleStyle}),f.removeClass(c),a.filter(b)},updateSortData:function(a,c){var d=this,e=this.options.getSortData,f,g;a.each(function(){f=b(this),g={};for(var a in e)!c&&a==="original-order"?g[a]=b.data(this,"isotope-sort-data")[a]:g[a]=e[a](f,d);b.data(this,"isotope-sort-data",g)})},_sort:function(){var a=this.options.sortBy,b=this._getSorter,c=this.options.sortAscending?1:-1,d=function(d,e){var f=b(d,a),g=b(e,a);return f===g&&a!=="original-order"&&(f=b(d,"original-order"),g=b(e,"original-order")),(f>g?1:f<g?-1:0)*c};this.$filteredAtoms.sort(d)},_getSorter:function(a,c){return b.data(a,"isotope-sort-data")[c]},_translate:function(a,b){return{translate:[a,b]}},_positionAbs:function(a,b){return{left:a,top:b}},_pushPosition:function(a,b,c){b=Math.round(b+this.offset.left),c=Math.round(c+this.offset.top);var d=this.getPositionStyles(b,c);this.styleQueue.push({$el:a,style:d}),this.options.itemPositionDataEnabled&&a.data("isotope-item-position",{x:b,y:c})},layout:function(a,b){var c=this.options.layoutMode;this["_"+c+"Layout"](a);if(this.options.resizesContainer){var d=this["_"+c+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:d})}this._processStyleQueue(a,b),this.isLaidOut=!0},_processStyleQueue:function(a,c){var d=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",f=this.options.animationOptions,g=this.options.onLayout,h,i,j,k;i=function(a,b){b.$el[d](b.style,f)};if(this._isInserting&&this.isUsingJQueryAnimation)i=function(a,b){h=b.$el.hasClass("no-transition")?"css":d,b.$el[h](b.style,f)};else if(c||g||f.complete){var l=!1,m=[c,g,f.complete],n=this;j=!0,k=function(){if(l)return;var b;for(var c=0,d=m.length;c<d;c++)b=m[c],typeof b=="function"&&b.call(n.element,a,n);l=!0};if(this.isUsingJQueryAnimation&&d==="animate")f.complete=k,j=!1;else if(e.csstransitions){var o=0,p=this.styleQueue[0],s=p&&p.$el,t;while(!s||!s.length){t=this.styleQueue[o++];if(!t)return;s=t.$el}var u=parseFloat(getComputedStyle(s[0])[r]);u>0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.colYs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryPlaceBrick(a,g)}})},_masonryPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=this.masonry.columnWidth*d,h=c;this._pushPosition(a,g,h);var i=c+a.outerHeight(!0),j=this.masonry.cols+1-f;for(e=0;e<j;e++)this.masonry.colYs[d+e]=i},_masonryGetContainerSize:function(){var a=Math.max.apply(Math,this.masonry.colYs);return{height:a}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(a){var c=this,d=this.element.width(),e=this.fitRows;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.x!==0&&f+e.x>d&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.rowXs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryHorizontalPlaceBrick(a,g)}})},_masonryHorizontalPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=c,h=this.masonryHorizontal.rowHeight*d;this._pushPosition(a,g,h);var i=c+a.outerWidth(!0),j=this.masonryHorizontal.rows+1-f;for(e=0;e<j;e++)this.masonryHorizontal.rowXs[d+e]=i},_masonryHorizontalGetContainerSize:function(){var a=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:a}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var c=this,d=this.element.height(),e=this.fitColumns;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.y!==0&&g+e.y>d&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};
119b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery); 120/* 121 * Isotope custom layout mode that extends masonry in order to work with percentage-sized columns 122 */ 123(function(window, $) { 124 $.extend($.Isotope.prototype, { 125 _sloppyMasonryReset : function() { 126 // layout-specific props 127 var containerSize = this.element.width(), 128 segmentSize = this.options.sloppyMasonry && this.options.sloppyMasonry.columnWidth || 129 // or use the size of the first item, i.e. outerWidth 130 this.$filteredAtoms.outerWidth(true) || 131 // if there's no items, use size of container 132 containerSize; 133 this.sloppyMasonry = { 134 cols : Math.round(containerSize / segmentSize), 135 columnWidth : segmentSize 136 }; 137 var i = this.sloppyMasonry.cols; 138 this.sloppyMasonry.colYs = []; 139 while (i--) { 140 this.sloppyMasonry.colYs.push(0); 141 } 142 }, 143 _sloppyMasonryLayout : function($elems) { 144 var instance = this, props = instance.sloppyMasonry; 145 $elems.each(function() { 146 var $this = $(this), 147 // how many columns does this brick span 148 colSpan = Math.round($this.outerWidth(true) / props.columnWidth); 149 colSpan = Math.min(colSpan, props.cols); 150 if (colSpan === 1) { 151 // if brick spans only one column, 152 // just like singleMode 153 instance._sloppyMasonryPlaceBrick($this, props.colYs); 154 } else { 155 // brick spans more than one column 156 // how many different places could 157 // this brick fit horizontally 158 var groupCount = props.cols + 1 - colSpan, groupY = [], groupColY, i; 159 // for each group potential 160 // horizontal position 161 for (i = 0; i < groupCount; i++) { 162 // make an array of colY values 163 // for that one group 164 groupColY = props.colYs.slice(i, i + colSpan); 165 // and get the max value of the 166 // array 167 groupY[i] = Math.max.apply(Math, groupColY); 168 } 169 instance._sloppyMasonryPlaceBrick($this, groupY); 170 } 171 }); 172 }, 173 _sloppyMasonryPlaceBrick : function($brick, setY) { 174 // get the minimum Y value from the columns 175 var minimumY = Math.min.apply(Math, setY), shortCol = 0; 176 // Find index of short column, the first from the left 177 for ( var i = 0, len = setY.length; i < len; i++) { 178 if (setY[i] === minimumY) { 179 shortCol = i; 180 break; 181 } 182 } 183 // position the brick 184 var x = this.sloppyMasonry.columnWidth * shortCol, y = minimumY; 185 this._pushPosition($brick, x, y); 186 // apply setHeight to necessary columns 187 var setHeight = minimumY + $brick.outerHeight(true), setSpan = this.sloppyMasonry.cols + 1 - len; 188 for (i = 0; i < setSpan; i++) { 189 this.sloppyMasonry.colYs[shortCol + i] = setHeight; 190 } 191 }, 192 _sloppyMasonryGetContainerSize : function() { 193 var containerHeight = Math.max.apply(Math, this.sloppyMasonry.colYs); 194 return { 195 height : containerHeight 196 }; 197 }, 198 _sloppyMasonryResizeChanged : function() { 199 return true; 200 } 201 }); 202})(this, this.jQuery); 203/** 204 * jQuery.LocalScroll - Animated scrolling navigation, using anchors. 205 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com 206 * Dual licensed under MIT and GPL. 207 * Date: 3/11/2009 208 * @author Ariel Flesler 209 * @version 1.2.7 210 **/ 211;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);
211return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery); 212/* 213 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 214*/ 215jQuery.easing['jswing'] = jQuery.easing['swing']; 216jQuery.extend( jQuery.easing, 217{ 218 def: 'easeOutQuad', 219 swing: function (x, t, b, c, d) { 220 //alert(jQuery.easing.default); 221 return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 222 }, 223 easeInQuad: function (x, t, b, c, d) { 224 return c*(t/=d)*t + b; 225 }, 226 easeOutQuad: function (x, t, b, c, d) { 227 return -c *(t/=d)*(t-2) + b; 228 }, 229 easeInOutQuad: function (x, t, b, c, d) { 230 if ((t/=d/2) < 1) return c/2*t*t + b; 231 return -c/2 * ((--t)*(t-2) - 1) + b; 232 }, 233 easeInCubic: function (x, t, b, c, d) { 234 return c*(t/=d)*t*t + b; 235 }, 236 easeOutCubic: function (x, t, b, c, d) { 237 return c*((t=t/d-1)*t*t + 1) + b; 238 }, 239 easeInOutCubic: function (x, t, b, c, d) { 240 if ((t/=d/2) < 1) return c/2*t*t*t + b; 241 return c/2*((t-=2)*t*t + 2) + b; 242 }, 243 easeInQuart: function (x, t, b, c, d) { 244 return c*(t/=d)*t*t*t + b; 245 }, 246 easeOutQuart: function (x, t, b, c, d) { 247 return -c * ((t=t/d-1)*t*t*t - 1) + b; 248 }, 249 easeInOutQuart: function (x, t, b, c, d) { 250 if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 251 return -c/2 * ((t-=2)*t*t*t - 2) + b; 252 }, 253 easeInQuint: function (x, t, b, c, d) { 254 return c*(t/=d)*t*t*t*t + b; 255 }, 256 easeOutQuint: function (x, t, b, c, d) { 257 return c*((t=t/d-1)*t*t*t*t + 1) + b; 258 }, 259 easeInOutQuint: function (x, t, b, c, d) { 260 if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 261 return c/2*((t-=2)*t*t*t*t + 2) + b; 262 }, 263 easeInSine: function (x, t, b, c, d) { 264 return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 265 }, 266 easeOutSine: function (x, t, b, c, d) { 267 return c * Math.sin(t/d * (Math.PI/2)) + b; 268 }, 269 easeInOutSine: function (x, t, b, c, d) { 270 return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 271 }, 272 easeInExpo: function (x, t, b, c, d) { 273 return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 274 }, 275 easeOutExpo: function (x, t, b, c, d) { 276 return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 277 }, 278 easeInOutExpo: function (x, t, b, c, d) { 279 if (t==0) return b; 280 if (t==d) return b+c; 281 if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 282 return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 283 }, 284 easeInCirc: function (x, t, b, c, d) { 285 return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 286 }, 287 easeOutCirc: function (x, t, b, c, d) { 288 return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 289 }, 290 easeInOutCirc: function (x, t, b, c, d) { 291 if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 292 return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 293 }, 294 easeInElastic: function (x, t, b, c, d) { 295 var s=1.70158;var p=0;var a=c; 296 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 297 if (a < Math.abs(c)) { a=c; var s=p/4; } 298 else var s = p/(2*Math.PI) * Math.asin (c/a); 299 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 300 }, 301 easeOutElastic: function (x, t, b, c, d) { 302 var s=1.70158;var p=0;var a=c; 303 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 304 if (a < Math.abs(c)) { a=c; var s=p/4; } 305 else var s = p/(2*Math.PI) * Math.asin (c/a); 306 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 307 }, 308 easeInOutElastic: function (x, t, b, c, d) { 309 var s=1.70158;var p=0;var a=c; 310 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 311 if (a < Math.abs(c)) { a=c; var s=p/4; } 312 else var s = p/(2*Math.PI) * Math.asin (c/a); 313 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 314 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 315 }, 316 easeInBack: function (x, t, b, c, d, s) { 317 if (s == undefined) s = 1.70158; 318 return c*(t/=d)*t*((s+1)*t - s) + b; 319 }, 320 easeOutBack: function (x, t, b, c, d, s) { 321 if (s == undefined) s = 1.70158; 322 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 323 }, 324 easeInOutBack: function (x, t, b, c, d, s) { 325 if (s == undefined) s = 1.70158; 326 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 327 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 328 }, 329 easeInBounce: function (x, t, b, c, d) { 330 return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 331 }, 332 easeOutBounce: function (x, t, b, c, d) { 333 if ((t/=d) < (1/2.75)) { 334 return c*(7.5625*t*t) + b; 335 } else if (t < (2/2.75)) { 336 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 337 } else if (t < (2.5/2.75)) { 338 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 339 } else { 340 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 341 } 342 }, 343 easeInOutBounce: function (x, t, b, c, d) { 344 if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 345 return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 346 } 347}); 348/** 349 * Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com 350 * Dual licensed under MIT and GPL. 351 * @author Ariel Flesler 352 * @version 1.4.3.1 353 */ 354;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); 355/* 356* Copyright (C) 2009 Joel Sutherland 357* Licenced under the MIT license 358* http://www.newmediacampaigns.com/page/jquery-flickr-plugin 359* 360* Available tags for templates: 361* title, link, date_taken, description, published, author, author_id, tags, image* 362*/ 363(function($){$.fn.jflickrfeed=function(settings,callback){settings=$.extend(true,{flickrbase:'http://api.flickr.com/services/feeds/',feedapi:'photos_public.gne',limit:20,qstrings:{lang:'en-us',format:'json',jsoncallback:'?'},cleanDescription:true,useTemplate:true,itemTemplate:'',itemCallback:function(){}},settings);var url=settings.flickrbase+settings.feedapi+'?';var first=true;for(var key in settings.qstrings){if(!first) 364url+='&';url+=key+'='+settings.qstrings[key];first=false;} 365return $(this).each(function(){var $container=$(this);var container=this;$.getJSON(url,function(data){$.each(data.items,function(i,item){if(i<settings.limit){if(settings.cleanDescription){var regex=/<p>(.*?)<\/p>/g;var input=item.description;if(regex.test(input)){item.description=input.match(regex)[2] 366if(item.description!=undefined) 367item.description=item.description.replace('<p>','').replace('</p>','');}} 368item['image_s']=item.media.m.replace('_m','_s');item['image_t']=item.media.m.replace('_m','_t');item['image_m']=item.media.m.replace('_m','_m');item['image']=item.media.m.replace('_m','');item['image_b']=item.media.m.replace('_m','_b');delete item.media;if(settings.useTemplate){var template=settings.itemTemplate;
368for(var key in item){var rgx=new RegExp('{{'+key+'}}','g');template=template.replace(rgx,item[key]);} 369$container.append(template)} 370settings.itemCallback.call(container,item);}});if($.isFunction(callback)){callback.call(container,data);}});});}})(jQuery); 371/*! 372 * jQuery Cookie Plugin v1.3.1 373 * https://github.com/carhartl/jquery-cookie 374 * 375 * Copyright 2013 Klaus Hartl 376 * Released under the MIT license 377 */ 378(function (factory) { 379 if (typeof define === 'function' && define.amd && define.amd.jQuery) { 380 // AMD. Register as anonymous module. 381 define(['jquery'], factory); 382 } else { 383 // Browser globals. 384 factory(jQuery); 385 } 386}(function ($) { 387 var pluses = /\+/g; 388 function raw(s) { 389 return s; 390 } 391 function decoded(s) { 392 return decodeURIComponent(s.replace(pluses, ' ')); 393 } 394 function converted(s) { 395 if (s.indexOf('"') === 0) { 396 // This is a quoted cookie as according to RFC2068, unescape 397 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 398 } 399 try { 400 return config.json ? JSON.parse(s) : s; 401 } catch(er) {} 402 } 403 var config = $.cookie = function (key, value, options) { 404 // write 405 if (value !== undefined) { 406 options = $.extend({}, config.defaults, options); 407 if (typeof options.expires === 'number') { 408 var days = options.expires, t = options.expires = new Date(); 409 t.setDate(t.getDate() + days); 410 } 411 value = config.json ? JSON.stringify(value) : String(value); 412 return (document.cookie = [ 413 encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), 414 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 415 options.path ? '; path=' + options.path : '', 416 options.domain ? '; domain=' + options.domain : '', 417 options.secure ? '; secure' : '' 418 ].join('')); 419 } 420 // read 421 var decode = config.raw ? raw : decoded; 422 var cookies = document.cookie.split('; '); 423 var result = key ? undefined : {}; 424 for (var i = 0, l = cookies.length; i < l; i++) { 425 var parts = cookies[i].split('='); 426 var name = decode(parts.shift()); 427 var cookie = decode(parts.join('=')); 428 if (key && key === name) { 429 result = converted(cookie); 430 break; 431 } 432 if (!key) { 433 result[name] = converted(cookie); 434 } 435 } 436 return result; 437 }; 438 config.defaults = {}; 439 $.removeCookie = function (key, options) { 440 if ($.cookie(key) !== undefined) { 441 $.cookie(key, '', $.extend(options, { expires: -1 })); 442 return true; 443 } 444 return false; 445 }; 446})); 447/*! 448 * FitVids 1.0 449 */ 450(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]; 451e.className="fit-vids-style";e.innerHTML="­<style> .fluid-width-video-wrapper { width: 100%; position: relative; padding: 0; } .fluid-width-video-wrapper iframe, .fluid-width-video-wrapper object, .fluid-width-video-wrapper embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } </style>"; 452d.parentNode.insertBefore(e,d);if(b){a.extend(c,b)}return this.each(function(){var f=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com']","object","embed"];if(c.customSelector){f.push(c.customSelector)}var g=a(this).find(f.join(","));g.each(function(){var l=a(this);if(this.tagName.toLowerCase()==="embed"&&l.parent("object").length||l.parent(".fluid-width-video-wrapper").length){return}var h=(this.tagName.toLowerCase()==="object"||(l.attr("height")&&!isNaN(parseInt(l.attr("height"),10))))?parseInt(l.attr("height"),10):l.height(),i=!isNaN(parseInt(l.attr("width"),10))?parseInt(l.attr("width"),10):l.width(),j=h/i; 453if(!l.attr("id")){var k="fitvid"+Math.floor(Math.random()*999999);l.attr("id",k)}l.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",(j*100)+"%");l.removeAttr("height").removeAttr("width")})})}})(jQuery); 454/*
455 * jQuery Superfish Menu Plugin - v1.7.4 456 * Copyright (c) 2013 Joel Birch 457 * 458 * Dual licensed under the MIT and GPL licenses: 459 * http://www.opensource.org/licenses/mit-license.php 460 * http://www.gnu.org/licenses/gpl.html 461 */ 462;(function(e){"use strict";var s=function(){var s={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},o=function(){var s=/iPhone|iPad|iPod/i.test(navigator.userAgent);return s&&e(window).load(function(){e("body").children().on("click",e.noop)}),s}(),n=function(){var e=document.documentElement.style;return"behavior"in e&&"fill"in e&&/iemobile/i.test(navigator.userAgent)}(),t=function(e,o){var n=s.menuClass;o.cssArrows&&(n+=" "+s.menuArrowClass),e.toggleClass(n)},i=function(o,n){return o.find("li."+n.pathClass).slice(0,n.pathLevels).addClass(n.hoverClass+" "+s.bcClass).filter(function(){return e(this).children(n.popUpSelector).hide().show().length}).removeClass(n.pathClass)},r=function(e){e.children("a").toggleClass(s.anchorClass)},a=function(e){var s=e.css("ms-touch-action");s="pan-y"===s?"auto":"pan-y",e.css("ms-touch-action",s)},l=function(s,t){var i="li:has("+t.popUpSelector+")";e.fn.hoverIntent&&!t.disableHI?s.hoverIntent(u,p,i):s.on("mouseenter.superfish",i,u).on("mouseleave.superfish",i,p);var r="MSPointerDown.superfish";o||(r+=" touchend.superfish"),n&&(r+=" mousedown.superfish"),s.on("focusin.superfish","li",u).on("focusout.superfish","li",p).on(r,"a",t,h)},h=function(s){var o=e(this),n=o.siblings(s.data.popUpSelector);n.length>0&&n.is(":hidden")&&(o.one("click.superfish",!1),"MSPointerDown"===s.type?o.trigger("focus"):e.proxy(u,o.parent("li"))())},u=function(){var s=e(this),o=d(s);clearTimeout(o.sfTimer),s.siblings().superfish("hide").end().superfish("show")},p=function(){var s=e(this),n=d(s);o?e.proxy(f,s,n)():(clearTimeout(n.sfTimer),n.sfTimer=setTimeout(e.proxy(f,s,n),n.delay))},f=function(s){s.retainPath=e.inArray(this[0],s.$path)>-1,this.superfish("hide"),this.parents("."+s.hoverClass).length||(s.onIdle.call(c(this)),s.$path.length&&e.proxy(u,s.$path)())},c=function(e){return e.closest("."+s.menuClass)},d=function(e){return c(e).data("sf-options")};return{hide:function(s){if(this.length){var o=this,n=d(o);if(!n)return this;var t=n.retainPath===!0?n.$path:"",i=o.find("li."+n.hoverClass).add(this).not(t).removeClass(n.hoverClass).children(n.popUpSelector),r=n.speedOut;s&&(i.show(),r=0),n.retainPath=!1,n.onBeforeHide.call(i),i.stop(!0,!0).animate(n.animationOut,r,function(){var s=e(this);n.onHide.call(s)})}return this},show:function(){var e=d(this);if(!e)return this;var s=this.addClass(e.hoverClass),o=s.children(e.popUpSelector);return e.onBeforeShow.call(o),o.stop(!0,!0).animate(e.animation,e.speed,function(){e.onShow.call(o)}),this},destroy:function(){return this.each(function(){var o,n=e(this),i=n.data("sf-options");return i?(o=n.find(i.popUpSelector).parent("li"),clearTimeout(i.sfTimer),t(n,i),r(o),a(n),n.off(".superfish").off(".hoverIntent"),o.children(i.popUpSelector).attr("style",function(e,s){return s.replace(/display[^;]+;?/g,"")}),i.$path.removeClass(i.hoverClass+" "+s.bcClass).addClass(i.pathClass),n.find("."+i.hoverClass).removeClass(i.hoverClass),i.onDestroy.call(n),n.removeData("sf-options"),void 0):!1})},init:function(o){return this.each(function(){var n=e(this);if(n.data("sf-options"))return!1;var h=e.extend({},e.fn.superfish.defaults,o),u=n.find(h.popUpSelector).parent("li");h.$path=i(n,h),n.data("sf-options",h),t(n,h),r(u),a(n),l(n,h),u.not("."+s.bcClass).superfish("hide",!0),h.onInit.call(this)})}}}();e.fn.superfish=function(o){return s[o]?s[o].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof o&&o?e.error("Method "+o+" does not exist on jQuery.fn.superfish"):s.init.apply(this,arguments)},e.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:!0,disableHI:!1,onInit:e.noop,onBeforeShow:e.noop,onShow:e.noop,onBeforeHide:e.noop,onHide:e.noop,onIdle:e.noop,onDestroy:e.noop}
462,e.fn.extend({hideSuperfishUl:s.hide,showSuperfishUl:s.show})})(jQuery); 463/** 464 * jQuery ScrollTo 465 * Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com 466 * Dual licensed under MIT and GPL. 467 * @author Ariel Flesler 468 * @version 1.4.3 469 */ 470;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(!e)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); 471 472/* 473 * jQuery.appear 474 * https://github.com/bas2k/jquery.appear/ 475 * http://code.google.com/p/jquery-appear/ 476 * 477 * Copyright (c) 2009 Michael Hixson 478 * Copyright (c) 2012 Alexander Brovikov 479 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) 480 */ 481(function($) { 482 $.fn.appear = function(fn, options) { 483 var settings = $.extend({ 484 //arbitrary data to pass to fn 485 data: undefined, 486 //call fn only on the first appear? 487 one: true, 488 // X & Y accuracy 489 accX: 0, 490 accY: 0 491 }, options); 492 return this.each(function() { 493 var t = $(this); 494 //whether the element is currently visible 495 t.appeared = false; 496 if (!fn) { 497 //trigger the custom event 498 t.trigger('appear', settings.data); 499 return; 500 } 501 var w = $(window); 502 //fires the appear event when appropriate 503 var check = function() { 504 //is the element hidden? 505 if (!t.is(':visible')) { 506 //it became hidden 507 t.appeared = false; 508 return; 509 } 510 //is the element inside the visible window? 511 var a = w.scrollLeft(); 512 var b = w.scrollTop(); 513 var o = t.offset(); 514 var x = o.left; 515 var y = o.top; 516 var ax = settings.accX; 517 var ay = settings.accY; 518 var th = t.height(); 519 var wh = w.height(); 520 var tw = t.width(); 521 var ww = w.width(); 522 if (y + th + ay >= b && 523 y <= b + wh + ay && 524 x + tw + ax >= a && 525 x <= a + ww + ax) { 526 //trigger the custom event 527 if (!t.appeared) t.trigger('appear', settings.data); 528 } else { 529 //it scrolled out of view 530 t.appeared = false; 531 } 532 }; 533 //create a modified fn with some additional logic 534 var modifiedFn = function() { 535 //mark the element as visible 536 t.appeared = true; 537 //is this supposed to happen only once? 538 if (settings.one) { 539 //remove the check 540 w.unbind('scroll', check); 541 var i = $.inArray(check, $.fn.appear.checks); 542 if (i >= 0) $.fn.appear.checks.splice(i, 1); 543 } 544 //trigger the original fn 545 fn.apply(this, arguments); 546 }; 547 //bind the modified fn to the element 548 if (settings.one) t.one('appear', settings.data, modifiedFn); 549 else t.bind('appear', settings.data, modifiedFn); 550 //check whenever the window scrolls 551 w.scroll(check); 552 //check whenever the dom changes 553 $.fn.appear.checks.push(check); 554 //check now 555 (check)(); 556 }); 557 }; 558 //keep a queue of appearance checks 559 $.extend($.fn.appear, { 560 checks: [], 561 timeout: null, 562 //process the queue 563 checkAll: function() { 564 var length = $.fn.appear.checks.length; 565 if (length >
565 0) while (length--) ($.fn.appear.checks[length])(); 566 }, 567 //check the queue asynchronously 568 run: function() { 569 if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); 570 $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20); 571 } 572 }); 573 //run checks when these methods are called 574 $.each(['append', 'prepend', 'after', 'before', 'attr', 575 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 576 'remove', 'css', 'show', 'hide'], function(i, n) { 577 var old = $.fn[n]; 578 if (old) { 579 $.fn[n] = function() { 580 var r = old.apply(this, arguments); 581 $.fn.appear.run(); 582 return r; 583 } 584 } 585 }); 586})(jQuery); 587/* 588Plugin: jQuery Parallax 589Version 1.1.3 590Author: Ian Lunn 591Twitter: @IanLunn 592Author URL: http://www.ianlunn.co.uk/ 593Plugin URL: http://www.ianlunn.co.uk/plugins/jquery-parallax/ 594Dual licensed under the MIT and GPL licenses: 595http://www.opensource.org/licenses/mit-license.php 596http://www.gnu.org/licenses/gpl.html 597*/ 598(function( $ ){ 599 var $window = $(window); 600 var windowHeight = $window.height(); 601 $window.resize(function () { 602 windowHeight = $window.height(); 603 }); 604 $.fn.parallax = function(xpos, speedFactor, outerHeight) { 605 var $this = $(this); 606 var getHeight; 607 var firstTop; 608 var paddingTop = 0; 609 610 //get the starting position of each element to have parallax applied to it 611 function update (){ 612 613 $this.each(function(){ 614 615 firstTop = $this.offset().top; 616 }); 617 618 if (outerHeight) { 619 getHeight = function(jqo) { 620 return jqo.outerHeight(true); 621 }; 622 } else { 623 getHeight = function(jqo) { 624 return jqo.height(); 625 }; 626 } 627 628 // setup defaults if arguments aren't specified 629 if (arguments.length < 1 || xpos === null) xpos = "50%"; 630 if (arguments.length < 2 || speedFactor === null) speedFactor = 0.5; 631 if (arguments.length < 3 || outerHeight === null) outerHeight = true; 632 633 // function to be called whenever the window is scrolled or resized 634 635 var pos = $window.scrollTop(); 636 637 $this.each(function(){ 638 var $element = $(this); 639 var top = $element.offset().top; 640 var height = getHeight($element); 641 642 // Check if totally above or totally below viewport 643 if (top + height < pos || top > pos + windowHeight) { 644 return; 645 } 646 647 $this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px"); 648 649 }); 650 } 651 $window.bind('scroll', update).resize(update); 652 update(); 653 }; 654})(jQuery); 655/* 656Plugin Name: Count To 657Written by: Matt Huggins - https://github.com/mhuggins/jquery-countTo 658*/ 659(function ($) { 660 $.fn.countTo = function (options) { 661 options = options || {}; 662 return $(this).each(function () { 663 // set options for current element 664 var settings = $.extend({}, $.fn.countTo.defaults, { 665 from: $(this).data('from'), 666 to: $(this).data('to'), 667 speed: $(this).data('speed'), 668 refreshInterval: $(this).data('refresh-interval'), 669 decimals: $(this).data('decimals') 670 }, options); 671 // how many times to update the value, and how much to increment the value on each update 672 var loops = Math.ceil(settings.speed / settings.refreshInterval), 673 increment = (settings.to - settings.from) / loops; 674 // references & variables that will change with each update 675 var self = this, 676 $self = $(this), 677 loopCount = 0, 678 value = settings.from, 679 data = $self.data('countTo') || {}; 680 $self.data('countTo', data); 681 // if an existing interval can be found, clear it first 682 if (data.interval) { 683 clearInterval(data.interval); 684 } 685 data.interval = setInterval(updateTimer, settings.refreshInterval); 686 // initialize the element with the starting value 687 render(value); 688 function updateTimer() { 689 value += increment; 690 loopCount++; 691 render(value);
692 if (typeof(settings.onUpdate) == 'function') { 693 settings.onUpdate.call(self, value); 694 } 695 if (loopCount >= loops) { 696 // remove the interval 697 $self.removeData('countTo'); 698 clearInterval(data.interval); 699 value = settings.to; 700 if (typeof(settings.onComplete) == 'function') { 701 settings.onComplete.call(self, value); 702 } 703 } 704 } 705 function render(value) { 706 var formattedValue = settings.formatter.call(self, value, settings); 707 $self.html(formattedValue); 708 } 709 }); 710 }; 711 $.fn.countTo.defaults = { 712 from: 0, // the number the element should start at 713 to: 0, // the number the element should end at 714 speed: 1000, // how long it should take to count between the target numbers 715 refreshInterval: 100, // how often the element should be updated 716 decimals: 0, // the number of decimal places to show 717 formatter: formatter, // handler for formatting the value before rendering 718 onUpdate: null, // callback method for every time the element is updated 719 onComplete: null // callback method for when the element finishes updating 720 }; 721 function formatter(value, settings) { 722 return value.toFixed(settings.decimals); 723 } 724}(jQuery)); 725// Jquery Equal height (http://brm.io/jquery-match-height-demo/) 726(function(e){var t=-1,n=-1;var r=function(t){var n=1,r=e(t),s=null,o=[];r.each(function(){var t=e(this),r=t.offset().top-i(t.css("margin-top")),u=o.length>0?o[o.length-1]:null;if(u===null){o.push(t)}else{if(Math.floor(Math.abs(s-r))<=n){o[o.length-1]=u.add(t)}else{o.push(t)}}s=r});return o};var i=function(e){return parseFloat(e)||0};var s=function(t){var n={byRow:true,remove:false,property:"height"};if(typeof t==="object"){return e.extend(n,t)}if(typeof t==="boolean"){n.byRow=t}else if(t==="remove"){n.remove=true}return n};var o=e.fn.matchHeight=function(t){var n=s(t);if(n.remove){var r=this;this.css(n.property,"");e.each(o._groups,function(e,t){t.elements=t.elements.not(r)});return this}if(this.length<=1)return this;o._groups.push({elements:this,options:n});o._apply(this,n);return this};o._groups=[];o._throttle=80;o._maintainScroll=false;o._beforeUpdate=null;o._afterUpdate=null;o._apply=function(t,n){var u=s(n),a=e(t),f=[a];var l=e(window).scrollTop(),c=e("html").outerHeight(true);var h=a.parents().filter(":hidden");h.each(function(){var t=e(this);t.data("style-cache",t.attr("style"))});h.css("display","block");if(u.byRow){a.each(function(){var t=e(this),n=t.css("display")==="inline-block"?"inline-block":"block";t.data("style-cache",t.attr("style"));t.css({display:n,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})});f=r(a);a.each(function(){var t=e(this);t.attr("style",t.data("style-cache")||"")})}e.each(f,function(t,n){var r=e(n),s=0;if(u.byRow&&r.length<=1){r.css(u.property,"");return}r.each(function(){var t=e(this),n=t.css("display")==="inline-block"?"inline-block":"block";var r={display:n};r[u.property]="";t.css(r);if(t.outerHeight(false)>s)s=t.outerHeight(false);t.css("display","")});r.each(function(){var t=e(this),n=0;if(t.css("box-sizing")!=="border-box"){n+=i(t.css("border-top-width"))+i(t.css("border-bottom-width"));n+=i(t.css("padding-top"))+i(t.css("padding-bottom"))}t.css(u.property,s-n)})});h.each(function(){var t=e(this);t.attr("style",t.data("style-cache")||null)});if(o._maintainScroll)e(window).scrollTop(l/c*e("html").outerHeight(true));return this};o._applyDataApi=function(){var t={};e("[data-match-height], [data-mh]").each(function(){var n=e(this),r=n.attr("data-match-height")||n.attr("data-mh");if(r in t){t[r]=t[r].add(n)}else{t[r]=n}});e.each(t,function(){this.matchHeight(true)})};var u=function(t){if(o._beforeUpdate)o._beforeUpdate(t,o._groups);e.each(o._groups,function(){o._apply(this.elements,this.options)});if(o._afterUpdate)o._afterUpdate(t,o._groups)};o._update=function(r,i){if(i&&i.type==="resize"){var s=e(window).width();if(s===t)return;t=s}if(!r){u(i)}else if(n===-1){n=setTimeout(function(){u(i);n=-1},o._throttle)}};e(o._applyDataApi);e(window).bind("load",function(e){o._update(false,e)});e(window).bind("resize orientationchange",function(e){o._update(true,e)})})(jQuery); 727 728/*! http://tinynav.viljamis.com v1.2 by @viljamis */ 729(function(a,k,g){a.fn.tinyNav=function(l){var c=a.extend({active:"selected",header:"",indent:"- ",label:""},l);return this.each(function(){g++;var h=a(this),b="tinynav"+g,f=".l_"+b,e=a("<select/>").attr("id",b).addClass("tinynav "+b);if(h.is("ul,ol")){""!==c.header&&e.append(a("<option/>").text(c.header));var d="";h.addClass("l_"+b).find("a").each(function(){d+='<option value="'+a(this).attr("href")+'">';var b;for(b=0;b<a(this).parents("ul, ol").length-1;b++)d+=c.indent;d+=a(this).text()+"</option>"}); 730e.append(d);c.header||e.find(":eq("+a(f+" li").index(a(f+" li."+c.active))+")").attr("selected",!0);e.change(function(){k.location.href=a(this).val()});a(f).after(e);c.label&&e.before(a("<label/>").attr("for",b).addClass("tinynav_label "+b+"_label").append(c.label))}})}})(jQuery,this,0);
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.