(function(g){"use strict";function d(d){return"object"==typeof d?d:{top:d,left:d}}var r=g.scrollTo=function(d,h,e){g(window).scrollTo(d,h,e)};r.defaults={axis:"xy",duration:1.3<=parseFloat(g.fn.jquery)?0:1};r.window=function(d){return g(window)._scrollable()};g.fn._scrollable=function(){return this.map(function(){if(this.nodeName&&-1==g.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"]))return this;var d=(this.contentWindow||this).document||this.ownerDocument||this;return g.browser.safari||
"BackCompat"==d.compatMode?d.body:d.documentElement})};g.fn.scrollTo=function(k,h,e){"object"==typeof h&&(e=h,h=0);"function"==typeof e&&(e={onAfter:e});"max"==k&&(k=9E9);e=g.extend({},r.defaults,e);h=h||e.speed||e.duration;e.queue=e.queue&&1<e.axis.length;e.queue&&(h/=2);e.offset=d(e.offset);e.over=d(e.over);return this._scrollable().each(function(){function m(d){t.animate(n,h,e.easing,d&&function(){d.call(this,k,e)})}var v=this,t=g(v),q=k,u,n={},x=t.is("html,body");switch(typeof q){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(q)){q=
d(q);break}q=g(q,this);case "object":if(q.is||q.style)u=(q=g(q)).offset()}g.each(e.axis.split(""),function(d,g){var h="x"==g?"Left":"Top",k=h.toLowerCase(),l="scroll"+h,y=v[l],w=r.max(v,g);u?(n[l]=u[k]+(x?0:y-t.offset()[k]),e.margin&&(n[l]-=parseInt(q.css("margin"+h))||0,n[l]-=parseInt(q.css("border"+h+"Width"))||0),n[l]+=e.offset[k]||0,e.over[k]&&(n[l]+=q["x"==g?"width":"height"]()*e.over[k])):(h=q[k],n[l]=h.slice&&"%"==h.slice(-1)?parseFloat(h)/100*w:h);/^\d+$/.test(n[l])&&(n[l]=0>=n[l]?0:Math.min(n[l],
w));!d&&e.queue&&(y!=n[l]&&m(e.onAfterFirst),delete n[l])});m(e.onAfter)}).end()};r.max=function(d,h){var e="x"==h?"Width":"Height",m="scroll"+e;if(!g(d).is("html,body"))return d[m]-g(d)[e.toLowerCase()]();var e="client"+e,r=d.ownerDocument.documentElement,t=d.ownerDocument.body;return Math.max(r[m],t[m])-Math.min(r[e],t[e])}})(jQuery);
(function(g){var d=null,r=g.fn.css;g.fn.css=function(k,h){null===d&&(d="undefined"!=typeof g.cssProps?g.cssProps:"undefined"!=typeof g.props?g.props:{});if("undefined"==typeof d.transform&&("transform"==k||"object"==typeof k&&"undefined"!=typeof k.transform)){var e=d,m;a:{m=this.get(0);for(var v=["transform","WebkitTransform","msTransform","MozTransform","OTransform"],t;t=v.shift();)if("undefined"!=typeof m.style[t]){m=t;break a}m="transform"}e.transform=m}if("transform"!=d.transform)if("transform"==
k){if(k=d.transform,"undefined"==typeof h&&jQuery.style)return jQuery.style(this.get(0),k)}else"object"==typeof k&&"undefined"!=typeof k.transform&&(k[d.transform]=k.transform,delete k.transform);return r.apply(this,arguments)}})(jQuery);
(function(g,d,r){var k=g.document,h=g.Modernizr,e=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},m=["Moz","Webkit","O","Ms"],v=function(a){var b=k.documentElement.style,c;if("string"==typeof b[a])return a;a=e(a);for(var f=0,d=m.length;f<d;f++)if(c=m[f]+a,"string"==typeof b[c])return c},t=v("transform"),q=v("transitionProperty");r={csstransforms:function(){return!!t},csstransforms3d:function(){var a=!!v("perspective");if(a){var a="@media ("+" -o- -moz- -ms- -webkit- -khtml- ".split(" ").join("transform-3d),(")+
"modernizr)",b=d("<style>"+a+"{#modernizr{height:3px}}</style>").appendTo("head"),c=d('<div id="modernizr" />').appendTo("html"),a=3===c.height();c.remove();b.remove()}return a},csstransitions:function(){return!!q}};var u;if(h)for(u in r)h.hasOwnProperty(u)||h.addTest(u,r[u]);else{var h=g.Modernizr={_version:"1.6ish: miniModernizr for Isotope"},n=" ",x;for(u in r)x=r[u](),h[u]=x,n+=" "+(x?"":"no-")+u;d("html").addClass(n)}if(h.csstransforms){var D=h.csstransforms3d?{translate:function(a){yit.isRtl&&
(a[0]*=-1);return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){yit.isRtl&&(a[0]*=-1);return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},z=function(a,b,c){var f=d.data(a,"isoTransform")||{},s={},p,e={};s[b]=c;d.extend(f,s);for(p in f)b=f[p],e[p]=D[p](b);p=(e.translate||"")+(e.scale||"");d.data(a,"isoTransform",f);a.style[t]=p};d.cssNumber.scale=!0;d.cssHooks.scale={set:function(a,b){z(a,"scale",
b)},get:function(a,b){var c=d.data(a,"isoTransform");return c&&c.scale?c.scale:1}};d.fx.step.scale=function(a){d.cssHooks.scale.set(a.elem,a.now+a.unit)};d.cssNumber.translate=!0;d.cssHooks.translate={set:function(a,b){z(a,"translate",b)},get:function(a,b){var c=d.data(a,"isoTransform");return c&&c.translate?c.translate:[0,0]}}}var A,B;h.csstransitions&&(A={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[q],
B=v("transitionDuration"));var l=d.event,y=d.event.handle?"handle":"dispatch",w;l.special.smartresize={setup:function(){d(this).bind("resize",l.special.smartresize.handler)},teardown:function(){d(this).unbind("resize",l.special.smartresize.handler)},handler:function(a,b){var c=this,f=arguments;a.type="smartresize";w&&clearTimeout(w);w=setTimeout(function(){l[y].apply(c,f)},"execAsap"===b?0:100)}};d.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])};
d.Isotope=function(a,b,c){this.element=d(b);this._create(a);this._init(c)};var E=["width","height"],C=d(g);d.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,
itemPositionDataEnabled:!1};d.Isotope.prototype={_create:function(a){this.options=d.extend({},d.Isotope.settings,a);this.styleQueue=[];this.elemCount=0;a=this.element[0].style;this.originalStyle={};var b=E.slice(0),c;for(c in this.options.containerStyle)b.push(c);for(var f=0,s=b.length;f<s;f++)c=b[f],this.originalStyle[c]=a[c]||"";this.element.css(this.options.containerStyle);this._updateAnimationEngine();this._updateUsingTransforms();this.options.getSortData=d.extend(this.options.getSortData,{"original-order":function(a,
c){return c.elemCount++,c.elemCount},random:function(){return Math.random()}});this.reloadItems();this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var p=this;setTimeout(function(){p.element.addClass(p.options.containerClass)},0);this.options.resizable&&C.bind("smartresize.isotope",function(){p.resize()});this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector;
a=b?a.filter(b).add(a.find(b)):a;b={position:"absolute"};return a=a.filter(function(a,b){return 1===b.nodeType}),this.usingTransforms&&(yit.isRtl?b.right=0:b.left=0,b.top=0),a.css(b).addClass(this.options.itemClass),this.updateSortData(a,!0),a},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms);this._sort();this.reLayout(a)},option:function(a){if(d.isPlainObject(a)){this.options=d.extend(!0,this.options,a);for(var b in a)a="_update"+e(b),this[a]&&this[a]()}},_updateAnimationEngine:function(){var a;
switch(this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,"")){case "css":case "none":a=!1;break;case "jquery":a=!0;break;default:a=!h.csstransitions}this.isUsingJQueryAnimation=a;this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&h.csstransforms&&h.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,f="."+c,d=a.filter(f),p=d;"*"!==b&&(p=d.filter(b),f=a.not(f).not(b).addClass(c),this.styleQueue.push({$el:f,style:this.options.hiddenStyle}));return this.styleQueue.push({$el:p,style:this.options.visibleStyle}),p.removeClass(c),a.filter(b)},updateSortData:function(a,b){var c=this,f=this.options.getSortData,s,p;a.each(function(){s=
d(this);p={};for(var a in f)b||"original-order"!==a?p[a]=f[a](s,c):p[a]=d.data(this,"isotope-sort-data")[a];d.data(this,"isotope-sort-data",p)})},_sort:function(){var a=this.options.sortBy,b=this._getSorter,c=this.options.sortAscending?1:-1;this.$filteredAtoms.sort(function(f,d){var p=b(f,a),e=b(d,a);return p===e&&"original-order"!==a&&(p=b(f,"original-order"),e=b(d,"original-order")),(p>e?1:p<e?-1:0)*c})},_getSorter:function(a,b){return d.data(a,"isotope-sort-data")[b]},_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 f=this.getPositionStyles(b,c);this.styleQueue.push({$el:a,style:f});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);this.options.resizesContainer&&(c=this["_"+c+"GetContainerSize"](),this.styleQueue.push({$el:this.element,style:c}));this._processStyleQueue(a,
b);this.isLaidOut=!0},_processStyleQueue:function(a,b){var c=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",f=this.options.animationOptions,s=this.options.onLayout,e,g,k,l;g=function(a,b){b.$el[c](b.style,f)};if(this._isInserting&&this.isUsingJQueryAnimation)g=function(a,b){e=b.$el.hasClass("no-transition")?"css":c;b.$el[e](b.style,f)};else if(b||s||f.complete){var n=!1,q=[b,s,f.complete],r=this;k=!0;l=function(){if(!n){for(var c,b=0,f=q.length;b<f;b++)c=q[b],"function"==typeof c&&
c.call(r.element,a,r);n=!0}};if(this.isUsingJQueryAnimation&&"animate"===c)f.complete=l,k=!1;else if(h.csstransitions){for(var s=0,m=this.styleQueue[0],m=m&&m.$el;!m||!m.length;){m=this.styleQueue[s++];if(!m)return;m=m.$el}0<parseFloat(getComputedStyle(m[0])[B])&&(g=function(a,b){b.$el[c](b.style,f).one(A,l)},k=!1)}}d.each(this.styleQueue,g);k&&l();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){a=c._filter(a);c._addHideAppended(a);c._sort();c.reLayout();c._revealAppended(a,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,f=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(f)):f()},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[t]="")});var c=this.element[0].style,f;for(f in this.originalStyle)c[f]=this.originalStyle[f];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope");C.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",f=a?"height":"width";a=a?"rows":"cols";var d=this.element[f](),f=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+e(f)](!0)||d,d=Math.floor(d/
f),d=Math.max(d,1);this[b][a]=d;this[b][c]=f},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",f=this[b][c];return this._getSegments(a),this[b][c]!==f},_masonryReset:function(){this.masonry={};this._getSegments();var a=this.masonry.cols;for(this.masonry.colYs=[];a--;)this.masonry.colYs.push(0)},_masonryLayout:function(a){var b=this,c=b.masonry;a.each(function(){var a=d(this),s=Math.ceil(a.outerWidth(!0)/c.columnWidth),s=Math.min(s,c.cols);if(1===s)b._masonryPlaceBrick(a,
c.colYs);else{var e=c.cols+1-s,g=[],h,k;for(k=0;k<e;k++)h=c.colYs.slice(k,k+s),g[k]=Math.max.apply(Math,h);b._masonryPlaceBrick(a,g)}})},_masonryPlaceBrick:function(a,b){for(var c=Math.min.apply(Math,b),f=0,d=0,e=b.length;d<e;d++)if(b[d]===c){f=d;break}this._pushPosition(a,this.masonry.columnWidth*f,c);c+=a.outerHeight(!0);e=this.masonry.cols+1-e;for(d=0;d<e;d++)this.masonry.colYs[f+d]=c},_masonryGetContainerSize:function(){return{height:Math.max.apply(Math,this.masonry.colYs)}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},
_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(a){var b=this,c=this.element.width(),f=this.fitRows;a.each(function(){var a=d(this),e=a.outerWidth(!0),g=a.outerHeight(!0);0!==f.x&&e+f.x>c&&(f.x=0,f.y=f.height);b._pushPosition(a,f.x,f.y);f.height=Math.max(f.y+g,f.height);f.x+=e})},_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 b=this,c=this.cellsByRow;a.each(function(){var a=d(this),e=Math.floor(c.index/c.cols),g=(c.index%c.cols+.5)*c.columnWidth-a.outerWidth(!0)/2,e=(e+.5)*c.rowHeight-a.outerHeight(!0)/2;b._pushPosition(a,g,e);c.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 b=this;a.each(function(a){a=d(this);b._pushPosition(a,0,b.straightDown.y);b.straightDown.y+=a.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;for(this.masonryHorizontal.rowXs=[];a--;)this.masonryHorizontal.rowXs.push(0)},
_masonryHorizontalLayout:function(a){var b=this,c=b.masonryHorizontal;a.each(function(){var a=d(this),e=Math.ceil(a.outerHeight(!0)/c.rowHeight),e=Math.min(e,c.rows);if(1===e)b._masonryHorizontalPlaceBrick(a,c.rowXs);else{var g=c.rows+1-e,h=[],k,l;for(l=0;l<g;l++)k=c.rowXs.slice(l,l+e),h[l]=Math.max.apply(Math,k);b._masonryHorizontalPlaceBrick(a,h)}})},_masonryHorizontalPlaceBrick:function(a,b){for(var c=Math.min.apply(Math,b),d=0,e=0,g=b.length;e<g;e++)if(b[e]===c){d=e;break}this._pushPosition(a,
c,this.masonryHorizontal.rowHeight*d);c+=a.outerWidth(!0);g=this.masonryHorizontal.rows+1-g;for(e=0;e<g;e++)this.masonryHorizontal.rowXs[d+e]=c},_masonryHorizontalGetContainerSize:function(){return{width:Math.max.apply(Math,this.masonryHorizontal.rowXs)}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var b=this,c=this.element.height(),f=this.fitColumns;a.each(function(){var a=
d(this),e=a.outerWidth(!0),g=a.outerHeight(!0);0!==f.y&&g+f.y>c&&(f.x=f.width,f.y=0);b._pushPosition(a,f.x,f.y);f.width=Math.max(f.x+e,f.width);f.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 b=this,c=this.cellsByColumn;a.each(function(){var a=d(this),e=c.index%c.rows,g=(Math.floor(c.index/
c.rows)+.5)*c.columnWidth-a.outerWidth(!0)/2,e=(e+.5)*c.rowHeight-a.outerHeight(!0)/2;b._pushPosition(a,g,e);c.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 b=this;a.each(function(a){a=d(this);b._pushPosition(a,
b.straightAcross.x,0);b.straightAcross.x+=a.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}};d.fn.isotope=function(a,b){if("string"==typeof a){var c=Array.prototype.slice.call(arguments,1);this.each(function(){var b=d.data(this,"isotope");b?d.isFunction(b[a])&&"_"!==a.charAt(0)?b[a].apply(b,c):g.console&&g.console.error("no such method '"+a+"' for isotope instance"):g.console&&g.console.error("cannot call methods on isotope prior to initialization; attempted to call method '"+
a+"'")})}else this.each(function(){var c=d.data(this,"isotope");c?(c.option(a),c._init(b)):d.data(this,"isotope",new d.Isotope(a,this,b))});return this}})(window,jQuery);