(function(){"use strict";function t(){}function r(n,t){for(var i=n.length;i--;)if(n[i].listener===t)return i;return-1}function i(n){return function(){return this[n].apply(this,arguments)}}var n=t.prototype,u=this,f=u.EventEmitter;n.getListeners=function(n){var i=this._getEvents(),r,t;if(typeof n=="object"){r={};for(t in i)i.hasOwnProperty(t)&&n.test(t)&&(r[t]=i[t])}else r=i[n]||(i[n]=[]);return r},n.flattenListeners=function(n){for(var i=[],t=0;t<n.length;t+=1)i.push(n[t].listener);return i},n.getListenersAsObject=function(n){var i=this.getListeners(n),t;return i instanceof Array&&(t={},t[n]=i),t||i},n.addListener=function(n,t){var u=this.getListenersAsObject(n),f=typeof t=="object",i;for(i in u)u.hasOwnProperty(i)&&r(u[i],t)===-1&&u[i].push(f?t:{listener:t,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(n,t){return this.addListener(n,{listener:t,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(n){return this.getListeners(n),this},n.defineEvents=function(n){for(var t=0;t<n.length;t+=1)this.defineEvent(n[t]);return this},n.removeListener=function(n,t){var u=this.getListenersAsObject(n),f,i;for(i in u)u.hasOwnProperty(i)&&(f=r(u[i],t),f!==-1&&u[i].splice(f,1));return this},n.off=i("removeListener"),n.addListeners=function(n,t){return this.manipulateListeners(!1,n,t)},n.removeListeners=function(n,t){return this.manipulateListeners(!0,n,t)},n.manipulateListeners=function(n,t,i){var r,u,f=n?this.removeListener:this.addListener,e=n?this.removeListeners:this.addListeners;if(typeof t!="object"||t instanceof RegExp)for(r=i.length;r--;)f.call(this,t,i[r]);else for(r in t)t.hasOwnProperty(r)&&(u=t[r])&&(typeof u=="function"?f.call(this,r,u):e.call(this,r,u));return this},n.removeEvent=function(n){var r=typeof n,t=this._getEvents(),i;if(r==="string")delete t[n];else if(r==="object")for(i in t)t.hasOwnProperty(i)&&n.test(i)&&delete t[i];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(n,t){var u=this.getListenersAsObject(n),i,f,r,e;for(r in u)if(u.hasOwnProperty(r))for(f=u[r].length;f--;)i=u[r][f],i.once===!0&&this.removeListener(n,i.listener),e=i.listener.apply(this,t||[]),e===this._getOnceReturnValue()&&this.removeListener(n,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(n){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(n,t)},n.setOnceReturnValue=function(n){return this._onceReturnValue=n,this},n._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return u.EventEmitter=f,t},typeof define=="function"&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):typeof module=="object"&&module.exports?module.exports=t:this.EventEmitter=t}).call(this),function(n){function f(t){var i=n.event;return i.target=i.target||i.srcElement||t,i}var i=document.documentElement,u=function(){},t,r;i.addEventListener?u=function(n,t,i){n.addEventListener(t,i,!1)}:i.attachEvent&&(u=function(n,t,i){n[t+i]=i.handleEvent?function(){var t=f(n);i.handleEvent.call(i,t)}:function(){var t=f(n);i.call(n,t)},n.attachEvent("on"+t,n[t+i])}),t=function(){},i.removeEventListener?t=function(n,t,i){n.removeEventListener(t,i,!1)}:i.detachEvent&&(t=function(n,t,i){n.detachEvent("on"+t,n[t+i]);try{delete n[t+i]}catch(r){n[t+i]=undefined}}),r={bind:u,unbind:t},typeof define=="function"&&define.amd?define("eventie/eventie",r):n.eventie=r}(this),function(n,t){"use strict";typeof define=="function"&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(i,r){return t(n,i,r)}):typeof module=="object"&&module.exports?module.exports=t(n,require("wolfy87-eventemitter"),require("eventie")):n.imagesLoaded=t(n,n.EventEmitter,n.eventie)}(window,function(n,t,i){function c(n,t){for(var i in t)n[i]=t[i];return n}function v(n){return l.call(n)=="[object Array]"}function a(n){var i=[],t;if(v(n))i=n;else if(typeof n.length=="number")for(t=0;t<n.length;t++)i.push(n[t]);else i.push(n);return i}function r(n,t,i){if(!(this instanceof r))return new r(n,t,i);if(typeof n=="string"&&(n=document.querySelectorAll(n)),this.elements=a(n),this.options=c({},this.options),typeof t=="function"?i=t:c(this.options,t),i)this.on("always",i);this.getImages(),e&&(this.jqDeferred=new e.Deferred);var u=this;setTimeout(function(){u.check()})}function u(n){this.img=n}function f(n,t){this.url=n,this.element=t,this.img=new Image}var e=n.jQuery,h=n.console,l=Object.prototype.toString,o,s;return r.prototype=new t,r.prototype.options={},r.prototype.getImages=function(){var n,t;for(this.images=[],n=0;n<this.elements.length;n++)t=this.elements[n],this.addElementImages(t)},r.prototype.addElementImages=function(n){var r,u,t,e,i,f;if(n.nodeName=="IMG"&&this.addImage(n),this.options.background===!0&&this.addElementBackgroundImages(n),r=n.nodeType,r&&o[r]){for(u=n.querySelectorAll("img"),t=0;t<u.length;t++)e=u[t],this.addImage(e);if(typeof this.options.background=="string")for(i=n.querySelectorAll(this.options.background),t=0;t<i.length;t++)f=i[t],this.addElementBackgroundImages(f)}},o={1:!0,9:!0,11:!0},r.prototype.addElementBackgroundImages=function(n){for(var u=s(n),r=/url\(['"]*([^'"\)]+)['"]*\)/gi,t=r.exec(u.backgroundImage),i;t!==null;)i=t&&t[1],i&&this.addBackground(i,n),t=r.exec(u.backgroundImage)},s=n.getComputedStyle||function(n){return n.currentStyle},r.prototype.addImage=function(n){var t=new u(n);this.images.push(t)},r.prototype.addBackground=function(n,t){var i=new f(n,t);this.images.push(i)},r.prototype.check=function(){function r(n,t,r){setTimeout(function(){i.progress(n,t,r)})}var i=this,n,t;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}for(n=0;n<this.images.length;n++){t=this.images[n];t.once("progress",r);t.check()}},r.prototype.progress=function(n,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!n.isLoaded,this.emit("progress",this,n,t),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,n),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&h&&h.log("progress: "+i,n,t)},r.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done",n;this.isComplete=!0,this.emit(t,this),this.emit("always",this),this.jqDeferred&&(n=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[n](this))},u.prototype=new t,u.prototype.check=function(){var n=this.getIsImageComplete();if(n){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image,i.bind(this.proxyImage,"load",this),i.bind(this.proxyImage,"error",this),i.bind(this.img,"load",this),i.bind(this.img,"error",this),this.proxyImage.src=this.img.src},u.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth!==undefined},u.prototype.confirm=function(n,t){this.isLoaded=n,this.emit("progress",this,this.img,t)},u.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},u.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},u.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},u.prototype.unbindEvents=function(){i.unbind(this.proxyImage,"load",this),i.unbind(this.proxyImage,"error",this),i.unbind(this.img,"load",this),i.unbind(this.img,"error",this)},f.prototype=new u,f.prototype.check=function(){i.bind(this.img,"load",this),i.bind(this.img,"error",this),this.img.src=this.url;var n=this.getIsImageComplete();n&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},f.prototype.unbindEvents=function(){i.unbind(this.img,"load",this),i.unbind(this.img,"error",this)},f.prototype.confirm=function(n,t){this.isLoaded=n,this.emit("progress",this,this.element,t)},r.makeJQueryPlugin=function(t){(t=t||n.jQuery,t)&&(e=t,e.fn.imagesLoaded=function(n,t){var i=new r(this,n,t);return i.jqDeferred.promise(e(this))})},r.makeJQueryPlugin(),r});var cbpBGSlideshow=function(){function a(){t.imagesLoaded(function(){Modernizr.backgroundsize?i.each(function(){var n=$(this);n.css("background-image","url("+n.find("img").attr("src")+")")}):t.find("img").show(),i.eq(n).css({opacity:1}),v(),r(),t.css({visibility:"visible"}),setTimeout(function(){$(".cbp-bislideshow-preload-image").hide()},animationSpeed)})}function v(){s.$navPlayPause.on("click",function(){var n=$(this);n.hasClass("cbp-biplay")?(n.removeClass("cbp-biplay").addClass("cbp-bipause"),r()):(n.removeClass("cbp-bipause").addClass("cbp-biplay"),l())});s.$navPrev.on("click",function(){e("prev"),f&&r()});s.$navNext.on("click",function(){e("next"),f&&r()})}function e(t){var u=i.eq(n),r;t==="next"?n=n<c-1?++n:0:t==="prev"&&(n=n>0?--n:c-1),r=i.eq(n),u.animate({opacity:0},animationSpeed),r.animate({opacity:1},animationSpeed)}function r(){f=!0,clearTimeout(h),h=setTimeout(function(){e("next"),r()},u)}function l(){f=!1,clearTimeout(h)}var t=$("#cbp-bislideshow"),i=t.children("li"),c=i.length,o=$("#cbp-bicontrols"),s={$navPrev:o.find("span.cbp-biprev"),$navNext:o.find("span.cbp-binext"),$navPlayPause:o.find("span.cbp-bipause")},n=0,h,f=!0,u=1e4;return animationSpeed=1e3,typeof t.attr("data-interval")!="undefined"&&(u=parseInt(t.attr("data-interval"))),typeof t.attr("data-speed")!="undefined"&&(animationSpeed=parseInt(t.attr("data-speed"))),animationSpeed>=u&&(u=animationSpeed*2),{init:a}}()