From 44b1ecdc44fb0652e1d2fca49a8a1f3996bdd24c Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Wed, 29 May 2013 11:00:51 -0400 Subject: [PATCH] performance improvements to dropdown --- build/minified/modules/dropdown.js | 3 ++- build/minified/modules/dropdown.min.js | 2 +- build/packaged/modules/dropdown.js | 3 ++- build/packaged/semantic.min.js | 4 ++-- build/uncompressed/modules/dropdown.js | 3 ++- node/src/files/components/semantic/modules/dropdown.js | 3 ++- src/modules/dropdown.js | 3 ++- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/build/minified/modules/dropdown.js b/build/minified/modules/dropdown.js index c5405037d..36b67483e 100644 --- a/build/minified/modules/dropdown.js +++ b/build/minified/modules/dropdown.js @@ -115,7 +115,7 @@ $.fn.dropdown = function(parameters) { item: { - click: function () { + click: function (event) { var $choice = $(this), text = $choice.data(metadata.text) || $choice.text(), @@ -130,6 +130,7 @@ $.fn.dropdown = function(parameters) { ; module.action.determine(text, value); $.proxy(settings.onChange, $menu.get())(text, value); + event.stopPropagation(); } } diff --git a/build/minified/modules/dropdown.min.js b/build/minified/modules/dropdown.min.js index 898310a5a..da7eefb5f 100644 --- a/build/minified/modules/dropdown.min.js +++ b/build/minified/modules/dropdown.min.js @@ -1 +1 @@ -(function(e,t,n,o){e.fn.dropdown=function(t){var i,a=e(this),s=e(n),r=e.extend(!0,{},e.fn.dropdown.settings,t),c="."+r.namespace,l="module-"+r.namespace,u=(a.selector||"",(new Date).getTime()),d=[],m=arguments[0],f="string"==typeof m,g=[].slice.call(arguments,1);return a.each(function(){var t,p=e(this),h=e(this).find(r.selector.menu),v=e(this).find(r.selector.item),b=e(this).find(r.selector.text),y=e(this).find(r.selector.input),x="ontouchstart"in n.documentElement,C=p.selector||"",w=this,T=p.data("module-"+r.namespace),k=r.className,N=r.metadata,z=r.namespace,P=r.animation,E=r.errors;t={initialize:function(){t.verbose("Initializing dropdown with bound events",p),x?p.on("touchstart"+c,t.event.test.toggle):"click"==r.on?p.on("click"+c,t.event.test.toggle):"hover"==r.on?p.on("mouseenter"+c,t.show).on("mouseleave"+c,t.delayedHide):p.on(r.on+c,t.toggle),"form"==r.action&&t.set.selected(),v.on(t.get.selectEvent()+c,t.event.item.click),p.data(l,t)},destroy:function(){t.verbose("Destroying previous module for",p),p.off(z)},event:{stopPropagation:function(e){e.stopPropagation()},test:{toggle:function(e){t.intent.test(e,t.toggle),e.stopPropagation()},hide:function(e){t.intent.test(e,t.hide),e.stopPropagation()}},item:{click:function(){var n=e(this),o=n.data(N.text)||n.text(),i=n.data(N.value)||o;t.verbose("Adding active state to selected item"),v.removeClass(k.active),n.addClass(k.active),t.action.determine(o,i),e.proxy(r.onChange,h.get())(o,i)}}},intent:{test:function(n,o){t.debug("Determining whether event occurred in dropdown",n.target),o=o||function(){},0===e(n.target).closest(h).size()?(t.verbose("Triggering event",o),o()):t.verbose("Event occurred in dropdown, canceling callback")},bind:function(){t.verbose("Binding hide intent event to document"),s.on(t.get.selectEvent(),t.event.test.hide)},unbind:function(){t.verbose("Removing hide intent event from document"),s.off(t.get.selectEvent())}},action:{determine:function(n,o){e.isFunction(t.action[r.action])?(t.verbose("Triggering preset action",r.action),t.action[r.action](n,o)):e.isFunction(r.action)?(t.verbose("Triggering user action",r.action),r.action(n,o)):t.error(E.action)},nothing:function(){},hide:function(){t.hide()},changeText:function(e){t.set.text(e),t.hide()},form:function(e,n){t.set.text(e),t.set.value(n),t.hide()}},get:{selectEvent:function(){return x?"touchstart":"click"},text:function(){return b.text()},value:function(){return y.val()},item:function(t){var n;return t=t||y.val(),v.each(function(){e(this).data(N.value)==t&&(n=e(this))}),n||!1}},set:{text:function(e){t.debug("Changing text",e),b.text(e)},value:function(e){t.debug("Adding selected value to hidden input",e),y.val(e)},selected:function(e){var n,o=(e||y.val(),t.get.item(e));o&&(t.debug("Setting selected menu item to",o),n=o.data(N.text)||o.text(),v.removeClass(k.active),o.addClass(k.active),t.set.text(n))}},is:{visible:function(){return h.is(":visible")},hidden:function(){return h.is(":not(:visible)")}},can:{click:function(){return x||"click"==r.on},show:function(){return!p.hasClass(k.disabled)}},animate:{show:function(){t.verbose("Doing menu showing animation"),"show"==P.show?h.show():"slide"==P.show&&h.clearQueue().children().clearQueue().css("opacity",0).delay(100).animate({opacity:1},300,"easeOutQuad").end().slideDown(200,"easeOutQuad")},hide:function(){t.verbose("Doing menu hiding animation"),"hide"==P.hide?h.hide():"slide"==P.hide&&h.clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},300,"easeOutQuad").end().delay(100).slideUp(200,"easeOutQuad")}},show:function(){clearTimeout(t.graceTimer),t.is.visible()||(t.debug("Showing dropdown"),p.addClass(k.visible),t.animate.show(),t.can.click()&&t.intent.bind(),e.proxy(r.onShow,h.get())())},delayedHide:function(){t.verbose("User moused away setting timer to hide dropdown"),t.graceTimer=setTimeout(t.hide,r.gracePeriod)},hide:function(){t.is.hidden()||(t.debug("Hiding dropdown"),p.removeClass(k.visible),t.can.click()&&t.intent.unbind(),t.animate.hide(),e.proxy(r.onHide,h.get())())},toggle:function(){t.verbose("Toggling menu visibility"),t.can.show()?t.show():t.hide()},setting:function(t,n){return n===o?r[t]:(e.isPlainObject(t)?e.extend(!0,r,t):r[t]=n,o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?e.extend(!0,t,n):t[n]=i,o)},debug:function(){r.debug&&(r.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},verbose:function(){r.verbose&&r.debug&&(r.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,r.moduleName+":")},performance:{log:function(e){var n,o,i;r.performance&&(n=(new Date).getTime(),i=u||n,o=n-i,u=n,d.push({Element:w,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=r.moduleName,n=(r.moduleName+": "+C+"("+a.size()+" elements)",0);C&&(t+=" Performance ("+C+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(n,i,a){var s,r;return i=i||g,a=w||a,"string"==typeof n&&T!==o&&(n=n.split("."),s=n.length-1,e.each(n,function(n,i){return e.isPlainObject(T[i])&&n!=s?(T=T[i],!0):T[i]!==o?(r=T[i],!0):(t.error(E.method),!1)})),e.isFunction(r)?(t.verbose("Executing invoked function",r),r.apply(a,i)):r||!1}},f?(T===o&&t.initialize(),i=t.invoke(m)):(T!==o&&t.destroy(),t.initialize())}),i?i:this},e.fn.dropdown.settings={moduleName:"Dropdown Module",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",gracePeriod:300,action:"hide",animation:{show:"slide",hide:"slide"},onChange:function(){},onShow:function(){},onHide:function(){},errors:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined."},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",disabled:"disabled",visible:"visible"}}})(jQuery,window,document); \ No newline at end of file +(function(e,t,n,o){e.fn.dropdown=function(t){var i,a=e(this),s=e(n),r=e.extend(!0,{},e.fn.dropdown.settings,t),c="."+r.namespace,l="module-"+r.namespace,u=(a.selector||"",(new Date).getTime()),d=[],m=arguments[0],f="string"==typeof m,g=[].slice.call(arguments,1);return a.each(function(){var t,p=e(this),h=e(this).find(r.selector.menu),v=e(this).find(r.selector.item),b=e(this).find(r.selector.text),y=e(this).find(r.selector.input),x="ontouchstart"in n.documentElement,C=p.selector||"",w=this,T=p.data("module-"+r.namespace),k=r.className,N=r.metadata,z=r.namespace,P=r.animation,E=r.errors;t={initialize:function(){t.verbose("Initializing dropdown with bound events",p),x?p.on("touchstart"+c,t.event.test.toggle):"click"==r.on?p.on("click"+c,t.event.test.toggle):"hover"==r.on?p.on("mouseenter"+c,t.show).on("mouseleave"+c,t.delayedHide):p.on(r.on+c,t.toggle),"form"==r.action&&t.set.selected(),v.on(t.get.selectEvent()+c,t.event.item.click),p.data(l,t)},destroy:function(){t.verbose("Destroying previous module for",p),p.off(z)},event:{stopPropagation:function(e){e.stopPropagation()},test:{toggle:function(e){t.intent.test(e,t.toggle),e.stopPropagation()},hide:function(e){t.intent.test(e,t.hide),e.stopPropagation()}},item:{click:function(n){var o=e(this),i=o.data(N.text)||o.text(),a=o.data(N.value)||i;t.verbose("Adding active state to selected item"),v.removeClass(k.active),o.addClass(k.active),t.action.determine(i,a),e.proxy(r.onChange,h.get())(i,a),n.stopPropagation()}}},intent:{test:function(n,o){t.debug("Determining whether event occurred in dropdown",n.target),o=o||function(){},0===e(n.target).closest(h).size()?(t.verbose("Triggering event",o),o()):t.verbose("Event occurred in dropdown, canceling callback")},bind:function(){t.verbose("Binding hide intent event to document"),s.on(t.get.selectEvent(),t.event.test.hide)},unbind:function(){t.verbose("Removing hide intent event from document"),s.off(t.get.selectEvent())}},action:{determine:function(n,o){e.isFunction(t.action[r.action])?(t.verbose("Triggering preset action",r.action),t.action[r.action](n,o)):e.isFunction(r.action)?(t.verbose("Triggering user action",r.action),r.action(n,o)):t.error(E.action)},nothing:function(){},hide:function(){t.hide()},changeText:function(e){t.set.text(e),t.hide()},form:function(e,n){t.set.text(e),t.set.value(n),t.hide()}},get:{selectEvent:function(){return x?"touchstart":"click"},text:function(){return b.text()},value:function(){return y.val()},item:function(t){var n;return t=t||y.val(),v.each(function(){e(this).data(N.value)==t&&(n=e(this))}),n||!1}},set:{text:function(e){t.debug("Changing text",e),b.text(e)},value:function(e){t.debug("Adding selected value to hidden input",e),y.val(e)},selected:function(e){var n,o=(e||y.val(),t.get.item(e));o&&(t.debug("Setting selected menu item to",o),n=o.data(N.text)||o.text(),v.removeClass(k.active),o.addClass(k.active),t.set.text(n))}},is:{visible:function(){return h.is(":visible")},hidden:function(){return h.is(":not(:visible)")}},can:{click:function(){return x||"click"==r.on},show:function(){return!p.hasClass(k.disabled)}},animate:{show:function(){t.verbose("Doing menu showing animation"),"show"==P.show?h.show():"slide"==P.show&&h.clearQueue().children().clearQueue().css("opacity",0).delay(100).animate({opacity:1},300,"easeOutQuad").end().slideDown(200,"easeOutQuad")},hide:function(){t.verbose("Doing menu hiding animation"),"hide"==P.hide?h.hide():"slide"==P.hide&&h.clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},300,"easeOutQuad").end().delay(100).slideUp(200,"easeOutQuad")}},show:function(){clearTimeout(t.graceTimer),t.is.visible()||(t.debug("Showing dropdown"),p.addClass(k.visible),t.animate.show(),t.can.click()&&t.intent.bind(),e.proxy(r.onShow,h.get())())},delayedHide:function(){t.verbose("User moused away setting timer to hide dropdown"),t.graceTimer=setTimeout(t.hide,r.gracePeriod)},hide:function(){t.is.hidden()||(t.debug("Hiding dropdown"),p.removeClass(k.visible),t.can.click()&&t.intent.unbind(),t.animate.hide(),e.proxy(r.onHide,h.get())())},toggle:function(){t.verbose("Toggling menu visibility"),t.can.show()?t.show():t.hide()},setting:function(t,n){return n===o?r[t]:(e.isPlainObject(t)?e.extend(!0,r,t):r[t]=n,o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?e.extend(!0,t,n):t[n]=i,o)},debug:function(){r.debug&&(r.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},verbose:function(){r.verbose&&r.debug&&(r.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,r.moduleName+":")},performance:{log:function(e){var n,o,i;r.performance&&(n=(new Date).getTime(),i=u||n,o=n-i,u=n,d.push({Element:w,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=r.moduleName,n=(r.moduleName+": "+C+"("+a.size()+" elements)",0);C&&(t+=" Performance ("+C+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(n,i,a){var s,r;return i=i||g,a=w||a,"string"==typeof n&&T!==o&&(n=n.split("."),s=n.length-1,e.each(n,function(n,i){return e.isPlainObject(T[i])&&n!=s?(T=T[i],!0):T[i]!==o?(r=T[i],!0):(t.error(E.method),!1)})),e.isFunction(r)?(t.verbose("Executing invoked function",r),r.apply(a,i)):r||!1}},f?(T===o&&t.initialize(),i=t.invoke(m)):(T!==o&&t.destroy(),t.initialize())}),i?i:this},e.fn.dropdown.settings={moduleName:"Dropdown Module",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",gracePeriod:300,action:"hide",animation:{show:"slide",hide:"slide"},onChange:function(){},onShow:function(){},onHide:function(){},errors:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined."},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",disabled:"disabled",visible:"visible"}}})(jQuery,window,document); \ No newline at end of file diff --git a/build/packaged/modules/dropdown.js b/build/packaged/modules/dropdown.js index c5405037d..36b67483e 100644 --- a/build/packaged/modules/dropdown.js +++ b/build/packaged/modules/dropdown.js @@ -115,7 +115,7 @@ $.fn.dropdown = function(parameters) { item: { - click: function () { + click: function (event) { var $choice = $(this), text = $choice.data(metadata.text) || $choice.text(), @@ -130,6 +130,7 @@ $.fn.dropdown = function(parameters) { ; module.action.determine(text, value); $.proxy(settings.onChange, $menu.get())(text, value); + event.stopPropagation(); } } diff --git a/build/packaged/semantic.min.js b/build/packaged/semantic.min.js index 7d3c8b4fe..d87603225 100644 --- a/build/packaged/semantic.min.js +++ b/build/packaged/semantic.min.js @@ -10,6 +10,6 @@ * Released: 05/29/2013 */ (function(e,t,n,o){e.fn.accordion=function(t){var n=e.extend(!0,{},e.fn.accordion.settings,t),i=arguments||!1;return e(this).each(function(){var t,a=e(this),r=a.find(n.selector.title),s=(a.find(n.selector.icon),a.find(n.selector.content)),l=a.data("module"),c=n.className;return t={initialize:function(){r.on("click",t.change),a.data("module",t)},change:function(){var o=e(this),i=(o.next(s),o.hasClass(c.active));i?n.collapsible&&e.proxy(t.close,o)():e.proxy(t.open,o)()},open:function(){var t=e(this),o=t.next(s),i=r.filter("."+c.active),a=i.next(r);n.exclusive&&i.size()>0&&(i.removeClass("active"),a.stop().slideUp(n.speed,n.easing,function(){e(this).removeClass("active").removeAttr("style")})),t.addClass(c.active),o.hide().addClass(c.active).stop().slideDown(n.speed,n.easing,function(){e(this).removeAttr("style")})},close:function(){var t=e(this),o=t.next(s);t.removeClass(c.active),o.removeClass(c.active).show().stop().slideUp(n.speed,n.easing,function(){e(this).removeAttr("style")})},debug:function(e){n.debug&&console.info(n.moduleName+": "+e)},error:function(e){console.warn(n.moduleName+": "+e)},invoke:function(i,a,r){var s;return r=r||Array.prototype.slice.call(arguments,2),"string"==typeof i&&l!==o&&(i=i.split("."),e.each(i,function(o,i){return e.isPlainObject(l[i])?(l=l[i],!0):e.isFunction(l[i])?(s=l[i],!0):(t.error(n.errors.method),!1)})),e.isFunction(s)?s.apply(a,r):s}},l!==o&&i?("invoke"==i[0]&&(i=Array.prototype.slice.call(i,1)),t.invoke(i[0],this,Array.prototype.slice.call(i,1))):(t.initialize(),o)}),this},e.fn.accordion.settings={moduleName:"Accordion",debug:!1,exclusive:!0,collapsible:!0,errors:{method:"The method you called is not defined"},className:{active:"active",hover:"hover"},selector:{title:".title",icon:".icon",content:".content"},speed:500,easing:"easeInOutQuint"}})(jQuery,window,document),function(e,t,n,o){e.animationSettings=function(t,n,i,a){return t=n===o?t:"object"==typeof n?e.extend({},t,n):"function"==typeof i?e.extend({},t,{duration:n,complete:i}):"object"==typeof i?e.extend(!0,{},t,{duration:n},i):e.extend({},t,{duration:n,easing:i,complete:a})},e.fn.popIn=function(t,n,o){var i=e.animationSettings(e.fn.popIn.settings,t,n,o),a=e(this),r=a.size(),s=0,l=function(){0==a.filter(":animated").size(),s++,e(this).css("transform","").removeClass(i.className.init),e.proxy(i.eachComplete,this)(),s==r&&e.proxy(i.complete,a)()},c=function(t){e(this).delay(i.delay*t).animate({opacity:i.endOpacity,transform:"scale("+i.endScale+")"},i.duration,i.easing,l)};return i.isLegacyBrowser?a.show():a.addClass(i.className.init).show().css({opacity:i.startOpacity,transform:"scale("+i.startScale+")"}).each(c),e(this)},e.fn.popOut=function(t,n,o){var i=e.animationSettings(e.fn.popIn.settings,t,n,o),a={complete:function(){e(this).hide(),e.proxy(i.complete,this)()},startOpacity:i.endOpacity,endOpacity:0,startScale:i.endScale,endScale:i.startScale},r=e.extend(!0,{},i,a);e(this).popIn(r)},e.fn.popIn.settings={isLegacyBrowser:!1,className:{init:"init"},duration:450,easing:"easeOutExpo",delay:100,startOpacity:0,endOpacity:1,startScale:.7,endScale:1,eachComplete:function(){},complete:function(){}},e.fn.kenBurns=function(t,n,i){var a=e.animationSettings(e.fn.kenBurns.settings,t,n,i),r={randomPosition:function(e,t,n){var n=n!==o?n:t,i=Math.random()*(e+n-(e-t))+(e-t);return parseInt(i,10)},animate:function(){var t={},n={};t=a.useStartPosition?{x:parseInt(e(this).css("background-position-x"),10),y:parseInt(e(this).css("background-position-y"),10)}:{x:r.randomPosition(50,a.xRange),y:r.randomPosition(50,a.yRange)},n.x=t.x>50?r.randomPosition(t.x,a.xMaxTravelDistance,-a.xMinTravelDistance):r.randomPosition(t.x,-a.xMinTravelDistance,a.xMaxTravelDistance),n.y=t.y>50?r.randomPosition(t.y,a.yMaxTravelDistance,-a.yMinTravelDistance):r.randomPosition(t.y,-a.yMinTravelDistance,a.yMaxTravelDistance),e(this).css({backgroundPosition:t.x+"%",backgroundPositionY:t.y+"%"}).stop().animate({backgroundPosition:n.x+"%",backgroundPositionY:n.y+"%"},a.duration,a.easing,a.complete)}};return a.isLegacyBrowser||e(this).each(r.animate),e(this)},e.fn.kenBurns.settings={isLegacyBrowser:!1,duration:1e4,easing:"linear",useStartPosition:!1,xRange:40,yRange:20,xMinTravelDistance:30,xMaxTravelDistance:60,yMinTravelDistance:20,yMaxTravelDistance:40,scale:.1,complete:function(){}}}(jQuery,window,document),function(e,t,n,o){e.api=e.fn.api=function(n){var i,a=e.extend(!0,{},e.api.settings,n),r="function"!=typeof this?this:e("
"),s=a.stateContext?e(a.stateContext):e(r),l="object"==typeof this?e(r):s,c=l.data(a.metadata.action)||a.action||!1,u=a.className,d=a.metadata,f=a.errors;return i={initialize:function(){var r,f,m,p,g,h,v,b=!1,y=(new Date).getTime(),x={},w={},C=a.errors;return a.serializeForm&&e(this).toJSON()!==o&&(x=l.closest("form").toJSON(),e.extend(!0,a.data,x),i.debug("Adding form data to API Request",x)),r=e.proxy(a.beforeSend,l)(a),r===o||r?(c&&(i.debug("Initializing API Request for: ",c),a.api[c]!==o?p=a.api[c]:i.error(C.missingAction)),a.url&&(p=a.url,i.debug("Using specified url: ",p)),p||(i.error(C.missingURL),i.reset()),g=p.match(a.regExpTemplate),g&&(i.debug("Looking for URL variables",g),e.each(g,function(t,r){var s=r.substr(2,r.length-3),c=e.isPlainObject(n.urlData)&&n.urlData[s]!==o?n.urlData[s]:l.data(s)!==o?l.data(s):a.urlData[s];i.verbose("Looking for variable",s,l,l.data(s),a.urlData[s]),c===!1?(i.debug("Removing variable from URL",g),p=p.replace("/"+r,"")):c!==o&&c?p=p.replace(r,c):(i.error(C.missingParameter+s),b=!0)})),b?(i.reset(),o):(m=e.Deferred().always(function(){a.stateContext&&s.removeClass(u.loading),e.proxy(a.complete,l)()}).done(function(t){i.debug("API request successful"),"json"==a.dataType?t.success===!0?e.proxy(a.success,s)(t,a,l):(i.debug("JSON success flag is not set."),t.error!==o?e.proxy(a.failure,s)(t.error,a,l):e.isArray(t.errors)?e.proxy(a.failure,s)(t.errors[0],a,l):t.message!==o?e.proxy(a.failure,s)(t.message,a,l):e.proxy(a.failure,s)(C.error,a,l)):e.proxy(a.success,s)(t,a,l)}).fail(function(t,n,r){var l,c=a.errors[n]!==o?a.errors[n]:r;if(t!==o)if(t.readyState!==o&&4==t.readyState){if(200!=t.status&&r!==o&&""!==r)i.error(C.statusMessage+r);else if("error"==n&&"json"==a.dataType)try{l=e.parseJSON(t.responseText),l&&l.error!==o&&(c=l.error)}catch(d){i.error(C.JSONParse)}s.removeClass(u.loading).addClass(u.error),a.errorLength>0&&setTimeout(function(){s.removeClass(u.error)},a.errorLength),i.debug("API Request error:",c),e.proxy(a.failure,s)(c,a,this)}else i.debug("Request Aborted (Most likely caused by page change)")}),e.extend(!0,w,a,{type:a.method||a.type,data:h,url:p,beforeSend:a.beforeXHR}),a.stateContext&&s.addClass(u.loading),a.progress&&(i.verbose("Adding progress events"),e.extend(!0,w,{xhr:function(){var n=new t.XMLHttpRequest;return n.upload.addEventListener("progress",function(t){var n;t.lengthComputable&&(n=Math.round(1e4*(t.loaded/t.total))/100+"%",e.proxy(a.progress,s)(n,t))},!1),n.addEventListener("progress",function(t){var n;t.lengthComputable&&(n=Math.round(1e4*(t.loaded/t.total))/100+"%",e.proxy(a.progress,s)(n,t))},!1),n}})),i.verbose("Creating AJAX request with settings: ",w),v=e.ajax(w).always(function(){f=a.loadingLength-((new Date).getTime()-y),a.loadingDelay=0>f?0:f}).done(function(e){var t=this;setTimeout(function(){m.resolveWith(t,[e])},a.loadingDelay)}).fail(function(e,t,n){var o=this;"abort"!=t?setTimeout(function(){m.rejectWith(o,[e,t,n])},a.loadingDelay):s.removeClass(u.error).removeClass(u.loading)}),a.stateContext&&l.data(d.promise,m).data(d.xhr,v),o)):(i.error(C.beforeSend),i.reset(),o)},reset:function(){l.data(d.promise,!1).data(d.xhr,!1),s.removeClass(u.error).removeClass(u.loading),i.error(f.exitConditions)},setting:function(e,t){return t===o?a[e]:(a[e]=t,o)},verbose:function(){a.verbose&&i.debug.apply(this,arguments)},debug:function(){var e=[],t=a.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};o=Function.prototype.bind.call(o,console),a.debug&&(e.push(t),o.apply(console,e.concat(n)))},error:function(){var e=[],t=a.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.warn||console.log||function(){};o=Function.prototype.bind.call(o,console),a.debug&&(e.push(t),e.concat(n),o.apply(console,e.concat(n)))}},i.initialize(),this},e.fn.apiButton=function(t){return e(this).each(function(){var n,o=e(this),i=e(this).selector||"",a=e.isFunction(t)?e.extend(!0,{},e.api.settings,e.fn.apiButton.settings,{stateContext:this,success:t}):e.extend(!0,{},e.api.settings,e.fn.apiButton.settings,{stateContext:this},t);n={initialize:function(){a.context&&""!==i?e(a.context).on(i,"click."+a.namespace,n.click):o.on("click."+a.namespace,n.click)},click:function(){a.filter&&0!==e(this).filter(a.filter).size()||e.proxy(e.api,this)(a)}},n.initialize()}),this},e.api.settings={moduleName:"API Module",namespace:"api",verbose:!0,debug:!0,api:{},beforeSend:function(e){return e},beforeXHR:function(){},success:function(){},complete:function(){},failure:function(){},progress:!1,errors:{missingAction:"API action used but no url was defined",missingURL:"URL not specified for the API action",missingParameter:"Missing an essential URL parameter: ",timeout:"Your request timed out",error:"There was an error with your request",parseError:"There was an error parsing your request",JSONParse:"JSON could not be parsed during error handling",statusMessage:"Server gave an error: ",beforeSend:"The before send function has aborted the request",exitConditions:"API Request Aborted. Exit conditions met"},className:{loading:"loading",error:"error"},metadata:{action:"action",promise:"promise",xhr:"xhr"},regExpTemplate:/\{\$([A-z]+)\}/g,action:!1,url:!1,urlData:!1,serializeForm:!1,stateContext:!1,method:"get",data:{},dataType:"json",cache:!0,loadingLength:200,errorLength:2e3},e.fn.apiButton.settings={filter:".disabled, .loading",context:!1,stateContext:!1}}(jQuery,window,document),function(e,t,n,o){e.fn.colorize=function(t){var n=e.extend(!0,{},e.fn.colorize.settings,t),i=arguments||!1;return e(this).each(function(t){var a,r,s,l,c,u,d,f,m=e(this),p=e("")[0],g=e("")[0],h=e("")[0],v=new Image,b=n.colors,y=(n.paths,n.namespace),x=n.errors,w=m.data("module-"+y);return f={checkPreconditions:function(){return f.debug("Checking pre-conditions"),!e.isPlainObject(b)||e.isEmptyObject(b)?(f.error(x.undefinedColors),!1):!0},async:function(e){n.async?setTimeout(e,0):e()},getMetadata:function(){f.debug("Grabbing metadata"),l=m.data("image")||n.image||o,c=m.data("name")||n.name||t,u=n.width||m.width(),d=n.height||m.height(),(0===u||0===d)&&f.error(x.undefinedSize)},initialize:function(){f.debug("Initializing with colors",b),f.checkPreconditions()&&f.async(function(){f.getMetadata(),f.canvas.create(),f.draw.image(function(){f.draw.colors(),f.canvas.merge()}),m.data("module-"+y,f)})},redraw:function(){f.debug("Redrawing image"),f.async(function(){f.canvas.clear(),f.draw.colors(),f.canvas.merge()})},change:{color:function(e,t){return f.debug("Changing color",e),b[e]===o?(f.error(x.missingColor),!1):(b[e]=t,f.redraw(),o)}},canvas:{create:function(){f.debug("Creating canvases"),p.width=u,p.height=d,g.width=u,g.height=d,h.width=u,h.height=d,a=p.getContext("2d"),r=g.getContext("2d"),s=h.getContext("2d"),m.append(p),a=m.children("canvas")[0].getContext("2d")},clear:function(){f.debug("Clearing canvas"),s.fillStyle="#FFFFFF",s.fillRect(0,0,u,d)},merge:function(){return e.isFunction(a.blendOnto)?(a.putImageData(r.getImageData(0,0,u,d),0,0),s.blendOnto(a,"multiply"),o):(f.error(x.missingPlugin),o)}},draw:{image:function(e){f.debug("Drawing image"),e=e||function(){},l?(v.src=l,v.onload=function(){r.drawImage(v,0,0),e()}):(f.error(x.noImage),e())},colors:function(){f.debug("Drawing color overlays",b),e.each(b,function(e,t){n.onDraw(s,c,e,t)})}},debug:function(e,t){n.debug&&(t!==o?console.info(n.moduleName+": "+e,t):console.info(n.moduleName+": "+e))},error:function(e){console.warn(n.moduleName+": "+e)},invoke:function(t,i,a){var r;return a=a||Array.prototype.slice.call(arguments,2),"string"==typeof t&&w!==o&&(t=t.split("."),e.each(t,function(t,o){return e.isPlainObject(w[o])?(w=w[o],!0):e.isFunction(w[o])?(r=w[o],!0):(f.error(n.errors.method),!1)})),e.isFunction(r)?r.apply(i,a):!1}},w!==o&&i?("invoke"==i[0]&&(i=Array.prototype.slice.call(i,1)),f.invoke(i[0],this,Array.prototype.slice.call(i,1))):(f.initialize(),o)}),this},e.fn.colorize.settings={moduleName:"Image Colorizer",debug:!0,namespace:"colorize",onDraw:function(){},async:!0,colors:{},metadata:{image:"image",name:"name"},errors:{noImage:"No tracing image specified",undefinedColors:"No default colors specified.",missingColor:"Attempted to change color that does not exist",missingPlugin:"Blend onto plug-in must be included",undefinedHeight:"The width or height of image canvas could not be automatically determined. Please specify a height."}}}(jQuery,window,document),function(e){e.fn.defaultText=function(t){var n="string"==typeof t?e.extend({},e.fn.defaultText.settings,{defaultValue:t}):e.extend(!0,{},e.fn.defaultText.settings,t);return"string"==typeof t&&(t={defaultValue:t}),e.extend(n,t),e(this).each(function(){var t=e(this),o={checkDefault:function(){t.val().toLowerCase()!=n.defaultValue.toLowerCase()&&t.addClass(n.filledClass)},placeholder:{add:function(){0===t.filter(n.disabledClassList).size()&&(t.val()==n.replaceValue?n.alwaysReplace?t.removeClass(n.filledClass).val(t.attr("last")).removeAttr("last"):t.removeClass(n.filledClass).val(n.defaultValue):t.addClass(n.filledClass))},remove:function(){0===t.filter(n.disabledClassList).size()&&(n.alwaysReplace?t.attr("last",t.val()).val(n.replaceValue):t.val().toLowerCase()==n.defaultValue.toLowerCase()&&t.val(n.replaceValue))}}};"auto"==n.defaultValue&&(n.defaultValue=e(this).val()),t.on("focus",o.placeholder.remove).on("blur",o.placeholder.add),o.checkDefault()}),this},e.fn.defaultText.settings={defaultValue:"auto",replaceValue:"",alwaysReplace:!1,disabledClassList:".readonly, .disabled",filledClass:"filled"}}(jQuery,window,document),function(e,t,n,o){e.fn.form=function(t,n){var i,a=e(this),r=e.extend(!0,{},e.fn.form.settings,n),s=e.extend({},e.fn.form.settings.defaults,t),l="."+r.namespace,c=("module-"+r.namespace,a.selector||""),u=(new Date).getTime(),d=[],f=arguments[0],m="string"==typeof f,p=[].slice.call(arguments,1);return a.each(function(){var t,n=e(this),g=e(this).find(r.selector.field),h=e(this).find(r.selector.group),v=e(this).find(r.selector.message),b=(e(this).find(r.selector.prompt),e(this).find(r.selector.submit)),y=[],x=this,w=n.data("module-"+r.namespace),C=r.namespace,k=r.metadata,T=r.className,N=r.error;t={initialize:function(){t.verbose("Initializing form validation",n,s,r),r.keyboardShortcuts&&g.on("keydown"+l,t.event.field.keydown),n.on("submit"+l,t.validate.form),g.on("blur"+l,t.event.field.change),b.on("click"+l,t.submit)},destroy:function(){n.off(C)},refresh:function(){g=n.find(r.selector.field)},submit:function(){t.verbose("Submitting form",n),n.submit()},event:{field:{keydown:function(n){var i=e(this),a=n.which,s={enter:13,escape:27};return a==s.escape&&(t.verbose("Escape key pressed blurring field"),i.blur()),a==s.enter&&i.is(r.selector.input)?(t.debug("Enter key pressed, submitting form"),b.addClass(T.down),i.one("keyup"+l,t.event.field.keyup),n.preventDefault(),!1):o},keyup:function(){t.verbose("Doing keyboard shortcut form submit"),b.removeClass(T.down),t.submit()},change:function(){var n=e(this),o=n.closest(h);console.log("here",r.on),o.hasClass(T.error)?(t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))):"change"==r.on&&t.validate.field(t.get.validation(n))}}},get:{field:function(n){return t.verbose("Finding field with identifier",n),g.filter("#"+n).size()>0?g.filter("#"+n):g.filter('[name="'+n+'"]').size()>0?g.filter('[name="'+n+'"]'):g.filter("[data-"+k.validate+'="'+n+'"]').size()>0?g.filter("[data-"+k.validate+'="'+n+'"]'):e("")},validation:function(n){var o;return e.each(s,function(e,i){t.get.field(i.identifier).get(0)==n.get(0)&&(o=i)}),o||!1}},has:{field:function(e){return t.verbose("Checking for existence of a field with identifier",e),g.filter("#"+e).size()>0?!0:g.filter('[name="'+e+'"]').size()>0?!0:g.filter("[data-"+k.validate+'="'+e+'"]').size()>0?!0:!1}},add:{prompt:function(e,n){var o=t.get.field(e.identifier),i=o.closest(h),a=i.find(r.selector.prompt),s=0!==a.size();t.verbose("Adding inline validation prompt"),i.addClass(T.error),r.inlineError&&(s||(a=r.templates.prompt(n),a.appendTo(i).hide()),a.html(n[0]),a.is(":not(:visible)")&&a.fadeIn(r.animateSpeed))},errors:function(e){t.debug("Adding form error messages",e),v.html(r.templates.error(e))}},remove:{prompt:function(e){var n=t.get.field(e.identifier),o=n.closest(h),i=o.find(r.selector.prompt);o.removeClass(T.error),r.inlineError&&i.hide()}},validate:{form:function(o){var i=!0;y=[],e.each(s,function(e,n){t.validate.field(n)||(i=!1)}),i?(n.removeClass(T.error).addClass(T.success),e.proxy(r.onSuccess,this)(o)):(n.addClass(T.error),r.inlineError||t.add.errors(y),e.proxy(r.onFailure,this)(y))},field:function(n){var i=t.get.field(n.identifier),a=!0,s=[];return n.rules!==o&&e.each(n.rules,function(e,o){t.has.field(n.identifier)&&!t.validate.rule(n,o)&&(t.debug("Field is invalid",n.identifier,o.type),s.push(o.prompt),a=!1)}),a?(t.remove.prompt(n,s),e.proxy(r.onValid,i)(),!0):(y=y.concat(s),t.add.prompt(n,s),e.proxy(r.onInvalid,i)(s),!1)},rule:function(i,a){var s,l,c=t.get.field(i.identifier),u=a.type,d=c.val(),f=/\[(.*?)\]/i,m=f.exec(u),p=!0;return m!==o&&null!=m?(s=m[1],l=u.replace(m[0],""),p=e.proxy(r.rules[l],n)(d,s)):p="checked"==u?c.filter(":checked").size()>0:r.rules[u](d),p}},setting:function(t,n){return n===o?r[t]:(e.isPlainObject(t)?e.extend(!0,r,t):r[t]=n,o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?e.extend(!0,t,n):t[n]=i,o)},debug:function(){r.debug&&(r.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},verbose:function(){r.verbose&&r.debug&&(r.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,r.moduleName+":")},performance:{log:function(e){var n,o,i;r.performance&&(n=(new Date).getTime(),i=u||n,o=n-i,u=n,d.push({Element:x,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=r.moduleName,n=(r.moduleName+": "+c+"("+a.size()+" elements)",0);c&&(t+=" Performance ("+c+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(n,i,a){var r,s;return i=i||p,a=x||a,"string"==typeof n&&w!==o&&(n=n.split("."),r=n.length-1,e.each(n,function(n,i){return e.isPlainObject(w[i])&&n!=r?(w=w[i],!0):w[i]!==o?(s=w[i],!0):(t.error(N.method),!1)})),e.isFunction(s)?(t.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},m?(w===o&&t.initialize(),i=t.invoke(f)):(w!==o&&t.destroy(),t.initialize())}),i?i:this},e.fn.form.settings={moduleName:"Form",debug:!0,verbose:!0,performance:!1,namespace:"validate",keyboardShortcuts:!0,on:"submit",animateSpeed:150,inlineError:!1,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{validate:"validate"},selector:{message:".error.message",field:"input, textarea, select",group:".field",input:"input",prompt:".prompt",submit:".submit"},className:{error:"error",success:"success",down:"down",label:"ui label prompt"},error:{method:"The method you called is not defined."},templates:{error:function(t){var n='
    ';return e.each(t,function(e,t){n+="
  • "+t+"
  • "}),n+="
",e(n)},prompt:function(t){return e("
").addClass("ui red pointing prompt label").html(t[0])}},rules:{empty:function(e){return!(e===o||""===e)},email:function(e){var t=RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?");return t.test(e)},length:function(e,t){return e!==o?e.length>=t:!1},not:function(e,t){return e!=t},is:function(e,t){return e==t},maxLength:function(e,t){return e!==o?t>=e.length:!1},match:function(t,n){var i,a=e(this);return a.find("#"+n).size()>0?i=a.find("#"+n).val():a.find("[name="+n+"]").size()>0?i=a.find("[name="+n+"]").val():a.find('[data-validate="'+n+'"]').size()>0&&(i=a.find('[data-validate="'+n+'"]').val()),i!==o?""+t==""+i:!1},url:function(e){var t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)}}}}(jQuery,window,document),function(e,t,n,o){e.fn.state=function(t){var n,i=e(this),a=i.selector||"",r=arguments[0],s=[].slice.call(arguments,1),l=(new Date).getTime(),c=[];return i.each(function(){var u,d=e(this),f=e.extend(!0,{},e.fn.state.settings,t),m=this,p=d.data("module-"+f.namespace),g="string"==typeof r,h=f.namespace,v=f.metadata,b=f.className,y=f.states,x=f.text;u={initialize:function(){u.verbose("Initializing module",m),f.automatic&&u.add.defaults(),f.context&&""!==a?(u.allows("hover")&&e(m,f.context).on(a,"mouseenter."+h,u.hover.enable).on(a,"mouseleave."+h,u.hover.disable),u.allows("pressed")&&e(m,f.context).on(a,"mousedown."+h,u.pressed.enable).on(a,"mouseup."+h,u.pressed.disable),u.allows("focus")&&e(m,f.context).on(a,"focus."+h,u.focus.enable).on(a,"blur."+h,u.focus.disable),e(f.context).on(a,"mouseenter."+h,u.text.change).on(a,"mouseleave."+h,u.text.reset).on(a,"click."+h,u.toggle)):(u.allows("hover")&&d.on("mouseenter."+h,u.hover.enable).on("mouseleave."+h,u.hover.disable),u.allows("pressed")&&d.on("mousedown."+h,u.pressed.enable).on("mouseup."+h,u.pressed.disable),u.allows("focus")&&d.on("focus."+h,u.focus.enable).on("blur."+h,u.focus.disable),d.on("mouseenter."+h,u.text.change).on("mouseleave."+h,u.text.reset).on("click."+h,u.toggle)),d.data("module-"+h,u)},destroy:function(){u.verbose("Destroying previous module",m),d.off("."+h)},refresh:function(){u.verbose("Refreshing selector cache",m),d=e(m)},add:{defaults:function(){var n=t&&e.isPlainObject(t.states)?t.states:{};e.each(f.defaults,function(t,i){u.is[t]!==o&&u.is[t]()&&(u.verbose("Adding default states",t,m),e.extend(f.states,i,n))})}},is:{active:function(){return d.hasClass(b.active)},loading:function(){return d.hasClass(b.loading)},inactive:function(){return!d.hasClass(b.active)},enabled:function(){return!d.is(f.filter.active)},disabled:function(){return d.is(f.filter.active)},textEnabled:function(){return!d.is(f.filter.text)},button:function(){return d.is(".button:not(a, .submit)")},input:function(){return d.is("input")}},allows:function(e){return y[e]||!1},enable:function(e){u.allows(e)&&d.addClass(b[e])},disable:function(e){u.allows(e)&&d.removeClass(b[e])},textFor:function(e){return x[e]||!1},focus:{enable:function(){d.addClass(b.focus)},disable:function(){d.removeClass(b.focus)}},hover:{enable:function(){d.addClass(b.hover)},disable:function(){d.removeClass(b.hover)}},pressed:{enable:function(){d.addClass(b.pressed).one("mouseleave",u.pressed.disable)},disable:function(){d.removeClass(b.pressed)}},toggle:function(){var e=d.data(v.promise);u.allows("active")&&u.is.enabled()&&(u.refresh(),e!==o?u.listenTo(e):u.change())},listenTo:function(t){u.debug("API request detected, waiting for state signal",t),t?(x.loading&&u.text.update(x.loading),e.when(t).then(function(){"resolved"==t.state()?(u.debug("API request succeeded"),f.activateTest=function(){return!0},f.deactivateTest=function(){return!0}):(u.debug("API request failed"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1}),u.change()})):(f.activateTest=function(){return!1},f.deactivateTest=function(){return!1})},change:function(){u.debug("Determining state change direction"),u.is.inactive()?u.activate():u.deactivate(),f.sync&&u.sync(),f.onChange()},activate:function(){e.proxy(f.activateTest,m)()&&(u.debug("Setting state to active"),d.addClass(b.active),u.text.update(x.active))},deactivate:function(){e.proxy(f.deactivateTest,m)()&&(u.debug("Setting state to inactive"),d.removeClass(b.active),u.text.update(x.inactive))},sync:function(){u.verbose("Syncing other buttons to current state"),u.is.active()?i.not(d).state("activate"):i.not(d).state("deactivate")},text:{get:function(){return f.selector.text?d.find(f.selector.text).text():d.html()},flash:function(e,t){var n=u.text.get();e=e||f.text.flash,t=t||f.flashDuration,u.text.update(e),setTimeout(function(){u.text.update(n)},t)},change:function(){u.verbose("Checking if text should be changed"),u.is.textEnabled()&&(u.is.active()?x.hover?(u.verbose("Changing text to hover text",x.hover),u.text.update(x.hover)):x.disable&&(u.verbose("Changing text to disable text",x.disable),u.text.update(x.disable)):x.hover?(u.verbose("Changing text to hover text",x.disable),u.text.update(x.hover)):x.enable&&(u.verbose("Changing text to enable text",x.disable),u.text.update(x.enable)))},reset:function(){var e=x.active||d.data(v.storedText),t=x.inactive||d.data(v.storedText);u.is.textEnabled()&&(u.is.active()&&e?(u.verbose("Resetting active text",e),u.text.update(e)):t&&(u.verbose("Resetting inactive text",e),u.text.update(t)))},update:function(e){var t=u.text.get();e&&e!==t&&(u.debug("Updating text",e),f.selector.text?d.data(v.storedText,e).find(f.selector.text).text(e):d.data(v.storedText,e).html(e))}},setting:function(e,t){return t===o?f[e]:(f[e]=t,o)},performance:{log:function(e){var t,n;f.performance&&(t=(new Date).getTime(),n=t-l,l=t,c.push({Name:e,"Execution Time":n}),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,100))},display:function(){var t=f.moduleName+" Performance ("+a+")";f.moduleName+": "+a+"("+i.size()+" elements)",console.group!==o&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+":"+t["Execution Time"])}),console.groupEnd(),c=[])}},verbose:function(){f.verbose&&f.debug&&(u.performance.log(arguments[0]),u.verbose=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},debug:function(){f.debug&&(u.performance.log(arguments[0]),u.debug=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},error:function(){console.log!==o&&(u.error=Function.prototype.bind.call(console.log,console,f.moduleName+":"))},invoke:function(t,n,i){var a,r;return i=i||[].slice.call(arguments,2),"string"==typeof t&&p!==o&&(t=t.split("."),a=t.length-1,e.each(t,function(t,n){return e.isPlainObject(p[n])&&t!=a?(p=p[n],!0):p[n]!==o?(r=p[n],!0):(u.error(f.errors.method),!1)})),e.isFunction(r)?r.apply(n,i):r}},g?n=u.invoke(r,this,s):(p!==o&&u.destroy(),u.initialize())}),n!==o?n:this},e.fn.state.settings={moduleName:"State Module",debug:!0,verbose:!1,namespace:"state",performance:!0,onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:3e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,errors:{method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{focus:"focus",hover:"hover",pressed:"down",active:"active",loading:"loading"},selector:{text:!1},defaults:{input:{hover:!0,focus:!0,pressed:!0,loading:!1,active:!1},button:{hover:!0,focus:!1,pressed:!0,active:!1,loading:!0}},states:{hover:!0,focus:!0,pressed:!0,loading:!1,active:!1},text:{flash:!1,hover:!1,active:!1,inactive:!1,enable:!1,disable:!1}}}(jQuery,window,document),function(e,t,n,o){e.fn.carousel=function(t){var n,i=e(this),a=e.extend(!0,{},e.fn.carousel.settings,t),r=("."+a.namespace,"module-"+a.namespace,i.selector||""),s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return i.each(function(){var t,f=e(this),m=(e(a.selector.arrows),e(a.selector.leftArrow)),p=e(a.selector.rightArrow),g=e(a.selector.content),h=(e(a.selector.navigation),e(a.selector.navItem)),v=(f.selector||"",this),b=f.data("module-"+a.namespace),y=a.className,x=a.namespace,w=a.errors;t={initialize:function(){t.openingAnimation(),t.marquee.autoAdvance(),m.on("click",t.marquee.left),p.on("click",t.marquee.right),h.on("click",t.marquee.change)},destroy:function(){t.verbose("Destroying previous module for",f),f.off(x)},left:function(){var e=g.filter("."+y.active),t=g.index(e),n=g.size(),o=-1!=t-1?t-1:n-1;h.eq(o).trigger("click")},right:function(){var e=g.filter("."+y.active),t=g.index(e),n=g.size(),o=t+1!=n?t+1:0;h.eq(o).trigger("click")},change:function(){var n=e(this),o=h.index(n),i=g.eq(o);t.marquee.autoAdvance(),n.addClass("active").siblings().removeClass("active"),i.addClass("active animated fadeIn").siblings("."+y.active).removeClass("animated fadeIn scaleIn").animate({opacity:0},500,function(){e(this).removeClass("active").removeAttr("style")})},autoAdvance:function(){clearInterval(t.timer),t.timer=setInterval(t.marquee.right,a.duration)},setting:function(n,i){return i===o?a[n]:(e.isPlainObject(n)?(t.verbose("Modifying settings object",n,i),e.extend(!0,a,n)):(t.verbose("Modifying setting",n,i),a[n]=i),o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?(t.verbose("Modifying internal property",n,i),e.extend(!0,t,n)):(t.verbose("Changing internal method to",i),t[n]=i),o)},debug:function(){a.debug&&(a.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},verbose:function(){a.verbose&&a.debug&&(a.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,a.moduleName+":")},performance:{log:function(e){var n,o,i;a.performance&&(n=(new Date).getTime(),i=s||n,o=n-i,s=n,l.push({Element:v,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=a.moduleName,n=(a.moduleName+": "+r+"("+i.size()+" elements)",0);r&&(t+=" Performance ("+r+")"),(console.group!==o||console.table!==o)&&l.length>0&&(console.groupCollapsed(t),console.table?(e.each(l,function(e,t){n+=t["Execution Time"]}),console.table(l)):e.each(l,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),l=[],s=!1)}},invoke:function(n,i,a){var r,s;return i=i||d,a=v||a,"string"==typeof n&&b!==o&&(n=n.split("."),r=n.length-1,e.each(n,function(n,i){return e.isPlainObject(b[i])&&n!=r?(b=b[i],!0):b[i]!==o?(s=b[i],!0):(t.error(w.method),!1)})),e.isFunction(s)?(t.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},u?(b===o&&t.initialize(),n=t.invoke(c)):(b!==o&&t.destroy(),t.initialize())}),n?n:this},e.fn.carousel.settings={moduleName:"Carousel Module",namespace:"carousel",verbose:!0,debug:!0,performance:!0,duration:5e3,errors:{method:"The method you called is not defined."},selector:{arrows:".arrow",leftArrow:".left.arrow",rightArrow:".right.arrow",content:".content",navigation:".navigation",navItem:".navigation .icon"},className:{active:"active"}}}(jQuery,window,document),function(e,t,n,o){e.fn.chat=function(t,n,i){var a=e.extend(!0,{},e.fn.chat.settings,i),r=arguments||!1;return e(this).each(function(){var i,s,l,c,u,d,f=e(this),m=f.find(a.selector.expandButton),p=f.find(a.selector.userListButton),g=f.find(a.selector.userList),h=(f.find(a.selector.room),f.find(a.selector.userCount)),v=f.find(a.selector.log),b=(f.find(a.selector.message),f.find(a.selector.messageInput)),y=f.find(a.selector.messageButton),x=f.data("module"),w=a.className,C=a.namespace,k="",T={}; -return d={channel:!1,width:{log:v.width(),userList:g.outerWidth()},initialize:function(){return Pusher===o&&d.error(a.errors.pusher),t===o||n===o?(d.error(a.errors.key),!1):a.endpoint.message||a.endpoint.authentication?(u=new Pusher(t),Pusher.channel_auth_endpoint=a.endpoint.authentication,d.channel=u.subscribe(n),d.channel.bind("pusher:subscription_succeeded",d.user.list.create),d.channel.bind("pusher:subscription_error",d.error),d.channel.bind("pusher:member_added",d.user.joined),d.channel.bind("pusher:member_removed",d.user.left),d.channel.bind("update_messages",d.message.receive),e.each(a.customEvents,function(e,t){d.channel.bind(e,t)}),e.fn.hoverClass!==o&&e.fn.downClass!==o&&(m.hoverClass().downClass(),p.hoverClass().downClass(),y.hoverClass().downClass()),p.on("click."+C,d.event.toggleUserList),m.on("click."+C,d.event.toggleExpand),b.on("keydown."+C,d.event.input.keydown).on("keyup."+C,d.event.input.keyup),y.on("mouseenter."+C,d.event.hover).on("mouseleave."+C,d.event.hover).on("click."+C,d.event.submit),v.animate({scrollTop:v.prop("scrollHeight")},400),f.data("module",d).addClass(w.loading),o):(d.error(a.errors.endpoint),!1)},refresh:function(){p.removeClass(w.active),d.width={log:v.width(),userList:g.outerWidth()},p.hasClass(w.active)&&d.user.list.hide(),f.data("module",d)},user:{updateCount:function(){a.userCount&&(T=f.data("users"),l=0,e.each(T,function(){l++}),h.html(a.templates.userCount(l)))},joined:function(t){T=f.data("users"),"anonymous"!=t.id&&T[t.id]===o&&(T[t.id]=t.info,a.randomColor&&t.info.color===o&&(t.info.color=a.templates.color(t.id)),k=a.templates.userList(t.info),t.info.isAdmin?e(k).prependTo(g).preview({type:"user",placement:"left"}):e(k).appendTo(g).preview({type:"user",placement:"left"}),e.fn.preview!==o&&g.children().last().preview({type:"user",placement:"left"}),a.partingMessages&&(v.append(a.templates.joined(t.info)),d.message.scroll.test()),d.user.updateCount())},left:function(e){T=f.data("users"),e!==o&&"anonymous"!==e.id&&(delete T[e.id],f.data("users",T),g.find("[data-id="+e.id+"]").remove(),a.partingMessages&&(v.append(a.templates.left(e.info)),d.message.scroll.test()),d.user.updateCount())},list:{create:function(t){T={},t.each(function(e){"anonymous"!==e.id&&"undefined"!==e.id&&(a.randomColor&&e.info.color===o&&(e.info.color=a.templates.color(e.id)),k=e.info.isAdmin?a.templates.userList(e.info)+k:k+a.templates.userList(e.info),T[e.id]=e.info)}),f.data("users",T).data("user",T[t.me.id]).removeClass(w.loading),g.html(k),e.fn.preview!==o&&g.children().preview({type:"user",placement:"left"}),d.user.updateCount(),e.proxy(a.onJoin,g.children())()},show:function(){v.animate({width:d.width.log-d.width.userList},{duration:a.speed,easing:a.easing,complete:d.message.scroll.move})},hide:function(){v.stop().animate({width:d.width.log},{duration:a.speed,easing:a.easing,complete:d.message.scroll.move})}}},message:{scroll:{test:function(){c=v.prop("scrollHeight")-v.height(),Math.abs(v.scrollTop()-c)'+e.user.name+": ":''+e.user.name+": ",t+=""+e.text+"

"+"
"},joined:function(e){return typeof e.name!==o?'
'+e.name+" has joined the chat.
":!1},left:function(e){return typeof e.name!==o?'
'+e.name+" has left the chat.
":!1},userList:function(e){var t="";return e.isAdmin&&(e.color="#55356A"),t+='
'+'
'+' '+"
",t+=e.color!==o?'

'+e.name+"

":'

'+e.name+"

",t+="
"}}}}(jQuery,window,document),function(e,t,n,o){e.fn.checkbox=function(t){var n,i=e(this),a=e.extend(!0,{},e.fn.checkbox.settings,t),r="."+a.namespace,s="module-"+a.namespace,l=i.selector||"",c=(new Date).getTime(),u=[],d=arguments[0],f="string"==typeof d,m=[].slice.call(arguments,1);return i.each(function(){var t,p=e(this),g=e(this).find(a.selector.input),h=p.selector||"",v=this,b=p.data("module-"+a.namespace),y=a.className,x=a.namespace,w=a.errors;t={initialize:function(){a.context&&""!==h?(t.verbose("Initializing checkbox with delegated events",p),e(v,a.context).on(h,"click"+r,t.toggle).data(s,t)):(t.verbose("Initializing checkbox with bound events",p),p.on("click"+r,t.toggle).data(s,t))},destroy:function(){t.verbose("Destroying previous module for",p),p.off(x)},is:{radio:function(){return p.hasClass(y.radio)}},can:{disable:function(){return"boolean"==typeof a.required?a.required:!t.is.radio()}},enable:function(){t.debug("Enabling checkbox"),p.addClass(y.active),g.prop("checked",!0),e.proxy(a.onChange,g.get())(),e.proxy(a.onEnable,g.get())()},disable:function(){t.debug("Disabling checkbox"),p.removeClass(y.active),g.prop("checked",!1),e.proxy(a.onChange,g.get())(),e.proxy(a.onDisable,g.get())()},toggle:function(){t.verbose("Toggling checkbox state"),g.prop("checked")!==o&&g.prop("checked")?t.can.disable()&&t.disable():t.enable()},setting:function(n,i){return i===o?a[n]:(e.isPlainObject(n)?(t.verbose("Modifying settings object",n,i),e.extend(!0,a,n)):(t.verbose("Modifying setting",n,i),a[n]=i),o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?(t.verbose("Modifying internal property",n,i),e.extend(!0,t,n)):(t.verbose("Changing internal method to",i),t[n]=i),o)},debug:function(){a.debug&&(a.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},verbose:function(){a.verbose&&a.debug&&(a.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,a.moduleName+":")},performance:{log:function(e){var n,o,i;a.performance&&(n=(new Date).getTime(),i=c||n,o=n-i,c=n,u.push({Element:v,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=a.moduleName,n=(a.moduleName+": "+l+"("+i.size()+" elements)",0);l&&(t+=" Performance ("+l+")"),(console.group!==o||console.table!==o)&&u.length>0&&(console.groupCollapsed(t),console.table?(e.each(u,function(e,t){n+=t["Execution Time"]}),console.table(u)):e.each(u,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),u=[],c=!1)}},invoke:function(n,i,a){var r,s;return i=i||m,a=v||a,"string"==typeof n&&b!==o&&(n=n.split("."),r=n.length-1,e.each(n,function(n,i){return e.isPlainObject(b[i])&&n!=r?(b=b[i],!0):b[i]!==o?(s=b[i],!0):(t.error(w.method),!1)})),e.isFunction(s)?(t.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},f?(b===o&&t.initialize(),n=t.invoke(d)):(b!==o&&t.destroy(),t.initialize())}),n?n:this},e.fn.checkbox.settings={moduleName:"Checkbox Module",namespace:"checkbox",verbose:!0,debug:!0,performance:!0,context:!1,required:"auto",onChange:function(){},onEnable:function(){},onDisable:function(){},errors:{method:"The method you called is not defined."},selector:{input:"input"},className:{active:"active",radio:"radio"}}}(jQuery,window,document),function(e,t,n,o){e.fn.dropdown=function(t){var i,a=e(this),r=e(n),s=e.extend(!0,{},e.fn.dropdown.settings,t),l="."+s.namespace,c="module-"+s.namespace,u=(a.selector||"",(new Date).getTime()),d=[],f=arguments[0],m="string"==typeof f,p=[].slice.call(arguments,1);return a.each(function(){var t,g=e(this),h=e(this).find(s.selector.menu),v=e(this).find(s.selector.item),b=e(this).find(s.selector.text),y=e(this).find(s.selector.input),x="ontouchstart"in n.documentElement,w=g.selector||"",C=this,k=g.data("module-"+s.namespace),T=s.className,N=s.metadata,z=s.namespace,P=s.animation,A=s.errors;t={initialize:function(){t.verbose("Initializing dropdown with bound events",g),x?g.on("touchstart"+l,t.event.test.toggle):"click"==s.on?g.on("click"+l,t.event.test.toggle):"hover"==s.on?g.on("mouseenter"+l,t.show).on("mouseleave"+l,t.delayedHide):g.on(s.on+l,t.toggle),"form"==s.action&&t.set.selected(),v.on(t.get.selectEvent()+l,t.event.item.click),g.data(c,t)},destroy:function(){t.verbose("Destroying previous module for",g),g.off(z)},event:{stopPropagation:function(e){e.stopPropagation()},test:{toggle:function(e){t.intent.test(e,t.toggle),e.stopPropagation()},hide:function(e){t.intent.test(e,t.hide),e.stopPropagation()}},item:{click:function(){var n=e(this),o=n.data(N.text)||n.text(),i=n.data(N.value)||o;t.verbose("Adding active state to selected item"),v.removeClass(T.active),n.addClass(T.active),t.action.determine(o,i),e.proxy(s.onChange,h.get())(o,i)}}},intent:{test:function(n,o){t.debug("Determining whether event occurred in dropdown",n.target),o=o||function(){},0===e(n.target).closest(h).size()?(t.verbose("Triggering event",o),o()):t.verbose("Event occurred in dropdown, canceling callback")},bind:function(){t.verbose("Binding hide intent event to document"),r.on(t.get.selectEvent(),t.event.test.hide)},unbind:function(){t.verbose("Removing hide intent event from document"),r.off(t.get.selectEvent())}},action:{determine:function(n,o){e.isFunction(t.action[s.action])?(t.verbose("Triggering preset action",s.action),t.action[s.action](n,o)):e.isFunction(s.action)?(t.verbose("Triggering user action",s.action),s.action(n,o)):t.error(A.action)},nothing:function(){},hide:function(){t.hide()},changeText:function(e){t.set.text(e),t.hide()},form:function(e,n){t.set.text(e),t.set.value(n),t.hide()}},get:{selectEvent:function(){return x?"touchstart":"click"},text:function(){return b.text()},value:function(){return y.val()},item:function(t){var n;return t=t||y.val(),v.each(function(){e(this).data(N.value)==t&&(n=e(this))}),n||!1}},set:{text:function(e){t.debug("Changing text",e),b.text(e)},value:function(e){t.debug("Adding selected value to hidden input",e),y.val(e)},selected:function(e){var n,o=(e||y.val(),t.get.item(e));o&&(t.debug("Setting selected menu item to",o),n=o.data(N.text)||o.text(),v.removeClass(T.active),o.addClass(T.active),t.set.text(n))}},is:{visible:function(){return h.is(":visible")},hidden:function(){return h.is(":not(:visible)")}},can:{click:function(){return x||"click"==s.on},show:function(){return!g.hasClass(T.disabled)}},animate:{show:function(){t.verbose("Doing menu showing animation"),"show"==P.show?h.show():"slide"==P.show&&h.clearQueue().children().clearQueue().css("opacity",0).delay(100).animate({opacity:1},300,"easeOutQuad").end().slideDown(200,"easeOutQuad")},hide:function(){t.verbose("Doing menu hiding animation"),"hide"==P.hide?h.hide():"slide"==P.hide&&h.clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},300,"easeOutQuad").end().delay(100).slideUp(200,"easeOutQuad")}},show:function(){clearTimeout(t.graceTimer),t.is.visible()||(t.debug("Showing dropdown"),g.addClass(T.visible),t.animate.show(),t.can.click()&&t.intent.bind(),e.proxy(s.onShow,h.get())())},delayedHide:function(){t.verbose("User moused away setting timer to hide dropdown"),t.graceTimer=setTimeout(t.hide,s.gracePeriod)},hide:function(){t.is.hidden()||(t.debug("Hiding dropdown"),g.removeClass(T.visible),t.can.click()&&t.intent.unbind(),t.animate.hide(),e.proxy(s.onHide,h.get())())},toggle:function(){t.verbose("Toggling menu visibility"),t.can.show()?t.show():t.hide()},setting:function(t,n){return n===o?s[t]:(e.isPlainObject(t)?e.extend(!0,s,t):s[t]=n,o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?e.extend(!0,t,n):t[n]=i,o)},debug:function(){s.debug&&(s.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},verbose:function(){s.verbose&&s.debug&&(s.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,s.moduleName+":")},performance:{log:function(e){var n,o,i;s.performance&&(n=(new Date).getTime(),i=u||n,o=n-i,u=n,d.push({Element:C,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=s.moduleName,n=(s.moduleName+": "+w+"("+a.size()+" elements)",0);w&&(t+=" Performance ("+w+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(n,i,a){var r,s;return i=i||p,a=C||a,"string"==typeof n&&k!==o&&(n=n.split("."),r=n.length-1,e.each(n,function(n,i){return e.isPlainObject(k[i])&&n!=r?(k=k[i],!0):k[i]!==o?(s=k[i],!0):(t.error(A.method),!1)})),e.isFunction(s)?(t.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},m?(k===o&&t.initialize(),i=t.invoke(f)):(k!==o&&t.destroy(),t.initialize())}),i?i:this},e.fn.dropdown.settings={moduleName:"Dropdown Module",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",gracePeriod:300,action:"hide",animation:{show:"slide",hide:"slide"},onChange:function(){},onShow:function(){},onHide:function(){},errors:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined."},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",disabled:"disabled",visible:"visible"}}}(jQuery,window,document),function(e,t,n,o){e.fn.form=function(t,i){var a,r=e(this),s=(e(n),e.extend(!0,{},e.fn.form.settings,i)),l=("."+s.namespace,"module-"+s.namespace,r.selector||""),c=(new Date).getTime(),u=[],d=arguments[0],f="string"==typeof d,m=[].slice.call(arguments,1);return r.each(function(){var n,i=e(this),p=e(this).find(s.selector.group),g=e(this).find(s.selector.field),h=(e(this).find(s.selector.prompt),[]),v=this,b=i.data("module-"+s.namespace),y=s.namespace,x=s.metadata,w=s.className,C=s.errors;n={initialize:function(){n.verbose("Initializing form validation"),t===o&&e.isEmptyObject(t)?n.error(C.noFields,i):"submit"==s.on&&i.on("submit."+y,n.validate.form)},destroy:function(){i.off(y)},refresh:function(){g=i.find(s.selector.field)},field:{find:function(t){return n.refresh(),g.filter("#"+t).size()>0?g.filter("#"+t):g.filter('[name="'+t+'"]').size()>0?g.filter('[name="'+t+'"]'):g.filter("[data-"+x.validate+'="'+t+'"]').size()>0?g.filter("[data-"+x.validate+'="'+t+'"]'):e("")},add:{error:function(t,o){var i=n.field.find(t.identifier),a=i.closest(p),r=p.find(r),l=0!==r.size();a.addClass(w.error),s.inlineError&&(l||(r=e("
").addClass(w.prompt).insertBefore(i)),r.html(o[0]).fadeIn(s.animateSpeed))}},remove:{error:function(e){var t=n.field.find(e.identifier),o=t.closest(p),i=p.find(i);o.removeClass(w.error),s.inlineError&&i.hide()}}},validate:{form:function(o){var i=!0;return h=[],e.each(t,function(e,t){n.validate.field(t)||(i=!1)}),i?e.proxy(s.onSuccess,this)(o):e.proxy(s.onFailure,this)(h)},field:function(t){var i=n.field.find(t.identifier),a=!0,r=[];return t.rules!==o&&e.each(t.rules,function(e,o){n.validate.rule(t,o)||(n.debug("Field is invalid",t.identifier,o.type),r.push(o.prompt),a=!1)}),a?(n.field.remove.error(t,r),s.onValid(i),!0):(h=h.concat(r),n.field.add.error(t,r),e.proxy(s.onInvalid,i)(r),!1)},rule:function(t,a){var r,l,c=n.field.find(t.identifier),u=a.type,d=c.val(),f=/\[(.*?)\]/i,m=f.exec(u),p=!0;return m!==o&&null!=m?(r=m[1],l=u.replace(m[0],""),p=e.proxy(s.rules[l],i)(d,r)):p="checked"==u?c.filter(":checked").size()>0:s.rules[u](d),p}},setting:function(t,n){return n===o?s[t]:(e.isPlainObject(t)?e.extend(!0,s,t):s[t]=n,o)},internal:function(t,i){return i===o?n[t]:(e.isPlainObject(t)?e.extend(!0,n,t):n[t]=i,o)},debug:function(){s.debug&&(n.performance.log(arguments[0]),n.debug=Function.prototype.bind.call(console.log,console,s.moduleName+":"))},verbose:function(){s.verbose&&s.debug&&(n.performance.log(arguments[0]),n.verbose=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},error:function(){n.error=Function.prototype.bind.call(console.log,console,s.moduleName+":")},performance:{log:function(e){var t,o,i;s.performance&&(t=(new Date).getTime(),i=c||t,o=t-i,c=t,u.push({Element:v,Name:e,"Execution Time":o}),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,100))},display:function(){var t=s.moduleName,n=(s.moduleName+": "+l+"("+r.size()+" elements)",0);l&&(t+="Performance ("+l+")"),(console.group!==o||console.table!==o)&&u.length>0&&(console.groupCollapsed(t),console.table?(e.each(u,function(e,t){n+=t["Execution Time"]}),console.table(u)):e.each(u,function(e,t){n+=t["Execution Time"]}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),u=[],c=!1)}},invoke:function(t,i,a){var r,s;return i=i||m,a=v||a,"string"==typeof t&&b!==o&&(t=t.split("."),r=t.length-1,e.each(t,function(t,i){return e.isPlainObject(b[i])&&t!=r?(b=b[i],!0):b[i]!==o?(s=b[i],!0):(n.error(C.method),!1)})),e.isFunction(s)?(n.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},f?(b===o&&n.initialize(),a=n.invoke(d)):(b!==o&&n.destroy(),n.initialize())}),a?a:this},e.fn.form.settings={moduleName:"Validate Form Module",debug:!0,verbose:!1,namespace:"validate",animateSpeed:150,inlineError:!1,on:"submit",onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{validate:"validate"},errors:{method:"The method you called is not defined.",noFields:"No validation object specified."},selector:{group:".field",prompt:".prompt",field:"input, textarea, select"},className:{error:"error",prompt:"prompt"},defaults:{firstName:{identifier:"first-name",rules:[{type:"empty",prompt:"Please enter your first name"}]},lastName:{identifier:"last-name",rules:[{type:"empty",prompt:"Please enter your last name"}]},username:{identifier:"username",rules:[{type:"email",prompt:"Please enter a username"}]},email:{identifier:"email",rules:[{type:"empty",prompt:"Please enter your email"},{type:"email",prompt:"Please enter a valid email"}]},password:{identifier:"password",rules:[{type:"empty",prompt:"Please enter a password"},{type:"length[6]",prompt:"Your password must be at least 6 characters"}]},passwordConfirm:{identifier:"password-confirm",rules:[{type:"empty",prompt:"Please confirm your password"},{identifier:"password-confirm",type:"match[password]",prompt:"Please verify password matches"}]},terms:{identifier:"terms",rules:[{type:"checked",prompt:"You must agree to the terms and conditions"}]}},rules:{empty:function(e){return!(e===o||""===e)},email:function(e){var t=RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?");return t.test(e)},length:function(e,t){return e!==o?e.length>=t:!1},not:function(e,t){return e!=t},maxLength:function(e,t){return e!==o?t>=e.length:!1},match:function(t,n){var i,a=e(this);return a.find("#"+n).size()>0?i=a.find("#"+n).val():a.find("[name="+n+"]").size()>0?i=a.find("[name="+n+"]").val():a.find('[data-validate="'+n+'"]').size()>0&&(i=a.find('[data-validate="'+n+'"]').val()),i!==o?""+t==""+i:!1},url:function(e){var t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)}}}}(jQuery,window,document),function(e,t,n,o){e.dimScreen=function(t){var n="function"==typeof t?e.extend({},e.fn.modal.settings,{dim:t}):e.extend({},e.fn.modal.settings,t),o=e(n.context),i=o.children(n.selector.dimmer),a=i.size()>0,r=i.css("opacity");return a||(i=e("
").attr("id","dimmer").html('
'),o.append(i)),r!=n.opacity&&(i.one("click",function(){n.unDim(),e.unDimScreen()}),0===n.duration?i.css({visibility:"visible"}).find(".content").css({opacity:n.opacity,visibility:"visible"}):i.css({visibility:"visible"}).find(".content").css({opacity:0,visibility:"visible"}).fadeTo(n.duration,n.opacity,n.dim)),this},e.unDimScreen=function(t){var n="function"==typeof t?e.extend({},e.fn.modal.settings,{unDim:t}):e.extend({},e.fn.modal.settings,t),o=e(n.context),i=o.children(n.selector.dimmer),a=i.size()>0;return a&&(n.unDim(),0===n.duration?i.css({visibility:"hidden"}).remove():i.find(".content").fadeTo(n.duration,0,function(){i.remove()})),this},e.fn.modal=function(i){var a,r=e.extend(!0,{},e.fn.modal.settings,i),s=arguments[0],l=[].slice.call(arguments,1);return e(this).each(function(){var i,c=e(this),u=c.find(r.selector.closeButton),d=(e(r.context).find(r.selector.dimmer),e(r.context).children(r.selector.modal)),f=d.not(c),m=c.data("module-"+r.namespace),p="string"==typeof s,g=(r.className,r.namespace);i={initialize:function(){c.on("modalShow."+g,i.show).on("modalHide."+g,i.hide).data("module-"+g,i)},show:function(){var i=c.outerHeight(),a=e(t).height(),s=i>a,l=s?"absolute":"fixed",d=s?"0":"50%",m=s?a/8:-((i-r.closeSpacing)/2),p="absolute"==c.css("position")?m+e(t).prop("pageYOffset"):m,h=p+r.animationOffset;e.fn.popIn!==o?c.addClass(l).css({display:"block",opacity:0,top:d,marginTop:p+"px"}).popIn():c.addClass(l).css({display:"block",opacity:0,top:d,marginTop:h+"px"}).animate({opacity:1,marginTop:p+"px"},r.duration+300,r.easing),f.is(":visible")&&f.filter(":visible").hide(),e.dimScreen({context:r.context,duration:0,dim:function(){e(n).on("keyup."+g,function(e){var t=e.which,n=27;switch(t){case n:c.trigger("modalHide"),e.preventDefault()}}),u.one("click",function(){c.trigger("modalHide")}),r.dim()},unDim:function(){c.trigger("modalHide"),u.unbind("click")}})},hide:function(){e(n).off("keyup."+g),e.unDimScreen({duration:0,unDim:function(){c.popOut(200),r.unDim()}})},setting:function(e,t){return t===o?r[e]:(r[e]=t,o)},debug:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};r.debug&&(e.push(t),o.apply(console,e.concat(n)))},error:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.warn||console.log||function(){};r.debug&&(e.push(t),e.concat(n),o.apply(console,e.concat(n)))},invoke:function(t,n,a){var s,l;return a=a||[].slice.call(arguments,2),"string"==typeof t&&m!==o&&(t=t.split("."),s=t.length-1,e.each(t,function(t,n){return e.isPlainObject(m[n])&&t!=s?(m=m[n],!0):m[n]!==o?(l=m[n],!0):(i.error(r.errors.method),!1)})),e.isFunction(l)?l.apply(n,a):l}},p?a=i.invoke(s,this,l):i.initialize()}),a!==o?a:this},e.fn.modal.settings={moduleName:"Modal",debug:!1,namespace:"modal",errors:{method:"The method you called is not defined"},dim:function(){},unDim:function(){},hide:function(){},show:function(){},context:"body",opacity:.8,closeSpacing:25,animationOffset:15,duration:400,easing:"easeOutExpo",selector:{dimmer:"#dimmer",modal:".modal",closeButton:".close"}}}(jQuery,window,document),function(e,t,n,o){e.fn.nag=function(n){var i=e.extend(!0,{},e.fn.nag.settings,n),a=arguments||!1;return e(this).each(function(){var n,r,s,l,c,u,d,f,m,p=e(this),g=p.find(i.selector.close),h=e(i.context),v=p.data("module"),b=i.className,y=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return m={initialize:function(){n=p.offset(),r=p.outerHeight(),s=h.outerWidth(),l=h.outerHeight(),c=h.offset(),p.data("module",m),g.on("mouseenter mouseleave",m.event.hover).on("click",m.dismiss),i.context==t&&"fixed"==i.position&&p.addClass(b.fixed),i.sticky&&("absolute"==i.position?h.on("scroll resize",m.event.scroll):e(t).on("scroll resize",m.event.scroll),e.proxy(m.event.scroll,this)()),i.followLink&&p.on("mouseenter mouseleave",m.event.hover).on("click",m.followLink),i.displayTime>0&&setTimeout(m.hide,i.displayTime),m.should.show()?p.is(":visible")||m.show():m.hide()},refresh:function(){n=p.offset(),r=p.outerHeight(),s=h.outerWidth(),l=h.outerHeight(),c=h.offset()},show:function(){e.fn.popIn!==o?p.popIn(i.duration):p.fadeIn(i.duration,i.easing)},hide:function(){p.fadeOut(i.duration,i.easing)},stick:function(){if(m.refresh(),"fixed"==i.position){var n=e(t).prop("pageYOffset")||e(t).scrollTop(),o=p.hasClass(b.bottom)?c.top+(l-r)-n:c.top-n;p.css({position:"fixed",top:o,left:c.left,width:s-i.scrollBarWidth})}else p.css({top:d})},unStick:function(){p.css({top:""})},dismiss:function(){i.storageMethod&&m.storage.set(i.storedKey,i.storedValue),m.hide()},should:{show:function(){return m.storage.get(i.storedKey)==i.storedValue?!1:!0},stick:function(){return u=h.prop("pageYOffset")||h.scrollTop(),d=p.hasClass(b.bottom)?l-p.outerHeight()+u:u,d>n.top?!0:"fixed"==i.position?!0:!1}},followLink:function(){e.fn.followLink!==o&&p.followLink()},storage:{set:function(t,n){"local"==i.storageMethod&&store!==o?store.set(t,n):e.cookie!==o?e.cookie(t,n):m.error(i.errors.noStorage)},get:function(t){return"local"==i.storageMethod&&store!==o?store.get(t):e.cookie!==o?e.cookie(t):(m.error(i.errors.noStorage),o)}},event:{hover:function(){e(this).toggleClass(b.hover)},scroll:function(){f!==o&&clearTimeout(f),f=setTimeout(function(){m.should.stick()?y(m.stick):m.unStick()},i.lag)}},error:function(e){console.log("Nag Module:"+e)},invoke:function(t,n,a){var r;return a=a||Array.prototype.slice.call(arguments,2),"string"==typeof t&&v!==o&&(t=t.split("."),e.each(t,function(t,n){return e.isPlainObject(v[n])?(v=v[n],!0):e.isFunction(v[n])?(r=v[n],!0):(m.error(i.errors.method),!1)})),e.isFunction(r)?r.apply(n,a):r}},v!==o&&a?("invoke"==a[0]&&(a=Array.prototype.slice.call(a,1)),m.invoke(a[0],this,Array.prototype.slice.call(a,1))):(m.initialize(),o)}),this},e.fn.nag.settings={displayTime:0,followLink:!0,position:"fixed",scrollBarWidth:18,storageMethod:"cookie",storedKey:"nag",storedValue:"dismiss",sticky:!0,lag:0,context:t,errors:{noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",followLink:"Follow link is set but the plugin is not included"},className:{bottom:"bottom",hover:"hover",fixed:"fixed"},selector:{close:".icon.close"},speed:500,easing:"easeOutQuad"}}(jQuery,window,document),function(e,t,n,o){e.fn.popup=function(i){var a,r=e(this),s=e.extend(!0,{},e.fn.popup.settings,i),l=("."+s.namespace,"module-"+s.namespace,r.selector||""),c=(new Date).getTime(),u=[],d=arguments[0],f="string"==typeof d,m=[].slice.call(arguments,1);return r.each(function(){var i,p=e(this),g=e(t),h=p.offsetParent(),v=s.inline?p.next(s.selector.popup):g.children(s.selector.popup).last(),b=0,y=this,x=p.data("module-"+s.namespace),w=s.selector,C=s.className,k=s.error,T=s.metadata,N=s.namespace;i={initialize:function(){"hover"==s.on?p.on("mouseenter."+N,i.event.mouseenter).on("mouseleave."+N,i.event.mouseleave):p.on(s.on+"."+N,i.event[s.on]),g.on("resize."+N,i.event.resize),p.data("module-"+N,i)},refresh:function(){v=s.inline?p.next(w.popup):g.children(w.popup).last(),h=p.offsetParent()},destroy:function(){i.debug("Destroying existing popups"),p.off("."+N),v.remove()},event:{mouseenter:function(t){var n=this;i.timer=setTimeout(function(){e.proxy(i.toggle,n)(),e(n).hasClass(C.visible)&&t.stopPropagation()},s.delay)},mouseleave:function(){clearTimeout(i.timer),p.is(":visible")&&i.hide()},click:function(t){e.proxy(i.toggle,this)(),e(this).hasClass(C.visible)&&t.stopPropagation()},resize:function(){v.is(":visible")&&i.position()}},create:function(){i.debug("Creating pop-up content");var t=p.data(T.html)||s.html,n=p.data(T.title)||s.title,o=p.data(T.content)||p.attr("title")||s.content;t||o||n?(t||(t=s.template({title:n,content:o})),v=e("
").addClass(C.popup).html(t),s.inline?v.insertAfter(p):v.appendTo(e("body"))):i.error(k.content)},remove:function(){v.remove()},get:{offstagePosition:function(){var n={top:e(t).scrollTop(),bottom:e(t).scrollTop()+e(t).height(),left:0,right:e(t).width()},o={width:v.outerWidth(),height:v.outerHeight(),position:v.offset()},i={},a=[];return o.position&&(i={top:o.position.topn.bottom,right:o.position.left+o.width>n.right,left:o.position.left0?a.join(" "):!1},nextPosition:function(e){switch(e){case"top left":e="bottom left";break;case"bottom left":e="top right";break;case"top right":e="bottom right";break;case"bottom right":e="top center";break;case"top center":e="bottom center";break;case"bottom center":e="right center";break;case"right center":e="left center";break;case"left center":e="top center" -}return e}},toggle:function(){p=e(this),i.debug("Toggling pop-up"),i.refresh(),0===v.size()&&i.create(),p.hasClass(C.visible)?i.hide():i.position()&&i.show()},position:function(n,o){var a,r,l=(e(t).width(),e(t).height(),p.outerWidth()),c=p.outerHeight(),u=v.outerWidth(),d=v.outerHeight(),f=s.inline?p.position():p.offset(),m=s.inline?h.outerWidth():g.outerWidth(),y=s.inline?h.outerHeight():g.outerHeight();switch(n=n||p.data(T.position)||s.position,o=o||p.data(T.arrowOffset)||s.arrowOffset,i.debug("Calculating offset for position",n),n){case"top left":a={top:"auto",bottom:y-f.top+s.distanceAway,left:f.left+o};break;case"top center":a={bottom:y-f.top+s.distanceAway,left:f.left+l/2-u/2+o,top:"auto",right:"auto"};break;case"top right":a={bottom:y-f.top+s.distanceAway,right:m-f.left-l-o,top:"auto",left:"auto"};break;case"left center":a={top:f.top+c/2-d/2,right:m-f.left+s.distanceAway-o,left:"auto",bottom:"auto"};break;case"right center":a={top:f.top+c/2-d/2,left:f.left+l+s.distanceAway+o,bottom:"auto",right:"auto"};break;case"bottom left":a={top:f.top+c+s.distanceAway,left:f.left+o,bottom:"auto",right:"auto"};break;case"bottom center":a={top:f.top+c+s.distanceAway,left:f.left+l/2-u/2+o,bottom:"auto",right:"auto"};break;case"bottom right":a={top:f.top+c+s.distanceAway,right:m-f.left-l-o,left:"auto",bottom:"auto"}}return e.extend(a,{width:v.width()+1}),v.removeAttr("style").removeClass("top right bottom left center").css(a).addClass(n).addClass(C.loading),r=i.get.offstagePosition(),r?(i.debug("Element is outside boundaries ",r),s.maxSearchDepth>b?(n=i.get.nextPosition(n),b++,i.debug("Trying new position: ",n),i.position(n)):(i.error(k.recursion),b=0,!1)):(i.debug("Position is on stage",n),b=0,!0)},show:function(){i.debug("Showing pop-up"),e(w.popup).filter(":visible").stop().fadeOut(200).prev(p).removeClass(C.visible),p.addClass(C.visible),v.removeClass(C.loading),"pop"==s.animation&&e.fn.popIn!==o?v.stop().popIn(s.duration,s.easing):v.stop().fadeIn(s.duration,s.easing),"click"==s.on&&s.clicktoClose&&(i.debug("Binding popup close event"),e(n).on("click."+N,i.gracefully.hide)),e.proxy(s.onShow,v)()},hide:function(){p.removeClass(C.visible),v.is(":visible")&&(i.debug("Hiding pop-up"),"pop"==s.animation&&e.fn.popOut!==o?v.stop().popOut(s.duration,s.easing,function(){v.hide()}):v.stop().fadeOut(s.duration,s.easing)),"click"==s.on&&s.clicktoClose&&e(n).off("click."+N),e.proxy(s.onHide,v)(),s.inline||i.remove()},gracefully:{hide:function(t){0===e(t.target).closest(w.popup).size()&&i.hide()}},setting:function(t,n){return n===o?s[t]:(e.isPlainObject(t)?e.extend(!0,s,t):s[t]=n,o)},internal:function(t,n){return n===o?i[t]:(e.isPlainObject(t)?e.extend(!0,i,t):i[t]=n,o)},debug:function(){s.debug&&(s.performance?i.performance.log(arguments):i.debug=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},verbose:function(){s.verbose&&s.debug&&(s.performance?i.performance.log(arguments):i.verbose=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},error:function(){i.error=Function.prototype.bind.call(console.log,console,s.moduleName+":")},performance:{log:function(e){var t,n,o;s.performance&&(t=(new Date).getTime(),o=c||t,n=t-o,c=t,u.push({Element:y,Name:e[0],Arguments:e[1]||"None","Execution Time":n}),clearTimeout(i.performance.timer),i.performance.timer=setTimeout(i.performance.display,100))},display:function(){var t=s.moduleName,n=(s.moduleName+": "+l+"("+r.size()+" elements)",0);l&&(t+=" Performance ("+l+")"),(console.group!==o||console.table!==o)&&u.length>0&&(console.groupCollapsed(t),console.table?(e.each(u,function(e,t){n+=t["Execution Time"]}),console.table(u)):e.each(u,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),u=[],c=!1)}},invoke:function(t,n,a){var r,s;return n=n||m,a=y||a,"string"==typeof t&&x!==o&&(t=t.split("."),r=t.length-1,e.each(t,function(t,n){return e.isPlainObject(x[n])&&t!=r?(x=x[n],!0):x[n]!==o?(s=x[n],!0):(i.error(k.method),!1)})),e.isFunction(s)?(i.verbose("Executing invoked function",s),s.apply(a,n)):s||!1}},f?(x===o&&i.initialize(),a=i.invoke(d)):(x!==o&&i.destroy(),i.initialize())}),a?a:this},e.fn.popup.settings={moduleName:"Pop-up Module",debug:!0,verbose:!0,performance:!0,namespace:"popup",onShow:function(){},onHide:function(){},content:!1,html:!1,title:!1,on:"hover",clicktoClose:!0,position:"top center",delay:0,inline:!0,duration:250,easing:"easeOutQuint",animation:"pop",distanceAway:2,arrowOffset:0,maxSearchDepth:10,error:{content:"Warning: Your popup has no content specified",method:"The method you called is not defined.",recursion:"Popup attempted to reposition element to fit, but could not find an adequate position."},metadata:{content:"content",html:"html",title:"title",position:"position",arrowOffset:"arrowOffset"},className:{popup:"ui popup",visible:"visible",loading:"loading"},selector:{popup:".ui.popup"},template:function(e){var t="";return typeof e!==o&&(typeof e.title!==o&&e.title&&(t+="

"+e.title+"

"),typeof e.content!==o&&e.content&&(t+='
'+e.content+"
")),t}}}(jQuery,window,document),function(e,t,n,o){e.fn.searchPrompt=function(n,i){var a,r=e.extend(!0,{},e.fn.searchPrompt.settings,i),s=arguments[0],l=[].slice.call(arguments,1);return e(this).each(function(){var i,c=e(this),u=c.find(r.selector.searchPrompt),d=c.find(r.selector.searchButton),f=c.find(r.selector.searchResults),m=(c.find(r.selector.result),c.find(r.selector.category),c.find(r.selector.emptyResult),c.find(r.selector.resultPage),this),p=(c.selector||"",c.data("module-"+r.namespace)),g=p!==o&&"string"==typeof s,h=r.className,v=r.namespace,b=r.errors;i={initialize:function(){var e=u[0],t=e.oninput!==o?"input":e.onpropertychange!==o?"propertychange":"keyup";u.on("focus."+v,i.event.focus).on("blur."+v,i.event.blur).on("keydown."+v,i.handleKeyboard),r.automatic&&u.on(t+"."+v,i.search.throttle),d.on("click."+v,i.search.query),f.on("click."+v,r.selector.result,i.results.select),c.data("module-"+v,i)},event:{focus:function(){c.addClass(h.focus),i.results.show()},blur:function(){i.search.cancel(),c.removeClass(h.focus),i.results.hide()}},handleKeyboard:function(t){var n,o=c.find(r.selector.result),a=c.find(r.selector.category),s=t.which,l={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},m=h.active,p=o.index(o.filter("."+m)),g=o.size();if(s==l.escape&&u.trigger("blur"),f.filter(":visible").size()>0)if(s==l.enter){if(o.filter("."+m).exists())return e.proxy(i.results.select,o.filter("."+m))(),t.preventDefault(),!1}else s==l.upArrow?(n=0>p-1?p:p-1,a.removeClass(m),o.removeClass(m).eq(n).addClass(m).closest(a).addClass(m),t.preventDefault()):s==l.downArrow&&(n=p+1>=g?p:p+1,a.removeClass(m),o.removeClass(m).eq(n).addClass(m).closest(a).addClass(m),t.preventDefault());else s==l.enter&&(i.search.query(),d.addClass(h.down),u.one("keyup",function(){d.removeClass(h.down)}))},search:{cancel:function(){var e=c.data("xhr")||!1;e&&"resolved"!=e.state()&&e.abort()},throttle:function(){var e,t=u.val(),n=t.length;clearTimeout(c.data("timer")),n>=r.minCharacters?(e=setTimeout(i.search.query,r.searchThrottle),c.data("timer",e)):i.results.hide()},query:function(){var t=u.val(),o=i.search.cache.read(t);o?(i.debug("Reading result for '"+t+"' from cache"),i.results.add(o)):(i.debug("Querying for '"+t+"'"),"object"==typeof n?i.search.local(t):i.search.remote(t),e.proxy(r.onSearchQuery,c)(t))},local:function(t){var o,a=[],s=[],l=e.isArray(r.searchFields)?r.searchFields:[r.searchFields],u=RegExp("(?:s|^)"+t,"i"),d=RegExp(t,"i");c.addClass(h.loading),e.each(l,function(t,o){e.each(n,function(t,n){"string"==typeof n[o]&&-1==e.inArray(n,a)&&-1==e.inArray(n,s)&&(u.test(n[o])?a.push(n):d.test(n[o])&&s.push(n))})}),o=i.results.generate({results:e.merge(a,s)}),c.removeClass(h.loading),i.search.cache.write(t,o),i.results.add(o)},remote:function(t){var a,s=c.data("xhr")!==o?c.data("xhr"):!1,l={stateContext:c,url:n,urlData:{query:t},success:function(e){a=i.results.generate(e),i.search.cache.write(t,a),i.results.add(a)},failure:i.error};s&&"resolved"!=s.state()&&s.abort(),e.extend(!0,l,r.apiSettings),e.api(l)},cache:{read:function(e){var t=c.data("cache");return r.cache&&"object"==typeof t&&t[e]!==o?t[e]:!1},write:function(e,t){var n=c.data("cache")!==o?c.data("cache"):{};n[e]=t,c.data("cache",n)}}},results:{generate:function(t){i.debug("Generating html from response",t);var n=r.templates[r.type],o="";return e.isPlainObject(t.results)&&!e.isEmptyObject(t.results)||e.isArray(t.results)&&t.results.length>0?(r.maxResults>0&&(t.results=e.makeArray(t.results).slice(0,r.maxResults)),t.results.length>0&&(e.isFunction(n)?o=n(t):i.error(b.noTemplate,!1))):o=i.message(b.noResults,"empty"),e.proxy(r.onSearchResults,c)(t),o},add:function(t){("default"==r.onResultsAdd||"default"==e.proxy(r.onResultsAdd,f)(t))&&f.html(t),i.results.show()},show:function(){0===f.filter(":visible").size()&&u.filter(":focus").size()>0&&""!==f.html()&&(f.stop().fadeIn(200),e.proxy(r.onResultsOpen,f)())},hide:function(){f.filter(":visible").size()>0&&(f.stop().fadeOut(200),e.proxy(r.onResultsClose,f)())},followLink:function(){},select:function(n){i.debug("Search result selected");var o=e(this),a=o.find(".title"),s=a.html();if("default"==r.onSelect||"default"==e.proxy(r.onSelect,this)(n)){var l=o.find("a[href]").eq(0),c=l.attr("href"),d=l.attr("target");try{i.results.hide(),u.val(s),"_blank"==d||n.ctrlKey?t.open(c):t.location.href=c}catch(f){}}}},setting:function(e,t){return t===o?r[e]:(r[e]=t,o)},debug:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};o=Function.prototype.bind.call(o,console),r.debug&&(e.push(t),o.apply(console,e.concat(n)))},message:function(e,t){return t=t||"standard",i.results.add(r.templates.message(e,t)),r.templates.message(e,t)},error:function(e,t){t=t!==o?t:!0,console.warn(r.moduleName+": "+e),t&&e!==o&&i.message(e,"error")},invoke:function(t,n,a){var r,s;return a=a||[].slice.call(arguments,2),"string"==typeof t&&p!==o&&(t=t.split("."),r=t.length-1,e.each(t,function(t,n){return e.isPlainObject(p[n])&&t!=r?(p=p[n],!0):p[n]!==o?(s=p[n],!0):(i.error(b.method),!1)})),e.isFunction(s)?s.apply(n,a):s}},g?a=i.invoke(s,m,l):i.initialize()}),a!==o?a:this},e.fn.searchPrompt.settings={moduleName:"Search Module",debug:!0,namespace:"search",onSelect:"default",onResultsAdd:"default",onSearchQuery:function(){},onSearchResults:function(){},onResultsOpen:function(){},onResultsClose:function(){},automatic:"true",type:"simple",minCharacters:3,searchThrottle:300,maxResults:7,cache:!0,searchFields:["title","description"],apiSettings:{},className:{active:"active",down:"down",focus:"focus",empty:"empty",loading:"loading"},errors:{noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noTemplate:"A valid template name was not specified.",serverError:"There was an issue with querying the server.",method:"The method you called is not defined."},selector:{searchPrompt:".prompt",searchButton:".search.button",searchResults:".results",category:".category",result:".result",emptyResult:".results .message",resultPage:".results .page"},templates:{message:function(e,t){var n="";return e!==o&&t!==o&&(n+='
'+'
',n+="empty"==t?"

No Results

"+e+"

":'
'+e+"
",n+="
"),n},categories:function(t){var n="";return t.results!==o?(e.each(t.results,function(t,i){i.results!==o&&i.results.length>0&&(n+='
'+i.name+"
"+"
    ",e.each(i.results,function(e,t){n+='
  • ',n+='',t.image!==o&&(n+='
    '+"
    "),n+=t.image!==o?'
    ':'
    ',t.price!==o&&(n+='
    '+t.price+"
    "),t.title!==o&&(n+='
    '+t.title+"
    "),t.description!==o&&(n+='
    '+t.description+"
    "),n+="
  • "}),n+="
")}),t.resultPage&&(n+=''+t.resultPage.text+""),n):!1},simple:function(t){var n="";return t.results!==o?(n+="
    ",e.each(t.results,function(e,t){n+='
  • ',t.url!==o&&(n+=''),t.image!==o&&(n+='
    '+"
    "),n+=t.image!==o?'
    ':'
    ',t.price!==o&&(n+='
    '+t.price+"
    "),t.title!==o&&(n+='
    '+t.title+"
    "),t.description!==o&&(n+='
    '+t.description+"
    "),n+="
  • "}),n+="
",t.resultPage&&(n+=''+t.resultPage.text+""),n):!1}}}}(jQuery,window,document),function(e,t,n,o){e.fn.shape=function(t){var i,a=e(this),r=e.extend(!0,{},e.fn.shape.settings,t),s="."+r.namespace,l="module-"+r.namespace,c=a.selector||"",u=(new Date).getTime(),d=[],f=arguments[0],m="string"==typeof f,p=[].slice.call(arguments,1);return a.each(function(){var t,g,h,v=e(this),b=v.find(r.selector.sides),y=v.find(r.selector.side),x="transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd",w=this,C=v.data(l),k=(r.namespace,r.error),T=r.className;h={initialize:function(){h.verbose("Initializing module for",w),h.set.defaultSide(),C=h,v.data(l,C)},destroy:function(){h.verbose("Destroying previous module for",w),v.removeData(l).off(s)},refresh:function(){h.verbose("Refreshing selector cache for",w),v=e(w),b=e(this).find(r.selector.shape),y=e(this).find(r.selector.side)},repaint:function(){h.verbose("Forcing repaint event");var e=b.get(0)||n.createElement("div");e.offsetWidth},animate:function(n,o){h.verbose("Animating box with properties",n),o=o||function(t){h.reset(),h.set.active(),e.proxy(r.onChange,g)(),t.stopImmediatePropagation()},r.useCSS?(h.verbose("Starting CSS animation"),v.addClass(T.animating),h.set.stageSize(),h.repaint(),v.addClass(T.css),t.addClass(T.hidden),b.css(n).one(x,o)):(h.verbose("Starting javascript animation"),v.addClass(T.animating).removeClass(T.css),h.set.stageSize(),h.repaint(),t.animate({opacity:0},r.duration,r.easing),b.animate(n,r.duration,r.easing,o))},queue:function(e){h.debug("Queueing animation of",e),b.one(x,function(){h.debug("Executing queued animation"),v.shape(e)})},reset:function(){h.verbose("Animating states reset"),v.removeClass(T.css).removeClass(T.animating).removeAttr("style"),b.removeAttr("style"),y.removeAttr("style").removeClass(T.hidden),g.removeClass(T.animating).removeAttr("style")},is:{animating:function(){return v.hasClass(T.animating)}},get:{nextSide:function(){return t.next(r.selector.side).size()>0?t.next(r.selector.side):v.find(r.selector.side).first()}},set:{defaultSide:function(){t=v.find("."+r.className.active),g=t.next(r.selector.side).size()>0?t.next(r.selector.side):v.find(r.selector.side).first(),h.verbose("Active side set to",t),h.verbose("Next side set to",g)},stageSize:function(){var e={width:g.outerWidth(),height:g.outerHeight()};h.verbose("Resizing stage to fit new content",e),v.css({width:e.width,height:e.height})},nextSide:function(e){g=v.find(e),0===g.size()&&h.error(k.side),h.verbose("Next side manually set to",g)},active:function(){h.verbose("Setting new side to active",g),y.removeClass(T.active),g.addClass(T.active),h.set.defaultSide()}},flip:{up:function(){h.debug("Flipping up",g),h.is.animating()?h.queue("flip.up"):(h.stage.above(),h.animate(h.getTransform.up()))},down:function(){h.debug("Flipping down",g),h.is.animating()?h.queue("flip.down"):(h.stage.below(),h.animate(h.getTransform.down()))},left:function(){h.debug("Flipping left",g),h.is.animating()?h.queue("flip.left"):(h.stage.left(),h.animate(h.getTransform.left()))},right:function(){h.debug("Flipping right",g),h.is.animating()?h.queue("flip.right"):(h.stage.right(),h.animate(h.getTransform.right()))},over:function(){h.debug("Flipping over",g),h.is.animating()?h.queue("flip.over"):(h.stage.behind(),h.animate(h.getTransform.behind()))}},getTransform:{up:function(){var e={y:-((t.outerHeight()-g.outerHeight())/2),z:-(t.outerHeight()/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(-90deg)"}},down:function(){var e={y:-((t.outerHeight()-g.outerHeight())/2),z:-(t.outerHeight()/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(90deg)"}},left:function(){var e={x:-((t.outerWidth()-g.outerWidth())/2),z:-(t.outerWidth()/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(90deg)"}},right:function(){var e={x:-((t.outerWidth()-g.outerWidth())/2),z:-(t.outerWidth()/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(-90deg)"}},behind:function(){var e={x:-((t.outerWidth()-g.outerWidth())/2)};return{transform:"translateX("+e.x+"px) rotateY(180deg)"}}},stage:{above:function(){var e={origin:(t.outerHeight()-g.outerHeight())/2,depth:{active:g.outerHeight()/2,next:t.outerHeight()/2}};h.verbose("Setting the initial animation position as above",g,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),g.addClass(T.animating).css({display:"block",top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px)"})},below:function(){var e={origin:(t.outerHeight()-g.outerHeight())/2,depth:{active:g.outerHeight()/2,next:t.outerHeight()/2}};h.verbose("Setting the initial animation position as below",g,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),g.addClass(T.animating).css({display:"block",top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px)"})},left:function(){var e={origin:(t.outerWidth()-g.outerWidth())/2,depth:{active:g.outerWidth()/2,next:t.outerWidth()/2}};h.verbose("Setting the initial animation position as left",g,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),g.addClass(T.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(-90deg) translateZ("+e.depth.next+"px)"})},right:function(){var e={origin:(t.outerWidth()-g.outerWidth())/2,depth:{active:g.outerWidth()/2,next:t.outerWidth()/2}};h.verbose("Setting the initial animation position as left",g,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),g.addClass(T.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(90deg) translateZ("+e.depth.next+"px)"})},behind:function(){var e={origin:(t.outerWidth()-g.outerWidth())/2,depth:{active:g.outerWidth()/2,next:t.outerWidth()/2}};h.verbose("Setting the initial animation position as behind",g,e),t.css({transform:"rotateY(0deg)"}),g.addClass(T.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(t,n){return n===o?r[t]:(e.isPlainObject(t)?(h.verbose("Modifying settings object",t,n),e.extend(!0,r,t)):(h.verbose("Modifying setting",t,n),r[t]=n),o)},internal:function(t,n){return n===o?h[t]:(e.isPlainObject(t)?(h.verbose("Modifying internal property",t,n),e.extend(!0,h,t)):(h.verbose("Changing internal method to",n),h[t]=n),o)},debug:function(){r.debug&&(r.performance?h.performance.log(arguments):h.debug=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},verbose:function(){r.verbose&&r.debug&&(r.performance?h.performance.log(arguments):h.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},error:function(){h.error=Function.prototype.bind.call(console.log,console,r.moduleName+":")},performance:{log:function(e){var t,n,o;r.performance&&(t=(new Date).getTime(),o=u||t,n=t-o,u=t,d.push({Element:w,Name:e[0],Arguments:e[1]||"None","Execution Time":n}),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,100))},display:function(){var t=r.moduleName,n=(r.moduleName+": "+c+"("+a.size()+" elements)",0);c&&(t+=" Performance ("+c+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(t,n,i){var a,r;return n=n||p,i=w||i,"string"==typeof t&&C!==o&&(t=t.split("."),a=t.length-1,e.each(t,function(t,n){return e.isPlainObject(C[n])&&t!=a?(C=C[n],!0):C[n]!==o?(r=C[n],!0):(h.error(errors.method),!1)})),e.isFunction(r)?(h.verbose("Executing invoked function",r),r.apply(i,n)):r||!1}},m?(C===o&&h.initialize(),i=h.invoke(f)):(C!==o&&h.destroy(),h.initialize())}),i?i:this},e.fn.shape.settings={moduleName:"Shape Module",debug:!0,verbose:!0,performance:!0,namespace:"shape",beforeChange:function(){},onChange:function(){},useCSS:!0,duration:1e3,easing:"easeInOutQuad",error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{css:"css",animating:"animating",hidden:"hidden",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document),function(e,t,n,o){e.fn.starReview=function(t){var n=e.extend(!0,{},e.fn.starReview.settings,t),i=arguments||!1;return e(this).each(function(){var t,a=e(this),r=a.find(n.selector.star),s=n.className,l=n.namespace,c=a.data("module");return t={settings:n,initialize:function(){n.rateable&&(e.fn.state!==o&&(a.state(),r.state()),r.bind("mouseenter."+l,t.event.mouseenter).bind("mouseleave."+l,t.event.mouseleave).bind("click."+l,t.event.click)),a.addClass(s.initialize).data("module",t)},setRating:function(t){var o=r.eq(t-1);a.removeClass(s.hover),r.removeClass(s.hover),o.nextAll().removeClass(s.active),o.addClass(s.active).prevAll().addClass(s.active),e.proxy(n.onRate,a)()},event:{mouseenter:function(){var t=e(this);t.nextAll().removeClass(s.hover),a.addClass(s.hover),t.addClass(s.hover).prevAll().addClass(s.hover)},mouseleave:function(){r.removeClass(s.hover)},click:function(){var n=e(this);t.setRating(r.index(n)+1)}},error:function(e){console.warn(n.moduleName+": "+e)},invoke:function(i,a,r){var s;return r=r||Array.prototype.slice.call(arguments,2),"string"==typeof i&&c!==o&&(i=i.split("."),e.each(i,function(o,i){return e.isPlainObject(c[i])?(c=c[i],!0):e.isFunction(c[i])?(s=c[i],!0):(t.error(n.errors.method),!1)})),e.isFunction(s)?s.apply(a,r):!1}},c!==o&&i?("invoke"==i[0]&&(i=Array.prototype.slice.call(i,1)),t.invoke(i[0],this,Array.prototype.slice.call(i,1))):(t.initialize(),o)}),this},e.fn.starReview.settings={moduleName:"Star Module",namespace:"star",rateable:!0,onRate:function(){},className:{initialize:"initialize",loading:"loading",active:"active",hover:"hover",down:"down"},selector:{star:"i"}}}(jQuery,window,document),function(e,t,n,o){e.fn.tabNavigation=function(n){var i,a,r,s,l,c=e.extend(!0,{},e.fn.tabNavigation.settings,n),u=e(this),d=e(c.context).find(c.selector.tabs),f=!0,m={},p=0,g=c.className,h=c.metadata,v=c.namespace,b=c.errors,y=u.data("module"),x=arguments[0],w=y!==o&&"string"==typeof x,C=[].slice.call(arguments,1);return s={initialize:function(){s.debug("Initializing Tabs",u),c.history&&c.path!==!1&&(e.address!==o?(s.verbose("Address library found adding state change event"),e.address.state(c.path).change(s.event.history.change)):s.error(b.state)),e.isWindow(u.get(0))||u.on("click."+v,s.event.click),u.data("module",s)},destroy:function(){s.debug("Destroying tabs",u),u.off("."+v)},event:{click:function(){s.debug("Navigation clicked");var t=e(this).data(h.tab);t!==o?t!==i&&(c.history?e.address.value(t):s.change(t)):s.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||s.get.initialPath(),i=c.templates.determineTitle(n)||!1;s.debug("History change event",n,t),r=t,n!==o&&s.change(n),i&&e.address.title(i)}}},refresh:function(){i&&(s.debug("Refreshing tab",i),s.change(i))},cache:{read:function(e){return e!==o?m[e]:m},add:function(e,t){e=e||i,s.debug("Adding cached content for",e),m[e]=t},remove:function(e){e=e||i,s.debug("Removing cached content for",e),delete m[e]}},change:function(n){var l=s.get.defaultPathArray(n);s.deactivate.all(),e.each(l,function(u,d){var p=l.slice(0,u+1),g=s.utils.arrayToPath(p),h=s.utils.last(l)==g,v=s.is.tab(g),b=!v,y=t.history&&t.history.pushState,x=y&&c.ignoreFirstLoad&&f,w=e.isPlainObject(c.apiSettings),C=s.get.tabElement(g);return s.verbose("Looking for tab",d),b?(s.verbose("Tab is not found, assuming it is a parameter",d),!0):(v&&(s.verbose("Tab was found",d),i=g,a=s.utils.filterArray(l,p),h&&w?x?(s.debug("Ignoring remote content on first tab load",g),f=!1,m[n]=C.html(),s.activate.all(g),e.proxy(c.onTabInit,C)(g,a,r)):(s.activate.navigation(g),s.content.fetch(g,c.onTabLoad)):(s.debug("Opened tab",g),s.activate.all(g),e.proxy(c.onTabLoad,C)(g,a,r))),o)})},content:{fetch:function(t){var n=s.get.tabElement(t),l=m[t]||!1,u={dataType:"html",stateContext:n,success:function(o){m[t]=o,s.content.update(t,o),t==i?(s.debug("Content loaded",t),s.activate.tab(t)):s.debug("Content loaded in background",t),e.proxy(c.onTabInit,n)(t,a,r)},urlData:{tab:t}},d=n.data(h.promise)||!1,f=d&&"pending"===d.state();c.cache&&l?(s.debug("Showing existing content",t),s.activate.tab(t),e.proxy(c.onTabLoad,n)(t,a,r)):f?(s.debug("Content is already loading",t),n.addClass(g.loading)):e.api!==o?(s.debug("Retrieving content",t),e.api(e.extend(!0,{},c.apiSettings,u))):s.error(b.api)},update:function(e,t){s.debug("Updating html for",e);var n=s.get.tabElement(e);n.html(t)}},activate:{all:function(e){s.activate.tab(e),s.activate.navigation(e)},tab:function(e){var t=s.get.tabElement(e);s.verbose("Showing tab content for",t),t.addClass(g.active)},navigation:function(e){var t=s.get.navElement(e);s.verbose("Activating tab navigation for",t),t.addClass(g.active)}},deactivate:{all:function(){s.deactivate.navigation(),s.deactivate.tabs()},navigation:function(){u.removeClass(g.active)},tabs:function(){d.removeClass(g.active+" "+g.loading)}},is:{tab:function(e){return s.get.tabElement(e).size()>0}},get:{initialPath:function(){return u.eq(0).data(h.tab)||d.eq(0).data(h.tab)},defaultPathArray:function(e){return s.utils.pathToArray(s.get.defaultPath(e))},defaultPath:function(e){var t=u.filter("[data-"+h.tab+'^="'+e+'/"]').eq(0),n=t.data(h.tab)||!1;if(n){if(s.debug("Found default tab",n),c.maxDepth>p)return p++,s.get.defaultPath(n);s.error(b.recursion)}return p=0,e},navElement:function(e){return e=e||i,u.filter("[data-"+h.tab+'="'+e+'"]')},tabElement:function(e){var t,n,o,a;return e=e||i,o=s.utils.pathToArray(e),a=s.utils.last(o),t=d.filter("[data-"+h.tab+'="'+a+'"]'),n=d.filter("[data-"+h.tab+'="'+e+'"]'),t.size()>0?t:n},tab:function(){return i}},utils:{filterArray:function(t,n){return e.grep(t,function(t){return-1==e.inArray(t,n)})},last:function(t){return e.isArray(t)?t[t.length-1]:!1},pathToArray:function(e){return e===o&&(e=i),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return e.isArray(t)?t.join("/"):!1}},setting:function(e,t){return t===o?c[e]:(c[e]=t,o)},verbose:function(){c.verbose&&s.debug.apply(this,arguments)},debug:function(){var e=[],t=c.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};o=Function.prototype.bind.call(o,console),c.debug&&(e.push(t),o.apply(console,e.concat(n)))},error:function(){var e=[],t=c.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.warn||console.log||function(){};o=Function.prototype.bind.call(o,console),c.debug&&(e.push(t),e.concat(n),o.apply(console,e.concat(n)))},invoke:function(t,n,i){var a,r;return i=i||[].slice.call(arguments,2),"string"==typeof t&&y!==o&&(t=t.split("."),a=t.length-1,e.each(t,function(t,n){return e.isPlainObject(y[n])&&t!=a?(y=y[n],!0):y[n]!==o?(r=y[n],!0):(s.error(c.errors.method),!1)})),e.isFunction(r)?r.apply(n,i):r}},w?l=s.invoke(x,this,C):s.initialize(),l!==o?l:this},e.tabNavigation=function(n){e(t).tabNavigation(n)},e.fn.tabNavigation.settings={moduleName:"Tab Module",verbose:!1,debug:!0,namespace:"tab",onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},history:!1,path:!1,context:"body",maxDepth:25,ignoreFirstLoad:!0,alwaysRefresh:!1,cache:!0,apiSettings:!1,errors:{api:"You attempted to load content without API module",noContent:"The tab you specified is missing a content url.",method:"The method you called is not defined",state:"The state library has not been initialized",missingTab:"Missing tab: ",recursion:"Max recursive depth reached"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".tab"}}}(jQuery,window,document),function(e,t,n,o){e.fn.video=function(t){var n,i=e.extend(!0,{},e.fn.video.settings,t),a=arguments||!1;return e(this).each(function(){var r,s=e(this),l=s.find(i.selector.placeholder),c=s.find(i.selector.playButton),u=s.find(i.selector.embed),d=s.data("module-"+i.namespace),f="string"==typeof t,m=i.namespace,p=i.metadata,g=i.className;r={initialize:function(){r.debug("Initializing video"),l.off(".video").on("click."+m,r.play),c.off(".video").on("click."+m,r.play),s.data("module-"+m,r)},change:function(e,t){r.debug("Changing video to ",t),s.data(p.source,e).data(p.flv,t),i.onChange()},reset:function(){r.debug("Clearing video embed and showing placeholder"),s.removeClass(g.active),u.html(" "),l.show(),i.onReset()},play:function(){r.debug("Playing video");var e=s.data(p.source),t=s.data(p.flv);u.html(r.generate.html(e,t)),s.addClass(g.active),i.onPlay()},generate:{html:function(e,t){r.debug("Generating embed html");var n,o="auto"==i.width?s.width():i.width,a="auto"==i.height?s.height():i.height;return"vimeo"==e?n='':"youtube"==e&&(n=''),n},url:function(e){var t=i.api?1:0,n=i.autoplay?1:0,o=i.hd?1:0,a=i.showUI?1:0,r=i.showUI?0:1,s="";return"vimeo"==e?(s="api="+t+"&title="+a+"&byline="+a+"&portrait="+a+"&autoplay="+n,i.color&&(s+="&color="+i.color)):"youtube"==e&&(s="enablejsapi="+t+"&autoplay="+n+"&autohide="+r+"&hq="+o+"&modestbranding=1",i.color&&(s+="&color="+i.color)),s}},debug:function(e,t){i.debug&&(t!==o?console.info(i.moduleName+": "+e,t):console.info(i.moduleName+": "+e))},error:function(e){console.warn(i.moduleName+": "+e)},invoke:function(t,n,a){var s;return a=a||Array.prototype.slice.call(arguments,2),"string"==typeof t&&d!==o&&(t=t.split("."),e.each(t,function(t,n){return e.isPlainObject(d[n])?(d=d[n],!0):e.isFunction(d[n])?(s=d[n],!0):(r.error(i.errors.method),!1)})),e.isFunction(s)?s.apply(n,a):s}},f?n=r.invoke(a[0],this,Array.prototype.slice.call(a,1)):(d&&r.destroy(),r.initialize())}),n!==o?n:this},e.fn.videoPlaylist=function(t,n){var o=e(this),i=e(t),a=i.find(".embed iframe"),r=e.extend({},e.fn.videoPlaylist.settings,n,!0);o.each(function(){var t=e(this),n=r.metadata,a=r.namespace,s=r.className,l={initialize:function(){t.on("click."+a,l.changeVideo)},changeVideo:function(){var a=t.data(n.flv)||!1,l=t.data(n.source)||!1,c=t.data(n.placeholder)||!1;if(a&&l){if(i.data(n.source,l).data(n.flv,a),r.showPlaceholder)i.removeClass(s.active).find(e.fn.video.selector.placeholder).attr("src",c);else try{i.video("play")}catch(u){console.warn("Video Playlist Module: "+r.error.init)}o.removeClass(s.active),t.addClass(s.active)}}};l.initialize()}),r.playFirst&&(o.eq(0).trigger("click"),a.size()>0&&a.attr("src",a.attr("src").replace("autoplay=1","autoplay=0")))},e.fn.video.settings={moduleName:"Video",namespace:"video",debug:!1,metadata:{source:"source",flv:"flv"},onPlay:function(){},onReset:function(){},onChange:function(){},play:function(){},pause:function(){},stop:function(){},width:"auto",height:"auto",autoplay:!1,color:"#442359",hd:!0,showUI:!1,api:!0,errors:{method:"The method you called is not defined"},className:{active:"active"},selector:{embed:".embed",placeholder:".placeholder",playButton:".play"}},e.fn.videoPlaylist.settings={moduleName:"Video Playlist",namespace:"videoPlaylist",source:"vimeo",showPlaceholder:!1,playFirst:!0,metadata:{flv:"flv",source:"source",placeholder:"placeholder"},errors:{init:"The video player you specified was not yet initialized"},className:{active:"active"}} +return d={channel:!1,width:{log:v.width(),userList:g.outerWidth()},initialize:function(){return Pusher===o&&d.error(a.errors.pusher),t===o||n===o?(d.error(a.errors.key),!1):a.endpoint.message||a.endpoint.authentication?(u=new Pusher(t),Pusher.channel_auth_endpoint=a.endpoint.authentication,d.channel=u.subscribe(n),d.channel.bind("pusher:subscription_succeeded",d.user.list.create),d.channel.bind("pusher:subscription_error",d.error),d.channel.bind("pusher:member_added",d.user.joined),d.channel.bind("pusher:member_removed",d.user.left),d.channel.bind("update_messages",d.message.receive),e.each(a.customEvents,function(e,t){d.channel.bind(e,t)}),e.fn.hoverClass!==o&&e.fn.downClass!==o&&(m.hoverClass().downClass(),p.hoverClass().downClass(),y.hoverClass().downClass()),p.on("click."+C,d.event.toggleUserList),m.on("click."+C,d.event.toggleExpand),b.on("keydown."+C,d.event.input.keydown).on("keyup."+C,d.event.input.keyup),y.on("mouseenter."+C,d.event.hover).on("mouseleave."+C,d.event.hover).on("click."+C,d.event.submit),v.animate({scrollTop:v.prop("scrollHeight")},400),f.data("module",d).addClass(w.loading),o):(d.error(a.errors.endpoint),!1)},refresh:function(){p.removeClass(w.active),d.width={log:v.width(),userList:g.outerWidth()},p.hasClass(w.active)&&d.user.list.hide(),f.data("module",d)},user:{updateCount:function(){a.userCount&&(T=f.data("users"),l=0,e.each(T,function(){l++}),h.html(a.templates.userCount(l)))},joined:function(t){T=f.data("users"),"anonymous"!=t.id&&T[t.id]===o&&(T[t.id]=t.info,a.randomColor&&t.info.color===o&&(t.info.color=a.templates.color(t.id)),k=a.templates.userList(t.info),t.info.isAdmin?e(k).prependTo(g).preview({type:"user",placement:"left"}):e(k).appendTo(g).preview({type:"user",placement:"left"}),e.fn.preview!==o&&g.children().last().preview({type:"user",placement:"left"}),a.partingMessages&&(v.append(a.templates.joined(t.info)),d.message.scroll.test()),d.user.updateCount())},left:function(e){T=f.data("users"),e!==o&&"anonymous"!==e.id&&(delete T[e.id],f.data("users",T),g.find("[data-id="+e.id+"]").remove(),a.partingMessages&&(v.append(a.templates.left(e.info)),d.message.scroll.test()),d.user.updateCount())},list:{create:function(t){T={},t.each(function(e){"anonymous"!==e.id&&"undefined"!==e.id&&(a.randomColor&&e.info.color===o&&(e.info.color=a.templates.color(e.id)),k=e.info.isAdmin?a.templates.userList(e.info)+k:k+a.templates.userList(e.info),T[e.id]=e.info)}),f.data("users",T).data("user",T[t.me.id]).removeClass(w.loading),g.html(k),e.fn.preview!==o&&g.children().preview({type:"user",placement:"left"}),d.user.updateCount(),e.proxy(a.onJoin,g.children())()},show:function(){v.animate({width:d.width.log-d.width.userList},{duration:a.speed,easing:a.easing,complete:d.message.scroll.move})},hide:function(){v.stop().animate({width:d.width.log},{duration:a.speed,easing:a.easing,complete:d.message.scroll.move})}}},message:{scroll:{test:function(){c=v.prop("scrollHeight")-v.height(),Math.abs(v.scrollTop()-c)'+e.user.name+": ":''+e.user.name+": ",t+=""+e.text+"

"+"
"},joined:function(e){return typeof e.name!==o?'
'+e.name+" has joined the chat.
":!1},left:function(e){return typeof e.name!==o?'
'+e.name+" has left the chat.
":!1},userList:function(e){var t="";return e.isAdmin&&(e.color="#55356A"),t+='
'+'
'+' '+"
",t+=e.color!==o?'

'+e.name+"

":'

'+e.name+"

",t+="
"}}}}(jQuery,window,document),function(e,t,n,o){e.fn.checkbox=function(t){var n,i=e(this),a=e.extend(!0,{},e.fn.checkbox.settings,t),r="."+a.namespace,s="module-"+a.namespace,l=i.selector||"",c=(new Date).getTime(),u=[],d=arguments[0],f="string"==typeof d,m=[].slice.call(arguments,1);return i.each(function(){var t,p=e(this),g=e(this).find(a.selector.input),h=p.selector||"",v=this,b=p.data("module-"+a.namespace),y=a.className,x=a.namespace,w=a.errors;t={initialize:function(){a.context&&""!==h?(t.verbose("Initializing checkbox with delegated events",p),e(v,a.context).on(h,"click"+r,t.toggle).data(s,t)):(t.verbose("Initializing checkbox with bound events",p),p.on("click"+r,t.toggle).data(s,t))},destroy:function(){t.verbose("Destroying previous module for",p),p.off(x)},is:{radio:function(){return p.hasClass(y.radio)}},can:{disable:function(){return"boolean"==typeof a.required?a.required:!t.is.radio()}},enable:function(){t.debug("Enabling checkbox"),p.addClass(y.active),g.prop("checked",!0),e.proxy(a.onChange,g.get())(),e.proxy(a.onEnable,g.get())()},disable:function(){t.debug("Disabling checkbox"),p.removeClass(y.active),g.prop("checked",!1),e.proxy(a.onChange,g.get())(),e.proxy(a.onDisable,g.get())()},toggle:function(){t.verbose("Toggling checkbox state"),g.prop("checked")!==o&&g.prop("checked")?t.can.disable()&&t.disable():t.enable()},setting:function(n,i){return i===o?a[n]:(e.isPlainObject(n)?(t.verbose("Modifying settings object",n,i),e.extend(!0,a,n)):(t.verbose("Modifying setting",n,i),a[n]=i),o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?(t.verbose("Modifying internal property",n,i),e.extend(!0,t,n)):(t.verbose("Changing internal method to",i),t[n]=i),o)},debug:function(){a.debug&&(a.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},verbose:function(){a.verbose&&a.debug&&(a.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,a.moduleName+":")},performance:{log:function(e){var n,o,i;a.performance&&(n=(new Date).getTime(),i=c||n,o=n-i,c=n,u.push({Element:v,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=a.moduleName,n=(a.moduleName+": "+l+"("+i.size()+" elements)",0);l&&(t+=" Performance ("+l+")"),(console.group!==o||console.table!==o)&&u.length>0&&(console.groupCollapsed(t),console.table?(e.each(u,function(e,t){n+=t["Execution Time"]}),console.table(u)):e.each(u,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),u=[],c=!1)}},invoke:function(n,i,a){var r,s;return i=i||m,a=v||a,"string"==typeof n&&b!==o&&(n=n.split("."),r=n.length-1,e.each(n,function(n,i){return e.isPlainObject(b[i])&&n!=r?(b=b[i],!0):b[i]!==o?(s=b[i],!0):(t.error(w.method),!1)})),e.isFunction(s)?(t.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},f?(b===o&&t.initialize(),n=t.invoke(d)):(b!==o&&t.destroy(),t.initialize())}),n?n:this},e.fn.checkbox.settings={moduleName:"Checkbox Module",namespace:"checkbox",verbose:!0,debug:!0,performance:!0,context:!1,required:"auto",onChange:function(){},onEnable:function(){},onDisable:function(){},errors:{method:"The method you called is not defined."},selector:{input:"input"},className:{active:"active",radio:"radio"}}}(jQuery,window,document),function(e,t,n,o){e.fn.dropdown=function(t){var i,a=e(this),r=e(n),s=e.extend(!0,{},e.fn.dropdown.settings,t),l="."+s.namespace,c="module-"+s.namespace,u=(a.selector||"",(new Date).getTime()),d=[],f=arguments[0],m="string"==typeof f,p=[].slice.call(arguments,1);return a.each(function(){var t,g=e(this),h=e(this).find(s.selector.menu),v=e(this).find(s.selector.item),b=e(this).find(s.selector.text),y=e(this).find(s.selector.input),x="ontouchstart"in n.documentElement,w=g.selector||"",C=this,k=g.data("module-"+s.namespace),T=s.className,N=s.metadata,z=s.namespace,P=s.animation,A=s.errors;t={initialize:function(){t.verbose("Initializing dropdown with bound events",g),x?g.on("touchstart"+l,t.event.test.toggle):"click"==s.on?g.on("click"+l,t.event.test.toggle):"hover"==s.on?g.on("mouseenter"+l,t.show).on("mouseleave"+l,t.delayedHide):g.on(s.on+l,t.toggle),"form"==s.action&&t.set.selected(),v.on(t.get.selectEvent()+l,t.event.item.click),g.data(c,t)},destroy:function(){t.verbose("Destroying previous module for",g),g.off(z)},event:{stopPropagation:function(e){e.stopPropagation()},test:{toggle:function(e){t.intent.test(e,t.toggle),e.stopPropagation()},hide:function(e){t.intent.test(e,t.hide),e.stopPropagation()}},item:{click:function(n){var o=e(this),i=o.data(N.text)||o.text(),a=o.data(N.value)||i;t.verbose("Adding active state to selected item"),v.removeClass(T.active),o.addClass(T.active),t.action.determine(i,a),e.proxy(s.onChange,h.get())(i,a),n.stopPropagation()}}},intent:{test:function(n,o){t.debug("Determining whether event occurred in dropdown",n.target),o=o||function(){},0===e(n.target).closest(h).size()?(t.verbose("Triggering event",o),o()):t.verbose("Event occurred in dropdown, canceling callback")},bind:function(){t.verbose("Binding hide intent event to document"),r.on(t.get.selectEvent(),t.event.test.hide)},unbind:function(){t.verbose("Removing hide intent event from document"),r.off(t.get.selectEvent())}},action:{determine:function(n,o){e.isFunction(t.action[s.action])?(t.verbose("Triggering preset action",s.action),t.action[s.action](n,o)):e.isFunction(s.action)?(t.verbose("Triggering user action",s.action),s.action(n,o)):t.error(A.action)},nothing:function(){},hide:function(){t.hide()},changeText:function(e){t.set.text(e),t.hide()},form:function(e,n){t.set.text(e),t.set.value(n),t.hide()}},get:{selectEvent:function(){return x?"touchstart":"click"},text:function(){return b.text()},value:function(){return y.val()},item:function(t){var n;return t=t||y.val(),v.each(function(){e(this).data(N.value)==t&&(n=e(this))}),n||!1}},set:{text:function(e){t.debug("Changing text",e),b.text(e)},value:function(e){t.debug("Adding selected value to hidden input",e),y.val(e)},selected:function(e){var n,o=(e||y.val(),t.get.item(e));o&&(t.debug("Setting selected menu item to",o),n=o.data(N.text)||o.text(),v.removeClass(T.active),o.addClass(T.active),t.set.text(n))}},is:{visible:function(){return h.is(":visible")},hidden:function(){return h.is(":not(:visible)")}},can:{click:function(){return x||"click"==s.on},show:function(){return!g.hasClass(T.disabled)}},animate:{show:function(){t.verbose("Doing menu showing animation"),"show"==P.show?h.show():"slide"==P.show&&h.clearQueue().children().clearQueue().css("opacity",0).delay(100).animate({opacity:1},300,"easeOutQuad").end().slideDown(200,"easeOutQuad")},hide:function(){t.verbose("Doing menu hiding animation"),"hide"==P.hide?h.hide():"slide"==P.hide&&h.clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},300,"easeOutQuad").end().delay(100).slideUp(200,"easeOutQuad")}},show:function(){clearTimeout(t.graceTimer),t.is.visible()||(t.debug("Showing dropdown"),g.addClass(T.visible),t.animate.show(),t.can.click()&&t.intent.bind(),e.proxy(s.onShow,h.get())())},delayedHide:function(){t.verbose("User moused away setting timer to hide dropdown"),t.graceTimer=setTimeout(t.hide,s.gracePeriod)},hide:function(){t.is.hidden()||(t.debug("Hiding dropdown"),g.removeClass(T.visible),t.can.click()&&t.intent.unbind(),t.animate.hide(),e.proxy(s.onHide,h.get())())},toggle:function(){t.verbose("Toggling menu visibility"),t.can.show()?t.show():t.hide()},setting:function(t,n){return n===o?s[t]:(e.isPlainObject(t)?e.extend(!0,s,t):s[t]=n,o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?e.extend(!0,t,n):t[n]=i,o)},debug:function(){s.debug&&(s.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},verbose:function(){s.verbose&&s.debug&&(s.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,s.moduleName+":")},performance:{log:function(e){var n,o,i;s.performance&&(n=(new Date).getTime(),i=u||n,o=n-i,u=n,d.push({Element:C,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=s.moduleName,n=(s.moduleName+": "+w+"("+a.size()+" elements)",0);w&&(t+=" Performance ("+w+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(n,i,a){var r,s;return i=i||p,a=C||a,"string"==typeof n&&k!==o&&(n=n.split("."),r=n.length-1,e.each(n,function(n,i){return e.isPlainObject(k[i])&&n!=r?(k=k[i],!0):k[i]!==o?(s=k[i],!0):(t.error(A.method),!1)})),e.isFunction(s)?(t.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},m?(k===o&&t.initialize(),i=t.invoke(f)):(k!==o&&t.destroy(),t.initialize())}),i?i:this},e.fn.dropdown.settings={moduleName:"Dropdown Module",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",gracePeriod:300,action:"hide",animation:{show:"slide",hide:"slide"},onChange:function(){},onShow:function(){},onHide:function(){},errors:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined."},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",disabled:"disabled",visible:"visible"}}}(jQuery,window,document),function(e,t,n,o){e.fn.form=function(t,i){var a,r=e(this),s=(e(n),e.extend(!0,{},e.fn.form.settings,i)),l=("."+s.namespace,"module-"+s.namespace,r.selector||""),c=(new Date).getTime(),u=[],d=arguments[0],f="string"==typeof d,m=[].slice.call(arguments,1);return r.each(function(){var n,i=e(this),p=e(this).find(s.selector.group),g=e(this).find(s.selector.field),h=(e(this).find(s.selector.prompt),[]),v=this,b=i.data("module-"+s.namespace),y=s.namespace,x=s.metadata,w=s.className,C=s.errors;n={initialize:function(){n.verbose("Initializing form validation"),t===o&&e.isEmptyObject(t)?n.error(C.noFields,i):"submit"==s.on&&i.on("submit."+y,n.validate.form)},destroy:function(){i.off(y)},refresh:function(){g=i.find(s.selector.field)},field:{find:function(t){return n.refresh(),g.filter("#"+t).size()>0?g.filter("#"+t):g.filter('[name="'+t+'"]').size()>0?g.filter('[name="'+t+'"]'):g.filter("[data-"+x.validate+'="'+t+'"]').size()>0?g.filter("[data-"+x.validate+'="'+t+'"]'):e("")},add:{error:function(t,o){var i=n.field.find(t.identifier),a=i.closest(p),r=p.find(r),l=0!==r.size();a.addClass(w.error),s.inlineError&&(l||(r=e("
").addClass(w.prompt).insertBefore(i)),r.html(o[0]).fadeIn(s.animateSpeed))}},remove:{error:function(e){var t=n.field.find(e.identifier),o=t.closest(p),i=p.find(i);o.removeClass(w.error),s.inlineError&&i.hide()}}},validate:{form:function(o){var i=!0;return h=[],e.each(t,function(e,t){n.validate.field(t)||(i=!1)}),i?e.proxy(s.onSuccess,this)(o):e.proxy(s.onFailure,this)(h)},field:function(t){var i=n.field.find(t.identifier),a=!0,r=[];return t.rules!==o&&e.each(t.rules,function(e,o){n.validate.rule(t,o)||(n.debug("Field is invalid",t.identifier,o.type),r.push(o.prompt),a=!1)}),a?(n.field.remove.error(t,r),s.onValid(i),!0):(h=h.concat(r),n.field.add.error(t,r),e.proxy(s.onInvalid,i)(r),!1)},rule:function(t,a){var r,l,c=n.field.find(t.identifier),u=a.type,d=c.val(),f=/\[(.*?)\]/i,m=f.exec(u),p=!0;return m!==o&&null!=m?(r=m[1],l=u.replace(m[0],""),p=e.proxy(s.rules[l],i)(d,r)):p="checked"==u?c.filter(":checked").size()>0:s.rules[u](d),p}},setting:function(t,n){return n===o?s[t]:(e.isPlainObject(t)?e.extend(!0,s,t):s[t]=n,o)},internal:function(t,i){return i===o?n[t]:(e.isPlainObject(t)?e.extend(!0,n,t):n[t]=i,o)},debug:function(){s.debug&&(n.performance.log(arguments[0]),n.debug=Function.prototype.bind.call(console.log,console,s.moduleName+":"))},verbose:function(){s.verbose&&s.debug&&(n.performance.log(arguments[0]),n.verbose=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},error:function(){n.error=Function.prototype.bind.call(console.log,console,s.moduleName+":")},performance:{log:function(e){var t,o,i;s.performance&&(t=(new Date).getTime(),i=c||t,o=t-i,c=t,u.push({Element:v,Name:e,"Execution Time":o}),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,100))},display:function(){var t=s.moduleName,n=(s.moduleName+": "+l+"("+r.size()+" elements)",0);l&&(t+="Performance ("+l+")"),(console.group!==o||console.table!==o)&&u.length>0&&(console.groupCollapsed(t),console.table?(e.each(u,function(e,t){n+=t["Execution Time"]}),console.table(u)):e.each(u,function(e,t){n+=t["Execution Time"]}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),u=[],c=!1)}},invoke:function(t,i,a){var r,s;return i=i||m,a=v||a,"string"==typeof t&&b!==o&&(t=t.split("."),r=t.length-1,e.each(t,function(t,i){return e.isPlainObject(b[i])&&t!=r?(b=b[i],!0):b[i]!==o?(s=b[i],!0):(n.error(C.method),!1)})),e.isFunction(s)?(n.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},f?(b===o&&n.initialize(),a=n.invoke(d)):(b!==o&&n.destroy(),n.initialize())}),a?a:this},e.fn.form.settings={moduleName:"Validate Form Module",debug:!0,verbose:!1,namespace:"validate",animateSpeed:150,inlineError:!1,on:"submit",onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{validate:"validate"},errors:{method:"The method you called is not defined.",noFields:"No validation object specified."},selector:{group:".field",prompt:".prompt",field:"input, textarea, select"},className:{error:"error",prompt:"prompt"},defaults:{firstName:{identifier:"first-name",rules:[{type:"empty",prompt:"Please enter your first name"}]},lastName:{identifier:"last-name",rules:[{type:"empty",prompt:"Please enter your last name"}]},username:{identifier:"username",rules:[{type:"email",prompt:"Please enter a username"}]},email:{identifier:"email",rules:[{type:"empty",prompt:"Please enter your email"},{type:"email",prompt:"Please enter a valid email"}]},password:{identifier:"password",rules:[{type:"empty",prompt:"Please enter a password"},{type:"length[6]",prompt:"Your password must be at least 6 characters"}]},passwordConfirm:{identifier:"password-confirm",rules:[{type:"empty",prompt:"Please confirm your password"},{identifier:"password-confirm",type:"match[password]",prompt:"Please verify password matches"}]},terms:{identifier:"terms",rules:[{type:"checked",prompt:"You must agree to the terms and conditions"}]}},rules:{empty:function(e){return!(e===o||""===e)},email:function(e){var t=RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?");return t.test(e)},length:function(e,t){return e!==o?e.length>=t:!1},not:function(e,t){return e!=t},maxLength:function(e,t){return e!==o?t>=e.length:!1},match:function(t,n){var i,a=e(this);return a.find("#"+n).size()>0?i=a.find("#"+n).val():a.find("[name="+n+"]").size()>0?i=a.find("[name="+n+"]").val():a.find('[data-validate="'+n+'"]').size()>0&&(i=a.find('[data-validate="'+n+'"]').val()),i!==o?""+t==""+i:!1},url:function(e){var t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)}}}}(jQuery,window,document),function(e,t,n,o){e.dimScreen=function(t){var n="function"==typeof t?e.extend({},e.fn.modal.settings,{dim:t}):e.extend({},e.fn.modal.settings,t),o=e(n.context),i=o.children(n.selector.dimmer),a=i.size()>0,r=i.css("opacity");return a||(i=e("
").attr("id","dimmer").html('
'),o.append(i)),r!=n.opacity&&(i.one("click",function(){n.unDim(),e.unDimScreen()}),0===n.duration?i.css({visibility:"visible"}).find(".content").css({opacity:n.opacity,visibility:"visible"}):i.css({visibility:"visible"}).find(".content").css({opacity:0,visibility:"visible"}).fadeTo(n.duration,n.opacity,n.dim)),this},e.unDimScreen=function(t){var n="function"==typeof t?e.extend({},e.fn.modal.settings,{unDim:t}):e.extend({},e.fn.modal.settings,t),o=e(n.context),i=o.children(n.selector.dimmer),a=i.size()>0;return a&&(n.unDim(),0===n.duration?i.css({visibility:"hidden"}).remove():i.find(".content").fadeTo(n.duration,0,function(){i.remove()})),this},e.fn.modal=function(i){var a,r=e.extend(!0,{},e.fn.modal.settings,i),s=arguments[0],l=[].slice.call(arguments,1);return e(this).each(function(){var i,c=e(this),u=c.find(r.selector.closeButton),d=(e(r.context).find(r.selector.dimmer),e(r.context).children(r.selector.modal)),f=d.not(c),m=c.data("module-"+r.namespace),p="string"==typeof s,g=(r.className,r.namespace);i={initialize:function(){c.on("modalShow."+g,i.show).on("modalHide."+g,i.hide).data("module-"+g,i)},show:function(){var i=c.outerHeight(),a=e(t).height(),s=i>a,l=s?"absolute":"fixed",d=s?"0":"50%",m=s?a/8:-((i-r.closeSpacing)/2),p="absolute"==c.css("position")?m+e(t).prop("pageYOffset"):m,h=p+r.animationOffset;e.fn.popIn!==o?c.addClass(l).css({display:"block",opacity:0,top:d,marginTop:p+"px"}).popIn():c.addClass(l).css({display:"block",opacity:0,top:d,marginTop:h+"px"}).animate({opacity:1,marginTop:p+"px"},r.duration+300,r.easing),f.is(":visible")&&f.filter(":visible").hide(),e.dimScreen({context:r.context,duration:0,dim:function(){e(n).on("keyup."+g,function(e){var t=e.which,n=27;switch(t){case n:c.trigger("modalHide"),e.preventDefault()}}),u.one("click",function(){c.trigger("modalHide")}),r.dim()},unDim:function(){c.trigger("modalHide"),u.unbind("click")}})},hide:function(){e(n).off("keyup."+g),e.unDimScreen({duration:0,unDim:function(){c.popOut(200),r.unDim()}})},setting:function(e,t){return t===o?r[e]:(r[e]=t,o)},debug:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};r.debug&&(e.push(t),o.apply(console,e.concat(n)))},error:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.warn||console.log||function(){};r.debug&&(e.push(t),e.concat(n),o.apply(console,e.concat(n)))},invoke:function(t,n,a){var s,l;return a=a||[].slice.call(arguments,2),"string"==typeof t&&m!==o&&(t=t.split("."),s=t.length-1,e.each(t,function(t,n){return e.isPlainObject(m[n])&&t!=s?(m=m[n],!0):m[n]!==o?(l=m[n],!0):(i.error(r.errors.method),!1)})),e.isFunction(l)?l.apply(n,a):l}},p?a=i.invoke(s,this,l):i.initialize()}),a!==o?a:this},e.fn.modal.settings={moduleName:"Modal",debug:!1,namespace:"modal",errors:{method:"The method you called is not defined"},dim:function(){},unDim:function(){},hide:function(){},show:function(){},context:"body",opacity:.8,closeSpacing:25,animationOffset:15,duration:400,easing:"easeOutExpo",selector:{dimmer:"#dimmer",modal:".modal",closeButton:".close"}}}(jQuery,window,document),function(e,t,n,o){e.fn.nag=function(n){var i=e.extend(!0,{},e.fn.nag.settings,n),a=arguments||!1;return e(this).each(function(){var n,r,s,l,c,u,d,f,m,p=e(this),g=p.find(i.selector.close),h=e(i.context),v=p.data("module"),b=i.className,y=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return m={initialize:function(){n=p.offset(),r=p.outerHeight(),s=h.outerWidth(),l=h.outerHeight(),c=h.offset(),p.data("module",m),g.on("mouseenter mouseleave",m.event.hover).on("click",m.dismiss),i.context==t&&"fixed"==i.position&&p.addClass(b.fixed),i.sticky&&("absolute"==i.position?h.on("scroll resize",m.event.scroll):e(t).on("scroll resize",m.event.scroll),e.proxy(m.event.scroll,this)()),i.followLink&&p.on("mouseenter mouseleave",m.event.hover).on("click",m.followLink),i.displayTime>0&&setTimeout(m.hide,i.displayTime),m.should.show()?p.is(":visible")||m.show():m.hide()},refresh:function(){n=p.offset(),r=p.outerHeight(),s=h.outerWidth(),l=h.outerHeight(),c=h.offset()},show:function(){e.fn.popIn!==o?p.popIn(i.duration):p.fadeIn(i.duration,i.easing)},hide:function(){p.fadeOut(i.duration,i.easing)},stick:function(){if(m.refresh(),"fixed"==i.position){var n=e(t).prop("pageYOffset")||e(t).scrollTop(),o=p.hasClass(b.bottom)?c.top+(l-r)-n:c.top-n;p.css({position:"fixed",top:o,left:c.left,width:s-i.scrollBarWidth})}else p.css({top:d})},unStick:function(){p.css({top:""})},dismiss:function(){i.storageMethod&&m.storage.set(i.storedKey,i.storedValue),m.hide()},should:{show:function(){return m.storage.get(i.storedKey)==i.storedValue?!1:!0},stick:function(){return u=h.prop("pageYOffset")||h.scrollTop(),d=p.hasClass(b.bottom)?l-p.outerHeight()+u:u,d>n.top?!0:"fixed"==i.position?!0:!1}},followLink:function(){e.fn.followLink!==o&&p.followLink()},storage:{set:function(t,n){"local"==i.storageMethod&&store!==o?store.set(t,n):e.cookie!==o?e.cookie(t,n):m.error(i.errors.noStorage)},get:function(t){return"local"==i.storageMethod&&store!==o?store.get(t):e.cookie!==o?e.cookie(t):(m.error(i.errors.noStorage),o)}},event:{hover:function(){e(this).toggleClass(b.hover)},scroll:function(){f!==o&&clearTimeout(f),f=setTimeout(function(){m.should.stick()?y(m.stick):m.unStick()},i.lag)}},error:function(e){console.log("Nag Module:"+e)},invoke:function(t,n,a){var r;return a=a||Array.prototype.slice.call(arguments,2),"string"==typeof t&&v!==o&&(t=t.split("."),e.each(t,function(t,n){return e.isPlainObject(v[n])?(v=v[n],!0):e.isFunction(v[n])?(r=v[n],!0):(m.error(i.errors.method),!1)})),e.isFunction(r)?r.apply(n,a):r}},v!==o&&a?("invoke"==a[0]&&(a=Array.prototype.slice.call(a,1)),m.invoke(a[0],this,Array.prototype.slice.call(a,1))):(m.initialize(),o)}),this},e.fn.nag.settings={displayTime:0,followLink:!0,position:"fixed",scrollBarWidth:18,storageMethod:"cookie",storedKey:"nag",storedValue:"dismiss",sticky:!0,lag:0,context:t,errors:{noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",followLink:"Follow link is set but the plugin is not included"},className:{bottom:"bottom",hover:"hover",fixed:"fixed"},selector:{close:".icon.close"},speed:500,easing:"easeOutQuad"}}(jQuery,window,document),function(e,t,n,o){e.fn.popup=function(i){var a,r=e(this),s=e.extend(!0,{},e.fn.popup.settings,i),l=("."+s.namespace,"module-"+s.namespace,r.selector||""),c=(new Date).getTime(),u=[],d=arguments[0],f="string"==typeof d,m=[].slice.call(arguments,1);return r.each(function(){var i,p=e(this),g=e(t),h=p.offsetParent(),v=s.inline?p.next(s.selector.popup):g.children(s.selector.popup).last(),b=0,y=this,x=p.data("module-"+s.namespace),w=s.selector,C=s.className,k=s.error,T=s.metadata,N=s.namespace;i={initialize:function(){"hover"==s.on?p.on("mouseenter."+N,i.event.mouseenter).on("mouseleave."+N,i.event.mouseleave):p.on(s.on+"."+N,i.event[s.on]),g.on("resize."+N,i.event.resize),p.data("module-"+N,i)},refresh:function(){v=s.inline?p.next(w.popup):g.children(w.popup).last(),h=p.offsetParent()},destroy:function(){i.debug("Destroying existing popups"),p.off("."+N),v.remove()},event:{mouseenter:function(t){var n=this;i.timer=setTimeout(function(){e.proxy(i.toggle,n)(),e(n).hasClass(C.visible)&&t.stopPropagation()},s.delay)},mouseleave:function(){clearTimeout(i.timer),p.is(":visible")&&i.hide()},click:function(t){e.proxy(i.toggle,this)(),e(this).hasClass(C.visible)&&t.stopPropagation()},resize:function(){v.is(":visible")&&i.position()}},create:function(){i.debug("Creating pop-up content");var t=p.data(T.html)||s.html,n=p.data(T.title)||s.title,o=p.data(T.content)||p.attr("title")||s.content;t||o||n?(t||(t=s.template({title:n,content:o})),v=e("
").addClass(C.popup).html(t),s.inline?v.insertAfter(p):v.appendTo(e("body"))):i.error(k.content)},remove:function(){v.remove()},get:{offstagePosition:function(){var n={top:e(t).scrollTop(),bottom:e(t).scrollTop()+e(t).height(),left:0,right:e(t).width()},o={width:v.outerWidth(),height:v.outerHeight(),position:v.offset()},i={},a=[];return o.position&&(i={top:o.position.topn.bottom,right:o.position.left+o.width>n.right,left:o.position.left0?a.join(" "):!1},nextPosition:function(e){switch(e){case"top left":e="bottom left";break;case"bottom left":e="top right";break;case"top right":e="bottom right";break;case"bottom right":e="top center";break;case"top center":e="bottom center";break;case"bottom center":e="right center";break;case"right center":e="left center"; +break;case"left center":e="top center"}return e}},toggle:function(){p=e(this),i.debug("Toggling pop-up"),i.refresh(),0===v.size()&&i.create(),p.hasClass(C.visible)?i.hide():i.position()&&i.show()},position:function(n,o){var a,r,l=(e(t).width(),e(t).height(),p.outerWidth()),c=p.outerHeight(),u=v.outerWidth(),d=v.outerHeight(),f=s.inline?p.position():p.offset(),m=s.inline?h.outerWidth():g.outerWidth(),y=s.inline?h.outerHeight():g.outerHeight();switch(n=n||p.data(T.position)||s.position,o=o||p.data(T.arrowOffset)||s.arrowOffset,i.debug("Calculating offset for position",n),n){case"top left":a={top:"auto",bottom:y-f.top+s.distanceAway,left:f.left+o};break;case"top center":a={bottom:y-f.top+s.distanceAway,left:f.left+l/2-u/2+o,top:"auto",right:"auto"};break;case"top right":a={bottom:y-f.top+s.distanceAway,right:m-f.left-l-o,top:"auto",left:"auto"};break;case"left center":a={top:f.top+c/2-d/2,right:m-f.left+s.distanceAway-o,left:"auto",bottom:"auto"};break;case"right center":a={top:f.top+c/2-d/2,left:f.left+l+s.distanceAway+o,bottom:"auto",right:"auto"};break;case"bottom left":a={top:f.top+c+s.distanceAway,left:f.left+o,bottom:"auto",right:"auto"};break;case"bottom center":a={top:f.top+c+s.distanceAway,left:f.left+l/2-u/2+o,bottom:"auto",right:"auto"};break;case"bottom right":a={top:f.top+c+s.distanceAway,right:m-f.left-l-o,left:"auto",bottom:"auto"}}return e.extend(a,{width:v.width()+1}),v.removeAttr("style").removeClass("top right bottom left center").css(a).addClass(n).addClass(C.loading),r=i.get.offstagePosition(),r?(i.debug("Element is outside boundaries ",r),s.maxSearchDepth>b?(n=i.get.nextPosition(n),b++,i.debug("Trying new position: ",n),i.position(n)):(i.error(k.recursion),b=0,!1)):(i.debug("Position is on stage",n),b=0,!0)},show:function(){i.debug("Showing pop-up"),e(w.popup).filter(":visible").stop().fadeOut(200).prev(p).removeClass(C.visible),p.addClass(C.visible),v.removeClass(C.loading),"pop"==s.animation&&e.fn.popIn!==o?v.stop().popIn(s.duration,s.easing):v.stop().fadeIn(s.duration,s.easing),"click"==s.on&&s.clicktoClose&&(i.debug("Binding popup close event"),e(n).on("click."+N,i.gracefully.hide)),e.proxy(s.onShow,v)()},hide:function(){p.removeClass(C.visible),v.is(":visible")&&(i.debug("Hiding pop-up"),"pop"==s.animation&&e.fn.popOut!==o?v.stop().popOut(s.duration,s.easing,function(){v.hide()}):v.stop().fadeOut(s.duration,s.easing)),"click"==s.on&&s.clicktoClose&&e(n).off("click."+N),e.proxy(s.onHide,v)(),s.inline||i.remove()},gracefully:{hide:function(t){0===e(t.target).closest(w.popup).size()&&i.hide()}},setting:function(t,n){return n===o?s[t]:(e.isPlainObject(t)?e.extend(!0,s,t):s[t]=n,o)},internal:function(t,n){return n===o?i[t]:(e.isPlainObject(t)?e.extend(!0,i,t):i[t]=n,o)},debug:function(){s.debug&&(s.performance?i.performance.log(arguments):i.debug=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},verbose:function(){s.verbose&&s.debug&&(s.performance?i.performance.log(arguments):i.verbose=Function.prototype.bind.call(console.info,console,s.moduleName+":"))},error:function(){i.error=Function.prototype.bind.call(console.log,console,s.moduleName+":")},performance:{log:function(e){var t,n,o;s.performance&&(t=(new Date).getTime(),o=c||t,n=t-o,c=t,u.push({Element:y,Name:e[0],Arguments:e[1]||"None","Execution Time":n}),clearTimeout(i.performance.timer),i.performance.timer=setTimeout(i.performance.display,100))},display:function(){var t=s.moduleName,n=(s.moduleName+": "+l+"("+r.size()+" elements)",0);l&&(t+=" Performance ("+l+")"),(console.group!==o||console.table!==o)&&u.length>0&&(console.groupCollapsed(t),console.table?(e.each(u,function(e,t){n+=t["Execution Time"]}),console.table(u)):e.each(u,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),u=[],c=!1)}},invoke:function(t,n,a){var r,s;return n=n||m,a=y||a,"string"==typeof t&&x!==o&&(t=t.split("."),r=t.length-1,e.each(t,function(t,n){return e.isPlainObject(x[n])&&t!=r?(x=x[n],!0):x[n]!==o?(s=x[n],!0):(i.error(k.method),!1)})),e.isFunction(s)?(i.verbose("Executing invoked function",s),s.apply(a,n)):s||!1}},f?(x===o&&i.initialize(),a=i.invoke(d)):(x!==o&&i.destroy(),i.initialize())}),a?a:this},e.fn.popup.settings={moduleName:"Pop-up Module",debug:!0,verbose:!0,performance:!0,namespace:"popup",onShow:function(){},onHide:function(){},content:!1,html:!1,title:!1,on:"hover",clicktoClose:!0,position:"top center",delay:0,inline:!0,duration:250,easing:"easeOutQuint",animation:"pop",distanceAway:2,arrowOffset:0,maxSearchDepth:10,error:{content:"Warning: Your popup has no content specified",method:"The method you called is not defined.",recursion:"Popup attempted to reposition element to fit, but could not find an adequate position."},metadata:{content:"content",html:"html",title:"title",position:"position",arrowOffset:"arrowOffset"},className:{popup:"ui popup",visible:"visible",loading:"loading"},selector:{popup:".ui.popup"},template:function(e){var t="";return typeof e!==o&&(typeof e.title!==o&&e.title&&(t+="

"+e.title+"

"),typeof e.content!==o&&e.content&&(t+='
'+e.content+"
")),t}}}(jQuery,window,document),function(e,t,n,o){e.fn.searchPrompt=function(n,i){var a,r=e.extend(!0,{},e.fn.searchPrompt.settings,i),s=arguments[0],l=[].slice.call(arguments,1);return e(this).each(function(){var i,c=e(this),u=c.find(r.selector.searchPrompt),d=c.find(r.selector.searchButton),f=c.find(r.selector.searchResults),m=(c.find(r.selector.result),c.find(r.selector.category),c.find(r.selector.emptyResult),c.find(r.selector.resultPage),this),p=(c.selector||"",c.data("module-"+r.namespace)),g=p!==o&&"string"==typeof s,h=r.className,v=r.namespace,b=r.errors;i={initialize:function(){var e=u[0],t=e.oninput!==o?"input":e.onpropertychange!==o?"propertychange":"keyup";u.on("focus."+v,i.event.focus).on("blur."+v,i.event.blur).on("keydown."+v,i.handleKeyboard),r.automatic&&u.on(t+"."+v,i.search.throttle),d.on("click."+v,i.search.query),f.on("click."+v,r.selector.result,i.results.select),c.data("module-"+v,i)},event:{focus:function(){c.addClass(h.focus),i.results.show()},blur:function(){i.search.cancel(),c.removeClass(h.focus),i.results.hide()}},handleKeyboard:function(t){var n,o=c.find(r.selector.result),a=c.find(r.selector.category),s=t.which,l={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},m=h.active,p=o.index(o.filter("."+m)),g=o.size();if(s==l.escape&&u.trigger("blur"),f.filter(":visible").size()>0)if(s==l.enter){if(o.filter("."+m).exists())return e.proxy(i.results.select,o.filter("."+m))(),t.preventDefault(),!1}else s==l.upArrow?(n=0>p-1?p:p-1,a.removeClass(m),o.removeClass(m).eq(n).addClass(m).closest(a).addClass(m),t.preventDefault()):s==l.downArrow&&(n=p+1>=g?p:p+1,a.removeClass(m),o.removeClass(m).eq(n).addClass(m).closest(a).addClass(m),t.preventDefault());else s==l.enter&&(i.search.query(),d.addClass(h.down),u.one("keyup",function(){d.removeClass(h.down)}))},search:{cancel:function(){var e=c.data("xhr")||!1;e&&"resolved"!=e.state()&&e.abort()},throttle:function(){var e,t=u.val(),n=t.length;clearTimeout(c.data("timer")),n>=r.minCharacters?(e=setTimeout(i.search.query,r.searchThrottle),c.data("timer",e)):i.results.hide()},query:function(){var t=u.val(),o=i.search.cache.read(t);o?(i.debug("Reading result for '"+t+"' from cache"),i.results.add(o)):(i.debug("Querying for '"+t+"'"),"object"==typeof n?i.search.local(t):i.search.remote(t),e.proxy(r.onSearchQuery,c)(t))},local:function(t){var o,a=[],s=[],l=e.isArray(r.searchFields)?r.searchFields:[r.searchFields],u=RegExp("(?:s|^)"+t,"i"),d=RegExp(t,"i");c.addClass(h.loading),e.each(l,function(t,o){e.each(n,function(t,n){"string"==typeof n[o]&&-1==e.inArray(n,a)&&-1==e.inArray(n,s)&&(u.test(n[o])?a.push(n):d.test(n[o])&&s.push(n))})}),o=i.results.generate({results:e.merge(a,s)}),c.removeClass(h.loading),i.search.cache.write(t,o),i.results.add(o)},remote:function(t){var a,s=c.data("xhr")!==o?c.data("xhr"):!1,l={stateContext:c,url:n,urlData:{query:t},success:function(e){a=i.results.generate(e),i.search.cache.write(t,a),i.results.add(a)},failure:i.error};s&&"resolved"!=s.state()&&s.abort(),e.extend(!0,l,r.apiSettings),e.api(l)},cache:{read:function(e){var t=c.data("cache");return r.cache&&"object"==typeof t&&t[e]!==o?t[e]:!1},write:function(e,t){var n=c.data("cache")!==o?c.data("cache"):{};n[e]=t,c.data("cache",n)}}},results:{generate:function(t){i.debug("Generating html from response",t);var n=r.templates[r.type],o="";return e.isPlainObject(t.results)&&!e.isEmptyObject(t.results)||e.isArray(t.results)&&t.results.length>0?(r.maxResults>0&&(t.results=e.makeArray(t.results).slice(0,r.maxResults)),t.results.length>0&&(e.isFunction(n)?o=n(t):i.error(b.noTemplate,!1))):o=i.message(b.noResults,"empty"),e.proxy(r.onSearchResults,c)(t),o},add:function(t){("default"==r.onResultsAdd||"default"==e.proxy(r.onResultsAdd,f)(t))&&f.html(t),i.results.show()},show:function(){0===f.filter(":visible").size()&&u.filter(":focus").size()>0&&""!==f.html()&&(f.stop().fadeIn(200),e.proxy(r.onResultsOpen,f)())},hide:function(){f.filter(":visible").size()>0&&(f.stop().fadeOut(200),e.proxy(r.onResultsClose,f)())},followLink:function(){},select:function(n){i.debug("Search result selected");var o=e(this),a=o.find(".title"),s=a.html();if("default"==r.onSelect||"default"==e.proxy(r.onSelect,this)(n)){var l=o.find("a[href]").eq(0),c=l.attr("href"),d=l.attr("target");try{i.results.hide(),u.val(s),"_blank"==d||n.ctrlKey?t.open(c):t.location.href=c}catch(f){}}}},setting:function(e,t){return t===o?r[e]:(r[e]=t,o)},debug:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};o=Function.prototype.bind.call(o,console),r.debug&&(e.push(t),o.apply(console,e.concat(n)))},message:function(e,t){return t=t||"standard",i.results.add(r.templates.message(e,t)),r.templates.message(e,t)},error:function(e,t){t=t!==o?t:!0,console.warn(r.moduleName+": "+e),t&&e!==o&&i.message(e,"error")},invoke:function(t,n,a){var r,s;return a=a||[].slice.call(arguments,2),"string"==typeof t&&p!==o&&(t=t.split("."),r=t.length-1,e.each(t,function(t,n){return e.isPlainObject(p[n])&&t!=r?(p=p[n],!0):p[n]!==o?(s=p[n],!0):(i.error(b.method),!1)})),e.isFunction(s)?s.apply(n,a):s}},g?a=i.invoke(s,m,l):i.initialize()}),a!==o?a:this},e.fn.searchPrompt.settings={moduleName:"Search Module",debug:!0,namespace:"search",onSelect:"default",onResultsAdd:"default",onSearchQuery:function(){},onSearchResults:function(){},onResultsOpen:function(){},onResultsClose:function(){},automatic:"true",type:"simple",minCharacters:3,searchThrottle:300,maxResults:7,cache:!0,searchFields:["title","description"],apiSettings:{},className:{active:"active",down:"down",focus:"focus",empty:"empty",loading:"loading"},errors:{noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noTemplate:"A valid template name was not specified.",serverError:"There was an issue with querying the server.",method:"The method you called is not defined."},selector:{searchPrompt:".prompt",searchButton:".search.button",searchResults:".results",category:".category",result:".result",emptyResult:".results .message",resultPage:".results .page"},templates:{message:function(e,t){var n="";return e!==o&&t!==o&&(n+='
'+'
',n+="empty"==t?"

No Results

"+e+"

":'
'+e+"
",n+="
"),n},categories:function(t){var n="";return t.results!==o?(e.each(t.results,function(t,i){i.results!==o&&i.results.length>0&&(n+='
'+i.name+"
"+"
    ",e.each(i.results,function(e,t){n+='
  • ',n+='',t.image!==o&&(n+='
    '+"
    "),n+=t.image!==o?'
    ':'
    ',t.price!==o&&(n+='
    '+t.price+"
    "),t.title!==o&&(n+='
    '+t.title+"
    "),t.description!==o&&(n+='
    '+t.description+"
    "),n+="
  • "}),n+="
")}),t.resultPage&&(n+=''+t.resultPage.text+""),n):!1},simple:function(t){var n="";return t.results!==o?(n+="
    ",e.each(t.results,function(e,t){n+='
  • ',t.url!==o&&(n+=''),t.image!==o&&(n+='
    '+"
    "),n+=t.image!==o?'
    ':'
    ',t.price!==o&&(n+='
    '+t.price+"
    "),t.title!==o&&(n+='
    '+t.title+"
    "),t.description!==o&&(n+='
    '+t.description+"
    "),n+="
  • "}),n+="
",t.resultPage&&(n+=''+t.resultPage.text+""),n):!1}}}}(jQuery,window,document),function(e,t,n,o){e.fn.shape=function(t){var i,a=e(this),r=e.extend(!0,{},e.fn.shape.settings,t),s="."+r.namespace,l="module-"+r.namespace,c=a.selector||"",u=(new Date).getTime(),d=[],f=arguments[0],m="string"==typeof f,p=[].slice.call(arguments,1);return a.each(function(){var t,g,h,v=e(this),b=v.find(r.selector.sides),y=v.find(r.selector.side),x="transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd",w=this,C=v.data(l),k=(r.namespace,r.error),T=r.className;h={initialize:function(){h.verbose("Initializing module for",w),h.set.defaultSide(),C=h,v.data(l,C)},destroy:function(){h.verbose("Destroying previous module for",w),v.removeData(l).off(s)},refresh:function(){h.verbose("Refreshing selector cache for",w),v=e(w),b=e(this).find(r.selector.shape),y=e(this).find(r.selector.side)},repaint:function(){h.verbose("Forcing repaint event");var e=b.get(0)||n.createElement("div");e.offsetWidth},animate:function(n,o){h.verbose("Animating box with properties",n),o=o||function(t){h.reset(),h.set.active(),e.proxy(r.onChange,g)(),t.stopImmediatePropagation()},r.useCSS?(h.verbose("Starting CSS animation"),v.addClass(T.animating),h.set.stageSize(),h.repaint(),v.addClass(T.css),t.addClass(T.hidden),b.css(n).one(x,o)):(h.verbose("Starting javascript animation"),v.addClass(T.animating).removeClass(T.css),h.set.stageSize(),h.repaint(),t.animate({opacity:0},r.duration,r.easing),b.animate(n,r.duration,r.easing,o))},queue:function(e){h.debug("Queueing animation of",e),b.one(x,function(){h.debug("Executing queued animation"),v.shape(e)})},reset:function(){h.verbose("Animating states reset"),v.removeClass(T.css).removeClass(T.animating).removeAttr("style"),b.removeAttr("style"),y.removeAttr("style").removeClass(T.hidden),g.removeClass(T.animating).removeAttr("style")},is:{animating:function(){return v.hasClass(T.animating)}},get:{nextSide:function(){return t.next(r.selector.side).size()>0?t.next(r.selector.side):v.find(r.selector.side).first()}},set:{defaultSide:function(){t=v.find("."+r.className.active),g=t.next(r.selector.side).size()>0?t.next(r.selector.side):v.find(r.selector.side).first(),h.verbose("Active side set to",t),h.verbose("Next side set to",g)},stageSize:function(){var e={width:g.outerWidth(),height:g.outerHeight()};h.verbose("Resizing stage to fit new content",e),v.css({width:e.width,height:e.height})},nextSide:function(e){g=v.find(e),0===g.size()&&h.error(k.side),h.verbose("Next side manually set to",g)},active:function(){h.verbose("Setting new side to active",g),y.removeClass(T.active),g.addClass(T.active),h.set.defaultSide()}},flip:{up:function(){h.debug("Flipping up",g),h.is.animating()?h.queue("flip.up"):(h.stage.above(),h.animate(h.getTransform.up()))},down:function(){h.debug("Flipping down",g),h.is.animating()?h.queue("flip.down"):(h.stage.below(),h.animate(h.getTransform.down()))},left:function(){h.debug("Flipping left",g),h.is.animating()?h.queue("flip.left"):(h.stage.left(),h.animate(h.getTransform.left()))},right:function(){h.debug("Flipping right",g),h.is.animating()?h.queue("flip.right"):(h.stage.right(),h.animate(h.getTransform.right()))},over:function(){h.debug("Flipping over",g),h.is.animating()?h.queue("flip.over"):(h.stage.behind(),h.animate(h.getTransform.behind()))}},getTransform:{up:function(){var e={y:-((t.outerHeight()-g.outerHeight())/2),z:-(t.outerHeight()/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(-90deg)"}},down:function(){var e={y:-((t.outerHeight()-g.outerHeight())/2),z:-(t.outerHeight()/2)};return{transform:"translateY("+e.y+"px) translateZ("+e.z+"px) rotateX(90deg)"}},left:function(){var e={x:-((t.outerWidth()-g.outerWidth())/2),z:-(t.outerWidth()/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(90deg)"}},right:function(){var e={x:-((t.outerWidth()-g.outerWidth())/2),z:-(t.outerWidth()/2)};return{transform:"translateX("+e.x+"px) translateZ("+e.z+"px) rotateY(-90deg)"}},behind:function(){var e={x:-((t.outerWidth()-g.outerWidth())/2)};return{transform:"translateX("+e.x+"px) rotateY(180deg)"}}},stage:{above:function(){var e={origin:(t.outerHeight()-g.outerHeight())/2,depth:{active:g.outerHeight()/2,next:t.outerHeight()/2}};h.verbose("Setting the initial animation position as above",g,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),g.addClass(T.animating).css({display:"block",top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px)"})},below:function(){var e={origin:(t.outerHeight()-g.outerHeight())/2,depth:{active:g.outerHeight()/2,next:t.outerHeight()/2}};h.verbose("Setting the initial animation position as below",g,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),g.addClass(T.animating).css({display:"block",top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px)"})},left:function(){var e={origin:(t.outerWidth()-g.outerWidth())/2,depth:{active:g.outerWidth()/2,next:t.outerWidth()/2}};h.verbose("Setting the initial animation position as left",g,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),g.addClass(T.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(-90deg) translateZ("+e.depth.next+"px)"})},right:function(){var e={origin:(t.outerWidth()-g.outerWidth())/2,depth:{active:g.outerWidth()/2,next:t.outerWidth()/2}};h.verbose("Setting the initial animation position as left",g,e),t.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),g.addClass(T.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(90deg) translateZ("+e.depth.next+"px)"})},behind:function(){var e={origin:(t.outerWidth()-g.outerWidth())/2,depth:{active:g.outerWidth()/2,next:t.outerWidth()/2}};h.verbose("Setting the initial animation position as behind",g,e),t.css({transform:"rotateY(0deg)"}),g.addClass(T.animating).css({display:"block",left:e.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(t,n){return n===o?r[t]:(e.isPlainObject(t)?(h.verbose("Modifying settings object",t,n),e.extend(!0,r,t)):(h.verbose("Modifying setting",t,n),r[t]=n),o)},internal:function(t,n){return n===o?h[t]:(e.isPlainObject(t)?(h.verbose("Modifying internal property",t,n),e.extend(!0,h,t)):(h.verbose("Changing internal method to",n),h[t]=n),o)},debug:function(){r.debug&&(r.performance?h.performance.log(arguments):h.debug=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},verbose:function(){r.verbose&&r.debug&&(r.performance?h.performance.log(arguments):h.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},error:function(){h.error=Function.prototype.bind.call(console.log,console,r.moduleName+":")},performance:{log:function(e){var t,n,o;r.performance&&(t=(new Date).getTime(),o=u||t,n=t-o,u=t,d.push({Element:w,Name:e[0],Arguments:e[1]||"None","Execution Time":n}),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,100))},display:function(){var t=r.moduleName,n=(r.moduleName+": "+c+"("+a.size()+" elements)",0);c&&(t+=" Performance ("+c+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(t,n,i){var a,r;return n=n||p,i=w||i,"string"==typeof t&&C!==o&&(t=t.split("."),a=t.length-1,e.each(t,function(t,n){return e.isPlainObject(C[n])&&t!=a?(C=C[n],!0):C[n]!==o?(r=C[n],!0):(h.error(errors.method),!1)})),e.isFunction(r)?(h.verbose("Executing invoked function",r),r.apply(i,n)):r||!1}},m?(C===o&&h.initialize(),i=h.invoke(f)):(C!==o&&h.destroy(),h.initialize())}),i?i:this},e.fn.shape.settings={moduleName:"Shape Module",debug:!0,verbose:!0,performance:!0,namespace:"shape",beforeChange:function(){},onChange:function(){},useCSS:!0,duration:1e3,easing:"easeInOutQuad",error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{css:"css",animating:"animating",hidden:"hidden",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document),function(e,t,n,o){e.fn.starReview=function(t){var n=e.extend(!0,{},e.fn.starReview.settings,t),i=arguments||!1;return e(this).each(function(){var t,a=e(this),r=a.find(n.selector.star),s=n.className,l=n.namespace,c=a.data("module");return t={settings:n,initialize:function(){n.rateable&&(e.fn.state!==o&&(a.state(),r.state()),r.bind("mouseenter."+l,t.event.mouseenter).bind("mouseleave."+l,t.event.mouseleave).bind("click."+l,t.event.click)),a.addClass(s.initialize).data("module",t)},setRating:function(t){var o=r.eq(t-1);a.removeClass(s.hover),r.removeClass(s.hover),o.nextAll().removeClass(s.active),o.addClass(s.active).prevAll().addClass(s.active),e.proxy(n.onRate,a)()},event:{mouseenter:function(){var t=e(this);t.nextAll().removeClass(s.hover),a.addClass(s.hover),t.addClass(s.hover).prevAll().addClass(s.hover)},mouseleave:function(){r.removeClass(s.hover)},click:function(){var n=e(this);t.setRating(r.index(n)+1)}},error:function(e){console.warn(n.moduleName+": "+e)},invoke:function(i,a,r){var s;return r=r||Array.prototype.slice.call(arguments,2),"string"==typeof i&&c!==o&&(i=i.split("."),e.each(i,function(o,i){return e.isPlainObject(c[i])?(c=c[i],!0):e.isFunction(c[i])?(s=c[i],!0):(t.error(n.errors.method),!1)})),e.isFunction(s)?s.apply(a,r):!1}},c!==o&&i?("invoke"==i[0]&&(i=Array.prototype.slice.call(i,1)),t.invoke(i[0],this,Array.prototype.slice.call(i,1))):(t.initialize(),o)}),this},e.fn.starReview.settings={moduleName:"Star Module",namespace:"star",rateable:!0,onRate:function(){},className:{initialize:"initialize",loading:"loading",active:"active",hover:"hover",down:"down"},selector:{star:"i"}}}(jQuery,window,document),function(e,t,n,o){e.fn.tabNavigation=function(n){var i,a,r,s,l,c=e.extend(!0,{},e.fn.tabNavigation.settings,n),u=e(this),d=e(c.context).find(c.selector.tabs),f=!0,m={},p=0,g=c.className,h=c.metadata,v=c.namespace,b=c.errors,y=u.data("module"),x=arguments[0],w=y!==o&&"string"==typeof x,C=[].slice.call(arguments,1);return s={initialize:function(){s.debug("Initializing Tabs",u),c.history&&c.path!==!1&&(e.address!==o?(s.verbose("Address library found adding state change event"),e.address.state(c.path).change(s.event.history.change)):s.error(b.state)),e.isWindow(u.get(0))||u.on("click."+v,s.event.click),u.data("module",s)},destroy:function(){s.debug("Destroying tabs",u),u.off("."+v)},event:{click:function(){s.debug("Navigation clicked");var t=e(this).data(h.tab);t!==o?t!==i&&(c.history?e.address.value(t):s.change(t)):s.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||s.get.initialPath(),i=c.templates.determineTitle(n)||!1;s.debug("History change event",n,t),r=t,n!==o&&s.change(n),i&&e.address.title(i)}}},refresh:function(){i&&(s.debug("Refreshing tab",i),s.change(i))},cache:{read:function(e){return e!==o?m[e]:m},add:function(e,t){e=e||i,s.debug("Adding cached content for",e),m[e]=t},remove:function(e){e=e||i,s.debug("Removing cached content for",e),delete m[e]}},change:function(n){var l=s.get.defaultPathArray(n);s.deactivate.all(),e.each(l,function(u,d){var p=l.slice(0,u+1),g=s.utils.arrayToPath(p),h=s.utils.last(l)==g,v=s.is.tab(g),b=!v,y=t.history&&t.history.pushState,x=y&&c.ignoreFirstLoad&&f,w=e.isPlainObject(c.apiSettings),C=s.get.tabElement(g);return s.verbose("Looking for tab",d),b?(s.verbose("Tab is not found, assuming it is a parameter",d),!0):(v&&(s.verbose("Tab was found",d),i=g,a=s.utils.filterArray(l,p),h&&w?x?(s.debug("Ignoring remote content on first tab load",g),f=!1,m[n]=C.html(),s.activate.all(g),e.proxy(c.onTabInit,C)(g,a,r)):(s.activate.navigation(g),s.content.fetch(g,c.onTabLoad)):(s.debug("Opened tab",g),s.activate.all(g),e.proxy(c.onTabLoad,C)(g,a,r))),o)})},content:{fetch:function(t){var n=s.get.tabElement(t),l=m[t]||!1,u={dataType:"html",stateContext:n,success:function(o){m[t]=o,s.content.update(t,o),t==i?(s.debug("Content loaded",t),s.activate.tab(t)):s.debug("Content loaded in background",t),e.proxy(c.onTabInit,n)(t,a,r)},urlData:{tab:t}},d=n.data(h.promise)||!1,f=d&&"pending"===d.state();c.cache&&l?(s.debug("Showing existing content",t),s.activate.tab(t),e.proxy(c.onTabLoad,n)(t,a,r)):f?(s.debug("Content is already loading",t),n.addClass(g.loading)):e.api!==o?(s.debug("Retrieving content",t),e.api(e.extend(!0,{},c.apiSettings,u))):s.error(b.api)},update:function(e,t){s.debug("Updating html for",e);var n=s.get.tabElement(e);n.html(t)}},activate:{all:function(e){s.activate.tab(e),s.activate.navigation(e)},tab:function(e){var t=s.get.tabElement(e);s.verbose("Showing tab content for",t),t.addClass(g.active)},navigation:function(e){var t=s.get.navElement(e);s.verbose("Activating tab navigation for",t),t.addClass(g.active)}},deactivate:{all:function(){s.deactivate.navigation(),s.deactivate.tabs()},navigation:function(){u.removeClass(g.active)},tabs:function(){d.removeClass(g.active+" "+g.loading)}},is:{tab:function(e){return s.get.tabElement(e).size()>0}},get:{initialPath:function(){return u.eq(0).data(h.tab)||d.eq(0).data(h.tab)},defaultPathArray:function(e){return s.utils.pathToArray(s.get.defaultPath(e))},defaultPath:function(e){var t=u.filter("[data-"+h.tab+'^="'+e+'/"]').eq(0),n=t.data(h.tab)||!1;if(n){if(s.debug("Found default tab",n),c.maxDepth>p)return p++,s.get.defaultPath(n);s.error(b.recursion)}return p=0,e},navElement:function(e){return e=e||i,u.filter("[data-"+h.tab+'="'+e+'"]')},tabElement:function(e){var t,n,o,a;return e=e||i,o=s.utils.pathToArray(e),a=s.utils.last(o),t=d.filter("[data-"+h.tab+'="'+a+'"]'),n=d.filter("[data-"+h.tab+'="'+e+'"]'),t.size()>0?t:n},tab:function(){return i}},utils:{filterArray:function(t,n){return e.grep(t,function(t){return-1==e.inArray(t,n)})},last:function(t){return e.isArray(t)?t[t.length-1]:!1},pathToArray:function(e){return e===o&&(e=i),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return e.isArray(t)?t.join("/"):!1}},setting:function(e,t){return t===o?c[e]:(c[e]=t,o)},verbose:function(){c.verbose&&s.debug.apply(this,arguments)},debug:function(){var e=[],t=c.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};o=Function.prototype.bind.call(o,console),c.debug&&(e.push(t),o.apply(console,e.concat(n)))},error:function(){var e=[],t=c.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.warn||console.log||function(){};o=Function.prototype.bind.call(o,console),c.debug&&(e.push(t),e.concat(n),o.apply(console,e.concat(n)))},invoke:function(t,n,i){var a,r;return i=i||[].slice.call(arguments,2),"string"==typeof t&&y!==o&&(t=t.split("."),a=t.length-1,e.each(t,function(t,n){return e.isPlainObject(y[n])&&t!=a?(y=y[n],!0):y[n]!==o?(r=y[n],!0):(s.error(c.errors.method),!1)})),e.isFunction(r)?r.apply(n,i):r}},w?l=s.invoke(x,this,C):s.initialize(),l!==o?l:this},e.tabNavigation=function(n){e(t).tabNavigation(n)},e.fn.tabNavigation.settings={moduleName:"Tab Module",verbose:!1,debug:!0,namespace:"tab",onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},history:!1,path:!1,context:"body",maxDepth:25,ignoreFirstLoad:!0,alwaysRefresh:!1,cache:!0,apiSettings:!1,errors:{api:"You attempted to load content without API module",noContent:"The tab you specified is missing a content url.",method:"The method you called is not defined",state:"The state library has not been initialized",missingTab:"Missing tab: ",recursion:"Max recursive depth reached"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".tab"}}}(jQuery,window,document),function(e,t,n,o){e.fn.video=function(t){var n,i=e.extend(!0,{},e.fn.video.settings,t),a=arguments||!1;return e(this).each(function(){var r,s=e(this),l=s.find(i.selector.placeholder),c=s.find(i.selector.playButton),u=s.find(i.selector.embed),d=s.data("module-"+i.namespace),f="string"==typeof t,m=i.namespace,p=i.metadata,g=i.className;r={initialize:function(){r.debug("Initializing video"),l.off(".video").on("click."+m,r.play),c.off(".video").on("click."+m,r.play),s.data("module-"+m,r)},change:function(e,t){r.debug("Changing video to ",t),s.data(p.source,e).data(p.flv,t),i.onChange()},reset:function(){r.debug("Clearing video embed and showing placeholder"),s.removeClass(g.active),u.html(" "),l.show(),i.onReset()},play:function(){r.debug("Playing video");var e=s.data(p.source),t=s.data(p.flv);u.html(r.generate.html(e,t)),s.addClass(g.active),i.onPlay()},generate:{html:function(e,t){r.debug("Generating embed html");var n,o="auto"==i.width?s.width():i.width,a="auto"==i.height?s.height():i.height;return"vimeo"==e?n='':"youtube"==e&&(n=''),n},url:function(e){var t=i.api?1:0,n=i.autoplay?1:0,o=i.hd?1:0,a=i.showUI?1:0,r=i.showUI?0:1,s="";return"vimeo"==e?(s="api="+t+"&title="+a+"&byline="+a+"&portrait="+a+"&autoplay="+n,i.color&&(s+="&color="+i.color)):"youtube"==e&&(s="enablejsapi="+t+"&autoplay="+n+"&autohide="+r+"&hq="+o+"&modestbranding=1",i.color&&(s+="&color="+i.color)),s}},debug:function(e,t){i.debug&&(t!==o?console.info(i.moduleName+": "+e,t):console.info(i.moduleName+": "+e))},error:function(e){console.warn(i.moduleName+": "+e)},invoke:function(t,n,a){var s;return a=a||Array.prototype.slice.call(arguments,2),"string"==typeof t&&d!==o&&(t=t.split("."),e.each(t,function(t,n){return e.isPlainObject(d[n])?(d=d[n],!0):e.isFunction(d[n])?(s=d[n],!0):(r.error(i.errors.method),!1)})),e.isFunction(s)?s.apply(n,a):s}},f?n=r.invoke(a[0],this,Array.prototype.slice.call(a,1)):(d&&r.destroy(),r.initialize())}),n!==o?n:this},e.fn.videoPlaylist=function(t,n){var o=e(this),i=e(t),a=i.find(".embed iframe"),r=e.extend({},e.fn.videoPlaylist.settings,n,!0);o.each(function(){var t=e(this),n=r.metadata,a=r.namespace,s=r.className,l={initialize:function(){t.on("click."+a,l.changeVideo)},changeVideo:function(){var a=t.data(n.flv)||!1,l=t.data(n.source)||!1,c=t.data(n.placeholder)||!1;if(a&&l){if(i.data(n.source,l).data(n.flv,a),r.showPlaceholder)i.removeClass(s.active).find(e.fn.video.selector.placeholder).attr("src",c);else try{i.video("play")}catch(u){console.warn("Video Playlist Module: "+r.error.init)}o.removeClass(s.active),t.addClass(s.active)}}};l.initialize()}),r.playFirst&&(o.eq(0).trigger("click"),a.size()>0&&a.attr("src",a.attr("src").replace("autoplay=1","autoplay=0")))},e.fn.video.settings={moduleName:"Video",namespace:"video",debug:!1,metadata:{source:"source",flv:"flv"},onPlay:function(){},onReset:function(){},onChange:function(){},play:function(){},pause:function(){},stop:function(){},width:"auto",height:"auto",autoplay:!1,color:"#442359",hd:!0,showUI:!1,api:!0,errors:{method:"The method you called is not defined"},className:{active:"active"},selector:{embed:".embed",placeholder:".placeholder",playButton:".play"}},e.fn.videoPlaylist.settings={moduleName:"Video Playlist",namespace:"videoPlaylist",source:"vimeo",showPlaceholder:!1,playFirst:!0,metadata:{flv:"flv",source:"source",placeholder:"placeholder"},errors:{init:"The video player you specified was not yet initialized"},className:{active:"active"}} }(jQuery,window,document); \ No newline at end of file diff --git a/build/uncompressed/modules/dropdown.js b/build/uncompressed/modules/dropdown.js index c5405037d..36b67483e 100644 --- a/build/uncompressed/modules/dropdown.js +++ b/build/uncompressed/modules/dropdown.js @@ -115,7 +115,7 @@ $.fn.dropdown = function(parameters) { item: { - click: function () { + click: function (event) { var $choice = $(this), text = $choice.data(metadata.text) || $choice.text(), @@ -130,6 +130,7 @@ $.fn.dropdown = function(parameters) { ; module.action.determine(text, value); $.proxy(settings.onChange, $menu.get())(text, value); + event.stopPropagation(); } } diff --git a/node/src/files/components/semantic/modules/dropdown.js b/node/src/files/components/semantic/modules/dropdown.js index c5405037d..36b67483e 100644 --- a/node/src/files/components/semantic/modules/dropdown.js +++ b/node/src/files/components/semantic/modules/dropdown.js @@ -115,7 +115,7 @@ $.fn.dropdown = function(parameters) { item: { - click: function () { + click: function (event) { var $choice = $(this), text = $choice.data(metadata.text) || $choice.text(), @@ -130,6 +130,7 @@ $.fn.dropdown = function(parameters) { ; module.action.determine(text, value); $.proxy(settings.onChange, $menu.get())(text, value); + event.stopPropagation(); } } diff --git a/src/modules/dropdown.js b/src/modules/dropdown.js index c5405037d..36b67483e 100755 --- a/src/modules/dropdown.js +++ b/src/modules/dropdown.js @@ -115,7 +115,7 @@ $.fn.dropdown = function(parameters) { item: { - click: function () { + click: function (event) { var $choice = $(this), text = $choice.data(metadata.text) || $choice.text(), @@ -130,6 +130,7 @@ $.fn.dropdown = function(parameters) { ; module.action.determine(text, value); $.proxy(settings.onChange, $menu.get())(text, value); + event.stopPropagation(); } }