/** # Semantic UI * Version: 0.16.1 * http://github.com/jlukic/semantic-ui * * * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * * Release Date: 09/11/2014 */ !function(a,b,c,d){a.api=a.fn.api=function(c){var e,f=a(a.isFunction(this)?b:this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return f.each(function(){var b,f,m,n,o,p=a.extend(!0,{},a.fn.api.settings,c),q=p.namespace,r=(p.metadata,p.selector),s=p.error,t=p.className,u="."+q,v="module-"+q,w=a(this),x=w.closest(r.form),y=p.stateContext?a(p.stateContext):w,z=this,A=w.data(v);o={initialize:function(){var a=o.get.event();k||(a?(o.debug("Attaching API events to element",a),w.on(a+u,o.event.trigger)):o.query()),o.instantiate()},instantiate:function(){o.verbose("Storing instance of module",o),A=o,w.data(v,A)},destroy:function(){o.verbose("Destroying previous module for",z),w.removeData(v).off(u)},query:function(){if(o.is.disabled())return void o.debug("Element is disabled API request aborted");if(o.is.loading()&&!p.allowMultiple)return void o.debug("Request cancelled previous request is still pending");if(p.defaultData&&a.extend(!0,p.urlData,o.get.defaultData()),(p.serializeForm!==!1||w.is("form"))&&("json"==p.serializeForm?a.extend(!0,p.data,o.get.formData()):p.data=o.get.formData()),f=o.get.settings(),f===!1)return void o.error(s.beforeSend);if(p.url?(o.debug("Using specified url",m),m=o.add.urlData(p.url)):(m=o.add.urlData(o.get.templateURL()),o.debug("API url resolved to",m)),!m){if(!w.is("form"))return void o.error(s.missingURL);o.debug("No url or action specified, defaulting to form action"),m=w.attr("action")}o.set.loading(),b=a.extend(!0,{},p,{type:p.method||p.type,data:n,url:m,beforeSend:p.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),o.verbose("Creating AJAX request with settings",b),o.request=o.create.request(),o.xhr=o.create.xhr()},is:{disabled:function(){return w.filter(p.filter).size()>0},loading:function(){return o.request&&"pending"==o.request.state()}},was:{succesful:function(){return o.request&&"resolved"==o.request.state()},failure:function(){return o.request&&"rejected"==o.request.state()},complete:function(){return o.request&&("resolved"==o.request.state()||"rejected"==o.request.state())}},add:{urlData:function(b,c){var e,f;return b&&(e=b.match(p.regExp.required),f=b.match(p.regExp.optional),c=c||p.urlData,e&&(o.debug("Looking for required URL variables",e),a.each(e,function(e,f){var g=-1!==f.indexOf("$")?f.substr(2,f.length-3):f.substr(1,f.length-2),h=a.isPlainObject(c)&&c[g]!==d?c[g]:w.data(g)!==d?w.data(g):y.data(g)!==d?y.data(g):c[g];return h===d?(o.error(s.requiredParameter,g,b),b=!1,!1):(o.verbose("Found required variable",g,h),void(b=b.replace(f,h)))})),f&&(o.debug("Looking for optional URL variables",e),a.each(f,function(e,f){var g=-1!==f.indexOf("$")?f.substr(3,f.length-4):f.substr(2,f.length-3),h=a.isPlainObject(c)&&c[g]!==d?c[g]:w.data(g)!==d?w.data(g):y.data(g)!==d?y.data(g):c[g];h!==d?(o.verbose("Optional variable Found",g,h),b=b.replace(f,h)):(o.verbose("Optional variable not found",g),b=-1!==b.indexOf("/"+f)?b.replace("/"+f,""):b.replace(f,""))}))),b}},event:{trigger:function(a){o.query(),("submit"==a.type||"click"==a.type)&&a.preventDefault()},xhr:{always:function(){},done:function(a){var b=this,c=(new Date).getTime()-h,d=p.loadingDuration-c;d=d>0?d:0,setTimeout(function(){o.request.resolveWith(b,[a])},d)},fail:function(a,b,c){var d=this,e=(new Date).getTime()-h,f=p.loadingDuration-e;f=f>0?f:0,setTimeout(function(){"abort"!==b?o.request.rejectWith(d,[a,b,c]):o.reset()},f)}},request:{complete:function(b){o.remove.loading(),a.proxy(p.onComplete,y)(b,w)},done:function(b){o.debug("API request received",b),"json"==p.dataType&&a.isFunction(p.successTest)?(o.debug("Checking JSON",p.successTest,b),p.onSuccess(b)?a.proxy(p.onSuccess,y)(b,w):(o.debug("JSON test specified by user and response failed",b),a.proxy(p.onFailure,y)(b,w))):a.proxy(p.onSuccess,y)(b,w)},error:function(b,c,e){var f,g=p.error[c]!==d?p.error[c]:e;if(b!==d)if(b.readyState!==d&&4==b.readyState){if(200!=b.status&&e!==d&&""!==e)o.error(s.statusMessage+e);else if("error"==c&&"json"==p.dataType)try{f=a.parseJSON(b.responseText),f&&f.error!==d&&(g=f.error)}catch(h){o.error(s.JSONParse)}o.remove.loading(),o.set.error(),p.errorDuration&&setTimeout(o.remove.error,p.errorDuration),o.debug("API Request error:",g),a.proxy(p.onFailure,y)(g,w)}else a.proxy(p.onAbort,y)(g,w),o.debug("Request Aborted (Most likely caused by page change or CORS Policy)",c,e)}}},create:{request:function(){return a.Deferred().always(o.event.request.complete).done(o.event.request.done).fail(o.event.request.error)},xhr:function(){a.ajax(b).always(o.event.xhr.always).done(o.event.xhr.done).fail(o.event.xhr.fail)}},set:{error:function(){o.verbose("Adding error state to element",y),y.addClass(t.error)},loading:function(){o.verbose("Adding loading state to element",y),y.addClass(t.loading)}},remove:{error:function(){o.verbose("Removing error state from element",y),y.removeClass(t.error)},loading:function(){o.verbose("Removing loading state from element",y),y.removeClass(t.loading)}},get:{request:function(){return o.request||!1},xhr:function(){return o.xhr||!1},settings:function(){var b;return b=a.proxy(p.beforeSend,w)(p),b.success!==d&&(o.debug("Legacy success callback detected",b),o.error(s.legacyParameters),b.onSuccess=b.success),b.failure!==d&&(o.debug("Legacy failure callback detected",b),o.error(s.legacyParameters),b.onFailure=b.failure),b.complete!==d&&(o.debug("Legacy complete callback detected",b),o.error(s.legacyParameters),b.onComplete=b.complete),b},defaultData:function(){var b={};return a.isWindow(z)||(w.is("input")?b.value=w.val():w.is("form")||(b.text=w.text())),b},event:function(){return a.isWindow(z)||"now"==p.on?(o.debug("API called without element, no events attached"),!1):"auto"==p.on?w.is("input")?z.oninput!==d?"input":z.onpropertychange!==d?"propertychange":"keyup":w.is("form")?"submit":"click":p.on},formData:function(){var b;if("json"==p.serializeForm){if(a(this).toJSON===d)return void o.error(s.missingSerialize);b=x.toJSON()}else b=x.serialize();return o.debug("Retrieving form data",b),b},templateURL:function(a){var b;return a=a||w.data(p.metadata.action)||p.action||!1,a&&(o.debug("Looking up url for action",a),p.api[a]!==d?(b=p.api[a],o.debug("Found template url",b)):o.error(s.missingAction,p.action)),b}},reset:function(){o.remove.error(),o.remove.loading()},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,p,b);else{if(c===d)return p[b];p[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,o,b);else{if(c===d)return o[b];o[b]=c}},debug:function(){p.debug&&(p.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,p.name+":"),o.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,p.name+":"),o.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;p.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Element:z,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var b=p.name+":",c=0;h=(new Date).getTime(),clearTimeout(o.performance.timer),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(b,c,f){var g,h,i;return c=c||l,f=z||f,"string"==typeof b&&A!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(A[e])&&c!=g)A=A[e];else{if(!a.isPlainObject(A[f])||c==g)return A[e]!==d?(h=A[e],!1):A[f]!==d?(h=A[f],!1):(o.error(s.method,b),!1);A=A[f]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(A===d&&o.initialize(),o.invoke(j)):(A!==d&&o.destroy(),o.initialize())}),e!==d?e:this},a.api.settings={name:"API",namespace:"api",debug:!0,verbose:!0,performance:!0,on:"auto",filter:".disabled, .loading",context:!1,stateContext:!1,action:!1,regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},url:!1,urlData:!1,serializeForm:!1,defaultData:!0,throttle:100,allowMultiple:!1,loadingDuration:0,errorDuration:2e3,method:"get",data:{},dataType:"json",cache:!0,beforeSend:function(a){return a},beforeXHR:function(){},onSuccess:function(){},onComplete:function(){},onFailure:function(){},onAbort:function(){},successText:function(){return!0},error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",missingAction:"API action used but no url was defined",missingSerialize:"Serializing a Form requires toJSON to be included",missingURL:"No URL specified for api event",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},className:{loading:"loading",error:"error"},selector:{form:"form"},metadata:{action:"action",request:"request",xhr:"xhr"}},a.api.settings.api={}}(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.error,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,void m.redraw())}},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),void h.blendOnto(f,"multiply")):void m.error(u.missingPlugin)}},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.name+": "+a,b):console.info(c.name+": "+a))},error:function(a){console.warn(c.name+": "+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.error.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))):void m.initialize()}),this},a.fn.colorize.settings={name:"Image Colorizer",debug:!0,namespace:"colorize",onDraw:function(){},async:!0,colors:{},metadata:{image:"image",name:"name"},error:{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,e){var f,g=a(this),h=a.extend(!0,{},a.fn.form.settings,e),i=a.extend({},a.fn.form.settings.defaults,b),j=h.namespace,k=h.metadata,l=h.selector,m=h.className,n=(h.error,"."+j),o="module-"+j,p=g.selector||"",q=(new Date).getTime(),r=[],s=arguments[0],t="string"==typeof s,u=[].slice.call(arguments,1);return g.each(function(){var b,e=a(this),j=a(this).find(l.field),v=a(this).find(l.group),w=a(this).find(l.message),x=(a(this).find(l.prompt),a(this).find(l.submit)),y=[],z=this,A=e.data(o);b={initialize:function(){b.verbose("Initializing form validation",e,i,h),b.bindEvents(),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),A=b,e.data(o,b)},destroy:function(){b.verbose("Destroying previous module",A),b.removeEvents(),e.removeData(o)},refresh:function(){b.verbose("Refreshing selector cache"),j=e.find(l.field)},submit:function(){b.verbose("Submitting form",e),e.submit()},attachEvents:function(c,d){d=d||"submit",a(c).on("click",function(a){b[d](),a.preventDefault()})},bindEvents:function(){h.keyboardShortcuts&&j.on("keydown"+n,b.event.field.keydown),e.on("submit"+n,b.validate.form),j.on("blur"+n,b.event.field.blur),b.attachEvents(x,"submit"),j.each(function(){var c=a(this).prop("type"),d=b.get.changeEvent(c);a(this).on(d+n,b.event.field.change)})},removeEvents:function(){e.off(n),j.off(n),x.off(n),j.off(n)},event:{field:{keydown:function(c){var d=a(this),e=c.which,f={enter:13,escape:27};e==f.escape&&(b.verbose("Escape key pressed blurring field"),d.blur()),!c.ctrlKey&&e==f.enter&&d.is(l.input)&&d.not(l.checkbox).size()>0&&(b.debug("Enter key pressed, submitting form"),x.addClass(m.down),d.one("keyup"+n,b.event.field.keyup))},keyup:function(){b.verbose("Doing keyboard shortcut form submit"),x.removeClass(m.down),b.submit()},blur:function(){var c=a(this),d=c.closest(v);d.hasClass(m.error)?(b.debug("Revalidating field",c,b.get.validation(c)),b.validate.field(b.get.validation(c))):("blur"==h.on||"change"==h.on)&&b.validate.field(b.get.validation(c))},change:function(){var c=a(this),d=c.closest(v);("change"==h.on||d.hasClass(m.error)&&h.revalidate)&&(clearTimeout(b.timer),b.timer=setTimeout(function(){b.debug("Revalidating field",c,b.get.validation(c)),b.validate.field(b.get.validation(c))},h.delay))}}},get:{changeEvent:function(a){return"checkbox"==a||"radio"==a?"change":c.createElement("input").oninput!==d?"input":c.createElement("input").onpropertychange!==d?"propertychange":"keyup"},field:function(c){return b.verbose("Finding field with identifier",c),j.filter("#"+c).size()>0?j.filter("#"+c):j.filter('[name="'+c+'"]').size()>0?j.filter('[name="'+c+'"]'):j.filter("[data-"+k.validate+'="'+c+'"]').size()>0?j.filter("[data-"+k.validate+'="'+c+'"]'):a("")},validation:function(c){var d;return a.each(i,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),j.filter("#"+a).size()>0?!0:j.filter('[name="'+a+'"]').size()>0?!0:j.filter("[data-"+k.validate+'="'+a+'"]').size()>0?!0:!1}},add:{prompt:function(c,f){var g=b.get.field(c),i=g.closest(v),j=i.find(l.prompt),k=0!==j.size();f="string"==typeof f?[f]:f,b.verbose("Adding field error state",c),i.addClass(m.error),h.inline&&(k||(j=h.templates.prompt(f),j.appendTo(i)),j.html(f[0]),k?b.verbose("Inline errors are disabled, no inline error added",c):h.transition&&a.fn.transition!==d&&e.transition("is supported")?(b.verbose("Displaying error with css transition",h.transition),j.transition(h.transition+" in",h.duration)):(b.verbose("Displaying error with fallback javascript animation"),j.fadeIn(h.duration)))},errors:function(a){b.debug("Adding form error messages",a),w.html(h.templates.error(a))}},remove:{prompt:function(c){var f=b.get.field(c.identifier),g=f.closest(v),i=g.find(l.prompt);g.removeClass(m.error),h.inline&&i.is(":visible")&&(b.verbose("Removing prompt for field",c),h.transition&&a.fn.transition!==d&&e.transition("is supported")?i.transition(h.transition+" out",h.duration,function(){i.remove()}):i.fadeOut(h.duration,function(){i.remove()}))}},set:{success:function(){e.removeClass(m.error).addClass(m.success)},error:function(){e.removeClass(m.success).addClass(m.error)}},validate:{form:function(c){var f=!0;return y=[],a.each(i,function(a,c){b.validate.field(c)||(f=!1)}),f?(b.debug("Form has no validation errors, submitting"),b.set.success(),a.proxy(h.onSuccess,this)(c)):(b.debug("Form has errors"),b.set.error(),h.inline||b.add.errors(y),e.data("moduleApi")!==d&&c.stopImmediatePropagation(),a.proxy(h.onFailure,this)(y))},field:function(c){var e=b.get.field(c.identifier),f=!0,g=[];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),g.push(d.prompt),f=!1)}),f?(b.remove.prompt(c,g),a.proxy(h.onValid,e)(),!0):(y=y.concat(g),b.add.prompt(c.identifier,g),a.proxy(h.onInvalid,e)(g),!1)},rule:function(c,f){var g,i,j=b.get.field(c.identifier),k=f.type,l=a.trim(j.val()+""),m=/\[(.*)\]/i,n=m.exec(k),o=!0;return n!==d&&null!==n?(g=""+n[1],i=k.replace(n[0],""),o=a.proxy(h.rules[i],e)(l,g)):o=a.proxy(h.rules[k],j)(l),o}},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,h,b);else{if(c===d)return h[b];h[b]=c}},internal:function(c,e){if(a.isPlainObject(c))a.extend(!0,b,c);else{if(e===d)return b[c];b[c]=e}},debug:function(){h.debug&&(h.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,h.name+":"),b.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),b.verbose.apply(console,arguments)))},error:function(){b.error=Function.prototype.bind.call(console.error,console,h.name+":"),b.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;h.performance&&(c=(new Date).getTime(),e=q||c,d=c-e,q=c,r.push({Element:z,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var c=h.name+":",e=0;q=!1,clearTimeout(b.performance.timer),a.each(r,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",p&&(c+=" '"+p+"'"),g.size()>1&&(c+=" ("+g.size()+")"),(console.group!==d||console.table!==d)&&r.length>0&&(console.groupCollapsed(c),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 g,h,i,j=A;return c=c||u,e=z||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},t?(A===d&&b.initialize(),b.invoke(s)):(A!==d&&b.destroy(),b.initialize())}),f!==d?f:this},a.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!0,performance:!0,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:150,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",checkbox:'input[type="checkbox"], input[type="radio"]',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:{checked:function(){return a(this).filter(":checked").size()>0},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])?","i");return b.test(a)},length:function(a,b){return a!==d?a.length>=b:!1},not:function(a,b){return a!=b},contains:function(a,b){return b=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),-1!==a.search(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 e,f=a(this),g=a.extend(!0,{},a.fn.state.settings,b),h=f.selector||"",i=("ontouchstart"in c.documentElement,(new Date).getTime()),j=[],k=arguments[0],l="string"==typeof k,m=[].slice.call(arguments,1),n=(g.error,g.metadata),o=g.className,p=g.namespace,q=g.states,r=g.text,s="."+p,t=p+"-module";return f.each(function(){var c,p=a(this),u=this,v=p.data(t);c={initialize:function(){c.verbose("Initializing module"),g.automatic&&c.add.defaults(),g.context&&""!==h?a(g.context).on(h,"mouseenter"+s,c.change.text).on(h,"mouseleave"+s,c.reset.text).on(h,"click"+s,c.toggle.state):p.on("mouseenter"+s,c.change.text).on("mouseleave"+s,c.reset.text).on("click"+s,c.toggle.state),c.instantiate()},instantiate:function(){c.verbose("Storing instance of module",c),v=c,p.data(t,c)},destroy:function(){c.verbose("Destroying previous module",v),p.off(s).removeData(t)},refresh:function(){c.verbose("Refreshing selector cache"),p=a(u)},add:{defaults:function(){var e=b&&a.isPlainObject(b.states)?b.states:{};a.each(g.defaults,function(b,f){c.is[b]!==d&&c.is[b]()&&(c.verbose("Adding default states",b,u),a.extend(g.states,f,e))})}},is:{active:function(){return p.hasClass(o.active)},loading:function(){return p.hasClass(o.loading)},inactive:function(){return!p.hasClass(o.active)},enabled:function(){return!p.is(g.filter.active)},disabled:function(){return p.is(g.filter.active)},textEnabled:function(){return!p.is(g.filter.text)},button:function(){return p.is(".button:not(a, .submit)")},input:function(){return p.is("input")}},allow:function(a){c.debug("Now allowing state",a),q[a]=!0},disallow:function(a){c.debug("No longer allowing",a),q[a]=!1},allows:function(a){return q[a]||!1},enable:function(){p.removeClass(o.disabled)},disable:function(){p.addClass(o.disabled)},setState:function(a){c.allows(a)&&p.addClass(o[a])},removeState:function(a){c.allows(a)&&p.removeClass(o[a])},toggle:{state:function(){var b;if(c.allows("active")&&c.is.enabled()){if(c.refresh(),a.fn.api!==d&&(b=p.api("get request")))return void c.listenTo(b);c.change.state()}}},listenTo:function(b){c.debug("API request detected, waiting for state signal",b),b?(r.loading&&c.update.text(r.loading),a.when(b).then(function(){"resolved"==b.state()?(c.debug("API request succeeded"),g.activateTest=function(){return!0},g.deactivateTest=function(){return!0}):(c.debug("API request failed"),g.activateTest=function(){return!1},g.deactivateTest=function(){return!1}),c.change.state()})):(g.activateTest=function(){return!1},g.deactivateTest=function(){return!1})},change:{state:function(){c.debug("Determining state change direction"),c.is.inactive()?c.activate():c.deactivate(),g.sync&&c.sync(),a.proxy(g.onChange,u)()},text:function(){c.is.textEnabled()&&(c.is.disabled()?(c.verbose("Changing text to disabled text",r.hover),c.update.text(r.disabled)):c.is.active()?r.hover?(c.verbose("Changing text to hover text",r.hover),c.update.text(r.hover)):r.disable&&(c.verbose("Changing text to disable text",r.disable),c.update.text(r.disable)):r.hover?(c.verbose("Changing text to hover text",r.disable),c.update.text(r.hover)):r.enable&&(c.verbose("Changing text to enable text",r.enable),c.update.text(r.enable)))}},activate:function(){a.proxy(g.activateTest,u)()&&(c.debug("Setting state to active"),p.addClass(o.active),c.update.text(r.active)),a.proxy(g.onActivate,u)()},deactivate:function(){a.proxy(g.deactivateTest,u)()&&(c.debug("Setting state to inactive"),p.removeClass(o.active),c.update.text(r.inactive)),a.proxy(g.onDeactivate,u)()},sync:function(){c.verbose("Syncing other buttons to current state"),f.not(p).state(c.is.active()?"activate":"deactivate")},get:{text:function(){return g.selector.text?p.find(g.selector.text).text():p.html()},textFor:function(a){return r[a]||!1}},flash:{text:function(b,d,e){var f=c.get.text();c.debug("Flashing text message",b,d),b=b||g.text.flash,d=d||g.flashDuration,e=e||function(){},c.update.text(b),setTimeout(function(){c.update.text(f),a.proxy(e,u)()},d)}},reset:{text:function(){var a=r.active||p.data(n.storedText),b=r.inactive||p.data(n.storedText);c.is.textEnabled()&&(c.is.active()&&a?(c.verbose("Resetting active text",a),c.update.text(a)):b&&(c.verbose("Resetting inactive text",a),c.update.text(b)))}},update:{text:function(a){var b=c.get.text();a&&a!==b?(c.debug("Updating text",a),g.selector.text?p.data(n.storedText,a).find(g.selector.text).text(a):p.data(n.storedText,a).html(a)):c.debug("Text is already sane, ignoring update",a)}},setting:function(b,e){return c.debug("Changing setting",b,e),e===d?g[b]:void(a.isPlainObject(b)?a.extend(!0,g,b):g[b]=e)},internal:function(b,e){return c.debug("Changing internal",b,e),e===d?c[b]:void(a.isPlainObject(b)?a.extend(!0,c,b):c[b]=e)},debug:function(){g.debug&&(g.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,g.name+":"),c.debug.apply(console,arguments)))},verbose:function(){g.verbose&&g.debug&&(g.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),c.verbose.apply(console,arguments)))},error:function(){c.error=Function.prototype.bind.call(console.error,console,g.name+":"),c.error.apply(console,arguments)},performance:{log:function(a){var b,d,e;g.performance&&(b=(new Date).getTime(),e=i||b,d=b-e,i=b,j.push({Element:u,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,100)},display:function(){var b=g.name+":",e=0;i=!1,clearTimeout(c.performance.timer),a.each(j,function(a,b){e+=b["Execution Time"]}),b+=" "+e+"ms",h&&(b+=" '"+h+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(console.group!==d||console.table!==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"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(b,c,f){var g,h,i,j=v;return c=c||m,f=u||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},l?(v===d&&c.initialize(),c.invoke(k)):(v!==d&&c.destroy(),c.initialize())}),e!==d?e:this},a.fn.state.settings={name:"State",debug:!1,verbose:!0,namespace:"state",performance:!0,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,error:{method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",loading:"loading"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0}},states:{disabled:!0,loading:!0,active:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,enable:!1,disable:!1}}}(jQuery,window,document),function(a,b,c,d){a.fn.visibility=function(e){var f,g=a(this),h=g.selector||"",i=(new Date).getTime(),j=[],k=arguments[0],l="string"==typeof k,m=[].slice.call(arguments,1);return g.each(function(){var g,n=a.extend(!0,{},a.fn.visibility.settings,e),o=(n.className,n.namespace),p=(n.error,"."+o),q="module-"+o,r=a(b),s=a(this),t=a(n.context),u=(s.offsetParent(),s.selector||"",s.data(q)),v=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)},w=this;g={initialize:function(){g.verbose("Initializing visibility",n),g.reset(),g.save.position(),g.bindEvents(),g.instantiate(),"image"==n.type&&g.setup.image(),v(g.checkVisibility)},instantiate:function(){g.verbose("Storing instance of module",g),u=g,s.data(q,g)},destroy:function(){g.verbose("Destroying previous module"),r.off(p),t.off(p),s.off(p).removeData(q)},bindEvents:function(){g.verbose("Binding visibility events to scroll and resize"),r.on("resize"+p,g.event.refresh),t.on("scroll"+p,g.event.scroll)},event:{refresh:function(){v(g.refresh)},scroll:function(){g.verbose("Scroll position changed"),n.throttle?(clearTimeout(g.timer),g.timer=setTimeout(g.checkVisibility,200)):v(g.checkVisibility)}},precache:function(b,d){b instanceof Array||(b=[b]);for(var e=b.length,f=0,g=[],h=c.createElement("img"),i=function(){f++,f>=b.length&&a.isFunction(d)&&d()};e--;)h=c.createElement("img"),h.onload=i,h.onerror=i,h.src=b[e],g.push(h)},setup:{image:function(){var a=s.data("src");a&&(g.verbose("Lazy loading image",a),g.topVisible(function(){g.precache(a,function(){g.set.image(a),n.onTopVisible=!1})}))}},set:{image:function(b){var c=g.cache.screen.bottom+n.offsete.pixelsPassed;e.passing&&a.each(n.onPassed,function(a,b){e.bottomVisible||e.pixelsPassed>g.get.pixelsPassed(a)?g.execute(b,a):n.once||g.remove.occurred(b)})}},passing:function(a){var b=g.get.elementCalculations(),c=a||n.onPassing,e="passing";return a&&(g.debug("Adding callback for passing",a),n.onPassing=a),c&&b.passing?g.execute(c,e):n.once||g.remove.occurred(e),a!==d?b.passing:void 0},topVisible:function(a){var b=g.get.elementCalculations(),c=a||n.onTopVisible,e="topVisible";return a&&(g.debug("Adding callback for top visible",a),n.onTopVisible=a),c&&b.topVisible?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.topVisible:void 0},bottomVisible:function(a){var b=g.get.elementCalculations(),c=a||n.onBottomVisible,e="bottomVisible"; return a&&(g.debug("Adding callback for bottom visible",a),n.onBottomVisible=a),c&&b.bottomVisible?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.bottomVisible:void 0},topPassed:function(a){var b=g.get.elementCalculations(),c=a||n.onTopPassed,e="topPassed";return a&&(g.debug("Adding callback for top passed",a),n.onTopPassed=a),c&&b.topPassed?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.topPassed:void 0},bottomPassed:function(a){var b=g.get.elementCalculations(),c=a||n.onBottomPassed,e="bottomPassed";return a&&(g.debug("Adding callback for bottom passed",a),n.onBottomPassed=a),c&&b.bottomPassed?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.bottomPassed:void 0},execute:function(b,c){var d=g.get.elementCalculations(),e=g.get.screenCalculations();n.continuous?(g.debug("Callback called continuously on valid",c,d),a.proxy(b,w)(d,e)):g.get.occurred(c)||(g.debug("Callback conditions met",c,d),a.proxy(b,w)(d,e)),g.save.occurred(c)},remove:{occurred:function(a){a?g.cache.occurred[a]=!1:g.cache.occurred={}}},save:{occurred:function(a){a&&(g.cache.occurred[a]=!0)},scroll:function(){g.cache.scroll=t.scrollTop()+n.offset},direction:function(){var a,b=g.get.scroll(),c=g.get.lastScroll();return a=b>c&&c?"down":c>b&&c?"up":"static",g.cache.direction=a,g.cache.direction},elementPosition:function(){var b=g.get.screenSize();return g.verbose("Saving element position"),a.extend(g.cache.element,{margin:{top:parseInt(s.css("margin-top"),10),bottom:parseInt(s.css("margin-bottom"),10)},fits:w.heightc.top,topPassed:b.top>c.top,bottomVisible:b.bottom>c.bottom,bottomPassed:b.top>c.bottom,pixelsPassed:0,percentagePassed:0}),a.extend(g.cache.element,{visible:g.cache.element.topVisible||g.cache.element.bottomVisible,passing:g.cache.element.topPassed&&!g.cache.element.bottomPassed,hidden:!g.cache.element.topVisible&&!g.cache.element.bottomVisible}),g.cache.element.passing&&(g.cache.element.pixelsPassed=b.top-c.top,g.cache.element.percentagePassed=(b.top-c.top)/c.height),g.verbose("Updated element calculations",g.cache.element)},screenCalculations:function(){var b=t.scrollTop();return g.cache.scroll===d&&(g.cache.scroll=t.scrollTop()),g.save.direction(),a.extend(g.cache.screen,{top:b-n.offset,bottom:b-n.offset+g.cache.screen.height}),g.cache.screen},screenSize:function(){g.verbose("Saving window position"),g.cache.screen={height:t.height()}},position:function(){g.save.screenSize(),g.save.elementPosition()}},get:{pixelsPassed:function(a){var b=g.get.elementCalculations();return a.search("%")>-1?b.height*(parseInt(a,10)/100):parseInt(a,10)},occurred:function(a){return g.cache.occurred!==d?g.cache.occurred[a]||!1:!1},direction:function(){return g.cache.direction===d&&g.save.direction(),g.cache.direction},elementPosition:function(){return g.cache.element===d&&g.save.elementPosition(),g.cache.element},elementCalculations:function(){return g.cache.element===d&&g.save.elementCalculations(),g.cache.element},screenCalculations:function(){return g.cache.screen===d&&g.save.screenCalculations(),g.cache.screen},screenSize:function(){return g.cache.screen===d&&g.save.screenSize(),g.cache.screen},scroll:function(){return g.cache.scroll===d&&g.save.scroll(),g.cache.scroll},lastScroll:function(){return g.cache.screen===d?(g.debug("First scroll event, no last scroll could be found"),!1):g.cache.screen.top}},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,g,b);else{if(c===d)return g[b];g[b]=c}},debug:function(){n.debug&&(n.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,n.name+":"),g.debug.apply(console,arguments)))},verbose:function(){n.verbose&&n.debug&&(n.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),g.verbose.apply(console,arguments)))},error:function(){g.error=Function.prototype.bind.call(console.error,console,n.name+":"),g.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;n.performance&&(b=(new Date).getTime(),d=i||b,c=b-d,i=b,j.push({Element:w,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,100)},display:function(){var b=n.name+":",c=0;i=!1,clearTimeout(g.performance.timer),a.each(j,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",h&&(b+=" '"+h+"'"),(console.group!==d||console.table!==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"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(b,c,e){var g,h,i,j=u;return c=c||m,e=w||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},l?(u===d&&g.initialize(),g.invoke(k)):(u!==d&&g.destroy(),g.initialize())}),f!==d?f:this},a.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,offset:0,includeMargin:!1,context:b,throttle:!1,type:!1,transition:"fade in",duration:500,onPassed:{},onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,once:!0,continuous:!1,onRefresh:function(){},onScroll:function(){},watch:!0,watchedProperties:["offsetWidth","offsetHeight","top","left"],error:{method:"The method you called is not defined."}}}(jQuery,window,document),function(a,b,c,d){a.visit=a.fn.visit=function(c){var e,f=a(a.isFunction(this)?b:this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return f.each(function(){var m,n=a.extend(!0,{},a.fn.visit.settings,c),o=n.error,p=n.namespace,q=p+"-module",r=a(this),s=a(),t=this,u=r.data(q);m={initialize:function(){n.count?m.store(n.key.count,n.count):n.id?m.add.id(n.id):n.increment&&"increment"!==k&&m.increment(),m.add.display(r),m.instantiate()},instantiate:function(){m.verbose("Storing instance of visit module",m),u=m,r.data(q,m)},destroy:function(){m.verbose("Destroying instance"),r.removeData(q)},increment:function(a){var b=m.get.count(),c=+b+1;a?m.add.id(a):(c>n.limit&&!n.surpass&&(c=n.limit),m.debug("Incrementing visits",c),m.store(n.key.count,c))},decrement:function(a){var b=m.get.count(),c=+b-1;a?m.remove.id(a):(m.debug("Removing visit"),m.store(n.key.count,c))},get:{count:function(){return+m.retrieve(n.key.count)||0},idCount:function(a){return a=a||m.get.ids(),a.length},ids:function(a){var b=[];return a=a||m.retrieve(n.key.ids),"string"==typeof a&&(b=a.split(n.delimiter)),m.verbose("Found visited ID list",b),b},storageOptions:function(){var a={};return n.expires&&(a.expires=n.expires),n.domain&&(a.domain=n.domain),n.path&&(a.path=n.path),a}},has:{visited:function(b,c){var e=!1;return c=c||m.get.ids(),b!==d&&c&&a.each(c,function(a,c){c==b&&(e=!0)}),e}},set:{count:function(a){m.store(n.key.count,a)},ids:function(a){m.store(n.key.ids,a)}},reset:function(){m.store(n.key.count,0),m.store(n.key.ids,null)},add:{id:function(a){var b=m.retrieve(n.key.ids),c=b===d||""===b?a:b+n.delimiter+a;m.has.visited(a)?m.debug("Unique content already visited, not adding visit",a,b):a===d?m.debug("ID is not defined"):(m.debug("Adding visit to unique content",a),m.store(n.key.ids,c)),m.set.count(m.get.idCount())},display:function(b){var c=a(b);c.size()>0&&!a.isWindow(c[0])&&(m.debug("Updating visit count for element",c),s=s.size()>0?s.add(c):c)}},remove:{id:function(b){var c=m.get.ids(),e=[];b!==d&&c!==d&&(m.debug("Removing visit to unique content",b,c),a.each(c,function(a,c){c!==b&&e.push(c)}),e=e.join(n.delimiter),m.store(n.key.ids,e)),m.set.count(m.get.idCount())}},check:{limit:function(b){b=b||m.get.count(),n.limit&&(b>=n.limit&&(m.debug("Pages viewed exceeded limit, firing callback",b,n.limit),a.proxy(n.onLimit,this)(b)),m.debug("Limit not reached",b,n.limit),a.proxy(n.onChange,this)(b)),m.update.display(b)}},update:{display:function(a){a=a||m.get.count(),s.size()>0&&(m.debug("Updating displayed view count",s),s.html(a))}},store:function(c,e){var f=m.get.storageOptions(e);if("localstorage"==n.storageMethod&&b.localStorage!==d)b.localStorage.setItem(c,e),m.debug("Value stored using local storage",c,e);else{if(a.cookie===d)return void m.error(o.noCookieStorage);a.cookie(c,e,f),m.debug("Value stored using cookie",c,e,f)}c==n.key.count&&m.check.limit(e)},retrieve:function(c){var e;return"localstorage"==n.storageMethod&&b.localStorage!==d?e=b.localStorage.getItem(c):a.cookie!==d?e=a.cookie(c):m.error(o.noCookieStorage),("undefined"==e||"null"==e||e===d||null===e)&&(e=d),e},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},internal:function(b,c){return m.debug("Changing internal",b,c),c===d?m[b]:void(a.isPlainObject(b)?a.extend(!0,m,b):m[b]=c)},debug:function(){n.debug&&(n.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,n.name+":"),m.debug.apply(console,arguments)))},verbose:function(){n.verbose&&n.debug&&(n.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,n.name+":"),m.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;n.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Element:t,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var b=n.name+":",c=0;h=!1,clearTimeout(m.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(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(b,c,f){var g,h,i,j=u;return c=c||l,f=t||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(u===d&&m.initialize(),m.invoke(j)):(u!==d&&m.destroy(),m.initialize())}),e!==d?e:this},a.fn.visit.settings={name:"Visit",debug:!1,verbose:!0,performance:!0,namespace:"visit",increment:!1,surpass:!1,count:!1,limit:!1,delimiter:"&",storageMethod:"localstorage",key:{count:"visit-count",ids:"visit-ids"},expires:30,domain:!1,path:!1,onLimit:function(){},onChange:function(){},error:{method:"The method you called is not defined",missingPersist:"Using the persist setting requires the inclusion of PersistJS",noCookieStorage:"The default storage cookie requires $.cookie to be included."}}}(jQuery,window,document),function(a,b,c,d){a.site=a.fn.site=function(e){var f,g,h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1),m=a.isPlainObject(e)?a.extend(!0,{},a.site.settings,e):a.extend({},a.site.settings),n=m.namespace,o=m.error,p="module-"+n,q=a(c),r=q,s=this,t=r.data(p);return f={initialize:function(){f.instantiate()},instantiate:function(){f.verbose("Storing instance of site",f),t=f,r.data(p,f)},normalize:function(){f.fix.console(),f.fix.requestAnimationFrame()},fix:{console:function(){f.debug("Normalizing window.console"),(console===d||console.log===d)&&(f.verbose("Console not available, normalizing events"),f.disable.console()),("undefined"==typeof console.group||"undefined"==typeof console.groupEnd||"undefined"==typeof console.groupCollapsed)&&(f.verbose("Console group not available, normalizing events"),b.console.group=function(){},b.console.groupEnd=function(){},b.console.groupCollapsed=function(){}),"undefined"==typeof console.markTimeline&&(f.verbose("Mark timeline not available, normalizing events"),b.console.markTimeline=function(){})},consoleClear:function(){f.debug("Disabling programmatic console clearing"),b.console.clear=function(){}},requestAnimationFrame:function(){f.debug("Normalizing requestAnimationFrame"),b.requestAnimationFrame===d&&(f.debug("RequestAnimationFrame not available, normailizing event"),b.requestAnimationFrame=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)})}},moduleExists:function(b){return a.fn[b]!==d&&a.fn[b].settings!==d},enabled:{modules:function(b){var c=[];return b=b||m.modules,a.each(b,function(a,b){f.moduleExists(b)&&c.push(b)}),c}},disabled:{modules:function(b){var c=[];return b=b||m.modules,a.each(b,function(a,b){f.moduleExists(b)||c.push(b)}),c}},change:{setting:function(b,c,e,g){e="string"==typeof e?"all"===e?m.modules:[e]:e||m.modules,g=g!==d?g:!0,a.each(e,function(d,e){var h,i=f.moduleExists(e)?a.fn[e].settings.namespace||!1:!0;f.moduleExists(e)&&(f.verbose("Changing default setting",b,c,e),a.fn[e].settings[b]=c,g&&i&&(h=a(":data(module-"+i+")"),h.size()>0&&(f.verbose("Modifying existing settings",h),h[e]("setting",b,c))))})},settings:function(b,c,e){c="string"==typeof c?[c]:c||m.modules,e=e!==d?e:!0,a.each(c,function(c,d){var g;f.moduleExists(d)&&(f.verbose("Changing default setting",b,d),a.extend(!0,a.fn[d].settings,b),e&&n&&(g=a(":data(module-"+n+")"),g.size()>0&&(f.verbose("Modifying existing settings",g),g[d]("setting",b))))})}},enable:{console:function(){f.console(!0)},debug:function(a,b){a=a||m.modules,f.debug("Enabling debug for modules",a),f.change.setting("debug",!0,a,b)},verbose:function(a,b){a=a||m.modules,f.debug("Enabling verbose debug for modules",a),f.change.setting("verbose",!0,a,b)}},disable:{console:function(){f.console(!1)},debug:function(a,b){a=a||m.modules,f.debug("Disabling debug for modules",a),f.change.setting("debug",!1,a,b)},verbose:function(a,b){a=a||m.modules,f.debug("Disabling verbose debug for modules",a),f.change.setting("verbose",!1,a,b)}},console:function(a){if(a){if(t.cache.console===d)return void f.error(o.console);f.debug("Restoring console function"),b.console=t.cache.console}else f.debug("Disabling console function"),t.cache.console=b.console,b.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){f.verbose("Destroying previous site for",r),r.removeData(p)},cache:{},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,f,b);else{if(c===d)return f[b];f[b]=c}},debug:function(){m.debug&&(m.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,m.name+":"),f.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),f.verbose.apply(console,arguments)))},error:function(){f.error=Function.prototype.bind.call(console.error,console,m.name+":"),f.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;m.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Element:s,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,100)},display:function(){var b=m.name+":",c=0;h=!1,clearTimeout(f.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",(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(b,c,e){var h,i,j,k=t;return c=c||l,e=s||e,"string"==typeof b&&k!==d&&(b=b.split(/[\. ]/),h=b.length-1,a.each(b,function(c,e){var g=c!=h?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(k[g])&&c!=h)k=k[g];else{if(k[g]!==d)return i=k[g],!1;if(!a.isPlainObject(k[e])||c==h)return k[e]!==d?(i=k[e],!1):(f.error(o.method,b),!1);k=k[e]}})),a.isFunction(i)?j=i.apply(e,c):i!==d&&(j=i),a.isArray(g)?g.push(j):g!==d?g=[g,j]:j!==d&&(g=j),i}},k?(t===d&&f.initialize(),f.invoke(j)):(t!==d&&f.destroy(),f.initialize()),g!==d?g:this},a.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!0,performance:!0,modules:["accordion","api","checkbox","dimmer","dropdown","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","video","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.accordion=function(c){{var e,f=a(this),g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)}}return f.each(function(){var b,l=a.isPlainObject(c)?a.extend(!0,{},a.fn.accordion.settings,c):a.extend({},a.fn.accordion.settings),m=l.className,n=l.namespace,o=l.selector,p=(l.error,"."+n),q="module-"+n,r=f.selector||"",s=a(this),t=s.find(o.title),u=s.find(o.content),v=this,w=s.data(q);b={initialize:function(){b.debug("Initializing accordion with bound events",s),t.on("click"+p,b.event.click),b.instantiate()},instantiate:function(){w=b,s.data(q,b)},destroy:function(){b.debug("Destroying previous accordion for",s),s.removeData(q),t.off(p)},reset:{display:function(){b.verbose("Removing inline display from element",this),a(this).css("display",""),""===a(this).attr("style")&&a(this).attr("style","").removeAttr("style")},opacity:function(){b.verbose("Removing inline opacity from element",this),a(this).css("opacity",""),""===a(this).attr("style")&&a(this).attr("style","").removeAttr("style")}},event:{click:function(){a.proxy(b.toggle,this)()}},toggle:function(c){var d=c?t.eq(c):a(this),e=d.next(u),f=e.is(":visible");b.debug("Toggling visibility of content",d),f?l.collapsible?a.proxy(b.close,d)():b.debug("Cannot close accordion content collapsing is disabled"):a.proxy(b.open,d)()},open:function(c){var d=c?t.eq(c):a(this),e=d.next(u),f=e.is(":animated");f||(b.debug("Opening accordion content",d),l.exclusive&&a.proxy(b.closeOthers,d)(),d.addClass(m.active),e.stop().children().stop().animate({opacity:1},l.duration,b.reset.display).end().slideDown(l.duration,l.easing,function(){e.addClass(m.active),a.proxy(b.reset.display,this)(),a.proxy(l.onOpen,e)(),a.proxy(l.onChange,e)()}))},close:function(c){var d=c?t.eq(c):a(this),e=d.next(u);b.debug("Closing accordion content",e),d.removeClass(m.active),e.removeClass(m.active).show().stop().children().stop().animate({opacity:0},l.duration,b.reset.opacity).end().slideUp(l.duration,l.easing,function(){a.proxy(b.reset.display,this)(),a.proxy(l.onClose,e)(),a.proxy(l.onChange,e)()})},closeOthers:function(c){var d=c?t.eq(c):a(this),e=d.parents(o.content).prev(o.title),f=d.closest(o.accordion),g=f.find(o.title+"."+m.active+":visible").not(e),h=g.next(u),i=g.size()>0;i&&(b.debug("Exclusive enabled, closing other content",g),g.removeClass(m.active),h.stop().children().stop().animate({opacity:0},l.duration,b.resetOpacity).end().slideUp(l.duration,l.easing,function(){a(this).removeClass(m.active),a.proxy(b.reset.display,this)()}))},setting:function(c,e){if(b.debug("Changing setting",c,e),a.isPlainObject(c))a.extend(!0,l,c);else{if(e===d)return l[c];l[c]=e}},internal:function(c,e){return b.debug("Changing internal",c,e),e===d?b[c]:void(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e)},debug:function(){l.debug&&(l.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,l.name+":"),b.debug.apply(console,arguments)))},verbose:function(){l.verbose&&l.debug&&(l.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),b.verbose.apply(console,arguments)))},error:function(){b.error=Function.prototype.bind.call(console.error,console,l.name+":"),b.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;l.performance&&(c=(new Date).getTime(),e=g||c,d=c-e,g=c,h.push({Element:v,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var c=l.name+":",e=0;g=!1,clearTimeout(b.performance.timer),a.each(h,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",r&&(c+=" '"+r+"'"),(console.group!==d||console.table!==d)&&h.length>0&&(console.groupCollapsed(c),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,c,f){var g,h,i,j=w;return c=c||k,f=v||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},j?(w===d&&b.initialize(),b.invoke(i)):(w!==d&&b.destroy(),b.initialize())}),e!==d?e:this},a.fn.accordion.settings={name:"Accordion",namespace:"accordion",debug:!1,verbose:!0,performance:!0,exclusive:!0,collapsible:!0,closeNested:!0,duration:500,easing:"easeInOutQuint",onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active"},selector:{accordion:".accordion",title:".title",content:".content"}},a.extend(a.easing,{easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.chatroom=function(b){var c,e=a(this),f=e.selector||"",g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);return a(this).each(function(){var c,e,l,m,n,o,p,q=a.extend(!0,{},a.fn.chatroom.settings,b),r=q.className,s=q.namespace,t=q.selector,u=q.error,v=a(this),w=v.find(t.expandButton),x=v.find(t.userListButton),y=v.find(t.userList),z=(v.find(t.room),v.find(t.userCount)),A=v.find(t.log),B=(v.find(t.message),v.find(t.messageInput)),C=v.find(t.messageButton),D=v.data("module"),E=this,F="",G={};p={width:{log:A.width(),userList:y.outerWidth()},initialize:function(){return Pusher===d&&p.error(u.pusher),q.key===d||q.channelName===d?(p.error(u.key),!1):q.endpoint.message||q.endpoint.authentication?(o=new Pusher(q.key),Pusher.channel_auth_endpoint=q.endpoint.authentication,c=o.subscribe(q.channelName),c.bind("pusher:subscription_succeeded",p.user.list.create),c.bind("pusher:subscription_error",p.error),c.bind("pusher:member_added",p.user.joined),c.bind("pusher:member_removed",p.user.left),c.bind("update_messages",p.message.receive),a.each(q.customEvents,function(a,b){c.bind(a,b)}),x.on("click."+s,p.event.toggleUserList),w.on("click."+s,p.event.toggleExpand),B.on("keydown."+s,p.event.input.keydown).on("keyup."+s,p.event.input.keyup),C.on("mouseenter."+s,p.event.hover).on("mouseleave."+s,p.event.hover).on("click."+s,p.event.submit),A.animate({scrollTop:A.prop("scrollHeight")},400),void v.data("module",p).addClass(r.loading)):(p.error(u.endpoint),!1)},refresh:function(){x.removeClass(r.active),p.width={log:A.width(),userList:y.outerWidth()},x.hasClass(r.active)&&p.user.list.hide(),v.data("module",p)},user:{updateCount:function(){q.userCount&&(G=v.data("users"),m=0,a.each(G,function(){m++}),z.html(q.templates.userCount(m)))},joined:function(b){G=v.data("users"),"anonymous"!=b.id&&G[b.id]===d&&(G[b.id]=b.info,q.randomColor&&b.info.color===d&&(b.info.color=q.templates.color(b.id)),F=q.templates.userList(b.info),b.info.isAdmin?a(F).prependTo(y):a(F).appendTo(y),q.partingMessages&&(A.append(q.templates.joined(b.info)),p.message.scroll.test()),p.user.updateCount())},left:function(a){G=v.data("users"),a!==d&&"anonymous"!==a.id&&(delete G[a.id],v.data("users",G),y.find("[data-id="+a.id+"]").remove(),q.partingMessages&&(A.append(q.templates.left(a.info)),p.message.scroll.test()),p.user.updateCount())},list:{create:function(b){G={},b.each(function(a){"anonymous"!==a.id&&"undefined"!==a.id&&(q.randomColor&&a.info.color===d&&(a.info.color=q.templates.color(a.id)),F=a.info.isAdmin?q.templates.userList(a.info)+F:F+q.templates.userList(a.info),G[a.id]=a.info)}),v.data("users",G).data("user",G[b.me.id]).removeClass(r.loading),y.html(F),p.user.updateCount(),a.proxy(q.onJoin,y.children())()},show:function(){A.animate({width:p.width.log-p.width.userList},{duration:q.speed,easing:q.easing,complete:p.message.scroll.move})},hide:function(){A.stop().animate({width:p.width.log},{duration:q.speed,easing:q.easing,complete:p.message.scroll.move})}}},message:{scroll:{test:function(){n=A.prop("scrollHeight")-A.height(),Math.abs(A.scrollTop()-n)0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,c,e){var f,g;return c=c||k,e=E||e,"string"==typeof b&&D!==d&&(b=b.split(/[\. ]/),f=b.length-1,a.each(b,function(c,e){a.isPlainObject(D[e])&&c!=f?D=D[e]:D[e]!==d?g=D[e]:p.error(u.method,b)})),a.isFunction(g)?g.apply(e,c):g||!1}},j?(D===d&&p.initialize(),p.invoke(i)):(D!==d&&p.destroy(),p.initialize())}),c!==d?c:this},a.fn.chatroom.settings={name:"Chat",namespace:"chat",debug:!1,channel:"present-chat",onJoin:function(){},onMessage:function(){},onExpand:function(){},onContract:function(){},customEvents:{},partingMessages:!1,userCount:!0,randomColor:!0,speed:300,easing:"easeOutQuint",scrollArea:9999,endpoint:{message:!1,authentication:!1},error:{method:"The method you called is not defined",endpoint:"Please define a message and authentication endpoint.",key:"You must specify a pusher key and channel.",pusher:"You must include the Pusher library."},className:{expand:"expand",active:"active",hover:"hover",down:"down",loading:"loading"},selector:{userCount:".actions .message",userListButton:".actions .list.button",expandButton:".actions .expand.button",room:".room",userList:".room .list",log:".room .log",message:".room .log .message",author:".room log .message .author",messageInput:".talk input",messageButton:".talk .send.button"},templates:{userCount:function(a){return a+" users in chat"},color:function(){var a=["#000000","#333333","#666666","#999999","#CC9999","#CC6666","#CC3333","#993333","#663333","#CC6633","#CC9966","#CC9933","#999966","#CCCC66","#99CC66","#669933","#669966","#33A3CC","#336633","#33CCCC","#339999","#336666","#336699","#6666CC","#9966CC","#333399","#663366","#996699","#993366","#CC6699"];return a[Math.floor(Math.random()*a.length)]},message:function(a){var b="";return a.user.isAdmin?(a.user.color="#55356A",b+='
',b+=''):b+='
',b+="

",b+=a.user.color!==d?''+a.user.name+": ":''+a.user.name+": ",b+=""+a.text+"

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

'+a.name+"

":'

'+a.name+"

",b+="
"}}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.checkbox=function(b){var c,e=a(this),f=e.selector||"",g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);return e.each(function(){var e,l=a.extend(!0,{},a.fn.checkbox.settings,b),m=l.className,n=l.namespace,o=(l.error,"."+n),p="module-"+n,q=a(this),r=a(this).next(l.selector.label).first(),s=a(this).find(l.selector.input),t=q.selector||"",u=q.data(p),v=this;e={initialize:function(){e.verbose("Initializing checkbox",l),l.context&&""!==t?(e.verbose("Adding delegated events"),a(v,l.context).on(t,"click"+o,e.toggle).on(t+" + "+l.selector.label,"click"+o,e.toggle)):(q.on("click"+o,e.toggle).data(p,e),s.on("keydown"+o,e.event.keydown),r.on("click"+o,e.toggle)),e.instantiate() },instantiate:function(){e.verbose("Storing instance of module",e),u=e,q.data(p,e)},destroy:function(){e.verbose("Destroying previous module"),q.off(o).removeData(p),s.off(o,e.event.keydown),r.off(o)},event:{keydown:function(b){var c=b.which,d={enter:13,escape:27};c==d.escape&&(e.verbose("Escape key pressed blurring field"),q.blur()),b.ctrlKey||c!=d.enter||(e.verbose("Enter key pressed, toggling checkbox"),a.proxy(e.toggle,this)(),b.preventDefault())}},is:{radio:function(){return q.hasClass(m.radio)},checked:function(){return s.prop("checked")!==d&&s.prop("checked")},unchecked:function(){return!e.is.checked()}},can:{uncheck:function(){return"boolean"==typeof l.required?l.required:!e.is.radio()}},check:function(){e.debug("Enabling checkbox",s),s.prop("checked",!0).trigger("change"),a.proxy(l.onChange,s.get())(),a.proxy(l.onChecked,s.get())()},uncheck:function(){e.debug("Disabling checkbox"),s.prop("checked",!1).trigger("change"),a.proxy(l.onChange,s.get())(),a.proxy(l.onUnchecked,s.get())()},toggle:function(){e.verbose("Determining new checkbox state"),e.is.unchecked()?e.check():e.is.checked()&&e.can.uncheck()&&e.uncheck()},setting:function(b,c){if(e.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,l,b);else{if(c===d)return l[b];l[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,e,b);else{if(c===d)return e[b];e[b]=c}},debug:function(){l.debug&&(l.performance?e.performance.log(arguments):(e.debug=Function.prototype.bind.call(console.info,console,l.name+":"),e.debug.apply(console,arguments)))},verbose:function(){l.verbose&&l.debug&&(l.performance?e.performance.log(arguments):(e.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),e.verbose.apply(console,arguments)))},error:function(){e.error=Function.prototype.bind.call(console.error,console,l.name+":"),e.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;l.performance&&(b=(new Date).getTime(),d=g||b,c=b-d,g=b,h.push({Element:v,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(e.performance.timer),e.performance.timer=setTimeout(e.performance.display,100)},display:function(){var b=l.name+":",c=0;g=!1,clearTimeout(e.performance.timer),a.each(h,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",f&&(b+=" '"+f+"'"),(console.group!==d||console.table!==d)&&h.length>0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,e,f){var g,h,i,j=u;return e=e||k,f=v||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,e):h!==d&&(i=h),a.isArray(c)?c.push(i):c!==d?c=[c,i]:i!==d&&(c=i),h}},j?(u===d&&e.initialize(),e.invoke(i)):(u!==d&&e.destroy(),e.initialize())}),c!==d?c:this},a.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",verbose:!0,debug:!0,performance:!0,context:!1,required:"auto",onChange:function(){},onChecked:function(){},onUnchecked:function(){},error:{method:"The method you called is not defined."},selector:{input:"input[type=checkbox], input[type=radio]",label:"label"},className:{radio:"radio"}}}(jQuery,window,document),function(a,b,c,d){a.fn.dimmer=function(b){var e,f=a(this),g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);return f.each(function(){var l,m,n,o=a.isPlainObject(b)?a.extend(!0,{},a.fn.dimmer.settings,b):a.extend({},a.fn.dimmer.settings),p=o.selector,q=o.namespace,r=o.className,s=(o.error,"."+q),t="module-"+q,u=f.selector||"",v="ontouchstart"in c.documentElement?"touchstart":"click",w=a(this),x=this,y=w.data(t);n={preinitialize:function(){n.is.dimmer()?(m=w.parent(),l=w):(m=w,l=n.has.dimmer()?m.children(p.dimmer).first():n.create())},initialize:function(){n.debug("Initializing dimmer",o),"hover"==o.on?m.on("mouseenter"+s,n.show).on("mouseleave"+s,n.hide):"click"==o.on&&m.on(v+s,n.toggle),n.is.page()&&(n.debug("Setting as a page dimmer",m),n.set.pageDimmer()),o.closable&&(n.verbose("Adding dimmer close event",l),l.on(v+s,n.event.click)),n.set.dimmable(),n.instantiate()},instantiate:function(){n.verbose("Storing instance of module",n),y=n,w.data(t,y)},destroy:function(){n.verbose("Destroying previous module",l),w.removeData(t),m.off(s),l.off(s)},event:{click:function(b){n.verbose("Determining if event occured on dimmer",b),(0===l.find(b.target).size()||a(b.target).is(p.content))&&(n.hide(),b.stopImmediatePropagation())}},addContent:function(b){var c=a(b);n.debug("Add content to dimmer",c),c.parent()[0]!==l[0]&&c.detach().appendTo(l)},create:function(){return a(o.template.dimmer()).appendTo(m)},animate:{show:function(b){b=a.isFunction(b)?b:function(){},n.set.dimmed(),"hover"!=o.on&&o.useCSS&&a.fn.transition!==d&&l.transition("is supported")?l.transition({animation:o.transition+" in",queue:!0,duration:n.get.duration(),complete:function(){n.set.active(),b()}}):(n.verbose("Showing dimmer animation with javascript"),l.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(n.get.duration(),1,function(){l.removeAttr("style"),n.set.active(),b()}))},hide:function(b){b=a.isFunction(b)?b:function(){},"hover"!=o.on&&o.useCSS&&a.fn.transition!==d&&l.transition("is supported")?(n.verbose("Hiding dimmer with css"),n.remove.dimmed(),l.transition({animation:o.transition+" out",duration:n.get.duration(),queue:!0,complete:function(){n.remove.active(),b()}})):(n.verbose("Hiding dimmer with javascript"),n.remove.dimmed(),l.stop().fadeOut(n.get.duration(),function(){l.removeAttr("style"),n.remove.active(),b()}))}},get:{dimmer:function(){return l},duration:function(){return"object"==typeof o.duration?n.is.active()?o.duration.hide:o.duration.show:o.duration}},has:{dimmer:function(){return w.children(p.dimmer).size()>0}},is:{active:function(){return l.hasClass(r.active)},animating:function(){return l.is(":animated")||l.hasClass(r.transition)},dimmer:function(){return w.is(p.dimmer)},dimmable:function(){return w.is(p.dimmable)},dimmed:function(){return m.hasClass(r.dimmed)},disabled:function(){return m.hasClass(r.disabled)},enabled:function(){return!n.is.disabled()},page:function(){return m.is("body")},pageDimmer:function(){return l.hasClass(r.pageDimmer)}},can:{show:function(){return!l.hasClass(r.disabled)}},set:{active:function(){n.set.dimmed(),l.removeClass(r.transition).addClass(r.active)},dimmable:function(){m.addClass(r.dimmable)},dimmed:function(){m.addClass(r.dimmed)},pageDimmer:function(){l.addClass(r.pageDimmer)},disabled:function(){l.addClass(r.disabled)}},remove:{active:function(){l.removeClass(r.transition).removeClass(r.active)},dimmed:function(){m.removeClass(r.dimmed)},disabled:function(){l.removeClass(r.disabled)}},show:function(b){b=a.isFunction(b)?b:function(){},n.debug("Showing dimmer",l,o),!n.is.active()&&n.is.enabled()?(n.animate.show(b),a.proxy(o.onShow,x)(),a.proxy(o.onChange,x)()):n.debug("Dimmer is already shown or disabled")},hide:function(b){b=a.isFunction(b)?b:function(){},n.is.active()||n.is.animating()?(n.debug("Hiding dimmer",l),n.animate.hide(b),a.proxy(o.onHide,x)(),a.proxy(o.onChange,x)()):n.debug("Dimmer is not visible")},toggle:function(){n.verbose("Toggling dimmer visibility",l),n.is.dimmed()?n.hide():n.show()},setting:function(b,c){if(n.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,o,b);else{if(c===d)return o[b];o[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},debug:function(){o.debug&&(o.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,o.name+":"),n.debug.apply(console,arguments)))},verbose:function(){o.verbose&&o.debug&&(o.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),n.verbose.apply(console,arguments)))},error:function(){n.error=Function.prototype.bind.call(console.error,console,o.name+":"),n.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;o.performance&&(b=(new Date).getTime(),d=g||b,c=b-d,g=b,h.push({Element:x,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,100)},display:function(){var b=o.name+":",c=0;g=!1,clearTimeout(n.performance.timer),a.each(h,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",u&&(b+=" '"+u+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&h.length>0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,c,f){var g,h,i,j=y;return c=c||k,f=x||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},n.preinitialize(),j?(y===d&&n.initialize(),n.invoke(i)):(y!==d&&n.destroy(),n.initialize())}),e!==d?e:this},a.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",debug:!1,verbose:!0,performance:!0,transition:"fade",useCSS:!0,on:!1,closable:!0,duration:{show:500,hide: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, .ui.dimmer > .content > .center"},template:{dimmer:function(){return a("
").attr("class","ui dimmer")}},className:{active:"active",dimmable:"ui dimmable",dimmed:"dimmed",disabled:"disabled",pageDimmer:"page",hide:"hide",show:"show",transition:"transition"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.dropdown=function(b){var e,f=a(this),g=a(c),h=f.selector||"",i="ontouchstart"in c.documentElement,j=(new Date).getTime(),k=[],l=arguments[0],m="string"==typeof l,n=[].slice.call(arguments,1);return f.each(function(){var c,o=a.isPlainObject(b)?a.extend(!0,{},a.fn.dropdown.settings,b):a.extend({},a.fn.dropdown.settings),p=o.className,q=o.metadata,r=o.namespace,s=o.selector,t=o.error,u="."+r,v="module-"+r,w=a(this),x=w.find(s.text),y=w.find(s.search),z=w.find(s.input),A=w.prev().find(s.text).size()>0?w.prev().find(s.text):w.prev(),B=w.children(s.menu),C=B.find(s.item),D=!1,E=this,F=w.data(v);c={initialize:function(){c.debug("Initializing dropdown",o),c.setup.layout(),c.save.defaults(),c.set.selected(),i&&c.bind.touchEvents(),c.bind.mouseEvents(),c.bind.keyboardEvents(),c.instantiate()},instantiate:function(){c.verbose("Storing instance of dropdown",c),F=c,w.data(v,c)},destroy:function(){c.verbose("Destroying previous dropdown for",w),C.off(u),w.off(u).removeData(v)},setup:{layout:function(){w.is("select")&&c.setup.select(),c.is.search()&&!c.is.searchable()&&(y=a("").addClass(p.search).insertBefore(x)),o.allowTab&&(c.is.searchable()?(c.debug("Searchable dropdown initialized"),y.val("").attr("tabindex",0),B.attr("tabindex","-1")):(c.debug("Simple selection dropdown initialized"),w.attr("tabindex")||(w.attr("tabindex",0),B.attr("tabindex","-1"))))},select:function(){c.debug("Dropdown initialized on a select, generating html"),z=w,w=a("
").attr("class",z.attr("class")).addClass(p.selection).html(o.templates.select(c.get.selectValues())).insertBefore(z),z.removeAttr("class").prependTo(w),c.refresh()}},refresh:function(){x=w.find(s.text),y=w.find(s.search),z=w.find(s.input),B=w.children(s.menu),C=B.find(s.item)},bind:{keyboardEvents:function(){c.debug("Binding keyboard events"),w.on("keydown"+u,c.event.keydown),c.is.searchable()?y.on("focus"+u,c.event.searchFocus).on("blur"+u,c.event.blur).on(c.get.inputEvent(),c.event.input):w.on("mousedown",c.event.mousedown).on("mouseup",c.event.mouseup).on("focus"+u,c.event.focus).on("blur"+u,c.event.blur)},touchEvents:function(){c.debug("Touch device detected binding touch events"),c.is.searchable()||w.on("touchstart"+u,c.event.test.toggle),C.on("touchstart"+u,c.event.item.mouseenter).on("touchstart"+u,c.event.item.click)},mouseEvents:function(){c.verbose("Mouse detected binding mouse events"),c.is.searchable()||("click"==o.on?w.on("click"+u,c.event.test.toggle):"hover"==o.on?w.on("mouseenter"+u,c.delay.show).on("mouseleave"+u,c.delay.hide):w.on(o.on+u,c.toggle)),C.on("mouseenter"+u,c.event.item.mouseenter).on("mouseleave"+u,c.event.item.mouseleave).on("click"+u,c.event.item.click)},intent:function(){c.verbose("Binding hide intent event to document"),i&&g.on("touchstart"+u,c.event.test.touch).on("touchmove"+u,c.event.test.touch),g.on("click"+u,c.event.test.hide)}},unbind:{intent:function(){c.verbose("Removing hide intent event from document"),i&&g.off("touchstart"+u).off("touchmove"+u),g.off("click"+u)}},filter:function(b){var c,e=a(),f=new RegExp("(?:s|^)"+b,"i"),g=new RegExp(b,"i");C.each(function(){var b=a(this),c=b.data(q.text)!==d?b.data(q.text):o.preserveHTML?b.html():b.text(),h=b.data(q.value)!==d?b.data(q.value):"string"==typeof c?c.toLowerCase():c;f.test(c)||f.test(h)?e=e.add(b):o.fullTextSearch&&(g.test(c)||g.test(h))&&(e=e.add(b))}),c=C.not(e),C.removeClass(p.filtered).removeClass(p.selected),c.addClass(p.filtered),C.not("."+p.filtered).eq(0).addClass(p.selected)},event:{mousedown:function(){D=!0},mouseup:function(){D=!1},focus:function(){D||c.show()},searchFocus:function(){D=!0,c.show()},blur:function(){D||c.hide()},input:function(){var a=y.val();x.addClass(p.filtered),c.filter(a)},keydown:function(b){var d,e=C.not(p.filtered).filter("."+p.selected).eq(0),f=C.not("."+p.filtered),g=b.which,h={enter:13,escape:27,upArrow:38,downArrow:40},i=p.selected,j=f.index(e),k=e.size()>0;if(k||(e=C.filter("."+p.active).eq(0),k=e.size()>0),g==h.escape&&(c.verbose("Escape key pressed, closing dropdown"),y.blur(),c.hide()),c.is.visible()){if(g==h.enter&&k)return c.verbose("Enter key pressed, choosing selected item"),c.is.searchable()&&(c.verbose("Removing focus from search input"),y.blur()),a.proxy(c.event.item.click,e)(b),b.preventDefault(),!1;g==h.upArrow?(d=k?e.prevAll(s.item+":not(."+p.filtered+")").eq(0):f.eq(0),0!==j&&(c.verbose("Up key pressed, changing active item"),C.removeClass(i),d.addClass(i),c.set.scrollPosition(d)),b.preventDefault()):g==h.downArrow&&(d=k?e.nextAll(s.item+":not(."+p.filtered+")").eq(0):f.eq(0),j+10&&(clearTimeout(c.itemTimer),c.itemTimer=setTimeout(function(){c.animate.hide(!1,e),c.verbose("Showing sub-menu",d),c.animate.show(!1,d)},2*o.delay.show),b.preventDefault())},mouseleave:function(){var b=a(this).find(s.menu);b.size()>0&&(clearTimeout(c.itemTimer),c.itemTimer=setTimeout(function(){c.verbose("Hiding sub-menu",b),c.animate.hide(!1,b)},o.delay.hide))},click:function(b){var e=a(this),f=e.data(q.text)!==d?e.data(q.text):o.preserveHTML?e.html():e.text(),g=e.data(q.value)!==d?e.data(q.value):"string"==typeof f?f.toLowerCase():f,h=function(){y.val(""),c.determine.selectAction(f,g),a.proxy(o.onChange,E)(g,f)},i=e.find(s.menu).size()>0;i||("touchstart"==b.type?e.one("click",h):h())}},resetStyle:function(){a(this).removeAttr("style")}},determine:{selectAction:function(b,d){c.verbose("Determining action",o.action),a.isFunction(c.action[o.action])?(c.verbose("Triggering preset action",o.action,b,d),c.action[o.action](b,d)):a.isFunction(o.action)?(c.verbose("Triggering user action",o.action,b,d),o.action(b,d)):c.error(t.action,o.action)},eventInModule:function(b,d){return d=d||function(){},0===a(b.target).closest(w).size()?(c.verbose("Triggering event",d),d(),!0):(c.verbose("Event occurred in dropdown, canceling callback"),!1)},eventInMenu:function(b,d){return d=d||function(){},0===a(b.target).closest(B).size()?(c.verbose("Triggering event",d),d(),!0):(c.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},hide:function(){c.hide()},select:function(a,b){b=b!==d?b:a,c.set.selected(b),c.set.value(b),c.hide()},activate:function(a,b){b=b!==d?b:a,c.set.selected(b),c.set.value(b),c.hide()},combo:function(a,b){b=b!==d?b:a,c.set.selected(b),c.set.value(b),c.hide()},auto:function(a,b){b=b!==d?b:a,c.set.selected(b),c.set.value(b),c.hide()},changeText:function(a,b){b=b!==d?b:a,c.set.selected(b),c.hide()},updateForm:function(a,b){b=b!==d?b:a,c.set.selected(b),c.set.value(b),c.hide()}},get:{text:function(){return x.text()},value:function(){return z.size()>0?z.val():w.data(q.value)},inputEvent:function(){var a=y[0];return a?a.oninput!==d?"input":a.onpropertychange!==d?"propertychange":"keyup":!1},selectValues:function(){var b={values:{}};return w.find("option").each(function(){var c=a(this).html(),e=a(this).attr("value")!==d?a(this).attr("value"):c;""===e?b.placeholder=c:b.values[e]=c}),c.debug("Retrieved values from select",b),b},item:function(b,e){var f=!1;return b=b!==d?b:c.get.value()!==d?c.get.value():c.get.text(),e=""===b?!0:e||!1,b!==d?C.each(function(){var g=a(this),h=g.data(q.text)!==d?g.data(q.text):o.preserveHTML?g.html():g.text(),i=g.data(q.value)!==d?g.data(q.value):"string"==typeof h?h.toLowerCase():h;e?(c.debug("Ambiguous dropdown value using strict type check",b),i===b?f=a(this):f||h!==b||(f=a(this))):i==b?f=a(this):f||h!=b||(f=a(this))}):b=c.get.text(),f||!1}},restore:{defaults:function(){c.restore.defaultText(),c.restore.defaultValue()},defaultText:function(){var a=w.data(q.defaultText);c.debug("Restoring default text",a),c.set.text(a)},defaultValue:function(){var a=w.data(q.defaultValue);a!==d&&(c.debug("Restoring default value",a),c.set.selected(a),c.set.value(a))}},save:{defaults:function(){c.save.defaultText(),c.save.defaultValue()},defaultValue:function(){w.data(q.defaultValue,c.get.value())},defaultText:function(){w.data(q.defaultText,x.text())}},set:{scrollPosition:function(a){var b,d,e,f,g,h,i,j,a=a||c.get.item(),k=a&&a.size()>0,l=5;a&&k&&(h=B.height(),d=a.height(),g=B.scrollTop(),f=B.offset().top,e=a.offset().top,b=g-f+e,j=b+l>g+h,i=g>b-l,(i||j)&&(c.debug("Scrolling to active item"),B.scrollTop(b)))},text:function(a){"combo"==o.action?(c.debug("Changing combo button text",a,A),o.preserveHTML?A.html(a):A.text(a)):"select"!==o.action&&(c.debug("Changing text",a,x),x.removeClass(p.filtered).removeClass(p.placeholder),o.preserveHTML?x.html(a):x.text(a))},value:function(a){c.debug("Adding selected value to hidden input",a,z),z.size()>0?z.val(a).trigger("change"):w.data(q.value,a)},active:function(){w.addClass(p.active)},visible:function(){w.addClass(p.visible)},selected:function(a){var b,e=c.get.item(a);e&&(c.debug("Setting selected menu item to",e),b=e.data(q.text)!==d?e.data(q.text):o.preserveHTML?e.html():e.text(),C.removeClass(p.active).removeClass(p.selected),e.addClass(p.active).addClass(p.selected),c.set.text(b))}},remove:{active:function(){w.removeClass(p.active)},visible:function(){w.removeClass(p.visible)}},is:{search:function(){return w.hasClass(p.search)},searchable:function(){return y.size()>0},selection:function(){return w.hasClass(p.selection)},animated:function(a){return a?a.is(":animated")||a.transition&&a.transition("is animating"):B.is(":animated")||B.transition&&B.transition("is animating")},visible:function(a){return a?a.is(":visible"):B.is(":visible")},hidden:function(a){return a?a.is(":hidden"):B.is(":hidden")}},can:{click:function(){return i||"click"==o.on},show:function(){return!w.hasClass(p.disabled)}},animate:{show:function(b,e){var f=e||B;b=b||function(){},c.is.hidden(f)&&(c.verbose("Doing menu show animation",f),"none"==o.transition?a.proxy(b,E)():a.fn.transition!==d&&w.transition("is supported")?f.transition({animation:o.transition+" in",duration:o.duration,queue:!0,complete:function(){a.proxy(b,E)()}}):"slide down"==o.transition?f.hide().clearQueue().children().clearQueue().css("opacity",0).delay(50).animate({opacity:1},o.duration,"easeOutQuad",c.event.resetStyle).end().slideDown(100,"easeOutQuad",function(){a.proxy(c.event.resetStyle,this)(),a.proxy(b,E)()}):"fade"==o.transition?f.hide().clearQueue().fadeIn(o.duration,function(){a.proxy(c.event.resetStyle,this)(),a.proxy(b,E)()}):c.error(t.transition,o.transition))},hide:function(b,e){var f=e||B;b=b||function(){},c.is.visible(f)&&(c.verbose("Doing menu hide animation",f),"none"==o.transition?a.proxy(b,E)():a.fn.transition!==d&&w.transition("is supported")?f.transition({animation:o.transition+" out",duration:o.duration,queue:!0,complete:function(){a.proxy(b,E)()}}):"slide down"==o.transition?f.show().clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},100,"easeOutQuad",c.event.resetStyle).end().delay(50).slideUp(100,"easeOutQuad",function(){a.proxy(c.event.resetStyle,this)(),a.proxy(b,E)()}):"fade"==o.transition?f.show().clearQueue().fadeOut(150,function(){a.proxy(c.event.resetStyle,this)(),a.proxy(b,E)()}):c.error(t.transition))}},show:function(){c.debug("Checking if dropdown can show"),c.is.hidden()&&(c.hideOthers(),c.set.active(),c.set.scrollPosition(),c.animate.show(function(){c.can.click()&&c.bind.intent(),c.set.visible()}),a.proxy(o.onShow,E)())},hide:function(){!c.is.animated()&&c.is.visible()&&(c.debug("Hiding dropdown"),c.can.click()&&c.unbind.intent(),c.remove.active(),c.animate.hide(function(){C.removeClass(p.filtered),c.remove.visible()}),a.proxy(o.onHide,E)())},delay:{show:function(){c.verbose("Delaying show event to ensure user intent"),clearTimeout(c.timer),c.timer=setTimeout(c.show,o.delay.show)},hide:function(){c.verbose("Delaying hide event to ensure user intent"),clearTimeout(c.timer),c.timer=setTimeout(c.hide,o.delay.hide)}},hideOthers:function(){c.verbose("Finding other dropdowns to hide"),f.not(w).has(s.menu+":visible").dropdown("hide")},toggle:function(){c.verbose("Toggling menu visibility"),c.is.hidden()?c.show():c.hide()},setting:function(b,e){if(c.debug("Changing setting",b,e),a.isPlainObject(b))a.extend(!0,o,b);else{if(e===d)return o[b];o[b]=e}},internal:function(b,e){if(a.isPlainObject(b))a.extend(!0,c,b);else{if(e===d)return c[b];c[b]=e}},debug:function(){o.debug&&(o.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,o.name+":"),c.debug.apply(console,arguments)))},verbose:function(){o.verbose&&o.debug&&(o.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),c.verbose.apply(console,arguments)))},error:function(){c.error=Function.prototype.bind.call(console.error,console,o.name+":"),c.error.apply(console,arguments)},performance:{log:function(a){var b,d,e;o.performance&&(b=(new Date).getTime(),e=j||b,d=b-e,j=b,k.push({Element:E,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,100)},display:function(){var b=o.name+":",e=0;j=!1,clearTimeout(c.performance.timer),a.each(k,function(a,b){e+=b["Execution Time"]}),b+=" "+e+"ms",h&&(b+=" '"+h+"'"),(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(b,f,g){var h,i,j,k=F;return f=f||n,g=E||g,"string"==typeof b&&k!==d&&(b=b.split(/[\. ]/),h=b.length-1,a.each(b,function(e,f){var g=e!=h?f+b[e+1].charAt(0).toUpperCase()+b[e+1].slice(1):b;if(a.isPlainObject(k[g])&&e!=h)k=k[g];else{if(k[g]!==d)return i=k[g],!1;if(!a.isPlainObject(k[f])||e==h)return k[f]!==d?(i=k[f],!1):(c.error(t.method,b),!1);k=k[f]}})),a.isFunction(i)?j=i.apply(g,f):i!==d&&(j=i),a.isArray(e)?e.push(j):e!==d?e=[e,j]:j!==d&&(e=j),i}},m?(F===d&&c.initialize(),c.invoke(l)):(F!==d&&c.destroy(),c.initialize())}),e!==d?e:this},a.fn.dropdown.settings={name:"Dropdown",namespace:"dropdown",debug:!1,verbose:!0,performance:!0,type:!1,on:"click",action:"activate",allowTab:!0,fullTextSearch:!0,preserveHTML:!0,delay:{show:200,hide:300,touch:50},transition:"slide down",duration:250,onChange:function(){},onShow:function(){},onHide:function(){},error:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined.",transition:"The requested transition was not found"},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",text:"text",value:"value"},selector:{text:"> .text:not(.icon)",input:'> input[type="hidden"], > select',search:"> .search",menu:".menu",item:".item"},className:{active:"active",disabled:"disabled",filtered:"filtered",placeholder:"default",search:"search",selected:"selected",selection:"selection",visible:"visible"}},a.fn.dropdown.settings.templates={select:function(b){var c=b.placeholder||!1,d=(b.values||{},"");return d+='',d+=b.placeholder?'
'+c+"
":'
',d+='"}},a.extend(a.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.modal=function(e){var f,g=a(this),h=a(b),i=a(c),j=a("body"),k=g.selector||"",l=(new Date).getTime(),m=[],n=arguments[0],o="string"==typeof n,p=[].slice.call(arguments,1),q=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};return g.each(function(){var g,r,s,t,u,v,w=a.isPlainObject(e)?a.extend(!0,{},a.fn.modal.settings,e):a.extend({},a.fn.modal.settings),x=w.selector,y=w.className,z=w.namespace,A=w.error,B="."+z,C="module-"+z,D=a(this),E=a(w.context),F=D.find(x.close),G=this,H=D.data(C);v={initialize:function(){return v.verbose("Initializing dimmer",E),a.fn.dimmer===d?void v.error(A.dimmer):(t=E.dimmer({closable:!1,useCSS:!0,duration:{show:.9*w.duration,hide:1.1*w.duration}}),w.detachable&&t.dimmer("add content",D),u=t.dimmer("get dimmer"),r=D.siblings(x.modal),g=r.add(D),v.verbose("Attaching close events",F),F.on("click"+B,v.event.close),h.on("resize"+B,v.event.resize),void v.instantiate())},instantiate:function(){v.verbose("Storing instance of modal"),H=v,D.data(C,H)},destroy:function(){v.verbose("Destroying previous modal"),D.removeData(C).off(B),F.off(B),E.dimmer("destroy")},refresh:function(){v.remove.scrolling(),v.cacheSizes(),v.set.screenHeight(),v.set.type(),v.set.position()},attachEvents:function(b,c){var d=a(b);c=a.isFunction(v[c])?v[c]:v.toggle,d.size()>0?(v.debug("Attaching modal events to element",b,c),d.off(B).on("click"+B,c)):v.error(A.notFound)},event:{close:function(){v.verbose("Closing element pressed"),a(this).is(x.approve)?a.proxy(w.onApprove,G)()!==!1?v.hide():v.verbose("Approve callback returned false cancelling hide"):a(this).is(x.deny)?a.proxy(w.onDeny,G)()!==!1?v.hide():v.verbose("Deny callback returned false cancelling hide"):v.hide()},click:function(b){0===a(b.target).closest(x.modal).size()&&(v.debug("Dimmer clicked, hiding all modals"),w.allowMultiple?v.hide():v.hideAll(),b.stopImmediatePropagation())},debounce:function(a,b){clearTimeout(v.timer),v.timer=setTimeout(a,b)},keyboard:function(a){var b=a.which,c=27;b==c&&(w.closable?(v.debug("Escape key pressed hiding modal"),v.hide()):v.debug("Escape key pressed, but closable is set to false"),a.preventDefault())},resize:function(){t.dimmer("is active")&&q(v.refresh)}},toggle:function(){v.is.active()?v.hide():v.show()},show:function(b){b=a.isFunction(b)?b:function(){},v.showDimmer(),v.showModal(b)},showModal:function(b){b=a.isFunction(b)?b:function(){},v.is.active()?v.debug("Modal is already visible"):(v.cacheSizes(),v.set.position(),v.set.screenHeight(),v.set.type(),r.filter(":visible").size()>0&&!w.allowMultiple?(v.debug("Other modals visible, queueing show animation"),v.hideOthers(v.showModal)):(a.proxy(w.onShow,G)(),w.transition&&a.fn.transition!==d&&D.transition("is supported")?(v.debug("Showing modal with css animations"),D.transition(w.transition+" in",w.duration,function(){a.proxy(w.onVisible,G)(),v.set.active(),b()})):(v.debug("Showing modal with javascript"),D.fadeIn(w.duration,w.easing,function(){a.proxy(w.onVisible,G)(),v.set.active(),b()}))))},showDimmer:function(){t.dimmer("is active")?v.debug("Dimmer already visible"):(v.debug("Showing dimmer"),t.dimmer("show"))},hide:function(b){b=a.isFunction(b)?b:function(){},g.filter(":visible").size()<=1&&v.hideDimmer(),v.hideModal(b)},hideDimmer:function(){return v.is.active()?(v.debug("Hiding dimmer"),w.closable&&u.off("click"+B),void t.dimmer("hide",function(){w.transition&&a.fn.transition!==d&&D.transition("is supported")&&(D.transition("reset"),v.remove.screenHeight()),v.remove.active()})):void v.debug("Dimmer is not visible cannot hide")},hideModal:function(b){return b=a.isFunction(b)?b:function(){},v.is.active()?(v.debug("Hiding modal"),v.remove.keyboardShortcuts(),a.proxy(w.onHide,G)(),void(w.transition&&a.fn.transition!==d&&D.transition("is supported")?D.transition(w.transition+" out",w.duration,function(){a.proxy(w.onHidden,G)(),v.remove.active(),v.restore.focus(),b()}):D.fadeOut(w.duration,w.easing,function(){a.proxy(w.onHidden,G)(),v.remove.active(),v.restore.focus(),b()}))):void v.debug("Cannot hide modal it is not active")},hideAll:function(b){b=a.isFunction(b)?b:function(){},g.is(":visible")&&(v.debug("Hiding all visible modals"),v.hideDimmer(),g.filter(":visible").modal("hide modal",b))},hideOthers:function(b){b=a.isFunction(b)?b:function(){},r.is(":visible")&&(v.debug("Hiding other modals"),r.filter(":visible").modal("hide modal",b))},add:{keyboardShortcuts:function(){v.verbose("Adding keyboard shortcuts"),i.on("keyup"+B,v.event.keyboard)}},save:{focus:function(){s=a(c.activeElement).blur()}},restore:{focus:function(){s&&s.size()>0&&s.focus()}},remove:{active:function(){D.removeClass(y.active)},screenHeight:function(){v.cache.height>v.cache.pageHeight&&(v.debug("Removing page height"),j.css("height",""))},keyboardShortcuts:function(){v.verbose("Removing keyboard shortcuts"),i.off("keyup"+B)},scrolling:function(){t.removeClass(y.scrolling),D.removeClass(y.scrolling)}},cacheSizes:function(){var d=D.outerHeight();0!==d&&(v.cache={pageHeight:a(c).outerHeight(),height:d+w.offset,contextHeight:"body"==w.context?a(b).height():t.height()}),v.debug("Caching modal and container sizes",v.cache)},can:{fit:function(){return v.cache.heightv.cache.pageHeight&&(v.debug("Modal is taller than page content, resizing page height"),j.css("height",v.cache.height+w.padding))},active:function(){v.add.keyboardShortcuts(),v.save.focus(),D.addClass(y.active),w.closable&&u.off("click"+B).on("click"+B,v.event.click)},scrolling:function(){t.addClass(y.scrolling),D.addClass(y.scrolling)},type:function(){v.can.fit()?(v.verbose("Modal fits on screen"),v.remove.scrolling()):(v.verbose("Modal cannot fit on screen setting to scrolling"),v.set.scrolling())},position:function(){v.verbose("Centering modal on page",v.cache),D.css(v.can.fit()?{top:"",marginTop:-(v.cache.height/2)}:{marginTop:"",top:i.scrollTop()})}},setting:function(b,c){if(v.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,w,b); else{if(c===d)return w[b];w[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,v,b);else{if(c===d)return v[b];v[b]=c}},debug:function(){w.debug&&(w.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,w.name+":"),v.debug.apply(console,arguments)))},verbose:function(){w.verbose&&w.debug&&(w.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,w.name+":"),v.verbose.apply(console,arguments)))},error:function(){v.error=Function.prototype.bind.call(console.error,console,w.name+":"),v.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;w.performance&&(b=(new Date).getTime(),d=l||b,c=b-d,l=b,m.push({Element:G,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,100)},display:function(){var b=w.name+":",c=0;l=!1,clearTimeout(v.performance.timer),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(b,c,e){var g,h,i,j=H;return c=c||p,e=G||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},o?(H===d&&v.initialize(),v.invoke(n)):(H!==d&&v.destroy(),v.initialize())}),f!==d?f:this},a.fn.modal.settings={name:"Modal",namespace:"modal",debug:!1,verbose:!0,performance:!0,allowMultiple:!0,detachable:!0,closable:!0,context:"body",duration:500,easing:"easeOutExpo",offset:0,transition:"scale",padding:30,onShow:function(){},onHide:function(){},onVisible:function(){},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:".close, .actions .button",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",scrolling:"scrolling"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.nag=function(c){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return a(this).each(function(){var m,n,o,p,q,r,s,t,u,v=a.extend(!0,{},a.fn.nag.settings,c),w=v.className,x=v.selector,y=v.error,z=v.namespace,A="."+z,B=z+"-module",C=a(this),D=C.find(x.close),E=a(v.context),F=this,G=C.data(B),H=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};u={initialize:function(){u.verbose("Initializing element"),m=C.offset(),n=C.outerHeight(),o=E.outerWidth(),p=E.outerHeight(),q=E.offset(),C.data(B,u),D.on("click"+A,u.dismiss),v.context==b&&"fixed"==v.position&&C.addClass(w.fixed),v.sticky&&(u.verbose("Adding scroll events"),"absolute"==v.position?E.on("scroll"+A,u.event.scroll).on("resize"+A,u.event.scroll):a(b).on("scroll"+A,u.event.scroll).on("resize"+A,u.event.scroll),a.proxy(u.event.scroll,this)()),v.displayTime>0&&setTimeout(u.hide,v.displayTime),u.should.show()?C.is(":visible")||u.show():u.hide()},destroy:function(){u.verbose("Destroying instance"),C.removeData(B).off(A),v.sticky&&E.off(A)},refresh:function(){u.debug("Refreshing cached calculations"),m=C.offset(),n=C.outerHeight(),o=E.outerWidth(),p=E.outerHeight(),q=E.offset()},show:function(){u.debug("Showing nag",v.animation.show),"fade"==v.animation.show?C.fadeIn(v.duration,v.easing):C.slideDown(v.duration,v.easing)},hide:function(){u.debug("Showing nag",v.animation.hide),"fade"==v.animation.show?C.fadeIn(v.duration,v.easing):C.slideUp(v.duration,v.easing)},onHide:function(){u.debug("Removing nag",v.animation.hide),C.remove(),v.onHide&&v.onHide()},stick:function(){if(u.refresh(),"fixed"==v.position){var c=a(b).prop("pageYOffset")||a(b).scrollTop(),d=C.hasClass(w.bottom)?q.top+(p-n)-c:q.top-c;C.css({position:"fixed",top:d,left:q.left,width:o-v.scrollBarWidth})}else C.css({top:s})},unStick:function(){C.css({top:""})},dismiss:function(a){v.storageMethod&&u.storage.set(v.storedKey,v.storedValue),u.hide(),a.stopImmediatePropagation(),a.preventDefault()},should:{show:function(){return v.persist?(u.debug("Persistent nag is set, can show nag"),!0):u.storage.get(v.storedKey)!=v.storedValue?(u.debug("Stored value is not set, can show nag",u.storage.get(v.storedKey)),!0):(u.debug("Stored value is set, cannot show nag",u.storage.get(v.storedKey)),!1)},stick:function(){return r=E.prop("pageYOffset")||E.scrollTop(),s=C.hasClass(w.bottom)?p-C.outerHeight()+r:r,s>m.top?!0:"fixed"==v.position?!0:!1}},storage:{set:function(c,e){u.debug("Setting stored value",c,e,v.storageMethod),"local"==v.storageMethod&&b.store!==d?b.store.set(c,e):a.cookie!==d?a.cookie(c,e):u.error(y.noStorage)},get:function(c){return u.debug("Getting stored value",c,v.storageMethod),"local"==v.storageMethod&&b.store!==d?b.store.get(c):a.cookie!==d?a.cookie(c):void u.error(y.noStorage)}},event:{scroll:function(){t!==d&&clearTimeout(t),t=setTimeout(function(){u.should.stick()?H(u.stick):u.unStick()},v.lag)}},setting:function(b,c){if(u.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,v,b);else{if(c===d)return v[b];v[b]=c}},internal:function(b,c){return u.debug("Changing internal",b,c),c===d?u[b]:void(a.isPlainObject(b)?a.extend(!0,u,b):u[b]=c)},debug:function(){v.debug&&(v.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,v.name+":"),u.debug.apply(console,arguments)))},verbose:function(){v.verbose&&v.debug&&(v.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),u.verbose.apply(console,arguments)))},error:function(){u.error=Function.prototype.bind.call(console.error,console,v.name+":"),u.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;v.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Element:F,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,100)},display:function(){var b=v.name+":",c=0;h=!1,clearTimeout(u.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(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(b,c,f){var g,h,i,j=G;return c=c||l,f=F||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(G===d&&u.initialize(),u.invoke(j)):(G!==d&&u.destroy(),u.initialize())}),e!==d?e:this},a.fn.nag.settings={name:"Nag",debug:!1,verbose:!0,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},position:"fixed",scrollBarWidth:18,storageMethod:"cookie",storedKey:"nag",storedValue:"dismiss",sticky:!1,lag:0,context:b,error:{noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".icon.close"},speed:500,easing:"easeOutQuad",onHide:function(){}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.popup=function(e){var f,g=a(this),h=a(c),i=g.selector||"",j=("ontouchstart"in c.documentElement,(new Date).getTime()),k=[],l=arguments[0],m="string"==typeof l,n=[].slice.call(arguments,1);return g.each(function(){var c,g,o,p=a.isPlainObject(e)?a.extend(!0,{},a.fn.popup.settings,e):a.extend({},a.fn.popup.settings),q=p.selector,r=p.className,s=p.error,t=p.metadata,u=p.namespace,v="."+p.namespace,w="module-"+u,x=a(this),y=a(p.context),z=p.target?a(p.target):x,A=a(b),B=a("body"),C=0,D=this,E=x.data(w);o={initialize:function(){o.debug("Initializing module",x),o.refresh(),"click"==p.on?x.on("click"+v,o.toggle):o.get.startEvent()&&x.on(o.get.startEvent()+v,o.event.start).on(o.get.endEvent()+v,o.event.end),p.target&&o.debug("Target set to element",z),A.on("resize"+v,o.event.resize),o.exists()?p.hoverable&&o.bind.popup():o.create(),o.instantiate()},instantiate:function(){o.verbose("Storing instance of module",o),E=o,x.data(w,E)},refresh:function(){c=p.popup?a(p.popup):p.inline?z.next(p.selector.popup):!1,g=p.popup?c.offsetParent():p.inline?z.offsetParent():B},destroy:function(){o.debug("Destroying previous module"),c&&!p.preserve&&o.remove(),x.off(v).removeData(w)},event:{start:function(){var b=a.isPlainObject(p.delay)?p.delay.show:p.delay;clearTimeout(o.hideTimer),o.showTimer=setTimeout(function(){o.is.hidden()&&o.show()},b)},end:function(){var b=a.isPlainObject(p.delay)?p.delay.hide:p.delay;clearTimeout(o.showTimer),o.hideTimer=setTimeout(function(){o.is.visible()&&o.hide()},b)},resize:function(){o.is.visible()&&o.set.position()}},create:function(){var b=x.data(t.html)||p.html,e=x.data(t.variation)||p.variation,f=x.data(t.title)||p.title,g=x.data(t.content)||x.attr("title")||p.content;b||g||f?(o.debug("Creating pop-up html"),b||(b=p.templates.popup({title:f,content:g})),c=a("
").addClass(r.popup).addClass(e).html(b),e&&c.addClass(e),p.inline?(o.verbose("Inserting popup element inline",c),c.insertAfter(x)):(o.verbose("Appending popup element to body",c),c.appendTo(y)),p.hoverable&&o.cache===d&&o.bind.popup(),a.proxy(p.onCreate,c)()):o.error(s.content,D)},toggle:function(){o.debug("Toggling pop-up"),o.is.hidden()?(o.debug("Popup is hidden, showing pop-up"),o.unbind.close(),o.hideAll(),o.show()):(o.debug("Popup is visible, hiding pop-up"),o.hide())},show:function(a){a=a||function(){},o.debug("Showing pop-up",p.transition),p.preserve||p.popup||o.refresh(),o.exists()||o.create(),c&&o.set.position()&&(o.save.conditions(),o.animate.show(a))},hide:function(a){a=a||function(){},x.removeClass(r.visible),o.unbind.close(),o.is.visible()&&(o.restore.conditions(),o.animate.hide(a))},hideAll:function(){a(q.popup).filter(":visible").popup("hide")},hideGracefully:function(b){b&&0===a(b.target).closest(q.popup).size()?(o.debug("Click occurred outside popup hiding popup"),o.hide()):o.debug("Click was inside popup, keeping popup open")},exists:function(){return c?p.inline||p.popup?0!==c.size():c.closest(y).size():!1},remove:function(){o.debug("Removing popup"),c.remove()},save:{conditions:function(){o.cache={title:x.attr("title")},o.cache.title&&x.removeAttr("title"),o.verbose("Saving original attributes",o.cache.title)}},restore:{conditions:function(){return o.cache&&o.cache.title&&(x.attr("title",o.cache.title),o.verbose("Restoring original attributes",o.cache.title)),!0}},animate:{show:function(b){b=b||function(){},x.addClass(r.visible),p.transition&&a.fn.transition!==d&&x.transition("is supported")?c.transition(p.transition+" in",p.duration,function(){o.bind.close(),a.proxy(b,D)()}):c.stop().fadeIn(p.duration,p.easing,function(){o.bind.close(),a.proxy(b,D)()}),a.proxy(p.onShow,D)()},hide:function(b){b=b||function(){},o.debug("Hiding pop-up"),p.transition&&a.fn.transition!==d&&x.transition("is supported")?c.transition(p.transition+" out",p.duration,function(){o.reset(),b()}):c.stop().fadeOut(p.duration,p.easing,function(){o.reset(),b()}),a.proxy(p.onHide,D)()}},get:{startEvent:function(){return"hover"==p.on?"mouseenter":"focus"==p.on?"focus":!1},endEvent:function(){return"hover"==p.on?"mouseleave":"focus"==p.on?"blur":!1},offstagePosition:function(){var d={top:a(b).scrollTop(),bottom:a(b).scrollTop()+a(b).height(),left:0,right:a(b).width()},e={width:c.width(),height:c.outerHeight(),position:c.offset()},f={},g=[];return e.position&&(f={top:e.position.topd.bottom,right:e.position.left+e.width>d.right,left:e.position.left0?g.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}},set:{position:function(e,f){var h,i,j=(a(b).width(),a(b).height(),z.outerWidth()),k=z.outerHeight(),l=c.width(),m=c.outerHeight(),n=g.outerWidth(),q=g.outerHeight(),u=p.distanceAway,v=p.inline||p.popup?z.position():z.offset();switch(e=e||x.data(t.position)||p.position,f=f||x.data(t.offset)||p.offset,(p.inline||p.popup)&&("left center"==e||"right center"==e?(f+=parseInt(b.getComputedStyle(D).getPropertyValue("margin-top"),10),u+=-parseInt(b.getComputedStyle(D).getPropertyValue("margin-left"),10)):(f+=parseInt(b.getComputedStyle(D).getPropertyValue("margin-left"),10),u+=parseInt(b.getComputedStyle(D).getPropertyValue("margin-top"),10))),o.debug("Calculating offset for position",e),e){case"top left":h={top:"auto",bottom:q-v.top+u,left:v.left+f,right:"auto"};break;case"top center":h={bottom:q-v.top+u,left:v.left+j/2-l/2+f,top:"auto",right:"auto"};break;case"top right":h={bottom:q-v.top+u,right:n-v.left-j-f,top:"auto",left:"auto"};break;case"left center":h={top:v.top+k/2-m/2+f,right:n-v.left+u,left:"auto",bottom:"auto"};break;case"right center":h={top:v.top+k/2-m/2+f,left:v.left+j+u,bottom:"auto",right:"auto"};break;case"bottom left":h={top:v.top+k+u,left:v.left+f,bottom:"auto",right:"auto"};break;case"bottom center":h={top:v.top+k+u,left:v.left+j/2-l/2+f,bottom:"auto",right:"auto"};break;case"bottom right":h={top:v.top+k+u,right:n-v.left-j-f,left:"auto",bottom:"auto"}}return h===d&&o.error(s.invalidPosition),c.css(h).removeClass(r.position).addClass(e).addClass(r.loading),i=o.get.offstagePosition(),i?(o.debug("Element is outside boundaries",i),C0&&(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,e){var g,h,i,j=E;return c=c||n,e=D||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},m?(E===d&&o.initialize(),o.invoke(l)):(E!==d&&o.destroy(),o.initialize())}),f!==d?f:this},a.fn.popup.settings={name:"Popup",debug:!1,verbose:!1,performance:!1,namespace:"popup",onCreate:function(){},onRemove:function(){},onShow:function(){},onHide:function(){},variation:"",content:!1,html:!1,title:!1,on:"hover",closable:!0,context:"body",position:"top left",delay:{show:50,hide:0},target:!1,popup:!1,inline:!1,preserve:!0,hoverable:!1,duration:200,easing:"easeOutQuint",transition:"scale",distanceAway:0,offset:0,maxSearchDepth:10,error:{content:"Your popup has no content specified",invalidPosition:"The position you specified is not a valid position",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",offset:"offset",position:"position",title:"title",variation:"variation"},className:{animating:"animating",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(a){var b=/[&<>"'`]/g,c=/[&<>"'`]/,d={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},e=function(a){return d[a]};return c.test(a)?a.replace(b,e):a},popup:function(b){var c="",e=a.fn.popup.settings.templates.escape;return typeof b!==d&&(typeof b.title!==d&&b.title&&(b.title=e(b.title),c+='
'+b.title+"
"),typeof b.content!==d&&b.content&&(b.content=e(b.content),c+='
'+b.content+"
")),c}}},a.extend(a.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.rating=function(b){var c,e=a(this),f=e.selector||"",g=(new Date).getTime(),h=[],i=arguments[0],j="string"==typeof i,k=[].slice.call(arguments,1);return e.each(function(){var l,m=a.isPlainObject(b)?a.extend(!0,{},a.fn.rating.settings,b):a.extend({},a.fn.rating.settings),n=m.namespace,o=m.className,p=m.metadata,q=m.selector,r=(m.error,"."+n),s="module-"+n,t=this,u=a(this).data(s),v=a(this),w=v.find(q.icon);l={initialize:function(){l.verbose("Initializing rating module",m),m.interactive?l.enable():l.disable(),m.initialRating&&(l.debug("Setting initial rating"),l.setRating(m.initialRating)),v.data(p.rating)&&(l.debug("Rating found in metadata"),l.setRating(v.data(p.rating))),l.instantiate()},instantiate:function(){l.verbose("Instantiating module",m),u=l,v.data(s,l)},destroy:function(){l.verbose("Destroying previous instance",u),v.removeData(s),w.off(r)},event:{mouseenter:function(){var b=a(this);b.nextAll().removeClass(o.hover),v.addClass(o.hover),b.addClass(o.hover).prevAll().addClass(o.hover)},mouseleave:function(){v.removeClass(o.hover),w.removeClass(o.hover)},click:function(){var b=a(this),c=l.getRating(),d=w.index(b)+1,e="auto"==m.clearable?1===w.size():m.clearable;e&&c==d?l.clearRating():l.setRating(d)}},clearRating:function(){l.debug("Clearing current rating"),l.setRating(0)},getRating:function(){var a=w.filter("."+o.active).size();return l.verbose("Current rating retrieved",a),a},enable:function(){l.debug("Setting rating to interactive mode"),w.on("mouseenter"+r,l.event.mouseenter).on("mouseleave"+r,l.event.mouseleave).on("click"+r,l.event.click),v.removeClass(o.disabled)},disable:function(){l.debug("Setting rating to read-only mode"),w.off(r),v.addClass(o.disabled)},setRating:function(b){var c=b-1>=0?b-1:0,d=w.eq(c);v.removeClass(o.hover),w.removeClass(o.hover).removeClass(o.active),b>0&&(l.verbose("Setting current rating to",b),d.addClass(o.active).prevAll().addClass(o.active)),a.proxy(m.onRate,t)(b)},setting:function(b,c){if(l.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,l,b);else{if(c===d)return l[b];l[b]=c}},debug:function(){m.debug&&(m.performance?l.performance.log(arguments):(l.debug=Function.prototype.bind.call(console.info,console,m.name+":"),l.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?l.performance.log(arguments):(l.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),l.verbose.apply(console,arguments)))},error:function(){l.error=Function.prototype.bind.call(console.error,console,m.name+":"),l.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;m.performance&&(b=(new Date).getTime(),d=g||b,c=b-d,g=b,h.push({Element:t,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(l.performance.timer),l.performance.timer=setTimeout(l.performance.display,100)},display:function(){var b=m.name+":",c=0;g=!1,clearTimeout(l.performance.timer),a.each(h,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",f&&(b+=" '"+f+"'"),e.size()>1&&(b+=" ("+e.size()+")"),(console.group!==d||console.table!==d)&&h.length>0&&(console.groupCollapsed(b),console.table?console.table(h):a.each(h,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(b,e,f){var g,h,i,j=u;return e=e||k,f=t||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,e):h!==d&&(i=h),a.isArray(c)?c.push(i):c!==d?c=[c,i]:i!==d&&(c=i),h}},j?(u===d&&l.initialize(),l.invoke(i)):(u!==d&&l.destroy(),l.initialize())}),c!==d?c:this},a.fn.rating.settings={name:"Rating",namespace:"rating",debug:!0,verbose:!0,performance:!0,initialRating:0,interactive:!0,clearable:"auto",onRate:function(){},error:{method:"The method you called is not defined"},metadata:{rating:"rating"},className:{active:"active",disabled:"disabled",hover:"hover",loading:"loading"},selector:{icon:".icon"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.search=function(c){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return a(this).each(function(){var m,n=a.extend(!0,{},a.fn.search.settings,c),o=n.className,p=n.selector,q=n.error,r=n.namespace,s="."+r,t=r+"-module",u=a(this),v=u.find(p.prompt),w=u.find(p.searchButton),x=u.find(p.results),y=(u.find(p.result),u.find(p.category),this),z=u.data(t);m={initialize:function(){m.verbose("Initializing module");var a=v[0],b=a!==d&&a.oninput!==d?"input":a!==d&&a.onpropertychange!==d?"propertychange":"keyup";v.on("focus"+s,m.event.focus).on("blur"+s,m.event.blur).on("keydown"+s,m.handleKeyboard),n.automatic&&v.on(b+s,m.search.throttle),w.on("click"+s,m.search.query),x.on("click"+s,p.result,m.results.select),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),z=m,u.data(t,m)},destroy:function(){m.verbose("Destroying instance"),u.removeData(t),v.off(s),w.off(s),x.off(s)},event:{focus:function(){u.addClass(o.focus),clearTimeout(m.timer),m.search.throttle(),m.results.show()},blur:function(){m.search.cancel(),u.removeClass(o.focus),m.timer=setTimeout(m.results.hide,n.hideDelay)}},handleKeyboard:function(b){var c,d=u.find(p.result),e=u.find(p.category),f=b.which,g={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},h=o.active,i=d.index(d.filter("."+h)),j=d.size();if(f==g.escape&&(m.verbose("Escape key pressed, blurring search field"),v.trigger("blur")),x.filter(":visible").size()>0)if(f==g.enter){if(m.verbose("Enter key pressed, selecting active result"),d.filter("."+h).size()>0)return a.proxy(m.results.select,d.filter("."+h))(b),b.preventDefault(),!1}else f==g.upArrow?(m.verbose("Up key pressed, changing active result"),c=0>i-1?i:i-1,e.removeClass(h),d.removeClass(h).eq(c).addClass(h).closest(e).addClass(h),b.preventDefault()):f==g.downArrow&&(m.verbose("Down key pressed, changing active result"),c=i+1>=j?i:i+1,e.removeClass(h),d.removeClass(h).eq(c).addClass(h).closest(e).addClass(h),b.preventDefault());else f==g.enter&&(m.verbose("Enter key pressed, executing query"),m.search.query(),w.addClass(o.down),v.one("keyup",function(){w.removeClass(o.down)}))},search:{cancel:function(){var a=u.data("xhr")||!1;a&&"resolved"!=a.state()&&(m.debug("Cancelling last search"),a.abort())},throttle:function(){var a=v.val(),b=a.length;clearTimeout(m.timer),b>=n.minCharacters?m.timer=setTimeout(m.search.query,n.searchThrottle):m.results.hide()},query:function(){var b=v.val(),c=m.search.cache.read(b);c?(m.debug("Reading result for '"+b+"' from cache"),m.results.add(c)):(m.debug("Querying for '"+b+"'"),a.isPlainObject(n.source)||a.isArray(n.source)?m.search.local(b):n.apiSettings?m.search.remote(b):a.api!==d&&a.api.settings.api.search!==d?(m.debug("Searching with default search API endpoint"),n.apiSettings={action:"search"},m.search.remote(b)):m.error(q.source),a.proxy(n.onSearchQuery,u)(b))},local:function(b){var c,d=[],e=[],f=a.isArray(n.searchFields)?n.searchFields:[n.searchFields],g=new RegExp("(?:s|^)"+b,"i"),h=new RegExp(b,"i");u.addClass(o.loading),a.each(f,function(b,c){a.each(n.source,function(b,f){"string"==typeof f[c]&&-1==a.inArray(f,d)&&-1==a.inArray(f,e)&&(g.test(f[c])?d.push(f):h.test(f[c])&&e.push(f))})}),c=m.results.generate({results:a.merge(d,e)}),u.removeClass(o.loading),m.search.cache.write(b,c),m.results.add(c)},remote:function(b){var c,d={stateContext:u,urlData:{query:b},onSuccess:function(a){c=m.results.generate(a),m.search.cache.write(b,c),m.results.add(c)},failure:m.error};m.search.cancel(),m.debug("Executing search"),a.extend(!0,d,n.apiSettings),a.api(d)},cache:{read:function(a){var b=u.data("cache");return n.cache&&"object"==typeof b&&b[a]!==d?b[a]:!1},write:function(a,b){var c=u.data("cache")!==d?u.data("cache"):{};c[a]=b,u.data("cache",c)}}},results:{generate:function(b){m.debug("Generating html from response",b);var c=n.templates[n.type],d="";return a.isPlainObject(b.results)&&!a.isEmptyObject(b.results)||a.isArray(b.results)&&b.results.length>0?(n.maxResults>0&&(b.results=a.makeArray(b.results).slice(0,n.maxResults)),a.isFunction(c)?d=c(b):m.error(q.noTemplate,!1)):d=m.message(q.noResults,"empty"),a.proxy(n.onResults,u)(b),d},add:function(b){("default"==n.onResultsAdd||"default"==a.proxy(n.onResultsAdd,x)(b))&&x.html(b),m.results.show()},show:function(){0===x.filter(":visible").size()&&v.filter(":focus").size()>0&&""!==x.html()&&(n.transition&&a.fn.transition!==d&&u.transition("is supported")?(m.debug("Showing results with css animations"),x.transition(n.transition+" in",n.duration)):(m.debug("Showing results with javascript"),x.stop().fadeIn(n.duration,n.easing)),a.proxy(n.onResultsOpen,x)())},hide:function(){x.filter(":visible").size()>0&&(n.transition&&a.fn.transition!==d&&u.transition("is supported")?(m.debug("Hiding results with css animations"),x.transition(n.transition+" out",n.duration)):(m.debug("Hiding results with javascript"),x.stop().fadeIn(n.duration,n.easing)),a.proxy(n.onResultsClose,x)())},select:function(c){m.debug("Search result selected");{var d=a(this),e=d.find(".title");e.html()}if("default"==n.onSelect||"default"==a.proxy(n.onSelect,this)(c)){var f=d.find("a[href]").eq(0),g=f.attr("href")||!1,h=f.attr("target")||!1;m.results.hide(),g&&("_blank"==h||c.ctrlKey?b.open(g):b.location.href=g)}}},message:function(a,b){return b=b||"standard",m.results.add(n.templates.message(a,b)),n.templates.message(a,b)},setting:function(b,c){if(a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},debug:function(){n.debug&&(n.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,n.name+":"),m.debug.apply(console,arguments)))},verbose:function(){n.verbose&&n.debug&&(n.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,n.name+":"),m.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;n.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Element:y,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var b=n.name+":",c=0;h=!1,clearTimeout(m.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(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(b,c,f){var g,h,i,j=z;return c=c||l,f=y||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(z===d&&m.initialize(),m.invoke(j)):(z!==d&&m.destroy(),m.initialize())}),e!==d?e:this},a.fn.search.settings={name:"Search Module",namespace:"search",debug:!1,verbose:!0,performance:!0,onSelect:"default",onResultsAdd:"default",onSearchQuery:function(){},onResults:function(){},onResultsOpen:function(){},onResultsClose:function(){},source:!1,automatic:"true",type:"simple",hideDelay:300,minCharacters:3,searchThrottle:300,maxResults:7,cache:!0,searchFields:["title","description"],transition:"scale",duration:300,easing:"easeOutExpo",apiSettings:!1,className:{active:"active",down:"down",focus:"focus",empty:"empty",loading:"loading"},error:{source:"No source or api action specified",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:{prompt:".prompt",searchButton:".search.button",results:".results",category:".category",result:".result"},templates:{escape:function(a){var b=/[&<>"'`]/g,c=/[&<>"'`]/,d={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},e=function(a){return d[a]};return c.test(a)?a.replace(b,e):a},message:function(a,b){var c=""; return a!==d&&b!==d&&(c+='
',c+="empty"==b?'
No Results
'+a+'
':'
'+a+"
",c+="
"),c},categories:function(b){var c="",e=a.fn.search.settings.templates.escape;return b.results!==d?(a.each(b.results,function(b,f){f.results!==d&&f.results.length>0&&(c+='
'+f.name+"
",a.each(f.results,function(a,b){c+='
',c+='',b.image!==d&&(b.image=e(b.image),c+='
'),c+='
',b.price!==d&&(b.price=e(b.price),c+='
'+b.price+"
"),b.title!==d&&(b.title=e(b.title),c+='
'+b.title+"
"),b.description!==d&&(c+='
'+b.description+"
"),c+="
"}),c+="
")}),b.resultPage&&(c+=''+b.resultPage.text+""),c):!1},simple:function(b){var c="";return b.results!==d?(a.each(b.results,function(a,b){c+='',b.image!==d&&(c+='
'),c+='
',b.price!==d&&(c+='
'+b.price+"
"),b.title!==d&&(c+='
'+b.title+"
"),b.description!==d&&(c+='
'+b.description+"
"),c+="
"}),b.resultPage&&(c+=''+b.resultPage.text+""),c):!1}}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.shape=function(e){var f,g=a(this),h=a("body"),i=(new Date).getTime(),j=[],k=arguments[0],l="string"==typeof k,m=[].slice.call(arguments,1),n=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};return g.each(function(){var b,o,p,q=g.selector||"",r=a.extend(!0,{},a.fn.shape.settings,e),s=r.namespace,t=r.selector,u=r.error,v=r.className,w="."+s,x="module-"+s,y=a(this),z=y.find(t.sides),A=y.find(t.side),B=!1,C=this,D=y.data(x);p={initialize:function(){p.verbose("Initializing module for",C),p.set.defaultSide(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),D=p,y.data(x,D)},destroy:function(){p.verbose("Destroying previous module for",C),y.removeData(x).off(w)},refresh:function(){p.verbose("Refreshing selector cache for",C),y=a(C),z=a(this).find(t.shape),A=a(this).find(t.side)},repaint:function(){p.verbose("Forcing repaint event");{var a=z.get(0)||c.createElement("div");a.offsetWidth}},animate:function(c,e){p.verbose("Animating box with properties",c),e=e||function(a){p.verbose("Executing animation callback"),a!==d&&a.stopPropagation(),p.reset(),p.set.active()},a.proxy(r.beforeChange,o[0])(),p.get.transitionEvent()?(p.verbose("Starting CSS animation"),y.addClass(v.animating),z.css(c).one(p.get.transitionEvent(),e),p.set.duration(r.duration),n(function(){y.addClass(v.animating),b.addClass(v.hidden)})):e()},queue:function(a){p.debug("Queueing animation of",a),z.one(p.get.transitionEvent(),function(){p.debug("Executing queued animation"),setTimeout(function(){y.shape(a)},0)})},reset:function(){p.verbose("Animating states reset"),y.removeClass(v.animating).attr("style","").removeAttr("style"),z.attr("style","").removeAttr("style"),A.attr("style","").removeAttr("style").removeClass(v.hidden),o.removeClass(v.animating).attr("style","").removeAttr("style")},is:{animating:function(){return y.hasClass(v.animating)}},set:{defaultSide:function(){b=y.find("."+r.className.active),o=b.next(t.side).size()>0?b.next(t.side):y.find(t.side).first(),B=!1,p.verbose("Active side set to",b),p.verbose("Next side set to",o)},duration:function(a){a=a||r.duration,a="number"==typeof a?a+"ms":a,p.verbose("Setting animation duration",a),z.add(A).css({"-webkit-transition-duration":a,"-moz-transition-duration":a,"-ms-transition-duration":a,"-o-transition-duration":a,"transition-duration":a})},stageSize:function(){var a=y.clone().addClass(v.loading),b=a.find("."+r.className.active),c=B?a.find(B):b.next(t.side).size()>0?b.next(t.side):a.find(t.side).first(),d={};b.removeClass(v.active),c.addClass(v.active),a.prependTo(h),d={width:c.outerWidth(),height:c.outerHeight()},a.remove(),y.css(d),p.verbose("Resizing stage to fit new content",d)},nextSide:function(a){B=a,o=y.find(a),0===o.size()&&p.error(u.side),p.verbose("Next side manually set to",o)},active:function(){p.verbose("Setting new side to active",o),A.removeClass(v.active),o.addClass(v.active),a.proxy(r.onChange,o[0])(),p.set.defaultSide()}},flip:{up:function(){p.debug("Flipping up",o),p.is.animating()?p.queue("flip up"):(p.set.stageSize(),p.stage.above(),p.animate(p.get.transform.up()))},down:function(){p.debug("Flipping down",o),p.is.animating()?p.queue("flip down"):(p.set.stageSize(),p.stage.below(),p.animate(p.get.transform.down()))},left:function(){p.debug("Flipping left",o),p.is.animating()?p.queue("flip left"):(p.set.stageSize(),p.stage.left(),p.animate(p.get.transform.left()))},right:function(){p.debug("Flipping right",o),p.is.animating()?p.queue("flip right"):(p.set.stageSize(),p.stage.right(),p.animate(p.get.transform.right()))},over:function(){p.debug("Flipping over",o),p.is.animating()?p.queue("flip over"):(p.set.stageSize(),p.stage.behind(),p.animate(p.get.transform.over()))},back:function(){p.debug("Flipping back",o),p.is.animating()?p.queue("flip back"):(p.set.stageSize(),p.stage.behind(),p.animate(p.get.transform.back()))}},get:{transform:{up:function(){var a={y:-((b.outerHeight()-o.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()-o.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()-o.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()-o.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()-o.outerWidth())/2)};return{transform:"translateX("+a.x+"px) rotateY(180deg)"}},back:function(){var a={x:-((b.outerWidth()-o.outerWidth())/2)};return{transform:"translateX("+a.x+"px) rotateY(-180deg)"}}},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(t.side).size()>0?b.next(t.side):y.find(t.side).first()}},stage:{above:function(){var a={origin:(b.outerHeight()-o.outerHeight())/2,depth:{active:o.outerHeight()/2,next:b.outerHeight()/2}};p.verbose("Setting the initial animation position as above",o,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),o.addClass(v.animating).css({display:"block",top:a.origin+"px",transform:"rotateX(90deg) translateZ("+a.depth.next+"px)"})},below:function(){var a={origin:(b.outerHeight()-o.outerHeight())/2,depth:{active:o.outerHeight()/2,next:b.outerHeight()/2}};p.verbose("Setting the initial animation position as below",o,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),o.addClass(v.animating).css({display:"block",top:a.origin+"px",transform:"rotateX(-90deg) translateZ("+a.depth.next+"px)"})},left:function(){var a={origin:(b.outerWidth()-o.outerWidth())/2,depth:{active:o.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as left",o,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),o.addClass(v.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(-90deg) translateZ("+a.depth.next+"px)"})},right:function(){var a={origin:(b.outerWidth()-o.outerWidth())/2,depth:{active:o.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as left",o,a),b.css({transform:"rotateY(0deg) translateZ("+a.depth.active+"px)"}),o.addClass(v.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(90deg) translateZ("+a.depth.next+"px)"})},behind:function(){var a={origin:(b.outerWidth()-o.outerWidth())/2,depth:{active:o.outerWidth()/2,next:b.outerWidth()/2}};p.verbose("Setting the initial animation position as behind",o,a),b.css({transform:"rotateY(0deg)"}),o.addClass(v.animating).css({display:"block",left:a.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(b,c){if(p.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,r,b);else{if(c===d)return r[b];r[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,p,b);else{if(c===d)return p[b];p[b]=c}},debug:function(){r.debug&&(r.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,r.name+":"),p.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,r.name+":"),p.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;r.performance&&(b=(new Date).getTime(),d=i||b,c=b-d,i=b,j.push({Element:C,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=r.name+":",c=0;i=!1,clearTimeout(p.performance.timer),a.each(j,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",q&&(b+=" '"+q+"'"),g.size()>1&&(b+=" ("+g.size()+")"),(console.group!==d||console.table!==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"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(b,c,e){var g,h,i,j=D;return c=c||m,e=C||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},l?(D===d&&p.initialize(),p.invoke(k)):(D!==d&&p.destroy(),p.initialize())}),f!==d?f:this},a.fn.shape.settings={name:"Shape",debug:!1,verbose:!0,performance:!0,namespace:"shape",beforeChange:function(){},onChange:function(){},duration:700,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.sidebar=function(e){var f,g=a(this),h=(a("head"),g.selector||""),i=(new Date).getTime(),j=[],k=arguments[0],l="string"==typeof k,m=[].slice.call(arguments,1),n=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};return g.each(function(){var g,o,p,q=a.isPlainObject(e)?a.extend(!0,{},a.fn.sidebar.settings,e):a.extend({},a.fn.sidebar.settings),r=q.selector,s=q.className,t=q.namespace,u=q.error,v="."+t,w="module-"+t,x=a(this),y=a(q.context),z=a("style[title="+t+"]"),A=y.children(r.sidebar),B=y.children(r.pusher),C=B.children(r.page),D=B.find(r.fixed),E=this,F=x.data(w);p={initialize:function(){p.debug("Initializing sidebar",x),o=p.get.transitionEvent(),p.is.legacy()&&(q.useLegacy=!0),p.setup.context(),n(p.setup.layout),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),F=p,x.data(w,p)},destroy:function(){p.verbose("Destroying previous module for",x),x.off(v).removeData(w)},event:{clickaway:function(b){0===x.find(b.target).size()&&0===a(b.target).filter(x).size()&&(p.verbose("User clicked on dimmed page"),p.hide())},scroll:function(b){0===x.find(b.target).size()&&0===a(b.target).filter(x).size()&&b.preventDefault()}},bind:{clickaway:function(){q.scrollLock&&a(b).on("DOMMouseScroll"+v,p.event.scroll),y.on("click"+v,p.event.clickaway).on("touchend"+v,p.event.clickaway)}},unbind:{clickaway:function(){y.off(v),q.scrollLock&&a(b).off("DOMMouseScroll"+v)}},refresh:function(){p.verbose("Refreshing selector cache"),y=a(q.context),z=a("style[title="+t+"]"),A=y.children(r.sidebar),B=y.children(r.pusher),C=B.children(r.page),D=B.find(r.fixed)},repaint:function(){p.verbose("Forcing repaint event");y[0].offsetWidth},setup:{layout:function(){0===y.find(r.pusher).size()&&(p.debug("Adding wrapper element for sidebar"),B=a('
'),C=a('
'),B.append(C),y.children().not(r.omitted).not(A).wrapAll(B)),x.prevAll(C)[0]!==C[0]&&(p.debug("Moved sidebar to correct parent element"),x.detach().prependTo(y)),p.refresh()},context:function(){p.verbose("Adding pusshable class to wrapper"),y.addClass(s.pushable)}},attachEvents:function(b,c){var d=a(b);c=a.isFunction(p[c])?p[c]:p.toggle,d.size()>0?(p.debug("Attaching sidebar events to element",b,c),d.off(v).on("click"+v,c)):p.error(u.notFound)},show:function(b){var c=q.useLegacy?p.legacyPushPage:p.pushPage;b=a.isFunction(b)?b:function(){},p.is.closed()?(q.overlay&&(p.error(u.overlay),q.transition="overlay"),"overlay"!==q.transition&&p.hideAll(),c(function(){a.proxy(b,E)(),a.proxy(q.onShow,E)()}),a.proxy(q.onChange,E)(),a.proxy(q.onVisible,E)()):p.debug("Sidebar is already visible")},hide:function(b){var c=q.useLegacy?p.legacyPullPage:p.pullPage;b=a.isFunction(b)?b:function(){},p.is.visible()&&(p.debug("Hiding sidebar",b),c(function(){a.proxy(b,E)(),a.proxy(q.onHidden,E)()}),a.proxy(q.onChange,E)(),a.proxy(q.onHide,E)())},hideAll:function(){var a=A.find("."+s.visible);a.sidebar("hide")},toggle:function(){p.verbose("Determining toggled direction"),p.is.closed()?p.show():p.hide()},pushPage:function(c){var d,e=p.get.transition(),f="safe"==e?y:"overlay"==e?x:B;c=a.isFunction(c)?c:function(){},d=function(){p.set.visible(),p.set.transition(),p.set.direction(),n(function(){p.set.inward(),p.set.pushed()})},f.on(o,function(b){b.target==f[0]&&(f.off(o),p.remove.inward(),p.bind.clickaway(),p.set.active(),a.proxy(c,E)())}),p.verbose("Adding context push state",y),"overlay"===e?n(d):(p.is.mobile()&&(x.scrollTop(0),g=a(b).scrollTop(),b.scrollTo(0,0)),p.remove.allVisible(),n(d))},pullPage:function(c){var d=p.get.transition(),e="safe"==d?y:"overlay"==d?x:B;c=a.isFunction(c)?c:function(){},p.verbose("Removing context push state",p.get.direction()),p.unbind.clickaway(),e.on(o,function(d){d.target==e[0]&&(e.off(o),p.remove.transition(),p.remove.direction(),p.remove.outward(),p.remove.visible(),p.is.mobile()&&q.returnScroll&&b.scrollTo(0,g),a.proxy(c,E)())}),n(function(){p.set.outward(),p.remove.active(),p.remove.pushed()})},legacyPushPage:function(b){var c=x.width(),d=p.get.direction(),e={};c=c||x.width(),b=a.isFunction(b)?b:function(){},e[d]=c,p.debug("Using javascript to push context",e),p.set.visible(),p.set.transition(),p.set.direction(),p.set.inward(),p.set.pushed(),y.animate(e,q.duration,q.easing,function(){p.remove.inward(),p.bind.clickaway(),p.set.active(),a.proxy(b,p)()})},legacyPullPage:function(b){var c=0,d=p.get.direction(),e={};c=c||x.width(),b=a.isFunction(b)?b:function(){},e[d]="0px",p.debug("Using javascript to pull context",e),p.unbind.clickaway(),p.set.outward(),p.remove.active(),p.remove.pushed(),y.animate(e,q.duration,q.easing,function(){p.remove.transition(),p.remove.direction(),p.remove.outward(),p.remove.visible(),a.proxy(b,p)()})},set:{active:function(){y.addClass(s.active)},direction:function(a){a=a||p.get.direction(),y.addClass(s[a])},visible:function(){x.addClass(s.visible)},transition:function(a){a=a||p.get.transition(),y.addClass(a)},inward:function(){y.addClass(s.inward)},outward:function(){y.addClass(s.outward)},pushed:function(){q.dimPage&&C.addClass(s.dimmed),y.addClass(s.pushed)}},remove:{active:function(){y.removeClass(s.active)},visible:function(){x.removeClass(s.visible)},allVisible:function(){A.hasClass(s.visible)&&(p.debug("Other sidebars visible, hiding"),A.removeClass(s.visible))},transition:function(a){a=a||p.get.transition(),y.removeClass(a)},pushed:function(){q.dimPage&&C.removeClass(s.dimmed),y.removeClass(s.pushed)},inward:function(){y.removeClass(s.inward)},outward:function(){y.removeClass(s.outward)},direction:function(a){a=a||p.get.direction(),y.removeClass(s[a])}},get:{direction:function(){return x.hasClass(s.top)?s.top:x.hasClass(s.right)?s.right:x.hasClass(s.bottom)?s.bottom:s.left},transition:function(){var a=p.get.direction();return p.is.mobile()?"auto"==q.mobileTransition?q.defaultTransition.mobile[a]:q.mobileTransition:"auto"==q.transition?q.defaultTransition.computer[a]:q.transition},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]}},is:{legacy:function(){var a,e=c.createElement("div"),f={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};c.body.insertBefore(e,null);for(var g in f)e.style[g]!==d&&(e.style[g]="translate3d(1px,1px,1px)",a=b.getComputedStyle(e).getPropertyValue(f[g]));return c.body.removeChild(e),!(a!==d&&a.length>0&&"none"!==a)},mobile:function(){var a=navigator.userAgent,b=/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,c=b.test(a);return c?(p.verbose("Browser was found to be mobile",a),!0):(p.verbose("Browser is not mobile, using regular transition",a),!1)},closed:function(){return!p.is.visible()},visible:function(){return x.hasClass(s.visible)},vertical:function(){return x.hasClass(s.top)},inward:function(){return y.hasClass(s.inward)},outward:function(){return y.hasClass(s.outward)},animating:function(){return p.is.inward()||p.is.outward()}},setting:function(b,c){if(p.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,q,b);else{if(c===d)return q[b];q[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,p,b);else{if(c===d)return p[b];p[b]=c}},debug:function(){q.debug&&(q.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,q.name+":"),p.debug.apply(console,arguments)))},verbose:function(){q.verbose&&q.debug&&(q.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,q.name+":"),p.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;q.performance&&(b=(new Date).getTime(),d=i||b,c=b-d,i=b,j.push({Element:E,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=q.name+":",c=0;i=!1,clearTimeout(p.performance.timer),a.each(j,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",h&&(b+=" '"+h+"'"),(console.group!==d||console.table!==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"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(b,c,e){var g,h,i,j=F;return c=c||m,e=E||e,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):(p.error(u.method,b),!1);j=j[e]}})),a.isFunction(h)?i=h.apply(e,c):h!==d&&(i=h),a.isArray(f)?f.push(i):f!==d?f=[f,i]:i!==d&&(f=i),h}},l?(F===d&&p.initialize(),p.invoke(k)):(F!==d&&p.destroy(),p.initialize())}),f!==d?f:this},a.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",debug:!1,verbose:!1,performance:!1,workaround:!1,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,useLegacy:!1,duration:500,easing:"easeInOutQuint",onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",bottom:"bottom",dimmed:"dimmed",inward:"show",left:"left",outward:"hide",pushable:"pushable",pushed:"pushed",right:"right",top:"top",visible:"visible"},selector:{fixed:".ui.fixed",omitted:"script, link, style, .ui.modal, .ui.nag, .ui.fixed",page:".page",pusher:".pusher",sidebar:".ui.sidebar"},error:{method:"The method you called is not defined.",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}},a.extend(a.easing,{easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c}})}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.sticky=function(c){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);return f.each(function(){var f,m,n,o=a.extend(!0,{},a.fn.sticky.settings,c),p=o.className,q=o.namespace,r=o.error,s="."+q,t="module-"+q,u=a(this),v=a(b),w=u.offsetParent(),x=a(o.scrollContext),y=(u.selector||"",u.data(t)),z=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)},A=this;n={initialize:function(){return u.is(":visible")||n.error(r.visible,u),f=o.context?a(o.context):w,0===f.size()?void n.error(r.invalidContext,o.context,u):(n.supports.sticky(),v.on("resize"+s,n.event.resize),x.on("scroll"+s,n.event.scroll),n.verbose("Initializing sticky",o,w),n.save.positions(),n.observeChanges(),void n.instantiate())},instantiate:function(){n.verbose("Storing instance of module",n),y=n,u.data(t,n)},destroy:function(){n.verbose("Destroying previous module"),n.reset(),v.off("resize",n.event.resize).off("scroll",n.event.scroll),u.removeData(t)},observeChanges:function(){var a=f[0];MutationObserver!==d&&(m=new MutationObserver(function(){clearTimeout(n.timer),n.timer=setTimeout(function(){n.verbose("DOM tree modified, updating sticky menu"),n.refresh()},200)}),m.observe(A,{childList:!0,subtree:!0}),m.observe(a,{childList:!0,subtree:!0}),n.debug("Setting up mutation observer",m))},event:{resize:function(){z(n.refresh)},scroll:function(){z(function(){n.stick(),a.proxy(o.onScroll,A)()})}},refresh:function(b){n.reset(),b&&(w=u.offsetParent()),n.save.positions(),a.proxy(o.onReposition,A)()},supports:{sticky:function(){{var b=a("
");b.get()}return b.addClass(p.supported),b.css("position").match("sticky")}},save:{scroll:function(a){n.lastScroll=a},positions:function(){var a={height:v.height()},b={margin:{top:parseInt(u.css("margin-top"),10),bottom:parseInt(u.css("margin-bottom"),10)},offset:u.offset(),width:u.outerWidth(),height:u.outerHeight()},c={offset:f.offset(),height:f.outerHeight()};n.cache={fits:b.heighta&&(b="up")),b},currentOffset:function(){return n.is.top()?parseInt(u.css("top"),10)||0:parseInt(u.css("bottom"),10)||0},offsetChange:function(a){return a=a||x.scrollTop(),n.lastScroll?Math.abs(a-n.lastScroll):0},newOffset:function(a){a=a||x.scrollTop();var b=n.get.currentOffset(),c=n.get.offsetChange(a);return Math.abs(b-c)}},set:{containerSize:function(){var a=w.get(0).tagName;"HTML"===a||"body"==a?(n.error(r.container,a,u),w=u.offsetParent()):(n.debug("Settings container size",n.cache.context.height),w.height(n.cache.context.height))},size:function(){0!==n.cache.element.height&&0!==n.cache.element.width&&u.css({width:n.cache.element.width,height:n.cache.element.height})}},is:{top:function(){return u.hasClass(p.top)},bottom:function(){return u.hasClass(p.bottom)},bound:function(){return u.hasClass(p.bound)},fixed:function(){return u.hasClass(p.fixed)}},stick:function(){var a=n.cache,b=a.fits,c=a.element,d=a.window,e=a.context,f=x.scrollTop(),g={top:f+o.offset,bottom:f+d.height+o.offset},h=n.get.direction(f),i=(n.get.currentOffset(),n.get.newOffset(f)),j=g.bottom>c.top+c.height,k=a.element.height+g.top;n.save.scroll(f),0!==c.height&&(n.is.fixed()?b?(n.is.top()&&(g.tope.bottom&&(n.debug("Top attached rail has reached bottom of container"),n.bindBottom())),n.is.bottom()&&(g.bottom-c.heighte.bottom&&(n.debug("Bottom attached rail has reached bottom of container"),n.bindBottom())),k>e.bottom&&n.bindBottom()):g.bottom>e.bottom?n.bindBottom():j?(n.is.top()&&"down"==h&&(n.debug("Stuck content at bottom edge"),i>=c.height-d.height?(u.css("top",""),n.stickBottom()):u.css("top",-i)),n.is.bottom()&&"up"==h&&(n.debug("Stuck content at top edge"),i>=c.height-d.height?(u.css("bottom",""),n.stickTop()):u.css("bottom",-i))):n.unfix():(g.top+c.height>e.bottom&&n.bindBottom(),b?n.is.bottom()?o.pushing?n.is.bound()&&g.bottom=c.top&&g.top0&&(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(b,c,f){var g,h,i,j=y;return c=c||l,f=A||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(y===d&&n.initialize(),n.invoke(j)):(y!==d&&n.destroy(),n.initialize())}),e!==d?e:this},a.fn.sticky.settings={name:"Sticky",namespace:"sticky",verbose:!1,debug:!1,performance:!1,pushing:!1,context:!1,scrollContext:b,offset:0,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{container:"Sticky element must be inside a relative container",visible:"Element is hidden, you must call refresh after element becomes visible",method:"The method you called is not defined.",invalidContext:"Context specified does not exist"},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.tab=a.fn.tab=function(c){var e,f,g=a(a.isFunction(this)?b:this),h=a.isPlainObject(c)?a.extend(!0,{},a.fn.tab.settings,c):a.extend({},a.fn.tab.settings),i=g.selector||"",j=(new Date).getTime(),k=[],l=arguments[0],m="string"==typeof l,n=[].slice.call(arguments,1);return g.each(function(){var c,o,p,q,r=h.className,s=h.metadata,t=h.selector,u=h.error,v="."+h.namespace,w="module-"+h.namespace,x=a(this),y=a(t.tabs),z={},A=!0,B=0,C=this,D=x.data(w);e={initialize:function(){e.debug("Initializing tab menu item",x),h.context&&(e.determineTabs(),e.debug("Using only tabs inside context",h.context,y)),h.auto&&(e.verbose("Setting up automatic tab retrieval from server"),h.apiSettings={url:h.path+"/{$tab}"}),a.isWindow(C)||(e.debug("Attaching tab activation events to element",x),x.on("click"+v,e.event.click)),e.instantiate()},determineTabs:function(){var b;"parent"===h.context?(x.closest("."+r.ui).size()>0?(b=x.closest("."+r.ui),e.verbose("Using closest UI element for determining parent",b)):b=x,c=b.parent(),e.verbose("Determining parent element for creating context",c)):(c=a(h.context),e.verbose("Using selector for tab context",h.context,c)),h.childrenOnly?(y=c.children(t.tabs),e.debug("Searching tab context children for tabs",c,y)):(y=c.find(t.tabs),e.debug("Searching tab context for tabs",c,y))},initializeHistory:function(){if(h.history){if(e.debug("Initializing page state"),a.address===d)return e.error(u.state),!1;if("state"==h.historyType){if(e.debug("Using HTML5 to manage state"),h.path===!1)return e.error(u.path),!1;a.address.history(!0).state(h.path)}a.address.bind("change",e.event.history.change)}},instantiate:function(){e.verbose("Storing instance of module",e),x.data(w,e)},destroy:function(){e.debug("Destroying tabs",x),x.removeData(w).off(v)},event:{click:function(b){var c=a(this).data(s.tab);c!==d?(h.history?(e.verbose("Updating page state",b),a.address.value(c)):(e.verbose("Changing tab",b),e.changeTab(c)),b.preventDefault()):e.debug("No tab specified")},history:{change:function(b){var c=b.pathNames.join("/")||e.get.initialPath(),f=h.templates.determineTitle(c)||!1;e.performance.display(),e.debug("History change event",c,b),q=b,c!==d&&e.changeTab(c),f&&a.address.title(f) }}},refresh:function(){o&&(e.debug("Refreshing tab",o),e.changeTab(o))},cache:{read:function(a){return a!==d?z[a]:!1},add:function(a,b){a=a||o,e.debug("Adding cached content for",a),z[a]=b},remove:function(a){a=a||o,e.debug("Removing cached content for",a),delete z[a]}},set:{state:function(b){a.address.value(b)}},changeTab:function(c){var d=b.history&&b.history.pushState,f=d&&h.ignoreFirstLoad&&A,g=h.auto||a.isPlainObject(h.apiSettings),i=g&&!f?e.utilities.pathToArray(c):e.get.defaultPathArray(c);c=e.utilities.arrayToPath(i),a.each(i,function(b,d){var j,k,l,m=i.slice(0,b+1),n=e.utilities.arrayToPath(m),r=e.is.tab(n),s=b+1==i.length,t=e.get.tabElement(n);return e.verbose("Looking for tab",d),r?(e.verbose("Tab was found",d),o=n,p=e.utilities.filterArray(i,m),s?l=!0:(j=i.slice(0,b+2),k=e.utilities.arrayToPath(j),l=!e.is.tab(k),l&&e.verbose("Tab parameters found",j)),l&&g?(f?(e.debug("Ignoring remote content on first tab load",n),A=!1,e.cache.add(c,t.html()),e.activate.all(n),a.proxy(h.onTabInit,t)(n,p,q),a.proxy(h.onTabLoad,t)(n,p,q)):(e.activate.navigation(n),e.content.fetch(n,c)),!1):(e.debug("Opened local tab",n),e.activate.all(n),e.cache.read(n)||(e.cache.add(n,!0),e.debug("First time tab loaded calling tab init"),a.proxy(h.onTabInit,t)(n,p,q)),a.proxy(h.onTabLoad,t)(n,p,q),void 0)):(h.history||e.error(u.missingTab,x,n),!1)})},content:{fetch:function(b,c){var f,g,i=e.get.tabElement(b),j={dataType:"html",stateContext:i,onSuccess:function(d){e.cache.add(c,d),e.content.update(b,d),b==o?(e.debug("Content loaded",b),e.activate.tab(b)):e.debug("Content loaded in background",b),a.proxy(h.onTabInit,i)(b,p,q),a.proxy(h.onTabLoad,i)(b,p,q)},urlData:{tab:c}},k=i.data(s.promise)||!1,l=k&&"pending"===k.state();c=c||b,g=e.cache.read(c),h.cache&&g?(e.debug("Showing existing content",c),e.content.update(b,g),e.activate.tab(b),a.proxy(h.onTabLoad,i)(b,p,q)):l?(e.debug("Content is already loading",c),i.addClass(r.loading)):a.api!==d?(f=a.extend(!0,{headers:{"X-Remote":!0}},h.apiSettings,j),e.debug("Retrieving remote content",c,f),a.api(f)):e.error(u.api)},update:function(a,b){e.debug("Updating html for",a);var c=e.get.tabElement(a);c.html(b)}},activate:{all:function(a){e.activate.tab(a),e.activate.navigation(a)},tab:function(a){var b=e.get.tabElement(a);e.verbose("Showing tab content for",b),b.addClass(r.active).siblings(y).removeClass(r.active+" "+r.loading)},navigation:function(a){var b=e.get.navElement(a);e.verbose("Activating tab navigation for",b,a),b.addClass(r.active).siblings(g).removeClass(r.active+" "+r.loading)}},deactivate:{all:function(){e.deactivate.navigation(),e.deactivate.tabs()},navigation:function(){g.removeClass(r.active)},tabs:function(){y.removeClass(r.active+" "+r.loading)}},is:{tab:function(a){return a!==d?e.get.tabElement(a).size()>0:!1}},get:{initialPath:function(){return g.eq(0).data(s.tab)||y.eq(0).data(s.tab)},path:function(){return a.address.value()},defaultPathArray:function(a){return e.utilities.pathToArray(e.get.defaultPath(a))},defaultPath:function(a){var b=g.filter("[data-"+s.tab+'^="'+a+'/"]').eq(0),c=b.data(s.tab)||!1;if(c){if(e.debug("Found default tab",c),B0?b:c},tab:function(){return o}},utilities:{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=o),"string"==typeof a?a.split("/"):[a]},arrayToPath:function(b){return a.isArray(b)?b.join("/"):!1}},setting:function(b,c){if(e.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,h,b);else{if(c===d)return h[b];h[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,e,b);else{if(c===d)return e[b];e[b]=c}},debug:function(){h.debug&&(h.performance?e.performance.log(arguments):(e.debug=Function.prototype.bind.call(console.info,console,h.name+":"),e.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?e.performance.log(arguments):(e.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),e.verbose.apply(console,arguments)))},error:function(){e.error=Function.prototype.bind.call(console.error,console,h.name+":"),e.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;h.performance&&(b=(new Date).getTime(),d=j||b,c=b-d,j=b,k.push({Element:C,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(e.performance.timer),e.performance.timer=setTimeout(e.performance.display,100)},display:function(){var b=h.name+":",c=0;j=!1,clearTimeout(e.performance.timer),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(b,c,g){var h,i,j,k=D;return c=c||n,g=C||g,"string"==typeof b&&k!==d&&(b=b.split(/[\. ]/),h=b.length-1,a.each(b,function(c,f){var g=c!=h?f+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(k[g])&&c!=h)k=k[g];else{if(k[g]!==d)return i=k[g],!1;if(!a.isPlainObject(k[f])||c==h)return k[f]!==d?(i=k[f],!1):(e.error(u.method,b),!1);k=k[f]}})),a.isFunction(i)?j=i.apply(g,c):i!==d&&(j=i),a.isArray(f)?f.push(j):f!==d?f=[f,j]:j!==d&&(f=j),i}},m?(D===d&&e.initialize(),e.invoke(l)):(D!==d&&e.destroy(),e.initialize())}),e&&!m&&e.initializeHistory(),f!==d?f:this},a.tab=function(c){a(b).tab(c)},a.fn.tab.settings={name:"Tab",namespace:"tab",debug:!1,verbose:!1,performance:!1,onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,ignoreFirstLoad:!1,alwaysRefresh:!1,cache:!0,apiSettings:!1,error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found for this context.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",state:"The state library has not been initialized"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active",ui:"ui"},selector:{tabs:".ui.tab"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.transition=function(){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments,k=j[0],l=[].slice.call(arguments,1),m="string"==typeof k,n=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)};return f.each(function(){var b,o,p,q,r,s,t,u,v,w,x=a(this),y=this;w={initialize:function(){b=w.get.settings.apply(y,j),w.verbose("Converted arguments into settings object",b),p=b.error,q=b.className,u=b.namespace,r=b.metadata,v="module-"+u,s=w.get.animationEvent(),t=w.get.animationName(),o=x.data(v)||w,m&&(m=w.invoke(k)),m===!1&&(w.animate(),w.instantiate())},instantiate:function(){w.verbose("Storing instance of module",w),x.data(v,o)},destroy:function(){w.verbose("Destroying previous module for",y),x.removeData(v)},refresh:function(){w.verbose("Refreshing display type on next animation"),delete o.displayType},forceRepaint:function(){w.verbose("Forcing element repaint");var a=x.parent(),b=x.next();0===b.size()?x.detach().appendTo(a):x.detach().insertBefore(b)},repaint:function(){w.verbose("Repainting element");y.offsetWidth},animate:function(a){return b=a||b,w.is.supported()?(w.debug("Preparing animation",b.animation),w.is.animating()&&b.queue?(!b.allowRepeats&&w.has.direction()&&w.is.occuring()&&o.queuing!==!0?w.error(p.repeated):w.queue(b.animation),!1):void(w.can.animate?w.set.animating(b.animation):w.error(p.noAnimation,b.animation))):(w.error(p.support),!1)},reset:function(){w.debug("Resetting animation to beginning conditions"),x.off(s),w.restore.conditions(),w.hide(),w.remove.animating()},queue:function(a){w.debug("Queueing animation of",a),o.queuing=!0,x.one(s,function(){o.queuing=!1,w.repaint(),w.animate.apply(this,b)})},complete:function(){w.verbose("CSS animation complete",b.animation),w.is.looping()||(w.is.outward()?(w.verbose("Animation is outward, hiding element"),w.restore.conditions(),w.remove.display(),w.hide(),a.proxy(b.onHide,this)()):w.is.inward()?(w.verbose("Animation is outward, showing element"),w.restore.conditions(),w.show(),a.proxy(b.onShow,this)()):w.restore.conditions(),w.remove.duration(),w.remove.animating()),a.proxy(b.complete,this)()},has:{direction:function(a){return a=a||b.animation,-1!==a.search(q.inward)||-1!==a.search(q.outward)?(w.debug("Direction already set in animation"),!0):!1}},set:{animating:function(a){a=a||b.animation,w.save.conditions(),w.can.transition()&&!w.has.direction()&&w.set.direction(),w.remove.hidden(),w.set.display(),x.addClass(q.animating).addClass(q.transition).addClass(a).one(s,w.complete),w.set.duration(b.duration),w.debug("Starting tween",b.animation,x.attr("class"))},display:function(){var a=x.css("style"),b=w.get.displayType(),c=a+";display: "+b+" !important;";"block"!==b&&(w.verbose("Setting final visibility to",b),x.attr("style",c))},direction:function(){x.is(":visible")?(w.debug("Automatically determining the direction of animation","Outward"),x.removeClass(q.inward).addClass(q.outward)):(w.debug("Automatically determining the direction of animation","Inward"),x.removeClass(q.outward).addClass(q.inward))},looping:function(){w.debug("Transition set to loop"),x.addClass(q.looping)},duration:function(a){a=a||b.duration,a="number"==typeof a?a+"ms":a,w.verbose("Setting animation duration",a),x.css({"-webkit-animation-duration":a,"-moz-animation-duration":a,"-ms-animation-duration":a,"-o-animation-duration":a,"animation-duration":a})},hidden:function(){x.addClass(q.transition).addClass(q.hidden),n(function(){"none"!==x.css("display")&&(w.verbose("Overriding default display to hide element"),x.css("display","none"))})},visible:function(){x.addClass(q.transition).addClass(q.visible)}},save:{displayType:function(a){o.displayType=a},transitionExists:function(b,c){a.fn.transition.exists[b]=c,w.verbose("Saving existence of transition",b,c)},conditions:function(){o.cache={className:x.attr("class"),style:x.attr("style")},w.verbose("Saving original attributes",o.cache)}},restore:{conditions:function(){return o.cache===d?!1:(o.cache.className?x.attr("class",o.cache.className):x.removeAttr("class"),o.cache.style?x.attr("style",o.cache.style):"block"===w.get.displayType()&&x.removeAttr("style"),w.is.looping()&&w.remove.looping(),void w.verbose("Restoring original attributes",o.cache))}},remove:{animating:function(){x.removeClass(q.animating)},display:function(){o.displayType!==d&&x.css("display","")},duration:function(){x.css({"-webkit-animation-duration":"","-moz-animation-duration":"","-ms-animation-duration":"","-o-animation-duration":"","animation-duration":""})},hidden:function(){x.removeClass(q.hidden)},visible:function(){x.removeClass(q.visible)},looping:function(){w.debug("Transitions are no longer looping"),x.removeClass(q.looping),w.forceRepaint()},transition:function(){x.removeClass(q.visible).removeClass(q.hidden)}},get:{settings:function(b,c,d){return"object"==typeof b?a.extend(!0,{},a.fn.transition.settings,b):"function"==typeof d?a.extend({},a.fn.transition.settings,{animation:b,complete:d,duration:c}):"string"==typeof c||"number"==typeof c?a.extend({},a.fn.transition.settings,{animation:b,duration:c}):"object"==typeof c?a.extend({},a.fn.transition.settings,c,{animation:b}):"function"==typeof c?a.extend({},a.fn.transition.settings,{animation:b,complete:c}):a.extend({},a.fn.transition.settings,{animation:b})},displayType:function(){return o.displayType===d&&w.can.transition(),o.displayType},transitionExists:function(b){return a.fn.transition.exists[b]},animationName:function(){var a,b=c.createElement("div"),e={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(a in e)if(b.style[a]!==d)return w.verbose("Determined animation vendor name property",e[a]),e[a];return!1},animationEvent:function(){var a,b=c.createElement("div"),e={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(a in e)if(b.style[a]!==d)return w.verbose("Determined animation vendor end event",e[a]),e[a];return!1}},can:{animate:function(){return"none"!==x.css(b.animation)?(w.debug("CSS definition found",x.css(b.animation)),!0):(w.debug("Unable to find css definition",x.attr("class")),!1)},transition:function(){var c,e,f,g,h=x.attr("class"),i=b.animation,j=w.get.transitionExists(b.animation);return(j===d||o.displayType===d)&&(w.verbose("Determining whether animation exists"),c=a("
").addClass(h).appendTo(a("body")),e=c.removeClass(q.inward).removeClass(q.outward).addClass(q.animating).addClass(q.transition).addClass(i).css(t),f=c.addClass(q.inward).css(t),g=c.attr("class",h).show().css("display"),w.verbose("Determining final display state",g),e!=f?(w.debug("Transition exists for animation",i),j=!0):(w.debug("Static animation found",i,g),j=!1),c.remove(),w.save.displayType(g),w.save.transitionExists(i,j)),j}},is:{animating:function(){return x.hasClass(q.animating)},inward:function(){return x.hasClass(q.inward)},outward:function(){return x.hasClass(q.outward)},looping:function(){return x.hasClass(q.looping)},occuring:function(a){return a=a||b.animation,x.hasClass(a)},visible:function(){return x.is(":visible")},supported:function(){return t!==!1&&s!==!1}},hide:function(){w.verbose("Hiding element"),w.remove.visible(),w.set.hidden(),w.repaint()},show:function(a){w.verbose("Showing element",a),w.remove.hidden(),w.set.visible(),w.repaint()},start:function(){w.verbose("Starting animation"),x.removeClass(q.disabled)},stop:function(){w.debug("Stopping animation"),x.addClass(q.disabled)},toggle:function(){w.debug("Toggling play status"),x.toggleClass(q.disabled)},setting:function(c,e){if(w.debug("Changing setting",c,e),a.isPlainObject(c))a.extend(!0,b,c);else{if(e===d)return b[c];b[c]=e}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,w,b);else{if(c===d)return w[b];w[b]=c}},debug:function(){b.debug&&(b.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,b.name+":"),w.debug.apply(console,arguments)))},verbose:function(){b.verbose&&b.debug&&(b.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),w.verbose.apply(console,arguments)))},error:function(){w.error=Function.prototype.bind.call(console.error,console,b.name+":"),w.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;b.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Element:y,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,100)},display:function(){var c=b.name+":",e=0;h=!1,clearTimeout(w.performance.timer),a.each(i,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",g&&(c+=" '"+g+"'"),f.size()>1&&(c+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(c),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i,j=o;return c=c||l,f=y||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h||!1}},w.initialize()}),e!==d?e:this},a.fn.transition.exists={},a.fn.transition.settings={name:"Transition",debug:!1,verbose:!0,performance:!0,namespace:"transition",complete:function(){},onShow:function(){},onHide:function(){},allowRepeats:!1,animation:"fade",duration:"500ms",queue:!0,className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"There is no css animation matching the one you specified.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(a,b,c,d){"use strict";a.fn.video=function(c){{var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments[0],k="string"==typeof j,l=[].slice.call(arguments,1);b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)}}return f.each(function(){var m,n=a.isPlainObject(c)?a.extend(!0,{},a.fn.video.settings,c):a.extend({},a.fn.video.settings),o=n.selector,p=n.className,q=n.error,r=n.metadata,s=n.namespace,t=n.templates,u="."+s,v="module-"+s,w=(a(b),a(this)),x=w.find(o.placeholder),y=w.find(o.playButton),z=w.find(o.embed),A=this,B=w.data(v);m={initialize:function(){m.debug("Initializing video"),m.create(),x.on("click"+u,m.play),y.on("click"+u,m.play),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),B=m,w.data(v,m)},create:function(){var a=w.data(r.image),b=t.video(a);w.html(b),m.refresh(),a||m.play(),m.debug("Creating html for video element",b)},destroy:function(){m.verbose("Destroying previous instance of video"),w.removeData(v).off(u),x.off(u),y.off(u)},refresh:function(){m.verbose("Refreshing selector cache"),x=w.find(o.placeholder),y=w.find(o.playButton),z=w.find(o.embed)},change:function(a,b,c){m.debug("Changing video to ",a,b,c),w.data(r.source,a).data(r.id,b).data(r.url,c),n.onChange()},reset:function(){m.debug("Clearing video embed and showing placeholder"),w.removeClass(p.active),z.html(" "),x.show(),n.onReset()},play:function(){m.debug("Playing video");var a=w.data(r.source)||!1,b=w.data(r.url)||!1,c=w.data(r.id)||!1;z.html(m.generate.html(a,c,b)),w.addClass(p.active),n.onPlay()},get:{source:function(a){return"string"!=typeof a?!1:-1!==a.search("youtube.com")?"youtube":-1!==a.search("vimeo.com")?"vimeo":!1},id:function(a){return n.regExp.youtube.test(a)?a.match(n.regExp.youtube)[1]:n.regExp.vimeo.test(a)?a.match(n.regExp.vimeo)[2]:!1}},generate:{html:function(a,b,c){m.debug("Generating embed html");var d;return a=a||n.source,b=b||n.id,a&&b||c?(a&&b||(a=m.get.source(c),b=m.get.id(c)),"vimeo"==a?d='':"youtube"==a&&(d='')):m.error(q.noVideo),d},url:function(a){var b=n.api?1:0,c="auto"===n.autoplay?w.data("image")!==d:n.autoplay,e=n.hd?1:0,f=n.showUI?1:0,g=n.showUI?0:1,h="";return"vimeo"==a&&(h="api="+b+"&title="+f+"&byline="+f+"&portrait="+f+"&autoplay="+c,n.color&&(h+="&color="+n.color)),"ustream"==a?(h="autoplay="+c,n.color&&(h+="&color="+n.color)):"youtube"==a&&(h="enablejsapi="+b+"&autoplay="+c+"&autohide="+g+"&hq="+e+"&modestbranding=1",n.color&&(h+="&color="+n.color)),h}},setting:function(b,c){if(m.debug("Changing setting",b,c),a.isPlainObject(b))a.extend(!0,n,b);else{if(c===d)return n[b];n[b]=c}},internal:function(b,c){if(a.isPlainObject(b))a.extend(!0,m,b);else{if(c===d)return m[b];m[b]=c}},debug:function(){n.debug&&(n.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,n.name+":"),m.debug.apply(console,arguments)))},verbose:function(){n.verbose&&n.debug&&(n.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,n.name+":"),m.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;n.performance&&(b=(new Date).getTime(),d=h||b,c=b-d,h=b,i.push({Element:A,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var b=n.name+":",c=0;h=!1,clearTimeout(m.performance.timer),a.each(i,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",g&&(b+=" '"+g+"'"),f.size()>1&&(b+=" ("+f.size()+")"),(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(b,c,f){var g,h,i,j=B;return c=c||l,f=A||f,"string"==typeof b&&j!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(j[f])&&c!=g)j=j[f];else{if(j[f]!==d)return h=j[f],!1;if(!a.isPlainObject(j[e])||c==g)return j[e]!==d?(h=j[e],!1):!1;j=j[e]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):e!==d?e=[e,i]:i!==d&&(e=i),h}},k?(B===d&&m.initialize(),m.invoke(j)):(B!==d&&m.destroy(),m.initialize())}),e!==d?e:this},a.fn.video.settings={name:"Video",namespace:"video",debug:!1,verbose:!0,performance:!0,metadata:{id:"id",image:"image",source:"source",url:"url"},source:!1,url:!1,id:!1,aspectRatio:16/9,onPlay:function(){},onReset:function(){},onChange:function(){},onPause:function(){},onStop:function(){},width:"auto",height:"auto",autoplay:"auto",color:"#442359",hd:!0,showUI:!1,api:!0,regExp:{youtube:/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,vimeo:/http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/},error:{noVideo:"No video specified",method:"The method you called is not defined"},className:{active:"active"},selector:{embed:".embed",placeholder:".placeholder",playButton:".play"}},a.fn.video.settings.templates={video:function(a){var b="";return a&&(b+=''),b+='
'}}}(jQuery,window,document);