/** # Semantic UI
* Version: 0.1
* http://github.com/quirkyinc/semantic
*
*
* Copyright 2013 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
* Released: 07/20/2013
*/
!function(a,b,c,d){a.fn.accordion=function(b){var c,e=a(this),f=a.isPlainObject(b)?a.extend(!0,{},a.fn.accordion.settings,b):a.fn.accordion.settings,g=("."+f.namespace,"module-"+f.namespace,e.selector||""),h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return e.each(function(){var b,e=a(this),m=e.find(f.selector.title),n=(e.find(f.selector.icon),e.find(f.selector.content)),o=(e.selector||"",this),p=e.data("module-"+f.namespace),q=f.className,r=(f.metadata,f.namespace),s=(f.animation,f.errors);b={initialize:function(){b.debug("Initializing accordion with bound events",e),m.on("click",b.event.click),e.data("module",b)},destroy:function(){b.debug("Destroying previous accordion for",e),e.off(r)},event:{click:function(){var c=a(this),d=m.index(c),e=c.hasClass(q.active);b.verbose("Accordion title clicked",c),e?f.collapsible?b.close(d):b.debug("Cannot close accordion content collapsing is disabled"):b.open(d)},resetStyle:function(){a(this).removeAttr("style").children().removeAttr("style")}},open:function(c){var d=m.eq(c),e=d.next(n),g=m.filter("."+q.active),h=g.next(m),i=g.size()>0;e.is(":animated")||(b.debug("Opening accordion content",d),f.exclusive&&i&&(g.removeClass(q.active),h.stop().children().animate({opacity:0},f.speed,b.event.resetStyle).end().slideUp(f.speed,f.easing,function(){h.removeClass(q.active).removeAttr("style").children().removeAttr("style")})),d.addClass(q.active),e.stop().children().removeAttr("style").end().slideDown(f.speed,f.easing,function(){e.addClass(q.active).removeAttr("style"),a.proxy(f.onOpen,e)(),a.proxy(f.onChange,e)()}))},close:function(c){var d=m.eq(c),e=d.next(n);b.debug("Closing accordion content",d),d.removeClass(q.active),e.removeClass(q.active).show().stop().children().animate({opacity:0},f.speed,b.event.resetStyle).end().slideUp(f.speed,f.easing,function(){e.removeAttr("style"),a.proxy(f.onClose,e)(),a.proxy(f.onChange,e)()})},setting:function(c,e){return b.debug("Changing setting",c,e),e===d?f[c]:(a.isPlainObject(c)?a.extend(!0,f,c):f[c]=e,void 0)},internal:function(c,e){return b.debug("Changing internal",c,e),e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){f.debug&&(f.performance?b.performance.log(arguments):b.debug=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},verbose:function(){f.verbose&&f.debug&&(f.performance?b.performance.log(arguments):b.verbose=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},error:function(){b.error=Function.prototype.bind.call(console.log,console,f.moduleName+":")},performance:{log:function(a){var c,d,e;f.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Element:o,Name:a[0],Arguments:a[1]||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var b=f.moduleName+":",c=0;h=!1,a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(c,e,f){var g,h;return e=e||l,f=o||f,"string"==typeof c&&p!==d&&(c=c.split("."),g=c.length-1,a.each(c,function(c,e){return a.isPlainObject(p[e])&&c!=g?(p=p[e],!0):p[e]!==d?(h=p[e],!0):(b.error(s.method),!1)})),a.isFunction(h)?(p.verbose("Executing invoked function",h),h.apply(f,e)):h||!1}},k?(p===d&&b.initialize(),c=b.invoke(j)):(p!==d&&b.destroy(),b.initialize())}),c?c:this},a.fn.accordion.settings={moduleName:"Accordion",debug:!0,verbose:!0,performance:!1,exclusive:!0,collapsible:!0,onOpen:function(){},onClose:function(){},onChange:function(){},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(a,b,c,d){a.animationSettings=function(b,c,e,f){return b=c===d?b:"object"==typeof c?a.extend({},b,c):"function"==typeof e?a.extend({},b,{duration:c,complete:e}):"object"==typeof e?a.extend(!0,{},b,{duration:c},e):a.extend({},b,{duration:c,easing:e,complete:f})},a.fn.popIn=function(b,c,d){var e=a.animationSettings(a.fn.popIn.settings,b,c,d),f=a(this),g=f.size(),h=0,i=function(){0==f.filter(":animated").size(),h++,a(this).css("transform","").removeClass(e.className.init),a.proxy(e.eachComplete,this)(),h==g&&a.proxy(e.complete,f)()},j=function(b){a(this).delay(e.delay*b).animate({opacity:e.endOpacity,transform:"scale("+e.endScale+")"},e.duration,e.easing,i)};return e.isLegacyBrowser?f.show():f.addClass(e.className.init).show().css({opacity:e.startOpacity,transform:"scale("+e.startScale+")"}).each(j),a(this)},a.fn.popOut=function(b,c,d){var e=a.animationSettings(a.fn.popIn.settings,b,c,d),f={complete:function(){a(this).hide(),a.proxy(e.complete,this)()},startOpacity:e.endOpacity,endOpacity:0,startScale:e.endScale,endScale:e.startScale},g=a.extend(!0,{},e,f);a(this).popIn(g)},a.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(){}},a.fn.kenBurns=function(b,c,e){var f=a.animationSettings(a.fn.kenBurns.settings,b,c,e),g={randomPosition:function(a,b,c){var c=c!==d?c:b,e=Math.random()*(a+c-(a-b))+(a-b);return parseInt(e,10)},animate:function(){var b={},c={};b=f.useStartPosition?{x:parseInt(a(this).css("background-position-x"),10),y:parseInt(a(this).css("background-position-y"),10)}:{x:g.randomPosition(50,f.xRange),y:g.randomPosition(50,f.yRange)},c.x=b.x>50?g.randomPosition(b.x,f.xMaxTravelDistance,-f.xMinTravelDistance):g.randomPosition(b.x,-f.xMinTravelDistance,f.xMaxTravelDistance),c.y=b.y>50?g.randomPosition(b.y,f.yMaxTravelDistance,-f.yMinTravelDistance):g.randomPosition(b.y,-f.yMinTravelDistance,f.yMaxTravelDistance),a(this).css({backgroundPosition:b.x+"%",backgroundPositionY:b.y+"%"}).stop().animate({backgroundPosition:c.x+"%",backgroundPositionY:c.y+"%"},f.duration,f.easing,f.complete)}};return f.isLegacyBrowser||a(this).each(g.animate),a(this)},a.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(a,b,c,d){a.api=a.fn.api=function(c){var e,f,g=a.extend(!0,{},a.api.settings,c),h="function"!=typeof this?this:a("
"),i=g.stateContext?a(g.stateContext):a(h),j="object"==typeof this?a(h):i,k=j.data("module-"+g.namespace),l=j.get(),m=arguments[0],n="string"==typeof m,o=[].slice.call(arguments,1),p=g.className,q=g.metadata,r=g.errors;return f={initialize:function(){var c,e,h,k,l,m,n=(new Date).getTime(),o={},r={},s=g.errors;return g.serializeForm&&a(this).toJSON()!==d&&(o=f.get.formData(),f.debug("Adding form data to API Request",o),a.extend(!0,g.data,o)),c=a.proxy(g.beforeSend,j)(g),c===d||c?(k=f.get.url(f.get.templateURL()))?(h=a.Deferred().always(function(){g.stateContext&&i.removeClass(p.loading),a.proxy(g.complete,j)()}).done(function(b){f.debug("API request successful"),"json"==g.dataType?b.error!==d?a.proxy(g.failure,i)(b.error,g,j):a.isArray(b.errors)?a.proxy(g.failure,i)(b.errors[0],g,j):a.proxy(g.success,i)(b,g,j):a.proxy(g.success,i)(b,g,j)}).fail(function(b,c,e){var h,j=g.errors[c]!==d?g.errors[c]:e;if(b!==d)if(b.readyState!==d&&4==b.readyState){if(200!=b.status&&e!==d&&""!==e)f.error(s.statusMessage+e);else if("error"==c&&"json"==g.dataType)try{h=a.parseJSON(b.responseText),h&&h.error!==d&&(j=h.error)}catch(k){f.error(s.JSONParse)}i.removeClass(p.loading).addClass(p.error),g.errorLength>0&&setTimeout(function(){i.removeClass(p.error)},g.errorLength),f.debug("API Request error:",j),a.proxy(g.failure,i)(j,g,this)}else f.debug("Request Aborted (Most likely caused by page change)")}),a.extend(!0,r,g,{success:function(){},failure:function(){},complete:function(){},type:g.method||g.type,data:l,url:k,beforeSend:g.beforeXHR}),g.stateContext&&i.addClass(p.loading),g.progress&&(f.verbose("Adding progress events"),a.extend(!0,r,{xhr:function(){var c=new b.XMLHttpRequest;return c.upload.addEventListener("progress",function(b){var c;b.lengthComputable&&(c=Math.round(1e4*(b.loaded/b.total))/100+"%",a.proxy(g.progress,i)(c,b))},!1),c.addEventListener("progress",function(b){var c;b.lengthComputable&&(c=Math.round(1e4*(b.loaded/b.total))/100+"%",a.proxy(g.progress,i)(c,b))},!1),c}})),f.verbose("Creating AJAX request with settings: ",r),m=a.ajax(r).always(function(){e=g.loadingLength-((new Date).getTime()-n),g.loadingDelay=0>e?0:e}).done(function(a){var b=this;setTimeout(function(){h.resolveWith(b,[a])},g.loadingDelay)}).fail(function(a,b,c){var d=this;"abort"!=b?setTimeout(function(){h.rejectWith(d,[a,b,c])},g.loadingDelay):i.removeClass(p.error).removeClass(p.loading)}),g.stateContext&&j.data(q.promise,h).data(q.xhr,m),void 0):(f.error(s.missingURL),f.reset(),void 0):(f.error(s.beforeSend),f.reset(),void 0)},get:{formData:function(){return j.closest("form").toJSON()},templateURL:function(){var a,b=j.data(g.metadata.action)||g.action||!1;return b&&(f.debug("Creating url for: ",b),g.api[b]!==d?a=g.api[b]:f.error(r.missingAction)),g.url&&(a=g.url,f.debug("Getting url",a)),a},url:function(b,c){var e;return b&&(e=b.match(g.regExpTemplate),c=c||g.urlData,e&&(f.debug("Looking for URL variables",e),a.each(e,function(g,h){var i=h.substr(2,h.length-3),k=a.isPlainObject(c)&&c[i]!==d?c[i]:j.data(i)!==d?j.data(i):c[i];if(f.verbose("Looking for variable",i,j,j.data(i),c[i]),k===!1)f.debug("Removing variable from URL",e),b=b.replace("/"+h,"");else{if(k===d||!k)return f.error(r.missingParameter+i),b=!1,!1;b=b.replace(h,k)}}))),b}},reset:function(){j.data(q.promise,!1).data(q.xhr,!1),i.removeClass(p.error).removeClass(p.loading)},setting:function(a,b){return b===d?g[a]:(g[a]=b,void 0)},verbose:function(){g.verbose&&g.debug&&(f.verbose=Function.prototype.bind.call(console.info,console,g.moduleName+":"))},debug:function(){g.debug&&(f.debug=Function.prototype.bind.call(console.info,console,g.moduleName+":"))},error:function(){console.log!==d&&(f.error=Function.prototype.bind.call(console.error,console,g.moduleName+":"))},invoke:function(b,c,e){var g,h;return c=c||o,e=l||e,"string"==typeof b&&k!==d&&(b=b.split("."),g=b.length-1,a.each(b,function(b,c){return a.isPlainObject(k[c])&&b!=g?(k=k[c],!0):k[c]!==d?(h=k[c],!0):(f.error(r.method),!1)})),a.isFunction(h)?(k.verbose("Executing invoked function",h),h.apply(e,c)):h||!1}},n?(k===d&&f.initialize(),e=f.invoke(m)):(k!==d&&f.destroy(),f.initialize()),e?e:this},a.fn.apiButton=function(b){return a(this).each(function(){var c,d=a(this),e=a(this).selector||"",f=a.isFunction(b)?a.extend(!0,{},a.api.settings,a.fn.apiButton.settings,{stateContext:this,success:b}):a.extend(!0,{},a.api.settings,a.fn.apiButton.settings,{stateContext:this},b);c={initialize:function(){f.context&&""!==e?a(f.context).on(e,"click."+f.namespace,c.click):d.on("click."+f.namespace,c.click)},click:function(){f.filter&&0!==a(this).filter(f.filter).size()||a.proxy(a.api,this)(f)}},c.initialize()}),this},a.api.settings={moduleName:"API Module",namespace:"api",debug:!0,verbose:!0,api:{},beforeSend:function(a){return a},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},a.fn.apiButton.settings={filter:".disabled, .loading",context:!1,stateContext:!1}}(jQuery,window,document),function(a,b,c,d){a.fn.colorize=function(b){var c=a.extend(!0,{},a.fn.colorize.settings,b),e=arguments||!1;return a(this).each(function(b){var f,g,h,i,j,k,l,m,n=a(this),o=a("")[0],p=a("")[0],q=a("")[0],r=new Image,s=c.colors,t=(c.paths,c.namespace),u=c.errors,v=n.data("module-"+t);return m={checkPreconditions:function(){return m.debug("Checking pre-conditions"),!a.isPlainObject(s)||a.isEmptyObject(s)?(m.error(u.undefinedColors),!1):!0},async:function(a){c.async?setTimeout(a,0):a()},getMetadata:function(){m.debug("Grabbing metadata"),i=n.data("image")||c.image||d,j=n.data("name")||c.name||b,k=c.width||n.width(),l=c.height||n.height(),(0===k||0===l)&&m.error(u.undefinedSize)},initialize:function(){m.debug("Initializing with colors",s),m.checkPreconditions()&&m.async(function(){m.getMetadata(),m.canvas.create(),m.draw.image(function(){m.draw.colors(),m.canvas.merge()}),n.data("module-"+t,m)})},redraw:function(){m.debug("Redrawing image"),m.async(function(){m.canvas.clear(),m.draw.colors(),m.canvas.merge()})},change:{color:function(a,b){return m.debug("Changing color",a),s[a]===d?(m.error(u.missingColor),!1):(s[a]=b,m.redraw(),void 0)}},canvas:{create:function(){m.debug("Creating canvases"),o.width=k,o.height=l,p.width=k,p.height=l,q.width=k,q.height=l,f=o.getContext("2d"),g=p.getContext("2d"),h=q.getContext("2d"),n.append(o),f=n.children("canvas")[0].getContext("2d")},clear:function(){m.debug("Clearing canvas"),h.fillStyle="#FFFFFF",h.fillRect(0,0,k,l)},merge:function(){return a.isFunction(f.blendOnto)?(f.putImageData(g.getImageData(0,0,k,l),0,0),h.blendOnto(f,"multiply"),void 0):(m.error(u.missingPlugin),void 0)}},draw:{image:function(a){m.debug("Drawing image"),a=a||function(){},i?(r.src=i,r.onload=function(){g.drawImage(r,0,0),a()}):(m.error(u.noImage),a())},colors:function(){m.debug("Drawing color overlays",s),a.each(s,function(a,b){c.onDraw(h,j,a,b)})}},debug:function(a,b){c.debug&&(b!==d?console.info(c.moduleName+": "+a,b):console.info(c.moduleName+": "+a))},error:function(a){console.warn(c.moduleName+": "+a)},invoke:function(b,e,f){var g;return f=f||Array.prototype.slice.call(arguments,2),"string"==typeof b&&v!==d&&(b=b.split("."),a.each(b,function(b,d){return a.isPlainObject(v[d])?(v=v[d],!0):a.isFunction(v[d])?(g=v[d],!0):(m.error(c.errors.method),!1)})),a.isFunction(g)?g.apply(e,f):!1}},v!==d&&e?("invoke"==e[0]&&(e=Array.prototype.slice.call(e,1)),m.invoke(e[0],this,Array.prototype.slice.call(e,1))):(m.initialize(),void 0)}),this},a.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(a,b,c,d){a.fn.form=function(b,c){var e,f=a(this),g=a.extend(!0,{},a.fn.form.settings,c),h=a.extend({},a.fn.form.settings.defaults,b),i="."+g.namespace,j=("module-"+g.namespace,f.selector||""),k=(new Date).getTime(),l=[],m=arguments[0],n="string"==typeof m,o=[].slice.call(arguments,1);return f.each(function(){var b,c=a(this),p=a(this).find(g.selector.field),q=a(this).find(g.selector.group),r=a(this).find(g.selector.message),s=(a(this).find(g.selector.prompt),a(this).find(g.selector.submit)),t=[],u=this,v=c.data("module-"+g.namespace),w=g.namespace,x=g.metadata,y=g.className,z=g.error;b={initialize:function(){b.verbose("Initializing form validation",c,h,g),g.keyboardShortcuts&&p.on("keydown"+i,b.event.field.keydown),c.on("submit"+i,b.validate.form),p.on("blur"+i,b.event.field.change),s.on("click"+i,b.submit)},destroy:function(){c.off(w)},refresh:function(){p=c.find(g.selector.field)},submit:function(){b.verbose("Submitting form",c),c.submit()},event:{field:{keydown:function(c){var d=a(this),e=c.which,f={enter:13,escape:27};return e==f.escape&&(b.verbose("Escape key pressed blurring field"),d.blur()),e==f.enter&&d.is(g.selector.input)?(b.debug("Enter key pressed, submitting form"),s.addClass(y.down),d.one("keyup"+i,b.event.field.keyup),c.preventDefault(),!1):void 0},keyup:function(){b.verbose("Doing keyboard shortcut form submit"),s.removeClass(y.down),b.submit()},change:function(){var c=a(this),d=c.closest(q);d.hasClass(y.error)?(b.debug("Revalidating field",c,b.get.validation(c)),b.validate.field(b.get.validation(c))):"change"==g.on&&b.validate.field(b.get.validation(c))}}},get:{field:function(c){return b.verbose("Finding field with identifier",c),p.filter("#"+c).size()>0?p.filter("#"+c):p.filter('[name="'+c+'"]').size()>0?p.filter('[name="'+c+'"]'):p.filter("[data-"+x.validate+'="'+c+'"]').size()>0?p.filter("[data-"+x.validate+'="'+c+'"]'):a("")},validation:function(c){var d;return a.each(h,function(a,e){b.get.field(e.identifier).get(0)==c.get(0)&&(d=e)}),d||!1}},has:{field:function(a){return b.verbose("Checking for existence of a field with identifier",a),p.filter("#"+a).size()>0?!0:p.filter('[name="'+a+'"]').size()>0?!0:p.filter("[data-"+x.validate+'="'+a+'"]').size()>0?!0:!1}},add:{prompt:function(a,c){var d=b.get.field(a.identifier),e=d.closest(q),f=e.find(g.selector.prompt),h=0!==f.size();b.verbose("Adding inline validation prompt"),e.addClass(y.error),g.inlineError&&(h||(f=g.templates.prompt(c),f.appendTo(e).hide()),f.html(c[0]),f.is(":not(:visible)")&&f.fadeIn(g.animateSpeed))},errors:function(a){b.debug("Adding form error messages",a),r.html(g.templates.error(a))}},remove:{prompt:function(a){var c=b.get.field(a.identifier),d=c.closest(q),e=d.find(g.selector.prompt);d.removeClass(y.error),g.inlineError&&e.hide()}},validate:{form:function(d){var e=!0;return t=[],a.each(h,function(a,c){b.validate.field(c)||(e=!1)}),e?(b.debug("Form has no validation errors, submitting"),c.removeClass(y.error).addClass(y.success),a.proxy(g.onSuccess,this)(d),void 0):(b.debug("Form has errors"),c.addClass(y.error),g.inlineError||b.add.errors(t),a.proxy(g.onFailure,this)(t))},field:function(c){var e=b.get.field(c.identifier),f=!0,h=[];return c.rules!==d&&a.each(c.rules,function(a,d){b.has.field(c.identifier)&&!b.validate.rule(c,d)&&(b.debug("Field is invalid",c.identifier,d.type),h.push(d.prompt),f=!1)}),f?(b.remove.prompt(c,h),a.proxy(g.onValid,e)(),!0):(t=t.concat(h),b.add.prompt(c,h),a.proxy(g.onInvalid,e)(h),!1)},rule:function(e,f){var h,i,j=b.get.field(e.identifier),k=f.type,l=j.val(),m=/\[(.*?)\]/i,n=m.exec(k),o=!0;return n!==d&&null!==n?(h=n[1],i=k.replace(n[0],""),o=a.proxy(g.rules[i],c)(l,h)):o="checked"==k?j.filter(":checked").size()>0:g.rules[k](l),o}},setting:function(b,c){return c===d?g[b]:(a.isPlainObject(b)?a.extend(!0,g,b):g[b]=c,void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){g.debug&&(g.performance?b.performance.log(arguments):b.debug=Function.prototype.bind.call(console.info,console,g.moduleName+":"))},verbose:function(){g.verbose&&g.debug&&(g.performance?b.performance.log(arguments):b.verbose=Function.prototype.bind.call(console.info,console,g.moduleName+":"))},error:function(){b.error=Function.prototype.bind.call(console.log,console,g.moduleName+":")},performance:{log:function(a){var c,d,e;g.performance&&(c=(new Date).getTime(),e=k||c,d=c-e,k=c,l.push({Element:u,Name:a[0],Arguments:a[1]||"None","Execution Time":d}),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100))},display:function(){var b=g.moduleName,c=(g.moduleName+": "+j+"("+f.size()+" elements)",0);j&&(b+=" Performance ("+j+")"),(console.group!==d||console.table!==d)&&l.length>0&&(console.groupCollapsed(b),console.table?(a.each(l,function(a,b){c+=b["Execution Time"]}),console.table(l)):a.each(l,function(a,b){c+=b["Execution Time"],console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.log("Total Execution Time:",c+"ms"),console.groupEnd(),l=[],k=!1)}},invoke:function(c,e,f){var g,h;return e=e||o,f=u||f,"string"==typeof c&&v!==d&&(c=c.split("."),g=c.length-1,a.each(c,function(c,e){a.isPlainObject(v[e])&&c!=g?v=v[e]:v[e]!==d?h=v[e]:b.error(z.method)})),a.isFunction(h)?(v.verbose("Executing invoked function",h),h.apply(f,e)):h||!1}},n?(v===d&&b.initialize(),e=b.invoke(m)):(v!==d&&b.destroy(),b.initialize())}),e?e:this},a.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(b){var c='
';return a.each(b,function(a,b){c+="
"+b+"
"}),c+="
",a(c)},prompt:function(b){return a("").addClass("ui red pointing prompt label").html(b[0])}},rules:{empty:function(a){return!(a===d||""===a)},email:function(a){var b=new 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 b.test(a)},length:function(a,b){return a!==d?a.length>=b:!1},not:function(a,b){return a!=b},is:function(a,b){return a==b},maxLength:function(a,b){return a!==d?a.length<=b:!1},match:function(b,c){var e,f=a(this);return f.find("#"+c).size()>0?e=f.find("#"+c).val():f.find("[name="+c+"]").size()>0?e=f.find("[name="+c+"]").val():f.find('[data-validate="'+c+'"]').size()>0&&(e=f.find('[data-validate="'+c+'"]').val()),e!==d?b.toString()==e.toString():!1},url:function(a){var b=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return b.test(a)}}}}(jQuery,window,document),function(a,b,c,d){a.fn.state=function(b){var c,e=a(this),f=e.selector||"",g=arguments[0],h=[].slice.call(arguments,1),i=(new Date).getTime(),j=[];return e.each(function(){var k,l=a(this),m=a.extend(!0,{},a.fn.state.settings,b),n=this,o=l.data("module-"+m.namespace),p="string"==typeof g,q=m.namespace,r=m.metadata,s=m.className,t=m.states,u=m.text;k={initialize:function(){k.verbose("Initializing module",n),m.automatic&&k.add.defaults(),m.context&&""!==f?(k.allows("hover")&&a(n,m.context).on(f,"mouseenter."+q,k.hover.enable).on(f,"mouseleave."+q,k.hover.disable),k.allows("pressed")&&a(n,m.context).on(f,"mousedown."+q,k.pressed.enable).on(f,"mouseup."+q,k.pressed.disable),k.allows("focus")&&a(n,m.context).on(f,"focus."+q,k.focus.enable).on(f,"blur."+q,k.focus.disable),a(m.context).on(f,"mouseenter."+q,k.text.change).on(f,"mouseleave."+q,k.text.reset).on(f,"click."+q,k.toggle)):(k.allows("hover")&&l.on("mouseenter."+q,k.hover.enable).on("mouseleave."+q,k.hover.disable),k.allows("pressed")&&l.on("mousedown."+q,k.pressed.enable).on("mouseup."+q,k.pressed.disable),k.allows("focus")&&l.on("focus."+q,k.focus.enable).on("blur."+q,k.focus.disable),l.on("mouseenter."+q,k.text.change).on("mouseleave."+q,k.text.reset).on("click."+q,k.toggle)),l.data("module-"+q,k)},destroy:function(){k.verbose("Destroying previous module",n),l.off("."+q)},refresh:function(){k.verbose("Refreshing selector cache",n),l=a(n)},add:{defaults:function(){var c=b&&a.isPlainObject(b.states)?b.states:{};a.each(m.defaults,function(b,e){k.is[b]!==d&&k.is[b]()&&(k.verbose("Adding default states",b,n),a.extend(m.states,e,c))})}},is:{active:function(){return l.hasClass(s.active)},loading:function(){return l.hasClass(s.loading)},inactive:function(){return!l.hasClass(s.active)},enabled:function(){return!l.is(m.filter.active)},disabled:function(){return l.is(m.filter.active)},textEnabled:function(){return!l.is(m.filter.text)},button:function(){return l.is(".button:not(a, .submit)")},input:function(){return l.is("input")}},allow:function(a){k.debug("Now allowing state",a),t[a]=!0},disallow:function(a){k.debug("No longer allowing",a),t[a]=!1},allows:function(a){return t[a]||!1},enable:function(a){k.allows(a)&&l.addClass(s[a])},disable:function(a){k.allows(a)&&l.removeClass(s[a])},textFor:function(a){return u[a]||!1},focus:{enable:function(){l.addClass(s.focus)},disable:function(){l.removeClass(s.focus)}},hover:{enable:function(){l.addClass(s.hover)},disable:function(){l.removeClass(s.hover)}},pressed:{enable:function(){l.addClass(s.pressed).one("mouseleave",k.pressed.disable)},disable:function(){l.removeClass(s.pressed)}},toggle:function(){var a=l.data(r.promise);k.allows("active")&&k.is.enabled()&&(k.refresh(),a!==d?k.listenTo(a):k.change())},listenTo:function(b){k.debug("API request detected, waiting for state signal",b),b?(u.loading&&k.text.update(u.loading),a.when(b).then(function(){"resolved"==b.state()?(k.debug("API request succeeded"),m.activateTest=function(){return!0},m.deactivateTest=function(){return!0}):(k.debug("API request failed"),m.activateTest=function(){return!1},m.deactivateTest=function(){return!1}),k.change()})):(m.activateTest=function(){return!1},m.deactivateTest=function(){return!1})},change:function(){k.debug("Determining state change direction"),k.is.inactive()?k.activate():k.deactivate(),m.sync&&k.sync(),a.proxy(m.onChange,n)()},activate:function(){a.proxy(m.activateTest,n)()&&(k.debug("Setting state to active"),l.addClass(s.active),k.text.update(u.active)),a.proxy(m.onActivate,n)()},deactivate:function(){a.proxy(m.deactivateTest,n)()&&(k.debug("Setting state to inactive"),l.removeClass(s.active),k.text.update(u.inactive)),a.proxy(m.onDeactivate,n)()},sync:function(){k.verbose("Syncing other buttons to current state"),k.is.active()?e.not(l).state("activate"):e.not(l).state("deactivate")},text:{get:function(){return m.selector.text?l.find(m.selector.text).text():l.html()},flash:function(a,b){var c=k.text.get();a=a||m.text.flash,b=b||m.flashDuration,k.text.update(a),setTimeout(function(){k.text.update(c)},b)},change:function(){k.verbose("Checking if text should be changed"),k.is.textEnabled()&&(k.is.active()?u.hover?(k.verbose("Changing text to hover text",u.hover),k.text.update(u.hover)):u.disable&&(k.verbose("Changing text to disable text",u.disable),k.text.update(u.disable)):u.hover?(k.verbose("Changing text to hover text",u.disable),k.text.update(u.hover)):u.enable&&(k.verbose("Changing text to enable text",u.disable),k.text.update(u.enable)))},reset:function(){var a=u.active||l.data(r.storedText),b=u.inactive||l.data(r.storedText);k.is.textEnabled()&&(k.is.active()&&a?(k.verbose("Resetting active text",a),k.text.update(a)):b&&(k.verbose("Resetting inactive text",a),k.text.update(b)))},update:function(a){var b=k.text.get();a&&a!==b&&(k.debug("Updating text",a),m.selector.text?l.data(r.storedText,a).find(m.selector.text).text(a):l.data(r.storedText,a).html(a))}},setting:function(a,b){return b===d?m[a]:(m[a]=b,void 0)},performance:{log:function(a){var b,c;m.performance&&(b=(new Date).getTime(),c=b-i,i=b,j.push({Name:a,"Execution Time":c}),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,100))},display:function(){var b=m.moduleName+" Performance ("+f+")";m.moduleName+": "+f+"("+e.size()+" elements)",console.group!==d&&j.length>0&&(console.groupCollapsed(b),console.table?console.table(j):a.each(j,function(a,b){console.log(b.Name+":"+b["Execution Time"])}),console.groupEnd(),j=[])}},verbose:function(){m.verbose&&m.debug&&(k.performance.log(arguments[0]),k.verbose=Function.prototype.bind.call(console.info,console,m.moduleName+":"))},debug:function(){m.debug&&(k.performance.log(arguments[0]),k.debug=Function.prototype.bind.call(console.info,console,m.moduleName+":"))},error:function(){console.log!==d&&(k.error=Function.prototype.bind.call(console.error,console,m.moduleName+":"))},invoke:function(b,c,e){var f,g;return e=e||[].slice.call(arguments,2),"string"==typeof b&&o!==d&&(b=b.split("."),f=b.length-1,a.each(b,function(b,c){return a.isPlainObject(o[c])&&b!=f?(o=o[c],!0):o[c]!==d?(g=o[c],!0):(k.error(m.errors.method),!1)})),a.isFunction(g)?g.apply(c,e):g}},p?c=k.invoke(g,this,h):(o!==d&&k.destroy(),k.initialize())}),c!==d?c:this},a.fn.state.settings={moduleName:"State Module",debug:!0,verbose:!1,namespace:"state",performance:!1,onActivate:function(){},onDeactivate:function(){},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(a,b,c,d){a.fn.carousel=function(b){var c,e=a(this),f=a.extend(!0,{},a.fn.carousel.settings,b),g=("."+f.namespace,"module-"+f.namespace,e.selector||""),h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return e.each(function(){var b,m=a(this),n=(a(f.selector.arrows),a(f.selector.leftArrow)),o=a(f.selector.rightArrow),p=a(f.selector.content),q=(a(f.selector.navigation),a(f.selector.navItem)),r=(m.selector||"",this),s=m.data("module-"+f.namespace),t=f.className,u=f.namespace,v=f.errors;b={initialize:function(){b.openingAnimation(),b.marquee.autoAdvance(),n.on("click",b.marquee.left),o.on("click",b.marquee.right),q.on("click",b.marquee.change)},destroy:function(){b.verbose("Destroying previous module for",m),m.off(u)},left:function(){var a=p.filter("."+t.active),b=p.index(a),c=p.size(),d=-1!=b-1?b-1:c-1;q.eq(d).trigger("click")},right:function(){var a=p.filter("."+t.active),b=p.index(a),c=p.size(),d=b+1!=c?b+1:0;q.eq(d).trigger("click")},change:function(){var c=a(this),d=q.index(c),e=p.eq(d);b.marquee.autoAdvance(),c.addClass("active").siblings().removeClass("active"),e.addClass("active animated fadeIn").siblings("."+t.active).removeClass("animated fadeIn scaleIn").animate({opacity:0},500,function(){a(this).removeClass("active").removeAttr("style")})},autoAdvance:function(){clearInterval(b.timer),b.timer=setInterval(b.marquee.right,f.duration)},setting:function(c,e){return e===d?f[c]:(a.isPlainObject(c)?(b.verbose("Modifying settings object",c,e),a.extend(!0,f,c)):(b.verbose("Modifying setting",c,e),f[c]=e),void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?(b.verbose("Modifying internal property",c,e),a.extend(!0,b,c)):(b.verbose("Changing internal method to",e),b[c]=e),void 0)},debug:function(){f.debug&&(f.performance?b.performance.log(arguments):b.debug=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},verbose:function(){f.verbose&&f.debug&&(f.performance?b.performance.log(arguments):b.verbose=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},error:function(){b.error=Function.prototype.bind.call(console.log,console,f.moduleName+":")},performance:{log:function(a){var c,d,e;f.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Element:r,Name:a[0],Arguments:a[1]||"None","Execution Time":d}),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100))},display:function(){var b=f.moduleName,c=(f.moduleName+": "+g+"("+e.size()+" elements)",0);
g&&(b+=" Performance ("+g+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?(a.each(i,function(a,b){c+=b["Execution Time"]}),console.table(i)):a.each(i,function(a,b){c+=b["Execution Time"],console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.log("Total Execution Time:",c+"ms"),console.groupEnd(),i=[],h=!1)}},invoke:function(c,e,f){var g,h;return e=e||l,f=r||f,"string"==typeof c&&s!==d&&(c=c.split("."),g=c.length-1,a.each(c,function(c,e){return a.isPlainObject(s[e])&&c!=g?(s=s[e],!0):s[e]!==d?(h=s[e],!0):(b.error(v.method),!1)})),a.isFunction(h)?(s.verbose("Executing invoked function",h),h.apply(f,e)):h||!1}},k?(s===d&&b.initialize(),c=b.invoke(j)):(s!==d&&b.destroy(),b.initialize())}),c?c:this},a.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(a,b,c,d){a.fn.chat=function(b,c,e){var f=a.extend(!0,{},a.fn.chat.settings,e),g=arguments||!1;return a(this).each(function(){var e,h,i,j,k,l,m=a(this),n=m.find(f.selector.expandButton),o=m.find(f.selector.userListButton),p=m.find(f.selector.userList),q=(m.find(f.selector.room),m.find(f.selector.userCount)),r=m.find(f.selector.log),s=(m.find(f.selector.message),m.find(f.selector.messageInput)),t=m.find(f.selector.messageButton),u=m.data("module"),v=f.className,w=f.namespace,x="",y={};return l={channel:!1,width:{log:r.width(),userList:p.outerWidth()},initialize:function(){return Pusher===d&&l.error(f.errors.pusher),b===d||c===d?(l.error(f.errors.key),!1):f.endpoint.message||f.endpoint.authentication?(k=new Pusher(b),Pusher.channel_auth_endpoint=f.endpoint.authentication,l.channel=k.subscribe(c),l.channel.bind("pusher:subscription_succeeded",l.user.list.create),l.channel.bind("pusher:subscription_error",l.error),l.channel.bind("pusher:member_added",l.user.joined),l.channel.bind("pusher:member_removed",l.user.left),l.channel.bind("update_messages",l.message.receive),a.each(f.customEvents,function(a,b){l.channel.bind(a,b)}),a.fn.hoverClass!==d&&a.fn.downClass!==d&&(n.hoverClass().downClass(),o.hoverClass().downClass(),t.hoverClass().downClass()),o.on("click."+w,l.event.toggleUserList),n.on("click."+w,l.event.toggleExpand),s.on("keydown."+w,l.event.input.keydown).on("keyup."+w,l.event.input.keyup),t.on("mouseenter."+w,l.event.hover).on("mouseleave."+w,l.event.hover).on("click."+w,l.event.submit),r.animate({scrollTop:r.prop("scrollHeight")},400),m.data("module",l).addClass(v.loading),void 0):(l.error(f.errors.endpoint),!1)},refresh:function(){o.removeClass(v.active),l.width={log:r.width(),userList:p.outerWidth()},o.hasClass(v.active)&&l.user.list.hide(),m.data("module",l)},user:{updateCount:function(){f.userCount&&(y=m.data("users"),i=0,a.each(y,function(){i++}),q.html(f.templates.userCount(i)))},joined:function(b){y=m.data("users"),"anonymous"!=b.id&&y[b.id]===d&&(y[b.id]=b.info,f.randomColor&&b.info.color===d&&(b.info.color=f.templates.color(b.id)),x=f.templates.userList(b.info),b.info.isAdmin?a(x).prependTo(p):a(x).appendTo(p),f.partingMessages&&(r.append(f.templates.joined(b.info)),l.message.scroll.test()),l.user.updateCount())},left:function(a){y=m.data("users"),a!==d&&"anonymous"!==a.id&&(delete y[a.id],m.data("users",y),p.find("[data-id="+a.id+"]").remove(),f.partingMessages&&(r.append(f.templates.left(a.info)),l.message.scroll.test()),l.user.updateCount())},list:{create:function(b){y={},b.each(function(a){"anonymous"!==a.id&&"undefined"!==a.id&&(f.randomColor&&a.info.color===d&&(a.info.color=f.templates.color(a.id)),x=a.info.isAdmin?f.templates.userList(a.info)+x:x+f.templates.userList(a.info),y[a.id]=a.info)}),m.data("users",y).data("user",y[b.me.id]).removeClass(v.loading),p.html(x),l.user.updateCount(),a.proxy(f.onJoin,p.children())()},show:function(){r.animate({width:l.width.log-l.width.userList},{duration:f.speed,easing:f.easing,complete:l.message.scroll.move})},hide:function(){r.stop().animate({width:l.width.log},{duration:f.speed,easing:f.easing,complete:l.message.scroll.move})}}},message:{scroll:{test:function(){j=r.prop("scrollHeight")-r.height(),Math.abs(r.scrollTop()-j)',b+=''):b+='
"}}}}(jQuery,window,document),function(a,b,c,d){a.fn.checkbox=function(b){var c,e=a(this),f=a.extend(!0,{},a.fn.checkbox.settings,b),g="."+f.namespace,h="module-"+f.namespace,i=e.selector||"",j=(new Date).getTime(),k=[],l=arguments[0],m="string"==typeof l,n=[].slice.call(arguments,1);return e.each(function(){var b,e=a(this),o=a(this).next(f.selector.label).first(),p=a(this).find(f.selector.input),q=e.selector||"",r=this,s=e.data("module-"+f.namespace),t=f.className,u=f.namespace,v=f.errors;b={initialize:function(){f.context&&""!==q?(b.verbose("Initializing checkbox with delegated events",e),a(r,f.context).on(q,"click"+g,b.toggle).on(q+" + "+f.selector.label,"click"+g,b.toggle).data(h,b)):(b.verbose("Initializing checkbox with bound events",e),e.on("click"+g,b.toggle).data(h,b),o.on("click"+g,b.toggle))},destroy:function(){b.verbose("Destroying previous module for",e),e.off(u)},is:{radio:function(){return e.hasClass(t.radio)}},can:{disable:function(){return"boolean"==typeof f.required?f.required:!b.is.radio()}},enable:function(){b.debug("Enabling checkbox"),e.addClass(t.active),p.prop("checked",!0),a.proxy(f.onChange,p.get())(),a.proxy(f.onEnable,p.get())()},disable:function(){b.debug("Disabling checkbox"),e.removeClass(t.active),p.prop("checked",!1),a.proxy(f.onChange,p.get())(),a.proxy(f.onDisable,p.get())()},toggle:function(){b.verbose("Toggling checkbox state"),p.prop("checked")!==d&&p.prop("checked")?b.can.disable()&&b.disable():b.enable()},setting:function(c,e){return e===d?f[c]:(a.isPlainObject(c)?(b.verbose("Modifying settings object",c,e),a.extend(!0,f,c)):(b.verbose("Modifying setting",c,e),f[c]=e),void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?(b.verbose("Modifying internal property",c,e),a.extend(!0,b,c)):(b.verbose("Changing internal method to",e),b[c]=e),void 0)},debug:function(){f.debug&&(f.performance?b.performance.log(arguments):b.debug=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},verbose:function(){f.verbose&&f.debug&&(f.performance?b.performance.log(arguments):b.verbose=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},error:function(){b.error=Function.prototype.bind.call(console.log,console,f.moduleName+":")},performance:{log:function(a){var c,d,e;f.performance&&(c=(new Date).getTime(),e=j||c,d=c-e,j=c,k.push({Element:r,Name:a[0],Arguments:a[1]||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var b=f.moduleName+":",c=0;j=!1,a.each(k,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",i&&(b+=" '"+i+"'"),(console.group!==d||console.table!==d)&&k.length>0&&(console.groupCollapsed(b),console.table?console.table(k):a.each(k,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(c,e,f){var g,h;return e=e||n,f=r||f,"string"==typeof c&&s!==d&&(c=c.split("."),g=c.length-1,a.each(c,function(c,e){return a.isPlainObject(s[e])&&c!=g?(s=s[e],!0):s[e]!==d?(h=s[e],!0):(b.error(v.method),!1)})),a.isFunction(h)?(s.verbose("Executing invoked function",h),h.apply(f,e)):h||!1}},m?(s===d&&b.initialize(),c=b.invoke(l)):(s!==d&&b.destroy(),b.initialize())}),c?c:this},a.fn.checkbox.settings={moduleName:"Checkbox",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",label:"label"},className:{active:"active",radio:"radio"}}}(jQuery,window,document),function(a,b,c,d){a.fn.dimmer=function(b){var c,e=a(this),f=a.isPlainObject(b)?a.extend(!0,{},a.fn.dimmer.settings,b):a.fn.dimmer.settings,g=("."+f.namespace,"module-"+f.namespace,e.selector||""),h=(e.size(),(new Date).getTime()),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1),m=f.selector,n=f.namespace,o=f.className,p=f.error;return e.each(function(){var b,e=a(this),q=e.children(m.dimmer).first(),r="animationend msAnimationEnd oAnimationEnd webkitAnimationEnd",s=this,t=q.data("module-"+n);b={initialize:function(){b.is.dimmer()?(q=e,e=q.parent(),b.debug("Module initialized as dimmer",q)):(b.has.dimmer()?(q=e.find(m.dimmer),b.debug("Module initialized with found dimmer",q)):(q=f.template.dimmer(),q.appendTo(e),b.debug("Module initialized with created dimmer",q)),"hover"==f.on?e.on("mouseenter",b.show).on("mouseleave",b.hide):"click"==f.on&&e.on("click",b.toggle)),e.addClass(o.dimmable),f.closable&&q.on("click",b.event.click),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module"),t=b,q.data("module-"+n,t)},destroy:function(){b.verbose("Destroying previous module for",e),e.off(n)},event:{click:function(c){b.verbose("Determining if event occured on dimmer",c),console.log(c.target,m.content,a(c.target).is(m.content)),(0===q.find(c.target).size()||a(c.target).is(m.content))&&b.hide()}},animate:{show:function(){b.set.dimmed(),"css"==f.animation.show?(b.verbose("Showing dimmer animation with css"),q.one(r,function(){b.set.active(),q.removeClass(o.show)}).addClass(o.show)):"fade"==f.animation.show&&(b.verbose("Showing dimmer animation with javascript"),q.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(f.duration,1,function(){q.removeAttr("style"),b.set.active()}))},hide:function(){b.remove.dimmed(),"css"==f.animation.hide?(b.verbose("Hiding dimmer with css"),q.one(r,function(){b.remove.active(),q.removeClass(o.hide)}).addClass(o.hide)):"fade"==f.animation.hide?(b.verbose("Hiding dimmer with javascript"),q.stop().fadeOut(.75*f.duration,function(){q.removeAttr("style"),b.remove.active()})):a.isFunction(f.animation.hide)&&a.proxy(f.animation.hide,q)()}},has:{dimmer:function(){return e.children(m.dimmer).size()>0}},is:{animating:function(){return q.hasClass(o.show)||q.hasClass(o.hide)||q.is(":animated")},dimmer:function(){return e.is(m.dimmer)},pageDimmer:function(){return e.is(m.pageDimmer)},dimmable:function(){return e.is(m.dimmable)},enabled:function(){return!e.hasClass(o.disabled)},disabled:function(){return e.hasClass(o.disabled)},active:function(){return q.hasClass(o.active)}},can:{show:function(){return!q.hasClass(o.disabled)}},set:{active:function(){q.addClass(o.active)},dimmed:function(){e.addClass(o.dimmed)},disabled:function(){q.addClass(o.disabled)}},remove:{active:function(){q.removeClass(o.active)},dimmed:function(){e.removeClass(o.dimmed)},disabled:function(){q.removeClass(o.disabled)}},show:function(){b.debug("Showing dimmer",q),b.is.active()&&!b.is.animating()||!b.is.enabled()?b.debug("Dimmer is already shown or disabled"):(b.animate.show(),a.proxy(f.onShow,s)(),a.proxy(f.onChange,s)())},hide:function(){b.is.active()||b.is.animating()?(b.debug("Hiding dimmer",q),b.animate.hide(),a.proxy(f.onHide,s)(),a.proxy(f.onChange,s)()):b.debug("Dimmer is not visible")},toggle:function(){b.verbose("Toggling dimmer visibility",q),b.is.hidden()?b.show():b.hide()},setting:function(b,c){return c===d?f[b]:(a.isPlainObject(b)?a.extend(!0,f,b):f[b]=c,void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){f.debug&&(f.performance?b.performance.log(arguments):b.debug=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},verbose:function(){f.verbose&&f.debug&&(f.performance?b.performance.log(arguments):b.verbose=Function.prototype.bind.call(console.info,console,f.moduleName+":"))},error:function(){b.error=Function.prototype.bind.call(console.log,console,f.moduleName+":")},performance:{log:function(a){var c,d,e;f.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Element:s,Name:a[0],Arguments:a[1]||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var b=f.moduleName+":",c=0;h=!1,a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(b),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(c,e,f){var g,h;return e=e||l,f=s||f,"string"==typeof c&&t!==d&&(c=c.split("."),g=c.length-1,a.each(c,function(c,e){a.isPlainObject(t[e])&&c!=g?t=t[e]:t[e]!==d?h=t[e]:b.error(p.method)})),a.isFunction(h)?(t.verbose("Executing invoked function",h),h.apply(f,e)):h||!1}},k?(t===d&&b.initialize(),c=b.invoke(j)):(t===d&&b.destroy(),b.initialize())}),c?c:this},a.fn.dimmer.settings={moduleName:"Dimmer",namespace:"dimmer",verbose:!0,debug:!0,performance:!0,animation:{show:"fade",hide:"fade"},on:!1,closable:!0,duration:500,onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},selector:{dimmable:".ui.dimmable",dimmer:".ui.dimmer",content:".ui.dimmer > .content"},template:{dimmer:function(){return a("").attr("class","ui dimmer")}},className:{active:"active",animating:"animating",dimmable:"ui dimmable",dimmed:"dimmed",disabled:"disabled",hide:"hide",show:"show"}}}(jQuery,window,document),function(a,b,c,d){a.fn.dropdown=function(b){var e,f=a(this),g=a(c),h=a.isPlainObject(b)?a.extend(!0,{},a.fn.dropdown.settings,b):a.fn.dropdown.settings,i="."+h.namespace,j="module-"+h.namespace,k=f.selector||"",l=(new Date).getTime(),m=[],n=arguments[0],o="string"==typeof n,p=[].slice.call(arguments,1);return f.each(function(){var b,q=a(this),r=a(this).find(h.selector.menu),s=a(this).find(h.selector.item),t=a(this).find(h.selector.text),u=a(this).find(h.selector.input),v="ontouchstart"in c.documentElement,w=(q.selector||"",this),x=q.data("module-"+h.namespace),y=h.className,z=h.metadata,A=h.namespace,B=h.animation,C=h.errors;b={initialize:function(){b.verbose("Initializing dropdown with bound events",q),v?q.on("touchstart"+i,b.event.test.toggle):"click"==h.on?q.on("click"+i,b.event.test.toggle):"hover"==h.on?q.on("mouseenter"+i,b.delay.show).on("mouseleave"+i,b.delay.hide):q.on(h.on+i,b.toggle),"form"==h.action&&b.set.selected(),s.on(b.get.selectEvent()+i,b.event.item.click),q.data(j,b)},destroy:function(){b.verbose("Destroying previous module for",q),q.off(A)},event:{stopPropagation:function(a){a.stopPropagation()},test:{toggle:function(a){b.intent.test(a,b.toggle),a.stopPropagation()},hide:function(a){b.intent.test(a,b.hide),a.stopPropagation()}},item:{click:function(c){var d=a(this),e=d.data(z.text)||d.text(),f=d.data(z.value)||e;b.verbose("Adding active state to selected item"),s.removeClass(y.active),d.addClass(y.active),b.action.determine(e,f),a.proxy(h.onChange,q.get())(f,e),c.stopPropagation()}},resetStyle:function(){a(this).removeAttr("style")}},intent:{test:function(c,d){b.debug("Determining whether event occurred in dropdown",c.target),d=d||function(){},0===a(c.target).closest(r).size()?(b.verbose("Triggering event",d),d()):b.verbose("Event occurred in dropdown, canceling callback")},bind:function(){b.verbose("Binding hide intent event to document"),g.on(b.get.selectEvent(),b.event.test.hide)},unbind:function(){b.verbose("Removing hide intent event from document"),g.off(b.get.selectEvent())}},action:{determine:function(c,d){a.isFunction(b.action[h.action])?(b.verbose("Triggering preset action",h.action),b.action[h.action](c,d)):a.isFunction(h.action)?(b.verbose("Triggering user action",h.action),h.action(c,d)):b.error(C.action)},none:function(){},hide:function(){b.hide()},changeText:function(a){b.set.text(a),b.hide()},form:function(a,c){b.set.text(a),b.set.value(c),b.hide()}},get:{selectEvent:function(){return v?"touchstart":"click"},text:function(){return t.text()},value:function(){return u.val()},item:function(b){var c;return b=b||u.val(),s.each(function(){a(this).data(z.value)==b&&(c=a(this))}),c||!1}},set:{text:function(a){b.debug("Changing text",a,t),t.removeClass(y.placeholder),t.text(a)},value:function(a){b.debug("Adding selected value to hidden input",a,u),u.val(a)},selected:function(a){var c,d=(a||u.val(),b.get.item(a));d&&(b.debug("Setting selected menu item to",d),c=d.data(z.text)||d.text(),s.removeClass(y.active),d.addClass(y.active),b.set.text(c))}},is:{visible:function(){return r.is(":visible")},hidden:function(){return r.is(":not(:visible)")}},can:{click:function(){return v||"click"==h.on},show:function(){return!q.hasClass(y.disabled)}},animate:{show:function(){b.verbose("Doing menu showing animation"),"none"==B.show?r.show():"fade"==B.show?r.hide().clearQueue().fadeIn(150,b.event.resetStyle):"slide"==B.show?r.hide().clearQueue().children().clearQueue().css("opacity",0).delay(50).animate({opacity:1},200,"easeOutQuad",b.event.resetStyle).end().slideDown(100,"easeOutQuad",b.event.resetStyle):b.error(C.animation)},hide:function(){b.verbose("Doing menu hiding animation"),"none"==B.hide?r.hide():"fade"==B.hide?r.show().clearQueue().fadeOut(150,b.event.resetStyle):"slide"==B.hide?r.show().clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},100,"easeOutQuad",b.event.resetStyle).end().delay(50).slideUp(100,"easeOutQuad",b.event.resetStyle):b.error(C.animation)}},show:function(){b.debug("Checking if dropdown can show"),b.is.visible()||(b.hideOthers(),q.addClass(y.visible),b.animate.show(),b.can.click()&&b.intent.bind(),a.proxy(h.onShow,q.get())())},hide:function(){b.is.hidden()||(b.debug("Hiding dropdown"),q.removeClass(y.visible),b.can.click()&&b.intent.unbind(),b.animate.hide(),a.proxy(h.onHide,q.get())())},delay:{show:function(){b.verbose("Delaying show event to ensure user intent"),clearTimeout(b.graceTimer),b.graceTimer=setTimeout(b.show,h.delay.show)},hide:function(){b.verbose("Delaying hide event to ensure user intent"),clearTimeout(b.graceTimer),b.graceTimer=setTimeout(b.hide,h.delay.hide)}},hideOthers:function(){b.verbose("Finding other dropdowns to hide"),f.not(q).has(h.selector.menu+":visible").dropdown("hide")},toggle:function(){b.verbose("Toggling menu visibility"),b.is.hidden()?b.show():b.hide()},setting:function(b,c){return c===d?h[b]:(a.isPlainObject(b)?a.extend(!0,h,b):h[b]=c,void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){h.debug&&(h.performance?b.performance.log(arguments):b.debug=Function.prototype.bind.call(console.info,console,h.moduleName+":"))},verbose:function(){h.verbose&&h.debug&&(h.performance?b.performance.log(arguments):b.verbose=Function.prototype.bind.call(console.info,console,h.moduleName+":"))},error:function(){b.error=Function.prototype.bind.call(console.error,console,h.moduleName+":")},performance:{log:function(a){var c,d,e;h.performance&&(c=(new Date).getTime(),e=l||c,d=c-e,l=c,m.push({Element:w,Name:a[0],Arguments:a[1]||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var b=h.moduleName+":",c=0;l=!1,a.each(m,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",k&&(b+=" '"+k+"'"),(console.group!==d||console.table!==d)&&m.length>0&&(console.groupCollapsed(b),console.table?console.table(m):a.each(m,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(c,e,f){var g,h;return e=e||p,f=w||f,"string"==typeof c&&x!==d&&(c=c.split("."),g=c.length-1,a.each(c,function(c,e){a.isPlainObject(x[e])&&c!=g?x=x[e]:x[e]!==d?h=x[e]:b.error(C.method)})),a.isFunction(h)?(x.verbose("Executing invoked function",h),h.apply(f,e)):h||!1}},o?(x===d&&b.initialize(),e=b.invoke(n)):(x!==d&&b.destroy(),b.initialize())}),e?e:this},a.fn.dropdown.settings={moduleName:"Dropdown",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",action:"hide",delay:{show:50,hide:300},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.",animation:"The requested animation was not found"},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",placeholder:"default",disabled:"disabled",visible:"visible"}}}(jQuery,window,document),function(a,b,c,d){a.dimScreen=function(b){var c="function"==typeof b?a.extend({},a.fn.modal.settings,{dim:b}):a.extend({},a.fn.modal.settings,b),d=a(c.context),e=d.children(c.selector.dimmer),f=e.size()>0,g=e.css("opacity");return f||(e=a("").attr("id","dimmer").html(''),d.append(e)),g!=c.opacity&&(e.one("click",function(){c.unDim(),a.unDimScreen()}),0===c.duration?(e.css({visibility:"visible"}).find(".content").css({opacity:c.opacity,visibility:"visible"}),c.dim()):e.css({visibility:"visible"}).find(".content").css({opacity:0,visibility:"visible"}).fadeTo(c.duration,c.opacity,c.dim)),this},a.unDimScreen=function(b){var c="function"==typeof b?a.extend({},a.fn.modal.settings,{unDim:b}):a.extend({},a.fn.modal.settings,b),d=a(c.context),e=d.children(c.selector.dimmer),f=e.size()>0;return f&&(c.unDim(),0===c.duration?e.css({visibility:"hidden"}).remove():e.find(".content").fadeTo(c.duration,0,function(){e.remove()})),this},a.fn.modal=function(e){var f,g=a.extend(!0,{},a.fn.modal.settings,e),h=arguments[0],i=[].slice.call(arguments,1);return a(this).each(function(){var e,j=a(this),k=j.find(g.selector.closeButton),l=(a(g.context).find(g.selector.dimmer),a(g.context).children(g.selector.modal)),m=l.not(j),n=j.data("module-"+g.namespace),o="string"==typeof h,p=(g.className,g.namespace);e={initialize:function(){j.on("modalShow."+p,e.show).on("modalHide."+p,e.hide).data("module-"+p,e)},show:function(){var e,f,h,i,l=j.outerHeight(),n=a(b).height(),o=l>n,q=o?"absolute":"fixed";j.addClass(q),e=o?"0":"50%",f=o?n/8:-((l-g.closeSpacing)/2),h="absolute"==j.css("position")?f+a(b).prop("pageYOffset"):f,i=h+g.animationOffset,a.fn.popIn!==d?j.css({display:"block",opacity:0,top:e,marginTop:h+"px"}).popIn():j.css({display:"block",opacity:0,top:e,marginTop:i+"px"}).animate({opacity:1,marginTop:h+"px"},g.duration+300,g.easing),m.is(":visible")&&m.filter(":visible").hide(),a.dimScreen({context:g.context,duration:0,dim:function(){a(c).on("keyup."+p,function(a){var b=a.which,c=27;switch(b){case c:j.modal("hide"),a.preventDefault()}}),k.one("click",function(){j.modal("hide")}),g.dim()},unDim:function(){j.modal("hide"),k.unbind("click")}})},hide:function(){a(c).off("keyup."+p),a.unDimScreen({duration:0,unDim:function(){j.popOut(200),g.unDim()}})},setting:function(a,b){return b===d?g[a]:(g[a]=b,void 0)},debug:function(){var a=[],b=g.moduleName+": "+arguments[0],c=[].slice.call(arguments,1),d=console.info||console.log||function(){};g.debug&&(a.push(b),d.apply(console,a.concat(c)))},error:function(){var a=[],b=g.moduleName+": "+arguments[0],c=[].slice.call(arguments,1),d=console.warn||console.log||function(){};g.debug&&(a.push(b),a.concat(c),d.apply(console,a.concat(c)))},invoke:function(b,c,f){var h,i;return f=f||[].slice.call(arguments,2),"string"==typeof b&&n!==d&&(b=b.split("."),h=b.length-1,a.each(b,function(b,c){return a.isPlainObject(n[c])&&b!=h?(n=n[c],!0):n[c]!==d?(i=n[c],!0):(e.error(g.errors.method),!1)})),a.isFunction(i)?i.apply(c,f):i}},o?f=e.invoke(h,this,i):e.initialize()}),f!==d?f:this},a.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(a,b,c,d){a.fn.nag=function(c){var e=a.extend(!0,{},a.fn.nag.settings,c),f=arguments||!1;return a(this).each(function(){var c,g,h,i,j,k,l,m,n,o=a(this),p=o.find(e.selector.close),q=a(e.context),r=o.data("module"),s=e.className,t=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};return n={initialize:function(){c=o.offset(),g=o.outerHeight(),h=q.outerWidth(),i=q.outerHeight(),j=q.offset(),o.data("module",n),p.on("click",n.dismiss),e.context==b&&"fixed"==e.position&&o.addClass(s.fixed),e.sticky&&("absolute"==e.position?q.on("scroll resize",n.event.scroll):a(b).on("scroll resize",n.event.scroll),a.proxy(n.event.scroll,this)()),e.displayTime>0&&setTimeout(n.hide,e.displayTime),n.should.show()?o.is(":visible")||n.show():n.hide()},refresh:function(){c=o.offset(),g=o.outerHeight(),h=q.outerWidth(),i=q.outerHeight(),j=q.offset()},show:function(){a.fn.popIn!==d?o.popIn(e.duration):o.fadeIn(e.duration,e.easing)},hide:function(){o.fadeOut(e.duration,e.easing,this.onHide)},onHide:function(){o.remove(),e.onHide&&e.onHide()},stick:function(){if(n.refresh(),"fixed"==e.position){var c=a(b).prop("pageYOffset")||a(b).scrollTop(),d=o.hasClass(s.bottom)?j.top+(i-g)-c:j.top-c;o.css({position:"fixed",top:d,left:j.left,width:h-e.scrollBarWidth})}else o.css({top:l})},unStick:function(){o.css({top:""})},dismiss:function(a){e.storageMethod&&n.storage.set(e.storedKey,e.storedValue),n.hide(),a.stopImmediatePropagation(),a.preventDefault()},should:{show:function(){return e.persist||n.storage.get(e.storedKey)!=e.storedValue?!0:!1},stick:function(){return k=q.prop("pageYOffset")||q.scrollTop(),l=o.hasClass(s.bottom)?i-o.outerHeight()+k:k,l>c.top?!0:"fixed"==e.position?!0:!1}},storage:{set:function(c,f){"local"==e.storageMethod&&b.store!==d?b.store.set(c,f):a.cookie!==d?a.cookie(c,f):n.error(e.errors.noStorage)},get:function(c){return"local"==e.storageMethod&&b.store!==d?b.store.get(c):a.cookie!==d?a.cookie(c):(n.error(e.errors.noStorage),void 0)}},event:{scroll:function(){m!==d&&clearTimeout(m),m=setTimeout(function(){n.should.stick()?t(n.stick):n.unStick()},e.lag)}},error:function(a){console.log("Nag Module:"+a)},invoke:function(b,c,f){var g;return f=f||Array.prototype.slice.call(arguments,2),"string"==typeof b&&r!==d&&(b=b.split("."),a.each(b,function(b,c){return a.isPlainObject(r[c])?(r=r[c],!0):a.isFunction(r[c])?(g=r[c],!0):(n.error(e.errors.method),!1)})),a.isFunction(g)?g.apply(c,f):g}},r!==d&&f?("invoke"==f[0]&&(f=Array.prototype.slice.call(f,1)),n.invoke(f[0],this,Array.prototype.slice.call(f,1))):(n.initialize(),void 0)}),this},a.fn.nag.settings={persist:!1,displayTime:0,position:"fixed",scrollBarWidth:18,storageMethod:"cookie",storedKey:"nag",storedValue:"dismiss",sticky:!1,lag:0,context:b,errors:{noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state"},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".icon.close"},speed:500,easing:"easeOutQuad",onHide:function(){}}}(jQuery,window,document),function(a,b,c,d){a.fn.popup=function(e){var f,g=a(this),h=a.isPlainObject(e)?a.extend(!0,{},a.fn.popup.settings,e):a.fn.popup.settings,i=("."+h.namespace,"module-"+h.namespace,g.selector||""),j=(g.size(),(new Date).getTime()),k=[],l=h.selector,m=h.className,n=h.error,o=h.metadata,p=h.namespace,q=arguments[0],r="string"==typeof q,s=[].slice.call(arguments,1);return g.each(function(){var e,g=a(this),t=a(b),u=g.offsetParent(),v=h.inline?g.next(l.popup):t.children(l.popup).last(),w=0,x=this,y=g.data("module-"+h.namespace);e={initialize:function(){e.debug("Initializing module",g),"hover"==h.on?g.on("mouseenter."+p,e.event.mouseenter).on("mouseleave."+p,e.event.mouseleave):g.on(h.on+"."+p,e.event[h.on]),t.on("resize."+p,e.event.resize),e.instantiate()
},instantiate:function(){e.verbose("Storing instance of module"),y=e,g.data("module-"+p,y)},refresh:function(){v=h.inline?g.next(l.popup):t.children(l.popup).last(),u=g.offsetParent()},destroy:function(){e.debug("Destroying existing popups"),g.off("."+p)},event:{mouseenter:function(b){var c=this;e.timer=setTimeout(function(){a.proxy(e.toggle,c)(),a(c).hasClass(m.visible)&&b.stopPropagation()},h.delay)},mouseleave:function(){clearTimeout(e.timer),g.is(":visible")&&e.hide()},click:function(b){a.proxy(e.toggle,this)(),a(this).hasClass(m.visible)&&b.stopPropagation()},resize:function(){v.is(":visible")&&e.position()}},create:function(){e.debug("Creating pop-up html");var b=g.data(o.html)||h.html,c=g.data(o.variation)||h.variation,d=g.data(o.title)||h.title,f=g.data(o.content)||g.attr("title")||h.content;b||f||d?(b||(b=h.template({title:d,content:f})),v=a("").addClass(m.popup).addClass(c).html(b),h.inline?v.insertAfter(g):v.appendTo(a("body")),a.proxy(h.onInit,v)()):e.error(n.content)},remove:function(){v.remove()},get:{offstagePosition:function(){var c={top:a(b).scrollTop(),bottom:a(b).scrollTop()+a(b).height(),left:0,right:a(b).width()},d={width:v.width(),height:v.outerHeight(),position:v.offset()},e={},f=[];return d.position&&(e={top:d.position.topc.bottom,right:d.position.left+d.width>c.right,left:d.position.left0?f.join(" "):!1},nextPosition:function(a){switch(a){case"top left":a="bottom left";break;case"bottom left":a="top right";break;case"top right":a="bottom right";break;case"bottom right":a="top center";break;case"top center":a="bottom center";break;case"bottom center":a="right center";break;case"right center":a="left center";break;case"left center":a="top center"}return a}},toggle:function(){g=a(this),e.debug("Toggling pop-up"),e.refresh(),g.hasClass(m.visible)?e.hide():(e.hideAll(),e.show())},position:function(c,d){var f,i,j=(a(b).width(),a(b).height(),g.outerWidth()),k=g.outerHeight(),l=v.width(),p=v.outerHeight(),q=h.inline?g.position():g.offset(),r=h.inline?u.outerWidth():t.outerWidth(),s=h.inline?u.outerHeight():t.outerHeight();switch(c=c||g.data(o.position)||h.position,d=d||g.data(o.arrowOffset)||h.arrowOffset,e.debug("Calculating offset for position",c),c){case"top left":f={top:"auto",bottom:s-q.top+h.distanceAway,left:q.left+d};break;case"top center":f={bottom:s-q.top+h.distanceAway,left:q.left+j/2-l/2+d,top:"auto",right:"auto"};break;case"top right":f={bottom:s-q.top+h.distanceAway,right:r-q.left-j-d,top:"auto",left:"auto"};break;case"left center":f={top:q.top+k/2-p/2,right:r-q.left+h.distanceAway-d,left:"auto",bottom:"auto"};break;case"right center":f={top:q.top+k/2-p/2,left:q.left+j+h.distanceAway+d,bottom:"auto",right:"auto"};break;case"bottom left":f={top:q.top+k+h.distanceAway,left:q.left+d,bottom:"auto",right:"auto"};break;case"bottom center":f={top:q.top+k+h.distanceAway,left:q.left+j/2-l/2+d,bottom:"auto",right:"auto"};break;case"bottom right":f={top:q.top+k+h.distanceAway,right:r-q.left-j-d,left:"auto",bottom:"auto"}}return a.extend(f,{width:v.width()+1}),v.removeAttr("style").removeClass("top right bottom left center").css(f).addClass(c).addClass(m.loading),i=e.get.offstagePosition(),i?(e.debug("Element is outside boundaries ",i),w0&&(console.groupCollapsed(b),console.table?console.table(k):a.each(k,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(b,c,f){var g,h;return c=c||s,f=x||f,"string"==typeof b&&y!==d&&(b=b.split("."),g=b.length-1,a.each(b,function(b,c){a.isPlainObject(y[c])&&b!=g?y=y[c]:y[c]!==d?h=y[c]:e.error(n.method)})),a.isFunction(h)?(y.verbose("Executing invoked function",h),h.apply(f,c)):h||!1}},r?(y===d&&e.initialize(),f=e.invoke(q)):(y===d&&e.destroy(),e.initialize())}),f?f:this},a.fn.popup.settings={moduleName:"Popup",debug:!0,verbose:!0,performance:!0,namespace:"popup",onInit:function(){},onShow:function(){},onHide:function(){},variation:"",content:!1,html:!1,title:!1,on:"hover",clicktoClose:!0,position:"top center",delay:150,inline:!0,duration:250,easing:"easeOutQuint",animation:"pop",distanceAway:0,arrowOffset:0,maxSearchDepth:10,error:{content:"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:{arrowOffset:"arrowOffset",content:"content",html:"html",position:"position",title:"title",variation:"variation"},className:{popup:"ui popup",visible:"visible",loading:"loading"},selector:{popup:".ui.popup"},template:function(a){var b="";return typeof a!==d&&(typeof a.title!==d&&a.title&&(b+='
'+a.title+'
'),typeof a.content!==d&&a.content&&(b+='
'+a.content+"
")),b}}}(jQuery,window,document),function(a,b,c,d){a.fn.searchPrompt=function(c,e){var f,g=a.extend(!0,{},a.fn.searchPrompt.settings,e),h=arguments[0],i=[].slice.call(arguments,1);return a(this).each(function(){var e,j=a(this),k=j.find(g.selector.searchPrompt),l=j.find(g.selector.searchButton),m=j.find(g.selector.searchResults),n=(j.find(g.selector.result),j.find(g.selector.category),j.find(g.selector.emptyResult),j.find(g.selector.resultPage),this),o=(j.selector||"",j.data("module-"+g.namespace)),p=o!==d&&"string"==typeof h,q=g.className,r=g.namespace,s=g.errors;e={initialize:function(){var a=k[0],b=a.oninput!==d?"input":a.onpropertychange!==d?"propertychange":"keyup";k.on("focus."+r,e.event.focus).on("blur."+r,e.event.blur).on("keydown."+r,e.handleKeyboard),g.automatic&&k.on(b+"."+r,e.search.throttle),l.on("click."+r,e.search.query),m.on("click."+r,g.selector.result,e.results.select),j.data("module-"+r,e)},event:{focus:function(){j.addClass(q.focus),e.results.show()},blur:function(){e.search.cancel(),j.removeClass(q.focus),e.results.hide()}},handleKeyboard:function(b){var c,d=j.find(g.selector.result),f=j.find(g.selector.category),h=b.which,i={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},n=q.active,o=d.index(d.filter("."+n)),p=d.size();if(h==i.escape&&k.trigger("blur"),m.filter(":visible").size()>0)if(h==i.enter){if(d.filter("."+n).exists())return a.proxy(e.results.select,d.filter("."+n))(),b.preventDefault(),!1}else h==i.upArrow?(c=0>o-1?o:o-1,f.removeClass(n),d.removeClass(n).eq(c).addClass(n).closest(f).addClass(n),b.preventDefault()):h==i.downArrow&&(c=o+1>=p?o:o+1,f.removeClass(n),d.removeClass(n).eq(c).addClass(n).closest(f).addClass(n),b.preventDefault());else h==i.enter&&(e.search.query(),l.addClass(q.down),k.one("keyup",function(){l.removeClass(q.down)}))},search:{cancel:function(){var a=j.data("xhr")||!1;a&&"resolved"!=a.state()&&a.abort()},throttle:function(){var a,b=k.val(),c=b.length;clearTimeout(j.data("timer")),c>=g.minCharacters?(a=setTimeout(e.search.query,g.searchThrottle),j.data("timer",a)):e.results.hide()},query:function(){var b=k.val(),d=e.search.cache.read(b);d?(e.debug("Reading result for '"+b+"' from cache"),e.results.add(d)):(e.debug("Querying for '"+b+"'"),"object"==typeof c?e.search.local(b):e.search.remote(b),a.proxy(g.onSearchQuery,j)(b))},local:function(b){var d,f=[],h=[],i=a.isArray(g.searchFields)?g.searchFields:[g.searchFields],k=new RegExp("(?:s|^)"+b,"i"),l=new RegExp(b,"i");j.addClass(q.loading),a.each(i,function(b,d){a.each(c,function(b,c){"string"==typeof c[d]&&-1==a.inArray(c,f)&&-1==a.inArray(c,h)&&(k.test(c[d])?f.push(c):l.test(c[d])&&h.push(c))})}),d=e.results.generate({results:a.merge(f,h)}),j.removeClass(q.loading),e.search.cache.write(b,d),e.results.add(d)},remote:function(b){var f,h=j.data("xhr")!==d?j.data("xhr"):!1,i={stateContext:j,url:c,urlData:{query:b},success:function(a){f=e.results.generate(a),e.search.cache.write(b,f),e.results.add(f)},failure:e.error};h&&"resolved"!=h.state()&&h.abort(),a.extend(!0,i,g.apiSettings),a.api(i)},cache:{read:function(a){var b=j.data("cache");return g.cache&&"object"==typeof b&&b[a]!==d?b[a]:!1},write:function(a,b){var c=j.data("cache")!==d?j.data("cache"):{};c[a]=b,j.data("cache",c)}}},results:{generate:function(b){e.debug("Generating html from response",b);var c=g.templates[g.type],d="";return a.isPlainObject(b.results)&&!a.isEmptyObject(b.results)||a.isArray(b.results)&&b.results.length>0?(g.maxResults>0&&(b.results=a.makeArray(b.results).slice(0,g.maxResults)),b.results.length>0&&(a.isFunction(c)?d=c(b):e.error(s.noTemplate,!1))):d=e.message(s.noResults,"empty"),a.proxy(g.onSearchResults,j)(b),d},add:function(b){("default"==g.onResultsAdd||"default"==a.proxy(g.onResultsAdd,m)(b))&&m.html(b),e.results.show()},show:function(){0===m.filter(":visible").size()&&k.filter(":focus").size()>0&&""!==m.html()&&(m.stop().fadeIn(200),a.proxy(g.onResultsOpen,m)())},hide:function(){m.filter(":visible").size()>0&&(m.stop().fadeOut(200),a.proxy(g.onResultsClose,m)())},followLink:function(){},select:function(c){e.debug("Search result selected");var d=a(this),f=d.find(".title"),h=f.html();if("default"==g.onSelect||"default"==a.proxy(g.onSelect,this)(c)){var i=d.find("a[href]").eq(0),j=i.attr("href"),l=i.attr("target");try{e.results.hide(),k.val(h),"_blank"==l||c.ctrlKey?b.open(j):b.location.href=j}catch(m){}}}},setting:function(a,b){return b===d?g[a]:(g[a]=b,void 0)},debug:function(){var a=[],b=g.moduleName+": "+arguments[0],c=[].slice.call(arguments,1),d=console.info||console.log||function(){};d=Function.prototype.bind.call(d,console),g.debug&&(a.push(b),d.apply(console,a.concat(c)))},message:function(a,b){return b=b||"standard",e.results.add(g.templates.message(a,b)),g.templates.message(a,b)},error:function(a,b){b=b!==d?b:!0,console.warn(g.moduleName+": "+a),b&&a!==d&&e.message(a,"error")},invoke:function(b,c,f){var g,h;return f=f||[].slice.call(arguments,2),"string"==typeof b&&o!==d&&(b=b.split("."),g=b.length-1,a.each(b,function(b,c){return a.isPlainObject(o[c])&&b!=g?(o=o[c],!0):o[c]!==d?(h=o[c],!0):(e.error(s.method),!1)})),a.isFunction(h)?h.apply(c,f):h}},p?f=e.invoke(h,n,i):e.initialize()}),f!==d?f:this},a.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(a,b){var c="";return a!==d&&b!==d&&(c+='
"}),b.resultPage&&(c+=''+b.resultPage.text+""),c):!1}}}}(jQuery,window,document),function(a,b,c,d){a.fn.shape=function(b){var e,f=a(this),g=a.extend(!0,{},a.fn.shape.settings,b),h="."+g.namespace,i="module-"+g.namespace,j=f.selector||"",k=(new Date).getTime(),l=[],m=arguments[0],n="string"==typeof m,o=[].slice.call(arguments,1);return f.each(function(){var b,f,p,q=a(this),r=q.find(g.selector.sides),s=q.find(g.selector.side),t=this,u=q.data(i),v=(g.namespace,g.error),w=g.className;p={initialize:function(){p.verbose("Initializing module for",t),p.set.defaultSide(),u=p,q.data(i,u)},destroy:function(){p.verbose("Destroying previous module for",t),q.removeData(i).off(h)},refresh:function(){p.verbose("Refreshing selector cache for",t),q=a(t),r=a(this).find(g.selector.shape),s=a(this).find(g.selector.side)},repaint:function(){p.verbose("Forcing repaint event");var a=r.get(0)||c.createElement("div");a.offsetWidth},animate:function(c,d){p.verbose("Animating box with properties",c),d=d||function(b){p.verbose("Executing animation callback",b),b.stopPropagation(),p.reset(),p.set.active(),a.proxy(g.onChange,f)()},g.useCSS?(p.verbose("Starting CSS animation"),q.addClass(w.animating),p.set.stageSize(),p.repaint(),q.addClass(w.css),b.addClass(w.hidden),r.css(c).one(p.get.transitionEvent(),d)):(p.verbose("Starting javascript animation"),q.addClass(w.animating).removeClass(w.css),p.set.stageSize(),p.repaint(),b.animate({opacity:0},g.duration,g.easing),r.animate(c,g.duration,g.easing,d))},queue:function(a){p.debug("Queueing animation of",a),r.one(p.get.transitionEvent(),function(){p.debug("Executing queued animation"),setTimeout(function(){q.shape(a)},0)})},reset:function(){p.verbose("Animating states reset"),q.removeClass(w.css).removeClass(w.animating).removeAttr("style"),r.removeAttr("style"),s.removeAttr("style").removeClass(w.hidden),f.removeClass(w.animating).removeAttr("style")},is:{animating:function(){return q.hasClass(w.animating)}},get:{transitionEvent:function(){var a,b=c.createElement("element"),e={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in e)if(b.style[a]!==d)return e[a]},nextSide:function(){return b.next(g.selector.side).size()>0?b.next(g.selector.side):q.find(g.selector.side).first()}},set:{defaultSide:function(){b=q.find("."+g.className.active),f=b.next(g.selector.side).size()>0?b.next(g.selector.side):q.find(g.selector.side).first(),p.verbose("Active side set to",b),p.verbose("Next side set to",f)},stageSize:function(){var a={width:f.outerWidth(),height:f.outerHeight()};p.verbose("Resizing stage to fit new content",a),q.css({width:a.width,height:a.height})},nextSide:function(a){f=q.find(a),0===f.size()&&p.error(v.side),p.verbose("Next side manually set to",f)},active:function(){p.verbose("Setting new side to active",f),s.removeClass(w.active),f.addClass(w.active),p.set.defaultSide()}},flip:{up:function(){p.debug("Flipping up",f),p.is.animating()?p.queue("flip.up"):(p.stage.above(),p.animate(p.getTransform.up()))},down:function(){p.debug("Flipping down",f),p.is.animating()?p.queue("flip.down"):(p.stage.below(),p.animate(p.getTransform.down()))},left:function(){p.debug("Flipping left",f),p.is.animating()?p.queue("flip.left"):(p.stage.left(),p.animate(p.getTransform.left()))},right:function(){p.debug("Flipping right",f),p.is.animating()?p.queue("flip.right"):(p.stage.right(),p.animate(p.getTransform.right()))},over:function(){p.debug("Flipping over",f),p.is.animating()?p.queue("flip.over"):(p.stage.behind(),p.animate(p.getTransform.over()))},back:function(){p.debug("Flipping back",f),p.is.animating()?p.queue("flip.back"):(p.stage.behind(),p.animate(p.getTransform.back()))}},getTransform:{up:function(){var a={y:-((b.outerHeight()-f.outerHeight())/2),z:-(b.outerHeight()/2)};return{transform:"translateY("+a.y+"px) translateZ("+a.z+"px) rotateX(-90deg)"}},down:function(){var a={y:-((b.outerHeight()-f.outerHeight())/2),z:-(b.outerHeight()/2)};return{transform:"translateY("+a.y+"px) translateZ("+a.z+"px) rotateX(90deg)"}},left:function(){var a={x:-((b.outerWidth()-f.outerWidth())/2),z:-(b.outerWidth()/2)};return{transform:"translateX("+a.x+"px) translateZ("+a.z+"px) rotateY(90deg)"}},right:function(){var a={x:-((b.outerWidth()-f.outerWidth())/2),z:-(b.outerWidth()/2)};return{transform:"translateX("+a.x+"px) translateZ("+a.z+"px) rotateY(-90deg)"}},over:function(){var a={x:-((b.outerWidth()-f.outerWidth())/2)};return{transform:"translateX("+a.x+"px) rotateY(180deg)"}},back:function(){var a={x:-((b.outerWidth()-f.outerWidth())/2)};return{transform:"translateX("+a.x+"px) rotateY(-180deg)"}}},stage:{above:function(){var a={origin:(b.outerHeight()-f.outerHeight())/2,depth:{active:f.outerHeight()/2,next:b.outerHeight()/2}};p.verbose("Setting the initial animation position as above",f,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),f.addClass(w.animating).css({display:"block",top:a.origin+"px",transform:"rotateX(90deg) translateZ("+a.depth.next+"px)"})},below:function(){var a={origin:(b.outerHeight()-f.outerHeight())/2,depth:{active:f.outerHeight()/2,next:b.outerHeight()/2}};p.verbose("Setting the initial animation position as below",f,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),f.addClass(w.animating).css({display:"block",top:a.origin+"px",transform:"rotateX(-90deg) translateZ("+a.depth.next+"px)"})},left:function(){var a={origin:(b.outerWidth()-f.outerWidth())/2,depth:{active:f.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as left",f,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),f.addClass(w.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(-90deg) translateZ("+a.depth.next+"px)"})},right:function(){var a={origin:(b.outerWidth()-f.outerWidth())/2,depth:{active:f.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as left",f,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),f.addClass(w.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(90deg) translateZ("+a.depth.next+"px)"})},behind:function(){var a={origin:(b.outerWidth()-f.outerWidth())/2,depth:{active:f.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as behind",f,a),b.css({transform:"rotateY(0deg)"}),f.addClass(w.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(b,c){return c===d?g[b]:(a.isPlainObject(b)?(p.verbose("Modifying settings object",b,c),a.extend(!0,g,b)):(p.verbose("Modifying setting",b,c),g[b]=c),void 0)},setting:function(b,c){return c===d?g[b]:(a.isPlainObject(b)?a.extend(!0,g,b):g[b]=c,void 0)},internal:function(b,c){return c===d?p[b]:(a.isPlainObject(b)?a.extend(!0,p,b):p[b]=c,void 0)},debug:function(){g.debug&&(g.performance?p.performance.log(arguments):p.debug=Function.prototype.bind.call(console.info,console,g.moduleName+":"))},verbose:function(){g.verbose&&g.debug&&(g.performance?p.performance.log(arguments):p.verbose=Function.prototype.bind.call(console.info,console,g.moduleName+":"))},error:function(){p.error=Function.prototype.bind.call(console.error,console,g.moduleName+":")},performance:{log:function(a){var b,c,d;g.performance&&(b=(new Date).getTime(),d=k||b,c=b-d,k=b,l.push({Element:t,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,100)},display:function(){var b=g.moduleName+":",c=0;k=!1,a.each(l,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",j&&(b+=" '"+j+"'"),(console.group!==d||console.table!==d)&&l.length>0&&(console.groupCollapsed(b),console.table?console.table(l):a.each(l,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(b,c,e){var f,g,h=u;return c=c||o,e=t||e,"string"==typeof b&&h!==d&&(b=b.split("."),f=b.length-1,a.each(b,function(b,c){return a.isPlainObject(h[c])&&b!=f?(h=h[c],!0):h[c]!==d?(g=h[c],!0):(p.error(v.method),!1)})),a.isFunction(g)?(u.verbose("Executing invoked function",g),g.apply(e,c)):g||!1}},n?(u===d&&p.initialize(),e=p.invoke(m)):(u!==d&&p.destroy(),p.initialize())}),e?e:this},a.fn.shape.settings={moduleName:"Shape Module",debug:!1,verbose:!1,performance:!1,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(a,b,c,d){a.fn.starReview=function(b){var c=a.extend(!0,{},a.fn.starReview.settings,b),e=arguments||!1;return a(this).each(function(){var b,f=a(this),g=f.find(c.selector.star),h=c.className,i=c.namespace,j=f.data("module");return b={settings:c,initialize:function(){c.rateable&&(a.fn.state!==d&&(f.state(),g.state()),g.bind("mouseenter."+i,b.event.mouseenter).bind("mouseleave."+i,b.event.mouseleave).bind("click."+i,b.event.click)),f.addClass(h.initialize).data("module",b)},setRating:function(b){var d=g.eq(b-1);f.removeClass(h.hover),g.removeClass(h.hover),d.nextAll().removeClass(h.active),d.addClass(h.active).prevAll().addClass(h.active),a.proxy(c.onRate,f)()},event:{mouseenter:function(){var b=a(this);b.nextAll().removeClass(h.hover),f.addClass(h.hover),b.addClass(h.hover).prevAll().addClass(h.hover)},mouseleave:function(){g.removeClass(h.hover)},click:function(){var c=a(this);b.setRating(g.index(c)+1)}},error:function(a){console.warn(c.moduleName+": "+a)},invoke:function(e,f,g){var h;return g=g||Array.prototype.slice.call(arguments,2),"string"==typeof e&&j!==d&&(e=e.split("."),a.each(e,function(d,e){return a.isPlainObject(j[e])?(j=j[e],!0):a.isFunction(j[e])?(h=j[e],!0):(b.error(c.errors.method),!1)})),a.isFunction(h)?h.apply(f,g):!1}},j!==d&&e?("invoke"==e[0]&&(e=Array.prototype.slice.call(e,1)),b.invoke(e[0],this,Array.prototype.slice.call(e,1))):(b.initialize(),void 0)}),this},a.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(a,b,c,d){a.fn.tabNavigation=function(c){var e,f,g,h,i,j=a.extend(!0,{},a.fn.tabNavigation.settings,c),k=a(this),l=a(j.context).find(j.selector.tabs),m={},n=!0,o=0,p=this,q=(new Date).getTime(),r=[],s=k.selector||"",t="."+j.namespace,u=j.namespace+"-module",v=j.className,w=j.metadata,x=j.namespace,y=j.errors,z=k.data(u),A=arguments[0],B=z!==d&&"string"==typeof A,C=[].slice.call(arguments,1);return h={initialize:function(){if(h.debug("Initializing Tabs",k),j.history){if(a.address===d)return h.error(y.state),!1;if(j.path===!1)return h.error(y.path),!1;j.auto&&(j.apiSettings={url:j.path+"/{$tab}"}),h.verbose("Address library found adding state change event"),a.address.state(j.path).unbind("change").bind("change",h.event.history.change)}a.isWindow(p)||k.on("click."+t,h.event.click),k.data(u,h)},destroy:function(){h.debug("Destroying tabs",k),k.off("."+x)},event:{click:function(){h.debug("Navigation clicked");var b=a(this).data(w.tab);b!==d?b!==e&&(j.history?a.address.value(b):h.change(b)):h.debug("No tab specified")},history:{change:function(b){var c=b.pathNames.join("/")||h.get.initialPath(),e=j.templates.determineTitle(c)||!1;h.debug("History change event",c,b),g=b,c!==d&&h.change(c),e&&a.address.title(e)}}},refresh:function(){e&&(h.debug("Refreshing tab",e),h.change(e))},cache:{read:function(a){return a!==d?m[a]:!1},add:function(a,b){a=a||e,h.debug("Adding cached content for",a),m[a]=b},remove:function(a){a=a||e,h.debug("Removing cached content for",a),delete m[a]}},change:function(c){var d=b.history&&b.history.pushState,i=d&&j.ignoreFirstLoad&&n,k=a.isPlainObject(j.apiSettings),l=k&&!i?h.utils.pathToArray(c):h.get.defaultPathArray(c),c=h.utils.arrayToPath(l);h.deactivate.all(),a.each(l,function(b,d){var m,o,p,q=l.slice(0,b+1),r=h.utils.arrayToPath(q),s=h.is.tab(r),t=b+1==l.length,u=h.get.tabElement(r);return h.verbose("Looking for tab",d),s?(h.verbose("Tab was found",d),e=r,f=h.utils.filterArray(l,q),t?p=!0:(m=l.slice(0,b+2),o=h.utils.arrayToPath(m),p=!h.is.tab(o),p&&h.verbose("Tab parameters found",m)),p&&k?(i?(h.debug("Ignoring remote content on first tab load",r),n=!1,h.cache.add(c,u.html()),h.activate.all(r),a.proxy(j.onTabInit,u)(r,f,g),a.proxy(j.onTabLoad,u)(r,f,g)):(h.activate.navigation(r),h.content.fetch(r,c)),!1):(h.debug("Opened local tab",r),h.activate.all(r),a.proxy(j.onTabLoad,u)(r,f,g),void 0)):(h.error(y.missingTab,d),!1)})},content:{fetch:function(b,c){var i=h.get.tabElement(b),c=c||b,k=h.cache.read(c),l={dataType:"html",stateContext:i,success:function(d){h.cache.add(c,d),h.content.update(b,d),b==e?(h.debug("Content loaded",b),h.activate.tab(b)):h.debug("Content loaded in background",b),a.proxy(j.onTabInit,i)(b,f,g),a.proxy(j.onTabLoad,i)(b,f,g)},urlData:{tab:c}},m=i.data(w.promise)||!1,n=m&&"pending"===m.state();j.cache&&k?(h.debug("Showing existing content",c),h.content.update(b,k),h.activate.tab(b),a.proxy(j.onTabLoad,i)(b,f,g)):n?(h.debug("Content is already loading",c),i.addClass(v.loading)):a.api!==d?(h.debug("Retrieving remote content",c),a.api(a.extend(!0,{headers:{"X-Remote":!0}},j.apiSettings,l))):h.error(y.api)},update:function(a,b){h.debug("Updating html for",a);var c=h.get.tabElement(a);c.html(b)}},activate:{all:function(a){h.activate.tab(a),h.activate.navigation(a)},tab:function(a){var b=h.get.tabElement(a);h.verbose("Showing tab content for",b),b.addClass(v.active)},navigation:function(a){var b=h.get.navElement(a);h.verbose("Activating tab navigation for",b,a),b.addClass(v.active)}},deactivate:{all:function(){h.deactivate.navigation(),h.deactivate.tabs()},navigation:function(){k.removeClass(v.active)},tabs:function(){l.removeClass(v.active+" "+v.loading)}},is:{tab:function(a){return a!==d?h.get.tabElement(a).size()>0:!1}},get:{initialPath:function(){return k.eq(0).data(w.tab)||l.eq(0).data(w.tab)},path:function(){return a.address.value()},defaultPathArray:function(a){return h.utils.pathToArray(h.get.defaultPath(a))},defaultPath:function(a){var b=k.filter("[data-"+w.tab+'^="'+a+'/"]').eq(0),c=b.data(w.tab)||!1;if(c){if(h.debug("Found default tab",c),o0?b:c},tab:function(){return e}},utils:{filterArray:function(b,c){return a.grep(b,function(b){return-1==a.inArray(b,c)})},last:function(b){return a.isArray(b)?b[b.length-1]:!1},pathToArray:function(a){return a===d&&(a=e),"string"==typeof a?a.split("/"):[a]},arrayToPath:function(b){return a.isArray(b)?b.join("/"):!1}},setting:function(b,c){return c===d?j[b]:(a.isPlainObject(b)?a.extend(!0,j,b):j[b]=c,void 0)},internal:function(b,c){return c===d?h[b]:(a.isPlainObject(b)?a.extend(!0,h,b):h[b]=c,void 0)},debug:function(){j.debug&&(j.performance?h.performance.log(arguments):h.debug=Function.prototype.bind.call(console.info,console,j.moduleName+":"))},verbose:function(){j.verbose&&j.debug&&(j.performance?h.performance.log(arguments):h.verbose=Function.prototype.bind.call(console.info,console,j.moduleName+":"))},error:function(){h.error=Function.prototype.bind.call(console.error,console,j.moduleName+":")},performance:{log:function(a){var b,c,d;j.performance&&(b=(new Date).getTime(),d=q||b,c=b-d,q=b,r.push({Element:p,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,100)},display:function(){var b=j.moduleName+":",c=0;q=!1,a.each(r,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",s&&(b+=" '"+s+"'"),(console.group!==d||console.table!==d)&&r.length>0&&(console.groupCollapsed(b),console.table?console.table(r):a.each(r,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(b,c,e){var f,g;return c=c||C,e=p||e,"string"==typeof b&&z!==d&&(b=b.split("."),f=b.length-1,a.each(b,function(b,c){a.isPlainObject(z[c])&&b!=f?z=z[c]:z[c]!==d?g=z[c]:h.error(y.method)})),a.isFunction(g)?(h.verbose("Executing invoked function",g),g.apply(e,c)):g||!1}},B?(z===d&&h.initialize(),i=h.invoke(A)):(z!==d&&h.destroy(),h.initialize()),i!==d?i:this},a.tabNavigation=function(c){a(b).tabNavigation(c)},a.fn.tabNavigation.settings={moduleName:"Tab Module",verbose:!0,debug:!0,performance:!0,namespace:"tab",onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},auto:!1,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:"Tab cannot be found",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".tab"}}
}(jQuery,window,document),function(a,b,c,d){a.fn.video=function(b){var c,e=a.extend(!0,{},a.fn.video.settings,b),f=arguments||!1;return a(this).each(function(){var g,h=a(this),i=h.find(e.selector.placeholder),j=h.find(e.selector.playButton),k=h.find(e.selector.embed),l=h.data("module-"+e.namespace),m="string"==typeof b,n=e.namespace,o=e.metadata,p=e.className;g={initialize:function(){g.debug("Initializing video"),i.off(".video").on("click."+n,g.play),j.off(".video").on("click."+n,g.play),h.data("module-"+n,g)},change:function(a,b){g.debug("Changing video to ",b),h.data(o.source,a).data(o.flv,b),e.onChange()},reset:function(){g.debug("Clearing video embed and showing placeholder"),h.removeClass(p.active),k.html(" "),i.show(),e.onReset()},play:function(){g.debug("Playing video");var a=h.data(o.source),b=h.data(o.flv);k.html(g.generate.html(a,b)),h.addClass(p.active),e.onPlay()},generate:{html:function(a,b){g.debug("Generating embed html");var c,d="auto"==e.width?h.width():e.width,f="auto"==e.height?h.height():e.height;return"vimeo"==a?c='':"youtube"==a&&(c=''),c},url:function(a){var b=e.api?1:0,c=e.autoplay?1:0,d=e.hd?1:0,f=e.showUI?1:0,g=e.showUI?0:1,h="";return"vimeo"==a?(h="api="+b+"&title="+f+"&byline="+f+"&portrait="+f+"&autoplay="+c,e.color&&(h+="&color="+e.color)):"youtube"==a&&(h="enablejsapi="+b+"&autoplay="+c+"&autohide="+g+"&hq="+d+"&modestbranding=1",e.color&&(h+="&color="+e.color)),h}},debug:function(a,b){e.debug&&(b!==d?console.info(e.moduleName+": "+a,b):console.info(e.moduleName+": "+a))},error:function(a){console.warn(e.moduleName+": "+a)},invoke:function(b,c,f){var h;return f=f||Array.prototype.slice.call(arguments,2),"string"==typeof b&&l!==d&&(b=b.split("."),a.each(b,function(b,c){return a.isPlainObject(l[c])?(l=l[c],!0):a.isFunction(l[c])?(h=l[c],!0):(g.error(e.errors.method),!1)})),a.isFunction(h)?h.apply(c,f):h}},m?c=g.invoke(f[0],this,Array.prototype.slice.call(f,1)):(l&&g.destroy(),g.initialize())}),c!==d?c:this},a.fn.videoPlaylist=function(b,c){var d=a(this),e=a(b),f=e.find(".embed iframe"),g=a.extend({},a.fn.videoPlaylist.settings,c,!0);d.each(function(){var b=a(this),c=g.metadata,f=g.namespace,h=g.className,i={initialize:function(){b.on("click."+f,i.changeVideo)},changeVideo:function(){var f=b.data(c.flv)||!1,i=b.data(c.source)||!1,j=b.data(c.placeholder)||!1;if(f&&i){if(e.data(c.source,i).data(c.flv,f),g.showPlaceholder)e.removeClass(h.active).find(a.fn.video.selector.placeholder).attr("src",j);else try{e.video("play")}catch(k){console.warn("Video Playlist Module: "+g.error.init)}d.removeClass(h.active),b.addClass(h.active)}}};i.initialize()}),g.playFirst&&(d.eq(0).trigger("click"),f.size()>0&&f.attr("src",f.attr("src").replace("autoplay=1","autoplay=0")))},a.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"}},a.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);