/** * Isotope v1.5.25 * An exquisite jQuery plugin for magical layouts * http://isotope.metafizzy.co * * Commercial use requires one-time license fee * http://metafizzy.co/#licenses * * Copyright 2012 David DeSandro / Metafizzy */ (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"+d+"{#modernizr{height:3px}}"+"").appendTo("head"),f=b('
').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},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;fg?1:f0&&(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;id&&(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;id&&(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)};b.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); /* -------------------------------- Infinite Scroll -------------------------------- + https://github.com/paulirish/infinite-scroll + version 2.0b2.120519 + Copyright 2011/12 Paul Irish & Luke Shumard + Licensed under the MIT license + Documentation: http://infinite-scroll.com/ */ (function(e,t,n){"use strict";t.infinitescroll=function(n,r,i){this.element=t(i);if(!this._create(n,r)){this.failed=true}};t.infinitescroll.defaults={loading:{finished:n,finishedMsg:"Congratulations, you've reached the end of the internet.",img:"data:image/gif;base64,R0lGODlh3AATAPQeAPDy+MnQ6LW/4N3h8MzT6rjC4sTM5r/I5NHX7N7j8c7U6tvg8OLl8uXo9Ojr9b3G5MfP6Ovu9tPZ7PT1+vX2+tbb7vf4+8/W69jd7rC73vn5/O/x+K243ai02////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgD/ACwAAAAA3AATAAAF/6AnjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEj0BAScpHLJbDqf0Kh0Sq1ar9isdioItAKGw+MAKYMFhbF63CW438f0mg1R2O8EuXj/aOPtaHx7fn96goR4hmuId4qDdX95c4+RBIGCB4yAjpmQhZN0YGYGXitdZBIVGAsLoq4BBKQDswm1CQRkcG6ytrYKubq8vbfAcMK9v7q7EMO1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQkCLBwHCgsMDQ4RDAYIqfYSFxDxEfz88/X38Onr16+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdFf9chIeBg7oA7gjaWUWTVQAGE3LqBDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKzggYBBB5y1acFNZmEvXAoN2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCbYMNFCzwLEqLgE4NsDWs/tvqdezZf13Hvk2A9Szdu2X3pg18N+68xXn7rh1c+PLksI/Dhe6cuO3ow3NfV92bdArTqC2Ebd3A8vjf5QWfH6Bg7Nz17c2fj69+fnq+8N2Lty+fuP78/eV2X13neIcCeBRwxorbZrA1ANoCDGrgoG8RTshahQ9iSKEEzUmYIYfNWViUh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NBgSfiMMDQkGCBLCwxIQDhHIyQwQCGMKxsnKVyPCF9DREQ3MxMPX0cu4wt7J2uHWx9jlKd3o39MiuefYEcvNkuLt5O8c1ePI2tyELXGQwoGDAQf+iEC2xByDCRAjTlAgIUWCBRgCPJQ4AQBFXAs0coT40WLIjRxL/47AcHLkxIomRXL0CHPERZkpa4q4iVKiyp0tR/7kwHMkTUBBJR5dOCEBAVcKKtCAyOHpowXCpk7goABqBZdcvWploACpBKkpIJI1q5OD2rIWE0R1uTZu1LFwbWL9OlKuWb4c6+o9i3dEgw0RCGDUG9KlRw56gDY2qmCByZBaASi+TACA0TucAaTteCcy0ZuOK3N2vJlx58+LRQyY3Xm0ZsgjZg+oPQLi7dUcNXi0LOJw1pgNtB7XG6CBy+U75SYfPTSQAgZTNUDnQHt67wnbZyvwLgKiMN3oCZB3C76tdewpLFgIP2C88rbi4Y+QT3+8S5USMICZXWj1pkEDeUU3lOYGB3alSoEiMIjgX4WlgNF2EibIwQIXauWXSRg2SAOHIU5IIIMoZkhhWiJaiFVbKo6AQEgQXrTAazO1JhkBrBG3Y2Y6EsUhaGn95hprSN0oWpFE7rhkeaQBchGOEWnwEmc0uKWZj0LeuNV3W4Y2lZHFlQCSRjTIl8uZ+kG5HU/3sRlnTG2ytyadytnD3HrmuRcSn+0h1dycexIK1KCjYaCnjCCVqOFFJTZ5GkUUjESWaUIKU2lgCmAKKQIUjHapXRKE+t2og1VgankNYnohqKJ2CmKplso6GKz7WYCgqxeuyoF8u9IQAgA7",msg:null,msgText:"Loading the next set of posts...",selector:null,speed:"fast",start:n},state:{isDuringAjax:false,isInvalidPage:false,isDestroyed:false,isDone:false,isPaused:false,isBeyondMaxPage:false,currPage:1},debug:false,behavior:n,binder:t(e),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:false,pathParse:n,dataType:"html",appendCallback:true,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:n,path:n,prefill:false,maxPage:n};t.infinitescroll.prototype={_binding:function(t){var r=this,i=r.options;i.v="2.0b2.120520";if(!!i.behavior&&this["_binding_"+i.behavior]!==n){this["_binding_"+i.behavior].call(this);return}if(t!=="bind"&&t!=="unbind"){this._debug("Binding value "+t+" not valid");return false}if(t==="unbind"){this.options.binder.unbind("smartscroll.infscr."+r.options.infid)}else{this.options.binder[t]("smartscroll.infscr."+r.options.infid,function(){r.scroll()})}this._debug("Binding",t)},_create:function(i,s){var o=t.extend(true,{},t.infinitescroll.defaults,i);this.options=o;var u=t(e);var a=this;if(!a._validate(i)){return false}var f=t(o.nextSelector).attr("href");if(!f){this._debug("Navigation selector not found");return false}o.path=o.path||this._determinepath(f);o.contentSelector=o.contentSelector||this.element;o.loading.selector=o.loading.selector||o.contentSelector;o.loading.msg=o.loading.msg||t('
Loading...
'+o.loading.msgText+"
");(new Image).src=o.loading.img;if(o.pixelsFromNavToBottom===n){o.pixelsFromNavToBottom=t(document).height()-t(o.navSelector).offset().top;this._debug("pixelsFromNavToBottom: "+o.pixelsFromNavToBottom)}var l=this;o.loading.start=o.loading.start||function(){t(o.navSelector).hide();o.loading.msg.appendTo(o.loading.selector).show(o.loading.speed,t.proxy(function(){this.beginAjax(o)},l))};o.loading.finished=o.loading.finished||function(){if(!o.state.isBeyondMaxPage)o.loading.msg.fadeOut(o.loading.speed)};o.callback=function(e,r,i){if(!!o.behavior&&e["_callback_"+o.behavior]!==n){e["_callback_"+o.behavior].call(t(o.contentSelector)[0],r,i)}if(s){s.call(t(o.contentSelector)[0],r,o,i)}if(o.prefill){u.bind("resize.infinite-scroll",e._prefill)}};if(i.debug){if(Function.prototype.bind&&(typeof console==="object"||typeof console==="function")&&typeof console.log==="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.call(console[e],console)},Function.prototype.bind)}}this._setup();if(o.prefill){this._prefill()}return true},_prefill:function(){function s(){return r.options.contentSelector.height()<=i.height()}var r=this;var i=t(e);this._prefill=function(){if(s()){r.scroll()}i.bind("resize.infinite-scroll",function(){if(s()){i.unbind("resize.infinite-scroll");r.scroll()}})};this._prefill()},_debug:function(){if(true!==this.options.debug){return}if(typeof console!=="undefined"&&typeof console.log==="function"){if(Array.prototype.slice.call(arguments).length===1&&typeof Array.prototype.slice.call(arguments)[0]==="string"){console.log(Array.prototype.slice.call(arguments).toString())}else{console.log(Array.prototype.slice.call(arguments))}}else if(!Function.prototype.bind&&typeof console!=="undefined"&&typeof console.log==="object"){Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments))}},_determinepath:function(t){var r=this.options;if(!!r.behavior&&this["_determinepath_"+r.behavior]!==n){return this["_determinepath_"+r.behavior].call(this,t)}if(!!r.pathParse){this._debug("pathParse manual");return r.pathParse(t,this.options.state.currPage+1)}else if(t.match(/^(.*?)\b2\b(.*?$)/)){t=t.match(/^(.*?)\b2\b(.*?$)/).slice(1)}else if(t.match(/^(.*?)2(.*?$)/)){if(t.match(/^(.*?page=)2(\/.*|$)/)){t=t.match(/^(.*?page=)2(\/.*|$)/).slice(1);return t}t=t.match(/^(.*?)2(.*?$)/).slice(1)}else{if(t.match(/^(.*?page=)1(\/.*|$)/)){t=t.match(/^(.*?page=)1(\/.*|$)/).slice(1);return t}else{this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.");r.state.isInvalidPage=true}}this._debug("determinePath",t);return t},_error:function(t){var r=this.options;if(!!r.behavior&&this["_error_"+r.behavior]!==n){this["_error_"+r.behavior].call(this,t);return}if(t!=="destroy"&&t!=="end"){t="unknown"}this._debug("Error",t);if(t==="end"||r.state.isBeyondMaxPage){this._showdonemsg()}r.state.isDone=true;r.state.currPage=1;r.state.isPaused=false;r.state.isBeyondMaxPage=false;this._binding("unbind")},_loadcallback:function(i,s,o){var u=this.options,a=this.options.callback,f=u.state.isDone?"done":!u.appendCallback?"no-append":"append",l;if(!!u.behavior&&this["_loadcallback_"+u.behavior]!==n){this["_loadcallback_"+u.behavior].call(this,i,s);return}switch(f){case"done":this._showdonemsg();return false;case"no-append":if(u.dataType==="html"){s="
"+s+"
";s=t(s).find(u.itemSelector)}break;case"append":var c=i.children();if(c.length===0){return this._error("end")}l=document.createDocumentFragment();while(i[0].firstChild){l.appendChild(i[0].firstChild)}this._debug("contentSelector",t(u.contentSelector)[0]);t(u.contentSelector)[0].appendChild(l);s=c.get();break}u.loading.finished.call(t(u.contentSelector)[0],u);if(u.animate){var h=t(e).scrollTop()+t(u.loading.msg).height()+u.extraScrollPx+"px";t("html,body").animate({scrollTop:h},800,function(){u.state.isDuringAjax=false})}if(!u.animate){u.state.isDuringAjax=false}a(this,s,o);if(u.prefill){this._prefill()}},_nearbottom:function(){var i=this.options,s=0+t(document).height()-i.binder.scrollTop()-t(e).height();if(!!i.behavior&&this["_nearbottom_"+i.behavior]!==n){return this["_nearbottom_"+i.behavior].call(this)}this._debug("math:",s,i.pixelsFromNavToBottom);return s-i.bufferPx-1&&t(n[r]).length===0){this._debug("Your "+r+" found no elements.");return false}}return true},bind:function(){this._binding("bind")},destroy:function(){this.options.state.isDestroyed=true;this.options.loading.finished();return this._error("destroy")},pause:function(){this._pausing("pause")},resume:function(){this._pausing("resume")},beginAjax:function(r){var i=this,s=r.path,o,u,a,f;r.state.currPage++;if(r.maxPage!=n&&r.state.currPage>r.maxPage){r.state.isBeyondMaxPage=true;this.destroy();return}o=t(r.contentSelector).is("table, tbody")?t(""):t("
");u=typeof s==="function"?s(r.state.currPage):s.join(r.state.currPage);i._debug("heading into ajax",u);a=r.dataType==="html"||r.dataType==="json"?r.dataType:"html+callback";if(r.appendCallback&&r.dataType==="html"){a+="+callback"}switch(a){case"html+callback":i._debug("Using HTML via .load() method");o.load(u+" "+r.itemSelector,n,function(t){i._loadcallback(o,t,u)});break;case"html":i._debug("Using "+a.toUpperCase()+" via $.ajax() method");t.ajax({url:u,dataType:r.dataType,complete:function(t,n){f=typeof t.isResolved!=="undefined"?t.isResolved():n==="success"||n==="notmodified";if(f){i._loadcallback(o,t.responseText,u)}else{i._error("end")}}});break;case"json":i._debug("Using "+a.toUpperCase()+" via $.ajax() method");t.ajax({dataType:"json",type:"GET",url:u,success:function(e,t,s){f=typeof s.isResolved!=="undefined"?s.isResolved():t==="success"||t==="notmodified";if(r.appendCallback){if(r.template!==n){var a=r.template(e);o.append(a);if(f){i._loadcallback(o,a)}else{i._error("end")}}else{i._debug("template must be defined.");i._error("end")}}else{if(f){i._loadcallback(o,e,u)}else{i._error("end")}}},error:function(){i._debug("JSON ajax request failed.");i._error("end")}});break}},retrieve:function(r){r=r||null;var i=this,s=i.options;if(!!s.behavior&&this["retrieve_"+s.behavior]!==n){this["retrieve_"+s.behavior].call(this,r);return}if(s.state.isDestroyed){this._debug("Instance is destroyed");return false}s.state.isDuringAjax=true;s.loading.start.call(t(s.contentSelector)[0],s)},scroll:function(){var t=this.options,r=t.state;if(!!t.behavior&&this["scroll_"+t.behavior]!==n){this["scroll_"+t.behavior].call(this);return}if(r.isDuringAjax||r.isInvalidPage||r.isDone||r.isDestroyed||r.isPaused){return}if(!this._nearbottom()){return}this.retrieve()},toggle:function(){this._pausing()},unbind:function(){this._binding("unbind")},update:function(n){if(t.isPlainObject(n)){this.options=t.extend(true,this.options,n)}}};t.fn.infinitescroll=function(n,r){var i=typeof n;switch(i){case"string":var s=Array.prototype.slice.call(arguments,1);this.each(function(){var e=t.data(this,"infinitescroll");if(!e){return false}if(!t.isFunction(e[n])||n.charAt(0)==="_"){return false}e[n].apply(e,s)});break;case"object":this.each(function(){var e=t.data(this,"infinitescroll");if(e){e.update(n)}else{e=new t.infinitescroll(n,r,this);if(!e.failed){t.data(this,"infinitescroll",e)}}});break}return this};var r=t.event,i;r.special.smartscroll={setup:function(){t(this).bind("scroll",r.special.smartscroll.handler)},teardown:function(){t(this).unbind("scroll",r.special.smartscroll.handler)},handler:function(e,n){var r=this,s=arguments;e.type="smartscroll";if(i){clearTimeout(i)}i=setTimeout(function(){t(r).trigger("smartscroll",s)},n==="execAsap"?0:100)}};t.fn.smartscroll=function(e){return e?this.bind("smartscroll",e):this.trigger("smartscroll",["execAsap"])}})(window,jQuery) /*-----------------------------------------------------------------------------------*/ /* Preloader & Initialize Masonry Script /*-----------------------------------------------------------------------------------*/ jQuery.noConflict(); jQuery('.ajaxloading').fadeIn(500); jQuery(window).load(function(){ jQuery('.ajaxloading').fadeOut(500); }); jQuery(window).load(function(){ jQuery(".slideshowpreload").fadeOut('slow'); }); /*-----------------------------------------------------------------------------------*/ /* Sticky Footer /*-----------------------------------------------------------------------------------*/ (function($){ var footer; $.fn.extend({ stickyFooter: function(options) { footer = this; positionFooter(); $(window) .scroll(positionFooter) .resize(positionFooter); function positionFooter() { var docHeight = $(document.body).height() - $("#sticky-footer-push").height(); if(docHeight < $(window).height()){ var diff = $(window).height() - docHeight; if (!$("#sticky-footer-push").length > 0) { $(footer).before(''); } $("#sticky-footer-push").height(diff); } } } }); })(jQuery); /*jQuery("#footer").stickyFooter();*/ /*-----------------------------------------------------------------------------------*/ /* jQuery Isotope /*-----------------------------------------------------------------------------------*/ if(jQuery().isotope) { var $selectedthing, $nextitem, $previtem, $nextId, $prevId, $filterstyle = 'Fade'; // Find Next Portfolio Posts Function function findnext($this, $fade) { if($this) { if ($fade !== 'Fade') { // Check for filter style $nextitem = $this.closest('.portfolioitem').next('.portfolioitem').find('a.homeportlink'); while ($nextitem.closest('.portfolioitem').hasClass('isotope-hidden') && $nextitem.length) { $nextitem = $nextitem.closest('.portfolioitem').next('.portfolioitem').find('a.homeportlink'); } } else { $nextitem = $this.closest('.portfolioitem').next('.portfolioitem').find('a.homeportlink'); while ($nextitem.closest('.portfolioitem').find('.disable').css('display') === 'block' && $nextitem.length) { $nextitem = $nextitem.closest('.portfolioitem').next('.portfolioitem').find('a.homeportlink'); } } } return $nextitem; } // Find Previous Portfolio Posts Function function findprev($this, $fade) { if($this){ if ($fade !== 'Fade') { // Check for filter style $previtem = $this.closest('.portfolioitem').prev('.portfolioitem').find('a.homeportlink'); while ($previtem.closest('.portfolioitem').hasClass('isotope-hidden') && $previtem.length) { $previtem = $previtem.closest('.portfolioitem').prev('.portfolioitem').find('a.homeportlink'); } } else { $previtem = $this.closest('.portfolioitem').prev('.portfolioitem').find('a.homeportlink'); while ($previtem.closest('.portfolioitem').find('.disable').css('display') === 'block' && $previtem.length) { $previtem = $previtem.closest('.portfolioitem').prev('.portfolioitem').find('a.homeportlink'); } } } return $previtem; } function findprevnext($this, $filter, $fade) { /* $nextitem = findnext($this, $filter); $previtem = findprev($this, $filter); if ($previtem) { $prevId = $previtem.attr('data-url'); } if ($nextitem) { $nextId = $nextitem.attr('data-url'); } if ($fade != 'none'){ if(typeof $prevId == 'string') { jQuery('a#prev-port').stop().fadeIn(500); } else { jQuery('a#prev-port').stop().fadeOut(500); } if(typeof $nextId == 'string') { jQuery('a#next-port').stop().fadeIn(500); } else { jQuery('a#next-port').stop().fadeOut(500); } } else { if(typeof $prevId == 'string') { jQuery('a#prev-port').stop().css('display', 'block'); } else { jQuery('a#prev-port').stop().css('display', 'none'); } if(typeof $nextId == 'string') { jQuery('a#next-port').stop().css('display', 'block'); } else { jQuery('a#next-port').stop().css('display', 'none'); } }*/ } var $selector = '*'; jQuery(window).load(function($){ var $container = jQuery('div.isotopecontainer'); $container.each(function($) { var $this = jQuery(this), columnNumber = $this.attr('data-value'), isoBrick = jQuery('.isobrick'), $colnum2; isoBrick.css({ 'margin-left': 0, 'margin-right': 0 }); /* Calculate column number */ /*====================================*/ if ($this.width() < 500 ) { $colnum2 = 2; } else { $colnum2 = columnNumber; } /* Call Isotope with selected Columns */ /*====================================*/ if (columnNumber != '1') { $this.isotope({ masonry: { columnWidth: $this.width() / $colnum2 }, itemSelector : '.isobrick', layoutMode : 'masonry' }); } /* Run Isotope on Resize Event */ /*=============================*/ jQuery(window).resize(function () { if ($this.width() < 500 ) { $colnum2 = 2; } else { $colnum2 = columnNumber; } if (columnNumber != '1') { /* Resize Isotope Container */ $this.isotope({ // update columnWidth to a percentage of container width masonry: { columnWidth: $this.width() / $colnum2 }, itemSelector : '.isobrick', layoutMode : 'masonry' }); } }); /* Filter when link is clicked */ /*=============================*/ jQuery('.filtershuffle a').click(function(){ jQuery('.filtershuffle li').removeClass("active"); jQuery(this).closest('li').addClass('active'); $selector = jQuery(this).attr('data-value'); jQuery('.filtershuffle a').each(function() { $filterselect = jQuery(this).attr('data-value'); $filterselect = '.'+$filterselect; if ($filterselect == '.'+$selector){ jQuery(this).addClass("active"); } }); if ($selector != '*') { $selector = '.'+$selector; } $this.isotope({ filter: $selector }, function() { findprevnext($selectedthing, $filterstyle); }); return false; }); /* Run Infinite Scroll */ /*=============================*/ $this.infinitescroll({ navSelector : '.more-posts', // selector for the paged navigation nextSelector : '.more-posts a', // selector for the NEXT link (to page 2) itemSelector : '.isobrick', // selector for all items you'll retrieve animate: true, extraScrollPx: 1, dataType: 'html', appendCallback: true, bufferPx: 1, loading: { finishedMsg: 'No more pages to load.', img: 'http://i.imgur.com/qkKy8.gif' } }, // call Isotope as a callback function( newElements ) { jQuery('.more-posts').fadeIn('slow'); $this.isotope( 'insert', jQuery( newElements ), function(){ $this.isotope('reLayout'); hover_overlay(); selectedPortitem(thisP_id); }); } ); // kill scroll binding for manual clicking of button /* jQuery(window).unbind('.infscr'); */ jQuery('.more-posts a').click(function(){ jQuery(document).trigger('retrieve.infscr'); $this.infinitescroll('retrieve'); return false; }); }); // End Each }); // End Window Load } // if isotope /*-----------------------------------------------------------------------------------*/ /* Superfish Initialization /*-----------------------------------------------------------------------------------*/ jQuery(function() { jQuery('ul.sf-menu').superfish({ autoArrows: true }); }); /*-----------------------------------------------------------------------------------*/ /* Tabs /*-----------------------------------------------------------------------------------*/ if(jQuery() .tabs) { jQuery( "#tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" ); jQuery( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" ); jQuery( "#tabs" ).tabs({ fx: { opacity: 'toggle' } }); }; /*-----------------------------------------------------------------------------------*/ /* Pretty Photo /*-----------------------------------------------------------------------------------*/ jQuery(function(){ jQuery("a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'fast', /* fast/slow/normal */ slideshow: 5000, /* false OR interval time in ms */ autoplay_slideshow: false, /* true/false */ opacity: 0.80, /* Value between 0 and 1 */ show_title: false, /* true/false */ allow_resize: true, /* Resize the photos bigger than viewport. true/false */ default_width: 500, default_height: 344, counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ horizontal_padding: 20, /* The padding on each side of the picture */ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ wmode: 'opaque', /* Set the flash wmode attribute */ autoplay: true, /* Automatically start videos: True/False */ modal: false, /* If set to true, only the close button will close the window */ deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */ overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */ keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */ changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ callback: function(){}, /* Called when prettyPhoto is closed */ ie6_fallback: true }); }); /*-----------------------------------------------------------------------------------*/ /* Hover Effects /*-----------------------------------------------------------------------------------*/ function hover_overlay() { jQuery('.flexslider:not(".else")').each(function() { var $this = jQuery(this), $background = $this.closest('.portfolioitem'); $this.hover( function() { $background.addClass('darkbg'); jQuery(this).find('img').stop().animate({opacity : 0.3}, 500); jQuery($this).find('.thumbnailtitle').addClass('wh'); jQuery($this).find('.slides').stop().animate({opacity : 0.2}, 500); }, function() { // jQuery(this).find('img').stop().animate({opacity : 0.05}, 500); jQuery($this).find('.thumbnailtitle').removeClass('wh'); jQuery($this).find('.slides').stop().animate({opacity : 1}, 500, function(){ $background.removeClass('darkbg'); }); }); }); chgThumbTitle(); } function deselectPortitem() { jQuery('.flexslider:not(".else")').each(function() { var $this = jQuery(this), $background = $this.closest('.portfolioitem'); // jQuery(this).find('img').stop().animate({opacity : 0.05}, 500); jQuery($this).find('.thumbnailtitle').removeClass('wh'); jQuery($this).find('.slides').stop().animate({opacity : 1}, 500, function(){ $background.removeClass('darkbg'); }); }); } function selectedPortitem(obj) { //alert(obj); deselectPortitem(); hover_overlay() var $this = jQuery('#project-'+obj).find('.flexslider'), $background = jQuery('#project-'+obj); jQuery($this).unbind('hover'); $background.addClass('darkbg'); jQuery($this).find('img').stop().animate({opacity : 0.3}, 500); jQuery($this).find('.thumbnailtitle').addClass('wh'); jQuery($this).find('.slides').stop().animate({opacity : 0.2}, 500); } hover_overlay(); function hover_overlay_slide() { jQuery('.video').hover( function() { jQuery(this).stop().animate({opacity : 1}, 100); }, function() { jQuery(this).stop().animate({opacity : .9}, 100); }); } hover_overlay_slide(); function hover_overlay_images() { jQuery('.flexslider').hover( function() { jQuery(this).find('img').stop().animate({opacity : 0.3}, 500); }, function() { //jQuery(this).find('img').stop().animate({opacity : 0.05}, 500); }); } /*hover_overlay_images();*/ //여기 function chgThumbTitle(){ jQuery('.thumbnailtitle').each(function(){ //var tt = jQuery(this).text(); var tt = jQuery(this).parent().parent().find("input.temp").val(); console.log(tt) //console.log("chgThumbTitle test : "+tt); if(!tt.match(//)) { var tt_first = tt.split(/\b/)[0]; var tt_first2 = tt.split(/\b/)[2]; //console.log("tt_first1 : "+tt_first); //console.log("tt_first2 : "+tt_first2); if(tt_first=="A" || tt_first=="The" || tt_first=="An"){ tt_first = tt_first+" "+tt_first2; //console.log("tt_first3 : "+tt_first); } var tt_else = tt.split(tt_first)[1]; jQuery(this).html(""+tt_first + ""+tt_else); } }); } /*-----------------------------------------------------------------------------------*/ /* Portfolio Mini Flexible Slideshow /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function() { jQuery('.flexslider').each(function() { var $this = jQuery(this); $this.flexslider({ animation: "fade", //String: Select your animation type, "fade" or "slide" slideDirection: "vertical", //String: Select the sliding direction, "horizontal" or "vertical" slideshow: true, //Boolean: Animate slider automatically slideshowSpeed: Math.floor(Math.random()*10001) + 3000, //Integer: Set the speed of the slideshow cycling, in milliseconds animationDuration: 2000, //Integer: Set the speed of animations, in milliseconds directionNav: false, //Boolean: Create navigation for previous/next navigation? (true/false) controlNav: false, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage keyboardNav: false, //Boolean: Allow slider navigating via keyboard left/right keys mousewheel: false, //Boolean: Allow slider navigating via mousewheel prevText: "Previous", //String: Set the text for the "previous" directionNav item nextText: "Next", //String: Set the text for the "next" directionNav item pausePlay: false, //Boolean: Create pause/play dynamic element pauseText: 'Pause', //String: Set the text for the "pause" pausePlay item playText: 'Play', //String: Set the text for the "play" pausePlay item randomize: false, //Boolean: Randomize slide order slideToStart: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide) animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended. pauseOnHover: true, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering controlsContainer: "", //Selector: Declare which container the navigation elements should be appended too. Default container is the flexSlider element. Example use would be ".flexslider-container", "#container", etc. If the given element is not found, the default action will be taken. manualControls: "", //Selector: Declare custom control navigation. Example would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs. start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation after: function(){}, //Callback: function(slider) - Fires after each slider animation completes end: function(){} //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) }); }); }); /*-----------------------------------------------------------------------------------*/ /* Scroll to Top by Andre Gagnon /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function() { jQuery(window).scroll(function () { var y_scroll_pos = window.pageYOffset; var scroll_pos_test = 50; // set to whatever you want it to be if(y_scroll_pos > scroll_pos_test) { jQuery('.top').fadeIn(1000); jQuery('.iphone').children('.top').css('display', 'none !important'); } else { jQuery('.top').fadeOut(500); } }); jQuery('.top').click(function(){ jQuery('html, body').animate({scrollTop:0}, 500, 'easeOutCubic'); return false; }); }); /*-----------------------------------------------------------------------------------*/ /* Top Widgets Drawer by Andre Gagnon /*-----------------------------------------------------------------------------------*/ jQuery(function($) { var height = $('#top_panel_content').height(); $('#top_panel_button').click(function() { var docHeight = $(document).height(); var windowHeight = $(window).height(); var scrollPos = docHeight - windowHeight + height; $('#top_panel_content').animate({ height: "toggle"}, 500, 'easeOutCubic'); $('#toggle_button').toggleClass("downarrow"); jQuery('#top_panel').removeClass('active'); jQuery(this).addClass('active'); }); }); /*-----------------------------------------------------------------------------------*/ /* Ajax Load Post /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function($){ $.ajaxSetup({cache:false}); /* Declare Variables */ var ajaxouter = jQuery('#ajaxouter'), /* Outer Container (with data id = post id) */ url = jQuery('#ajaxinner').attr('data-url'), /* Set the post ID from the outer container */ $this = null, $state = 'closed'; // Function to scroll the viewport function scrollwindow($here) { if ( $.browser.msie && $.browser.version == '7.0') { $('html,body').parent().animate({scrollTop: $($here).offset().top}, 500, 'easeOutCubic'); } else { $('html,body').animate({scrollTop: $($here).offset().top}, 500, 'easeOutCubic'); } } $(".flexslider").live('click', function(e){ e.preventDefault(); var getUrl = $.getUrlVars(); $search_text = getUrl.s; if($search_text) { $('a#prev-port').css('display', 'none'); $('a#next-port').css('display', 'none'); } /*Set Function Variables */ $this = $(this).find('ul.slides li a'); $selectedthing = $this; $postId = $($this).attr('data-url'); if(!$postId) { $postId = $(this).find('h3').attr('data-url'); } if(!$postId) { document.location.href = $this.attr("href"); } else { // Find Previous and Next Portfolio Items findprevnext($selectedthing, $filterstyle); $('.ajaxloading').fadeIn(500); selectedPortitem($postId); // Scroll to the Loading Container // scrollwindow('#loadingcontainer'); scrollwindow('.topContainer'); if ($state !== 'closed'){ //$('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic'); } ajaxouter.load(url, { id: $postId }, function() { if($search_text) { $('a#prev-port').css('display', 'none'); $('a#next-port').css('display', 'none'); } if ($state == 'closed'){ // $('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic'); /* If there's a previous if(typeof $prevId == 'string') { $('a#prev-port').css('display', 'block'); } else { $('a#prev-port').css('display', 'none'); } */ /* If there's a Next if(typeof $nextId == 'string') { $('a#next-port').css('display', 'block'); } else { $('a#next-port').css('display', 'none'); } */ $state = 'open'; } else { //$('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic'); /* If there's a previous if(typeof $prevId == 'string') { $('a#prev-port').css('display', 'block'); } else { $('a#prev-port').css('display', 'none'); } */ /* If there's a Next if(typeof $nextId == 'string') { $('a#next-port').css('display', 'block'); } else { $('a#next-port').css('display', 'none'); } */ } $('.ajaxloading').fadeOut(500); //jQuery(".ajaxcontent").mCustomScrollbar(); } ); return false; } }); /* jQuery('a#next-port').live('click', function(e){ e.preventDefault(); if(typeof $nextId == 'string') { jQuery('.ajaxloading').fadeIn(500); jQuery('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic'); ajaxouter.load(url, { id: $nextId }, function() { $this = $nextitem; $selectedthing = $this; findprevnext($selectedthing, $filterstyle, 'none'); jQuery('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic'); jQuery('.ajaxloading').fadeOut(500); }); } }); jQuery('a#prev-port').live('click', function(e){ e.preventDefault(); if(typeof $prevId == 'string') { jQuery('.ajaxloading').fadeIn(500); jQuery('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic'); ajaxouter.load(url, { id: $prevId }, function() { $this = $previtem; $selectedthing = $this; findprevnext($selectedthing, $filterstyle, 'none'); jQuery('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic'); jQuery('.ajaxloading').fadeOut(500); }); } }); */ jQuery('a.portfolio-close').live('click', function(e){ e.preventDefault(); $state = 'closed'; // Scroll to the Loading Container scrollwindow('body'); jQuery('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic', function(){ jQuery('.ajaxslider').remove(); // so videos stop playing }); }); var getUrl = $.getUrlVars(); $search_text = getUrl.s; if($search_text) { $('a#prev-port').css('display', 'none'); $('a#next-port').css('display', 'none'); } $post_no = getUrl.post_no; console.log("$post_no",$post_no); if($post_no) { $initialopen = $post_no; } else { var p_no = jQuery("body").attr("class"); console.log("p_no",p_no); if(p_no.indexOf("postid-") >= 0) { p_no = p_no.split("postid-"); p_no = p_no[1].split(" "); p_no = p_no[0]; console.log("p_no",p_no); $initialopen = p_no; } else { $initialopen = "2352"; if($search_text) { $this = jQuery('.slideshow .portfolioitem:first').find('a.homeportlink'); $initialopen = jQuery('.slideshow .portfolioitem:first').find('a.homeportlink').attr('data-url'); if(!$initialopen) { $initialopen = jQuery('.slideshow .portfolioitem:first').find('h3.thumbnailtitle').attr('data-url'); } //alert("2 : "+$initialopen); } } } console.log("$initialopen 2",$initialopen); findprevnext($this, $filterstyle); jQuery('.ajaxloading').fadeIn(500); selectedPortitem($initialopen); ajaxouter.load(url, { id: $initialopen }, function() { if ($state == 'closed'){ //jQuery('#ajaxcontainer').animate({ height: "toggle"}, 500, 'easeOutCubic'); $state = 'open'; //jQuery('a#prev-port').css('display', 'none'); if($search_text) { $('a#prev-port').css('display', 'none'); $('a#next-port').css('display', 'none'); } jQuery('.ajaxloading').fadeOut(500); //jQuery(".ajaxcontent").mCustomScrollbar(); } // endif } //end function ); //ajaxouter }); jQuery.extend({ getUrlVars: function(){ var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf("?") + 1).split("&"); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; }, getUrlVar: function(name){ return $.getUrlVars()[name]; } }); /*-----------------------------------------------------------------------------------*/ /* Fade Filter Portfolio /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function() { jQuery('ul.filterfade a').click(function() { var HasBeenViewed = false; jQuery(this).css('outline','none'); jQuery('ul.filter .active').removeClass('active'); jQuery(this).parent().addClass('active'); var filterVal = jQuery(this).text().toLowerCase().replace(' ','-').replace(' ','-').replace(' ','-').replace(' ','-').replace(' ','-').replace(' ','-'); if(jQuery(this).hasClass('filterall')) { jQuery('.portfolioitem .disable').stop().animate({opacity: 0}, 500, function(){ jQuery(this).css('display', 'none'); //Check for previous and next arrows window.setTimeout(function() { if(!HasBeenViewed) { findprevnext($selectedthing, $filterstyle); HasBeenViewed = true; } }, 501); }); } else { jQuery('.portfolioitem .disable').each(function() { if(!jQuery(this).hasClass(filterVal)) { jQuery(this).css('display', 'block'); jQuery(this).stop().animate({opacity: .95}, 500, function(){ //Check for previous and next arrows window.setTimeout(function() { if(!HasBeenViewed) { findprevnext($selectedthing, $filterstyle); HasBeenViewed = true; } }, 501); }); } else { jQuery(this).stop().animate({opacity: 0}, 500, function(){ jQuery(this).css('display', 'none'); //Check for previous and next arrows window.setTimeout(function() { if(!HasBeenViewed) { findprevnext($selectedthing, $filterstyle); HasBeenViewed = true; } }, 501); }); } }); } return false; }); }); /*-----------------------------------------------------------------------------------*/ /* Portfolio Flexible Slider /*-----------------------------------------------------------------------------------*/ jQuery('.projectslideshow').wmuSlider({ animation: 'fade', animationDuration: 600, slideshow: false, slideshowSpeed: 7000, slideToStart: 0, navigationControl: true, paginationControl: true, previousText: 'Previous', nextText: 'Next', touch: true, slide: 'span' }); /*-----------------------------------------------------------------------------------*/ /* FitVid Fluid Video /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function(){ jQuery(".videocontainer").fitVids(); }); /*-----------------------------------------------------------------------------------*/ /* Coda Slider /*-----------------------------------------------------------------------------------*/ if(jQuery() .codaSlider){ jQuery('#coda-slider-1').codaSlider({ dynamicArrows: false, dynamicTabs: false }); }; /*-----------------------------------------------------------------------------------*/ /* Form Validation /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function(){ jQuery("#contactform").validate(); jQuery("#quoteform").validate(); jQuery("#quickform").validate(); jQuery("#commentsubmit").validate(); }); jQuery(document).ready(function(){ var getUrl_search = jQuery.getUrlVars(); $search_s = getUrl_search.s; if($search_s) { $searchBt = "Search More..."; } else { $searchBt = "More..."; } jQuery(".more-posts .more-bt").html($searchBt); });