(function($){
$(function(){
if(typeof scrollBackToTop.autoFontSize!=='undefined'&&scrollBackToTop.autoFontSize){
$('.scroll-back-to-top-wrapper').textfill({ maxFontPixels: 36 });
}
$('.scroll-back-to-top-wrapper').on('click', function(){
if(typeof scrollBackToTop.scrollDuration!=='undefined'){
scrollToElement("body", scrollBackToTop.scrollDuration, 0);
}});
$(document).on('scroll', function(){
if($(window).scrollTop() > 100){
$('.scroll-back-to-top-wrapper').addClass('show');
}else{
$('.scroll-back-to-top-wrapper').removeClass('show');
}});
if(typeof scrollBackToTop.visibilityDuration!=='undefined'&&scrollBackToTop.visibilityDuration){
$(window).on('scroll', function(){
clearTimeout($.data(this, 'sbttScrollTimer'));
$.data(this, 'sbttScrollTimer', setTimeout(function(){
$('.scroll-back-to-top-wrapper').removeClass('show');
}, scrollBackToTop.visibilityDuration));
});
}});
function scrollToElement(selector, time, verticalOffset){
time=typeof(time)!='undefined' ? time:1000;
verticalOffset=typeof(verticalOffset)!='undefined' ? verticalOffset:0;
element=$(selector);
offset=element.offset();
offsetTop=offset.top + verticalOffset;
$('html, body').animate({scrollTop: offsetTop}, parseInt(time), 'linear');
}
function isFullyVisible(el){
if(! el.length){
return false;
}
if(el instanceof jQuery){
el=el[0];
}
var top=el.offsetTop;
var left=el.offsetLeft;
var width=el.offsetWidth;
var height=el.offsetHeight;
while(el.offsetParent){
el=el.offsetParent;
top +=el.offsetTop;
left +=el.offsetLeft;
}
return (
top >=window.pageYOffset &&
left >=window.pageXOffset &&
(top + height) <=(window.pageYOffset + window.innerHeight) &&
(left + width) <=(window.pageXOffset + window.innerWidth)
);
}
function isPartiallyVisible(el){
if(! el.length){
return false;
}
if(el instanceof jQuery){
el=el[0];
}
var top=el.offsetTop;
var left=el.offsetLeft;
var width=el.offsetWidth;
var height=el.offsetHeight;
while(el.offsetParent){
el=el.offsetParent;
top +=el.offsetTop;
left +=el.offsetLeft;
}
return (
top < (window.pageYOffset + window.innerHeight) &&
left < (window.pageXOffset + window.innerWidth) &&
(top + height) > window.pageYOffset &&
(left + width) > window.pageXOffset
);
}})(jQuery);
(function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if("object"==typeof a){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if("object"===c)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:this.EventEmitter=a}).call(this),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):a.eventie=f}(this),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(c,d){return b(a,c,d)}):"object"==typeof module&&module.exports?module.exports=b(a,require("wolfy87-eventemitter"),require("eventie")):a.imagesLoaded=b(a,a.EventEmitter,a.eventie)}(window,function(a,b,c){function d(a,b){for(var c in b)a[c]=b[c];return a}function e(a){return"[object Array]"==l.call(a)}function f(a){var b=[];if(e(a))b=a;else if("number"==typeof a.length)for(var c=0;c<a.length;c++)b.push(a[c]);else b.push(a);return b}function g(a,b,c){if(!(this instanceof g))return new g(a,b,c);"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=f(a),this.options=d({},this.options),"function"==typeof b?c=b:d(this.options,b),c&&this.on("always",c),this.getImages(),j&&(this.jqDeferred=new j.Deferred);var e=this;setTimeout(function(){e.check()})}function h(a){this.img=a}function i(a,b){this.url=a,this.element=b,this.img=new Image}var j=a.jQuery,k=a.console,l=Object.prototype.toString;g.prototype=new b,g.prototype.options={},g.prototype.getImages=function(){this.images=[];for(var a=0;a<this.elements.length;a++){var b=this.elements[a];this.addElementImages(b)}},g.prototype.addElementImages=function(a){"IMG"==a.nodeName&&this.addImage(a),this.options.background===!0&&this.addElementBackgroundImages(a);var b=a.nodeType;if(b&&m[b]){for(var c=a.querySelectorAll("img"),d=0;d<c.length;d++){var e=c[d];this.addImage(e)}if("string"==typeof this.options.background){var f=a.querySelectorAll(this.options.background);for(d=0;d<f.length;d++){var g=f[d];this.addElementBackgroundImages(g)}}}};var m={1:!0,9:!0,11:!0};g.prototype.addElementBackgroundImages=function(a){for(var b=n(a),c=/url\(['"]*([^'"\)]+)['"]*\)/gi,d=c.exec(b.backgroundImage);null!==d;){var e=d&&d[1];e&&this.addBackground(e,a),d=c.exec(b.backgroundImage)}};var n=a.getComputedStyle||function(a){return a.currentStyle};return g.prototype.addImage=function(a){var b=new h(a);this.images.push(b)},g.prototype.addBackground=function(a,b){var c=new i(a,b);this.images.push(c)},g.prototype.check=function(){function a(a,c,d){setTimeout(function(){b.progress(a,c,d)})}var b=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();for(var c=0;c<this.images.length;c++){var d=this.images[c];d.once("progress",a),d.check()}},g.prototype.progress=function(a,b,c){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded,this.emit("progress",this,a,b),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,a),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&k&&k.log("progress: "+c,a,b)},g.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(a,this),this.emit("always",this),this.jqDeferred){var b=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[b](this)}},h.prototype=new b,h.prototype.check=function(){var a=this.getIsImageComplete();return a?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,c.bind(this.proxyImage,"load",this),c.bind(this.proxyImage,"error",this),c.bind(this.img,"load",this),c.bind(this.img,"error",this),void(this.proxyImage.src=this.img.src))},h.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},h.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("progress",this,this.img,b)},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){c.unbind(this.proxyImage,"load",this),c.unbind(this.proxyImage,"error",this),c.unbind(this.img,"load",this),c.unbind(this.img,"error",this)},i.prototype=new h,i.prototype.check=function(){c.bind(this.img,"load",this),c.bind(this.img,"error",this),this.img.src=this.url;var a=this.getIsImageComplete();a&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},i.prototype.unbindEvents=function(){c.unbind(this.img,"load",this),c.unbind(this.img,"error",this)},i.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("progress",this,this.element,b)},g.makeJQueryPlugin=function(b){b=b||a.jQuery,b&&(j=b,j.fn.imagesLoaded=function(a,b){var c=new g(this,a,b);return c.jqDeferred.promise(j(this))})},g.makeJQueryPlugin(),g});
!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d});
!function(a){"use strict";var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?this.options.transitionDuration:0),void 0===a||a){var b=this.options.animationOptions,c=b&&b.duration;c&&(this.options.transitionDuration="string"==typeof c?c:c+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){var a=this;this._remapV2Options(),c.apply(this,arguments),setTimeout(function(){jQuery(a.element).addClass("masonry")},0)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype._itemize;b.prototype._itemize=function(a){var b=f.apply(this,arguments);return jQuery(a).addClass("masonry-brick"),b};var g=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),g.apply(this,arguments)},b.prototype.reload=function(){this.reloadItems.apply(this,arguments),this.layout.apply(this)};var h=b.prototype.destroy;b.prototype.destroy=function(){var a=this.getItemElements();jQuery(this.element).removeClass("masonry"),jQuery(a).removeClass("masonry-brick"),h.apply(this,arguments)}}(window);
(function($){
"use strict";
$(document).ready(function(){
$('.wc-shortcodes-rsvp').each(function(){
var $this;
$this=$(this);
$this.find('.rsvp-button').click(function(){
var $button=$(this);
var data=$this.find('.rsvp-data').serialize();
var $message=$this.find('.rsvp-message');
var $messageParent=$message.parent();
$message.text("Sending...");
$messageParent.removeClass('wc-shortcodes-box-warning wc-shortcodes-box-success').addClass('wc-shortcodes-box-info').show();
$.post(WCShortcodes.ajaxurl,
data,
function(response){
if(response.success){
$message.text(response.message);
$messageParent.removeClass('wc-shortcodes-box-warning wc-shortcodes-box-info').addClass('wc-shortcodes-box-success').show();
$button.hide();
}else{
$message.text(response.message);
$messageParent.removeClass('wc-shortcodes-box-success wc-shortcodes-box-info').addClass('wc-shortcodes-box-warning').show();
}}
);
});
});
});
})(jQuery);
(function (){
function EventEmitter(){}
var proto=EventEmitter.prototype;
var exports=this;
var originalGlobalValue=exports.EventEmitter;
function indexOfListener(listeners, listener){
var i=listeners.length;
while (i--){
if(listeners[i].listener===listener){
return i;
}}
return -1;
}
function alias(name){
return function aliasClosure(){
return this[name].apply(this, arguments);
};}
proto.getListeners=function getListeners(evt){
var events=this._getEvents();
var response;
var key;
if(typeof evt==='object'){
response={};
for (key in events){
if(events.hasOwnProperty(key)&&evt.test(key)){
response[key]=events[key];
}}
}else{
response=events[evt]||(events[evt]=[]);
}
return response;
};
proto.flattenListeners=function flattenListeners(listeners){
var flatListeners=[];
var i;
for (i=0; i < listeners.length; i +=1){
flatListeners.push(listeners[i].listener);
}
return flatListeners;
};
proto.getListenersAsObject=function getListenersAsObject(evt){
var listeners=this.getListeners(evt);
var response;
if(listeners instanceof Array){
response={};
response[evt]=listeners;
}
return response||listeners;
};
proto.addListener=function addListener(evt, listener){
var listeners=this.getListenersAsObject(evt);
var listenerIsWrapped=typeof listener==='object';
var key;
for (key in listeners){
if(listeners.hasOwnProperty(key)&&indexOfListener(listeners[key], listener)===-1){
listeners[key].push(listenerIsWrapped ? listener:{
listener: listener,
once: false
});
}}
return this;
};
proto.on=alias('addListener');
proto.addOnceListener=function addOnceListener(evt, listener){
return this.addListener(evt, {
listener: listener,
once: true
});
};
proto.once=alias('addOnceListener');
proto.defineEvent=function defineEvent(evt){
this.getListeners(evt);
return this;
};
proto.defineEvents=function defineEvents(evts){
for (var i=0; i < evts.length; i +=1){
this.defineEvent(evts[i]);
}
return this;
};
proto.removeListener=function removeListener(evt, listener){
var listeners=this.getListenersAsObject(evt);
var index;
var key;
for (key in listeners){
if(listeners.hasOwnProperty(key)){
index=indexOfListener(listeners[key], listener);
if(index!==-1){
listeners[key].splice(index, 1);
}}
}
return this;
};
proto.off=alias('removeListener');
proto.addListeners=function addListeners(evt, listeners){
return this.manipulateListeners(false, evt, listeners);
};
proto.removeListeners=function removeListeners(evt, listeners){
return this.manipulateListeners(true, evt, listeners);
};
proto.manipulateListeners=function manipulateListeners(remove, evt, listeners){
var i;
var value;
var single=remove ? this.removeListener:this.addListener;
var multiple=remove ? this.removeListeners:this.addListeners;
if(typeof evt==='object'&&!(evt instanceof RegExp)){
for (i in evt){
if(evt.hasOwnProperty(i)&&(value=evt[i])){
if(typeof value==='function'){
single.call(this, i, value);
}else{
multiple.call(this, i, value);
}}
}}else{
i=listeners.length;
while (i--){
single.call(this, evt, listeners[i]);
}}
return this;
};
proto.removeEvent=function removeEvent(evt){
var type=typeof evt;
var events=this._getEvents();
var key;
if(type==='string'){
delete events[evt];
}
else if(type==='object'){
for (key in events){
if(events.hasOwnProperty(key)&&evt.test(key)){
delete events[key];
}}
}else{
delete this._events;
}
return this;
};
proto.removeAllListeners=alias('removeEvent');
proto.emitEvent=function emitEvent(evt, args){
var listeners=this.getListenersAsObject(evt);
var listener;
var i;
var key;
var response;
for (key in listeners){
if(listeners.hasOwnProperty(key)){
i=listeners[key].length;
while (i--){
listener=listeners[key][i];
if(listener.once===true){
this.removeListener(evt, listener.listener);
}
response=listener.listener.apply(this, args||[]);
if(response===this._getOnceReturnValue()){
this.removeListener(evt, listener.listener);
}}
}}
return this;
};
proto.trigger=alias('emitEvent');
proto.emit=function emit(evt){
var args=Array.prototype.slice.call(arguments, 1);
return this.emitEvent(evt, args);
};
proto.setOnceReturnValue=function setOnceReturnValue(value){
this._onceReturnValue=value;
return this;
};
proto._getOnceReturnValue=function _getOnceReturnValue(){
if(this.hasOwnProperty('_onceReturnValue')){
return this._onceReturnValue;
}else{
return true;
}};
proto._getEvents=function _getEvents(){
return this._events||(this._events={});
};
EventEmitter.noConflict=function noConflict(){
exports.EventEmitter=originalGlobalValue;
return EventEmitter;
};
if(typeof define==='function'&&define.amd){
define('eventEmitter/EventEmitter',[],function (){
return EventEmitter;
});
}
else if(typeof module==='object'&&module.exports){
module.exports=EventEmitter;
}else{
this.EventEmitter=EventEmitter;
}}.call(this));
(function(window){
var docElem=document.documentElement;
var bind=function(){};
function getIEEvent(obj){
var event=window.event;
event.target=event.target||event.srcElement||obj;
return event;
}
if(docElem.addEventListener){
bind=function(obj, type, fn){
obj.addEventListener(type, fn, false);
};}else if(docElem.attachEvent){
bind=function(obj, type, fn){
obj[ type + fn ]=fn.handleEvent ?
function(){
var event=getIEEvent(obj);
fn.handleEvent.call(fn, event);
} :
function(){
var event=getIEEvent(obj);
fn.call(obj, event);
};
obj.attachEvent("on" + type, obj[ type + fn ]);
};}
var unbind=function(){};
if(docElem.removeEventListener){
unbind=function(obj, type, fn){
obj.removeEventListener(type, fn, false);
};}else if(docElem.detachEvent){
unbind=function(obj, type, fn){
obj.detachEvent("on" + type, obj[ type + fn ]);
try {
delete obj[ type + fn ];
} catch(err){
obj[ type + fn ]=undefined;
}};}
var eventie={
bind: bind,
unbind: unbind
};
if(typeof define==='function'&&define.amd){
define('eventie/eventie',eventie);
}else{
window.eventie=eventie;
}})(this);
(function(window, factory){
if(typeof define==='function'&&define.amd){
define([
'eventEmitter/EventEmitter',
'eventie/eventie'
], function(EventEmitter, eventie){
return factory(window, EventEmitter, eventie);
});
}else if(typeof exports==='object'){
module.exports=factory(
window,
require('eventEmitter'),
require('eventie')
);
}else{
window.imagesLoaded=factory(
window,
window.EventEmitter,
window.eventie
);
}})(this,
function factory(window, EventEmitter, eventie){
var $=window.jQuery;
var console=window.console;
var hasConsole=typeof console!=='undefined';
function extend(a, b){
for(var prop in b){
a[ prop ]=b[ prop ];
}
return a;
}
var objToString=Object.prototype.toString;
function isArray(obj){
return objToString.call(obj)==='[object Array]';
}
function makeArray(obj){
var ary=[];
if(isArray(obj)){
ary=obj;
}else if(typeof obj.length==='number'){
for(var i=0, len=obj.length; i < len; i++){
ary.push(obj[i]);
}}else{
ary.push(obj);
}
return ary;
}
function ImagesLoaded(elem, options, onAlways){
if(!(this instanceof ImagesLoaded)){
return new ImagesLoaded(elem, options);
}
if(typeof elem==='string'){
elem=document.querySelectorAll(elem);
}
this.elements=makeArray(elem);
this.options=extend({}, this.options);
if(typeof options==='function'){
onAlways=options;
}else{
extend(this.options, options);
}
if(onAlways){
this.on('always', onAlways);
}
this.getImages();
if($){
this.jqDeferred=new $.Deferred();
}
var _this=this;
setTimeout(function(){
_this.check();
});
}
ImagesLoaded.prototype=new EventEmitter();
ImagesLoaded.prototype.options={};
ImagesLoaded.prototype.getImages=function(){
this.images=[];
for(var i=0, len=this.elements.length; i < len; i++){
var elem=this.elements[i];
if(elem.nodeName==='IMG'){
this.addImage(elem);
}
var childElems=elem.querySelectorAll('img');
for(var j=0, jLen=childElems.length; j < jLen; j++){
var img=childElems[j];
this.addImage(img);
}}
};
ImagesLoaded.prototype.addImage=function(img){
var loadingImage=new LoadingImage(img);
this.images.push(loadingImage);
};
ImagesLoaded.prototype.check=function(){
var _this=this;
var checkedCount=0;
var length=this.images.length;
this.hasAnyBroken=false;
if(!length){
this.complete();
return;
}
function onConfirm(image, message){
if(_this.options.debug&&hasConsole){
console.log('confirm', image, message);
}
_this.progress(image);
checkedCount++;
if(checkedCount===length){
_this.complete();
}
return true;
}
for(var i=0; i < length; i++){
var loadingImage=this.images[i];
loadingImage.on('confirm', onConfirm);
loadingImage.check();
}};
ImagesLoaded.prototype.progress=function(image){
this.hasAnyBroken=this.hasAnyBroken||!image.isLoaded;
var _this=this;
setTimeout(function(){
_this.emit('progress', _this, image);
if(_this.jqDeferred&&_this.jqDeferred.notify){
_this.jqDeferred.notify(_this, image);
}});
};
ImagesLoaded.prototype.complete=function(){
var eventName=this.hasAnyBroken ? 'fail':'done';
this.isComplete=true;
var _this=this;
setTimeout(function(){
_this.emit(eventName, _this);
_this.emit('always', _this);
if(_this.jqDeferred){
var jqMethod=_this.hasAnyBroken ? 'reject':'resolve';
_this.jqDeferred[ jqMethod ](_this);
}});
};
if($){
$.fn.imagesLoaded=function(options, callback){
var instance=new ImagesLoaded(this, options, callback);
return instance.jqDeferred.promise($(this));
};}
function LoadingImage(img){
this.img=img;
}
LoadingImage.prototype=new EventEmitter();
LoadingImage.prototype.check=function(){
var resource=cache[ this.img.src ]||new Resource(this.img.src);
if(resource.isConfirmed){
this.confirm(resource.isLoaded, 'cached was confirmed');
return;
}
if(this.img.complete&&this.img.naturalWidth!==undefined){
this.confirm(this.img.naturalWidth!==0, 'naturalWidth');
return;
}
var _this=this;
resource.on('confirm', function(resrc, message){
_this.confirm(resrc.isLoaded, message);
return true;
});
resource.check();
};
LoadingImage.prototype.confirm=function(isLoaded, message){
this.isLoaded=isLoaded;
this.emit('confirm', this, message);
};
var cache={};
function Resource(src){
this.src=src;
cache[ src ]=this;
}
Resource.prototype=new EventEmitter();
Resource.prototype.check=function(){
if(this.isChecked){
return;
}
var proxyImage=new Image();
eventie.bind(proxyImage, 'load', this);
eventie.bind(proxyImage, 'error', this);
proxyImage.src=this.src;
this.isChecked=true;
};
Resource.prototype.handleEvent=function(event){
var method='on' + event.type;
if(this[ method ]){
this[ method ](event);
}};
Resource.prototype.onload=function(event){
this.confirm(true, 'onload');
this.unbindProxyEvents(event);
};
Resource.prototype.onerror=function(event){
this.confirm(false, 'onerror');
this.unbindProxyEvents(event);
};
Resource.prototype.confirm=function(isLoaded, message){
this.isConfirmed=true;
this.isLoaded=isLoaded;
this.emit('confirm', this, message);
};
Resource.prototype.unbindProxyEvents=function(event){
eventie.unbind(event.target, 'load', this);
eventie.unbind(event.target, 'error', this);
};
return ImagesLoaded;
});
(function($){
$.prettyPhoto={version: '3.1.6'};
$.fn.prettyPhoto=function(pp_settings){
pp_settings=jQuery.extend({
hook: 'rel', 
animation_speed: 'fast', 
ajaxcallback: function(){},
slideshow: 5000, 
autoplay_slideshow: false, 
opacity: 0.80, 
show_title: true, 
allow_resize: true, 
allow_expand: true, 
default_width: 500,
default_height: 344,
counter_separator_label: '/', 
theme: 'pp_default', 
horizontal_padding: 20, 
hideflash: false, 
wmode: 'opaque', 
autoplay: true, 
modal: false, 
deeplinking: true, 
overlay_gallery: true, 
overlay_gallery_max: 30, 
keyboard_shortcuts: true, 
changepicturecallback: function(){}, 
callback: function(){}, 
ie6_fallback: true,
markup: '<div class="pp_pic_holder"> \
<div class="ppt">&nbsp;</div> \
<div class="pp_top"> \
<div class="pp_left"></div> \
<div class="pp_middle"></div> \
<div class="pp_right"></div> \
</div> \
<div class="pp_content_container"> \
<div class="pp_left"> \
<div class="pp_right"> \
<div class="pp_content"> \
<div class="pp_loaderIcon"></div> \
<div class="pp_fade"> \
<a href="#" class="pp_expand" title="Expand the image">Expand</a> \
<div class="pp_hoverContainer"> \
<a class="pp_next" href="#">next</a> \
<a class="pp_previous" href="#">previous</a> \
</div> \
<div id="pp_full_res"></div> \
<div class="pp_details"> \
<div class="pp_nav"> \
<a href="#" class="pp_arrow_previous">Previous</a> \
<p class="currentTextHolder">0/0</p> \
<a href="#" class="pp_arrow_next">Next</a> \
</div> \
<p class="pp_description"></p> \
<div class="pp_social">{pp_social}</div> \
<a class="pp_close" href="#">Close</a> \
</div> \
</div> \
</div> \
</div> \
</div> \
</div> \
<div class="pp_bottom"> \
<div class="pp_left"></div> \
<div class="pp_middle"></div> \
<div class="pp_right"></div> \
</div> \
</div> \
<div class="pp_overlay"></div>',
gallery_markup: '<div class="pp_gallery"> \
<a href="#" class="pp_arrow_previous">Previous</a> \
<div> \
<ul> \
{gallery} \
</ul> \
</div> \
<a href="#" class="pp_arrow_next">Next</a> \
</div>',
image_markup: '<img id="fullResImage" src="{path}" />',
flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',
iframe_markup: '<iframe src="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
inline_markup: '<div class="pp_inline">{content}</div>',
custom_markup: '',
social_tools: '<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>' 
}, pp_settings);
var matchedObjects=this, percentBased=false, pp_dimensions, pp_open,
pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth,
windowHeight=$(window).height(), windowWidth=$(window).width(),
pp_slideshow;
doresize=true, scroll_pos=_get_scroll();
$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); });
if(pp_settings.keyboard_shortcuts){
$(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){
if(typeof $pp_pic_holder!='undefined'){
if($pp_pic_holder.is(':visible')){
switch(e.keyCode){
case 37:
$.prettyPhoto.changePage('previous');
e.preventDefault();
break;
case 39:
$.prettyPhoto.changePage('next');
e.preventDefault();
break;
case 27:
if(!settings.modal)
$.prettyPhoto.close();
e.preventDefault();
break;
};};
};});
};
$.prettyPhoto.initialize=function(){
settings=pp_settings;
if(settings.theme=='pp_default') settings.horizontal_padding=16;
theRel=$(this).attr(settings.hook);
galleryRegExp=/\[(?:.*)\]/;
isSet=(galleryRegExp.exec(theRel)) ? true:false;
pp_images=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return $(n).attr('href'); }):$.makeArray($(this).attr('href'));
pp_titles=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt'):""; }):$.makeArray($(this).find('img').attr('alt'));
pp_descriptions=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return ($(n).attr('title')) ? $(n).attr('title'):""; }):$.makeArray($(this).attr('title'));
if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery=false;
set_position=jQuery.inArray($(this).attr('href'), pp_images);
rel_index=(isSet) ? set_position:$("a["+settings.hook+"^='"+theRel+"']").index($(this));
_build_overlay(this);
if(settings.allow_resize)
$(window).bind('scroll.prettyphoto',function(){ _center_overlay(); });
$.prettyPhoto.open();
return false;
}
$.prettyPhoto.open=function(event){
if(typeof settings=="undefined"){
settings=pp_settings;
pp_images=$.makeArray(arguments[0]);
pp_titles=(arguments[1]) ? $.makeArray(arguments[1]):$.makeArray("");
pp_descriptions=(arguments[2]) ? $.makeArray(arguments[2]):$.makeArray("");
isSet=(pp_images.length > 1) ? true:false;
set_position=(arguments[3])? arguments[3]: 0;
_build_overlay(event.target);
}
if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden');
_checkPosition($(pp_images).size());
$('.pp_loaderIcon').show();
if(settings.deeplinking)
setHashtag();
if(settings.social_tools){
facebook_like_link=settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
$pp_pic_holder.find('.pp_social').html(facebook_like_link);
}
if($ppt.is(':hidden')) $ppt.css('opacity',0).show();
$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);
$pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).size());
if(typeof pp_descriptions[set_position]!='undefined'&&pp_descriptions[set_position]!=""){
$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));
}else{
$pp_pic_holder.find('.pp_description').hide();
}
movie_width=(parseFloat(getParam('width',pp_images[set_position]))) ? getParam('width',pp_images[set_position]):settings.default_width.toString();
movie_height=(parseFloat(getParam('height',pp_images[set_position]))) ? getParam('height',pp_images[set_position]):settings.default_height.toString();
percentBased=false;
if(movie_height.indexOf('%')!=-1){ movie_height=parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased=true; }
if(movie_width.indexOf('%')!=-1){ movie_width=parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased=true; }
$pp_pic_holder.fadeIn(function(){
(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined") ? $ppt.html(unescape(pp_titles[set_position])):$ppt.html('&nbsp;');
imgPreloader="";
skipInjection=false;
switch(_getFileType(pp_images[set_position])){
case 'image':
imgPreloader=new Image();
nextImage=new Image();
if(isSet&&set_position < $(pp_images).size() -1) nextImage.src=pp_images[set_position + 1];
prevImage=new Image();
if(isSet&&pp_images[set_position - 1]) prevImage.src=pp_images[set_position - 1];
$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);
imgPreloader.onload=function(){
pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);
_showContent();
};
imgPreloader.onerror=function(){
alert('Image cannot be loaded. Make sure the path is correct and image exist.');
$.prettyPhoto.close();
};
imgPreloader.src=pp_images[set_position];
break;
case 'youtube':
pp_dimensions=_fitToViewport(movie_width,movie_height);
movie_id=getParam('v',pp_images[set_position]);
if(movie_id==""){
movie_id=pp_images[set_position].split('youtu.be/');
movie_id=movie_id[1];
if(movie_id.indexOf('?') > 0)
movie_id=movie_id.substr(0,movie_id.indexOf('?'));
if(movie_id.indexOf('&') > 0)
movie_id=movie_id.substr(0,movie_id.indexOf('&'));
}
movie='http://www.youtube.com/embed/'+movie_id;
(getParam('rel',pp_images[set_position])) ? movie+="?rel="+getParam('rel',pp_images[set_position]):movie+="?rel=1";
if(settings.autoplay) movie +="&autoplay=1";
toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);
break;
case 'vimeo':
pp_dimensions=_fitToViewport(movie_width,movie_height);
movie_id=pp_images[set_position];
var regExp=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;
var match=movie_id.match(regExp);
movie='http://player.vimeo.com/video/'+ match[3] +'?title=0&amp;byline=0&amp;portrait=0';
if(settings.autoplay) movie +="&autoplay=1;";
vimeo_width=pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width'];
toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);
break;
case 'quicktime':
pp_dimensions=_fitToViewport(movie_width,movie_height);
pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15;
toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);
break;
case 'flash':
pp_dimensions=_fitToViewport(movie_width,movie_height);
flash_vars=pp_images[set_position];
flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length);
filename=pp_images[set_position];
filename=filename.substring(0,filename.indexOf('?'));
toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);
break;
case 'iframe':
pp_dimensions=_fitToViewport(movie_width,movie_height);
frame_url=pp_images[set_position];
frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);
toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);
break;
case 'ajax':
doresize=false;
pp_dimensions=_fitToViewport(movie_width,movie_height);
doresize=true;
skipInjection=true;
$.get(pp_images[set_position],function(responseHTML){
toInject=settings.inline_markup.replace(/{content}/g,responseHTML);
$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;
_showContent();
});
break;
case 'custom':
pp_dimensions=_fitToViewport(movie_width,movie_height);
toInject=settings.custom_markup;
break;
case 'inline':
myClone=$(pp_images[set_position]).clone().append('<br clear="all" />').css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show();
doresize=false;
pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());
doresize=true;
$(myClone).remove();
toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());
break;
};
if(!imgPreloader&&!skipInjection){
$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;
_showContent();
};});
return false;
};
$.prettyPhoto.changePage=function(direction){
currentGalleryPage=0;
if(direction=='previous'){
set_position--;
if(set_position < 0) set_position=$(pp_images).size()-1;
}else if(direction=='next'){
set_position++;
if(set_position > $(pp_images).size()-1) set_position=0;
}else{
set_position=direction;
};
rel_index=set_position;
if(!doresize) doresize=true;
if(settings.allow_expand){
$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');
}
_hideContent(function(){ $.prettyPhoto.open(); });
};
$.prettyPhoto.changeGalleryPage=function(direction){
if(direction=='next'){
currentGalleryPage ++;
if(currentGalleryPage > totalPage) currentGalleryPage=0;
}else if(direction=='previous'){
currentGalleryPage --;
if(currentGalleryPage < 0) currentGalleryPage=totalPage;
}else{
currentGalleryPage=direction;
};
slide_speed=(direction=='next'||direction=='previous') ? settings.animation_speed:0;
slide_to=currentGalleryPage * (itemsPerPage * itemWidth);
$pp_gallery.find('ul').animate({left:-slide_to},slide_speed);
};
$.prettyPhoto.startSlideshow=function(){
if(typeof pp_slideshow=='undefined'){
$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){
$.prettyPhoto.stopSlideshow();
return false;
});
pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);
}else{
$.prettyPhoto.changePage('next');
};}
$.prettyPhoto.stopSlideshow=function(){
$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){
$.prettyPhoto.startSlideshow();
return false;
});
clearInterval(pp_slideshow);
pp_slideshow=undefined;
}
$.prettyPhoto.close=function(){
if($pp_overlay.is(":animated")) return;
$.prettyPhoto.stopSlideshow();
$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');
$('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); });
$pp_overlay.fadeOut(settings.animation_speed, function(){
if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible');
$(this).remove();
$(window).unbind('scroll.prettyphoto');
clearHashtag();
settings.callback();
doresize=true;
pp_open=false;
delete settings;
});
};
function _showContent(){
$('.pp_loaderIcon').hide();
projectedTop=scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2));
if(projectedTop < 0) projectedTop=0;
$ppt.fadeTo(settings.animation_speed,1);
$pp_pic_holder.find('.pp_content')
.animate({
height:pp_dimensions['contentHeight'],
width:pp_dimensions['contentWidth']
},settings.animation_speed);
$pp_pic_holder.animate({
'top': projectedTop,
'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0:(windowWidth/2) - (pp_dimensions['containerWidth']/2),
width:pp_dimensions['containerWidth']
},settings.animation_speed,function(){
$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);
$pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed);
if(isSet&&_getFileType(pp_images[set_position])=="image"){ $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); }
if(settings.allow_expand){
if(pp_dimensions['resized']){
$('a.pp_expand,a.pp_contract').show();
}else{
$('a.pp_expand').hide();
}}
if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open) $.prettyPhoto.startSlideshow();
settings.changepicturecallback();
pp_open=true;
});
_insert_gallery();
pp_settings.ajaxcallback();
};
function _hideContent(callback){
$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');
$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){
$('.pp_loaderIcon').show();
callback();
});
};
function _checkPosition(setCount){
(setCount > 1) ? $('.pp_nav').show():$('.pp_nav').hide();
};
function _fitToViewport(width,height){
resized=false;
_getDimensions(width,height);
imageWidth=width, imageHeight=height;
if(((pp_containerWidth > windowWidth)||(pp_containerHeight > windowHeight))&&doresize&&settings.allow_resize&&!percentBased){
resized=true, fitting=false;
while (!fitting){
if((pp_containerWidth > windowWidth)){
imageWidth=(windowWidth - 200);
imageHeight=(height/width) * imageWidth;
}else if((pp_containerHeight > windowHeight)){
imageHeight=(windowHeight - 200);
imageWidth=(width/height) * imageHeight;
}else{
fitting=true;
};
pp_containerHeight=imageHeight, pp_containerWidth=imageWidth;
};
if((pp_containerWidth > windowWidth)||(pp_containerHeight > windowHeight)){
_fitToViewport(pp_containerWidth,pp_containerHeight)
};
_getDimensions(imageWidth,imageHeight);
};
return {
width:Math.floor(imageWidth),
height:Math.floor(imageHeight),
containerHeight:Math.floor(pp_containerHeight),
containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2),
contentHeight:Math.floor(pp_contentHeight),
contentWidth:Math.floor(pp_contentWidth),
resized:resized
};};
function _getDimensions(width,height){
width=parseFloat(width);
height=parseFloat(height);
$pp_details=$pp_pic_holder.find('.pp_details');
$pp_details.width(width);
detailsHeight=parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom'));
$pp_details=$pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({
'position':'absolute',
'top':-10000
});
detailsHeight +=$pp_details.height();
detailsHeight=(detailsHeight <=34) ? 36:detailsHeight;
$pp_details.remove();
$pp_title=$pp_pic_holder.find('.ppt');
$pp_title.width(width);
titleHeight=parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom'));
$pp_title=$pp_title.clone().appendTo($('body')).css({
'position':'absolute',
'top':-10000
});
titleHeight +=$pp_title.height();
$pp_title.remove();
pp_contentHeight=height + detailsHeight;
pp_contentWidth=width;
pp_containerHeight=pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height();
pp_containerWidth=width;
}
function _getFileType(itemSrc){
if(itemSrc.match(/youtube\.com\/watch/i)||itemSrc.match(/youtu\.be/i)){
return 'youtube';
}else if(itemSrc.match(/vimeo\.com/i)){
return 'vimeo';
}else if(itemSrc.match(/\b.mov\b/i)){
return 'quicktime';
}else if(itemSrc.match(/\b.swf\b/i)){
return 'flash';
}else if(itemSrc.match(/\biframe=true\b/i)){
return 'iframe';
}else if(itemSrc.match(/\bajax=true\b/i)){
return 'ajax';
}else if(itemSrc.match(/\bcustom=true\b/i)){
return 'custom';
}else if(itemSrc.substr(0,1)=='#'){
return 'inline';
}else{
return 'image';
};};
function _center_overlay(){
if(doresize&&typeof $pp_pic_holder!='undefined'){
scroll_pos=_get_scroll();
contentHeight=$pp_pic_holder.height(), contentwidth=$pp_pic_holder.width();
projectedTop=(windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2);
if(projectedTop < 0) projectedTop=0;
if(contentHeight > windowHeight)
return;
$pp_pic_holder.css({
'top': projectedTop,
'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2)
});
};};
function _get_scroll(){
if(self.pageYOffset){
return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){
return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){
return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};
};
function _resize_overlay(){
windowHeight=$(window).height(), windowWidth=$(window).width();
if(typeof $pp_overlay!="undefined") $pp_overlay.height($(document).height()).width(windowWidth);
};
function _insert_gallery(){
if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){
itemWidth=52+5;
navWidth=(settings.theme=="facebook"||settings.theme=="pp_default") ? 50:30;
itemsPerPage=Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth);
itemsPerPage=(itemsPerPage < pp_images.length) ? itemsPerPage:pp_images.length;
totalPage=Math.ceil(pp_images.length / itemsPerPage) - 1;
if(totalPage==0){
navWidth=0;
$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();
}else{
$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();
};
galleryWidth=itemsPerPage * itemWidth;
fullGalleryWidth=pp_images.length * itemWidth;
$pp_gallery
.css('margin-left',-((galleryWidth/2) + (navWidth/2)))
.find('div:first').width(galleryWidth+5)
.find('ul').width(fullGalleryWidth)
.find('li.selected').removeClass('selected');
goToPage=(Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage):totalPage;
$.prettyPhoto.changeGalleryPage(goToPage);
$pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');
}else{
$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');
}}
function _build_overlay(caller){
if(settings.social_tools)
facebook_like_link=settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
settings.markup=settings.markup.replace('{pp_social}','');
$('body').append(settings.markup);
$pp_pic_holder=$('.pp_pic_holder') , $ppt=$('.ppt'), $pp_overlay=$('div.pp_overlay');
if(isSet&&settings.overlay_gallery){
currentGalleryPage=0;
toInject="";
for (var i=0; i < pp_images.length; i++){
if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){
classname='default';
img_src='';
}else{
classname='';
img_src=pp_images[i];
}
toInject +="<li class='"+classname+"'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>";
};
toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);
$pp_pic_holder.find('#pp_full_res').after(toInject);
$pp_gallery=$('.pp_pic_holder .pp_gallery'), $pp_gallery_li=$pp_gallery.find('li');
$pp_gallery.find('.pp_arrow_next').click(function(){
$.prettyPhoto.changeGalleryPage('next');
$.prettyPhoto.stopSlideshow();
return false;
});
$pp_gallery.find('.pp_arrow_previous').click(function(){
$.prettyPhoto.changeGalleryPage('previous');
$.prettyPhoto.stopSlideshow();
return false;
});
$pp_pic_holder.find('.pp_content').hover(function(){
$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();
},
function(){
$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();
});
itemWidth=52+5;
$pp_gallery_li.each(function(i){
$(this)
.find('a')
.click(function(){
$.prettyPhoto.changePage(i);
$.prettyPhoto.stopSlideshow();
return false;
});
});
};
if(settings.slideshow){
$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
$pp_pic_holder.find('.pp_nav .pp_play').click(function(){
$.prettyPhoto.startSlideshow();
return false;
});
}
$pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme);
$pp_overlay
.css({
'opacity':0,
'height':$(document).height(),
'width':$(window).width()
})
.bind('click',function(){
if(!settings.modal) $.prettyPhoto.close();
});
$('a.pp_close').bind('click',function(){ $.prettyPhoto.close(); return false; });
if(settings.allow_expand){
$('a.pp_expand').bind('click',function(e){
if($(this).hasClass('pp_expand')){
$(this).removeClass('pp_expand').addClass('pp_contract');
doresize=false;
}else{
$(this).removeClass('pp_contract').addClass('pp_expand');
doresize=true;
};
_hideContent(function(){ $.prettyPhoto.open(); });
return false;
});
}
$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){
$.prettyPhoto.changePage('previous');
$.prettyPhoto.stopSlideshow();
return false;
});
$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){
$.prettyPhoto.changePage('next');
$.prettyPhoto.stopSlideshow();
return false;
});
_center_overlay();
};
if(!pp_alreadyInitialized&&getHashtag()){
pp_alreadyInitialized=true;
hashIndex=getHashtag();
hashRel=hashIndex;
hashIndex=hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);
hashRel=hashRel.substring(0,hashRel.indexOf('/'));
setTimeout(function(){ $("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click'); },50);
}
return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);
};
function getHashtag(){
var url=location.href;
hashtag=(url.indexOf('#prettyPhoto')!==-1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)):false;
if(hashtag){  hashtag=hashtag.replace(/<|>/g,''); }
return hashtag;
};
function setHashtag(){
if(typeof theRel=='undefined') return;
location.hash=theRel + '/'+rel_index+'/';
};
function clearHashtag(){
if(location.href.indexOf('#prettyPhoto')!==-1) location.hash="prettyPhoto";
}
function getParam(name,url){
name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS="[\\?&]"+name+"=([^&#]*)";
var regex=new RegExp(regexS);
var results=regex.exec(url);
return(results==null) ? "":results[1];
}})(jQuery);
var pp_alreadyInitialized=false;
jQuery(document).ready(function(){
jQuery('#footer-core .widget-area:last-child').addClass("last");
jQuery('#footer-core.option2 .widget-area').addClass("one_half");
jQuery('#footer-core.option3 .widget-area').addClass("one_third");
jQuery('#footer-core.option4 .widget-area').addClass("one_fourth");
jQuery('#footer-core.option5 .widget-area').addClass("one_fifth");
jQuery('#footer-core.option6 .widget-area').addClass("one_sixth");
jQuery('#footer-core.option7 #footer-col1.widget-area').addClass("one_third");
jQuery('#footer-core.option7 #footer-col2.widget-area').addClass("two_third");
jQuery('#footer-core.option8 #footer-col1.widget-area').addClass("two_third");
jQuery('#footer-core.option8 #footer-col2.widget-area').addClass("one_third");
jQuery('#footer-core.option9 #footer-col1.widget-area').addClass("one_fourth");
jQuery('#footer-core.option9 #footer-col2.widget-area').addClass("three_fourth");
jQuery('#footer-core.option10 #footer-col1.widget-area').addClass("three_fourth");
jQuery('#footer-core.option10 #footer-col2.widget-area').addClass("one_fourth");
jQuery('#footer-core.option11 #footer-col1.widget-area').addClass("one_fifth");
jQuery('#footer-core.option11 #footer-col2.widget-area').addClass("four_fifth");
jQuery('#footer-core.option12 #footer-col1.widget-area').addClass("four_fifth");
jQuery('#footer-core.option12 #footer-col2.widget-area').addClass("one_fifth");
jQuery('#footer-core.option13 #footer-col1.widget-area').addClass("one_sixth");
jQuery('#footer-core.option13 #footer-col2.widget-area').addClass("one_sixth");
jQuery('#footer-core.option13 #footer-col3.widget-area').addClass("one_sixth");
jQuery('#footer-core.option13 #footer-col4.widget-area').addClass("one_half");
jQuery('#footer-core.option14 #footer-col1.widget-area').addClass("one_half");
jQuery('#footer-core.option14 #footer-col2.widget-area').addClass("one_sixth");
jQuery('#footer-core.option14 #footer-col3.widget-area').addClass("one_sixth");
jQuery('#footer-core.option14 #footer-col4.widget-area').addClass("one_sixth");
jQuery('#footer-core.option15 #footer-col1.widget-area').addClass("one_sixth");
jQuery('#footer-core.option15 #footer-col2.widget-area').addClass("one_third");
jQuery('#footer-core.option15 #footer-col3.widget-area').addClass("one_half");
jQuery('#footer-core.option16 #footer-col1.widget-area').addClass("one_half");
jQuery('#footer-core.option16 #footer-col2.widget-area').addClass("one_third");
jQuery('#footer-core.option16 #footer-col3.widget-area').addClass("one_sixth");
jQuery('#footer-core.option17 #footer-col1.widget-area').addClass("one_fourth");
jQuery('#footer-core.option17 #footer-col2.widget-area').addClass("one_fourth");
jQuery('#footer-core.option17 #footer-col3.widget-area').addClass("one_sixth");
jQuery('#footer-core.option17 #footer-col4.widget-area').addClass("one_sixth");
jQuery('#footer-core.option17 #footer-col5.widget-area').addClass("one_sixth");
jQuery('#footer-core.option18 #footer-col1.widget-area').addClass("one_sixth");
jQuery('#footer-core.option18 #footer-col2.widget-area').addClass("one_sixth");
jQuery('#footer-core.option18 #footer-col3.widget-area').addClass("one_sixth");
jQuery('#footer-core.option18 #footer-col4.widget-area').addClass("one_fourth");
jQuery('#footer-core.option18 #footer-col5.widget-area').addClass("one_fourth");
});
jQuery(document).ready(function(){
jQuery('#sub-footer-widgets .widget-area:last-child').addClass("last");
jQuery('#sub-footer-widgets .widget-area:last-child').after('<div class="clearboth"></div>');
jQuery('#sub-footer-widgets.option2 .widget-area').addClass("one_half");
jQuery('#sub-footer-widgets.option3 #sub-footer-col1.widget-area').addClass("one_third");
jQuery('#sub-footer-widgets.option3 #sub-footer-col2.widget-area').addClass("two_third");
jQuery('#sub-footer-widgets.option4 #sub-footer-col1.widget-area').addClass("two_third");
jQuery('#sub-footer-widgets.option4 #sub-footer-col2.widget-area').addClass("one_third");
jQuery('#sub-footer-widgets.option5 #sub-footer-col1.widget-area').addClass("one_fourth");
jQuery('#sub-footer-widgets.option5 #sub-footer-col2.widget-area').addClass("three_fourth");
jQuery('#sub-footer-widgets.option6 #sub-footer-col1.widget-area').addClass("three_fourth");
jQuery('#sub-footer-widgets.option6 #sub-footer-col2.widget-area').addClass("one_fourth");
jQuery('#sub-footer-widgets.option7 #sub-footer-col1.widget-area').addClass("one_fifth");
jQuery('#sub-footer-widgets.option7 #sub-footer-col2.widget-area').addClass("four_fifth");
jQuery('#sub-footer-widgets.option8 #sub-footer-col1.widget-area').addClass("four_fifth");
jQuery('#sub-footer-widgets.option8 #sub-footer-col2.widget-area').addClass("one_fifth");
});
jQuery(document).ready(function(){
(function($){
if($.isFunction($.fn.imagesLoaded)){
if($('#container').hasClass('portfolio-wrapper')){
var $container=$('#container-inner');
}else if($('body').hasClass('woo-shop-grid')){
var $container=$('#main-core > .products');
}else{
var $container=$('#container');
}
$container.imagesLoaded(function(){
if($.isFunction($.fn.masonry)){
$container.masonry();
}});
}}(jQuery));
});
function mainmenu(){
jQuery("header .header-links ul.menu > li").hover(function(){
jQuery(this).find('ul.sub-menu:first').css({visibility: "visible",display: "none"}).parent().addClass('menu-hover');
},function(){
jQuery(this).find('ul.sub-menu:first').css({visibility: "hidden",display: "none"}).parent().removeClass('menu-hover');
});
jQuery("header .header-links ul.menu > li").each(function(){
jQuery(this).find('ul.sub-menu').css({visibility: "visible",display: "none"}).parent().addClass('menu-parent');
});
jQuery("#pre-header").hover(function(){
jQuery(this).css({ 'z-index':'999991' });
},function(){
jQuery(this).css({ 'z-index':'999' });
});
jQuery("header .header-links li").hover(function(){
parentWidth=jQuery(this).width();
if(jQuery(this).hasClass('header-thinkupmega')){
jQuery(this).find('ul').addClass('header-thinkupmegachild');
megaColumnCount=jQuery(this).children("ul").children("li").length;
megaColumnWidth=100 / megaColumnCount;
jQuery(this).children("ul").children("li").outerWidth(megaColumnWidth + "%");
megaColumnHeight=jQuery(this).children("ul").height();
jQuery(this).children("ul").children("li").outerHeight(megaColumnHeight);
}
if(! jQuery(this).parent().hasClass('header-thinkupmegachild')){
jQuery(this).find('ul:first').css({visibility: "visible",display: "none","min-width": parentWidth}).slideToggle(400);
}},function(){
jQuery(this).find('ul:first').css({visibility: "hidden"});
});
}
jQuery(document).ready(function(){
mainmenu();
});
jQuery(document).ready(function(){
jQuery('#pre-header-search .search').focusin(function(){
jQuery('#pre-header-search').addClass('active');
});
jQuery('#pre-header-search .search').focusout(function(){
jQuery('#pre-header-search').removeClass('active');
});
});
jQuery(window).load(function(){
if(jQuery(window).width() > 768&&jQuery('body').hasClass('header-sticky')){
jQuery(window).scroll(function(){
var siteheader_height=jQuery('#site-header').height();
var preheader_height=jQuery('#pre-header').height();
var header_height=jQuery('#header').height();
var header_sticky_offset=jQuery('#header-sticky').offset();
if(!jQuery('body').hasClass('header-below')){
if(header_sticky_offset.top > preheader_height + header_height + 100){
jQuery('body').addClass('header-sticky-active');
}else{
jQuery('body').removeClass('header-sticky-active');
}}else{
if(header_sticky_offset.top > siteheader_height + 100){
jQuery('body').addClass('header-sticky-active');
}else{
jQuery('body').removeClass('header-sticky-active');
}}
});
}});
jQuery(document).ready(function(){
var all_videos=jQuery('iframe[src*="//player.vimeo.com"], iframe[src*="//www.youtube.com"], iframe[src*="//blip.tv"], iframe[src*="//www.slideshare.net"], iframe[src*="//www.scribd.com"], iframe[src*="//revision3.com"], iframe[src*="//www.hulu.com"], iframe[src*="//www.funnyordie.com"], iframe[src*="//www.dailymotion.com"], iframe[src*="//maps.google.com"], embed[src*="//v.wordpress.com"], object, embed');
all_videos.each(function(){
var el=jQuery(this);
el
.attr('data-aspectRatio', 360 / 640)
.attr('data-oldWidth', el.width());
});
jQuery(document).ready(function(){
all_videos.each(function(){
var el=jQuery(this),
newWidth=el.parents().width(),
oldWidth=el.attr('data-oldWidth');
el
.removeAttr('height')
.removeAttr('width')
.width(newWidth)
.height(newWidth * el.attr('data-aspectRatio'));
});
}).resize();
jQuery(window)
.resize(function(){
all_videos.each(function(){
var el=jQuery(this),
newWidth=el.parents().width(),
oldWidth=el.attr('data-oldWidth');
el
.removeAttr('height')
.removeAttr('width')
.width(newWidth)
.height(newWidth * el.attr('data-aspectRatio'));
});
}).resize();
});
jQuery(document).ready(function(){
var all_sounds=jQuery('iframe[src^="http://w.soundcloud.com"]');
all_sounds.each(function(){
var el=jQuery(this);
el
.attr('data-aspectRatio', el.attr('height') / el.attr('width'))
.attr('data-oldWidth', el.width());
});
jQuery(document).ready(function(){
all_sounds.each(function(){
var el=jQuery(this),
newWidth=el.parents().width(),
oldWidth=el.attr('data-oldWidth');
el
.removeAttr('width')
.width(newWidth)
});
}).resize();
jQuery(window)
.resize(function(){
all_sounds.each(function(){
var el=jQuery(this),
newWidth=el.parents().width(),
oldWidth=el.attr('data-oldWidth');
el
.removeAttr('width')
.width(newWidth)
});
}).resize();
});
jQuery(document).ready(function(){
jQuery('#container.portfolio-wrapper a').has('img.hover-zoom').addClass('prettyPhoto');
jQuery('#container.portfolio-wrapper a').has('img.hover-zoom').attr('rel','portfolio[gallery]');
jQuery('a.prettyPhoto').has('img').attr('rel','portfolio[gallery]');
jQuery('a.prettyPhoto').prettyPhoto();
});
jQuery(document).ready(function(){
jQuery('body.attachment .entry-attachment .attachment a').has('img').addClass('prettyPhoto');
jQuery('a.prettyPhoto').prettyPhoto();
});
jQuery(document).ready(function(){
jQuery('.thinkup_widget_flickr a[href^="http://"], .thinkup_widget_flickr a[href^="https://"]').attr('target','_blank');
jQuery('.thinkup_widget_socialshare a[href^="http://"], .thinkup_widget_socialshare a[href^="https://"]').attr('target','_blank');
jQuery('.thinkup_widget_socialprofiles a[href^="http://"], .thinkup_widget_socialprofiles a[href^="https://"]').attr('target','_blank');
jQuery('#pre-header-social a[href^="http://"], #pre-header-social a[href^="https://"]').attr('target','_blank');
jQuery('#shareicons a[href^="http://"], #shareicons a[href^="https://"]').attr('target','_blank');
});
jQuery(window).load(function(){
jQuery('.accordion-toggle').click(function(){
if(jQuery(this).hasClass('collapsed')){
jQuery(this).closest('.accordion').find('.accordion-toggle').not(this).addClass('collapsed');
}});
jQuery('.backtotop').click(function(){
jQuery('html, body').animate({scrollTop:0}, 'slow');
});
jQuery('[data-tip]').each(function(){jQuery(this).tooltip({ placement: jQuery(this).data('tip') });});
function isNumber(n){
return !isNaN(parseFloat(n))&&isFinite(n);
}
jQuery(window).bind('load resize', function(){
jQuery('.sc-carousel').each(function(i){
if(jQuery(this).hasClass('sc-postitem') ||
jQuery(this).hasClass('sc-featured') ||
jQuery(this).hasClass('sc-image')){
return;
};
var instanceID='sc-carousel-' + i;
jQuery(this).attr('id', instanceID);
jQuery(this).children('ul').attr('id', instanceID + '-inner');
var show=jQuery('#' + instanceID + '.sc-carousel').data('show');
var scroll=jQuery('#' + instanceID + '.sc-carousel').data('scroll');
var speed=jQuery('#' + instanceID + '.sc-carousel').data('speed');
var effect=jQuery('#' + instanceID + '.sc-carousel').data('effect');
if(show==0||isNaN(show)==true) show='3';
if(scroll==0||isNaN(scroll)==true) scroll='1';
if(speed==0) speed='500';
if(effect==0){
effect='"scroll"';
}else{
effect='"' + effect + '"';
}
var showItems=show;
var scrollItems=scroll;
var speedItems=speed;
var fxItems=effect;
var width=jQuery(window).width();
if(jQuery('body').hasClass('layout-responsive')){
if(width <=685){
showItems=2;
if(scrollItems >=2){
scrollItems=2;
}}
if(width <=480){
showItems=1;
scrollItems=1;
}}
if(jQuery(this).find('#' + instanceID + '-inner').length){
jQuery(this).find('#' + instanceID + '-inner').carouFredSel({
width: '100%',
items:{
visible:showItems,
minimum:3,
minimum:3,
start: 0
},
scroll:{
items:scrollItems,
fx:fxItems,
easing:"swing",
duration:speedItems,
},
responsive:true,
circular:true,
infinite:false,
auto:false,
prev:{
button:'#' + instanceID + ' .prev',
key:'left'
},
next:{
button:'#' + instanceID + ' .next',
key:'right'
},
pagination:'#' + instanceID + ' .pagination',
onCreate: function (){
jQuery(window).bind("load resize", function(){
parentWidthTestimonial=jQuery('#' + instanceID + '.carousel-testimonial li').height();
jQuery('#' + instanceID + '.carousel-testimonial').height('auto');
jQuery('#' + instanceID + '.carousel-testimonial .caroufredsel_wrapper').css({ 'height': parentWidthTestimonial });
parentWidthTestimonial=jQuery('#' + instanceID + '.carousel-testimonial.style1 .sc-carousel-thumbs').height();
jQuery('#' + instanceID + '.carousel-testimonial.style1').height('auto');
jQuery('#' + instanceID + '.carousel-testimonial.style1 .sc-carousel-thumbs').parent().height(parentWidthTestimonial);
});
}});
}
if(jQuery(this).find('.sc-carousel-thumbs').length){
jQuery(this).find('.sc-carousel-thumbs').carouFredSel({
responsive: true,
circular: false,
infinite: false,
auto: false,
prev: '#prev',
next: '#next',
items: {
visible: {
min: 2,
max: 6
},
width: 150,
height: 70
}});
}
jQuery(this).find('.sc-carousel-thumbs a').click(function(){
jQuery('#' + instanceID + '-inner').trigger('slideTo', '#' + this.href.split('#').pop());
jQuery('.sc-carousel-thumbs a').removeClass('selected');
jQuery(this).addClass('selected');
return false;
});
parentHeight=jQuery('#' + instanceID + ' li').height();
jQuery('#' + instanceID + ' li').each(function(){
var elementHeight=jQuery(this).height();
parentHeight=elementHeight > parentHeight ? elementHeight:parentHeight;
});
if(jQuery('#' + instanceID).closest('.sc-carousel').find('.sc-carousel-thumbs').length > 0){
parentHeightThumb=parentHeight + jQuery('#' + instanceID).closest('.sc-carousel').find('.sc-carousel-thumbs').height();
}else{
parentHeightThumb=parentHeight;
}
jQuery('#' + instanceID).height(Math.max(parentHeight, parentHeightThumb));
jQuery('#' + instanceID + '-inner').height(parentHeight);
jQuery('#' + instanceID + '-inner').parent().height(parentHeight);
if(jQuery('#' + instanceID + ' iframe').length > 0){
jQuery('#' + instanceID).addClass('carousel-iframe');
}});
}).resize();
});
jQuery(document).ready(function(){
jQuery('.rslides-sc').each(function(index, element){
jQuery(element).attr('id', 'thinkupbuilder-sliderimage-' + index);
var wide=jQuery(element).data('wide');
if(wide=='on'){
jQuery(element).closest('.panel-grid').css('padding', 0);
jQuery(element).closest('.panel-grid-core').css('margin', 0).css('maxWidth', '100%');
jQuery(element).closest('.panel-grid-cell').css('padding', 0);
}});
jQuery('.thinkupslider-sc').each(function(index, element){
jQuery(element).attr('id', 'thinkupbuilder-thinkupsliderimage-' + index);
var wide=jQuery(element).data('wide');
if(wide=='on'){
jQuery(element).closest('.panel-grid').css('padding', 0);
jQuery(element).closest('.panel-grid-core').css('margin', 0).css('maxWidth', '100%');
jQuery(element).closest('.panel-grid-cell').css('padding', 0);
}});
jQuery('.sc-grid ul').each(function(index, element){
var wide=jQuery(element).data('wide');
if(wide=='on'){
jQuery(element).closest('.panel-grid').css('padding', 0);
jQuery(element).closest('.panel-grid-core').css('margin', 0).css('maxWidth', '100%');
jQuery(element).closest('.panel-grid-cell').css('padding', 0);
}});
});
jQuery(document).ready(function(){
jQuery('#header-search a').click(function(){
if(! jQuery('#header-search').hasClass('active')){
jQuery('#header-search').addClass('active');
}else{
jQuery('#header-search').removeClass('active');
}});
});
jQuery(document).ready(function(){
if(jQuery('body').hasClass('scrollup-on')){
(function($){
$(function (){
$.scrollUp({
scrollName: 'scrollUp',
scrollText: '',
});
});
} (jQuery));
}});
jQuery('#sub-footer-close-core').click(function(){
if(jQuery(this).hasClass('collapsed')){
jQuery(this).removeClass('collapsed');
jQuery('#sub-footer-widgets').removeClass('collapsed');
}else{
jQuery(this).addClass('collapsed');
jQuery('#sub-footer-widgets').addClass('collapsed');
}});
jQuery(document).ready(function (){
if(jQuery('.featured-icon')){
jQuery('#slider').after('<div id="thinkupslider-after"></div>');
}
jQuery('.featured-icon a').click(function(e){
e.preventDefault();
jQuery('html, body').animate({ scrollTop: jQuery('#thinkupslider-after').offset().top },  1000);
});
});
jQuery(document).ready(function (){
jQuery('.woo-share').click(function(e){
if(jQuery(this).hasClass('active')){
jQuery(this).removeClass('active');
jQuery(this).closest('.woo-meta').find('.woo-meta-social').removeClass('active');
}else{
jQuery(this).addClass('active');
jQuery(this).closest('.woo-meta').find('.woo-meta-social').addClass('active');
}});
});
!function ($){
"use strict";
$(function (){
$.support.transition=(function (){
var transitionEnd=(function (){
var el=document.createElement('bootstrap')
, transEndEventNames={
'WebkitTransition':'webkitTransitionEnd'
,  'MozTransition':'transitionend'
,  'OTransition':'oTransitionEnd otransitionend'
,  'transition':'transitionend'
}
, name
for (name in transEndEventNames){
if(el.style[name]!==undefined){
return transEndEventNames[name]
}}
}())
return transitionEnd&&{
end: transitionEnd
}})()
})
}(window.jQuery);
!function ($){
"use strict";
var Modal=function (element, options){
this.options=options
this.$element=$(element)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
this.options.remote&&this.$element.find('.modal-body').load(this.options.remote)
}
Modal.prototype={
constructor: Modal
, toggle: function (){
return this[!this.isShown ? 'show':'hide']()
}
, show: function (){
var that=this
, e=$.Event('show')
this.$element.trigger(e)
if(this.isShown||e.isDefaultPrevented()) return
this.isShown=true
this.escape()
this.backdrop(function (){
var transition=$.support.transition&&that.$element.hasClass('fade')
if(!that.$element.parent().length){
that.$element.appendTo(document.body)
}
that.$element.show()
if(transition){
that.$element[0].offsetWidth
}
that.$element
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus()
transition ?
that.$element.one($.support.transition.end, function (){ that.$element.focus().trigger('shown') }) :
that.$element.focus().trigger('shown')
})
}
, hide: function (e){
e&&e.preventDefault()
var that=this
e=$.Event('hide')
this.$element.trigger(e)
if(!this.isShown||e.isDefaultPrevented()) return
this.isShown=false
this.escape()
$(document).off('focusin.modal')
this.$element
.removeClass('in')
.attr('aria-hidden', true)
$.support.transition&&this.$element.hasClass('fade') ?
this.hideWithTransition() :
this.hideModal()
}
, enforceFocus: function (){
var that=this
$(document).on('focusin.modal', function (e){
if(that.$element[0]!==e.target&&!that.$element.has(e.target).length){
that.$element.focus()
}})
}
, escape: function (){
var that=this
if(this.isShown&&this.options.keyboard){
this.$element.on('keyup.dismiss.modal', function(e){
e.which==27&&that.hide()
})
}else if(!this.isShown){
this.$element.off('keyup.dismiss.modal')
}}
, hideWithTransition: function (){
var that=this
, timeout=setTimeout(function (){
that.$element.off($.support.transition.end)
that.hideModal()
}, 500)
this.$element.one($.support.transition.end, function (){
clearTimeout(timeout)
that.hideModal()
})
}
, hideModal: function (){
var that=this
this.$element.hide()
this.backdrop(function (){
that.removeBackdrop()
that.$element.trigger('hidden')
})
}
, removeBackdrop: function (){
this.$backdrop&&this.$backdrop.remove()
this.$backdrop=null
}
, backdrop: function (callback){
var that=this
, animate=this.$element.hasClass('fade') ? 'fade':''
if(this.isShown&&this.options.backdrop){
var doAnimate=$.support.transition&&animate
this.$backdrop=$('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
this.$backdrop.click(this.options.backdrop=='static' ?
$.proxy(this.$element[0].focus, this.$element[0])
: $.proxy(this.hide, this)
)
if(doAnimate) this.$backdrop[0].offsetWidth
this.$backdrop.addClass('in')
if(!callback) return
doAnimate ?
this.$backdrop.one($.support.transition.end, callback) :
callback()
}else if(!this.isShown&&this.$backdrop){
this.$backdrop.removeClass('in')
$.support.transition&&this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, callback) :
callback()
}else if(callback){
callback()
}}
}
var old=$.fn.modal
$.fn.modal=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('modal')
, options=$.extend({}, $.fn.modal.defaults, $this.data(), typeof option=='object'&&option)
if(!data) $this.data('modal', (data=new Modal(this, options)))
if(typeof option=='string') data[option]()
else if(options.show) data.show()
})
}
$.fn.modal.defaults={
backdrop: true
, keyboard: true
, show: true
}
$.fn.modal.Constructor=Modal
$.fn.modal.noConflict=function (){
$.fn.modal=old
return this
}
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e){
var $this=$(this)
, href=$this.attr('href')
, $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/, '')))
, option=$target.data('modal') ? 'toggle':$.extend({ remote:!/#/.test(href)&&href }, $target.data(), $this.data())
e.preventDefault()
$target
.modal(option)
.one('hide', function (){
$this.focus()
})
})
}(window.jQuery);
!function ($){
"use strict";
var toggle='[data-toggle=dropdown]'
, Dropdown=function (element){
var $el=$(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function (){
$el.parent().removeClass('open')
})
}
Dropdown.prototype={
constructor: Dropdown
, toggle: function (e){
var $this=$(this)
, $parent
, isActive
if($this.is('.disabled, :disabled')) return
$parent=getParent($this)
isActive=$parent.hasClass('open')
clearMenus()
if(!isActive){
if('ontouchstart' in document.documentElement){
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
}
$parent.toggleClass('open')
}
$this.focus()
return false
}
, keydown: function (e){
var $this
, $items
, $active
, $parent
, isActive
, index
if(!/(38|40|27)/.test(e.keyCode)) return
$this=$(this)
e.preventDefault()
e.stopPropagation()
if($this.is('.disabled, :disabled')) return
$parent=getParent($this)
isActive=$parent.hasClass('open')
if(!isActive||(isActive&&e.keyCode==27)){
if(e.which==27) $parent.find(toggle).focus()
return $this.click()
}
$items=$('[role=menu] li:not(.divider):visible a', $parent)
if(!$items.length) return
index=$items.index($items.filter(':focus'))
if(e.keyCode==38&&index > 0) index--
if(e.keyCode==40&&index < $items.length - 1) index++
if(!~index) index=0
$items
.eq(index)
.focus()
}}
function clearMenus(){
$('.dropdown-backdrop').remove()
$(toggle).each(function (){
getParent($(this)).removeClass('open')
})
}
function getParent($this){
var selector=$this.attr('data-target')
, $parent
if(!selector){
selector=$this.attr('href')
selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/, '')
}
$parent=selector&&$(selector)
if(!$parent||!$parent.length) $parent=$this.parent()
return $parent
}
var old=$.fn.dropdown
$.fn.dropdown=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('dropdown')
if(!data) $this.data('dropdown', (data=new Dropdown(this)))
if(typeof option=='string') data[option].call($this)
})
}
$.fn.dropdown.Constructor=Dropdown
$.fn.dropdown.noConflict=function (){
$.fn.dropdown=old
return this
}
$(document)
.on('click.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api', '.dropdown form', function (e){ e.stopPropagation() })
.on('click.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
}(window.jQuery);
!function ($){
"use strict";
function ScrollSpy(element, options){
var process=$.proxy(this.process, this)
, $element=$(element).is('body') ? $(window):$(element)
, href
this.options=$.extend({}, $.fn.scrollspy.defaults, options)
this.$scrollElement=$element.on('scroll.scroll-spy.data-api', process)
this.selector=(this.options.target
|| ((href=$(element).attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, ''))
|| '') + ' .nav li > a'
this.$body=$('body')
this.refresh()
this.process()
}
ScrollSpy.prototype={
constructor: ScrollSpy
, refresh: function (){
var self=this
, $targets
this.offsets=$([])
this.targets=$([])
$targets=this.$body
.find(this.selector)
.map(function (){
var $el=$(this)
, href=$el.data('target')||$el.attr('href')
, $href=/^#\w/.test(href)&&$(href)
return($href
&& $href.length
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0))&&self.$scrollElement.scrollTop()), href ]])||null
})
.sort(function (a, b){ return a[0] - b[0] })
.each(function (){
self.offsets.push(this[0])
self.targets.push(this[1])
})
}
, process: function (){
var scrollTop=this.$scrollElement.scrollTop() + this.options.offset
, scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight
, maxScroll=scrollHeight - this.$scrollElement.height()
, offsets=this.offsets
, targets=this.targets
, activeTarget=this.activeTarget
, i
if(scrollTop >=maxScroll){
return activeTarget!=(i=targets.last()[0])
&& this.activate(i)
}
for (i=offsets.length; i--;){
activeTarget!=targets[i]
&& scrollTop >=offsets[i]
&& (!offsets[i + 1]||scrollTop <=offsets[i + 1])
&& this.activate(targets[i])
}}
, activate: function (target){
var active
, selector
this.activeTarget=target
$(this.selector)
.parent('.active')
.removeClass('active')
selector=this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
active=$(selector)
.parent('li')
.addClass('active')
if(active.parent('.dropdown-menu').length){
active=active.closest('li.dropdown').addClass('active')
}
active.trigger('activate')
}}
var old=$.fn.scrollspy
$.fn.scrollspy=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('scrollspy')
, options=typeof option=='object'&&option
if(!data) $this.data('scrollspy', (data=new ScrollSpy(this, options)))
if(typeof option=='string') data[option]()
})
}
$.fn.scrollspy.Constructor=ScrollSpy
$.fn.scrollspy.defaults={
offset: 10
}
$.fn.scrollspy.noConflict=function (){
$.fn.scrollspy=old
return this
}
$(window).on('load', function (){
$('[data-spy="scroll"]').each(function (){
var $spy=$(this)
$spy.scrollspy($spy.data())
})
})
}(window.jQuery);
!function ($){
"use strict";
var Tab=function (element){
this.element=$(element)
}
Tab.prototype={
constructor: Tab
, show: function (){
var $this=this.element
, $ul=$this.closest('ul:not(.dropdown-menu)')
, selector=$this.attr('data-target')
, previous
, $target
, e
if(!selector){
selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/, '')
}
if($this.parent('li').hasClass('active')) return
previous=$ul.find('.active:last a')[0]
e=$.Event('show', {
relatedTarget: previous
})
$this.trigger(e)
if(e.isDefaultPrevented()) return
$target=$(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function (){
$this.trigger({
type: 'shown'
, relatedTarget: previous
})
})
}
, activate: function(element, container, callback){
var $active=container.find('> .active')
, transition=callback
&& $.support.transition
&& $active.hasClass('fade')
function next(){
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if(transition){
element[0].offsetWidth
element.addClass('in')
}else{
element.removeClass('fade')
}
if(element.parent('.dropdown-menu')){
element.closest('li.dropdown').addClass('active')
}
callback&&callback()
}
transition ?
$active.one($.support.transition.end, next) :
next()
$active.removeClass('in')
}}
var old=$.fn.tab
$.fn.tab=function(option){
return this.each(function (){
var $this=$(this)
, data=$this.data('tab')
if(!data) $this.data('tab', (data=new Tab(this)))
if(typeof option=='string') data[option]()
})
}
$.fn.tab.Constructor=Tab
$.fn.tab.noConflict=function (){
$.fn.tab=old
return this
}
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e){
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);
!function ($){
"use strict";
var Tooltip=function (element, options){
this.init('tooltip', element, options)
}
Tooltip.prototype={
constructor: Tooltip
, init: function (type, element, options){
var eventIn
, eventOut
, triggers
, trigger
, i
this.type=type
this.$element=$(element)
this.options=this.getOptions(options)
this.enabled=true
triggers=this.options.trigger.split(' ')
for (i=triggers.length; i--;){
trigger=triggers[i]
if(trigger=='click'){
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
}else if(trigger!='manual'){
eventIn=trigger=='hover' ? 'mouseenter':'focus'
eventOut=trigger=='hover' ? 'mouseleave':'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}}
this.options.selector ?
(this._options=$.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
, getOptions: function (options){
options=$.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
if(options.delay&&typeof options.delay=='number'){
options.delay={
show: options.delay
, hide: options.delay
}}
return options
}
, enter: function (e){
var defaults=$.fn[this.type].defaults
, options={}
, self
this._options&&$.each(this._options, function (key, value){
if(defaults[key]!=value) options[key]=value
}, this)
self=$(e.currentTarget)[this.type](options).data(this.type)
if(!self.options.delay||!self.options.delay.show) return self.show()
clearTimeout(this.timeout)
self.hoverState='in'
this.timeout=setTimeout(function(){
if(self.hoverState=='in') self.show()
}, self.options.delay.show)
}
, leave: function (e){
var self=$(e.currentTarget)[this.type](this._options).data(this.type)
if(this.timeout) clearTimeout(this.timeout)
if(!self.options.delay||!self.options.delay.hide) return self.hide()
self.hoverState='out'
this.timeout=setTimeout(function(){
if(self.hoverState=='out') self.hide()
}, self.options.delay.hide)
}
, show: function (){
var $tip
, pos
, actualWidth
, actualHeight
, placement
, tp
, e=$.Event('show')
if(this.hasContent()&&this.enabled){
this.$element.trigger(e)
if(e.isDefaultPrevented()) return
$tip=this.tip()
this.setContent()
if(this.options.animation){
$tip.addClass('fade')
}
placement=typeof this.options.placement=='function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
this.options.container ? $tip.appendTo(this.options.container):$tip.insertAfter(this.$element)
pos=this.getPosition()
actualWidth=$tip[0].offsetWidth
actualHeight=$tip[0].offsetHeight
switch (placement){
case 'bottom':
tp={top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'top':
tp={top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'left':
tp={top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
break
case 'right':
tp={top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
break
}
this.applyPlacement(tp, placement)
this.$element.trigger('shown')
}}
, applyPlacement: function(offset, placement){
var $tip=this.tip()
, width=$tip[0].offsetWidth
, height=$tip[0].offsetHeight
, actualWidth
, actualHeight
, delta
, replace
$tip
.offset(offset)
.addClass(placement)
.addClass('in')
actualWidth=$tip[0].offsetWidth
actualHeight=$tip[0].offsetHeight
if(placement=='top'&&actualHeight!=height){
offset.top=offset.top + height - actualHeight
replace=true
}
if(placement=='bottom'||placement=='top'){
delta=0
if(offset.left < 0){
delta=offset.left * -2
offset.left=0
$tip.offset(offset)
actualWidth=$tip[0].offsetWidth
actualHeight=$tip[0].offsetHeight
}
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
}else{
this.replaceArrow(actualHeight - height, actualHeight, 'top')
}
if(replace) $tip.offset(offset)
}
, replaceArrow: function(delta, dimension, position){
this
.arrow()
.css(position, delta ? (50 * (1 - delta / dimension) + "%"):'')
}
, setContent: function (){
var $tip=this.tip()
, title=this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html':'text'](title)
$tip.removeClass('fade in top bottom left right')
}
, hide: function (){
var that=this
, $tip=this.tip()
, e=$.Event('hide')
this.$element.trigger(e)
if(e.isDefaultPrevented()) return
$tip.removeClass('in')
function removeWithAnimation(){
var timeout=setTimeout(function (){
$tip.off($.support.transition.end).detach()
}, 500)
$tip.one($.support.transition.end, function (){
clearTimeout(timeout)
$tip.detach()
})
}
$.support.transition&&this.$tip.hasClass('fade') ?
removeWithAnimation() :
$tip.detach()
this.$element.trigger('hidden')
return this
}
, fixTitle: function (){
var $e=this.$element
if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){
$e.attr('data-original-title', $e.attr('title')||'').attr('title', '')
}}
, hasContent: function (){
return this.getTitle()
}
, getPosition: function (){
var el=this.$element[0]
return $.extend({}, (typeof el.getBoundingClientRect=='function') ? el.getBoundingClientRect():{
width: el.offsetWidth
, height: el.offsetHeight
}, this.$element.offset())
}
, getTitle: function (){
var title
, $e=this.$element
, o=this.options
title=$e.attr('data-original-title')
|| (typeof o.title=='function' ? o.title.call($e[0]):o.title)
return title
}
, tip: function (){
return this.$tip=this.$tip||$(this.options.template)
}
, arrow: function(){
return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")
}
, validate: function (){
if(!this.$element[0].parentNode){
this.hide()
this.$element=null
this.options=null
}}
, enable: function (){
this.enabled=true
}
, disable: function (){
this.enabled=false
}
, toggleEnabled: function (){
this.enabled = !this.enabled
}
, toggle: function (e){
var self=e ? $(e.currentTarget)[this.type](this._options).data(this.type):this
self.tip().hasClass('in') ? self.hide():self.show()
}
, destroy: function (){
this.hide().$element.off('.' + this.type).removeData(this.type)
}}
var old=$.fn.tooltip
$.fn.tooltip=function(option){
return this.each(function (){
var $this=$(this)
, data=$this.data('tooltip')
, options=typeof option=='object'&&option
if(!data) $this.data('tooltip', (data=new Tooltip(this, options)))
if(typeof option=='string') data[option]()
})
}
$.fn.tooltip.Constructor=Tooltip
$.fn.tooltip.defaults={
animation: true
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
, container: false
}
$.fn.tooltip.noConflict=function (){
$.fn.tooltip=old
return this
}}(window.jQuery);
!function ($){
"use strict";
var Popover=function (element, options){
this.init('popover', element, options)
}
Popover.prototype=$.extend({}, $.fn.tooltip.Constructor.prototype, {
constructor: Popover
, setContent: function (){
var $tip=this.tip()
, title=this.getTitle()
, content=this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html':'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html':'text'](content)
$tip.removeClass('fade top bottom left right in')
}
, hasContent: function (){
return this.getTitle()||this.getContent()
}
, getContent: function (){
var content
, $e=this.$element
, o=this.options
content=(typeof o.content=='function' ? o.content.call($e[0]):o.content)
|| $e.attr('data-content')
return content
}
, tip: function (){
if(!this.$tip){
this.$tip=$(this.options.template)
}
return this.$tip
}
, destroy: function (){
this.hide().$element.off('.' + this.type).removeData(this.type)
}})
var old=$.fn.popover
$.fn.popover=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('popover')
, options=typeof option=='object'&&option
if(!data) $this.data('popover', (data=new Popover(this, options)))
if(typeof option=='string') data[option]()
})
}
$.fn.popover.Constructor=Popover
$.fn.popover.defaults=$.extend({} , $.fn.tooltip.defaults, {
placement: 'right'
, trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
$.fn.popover.noConflict=function (){
$.fn.popover=old
return this
}}(window.jQuery);
!function ($){
"use strict";
var Affix=function (element, options){
this.options=$.extend({}, $.fn.affix.defaults, options)
this.$window=$(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api',  $.proxy(function (){ setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element=$(element)
this.checkPosition()
}
Affix.prototype.checkPosition=function (){
if(!this.$element.is(':visible')) return
var scrollHeight=$(document).height()
, scrollTop=this.$window.scrollTop()
, position=this.$element.offset()
, offset=this.options.offset
, offsetBottom=offset.bottom
, offsetTop=offset.top
, reset='affix affix-top affix-bottom'
, affix
if(typeof offset!='object') offsetBottom=offsetTop=offset
if(typeof offsetTop=='function') offsetTop=offset.top()
if(typeof offsetBottom=='function') offsetBottom=offset.bottom()
affix=this.unpin!=null&&(scrollTop + this.unpin <=position.top) ?
false:offsetBottom!=null&&(position.top + this.$element.height() >=scrollHeight - offsetBottom) ?
'bottom':offsetTop!=null&&scrollTop <=offsetTop ?
'top':false
if(this.affixed===affix) return
this.affixed=affix
this.unpin=affix=='bottom' ? position.top - scrollTop:null
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix:''))
}
var old=$.fn.affix
$.fn.affix=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('affix')
, options=typeof option=='object'&&option
if(!data) $this.data('affix', (data=new Affix(this, options)))
if(typeof option=='string') data[option]()
})
}
$.fn.affix.Constructor=Affix
$.fn.affix.defaults={
offset: 0
}
$.fn.affix.noConflict=function (){
$.fn.affix=old
return this
}
$(window).on('load', function (){
$('[data-spy="affix"]').each(function (){
var $spy=$(this)
, data=$spy.data()
data.offset=data.offset||{}
data.offsetBottom&&(data.offset.bottom=data.offsetBottom)
data.offsetTop&&(data.offset.top=data.offsetTop)
$spy.affix(data)
})
})
}(window.jQuery);
!function ($){
"use strict";
var dismiss='[data-dismiss="alert"]'
, Alert=function (el){
$(el).on('click', dismiss, this.close)
}
Alert.prototype.close=function (e){
var $this=$(this)
, selector=$this.attr('data-target')
, $parent
if(!selector){
selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/, '')
}
$parent=$(selector)
e&&e.preventDefault()
$parent.length||($parent=$this.hasClass('alert') ? $this:$this.parent())
$parent.trigger(e=$.Event('close'))
if(e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement(){
$parent
.trigger('closed')
.remove()
}
$.support.transition&&$parent.hasClass('fade') ?
$parent.on($.support.transition.end, removeElement) :
removeElement()
}
var old=$.fn.alert
$.fn.alert=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('alert')
if(!data) $this.data('alert', (data=new Alert(this)))
if(typeof option=='string') data[option].call($this)
})
}
$.fn.alert.Constructor=Alert
$.fn.alert.noConflict=function (){
$.fn.alert=old
return this
}
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
}(window.jQuery);
!function ($){
"use strict";
var Button=function (element, options){
this.$element=$(element)
this.options=$.extend({}, $.fn.button.defaults, options)
}
Button.prototype.setState=function (state){
var d='disabled'
, $el=this.$element
, data=$el.data()
, val=$el.is('input') ? 'val':'html'
state=state + 'Text'
data.resetText||$el.data('resetText', $el[val]())
$el[val](data[state]||this.options[state])
setTimeout(function (){
state=='loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
}, 0)
}
Button.prototype.toggle=function (){
var $parent=this.$element.closest('[data-toggle="buttons-radio"]')
$parent&&$parent
.find('.active')
.removeClass('active')
this.$element.toggleClass('active')
}
var old=$.fn.button
$.fn.button=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('button')
, options=typeof option=='object'&&option
if(!data) $this.data('button', (data=new Button(this, options)))
if(option=='toggle') data.toggle()
else if(option) data.setState(option)
})
}
$.fn.button.defaults={
loadingText: 'loading...'
}
$.fn.button.Constructor=Button
$.fn.button.noConflict=function (){
$.fn.button=old
return this
}
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e){
var $btn=$(e.target)
if(!$btn.hasClass('btn')) $btn=$btn.closest('.btn')
$btn.button('toggle')
})
}(window.jQuery);
!function ($){
"use strict";
var Collapse=function (element, options){
this.$element=$(element)
this.options=$.extend({}, $.fn.collapse.defaults, options)
if(this.options.parent){
this.$parent=$(this.options.parent)
}
this.options.toggle&&this.toggle()
}
Collapse.prototype={
constructor: Collapse
, dimension: function (){
var hasWidth=this.$element.hasClass('width')
return hasWidth ? 'width':'height'
}
, show: function (){
var dimension
, scroll
, actives
, hasData
if(this.transitioning||this.$element.hasClass('in')) return
dimension=this.dimension()
scroll=$.camelCase(['scroll', dimension].join('-'))
actives=this.$parent&&this.$parent.find('> .accordion-group > .in')
if(actives&&actives.length){
hasData=actives.data('collapse')
if(hasData&&hasData.transitioning) return
actives.collapse('hide')
hasData||actives.data('collapse', null)
}
this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown')
$.support.transition&&this.$element[dimension](this.$element[0][scroll])
}
, hide: function (){
var dimension
if(this.transitioning||!this.$element.hasClass('in')) return
dimension=this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', $.Event('hide'), 'hidden')
this.$element[dimension](0)
}
, reset: function (size){
var dimension=this.dimension()
this.$element
.removeClass('collapse')
[dimension](size||'auto')
[0].offsetWidth
this.$element[size!==null ? 'addClass':'removeClass']('collapse')
return this
}
, transition: function (method, startEvent, completeEvent){
var that=this
, complete=function (){
if(startEvent.type=='show') that.reset()
that.transitioning=0
that.$element.trigger(completeEvent)
}
this.$element.trigger(startEvent)
if(startEvent.isDefaultPrevented()) return
this.transitioning=1
this.$element[method]('in')
$.support.transition&&this.$element.hasClass('collapse') ?
this.$element.one($.support.transition.end, complete) :
complete()
}
, toggle: function (){
this[this.$element.hasClass('in') ? 'hide':'show']()
}}
var old=$.fn.collapse
$.fn.collapse=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('collapse')
, options=$.extend({}, $.fn.collapse.defaults, $this.data(), typeof option=='object'&&option)
if(!data) $this.data('collapse', (data=new Collapse(this, options)))
if(typeof option=='string') data[option]()
})
}
$.fn.collapse.defaults={
toggle: true
}
$.fn.collapse.Constructor=Collapse
$.fn.collapse.noConflict=function (){
$.fn.collapse=old
return this
}
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e){
var $this=$(this), href
, target=$this.attr('data-target')
|| e.preventDefault()
|| (href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, '')
, option=$(target).data('collapse') ? 'toggle':$this.data()
$this[$(target).hasClass('in') ? 'addClass':'removeClass']('collapsed')
$(target).collapse(option)
})
}(window.jQuery);
!function ($){
"use strict";
var Carousel=function (element, options){
this.$element=$(element)
this.$indicators=this.$element.find('.carousel-indicators')
this.options=options
this.options.pause=='hover'&&this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.prototype={
cycle: function (e){
if(!e) this.paused=false
if(this.interval) clearInterval(this.interval);
this.options.interval
&& !this.paused
&& (this.interval=setInterval($.proxy(this.next, this), this.options.interval))
return this
}
, getActiveIndex: function (){
this.$active=this.$element.find('.item.active')
this.$items=this.$active.parent().children()
return this.$items.index(this.$active)
}
, to: function (pos){
var activeIndex=this.getActiveIndex()
, that=this
if(pos > (this.$items.length - 1)||pos < 0) return
if(this.sliding){
return this.$element.one('slid', function (){
that.to(pos)
})
}
if(activeIndex==pos){
return this.pause().cycle()
}
return this.slide(pos > activeIndex ? 'next':'prev', $(this.$items[pos]))
}
, pause: function (e){
if(!e) this.paused=true
if(this.$element.find('.next, .prev').length&&$.support.transition.end){
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
clearInterval(this.interval)
this.interval=null
return this
}
, next: function (){
if(this.sliding) return
return this.slide('next')
}
, prev: function (){
if(this.sliding) return
return this.slide('prev')
}
, slide: function (type, next){
var $active=this.$element.find('.item.active')
, $next=next||$active[type]()
, isCycling=this.interval
, direction=type=='next' ? 'left':'right'
, fallback=type=='next' ? 'first':'last'
, that=this
, e
this.sliding=true
isCycling&&this.pause()
$next=$next.length ? $next:this.$element.find('.item')[fallback]()
e=$.Event('slide', {
relatedTarget: $next[0]
, direction: direction
})
if($next.hasClass('active')) return
if(this.$indicators.length){
this.$indicators.find('.active').removeClass('active')
this.$element.one('slid', function (){
var $nextIndicator=$(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator&&$nextIndicator.addClass('active')
})
}
if($.support.transition&&this.$element.hasClass('slide')){
this.$element.trigger(e)
if(e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth
$active.addClass(direction)
$next.addClass(direction)
this.$element.one($.support.transition.end, function (){
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding=false
setTimeout(function (){ that.$element.trigger('slid') }, 0)
})
}else{
this.$element.trigger(e)
if(e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding=false
this.$element.trigger('slid')
}
isCycling&&this.cycle()
return this
}}
var old=$.fn.carousel
$.fn.carousel=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('carousel')
, options=$.extend({}, $.fn.carousel.defaults, typeof option=='object'&&option)
, action=typeof option=='string' ? option:options.slide
if(!data) $this.data('carousel', (data=new Carousel(this, options)))
if(typeof option=='number') data.to(option)
else if(action) data[action]()
else if(options.interval) data.pause().cycle()
})
}
$.fn.carousel.defaults={
interval: 5000
, pause: 'hover'
}
$.fn.carousel.Constructor=Carousel
$.fn.carousel.noConflict=function (){
$.fn.carousel=old
return this
}
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e){
var $this=$(this), href
, $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, ''))
, options=$.extend({}, $target.data(), $this.data())
, slideIndex
$target.carousel(options)
if(slideIndex=$this.attr('data-slide-to')){
$target.data('carousel').pause().to(slideIndex).cycle()
}
e.preventDefault()
})
}(window.jQuery);
!function($){
"use strict";
var Typeahead=function (element, options){
this.$element=$(element)
this.options=$.extend({}, $.fn.typeahead.defaults, options)
this.matcher=this.options.matcher||this.matcher
this.sorter=this.options.sorter||this.sorter
this.highlighter=this.options.highlighter||this.highlighter
this.updater=this.options.updater||this.updater
this.source=this.options.source
this.$menu=$(this.options.menu)
this.shown=false
this.listen()
}
Typeahead.prototype={
constructor: Typeahead
, select: function (){
var val=this.$menu.find('.active').attr('data-value')
this.$element
.val(this.updater(val))
.change()
return this.hide()
}
, updater: function (item){
return item
}
, show: function (){
var pos=$.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})
this.$menu
.insertAfter(this.$element)
.css({
top: pos.top + pos.height
, left: pos.left
})
.show()
this.shown=true
return this
}
, hide: function (){
this.$menu.hide()
this.shown=false
return this
}
, lookup: function (event){
var items
this.query=this.$element.val()
if(!this.query||this.query.length < this.options.minLength){
return this.shown ? this.hide():this
}
items=$.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)):this.source
return items ? this.process(items):this
}
, process: function (items){
var that=this
items=$.grep(items, function (item){
return that.matcher(item)
})
items=this.sorter(items)
if(!items.length){
return this.shown ? this.hide():this
}
return this.render(items.slice(0, this.options.items)).show()
}
, matcher: function (item){
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
}
, sorter: function (items){
var beginswith=[]
, caseSensitive=[]
, caseInsensitive=[]
, item
while (item=items.shift()){
if(!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
else if(~item.indexOf(this.query)) caseSensitive.push(item)
else caseInsensitive.push(item)
}
return beginswith.concat(caseSensitive, caseInsensitive)
}
, highlighter: function (item){
var query=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match){
return '<strong>' + match + '</strong>'
})
}
, render: function (items){
var that=this
items=$(items).map(function (i, item){
i=$(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})
items.first().addClass('active')
this.$menu.html(items)
return this
}
, next: function (event){
var active=this.$menu.find('.active').removeClass('active')
, next=active.next()
if(!next.length){
next=$(this.$menu.find('li')[0])
}
next.addClass('active')
}
, prev: function (event){
var active=this.$menu.find('.active').removeClass('active')
, prev=active.prev()
if(!prev.length){
prev=this.$menu.find('li').last()
}
prev.addClass('active')
}
, listen: function (){
this.$element
.on('focus',    $.proxy(this.focus, this))
.on('blur',     $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
.on('keyup',    $.proxy(this.keyup, this))
if(this.eventSupported('keydown')){
this.$element.on('keydown', $.proxy(this.keydown, this))
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
}
, eventSupported: function(eventName){
var isSupported=eventName in this.$element
if(!isSupported){
this.$element.setAttribute(eventName, 'return;')
isSupported=typeof this.$element[eventName]==='function'
}
return isSupported
}
, move: function (e){
if(!this.shown) return
switch(e.keyCode){
case 9:
case 13:
case 27:
e.preventDefault()
break
case 38:
e.preventDefault()
this.prev()
break
case 40:
e.preventDefault()
this.next()
break
}
e.stopPropagation()
}
, keydown: function (e){
this.suppressKeyPressRepeat=~$.inArray(e.keyCode, [40,38,9,13,27])
this.move(e)
}
, keypress: function (e){
if(this.suppressKeyPressRepeat) return
this.move(e)
}
, keyup: function (e){
switch(e.keyCode){
case 40:
case 38:
case 16:
case 17:
case 18:
break
case 9:
case 13:
if(!this.shown) return
this.select()
break
case 27:
if(!this.shown) return
this.hide()
break
default:
this.lookup()
}
e.stopPropagation()
e.preventDefault()
}
, focus: function (e){
this.focused=true
}
, blur: function (e){
this.focused=false
if(!this.mousedover&&this.shown) this.hide()
}
, click: function (e){
e.stopPropagation()
e.preventDefault()
this.select()
this.$element.focus()
}
, mouseenter: function (e){
this.mousedover=true
this.$menu.find('.active').removeClass('active')
$(e.currentTarget).addClass('active')
}
, mouseleave: function (e){
this.mousedover=false
if(!this.focused&&this.shown) this.hide()
}}
var old=$.fn.typeahead
$.fn.typeahead=function (option){
return this.each(function (){
var $this=$(this)
, data=$this.data('typeahead')
, options=typeof option=='object'&&option
if(!data) $this.data('typeahead', (data=new Typeahead(this, options)))
if(typeof option=='string') data[option]()
})
}
$.fn.typeahead.defaults={
source: []
, items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
, minLength: 1
}
$.fn.typeahead.Constructor=Typeahead
$.fn.typeahead.noConflict=function (){
$.fn.typeahead=old
return this
}
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e){
var $this=$(this)
if($this.data('typeahead')) return
$this.typeahead($this.data())
})
}(window.jQuery);
window.Modernizr=(function(window, document, undefined){
var version='2.6.2',
Modernizr={},
enableClasses=true,
docElement=document.documentElement,
mod='modernizr',
modElem=document.createElement(mod),
mStyle=modElem.style,
inputElem =document.createElement('input')  ,
smile=':)',
toString={}.toString,
prefixes=' -webkit- -moz- -o- -ms- '.split(' '),
omPrefixes='Webkit Moz O ms',
cssomPrefixes=omPrefixes.split(' '),
domPrefixes=omPrefixes.toLowerCase().split(' '),
ns={'svg': 'http://www.w3.org/2000/svg'},
tests={},
inputs={},
attrs={},
classes=[],
slice=classes.slice,
featureName,
injectElementWithStyles=function(rule, callback, nodes, testnames){
var style, ret, node, docOverflow,
div=document.createElement('div'),
body=document.body,
fakeBody=body||document.createElement('body');
if(parseInt(nodes, 10)){
while(nodes--){
node=document.createElement('div');
node.id=testnames ? testnames[nodes]:mod + (nodes + 1);
div.appendChild(node);
}}
style=['&#173;','<style id="s', mod, '">', rule, '</style>'].join('');
div.id=mod;
(body ? div:fakeBody).innerHTML +=style;
fakeBody.appendChild(div);
if(!body){
fakeBody.style.background='';
fakeBody.style.overflow='hidden';
docOverflow=docElement.style.overflow;
docElement.style.overflow='hidden';
docElement.appendChild(fakeBody);
}
ret=callback(div, rule);
if(!body){
fakeBody.parentNode.removeChild(fakeBody);
docElement.style.overflow=docOverflow;
}else{
div.parentNode.removeChild(div);
}
return !!ret;
},
testMediaQuery=function(mq){
var matchMedia=window.matchMedia||window.msMatchMedia;
if(matchMedia){
return matchMedia(mq).matches;
}
var bool;
injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; }}', function(node){
bool=(window.getComputedStyle ?
getComputedStyle(node, null) :
node.currentStyle)['position']=='absolute';
});
return bool;
},
isEventSupported=(function(){
var TAGNAMES={
'select': 'input', 'change': 'input',
'submit': 'form', 'reset': 'form',
'error': 'img', 'load': 'img', 'abort': 'img'
};
function isEventSupported(eventName, element){
element=element||document.createElement(TAGNAMES[eventName]||'div');
eventName='on' + eventName;
var isSupported=eventName in element;
if(!isSupported){
if(!element.setAttribute){
element=document.createElement('div');
}
if(element.setAttribute&&element.removeAttribute){
element.setAttribute(eventName, '');
isSupported=is(element[eventName], 'function');
if(!is(element[eventName], 'undefined')){
element[eventName]=undefined;
}
element.removeAttribute(eventName);
}}
element=null;
return isSupported;
}
return isEventSupported;
})(),
_hasOwnProperty=({}).hasOwnProperty, hasOwnProp;
if(!is(_hasOwnProperty, 'undefined')&&!is(_hasOwnProperty.call, 'undefined')){
hasOwnProp=function (object, property){
return _hasOwnProperty.call(object, property);
};}else{
hasOwnProp=function (object, property){ 
return ((property in object)&&is(object.constructor.prototype[property], 'undefined'));
};}
if(!Function.prototype.bind){
Function.prototype.bind=function bind(that){
var target=this;
if(typeof target!="function"){
throw new TypeError();
}
var args=slice.call(arguments, 1),
bound=function (){
if(this instanceof bound){
var F=function(){};
F.prototype=target.prototype;
var self=new F();
var result=target.apply(self,
args.concat(slice.call(arguments))
);
if(Object(result)===result){
return result;
}
return self;
}else{
return target.apply(that,
args.concat(slice.call(arguments))
);
}};
return bound;
};}
function setCss(str){
mStyle.cssText=str;
}
function setCssAll(str1, str2){
return setCss(prefixes.join(str1 + ';') +(str2||''));
}
function is(obj, type){
return typeof obj===type;
}
function contains(str, substr){
return !!~('' + str).indexOf(substr);
}
function testProps(props, prefixed){
for(var i in props){
var prop=props[i];
if(!contains(prop, "-")&&mStyle[prop]!==undefined){
return prefixed=='pfx' ? prop:true;
}}
return false;
}
function testDOMProps(props, obj, elem){
for(var i in props){
var item=obj[props[i]];
if(item!==undefined){
if(elem===false) return props[i];
if(is(item, 'function')){
return item.bind(elem||obj);
}
return item;
}}
return false;
}
function testPropsAll(prop, prefixed, elem){
var ucProp=prop.charAt(0).toUpperCase() + prop.slice(1),
props=(prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
if(is(prefixed, "string")||is(prefixed, "undefined")){
return testProps(props, prefixed);
}else{
props=(prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
return testDOMProps(props, prefixed, elem);
}}
tests['flexbox']=function(){
return testPropsAll('flexWrap');
};
tests['flexboxlegacy']=function(){
return testPropsAll('boxDirection');
};
tests['canvas']=function(){
var elem=document.createElement('canvas');
return !!(elem.getContext&&elem.getContext('2d'));
};
tests['canvastext']=function(){
return !!(Modernizr['canvas']&&is(document.createElement('canvas').getContext('2d').fillText, 'function'));
};
tests['webgl']=function(){
return !!window.WebGLRenderingContext;
};
tests['touch']=function(){
var bool;
if(('ontouchstart' in window)||window.DocumentTouch&&document instanceof DocumentTouch){
bool=true;
}else{
injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function(node){
bool=node.offsetTop===9;
});
}
return bool;
};
tests['geolocation']=function(){
return 'geolocation' in navigator;
};
tests['postmessage']=function(){
return !!window.postMessage;
};
tests['websqldatabase']=function(){
return !!window.openDatabase;
};
tests['indexedDB']=function(){
return !!testPropsAll("indexedDB", window);
};
tests['hashchange']=function(){
return isEventSupported('hashchange', window)&&(document.documentMode===undefined||document.documentMode > 7);
};
tests['history']=function(){
return !!(window.history&&history.pushState);
};
tests['draganddrop']=function(){
var div=document.createElement('div');
return ('draggable' in div)||('ondragstart' in div&&'ondrop' in div);
};
tests['websockets']=function(){
return 'WebSocket' in window||'MozWebSocket' in window;
};
tests['rgba']=function(){
setCss('background-color:rgba(150,255,150,.5)');
return contains(mStyle.backgroundColor, 'rgba');
};
tests['hsla']=function(){
setCss('background-color:hsla(120,40%,100%,.5)');
return contains(mStyle.backgroundColor, 'rgba')||contains(mStyle.backgroundColor, 'hsla');
};
tests['multiplebgs']=function(){
setCss('background:url(https://),url(https://),red url(https://)');
return (/(url\s*\(.*?){3}/).test(mStyle.background);
};
tests['backgroundsize']=function(){
return testPropsAll('backgroundSize');
};
tests['borderimage']=function(){
return testPropsAll('borderImage');
};
tests['borderradius']=function(){
return testPropsAll('borderRadius');
};
tests['boxshadow']=function(){
return testPropsAll('boxShadow');
};
tests['textshadow']=function(){
return document.createElement('div').style.textShadow==='';
};
tests['opacity']=function(){
setCssAll('opacity:.55');
return (/^0.55$/).test(mStyle.opacity);
};
tests['cssanimations']=function(){
return testPropsAll('animationName');
};
tests['csscolumns']=function(){
return testPropsAll('columnCount');
};
tests['cssgradients']=function(){
var str1='background-image:',
str2='gradient(linear,left top,right bottom,from(#9f9),to(white));',
str3='linear-gradient(left top,#9f9, white);';
setCss(
(str1 + '-webkit- '.split(' ').join(str2 + str1) +
prefixes.join(str3 + str1)).slice(0, -str1.length)
);
return contains(mStyle.backgroundImage, 'gradient');
};
tests['cssreflections']=function(){
return testPropsAll('boxReflect');
};
tests['csstransforms']=function(){
return !!testPropsAll('transform');
};
tests['csstransforms3d']=function(){
var ret = !!testPropsAll('perspective');
if(ret&&'webkitPerspective' in docElement.style){
injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function(node, rule){
ret=node.offsetLeft===9&&node.offsetHeight===3;
});
}
return ret;
};
tests['csstransitions']=function(){
return testPropsAll('transition');
};
tests['fontface']=function(){
var bool;
injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule){
var style=document.getElementById('smodernizr'),
sheet=style.sheet||style.styleSheet,
cssText=sheet ? (sheet.cssRules&&sheet.cssRules[0] ? sheet.cssRules[0].cssText:sheet.cssText||''):'';
bool=/src/i.test(cssText)&&cssText.indexOf(rule.split(' ')[0])===0;
});
return bool;
};
tests['generatedcontent']=function(){
var bool;
injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function(node){
bool=node.offsetHeight >=3;
});
return bool;
};
tests['video']=function(){
var elem=document.createElement('video'),
bool=false;
try {
if(bool = !!elem.canPlayType){
bool=new Boolean(bool);
bool.ogg=elem.canPlayType('video/ogg; codecs="theora"')      .replace(/^no$/,'');
bool.h264=elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
bool.webm=elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
}} catch(e){ }
return bool;
};
tests['audio']=function(){
var elem=document.createElement('audio'),
bool=false;
try {
if(bool = !!elem.canPlayType){
bool=new Boolean(bool);
bool.ogg=elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
bool.mp3=elem.canPlayType('audio/mpeg;')               .replace(/^no$/,'');
bool.wav=elem.canPlayType('audio/wav; codecs="1"')     .replace(/^no$/,'');
bool.m4a=(elem.canPlayType('audio/x-m4a;')            ||
elem.canPlayType('audio/aac;'))             .replace(/^no$/,'');
}} catch(e){ }
return bool;
};
tests['localstorage']=function(){
try {
localStorage.setItem(mod, mod);
localStorage.removeItem(mod);
return true;
} catch(e){
return false;
}};
tests['sessionstorage']=function(){
try {
sessionStorage.setItem(mod, mod);
sessionStorage.removeItem(mod);
return true;
} catch(e){
return false;
}};
tests['webworkers']=function(){
return !!window.Worker;
};
tests['applicationcache']=function(){
return !!window.applicationCache;
};
tests['svg']=function(){
return !!document.createElementNS&&!!document.createElementNS(ns.svg, 'svg').createSVGRect;
};
tests['inlinesvg']=function(){
var div=document.createElement('div');
div.innerHTML='<svg/>';
return (div.firstChild&&div.firstChild.namespaceURI)==ns.svg;
};
tests['smil']=function(){
return !!document.createElementNS&&/SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
};
tests['svgclippaths']=function(){
return !!document.createElementNS&&/SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
};
function webforms(){
Modernizr['input']=(function(props){
for(var i=0, len=props.length; i < len; i++){
attrs[ props[i] ] = !!(props[i] in inputElem);
}
if(attrs.list){
attrs.list = !!(document.createElement('datalist')&&window.HTMLDataListElement);
}
return attrs;
})('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
Modernizr['inputtypes']=(function(props){
for(var i=0, bool, inputElemType, defaultView, len=props.length; i < len; i++){
inputElem.setAttribute('type', inputElemType=props[i]);
bool=inputElem.type!=='text';
if(bool){
inputElem.value=smile;
inputElem.style.cssText='position:absolute;visibility:hidden;';
if(/^range$/.test(inputElemType)&&inputElem.style.WebkitAppearance!==undefined){
docElement.appendChild(inputElem);
defaultView=document.defaultView;
bool=defaultView.getComputedStyle &&
defaultView.getComputedStyle(inputElem, null).WebkitAppearance!=='textfield' &&
(inputElem.offsetHeight!==0);
docElement.removeChild(inputElem);
}else if(/^(search|tel)$/.test(inputElemType)){
}else if(/^(url|email)$/.test(inputElemType)){
bool=inputElem.checkValidity&&inputElem.checkValidity()===false;
}else{
bool=inputElem.value!=smile;
}}
inputs[ props[i] ] = !!bool;
}
return inputs;
})('search tel url email datetime date month week time datetime-local number range color'.split(' '));
}
for(var feature in tests){
if(hasOwnProp(tests, feature)){
featureName=feature.toLowerCase();
Modernizr[featureName]=tests[feature]();
classes.push((Modernizr[featureName] ? '':'no-') + featureName);
}}
Modernizr.input||webforms();
Modernizr.addTest=function(feature, test){
if(typeof feature=='object'){
for(var key in feature){
if(hasOwnProp(feature, key)){
Modernizr.addTest(key, feature[ key ]);
}}
}else{
feature=feature.toLowerCase();
if(Modernizr[feature]!==undefined){
return Modernizr;
}
test=typeof test=='function' ? test():test;
if(typeof enableClasses!=="undefined"&&enableClasses){
docElement.className +=' ' + (test ? '':'no-') + feature;
}
Modernizr[feature]=test;
}
return Modernizr;
};
setCss('');
modElem=inputElem=null;
;(function(window, document){
var options=window.html5||{};
var reSkip=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
var saveClones=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
var supportsHtml5Styles;
var expando='_html5shiv';
var expanID=0;
var expandoData={};
var supportsUnknownElements;
(function(){
try {
var a=document.createElement('a');
a.innerHTML='<xyz></xyz>';
supportsHtml5Styles=('hidden' in a);
supportsUnknownElements=a.childNodes.length==1||(function(){
(document.createElement)('a');
var frag=document.createDocumentFragment();
return (
typeof frag.cloneNode=='undefined' ||
typeof frag.createDocumentFragment=='undefined' ||
typeof frag.createElement=='undefined'
);
}());
} catch(e){
supportsHtml5Styles=true;
supportsUnknownElements=true;
}}());
function addStyleSheet(ownerDocument, cssText){
var p=ownerDocument.createElement('p'),
parent=ownerDocument.getElementsByTagName('head')[0]||ownerDocument.documentElement;
p.innerHTML='x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
function getElements(){
var elements=html5.elements;
return typeof elements=='string' ? elements.split(' '):elements;
}
function getExpandoData(ownerDocument){
var data=expandoData[ownerDocument[expando]];
if(!data){
data={};
expanID++;
ownerDocument[expando]=expanID;
expandoData[expanID]=data;
}
return data;
}
function createElement(nodeName, ownerDocument, data){
if(!ownerDocument){
ownerDocument=document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if(!data){
data=getExpandoData(ownerDocument);
}
var node;
if(data.cache[nodeName]){
node=data.cache[nodeName].cloneNode();
}else if(saveClones.test(nodeName)){
node=(data.cache[nodeName]=data.createElem(nodeName)).cloneNode();
}else{
node=data.createElem(nodeName);
}
return node.canHaveChildren&&!reSkip.test(nodeName) ? data.frag.appendChild(node):node;
}
function createDocumentFragment(ownerDocument, data){
if(!ownerDocument){
ownerDocument=document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data=data||getExpandoData(ownerDocument);
var clone=data.frag.cloneNode(),
i=0,
elems=getElements(),
l=elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
function shivMethods(ownerDocument, data){
if(!data.cache){
data.cache={};
data.createElem=ownerDocument.createElement;
data.createFrag=ownerDocument.createDocumentFragment;
data.frag=data.createFrag();
}
ownerDocument.createElement=function(nodeName){
if(!html5.shivMethods){
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment=Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
getElements().join().replace(/\w+/g, function(nodeName){
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
function shivDocument(ownerDocument){
if(!ownerDocument){
ownerDocument=document;
}
var data=getExpandoData(ownerDocument);
if(html5.shivCSS&&!supportsHtml5Styles&&!data.hasCSS){
data.hasCSS = !!addStyleSheet(ownerDocument,
'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
'mark{background:#FF0;color:#000}'
);
}
if(!supportsUnknownElements){
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
var html5={
'elements': options.elements||'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
'shivCSS': (options.shivCSS!==false),
'supportsUnknownElements': supportsUnknownElements,
'shivMethods': (options.shivMethods!==false),
'type': 'default',
'shivDocument': shivDocument,
createElement: createElement,
createDocumentFragment: createDocumentFragment
};
window.html5=html5;
shivDocument(document);
}(this, document));
Modernizr._version=version;
Modernizr._prefixes=prefixes;
Modernizr._domPrefixes=domPrefixes;
Modernizr._cssomPrefixes=cssomPrefixes;
Modernizr.mq=testMediaQuery;
Modernizr.hasEvent=isEventSupported;
Modernizr.testProp=function(prop){
return testProps([prop]);
};
Modernizr.testAllProps=testPropsAll;
Modernizr.testStyles=injectElementWithStyles;
Modernizr.prefixed=function(prop, obj, elem){
if(!obj){
return testPropsAll(prop, 'pfx');
}else{
return testPropsAll(prop, obj, elem);
}};
docElement.className=docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
(enableClasses ? ' js ' + classes.join(' '):'');
return Modernizr;
})(this, this.document);
!function(a,b,c){a.fn.scrollUp=function(b){a.data(c.body,"scrollUp")||(a.data(c.body,"scrollUp",!0),a.fn.scrollUp.init(b))},a.fn.scrollUp.init=function(d){var e,f=a.fn.scrollUp.settings=a.extend({},a.fn.scrollUp.defaults,d);e=f.scrollTrigger?a(f.scrollTrigger):a("<a/>",{id:f.scrollName,href:"#top"}),f.scrollTitle&&e.attr("title",f.scrollTitle),e.appendTo("body"),f.scrollImg||f.scrollTrigger||e.html(f.scrollText),e.css({display:"none",position:"fixed",zIndex:f.zIndex}),f.activeOverlay&&a("<div/>",{id:f.scrollName+"-active"}).css({position:"absolute",top:f.scrollDistance+"px",width:"100%",borderTop:"1px dotted"+f.activeOverlay,zIndex:f.zIndex}).appendTo("body");var g,h,i,j;switch(f.animation){case"fade":g="fadeIn",h="fadeOut",i=f.animationSpeed;break;case"slide":g="slideDown",h="slideUp",i=f.animationSpeed;break;default:g="show",h="hide",i=0}j="top"===f.scrollFrom?f.scrollDistance:a(c).height()-a(b).height()-f.scrollDistance;var k=!1;scrollEvent=a(b).scroll(function(){a(b).scrollTop()>j?k||(e[g](i),k=!0):k&&(e[h](i),k=!1)});var l;f.scrollTarget?"number"==typeof f.scrollTarget?l=f.scrollTarget:"string"==typeof f.scrollTarget&&(l=Math.floor(a(f.scrollTarget).offset().top)):l=0,e.click(function(b){b.preventDefault(),a("html, body").animate({scrollTop:l},f.scrollSpeed,f.easingType)})},a.fn.scrollUp.defaults={scrollName:"scrollUp",scrollDistance:300,scrollFrom:"top",scrollSpeed:300,easingType:"linear",animation:"fade",animationSpeed:200,scrollTrigger:!1,scrollTarget:!1,scrollText:"Scroll to top",scrollTitle:!1,scrollImg:!1,activeOverlay:!1,zIndex:2147483647},a.fn.scrollUp.destroy=function(d){a.removeData(c.body,"scrollUp"),a("#"+a.fn.scrollUp.settings.scrollName).remove(),a("#"+a.fn.scrollUp.settings.scrollName+"-active").remove(),a.fn.jquery.split(".")[1]>=7?a(b).off("scroll",d):a(b).unbind("scroll",d)},a.scrollUp=a.fn.scrollUp}(jQuery,window,document);
!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);