You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
196 KiB

10 years ago
10 years ago
  1. /** # Semantic UI
  2. * Version: 0.16.1
  3. * http://github.com/jlukic/semantic-ui
  4. *
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. * Release Date: 10/07/2014
  11. */
  12. !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!==
  13. },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),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),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),b.topPassed?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.onTopPassed: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),b.bottomPassed?g.execute(c,e):n.once||g.remove.occurred(e),a===d?b.bottomPassed:void 0},passingReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onPassingReverse,e="passingReverse";return a&&(g.debug("Adding callback for passing reverse",a),n.onPassingReverse=a),b.passing?n.once||g.remove.occurred(e):g.get.occurred("passing")&&g.execute(c,e),a!==d?!b.passing:void 0},topVisibleReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onTopVisibleReverse,e="topVisibleReverse";return a&&(g.debug("Adding callback for top visible reverse",a),n.onTopVisibleReverse=a),b.topVisible?n.once||g.remove.occurred(e):g.get.occurred("topVisible")&&g.execute(c,e),a===d?!b.topVisible:void 0},bottomVisibleReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onBottomVisibleReverse,e="bottomVisibleReverse";return a&&(g.debug("Adding callback for bottom visible reverse",a),n.onBottomVisibleReverse=a),b.bottomVisible?n.once||g.remove.occurred(e):g.get.occurred("bottomVisible")&&g.execute(c,e),a===d?!b.bottomVisible:void 0},topPassedReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onTopPassedReverse,e="topPassedReverse";return a&&(g.debug("Adding callback for top passed reverse",a),n.onTopPassedReverse=a),b.topPassed?n.once||g.remove.occurred(e):g.get.occurred("topPassed")&&g.execute(c,e),a===d?!b.onTopPassed:void 0},bottomPassedReverse:function(a){var b=g.get.elementCalculations(),c=a||n.onBottomPassedReverse,e="bottomPassedReverse";return a&&(g.debug("Adding callback for bottom passed reverse",a),n.onBottomPassedReverse=a),b.bottomPassed?n.once||g.remove.occurred(e):g.get.occurred("bottomPassed")&&g.execute(c,e),a===d?!b.bottomPassed:void 0},execute:function(b,c){var d=g.get.elementCalculations(),e=g.get.screenCalculations();b=b||!1,b&&(n.continuous?(g.debug("Callback being called continuously",c,d),a.proxy(b,w)(d,e)):g.get.occurred(c)||(g.debug("Conditions met",c,d),a.proxy(b,w)(d,e))),g.save.occurred(c)},remove:{occurred:function(a){a?g.cache.occurred[a]!==d&&g.cache.occurred[a]===!0&&(g.debug("Callback can now be called again",a),g.cache.occurred[a]=!1):g.cache.occurred={}}},save:{occurred:function(a){a&&(g.cache.occurred[a]===d||g.cache.occurred[a]!==!0)&&(g.verbose("Saving callback occurred",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.height<b.height,offset:s.offset(),width:s.outerWidth(),height:s.outerHeight()}),g.cache.element},elementCalculations:function(){var b=g.get.screenCalculations(),c=g.get.elementPosition();n.includeMargin?a.extend(g.cache.element,{top:c.offset.top-c.margin.top,bottom:c.offset.top+c.height+c.margin.bottom}):a.extend(g.cache.element,{top:c.offset.top,bottom:c.offset.top+c.height}),a.extend(g.cache.element,{topVisible:b.bottom>=c.top,topPassed:b.top>=c.
  14. },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=g||b,c=b-d,g=b,h.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;g=!1,clearTimeout(p.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,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+='<div class="admin message">',b+='<span class="quirky ui flag team"></span>'):b+='<div class="message">',b+="<p>",b+=a.user.color!==d?'<span class="author" style="color: '+a.user.color+';">'+a.user.name+"</span>: ":'<span class="author">'+a.user.name+"</span>: ",b+=""+a.text+" </p></div>"},joined:function(a){return typeof a.name!==d?'<div class="status">'+a.name+" has joined the chat.</div>":!1},left:function(a){return typeof a.name!==d?'<div class="status">'+a.name+" has left the chat.</div>":!1},userList:function(a){var b="";return a.isAdmin&&(a.color="#55356A"),b+='<div class="user" data-id="'+a.id+'"> <div class="image"> <img src="'+a.avatarURL+'"> </div>',b+=a.color!==d?' <p><a href="/users/'+a.id+'" target="_blank" style="color: '+a.color+';">'+a.name+"</a></p>":' <p><a href="/users/'+a.id+'" target="_blank">'+a.name+"</a></p>",b+="</div>"}}}}(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,m=a.extend(!0,{},a.fn.checkbox.settings,b),n=m.className,o=m.namespace,p=m.selector,q=m.error,r="."+o,s="module-"+o,t=a(this),u=a(this).next(p.label).first(),v=a(this).find(p.input),w=t.data(s),x=this;l={initialize:function(){l.verbose("Initializing checkbox",m),t.on("click"+r,l.toggle).on("keydown"+r,p.input,l.event.keydown),l.is.checked()?(l.set.checked(),m.fireOnInit&&a.proxy(m.onChecked,v.get())()):(l.remove.checked(),m.fireOnInit&&a.proxy(m.onU
  15. }),d+="</div>"}},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.is.animating()?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({animation:w.transition+" in",duration:w.duration,complete: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 t.dimmer("is active")||t.dimmer("is animating")?(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")&&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.is.animating()?(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({ani
  16. }},setting:function(b,e){if(c.debug("Changing setting",b,e),a.isPlainObject(b))a.extend(!0,f,b);else{if(e===d)return f[b];f[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(){f.debug&&(f.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,f.name+":"),c.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),c.verbose.apply(console,arguments)))},error:function(){c.error=Function.prototype.bind.call(console.error,console,f.name+":"),c.error.apply(console,arguments)},performance:{log:function(a){var b,d,e;f.performance&&(b=(new Date).getTime(),e=h||b,d=b-e,h=b,i.push({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:w,"Execution Time":d})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,100)},display:function(){var b=f.name+":",e=0;h=!1,clearTimeout(c.performance.timer),a.each(i,function(a,b){e+=b["Execution Time"]}),b+=" "+e+"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,f,g){var h,i,j,k=x;return f=f||l,g=w||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(q.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}},k?(x===d&&c.initialize(),c.invoke(j)):(x!==d&&c.destroy(),c.initialize())}),e!==d?e:this},a.fn.progress.settings={name:"Progress",namespace:"progress",debug:!1,verbose:!0,performance:!0,random:{min:2,max:5},autoSuccess:!0,showActivity:!0,label:"percent",precision:1,percent:!1,total:!1,value:!1,onChange:function(){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}"},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(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),0===w.size()&&l.setup.layout(),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)},refresh:function(){w=v.find(q.icon)},setup:{layout:function(){var b=v.data(p.maxRating)||m.maxRating;l.debug("Generating icon html dynamically"),v.html(a.fn.rating.settings.templates.icon(b)),l.refresh()}},event:{mouseenter:function(){var b=a(this);b.nextAll().removeClass(o.selected),v.addClass(o.selected),b.addClass(o.selected).prevAll().addClass(o.selected)},mouseleave:function(){v.removeClass(o.selected),w.removeClass(o.selected)},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
  17. },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({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:E,"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.m
  18. 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({Name:a[0],Arguments:[].slice.call(a,1)||"",Element:y,"Execution Time":d})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,600)},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=n;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!==d?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"),m.reset(),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"