/* * qTip2 - Pretty powerful tooltips * http://craigsworks.com/projects/qtip2/ * * Version: nightly * Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com * * Dual licensed under MIT or GPLv2 licenses * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * * Date: Mon Apr 2 13:46:17.0000000000 2012 *//*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true *//*global window: false, jQuery: false, console: false, define: false */(function(a){typeof define==="function"&&define.amd?define(["jquery"],a):a(jQuery)})(function(a){function D(b){var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id;a.extend(c,{init:function(){d.bgiframe=a(''),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=d.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){d.bgiframe.remove(),e.unbind(f)}}),c.init()}function C(d){var e=this,f=d.options.show.modal,h=d.elements,i=h.tooltip,j="#qtip-overlay",k=".qtipmodal",l=k+d.id,n="is-modal-qtip",p=a(document.body),q;d.checks.modal={"^show.modal.(on|blur)$":function(){e.init(),h.overlay.toggle(i.is(":visible"))}},a.extend(e,{init:function(){if(!f.on)return e;q=e.create(),i.attr(n,b).css("z-index",g.modal.zindex+a(m+"["+n+"]").length).unbind(k).unbind(l).bind("tooltipshow"+k+" tooltiphide"+k,function(b,c,d){var f=b.originalEvent;if(b.target===i[0])if(f&&b.type==="tooltiphide"&&/mouse(leave|enter)/.test(f.type)&&a(f.relatedTarget).closest(q[0]).length)try{b.preventDefault()}catch(g){}else(!f||f&&!f.solo)&&e[b.type.replace("tooltip","")](b,d)}).bind("tooltipfocus"+k,function(b){if(!b.isDefaultPrevented()&&b.target===i[0]){var c=a(m).filter("["+n+"]"),d=g.modal.zindex+c.length,e=parseInt(i[0].style.zIndex,10);q[0].style.zIndex=d-1,c.each(function(){this.style.zIndex>e&&(this.style.zIndex-=1)}),c.end().filter("."+o).qtip("blur",b.originalEvent),i.addClass(o)[0].style.zIndex=d;try{b.preventDefault()}catch(f){}}}).bind("tooltiphide"+k,function(b){b.target===i[0]&&a("["+n+"]").filter(":visible").not(i).last().qtip("focus",b)}),f.escape&&a(window).unbind(l).bind("keydown"+l,function(a){a.keyCode===27&&i.hasClass(o)&&d.hide(a)}),f.blur&&h.overlay.unbind(l).bind("click"+l,function(a){i.hasClass(o)&&d.hide(a)});return e},create:function(){function d(){q.css({height:a(window).height(),width:a(window).width()})}var b=a(j);if(b.length)return h.overlay=b.insertAfter(a(m).last());q=h.overlay=a("
",{id:j.substr(1),html:"
",mousedown:function(){return c}}).insertAfter(a(m).last()),a(window).unbind(k).bind("resize"+k,d),d();return q},toggle:function(d,g,h){if(d&&d.isDefaultPrevented())return e;var j=f.effect,k=g?"show":"hide",o=q.is(":visible"),r=a("["+n+"]").filter(":visible").not(i),s;q||(q=e.create());if(q.is(":animated")&&o===g||!g&&r.length)return e;g?(q.css({left:0,top:0}),q.toggleClass("blurs",f.blur),p.bind("focusin"+l,function(b){var d=a(b.target),e=d.closest(".qtip"),f=e.length<1?c:parseInt(e[0].style.zIndex,10)>parseInt(i[0].style.zIndex,10);!f&&a(b.target).closest(m)[0]!==i[0]&&i.find("input:visible").filter(":first").focus()})):p.undelegate("*","focusin"+l),q.stop(b,c),a.isFunction(j)?j.call(q,g):j===c?q[k]():q.fadeTo(parseInt(h,10)||90,g?1:0,function(){g||a(this).hide()}),g||q.queue(function(a){q.css({left:"",top:""}),a()});return e},show:function(a,c){return e.toggle(a,b,c)},hide:function(a,b){return e.toggle(a,c,b)},destroy:function(){var b=q;b&&(b=a("["+n+"]").not(i).length<1,b?(h.overlay.remove(),a(window).unbind(k)):h.overlay.unbind(k+d.id),p.undelegate("*","focusin"+l));return i.removeAttr(n).unbind(k)}}),e.init()}function B(f,h){function w(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function v(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function u(a,b,c){b=b?b:a[a.precedance];var d=l.hasClass(q),e=k.titlebar&&a.y==="top",f=e?k.titlebar:k.content,g="border-"+b+"-width",h;l.addClass(q),h=parseInt(f.css(g),10),h=(c?h||parseInt(l.css(g),10):h)||0,l.toggleClass(q,d);return h}function t(a,d,g,h){if(k.tip){var l=i.corner.clone(),n=g.adjusted,o=f.options.position.adjust.method.split(" "),p=o[0],q=o[1]||o[0],r={left:c,top:c,x:0,y:0},s,t={},u;i.corner.fixed!==b&&(p==="shift"&&l.precedance==="x"&&n.left&&l.y!=="center"?l.precedance=l.precedance==="x"?"y":"x":p==="flip"&&n.left&&(l.x=l.x==="center"?n.left>0?"left":"right":l.x==="left"?"right":"left"),q==="shift"&&l.precedance==="y"&&n.top&&l.x!=="center"?l.precedance=l.precedance==="y"?"x":"y":q==="flip"&&n.top&&(l.y=l.y==="center"?n.top>0?"top":"bottom":l.y==="top"?"bottom":"top"),l.string()!==m.corner.string()&&(m.top!==n.top||m.left!==n.left)&&i.update(l,c)),s=i.position(l,n),s.right!==e&&(s.left=-s.right),s.bottom!==e&&(s.top=-s.bottom),s.user=Math.max(0,j.offset);if(r.left=p==="shift"&&!!n.left)l.x==="center"?t["margin-left"]=r.x=s["margin-left"]-n.left:(u=s.right!==e?[n.left,-s.left]:[-n.left,s.left],(r.x=Math.max(u[0],u[1]))>u[0]&&(g.left-=n.left,r.left=c),t[s.right!==e?"right":"left"]=r.x);if(r.top=q==="shift"&&!!n.top)l.y==="center"?t["margin-top"]=r.y=s["margin-top"]-n.top:(u=s.bottom!==e?[n.top,-s.top]:[-n.top,s.top],(r.y=Math.max(u[0],u[1]))>u[0]&&(g.top-=n.top,r.top=c),t[s.bottom!==e?"bottom":"top"]=r.y);k.tip.css(t).toggle(!(r.x&&r.y||l.x==="center"&&r.y||l.y==="center"&&r.x)),g.left-=s.left.charAt?s.user:p!=="shift"||r.top||!r.left&&!r.top?s.left:0,g.top-=s.top.charAt?s.user:q!=="shift"||r.left||!r.left&&!r.top?s.top:0,m.left=n.left,m.top=n.top,m.corner=l.clone()}}var i=this,j=f.options.style.tip,k=f.elements,l=k.tooltip,m={top:0,left:0},n={width:j.width,height:j.height},o={},p=j.border||0,r=".qtip-tip",s=!!(a("")[0]||{}).getContext;i.mimic=i.corner=d,i.border=p,i.offset=j.offset,i.size=n,f.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),f.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),f.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(s||a.browser.msie);b&&(i.create(),i.update(),l.unbind(r).bind("tooltipmove"+r,t));return b},detectCorner:function(){var a=j.corner,d=f.options.position,e=d.at,h=d.my.string?d.my.string():d.my;if(a===c||h===c&&e===c)return c;a===b?i.corner=new g.Corner(h):a.string||(i.corner=new g.Corner(a),i.corner.fixed=b),m.corner=new g.Corner(i.corner.string());return i.corner.string()!=="centercenter"},detectColours:function(b){var c,d,e,g=k.tip.css("cssText",""),h=b||i.corner,m=h[h.precedance],p="border-"+m+"-color",r="border"+m.charAt(0)+m.substr(1)+"Color",s=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,t="background-color",u="transparent",v=" !important",w=a(document.body).css("color"),x=f.elements.content.css("color"),y=k.titlebar&&(h.y==="top"||h.y==="center"&&g.position().top+n.height/2+j.offset",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),s?a("").appendTo(k.tip)[0].getContext("2d").save():(d='',k.tip.html(d+d),a("*",k.tip).bind("click mousedown",function(a){a.stopPropagation()}))},update:function(e,f){var h=k.tip,l=h.children(),q=n.width,r=n.height,t="px solid ",v="px dashed transparent",x=j.mimic,y=Math.round,z,B,C,D,E;e||(e=m.corner||i.corner),x===c?x=e:(x=new g.Corner(x),x.precedance=e.precedance,x.x==="inherit"?x.x=e.x:x.y==="inherit"?x.y=e.y:x.x===x.y&&(x[e.precedance]=e[e.precedance])),z=x.precedance,i.detectColours(e),o.border!=="transparent"&&o.border!=="#123456"?(p=u(e,d,b),j.border===0&&p>0&&(o.fill=o.border),i.border=p=j.border!==b?j.border:p):i.border=p=0,C=A(x,q,r),i.size=E=w(e),h.css(E),e.precedance==="y"?D=[y(x.x==="left"?p:x.x==="right"?E.width-q-p:(E.width-q)/2),y(x.y==="top"?E.height-r:0)]:D=[y(x.x==="left"?E.width-q:0),y(x.y==="top"?p:x.y==="bottom"?E.height-r-p:(E.height-r)/2)],s?(l.attr(E),B=l[0].getContext("2d"),B.restore(),B.save(),B.clearRect(0,0,3e3,3e3),B.translate(D[0],D[1]),B.beginPath(),B.moveTo(C[0][0],C[0][1]),B.lineTo(C[1][0],C[1][1]),B.lineTo(C[2][0],C[2][1]),B.closePath(),B.fillStyle=o.fill,B.strokeStyle=o.border,B.lineWidth=p*2,B.lineJoin="miter",B.miterLimit=100,p&&B.stroke(),B.fill()):(C="m"+C[0][0]+","+C[0][1]+" l"+C[1][0]+","+C[1][1]+" "+C[2][0]+","+C[2][1]+" xe",D[2]=p&&/^(r|b)/i.test(e.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(x.string().indexOf("center")>-1),left:D[0]-D[2]*Number(z==="x"),top:D[1]-D[2]*Number(z==="y"),width:q+p,height:r+p}).each(function(b){var c=a(this);c[c.prop?"prop":"attr"]({coordsize:q+p+" "+(r+p),path:C,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&c.html()===""&&c.html('')})),f!==c&&i.position(e)},position:function(d){var e=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===c||!e)return c;d=d||i.corner,h=d.precedance,l=w(d),m=[d.x,d.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=u(d,c,b),i=v(d),f[c]=a?p?u(d,c):0:g+(i>e?i:0))}),f[d[h]]-=l[h==="x"?"width":"height"],e.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},destroy:function(){k.tip&&k.tip.remove(),l.unbind(r)}}),i.init()}function A(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function z(d){var e=this,f=d.elements.tooltip,g=d.options.content.ajax,h=".qtip-ajax",i=/)<[^<]*)*<\/script>/gi,j=b,k=c,l;d.checks.ajax={"^content.ajax":function(a,b,c){b==="ajax"&&(g=c),b==="once"?e.init():g&&g.url?e.load():f.unbind(h)}},a.extend(e,{init:function(){g&&g.url&&f.unbind(h)[g.once?"one":"bind"]("tooltipshow"+h,e.load);return e},load:function(b,f){function r(a,b,c){!k&&a.status!==0&&d.set("content.text",b+": "+c)}function q(b){k||(m&&(b=a("
").append(b.replace(i,"")).find(m)),d.set("content.text",b))}function p(){k||(n&&(d.show(b.originalEvent),f=c),a.isFunction(g.complete)&&g.complete.apply(this,arguments))}var h=g.url.indexOf(" "),j=g.url,m,n=g.once&&!g.loading&&f;if(n)try{b.preventDefault()}catch(o){}else if(b&&b.isDefaultPrevented())return e;l&&l.abort&&l.abort(),h>-1&&(m=j.substr(h),j=j.substr(0,h)),l=a.ajax(a.extend({success:q,error:r,context:d},g,{url:j,complete:p}))},destroy:function(){l&&l.abort&&l.abort(),k=b}}),e.init()}function y(e,h){var i,j,k,l,m,n=a(this),o=a(document.body),p=this===document?o:n,q=n.metadata?n.metadata(h.metadata):d,r=h.metadata.type==="html5"&&q?q[h.metadata.name]:d,s=n.data(h.metadata.name||"qtipopts");try{s=typeof s==="string"?(new Function("return "+s))():s}catch(u){v("Unable to parse HTML5 attribute data: "+s)}l=a.extend(b,{},f.defaults,h,typeof s==="object"?w(s):d,w(r||q)),j=l.position,l.id=e;if("boolean"===typeof l.content.text){k=n.attr(l.content.attr);if(l.content.attr!==c&&k)l.content.text=k;else{v("Unable to locate content for tooltip! Aborting render of tooltip on element: ",n);return c}}j.container.length||(j.container=o),j.target===c&&(j.target=p),l.show.target===c&&(l.show.target=p),l.show.solo===b&&(l.show.solo=j.container.closest("body")),l.hide.target===c&&(l.hide.target=p),l.position.viewport===b&&(l.position.viewport=j.container),j.container=j.container.eq(0),j.at=new g.Corner(j.at),j.my=new g.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)n.qtip("destroy");else if(l.overwrite===c)return c;l.suppress&&(m=a.attr(this,"title"))&&a(this).removeAttr("title").attr(t,m),i=new x(n,l,e,!!k),a.data(this,"qtip",i),n.bind("remove.qtip-"+e+" removeqtip.qtip-"+e,function(){i.destroy()});return i}function x(r,s,v,x){function Q(){var b=[s.show.target[0],s.hide.target[0],y.rendered&&F.tooltip[0],s.position.container[0],s.position.viewport[0],window,document];y.rendered?a([]).pushStack(a.grep(b,function(a){return typeof a==="object"})).unbind(E):s.show.target.unbind(E+"-create")}function P(){function o(a){D.is(":visible")&&y.reposition(a)}function n(a){if(D.hasClass(l))return c;clearTimeout(y.timers.inactive),y.timers.inactive=setTimeout(function(){y.hide(a)},s.hide.inactive)}function k(b){if(D.hasClass(l)||B||C)return c;var f=a(b.relatedTarget||b.target),g=f.closest(m)[0]===D[0],h=f[0]===e.show[0];clearTimeout(y.timers.show),clearTimeout(y.timers.hide);if(d.target==="mouse"&&g||s.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(g||h)))try{b.preventDefault(),b.stopImmediatePropagation()}catch(i){}else s.hide.delay>0?y.timers.hide=setTimeout(function(){y.hide(b)},s.hide.delay):y.hide(b)}function j(a){if(D.hasClass(l))return c;clearTimeout(y.timers.show),clearTimeout(y.timers.hide);var d=function(){y.toggle(b,a)};s.show.delay>0?y.timers.show=setTimeout(d,s.show.delay):d()}var d=s.position,e={show:s.show.target,hide:s.hide.target,viewport:a(d.viewport),document:a(document),body:a(document.body),window:a(window)},g={show:a.trim(""+s.show.event).split(" "),hide:a.trim(""+s.hide.event).split(" ")},i=a.browser.msie&&parseInt(a.browser.version,10)===6;D.bind("mouseenter"+E+" mouseleave"+E,function(a){var b=a.type==="mouseenter";b&&y.focus(a),D.toggleClass(p,b)}),s.hide.fixed&&(e.hide=e.hide.add(D),D.bind("mouseover"+E,function(){D.hasClass(l)||clearTimeout(y.timers.hide)})),/mouse(out|leave)/i.test(s.hide.event)?s.hide.leave==="window"&&e.window.bind("mouseout"+E+" blur"+E,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&y.hide(a)}):/mouse(over|enter)/i.test(s.show.event)&&e.hide.bind("mouseleave"+E,function(a){clearTimeout(y.timers.show)}),(""+s.hide.event).indexOf("unfocus")>-1&&d.container.closest("html").bind("mousedown"+E,function(b){var c=a(b.target),d=!D.hasClass(l)&&D.is(":visible"),e=c.parents(m).filter(D[0]).length>0;c[0]!==r[0]&&c[0]!==D[0]&&!e&&!r.has(c[0]).length&&!c.attr("disabled")&&y.hide(b)}),"number"===typeof s.hide.inactive&&(e.show.bind("qtip-"+v+"-inactive",n),a.each(f.inactiveEvents,function(a,b){e.hide.add(F.tooltip).bind(b+E+"-inactive",n)})),a.each(g.hide,function(b,c){var d=a.inArray(c,g.show),f=a(e.hide);d>-1&&f.add(e.show).length===f.length||c==="unfocus"?(e.show.bind(c+E,function(a){D.is(":visible")?k(a):j(a)}),delete g.show[d]):e.hide.bind(c+E,k)}),a.each(g.show,function(a,b){e.show.bind(b+E,j)}),"number"===typeof s.hide.distance&&e.show.add(D).bind("mousemove"+E,function(a){var b=G.origin||{},c=s.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&y.hide(a)}),d.target==="mouse"&&(e.show.bind("mousemove"+E,function(a){h={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),d.adjust.mouse&&(s.hide.event&&(D.bind("mouseleave"+E,function(a){(a.relatedTarget||a.target)!==e.show[0]&&y.hide(a)}),F.target.bind("mouseenter"+E+" mouseleave"+E,function(a){G.onTarget=a.type==="mouseenter"})),e.document.bind("mousemove"+E,function(a){G.onTarget&&!D.hasClass(l)&&D.is(":visible")&&y.reposition(a||h)}))),(d.adjust.resize||e.viewport.length)&&(a.event.special.resize?e.viewport:e.window).bind("resize"+E,o),(e.viewport.length||i&&D.css("position")==="fixed")&&e.viewport.bind("scroll"+E,o)}function O(b,d){function g(b){function i(e){e&&(delete h[e.src],clearTimeout(y.timers.img[e.src]),a(e).unbind(E)),a.isEmptyObject(h)&&(y.redraw(),d!==c&&y.reposition(G.event),b())}var g,h={};if((g=f.find("img[src]:not([height]):not([width])")).length===0)return i();g.each(function(b,c){if(h[c.src]===e){var d=0,f=3;(function g(){if(c.height||c.width||d>f)return i(c);d+=1,y.timers.img[c.src]=setTimeout(g,700)})(),a(c).bind("error"+E+" load"+E,function(){i(this)}),h[c.src]=c}})}var f=F.content;if(!y.rendered||!b)return c;a.isFunction(b)&&(b=b.call(r,G.event,y)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),y.rendered<0?D.queue("fx",g):(C=0,g(a.noop));return y}function N(b,d){var e=F.title;if(!y.rendered||!b)return c;a.isFunction(b)&&(b=b.call(r,G.event,y));if(b===c||!b&&b!=="")return J(c);b.jquery&&b.length>0?e.empty().append(b.css({display:"block"})):e.html(b),y.redraw(),d!==c&&y.rendered&&D.is(":visible")&&y.reposition(G.event)}function M(a){var b=F.button,d=F.title;if(!y.rendered)return c;a?(d||L(),K()):b.remove()}function L(){var c=A+"-title";F.titlebar&&J(),F.titlebar=a("
",{"class":j+"-titlebar "+(s.style.widget?"ui-widget-header":"")}).append(F.title=a("
",{id:c,"class":j+"-title","aria-atomic":b})).insertBefore(F.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseover")}),s.content.title.button?K():y.rendered&&y.redraw()}function K(){var b=s.content.title.button,d=typeof b==="string",e=d?b:"Close tooltip";F.button&&F.button.remove(),b.jquery?F.button=b:F.button=a("",{"class":"ui-state-default ui-tooltip-close "+(s.style.widget?"":j+"-icon"),title:e,"aria-label":e}).prepend(a("",{"class":"ui-icon ui-icon-close",html:"×"})),F.button.appendTo(F.titlebar).attr("role","button").click(function(a){D.hasClass(l)||y.hide(a);return c}),y.redraw()}function J(a){F.title&&(F.titlebar.remove(),F.titlebar=F.title=F.button=d,a!==c&&y.reposition())}function I(){var a=s.style.widget;D.toggleClass(k,a).toggleClass(n,s.style.def&&!a),F.content.toggleClass(k+"-content",a),F.titlebar&&F.titlebar.toggleClass(k+"-header",a),F.button&&F.button.toggleClass(j+"-icon",!a)}function H(a){var b=0,c,d=s,e=a.split(".");while(d=d[e[b++]])b0&&!a("#"+i).length&&(D[0].id=i,F.content[0].id=i+"-content",F.title[0].id=i+"-title")},"^content.text$":function(a,b,c){O(c)},"^content.title.text$":function(a,b,c){if(!c)return J();!F.title&&c&&L(),N(c)},"^content.title.button$":function(a,b,c){M(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new g.Corner(c))},"^position.container$":function(a,b,c){y.rendered&&D.appendTo(c)},"^show.ready$":function(){y.rendered?y.toggle(b):y.render(1)},"^style.classes$":function(a,b,c){D.attr("class",j+" qtip ui-helper-reset "+c)},"^style.widget|content.title":I,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){D[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=s.position;D.attr("tracking",a.target==="mouse"&&a.adjust.mouse),Q(),P()}},a.extend(y,{render:function(d){if(y.rendered)return y;var e=s.content.text,f=s.content.title.text,h=s.position,i=a.Event("tooltiprender");a.attr(r[0],"aria-describedby",A),D=F.tooltip=a("
",{id:A,"class":j+" qtip ui-helper-reset "+n+" "+s.style.classes+" "+j+"-pos-"+s.position.my.abbrev(),width:s.style.width||"",height:s.style.height||"",tracking:h.target==="mouse"&&h.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":c,"aria-describedby":A+"-content","aria-hidden":b}).toggleClass(l,G.disabled).data("qtip",y).appendTo(s.position.container).append(F.content=a("
",{"class":j+"-content",id:A+"-content","aria-atomic":b})),y.rendered=-1,B=C=1,f&&(L(),a.isFunction(f)||N(f,c)),a.isFunction(e)||O(e,c),y.rendered=b,I(),a.each(s.events,function(b,c){a.isFunction(c)&&D.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(g,function(){this.initialize==="render"&&this(y)}),P(),D.queue("fx",function(a){i.originalEvent=G.event,D.trigger(i,[y]),B=C=0,y.redraw(),(s.show.ready||d)&&y.toggle(b,G.event,c),a()});return y},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:D.outerHeight(),width:D.outerWidth()};break;case"offset":b=g.offset(D,s.position.container);break;default:c=H(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(e,f){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(y,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=c,j=c,k=y.checks,l;"string"===typeof e?(l=e,e={},e[l]=f):e=a.extend(b,{},e),a.each(e,function(b,c){var d=H(b.toLowerCase()),f;f=d[0][d[1]],d[0][d[1]]="object"===typeof c&&c.nodeType?a(c):c,e[b]=[d[0],d[1],c,f],i=g.test(b)||i,j=h.test(b)||j}),w(s),B=C=1,a.each(e,m),B=C=0,D.is(":visible")&&y.rendered&&(i&&y.reposition(s.position.target==="mouse"?d:G.event),j&&y.redraw());return y},toggle:function(e,f){function r(){e?(a.browser.msie&&D[0].style.removeAttribute("filter"),D.css("overflow",""),"string"===typeof i.autofocus&&a(i.autofocus,D).focus(),i.target.trigger("qtip-"+v+"-inactive")):D.css({display:"",visibility:"",opacity:"",left:"",top:""}),q=a.Event("tooltip"+(e?"visible":"hidden")),q.originalEvent=f?G.event:d,D.trigger(q,[y])}if(!y.rendered)return e?y.render(1):y;var g=e?"show":"hide",i=s[g],j=D.is(":visible"),k=!f||i.target.length<2||G.target[0]===f.target,l=f&&i.target.add(f.target).length!==i.target.length,n=s.position,o=s.content,p,q;(typeof e).search("boolean|number")&&(e=!j);if(!D.is(":animated")&&j===e&&k)return y;if(f){if(/over|enter/.test(f.type)&&/out|leave/.test(G.event.type)&&s.show.target.add(f.target).length===s.show.target.length&&D.has(f.relatedTarget).length)return y;G.event=a.extend({},f)}q=a.Event("tooltip"+g),q.originalEvent=f?G.event:d,D.trigger(q,[y,90]);if(q.isDefaultPrevented())return y;a.attr(D[0],"aria-hidden",!e),e?(G.origin=a.extend({},h),y.focus(f),a.isFunction(o.text)&&O(o.text,c),a.isFunction(o.title.text)&&N(o.title.text,c),!u&&n.target==="mouse"&&n.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){h={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),u=b),y.reposition(f,arguments[2]),(q.solo=!!i.solo)&&a(m,i.solo).not(D).qtip("hide",q)):(clearTimeout(y.timers.show),delete G.origin,u&&!a(m+'[tracking="true"]:visible',i.solo).not(D).length&&(a(document).unbind("mousemove.qtip"),u=c),y.blur(f)),D.stop(l,!l),i.effect===c?(D[g](),r.call(D)):a.isFunction(i.effect)?(i.effect.call(D,y),D.queue("fx",function(a){r(),a()})):D.fadeTo(90,e?1:0,r),e&&i.target.trigger("qtip-"+v+"-inactive");return y},show:function(a){return y.toggle(b,a)},hide:function(a){return y.toggle(c,a)},focus:function(b){if(!y.rendered)return y;var c=a(m),d=parseInt(D[0].style.zIndex,10),e=f.zindex+c.length,g=a.extend({},b),h,i;D.hasClass(o)||(i=a.Event("tooltipfocus"),i.originalEvent=g,D.trigger(i,[y,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+o).qtip("blur",g)),D.addClass(o)[0].style.zIndex=e));return y},blur:function(b){var c=a.extend({},b),d;D.removeClass(o),d=a.Event("tooltipblur"),d.originalEvent=c,D.trigger(d,[y]);return y},reposition:function(b,d){if(!y.rendered||B)return y;B=1;var e=s.position.target,f=s.position,i=f.my,k=f.at,l=f.adjust,m=l.method.split(" "),n=D.outerWidth(),o=D.outerHeight(),p=0,q=0,r=a.Event("tooltipmove"),t=D.css("position")==="fixed",u=f.viewport,v={left:0,top:0},w=f.container,x=c,A=y.plugins.tip,C={horizontal:m[0],vertical:m[1]=m[1]||m[0],enabled:u.jquery&&e[0]!==window&&e[0]!==z&&l.method!=="none",left:function(a){var b=C.horizontal==="shift",c=-w.offset.left+u.offset.left+u.scrollLeft,d=i.x==="left"?n:i.x==="right"?-n:-n/2,e=k.x==="left"?p:k.x==="right"?-p:-p/2,f=A&&A.size?A.size.width||0:0,g=A&&A.corner&&A.corner.precedance==="x"&&!b?f:0,h=c-a+g,j=a+n-u.width-c+g,m=d-(i.precedance==="x"||i.x===i.y?e:0)-(k.x==="center"?p/2:0),o=i.x==="center";b?(g=A&&A.corner&&A.corner.precedance==="y"?f:0,m=(i.x==="left"?1:-1)*d-g,v.left+=h>0?h:j>0?-j:0,v.left=Math.max(-w.offset.left+u.offset.left+(g&&A.corner.x==="center"?A.offset:0),a-m,Math.min(Math.max(-w.offset.left+u.offset.left+u.width,a+m),v.left))):(h>0&&(i.x!=="left"||j>0)?v.left-=m:j>0&&(i.x!=="right"||h>0)&&(v.left-=o?-m:m),v.left!==a&&o&&(v.left-=l.x),v.leftj&&(v.left=a));return v.left-a},top:function(a){var b=C.vertical==="shift",c=-w.offset.top+u.offset.top+u.scrollTop,d=i.y==="top"?o:i.y==="bottom"?-o:-o/2,e=k.y==="top"?q:k.y==="bottom"?-q:-q/2,f=A&&A.size?A.size.height||0:0,g=A&&A.corner&&A.corner.precedance==="y"&&!b?f:0,h=c-a+g,j=a+o-u.height-c+g,m=d-(i.precedance==="y"||i.x===i.y?e:0)-(k.y==="center"?q/2:0),n=i.y==="center";b?(g=A&&A.corner&&A.corner.precedance==="x"?f:0,m=(i.y==="top"?1:-1)*d-g,v.top+=h>0?h:j>0?-j:0,v.top=Math.max(-w.offset.top+u.offset.top+(g&&A.corner.x==="center"?A.offset:0),a-m,Math.min(Math.max(-w.offset.top+u.offset.top+u.height,a+m),v.top))):(h>0&&(i.y!=="top"||j>0)?v.top-=m:j>0&&(i.y!=="bottom"||h>0)&&(v.top-=n?-m:m),v.top!==a&&n&&(v.top-=l.y),v.top<0&&-v.top>j&&(v.top=a));return v.top-a}},E;if(a.isArray(e)&&e.length===2)k={x:"left",y:"top"},v={left:e[0],top:e[1]};else if(e==="mouse"&&(b&&b.pageX||G.event.pageX))k={x:"left",y:"top"},b=(b&&(b.type==="resize"||b.type==="scroll")?G.event:b&&b.pageX&&b.type==="mousemove"?b:h&&h.pageX&&(l.mouse||!b||!b.pageX)?{pageX:h.pageX,pageY:h.pageY}:!l.mouse&&G.origin&&G.origin.pageX&&s.show.distance?G.origin:b)||b||G.event||h||{},v={top:b.pageY,left:b.pageX};else{e==="event"?b&&b.target&&b.type!=="scroll"&&b.type!=="resize"?e=G.target=a(b.target):e=G.target:e=G.target=a(e.jquery?e:F.target),e=a(e).eq(0);if(e.length===0)return y;e[0]===document||e[0]===window?(p=g.iOS?window.innerWidth:e.width(),q=g.iOS?window.innerHeight:e.height(),e[0]===window&&(v={top:(u||e).scrollTop(),left:(u||e).scrollLeft()})):e.is("area")&&g.imagemap?v=g.imagemap(e,k,C.enabled?m:c):e[0].namespaceURI==="http://www.w3.org/2000/svg"&&g.svg?v=g.svg(e,k):(p=e.outerWidth(),q=e.outerHeight(),v=g.offset(e,w)),v.offset&&(p=v.width,q=v.height,x=v.flipoffset,v=v.offset);if(g.iOS<4.1&&g.iOS>3.1||g.iOS==4.3||!g.iOS&&t)E=a(window),v.left-=E.scrollLeft(),v.top-=E.scrollTop();v.left+=k.x==="right"?p:k.x==="center"?p/2:0,v.top+=k.y==="bottom"?q:k.y==="center"?q/2:0}v.left+=l.x+(i.x==="right"?-n:i.x==="center"?-n/2:0),v.top+=l.y+(i.y==="bottom"?-o:i.y==="center"?-o/2:0),C.enabled?(u={elem:u,height:u[(u[0]===window?"h":"outerH")+"eight"](),width:u[(u[0]===window?"w":"outerW")+"idth"](),scrollLeft:t?0:u.scrollLeft(),scrollTop:t?0:u.scrollTop(),offset:u.offset()||{left:0,top:0}},w={elem:w,scrollLeft:w.scrollLeft(),scrollTop:w.scrollTop(),offset:w.offset()||{left:0,top:0}},v.adjusted={left:C.horizontal!=="none"?C.left(v.left):0,top:C.vertical!=="none"?C.top(v.top):0},v.adjusted.left+v.adjusted.top&&D.attr("class",D[0].className.replace(/ui-tooltip-pos-\w+/i,j+"-pos-"+i.abbrev())),x&&v.adjusted.left&&(v.left+=x.left),x&&v.adjusted.top&&(v.top+=x.top)):v.adjusted={left:0,top:0},r.originalEvent=a.extend({},b),D.trigger(r,[y,v,u.elem||u]);if(r.isDefaultPrevented())return y;delete v.adjusted,d===c||isNaN(v.left)||isNaN(v.top)||e==="mouse"||!a.isFunction(f.effect)?D.css(v):a.isFunction(f.effect)&&(f.effect.call(D,y,a.extend({},v)),D.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),B=0;return y},redraw:function(){if(y.rendered<1||C)return y;var a=s.position.container,b,c,d,e;C=1,s.style.height&&D.css("height",s.style.height),s.style.width?D.css("width",s.style.width):(D.css("width","").addClass(q),c=D.width()+1,d=D.css("max-width")||"",e=D.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,D.css("width",Math.round(c)).removeClass(q)),C=0;return y},disable:function(b){"boolean"!==typeof b&&(b=!D.hasClass(l)&&!G.disabled),y.rendered?(D.toggleClass(l,b),a.attr(D[0],"aria-disabled",b)):G.disabled=!!b;return y},enable:function(){return y.disable(c)},destroy:function(){var b=r[0],c=a.attr(b,t),d=r.data("qtip");y.rendered&&(D.stop(1,0).remove(),a.each(y.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(y.timers.show),clearTimeout(y.timers.hide),Q();if(!d||y===d)a.removeData(b,"qtip"),s.suppress&&c&&(a.attr(b,"title",c),r.removeAttr(t)),r.removeAttr("aria-describedby");r.unbind(".qtip-"+v),delete i[y.id];return r}})}function w(b){var e;if(!b||"object"!==typeof b)return c;if(b.metadata===d||"object"!==typeof b.metadata)b.metadata={type:b.metadata};if("content"in b){if(b.content===d||"object"!==typeof b.content||b.content.jquery)b.content={text:b.content};e=b.content.text||c,!a.isFunction(e)&&(!e&&!e.attr||e.length<1||"object"===typeof e&&!e.jquery)&&(b.content.text=c);if("title"in b.content){if(b.content.title===d||"object"!==typeof b.content.title)b.content.title={text:b.content.title};e=b.content.title.text||c,!a.isFunction(e)&&(!e&&!e.attr||e.length<1||"object"===typeof e&&!e.jquery)&&(b.content.title.text=c)}}if("position"in b)if(b.position===d||"object"!==typeof b.position)b.position={my:b.position,at:b.position};if("show"in b)if(b.show===d||"object"!==typeof b.show)b.show.jquery?b.show={target:b.show}:b.show={event:b.show};if("hide"in b)if(b.hide===d||"object"!==typeof b.hide)b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide};if("style"in b)if(b.style===d||"object"!==typeof b.style)b.style={classes:b.style};a.each(g,function(){this.sanitize&&this.sanitize(b)});return b}function v(){v.history=v.history||[],v.history.push(arguments);if("object"===typeof console){var a=console[console.warn?"warn":"log"],b=Array.prototype.slice.call(arguments),c;typeof arguments[0]==="string"&&(b[0]="qTip2: "+b[0]),c=a.apply?a.apply(console,b):a(b)}}"use strict";var b=!0,c=!1,d=null,e,f,g,h,i={},j="ui-tooltip",k="ui-widget",l="ui-state-disabled",m="div.qtip."+j,n=j+"-default",o=j+"-focus",p=j+"-hover",q=j+"-fluid",r="-31000px",s="_replacedByqTip",t="oldtitle",u;f=a.fn.qtip=function(g,h,i){var j=(""+g).toLowerCase(),k=d,l=a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):d;if(!arguments.length&&n||j==="api")return n;if("string"===typeof g){this.each(function(){var d=a.data(this,"qtip");if(!d)return b;m&&m.timeStamp&&(d.cache.event=m);if(j!=="option"&&j!=="options"||!h)d[j]&&d[j].apply(d[j],l);else if(a.isPlainObject(h)||i!==e)d.set(h,i);else{k=d.get(h);return c}});return k!==d?k:this}if("object"===typeof g||!arguments.length){n=w(a.extend(b,{},g));return f.bind.call(this,n,m)}},f.bind=function(d,j){return this.each(function(k){function r(b){function d(){p.render(typeof b==="object"||l.show.ready),m.show.add(m.hide).unbind(o)}if(p.cache.disabled)return c;p.cache.event=a.extend({},b),p.cache.target=b?a(b.target):[e],l.show.delay>0?(clearTimeout(p.timers.show),p.timers.show=setTimeout(d,l.show.delay),n.show!==n.hide&&m.hide.bind(n.hide,function(){clearTimeout(p.timers.show)})):d()}var l,m,n,o,p,q;q=a.isArray(d.id)?d.id[k]:d.id,q=!q||q===c||q.length<1||i[q]?f.nextid++:i[q]=q,o=".qtip-"+q+"-create",p=y.call(this,q,d);if(p===c)return b;l=p.options,a.each(g,function(){this.initialize==="initialize"&&this(p)}),m={show:l.show.target,hide:l.hide.target},n={show:a.trim(""+l.show.event).replace(/ /g,o+" ")+o,hide:a.trim(""+l.hide.event).replace(/ /g,o+" ")+o},/mouse(over|enter)/i.test(n.show)&&!/mouse(out|leave)/i.test(n.hide)&&(n.hide+=" mouseleave"+o),m.show.bind("mousemove"+o,function(a){h={pageX:a.pageX,pageY:a.pageY,type:"mousemove"},p.cache.onTarget=b}),m.show.bind(n.show,r),(l.show.ready||l.prerender)&&r(j)})},g=f.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();var b=a.charAt(0);this.precedance=b==="t"||b==="b"?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbrev=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b},this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone}}},offset:function(b,c){function j(a,b){d.left+=b*a.scrollLeft(),d.top+=b*a.scrollTop()}var d=b.offset(),e=b.closest("body")[0],f=c,g,h,i;if(f){do f.css("position")!=="static"&&(h=f.position(),d.left-=h.left+(parseInt(f.css("borderLeftWidth"),10)||0)+(parseInt(f.css("marginLeft"),10)||0),d.top-=h.top+(parseInt(f.css("borderTopWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0),!g&&(i=f.css("overflow"))!=="hidden"&&i!=="visible"&&(g=f));while((f=a(f[0].offsetParent)).length);g&&g[0]!==e&&j(g,1)}return d},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||c,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e&&f&&"object"===typeof f&&f.options.suppress){if(arguments.length<2)return a.attr(d,t);f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c);return this.attr(t,c)}}return a.fn["attr"+s].apply(this,arguments)},clone:function(b){var c=a([]),d="title",e=a.fn["clone"+s].apply(this,arguments);b||e.filter("["+t+"]").attr("title",function(){return a.attr(this,t)}).removeAttr(t);return e}}},a.each(g.fn,function(c,d){if(!d||a.fn[c+s])return b;var e=a.fn[c+s]=a.fn[c];a.fn[c]=function(){return d.apply(this,arguments)||e.apply(this,arguments)}}),a.ui||(a["cleanData"+s]=a.cleanData,a.cleanData=function(b){for(var c=0,d;(d=b[c])!==e;c++)try{a(d).triggerHandler("removeqtip")}catch(f){}a["cleanData"+s](b)}),f.version="nightly",f.nextid=0,f.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),f.zindex=15e3,f.defaults={prerender:c,id:c,overwrite:b,suppress:b,content:{text:b,attr:"title",title:{text:c,button:c}},position:{my:"top left",at:"bottom right",target:c,container:c,viewport:c,adjust:{x:0,y:0,mouse:b,resize:b,method:"flip flip"},effect:function(b,d,e){a(this).animate(d,{duration:200,queue:c})}},show:{target:c,event:"mouseenter",effect:b,delay:90,solo:c,ready:c,autofocus:c},hide:{target:c,event:"mouseleave",effect:b,delay:0,fixed:c,inactive:c,leave:"window",distance:c},style:{classes:"",widget:c,width:c,height:c,def:b},events:{render:d,move:d,show:d,hide:d,toggle:d,visible:d,hidden:d,focus:d,blur:d}},g.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new z(a)},g.ajax.initialize="render",g.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(b,f.defaults,{content:{ajax:{loading:b,once:b}}}),g.imagemap=function(b,c,d){function n(a,b,c){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(ga.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(ha.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}b.jquery||(b=a(b));var e=(b[0].shape||b.attr("shape")).toLowerCase(),f=(b[0].coords||b.attr("coords")).split(","),g=[],h=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),i=h.offset(),j={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},k=0,l=0,m;i.left+=Math.ceil((h.outerWidth()-h.width())/2),i.top+=Math.ceil((h.outerHeight()-h.height())/2);if(e==="poly"){k=f.length;while(k--)l=[parseInt(f[--k],10),parseInt(f[k+1],10)],l[0]>j.offset.right&&(j.offset.right=l[0]),l[0]j.offset.bottom&&(j.offset.bottom=l[1]),l[1]b.maxFinalElementLength&&(0b.minFinalElementLength&&0b.beginingElementsToLeaveOpen&& c").width(jQuery(a).find("a").width()+10);jQuery(a).append(jQuery('
').css({display:"block"})).css({background:"none"});e.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent)&&k(jQuery(a).find("."+b.overlayClass).css({width:"20px",right:"-1px"}));var d={id:c,width:jQuery(a).width(),listElement:jQuery(a).find("span"),isAnimating:false,element:jQuery(a).find("span")};jQuery(a).bind("mouseover",d,g).bind("mouseout", d,h);jQuery(a).find("a").unbind("mouseover",g).unbind("mouseout",h);a.autoInterval=setInterval(function(){clearInterval(a.autoInterval);jQuery(a).find("span").animate({width:b.previewWidth},b.timeInitialCollapse,b.easing)},150*(c-2))}})}function g(a){var f=a.data.width;jQuery(a.data.element).stop();jQuery(a.data.element).animate({width:f},{duration:b.timeExpansionAnimation,easing:b.easing,queue:!1});return!1}function h(a){jQuery(a.data.element).stop();jQuery(a.data.element).animate({width:b.previewWidth}, {duration:b.timeCompressionAnimation,easing:b.easing,queue:!1});return!1}function k(a){var b;jQuery(a).is("img")?b=jQuery(a).attr("src"):(b=e(a).css("backgroundImage"),b.match(/^url\(["']?(.*\.png)["']?\)$/i),b=RegExp.$1);e(a).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='"+b+"')"})}var b={},d={},a={},i;jQuery.fn.jBreadCrumb=function(c){b=e.extend({},e.fn.jBreadCrumb.defaults,c);return this.each(function(){d=e(this);i= "object"==typeof jQuery.easing?"easeOutQuad":"swing";a=jQuery(d).find("li");jQuery(d).find("ul").wrap('
');jQuery(d).find("ul").width(5E3);0b.minimumCompressionElements&&j())})};jQuery.fn.jBreadCrumb.defaults={maxFinalElementLength:400,minFinalElementLength:200,minimumCompressionElements:4,endElementsToLeaveOpen:1,beginingElementsToLeaveOpen:1, timeExpansionAnimation:800,timeCompressionAnimation:500,timeInitialCollapse:600,easing:i,overlayClass:"chevronOverlay",previewWidth:5}})(jQuery); // Sticky v1.0 by Daniel Raftery // http://thrivingkings.com/sticky // http://twitter.com/ThrivingKings ;(function(a){a.sticky=function(e,d,f){return a.fn.sticky(e,d,f)};a.fn.sticky=function(e,d,f){var b={speed:"fast",duplicates:!1,autoclose:5E3,position:"top-right",type:""};d&&a.extend(b,d);e||(e=this.html());var g=!0,h="no",c=Math.floor(99999*Math.random());a(".sticky-note").each(function(){a(this).html()==e&&a(this).is(":visible")&&(h="yes",b.duplicates||(g=!1));a(this).attr("id")==c&&(c=Math.floor(9999999*Math.random()))});a("body").find(".sticky-queue."+b.position).html()||a("body").append('
');g&&(a(".sticky-queue."+b.position).prepend('
'),a("#"+c).append('×'),a("#"+c).append('
'+e+"
"),d=a("#"+c).height(),a("#"+c).css("height",d),a("#"+c).slideDown(b.speed),g=!0);a(".sticky").ready(function(){b.autoclose&&a("#"+c).delay(b.autoclose).slideUp(b.speed,function(){var b=a(this).closest(".sticky-queue"), c=b.find(".sticky");a(this).remove();c.length=="1"&&b.remove()})});a(".st-close").click(function(){a("#"+a(this).attr("rel")).dequeue().slideUp(b.speed,function(){var b=a(this).closest(".sticky-queue"),c=b.find(".sticky");a(this).remove();c.length=="1"&&b.remove()})});d={id:c,duplicate:h,displayed:g,position:b.position,type:b.type};if(f)f(d);else return d}})(jQuery); (function ($) { /** * Augment jQuery prototype. */ $.fn.antiscroll = function (options) { return this.each(function () { if ($(this).data('antiscroll')) { $(this).data('antiscroll').destroy(); } $(this).data('antiscroll', new $.Antiscroll(this, options)); }); }; /** * Expose constructor. */ $.Antiscroll = Antiscroll; /** * Antiscroll pane constructor. * * @param {Element|jQuery} main pane * @parma {Object} options * @api public */ function Antiscroll (el, opts) { this.el = $(el); this.options = opts || {}; this.x = false !== this.options.x; this.y = false !== this.options.y; this.padding = undefined == this.options.padding ? 2 : this.options.padding; this.inner = this.el.find('.antiscroll-inner'); this.inner.css({ 'width': '+=' + scrollbarSize() , 'height': '+=' + scrollbarSize() }); this.refresh(); } /** * refresh scrollbars * * @api public */ Antiscroll.prototype.refresh = function() { var needHScroll = this.inner.get(0).scrollWidth > this.el.width() , needVScroll = this.inner.get(0).scrollHeight > this.el.height(); if (!this.horizontal && needHScroll && this.x) { this.horizontal = new Scrollbar.Horizontal(this); } else if (this.horizontal && !needHScroll) { this.horizontal.destroy(); this.horizontal = null } if (!this.vertical && needVScroll && this.y) { this.vertical = new Scrollbar.Vertical(this); } else if (this.vertical && !needVScroll) { this.vertical.destroy(); this.vertical = null } }; /** * Cleans up. * * @return {Antiscroll} for chaining * @api public */ Antiscroll.prototype.destroy = function () { if (this.horizontal) { this.horizontal.destroy(); this.horizontal = null } if (this.vertical) { this.vertical.destroy(); } return this; }; /** * Rebuild Antiscroll. * * @return {Antiscroll} for chaining * @api public */ Antiscroll.prototype.rebuild = function () { this.destroy(); this.inner.attr('style', ''); Antiscroll.call(this, this.el, this.options); return this; }; /** * Scrollbar constructor. * * @param {Element|jQuery} element * @api public */ function Scrollbar (pane) { this.pane = pane; this.pane.el.append(this.el); this.innerEl = this.pane.inner.get(0); this.dragging = false; this.enter = false; this.shown = false; // hovering this.pane.el.mouseenter($.proxy(this, 'mouseenter')); this.pane.el.mouseleave($.proxy(this, 'mouseleave')); // dragging this.el.mousedown($.proxy(this, 'mousedown')); // scrolling this.innerPaneScrollListener = $.proxy(this, 'scroll'); this.pane.inner.scroll(this.innerPaneScrollListener); // wheel -optional- this.innerPaneMouseWheelListener = $.proxy(this, 'mousewheel'); this.pane.inner.bind('mousewheel', this.innerPaneMouseWheelListener); // show var initialDisplay = this.pane.options.initialDisplay; if (initialDisplay !== false) { this.show(); this.hiding = setTimeout($.proxy(this, 'hide'), parseInt(initialDisplay, 10) || 3000); } } /** * Cleans up. * * @return {Scrollbar} for chaining * @api public */ Scrollbar.prototype.destroy = function () { this.el.remove(); this.pane.inner.unbind('scroll', this.innerPaneScrollListener); this.pane.inner.unbind('mousewheel', this.innerPaneMouseWheelListener); return this; }; /** * Called upon mouseenter. * * @api private */ Scrollbar.prototype.mouseenter = function () { this.enter = true; this.show(); }; /** * Called upon mouseleave. * * @api private */ Scrollbar.prototype.mouseleave = function () { this.enter = false; if (!this.dragging) { this.hide(); } } /** * Called upon wrap scroll. * * @api private */ Scrollbar.prototype.scroll = function () { if (!this.shown) { this.show(); if (!this.enter && !this.dragging) { this.hiding = setTimeout($.proxy(this, 'hide'), 1500); } } this.update(); }; /** * Called upon scrollbar mousedown. * * @api private */ Scrollbar.prototype.mousedown = function (ev) { ev.preventDefault(); this.dragging = true; this.startPageY = ev.pageY - parseInt(this.el.css('top'), 10); this.startPageX = ev.pageX - parseInt(this.el.css('left'), 10); // prevent crazy selections on IE document.onselectstart = function () { return false; }; var pane = this.pane , move = $.proxy(this, 'mousemove') , self = this $(document) .mousemove(move) .mouseup(function () { self.dragging = false; document.onselectstart = null; $(document).unbind('mousemove', move); if (!self.enter) { self.hide(); } }) }; /** * Show scrollbar. * * @api private */ Scrollbar.prototype.show = function (duration) { if (!this.shown) { this.update(); this.el.addClass('antiscroll-scrollbar-shown'); if (this.hiding) { clearTimeout(this.hiding); this.hiding = null; } this.shown = true; } }; /** * Hide scrollbar. * * @api private */ Scrollbar.prototype.hide = function () { var autoHide = this.pane.options.autoHide; if (autoHide !== false && this.shown) { // check for dragging this.el.removeClass('antiscroll-scrollbar-shown'); this.shown = false; } }; /** * Horizontal scrollbar constructor * * @api private */ Scrollbar.Horizontal = function (pane) { this.el = $('
'); Scrollbar.call(this, pane); } /** * Inherits from Scrollbar. */ inherits(Scrollbar.Horizontal, Scrollbar); /** * Updates size/position of scrollbar. * * @api private */ Scrollbar.Horizontal.prototype.update = function () { var paneWidth = this.pane.el.width() , trackWidth = paneWidth - this.pane.padding * 2 , innerEl = this.pane.inner.get(0) this.el .css('width', trackWidth * paneWidth / innerEl.scrollWidth) .css('left', trackWidth * innerEl.scrollLeft / innerEl.scrollWidth) } /** * Called upon drag. * * @api private */ Scrollbar.Horizontal.prototype.mousemove = function (ev) { var trackWidth = this.pane.el.width() - this.pane.padding * 2 , pos = ev.pageX - this.startPageX , barWidth = this.el.width() , innerEl = this.pane.inner.get(0) // minimum top is 0, maximum is the track height var y = Math.min(Math.max(pos, 0), trackWidth - barWidth) innerEl.scrollLeft = (innerEl.scrollWidth - this.pane.el.width()) * y / (trackWidth - barWidth) }; /** * Called upon container mousewheel. * * @api private */ Scrollbar.Horizontal.prototype.mousewheel = function (ev, delta, x, y) { if ((x < 0 && 0 == this.pane.inner.get(0).scrollLeft) || (x > 0 && (this.innerEl.scrollLeft + this.pane.el.width() == this.innerEl.scrollWidth))) { ev.preventDefault(); return false; } }; /** * Vertical scrollbar constructor * * @api private */ Scrollbar.Vertical = function (pane) { this.el = $('
'); Scrollbar.call(this, pane); }; /** * Inherits from Scrollbar. */ inherits(Scrollbar.Vertical, Scrollbar); /** * Updates size/position of scrollbar. * * @api private */ Scrollbar.Vertical.prototype.update = function () { var paneHeight = this.pane.el.height() , trackHeight = paneHeight - this.pane.padding * 2 , innerEl = this.innerEl this.el .css('height', trackHeight * paneHeight / innerEl.scrollHeight) .css('top', trackHeight * innerEl.scrollTop / innerEl.scrollHeight) }; /** * Called upon drag. * * @api private */ Scrollbar.Vertical.prototype.mousemove = function (ev) { var paneHeight = this.pane.el.height() , trackHeight = paneHeight - this.pane.padding * 2 , pos = ev.pageY - this.startPageY , barHeight = this.el.height() , innerEl = this.innerEl // minimum top is 0, maximum is the track height var y = Math.min(Math.max(pos, 0), trackHeight - barHeight) innerEl.scrollTop = (innerEl.scrollHeight - paneHeight) * y / (trackHeight - barHeight) }; /** * Called upon container mousewheel. * * @api private */ Scrollbar.Vertical.prototype.mousewheel = function (ev, delta, x, y) { if ((y > 0 && 0 == this.innerEl.scrollTop) || (y < 0 && (this.innerEl.scrollTop + this.pane.el.height() == this.innerEl.scrollHeight))) { ev.preventDefault(); return false; } }; /** * Cross-browser inheritance. * * @param {Function} constructor * @param {Function} constructor we inherit from * @api private */ function inherits (ctorA, ctorB) { function f() {}; f.prototype = ctorB.prototype; ctorA.prototype = new f; }; /** * Scrollbar size detection. */ var size; function scrollbarSize () { if (size === undefined) { var div = $( '
' + '
' ); $('body').append(div); var w1 = $('div', div).innerWidth(); div.css('overflow-y', 'scroll'); var w2 = $('div', div).innerWidth(); $(div).remove(); size = w1 - w2; } return size; }; })(jQuery); /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * Thanks to: Seamus Leahy for adding deltaX and deltaY * * Version: 3.0.4 * * Requires: 1.2.2+ */ (function($) { var types = ['DOMMouseScroll', 'mousewheel']; $.event.special.mousewheel = { setup: function() { if ( this.addEventListener ) { for ( var i=types.length; i; ) { this.addEventListener( types[--i], handler, false ); } } else { this.onmousewheel = handler; } }, teardown: function() { if ( this.removeEventListener ) { for ( var i=types.length; i; ) { this.removeEventListener( types[--i], handler, false ); } } else { this.onmousewheel = null; } } }; $.fn.extend({ mousewheel: function(fn) { return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); }, unmousewheel: function(fn) { return this.unbind("mousewheel", fn); } }); function handler(event) { var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; event = $.event.fix(orgEvent); event.type = "mousewheel"; // Old school scrollwheel delta if ( event.wheelDelta ) { delta = event.wheelDelta/120; } if ( event.detail ) { delta = -event.detail/3; } // New school multidimensional scroll (touchpads) deltas deltaY = delta; // Gecko if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { deltaY = 0; deltaX = -1*delta; } // Webkit if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } // Add event and delta to the front of the arguments args.unshift(event, delta, deltaX, deltaY); return $.event.handle.apply(this, args); } })(jQuery); /* * File: Scroller.min.js * Version: 1.0.2 * Author: Allan Jardine (www.sprymedia.co.uk) * * Copyright 2011 Allan Jardine, all rights reserved. * * This source file is free software, under either the GPL v2 license or a * BSD (3 point) style license, as supplied with this software. * * This source file is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. */ /* GPL v2 or BSD 3 point style @contact www.sprymedia.co.uk/contact @copyright Copyright 2011 Allan Jardine, all rights reserved. This source file is free software, under either the GPL v2 license or a BSD style license, available at: http://datatables.net/license_gpl2 http://datatables.net/license_bsd */ (function(d,i,h){var g=function(a,c){!this instanceof g?alert("Scroller warning: Scroller must be initialised with the 'new' keyword."):("undefined"==typeof c&&(c={}),this.s=d.extend({dt:a,tableTop:0,tableBottom:0,redrawTop:0,redrawBottom:0,rowHeight:null,autoHeight:!0,viewportHeight:0,viewportRows:0,stateTO:null,drawTO:null},g.oDefaults,c),this.dom={force:h.createElement("div"),scroller:null,table:null},this.s.dt.oScroller=this,this._fnConstruct())};g.prototype={fnRowToPixels:function(a){return a* this.s.rowHeight},fnPixelsToRow:function(a){return parseInt(a/this.s.rowHeight,10)},fnScrollToRow:function(a,c){var b=this.fnRowToPixels(a);"undefined"==typeof c||c?d(this.dom.scroller).animate({scrollTop:b}):d(this.dom.scroller).scrollTop(b)},fnMeasure:function(a){this.s.autoHeight&&this._fnCalcRowHeight();this.s.viewportHeight=d(this.dom.scroller).height();this.s.viewportRows=parseInt(this.s.viewportHeight/this.s.rowHeight,10)+1;this.s.dt._iDisplayLength=3*this.s.viewportRows;this.s.trace&&console.log("Row height: "+ this.s.rowHeight+" Viewport height: "+this.s.viewportHeight+" Viewport rows: "+this.s.viewportRows+" Display rows: "+this.s.dt._iDisplayLength);("undefined"==typeof a||a)&&this.s.dt.oInstance.fnDraw()},_fnConstruct:function(){var a=this;this.dom.force.style.position="absolute";this.dom.force.style.top="0px";this.dom.force.style.left="0px";this.dom.force.style.width="1px";this.dom.scroller=d("div.dataTables_scrollBody",this.s.dt.nTableWrapper)[0];this.dom.scroller.appendChild(this.dom.force);this.dom.scroller.style.position= "relative";this.dom.table=d(">table",this.dom.scroller)[0];this.dom.table.style.position="absolute";this.dom.table.style.top="0px";this.dom.table.style.left="0px";if("auto"!=this.s.rowHeight)this.s.rowHeight=!1;this.fnMeasure(!1);d(this.dom.scroller).scroll(function(){a._fnScroll.call(a)});this.s.dt.aoDrawCallback.push({fn:function(){a.s.dt.bInitialised&&a._fnDrawCallback.call(a)},sName:"Scroller"});this.s.dt.aoStateSave.push({fn:function(c,b){return b+',"iScroller":'+a.dom.scroller.scrollTop},sName:"Scroller_State"})}, _fnScroll:function(){var a=this,c=this.dom.scroller.scrollTop,b;this.s.trace&&console.log("Scroll: "+c+"px - boundaries: "+this.s.redrawTop+" / "+this.s.redrawBottom+". Showing rows "+this.fnPixelsToRow(c)+" to "+this.fnPixelsToRow(c+d(this.dom.scroller).height())+" in the viewport, with rows "+this.s.dt._iDisplayStart+" to "+this.s.dt._iDisplayEnd+" rendered by the DataTable");this._fnInfo();clearTimeout(this.s.stateTO);this.s.stateTO=setTimeout(function(){a.s.dt.oApi._fnSaveState(a.s.dt)},250); if(cthis.s.redrawBottom)if(b=parseInt(c/this.s.rowHeight,10)-this.s.viewportRows,0>b?b=0:b+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?(b=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength,0>b&&(b=0)):0!==b%2&&b++,b!=this.s.dt._iDisplayStart)this.s.tableTop=d(this.s.dt.nTable).offset().top,this.s.tableBottom=d(this.s.dt.nTable).height()+this.s.tableTop,this.s.dt.oFeatures.bServerSide?(clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(function(){a.s.dt._iDisplayStart= b;a.s.dt.oApi._fnCalculateEnd(a.s.dt);a.s.dt.oApi._fnDraw(a.s.dt)},this.s.serverWait)):(this.s.dt._iDisplayStart=b,this.s.dt.oApi._fnCalculateEnd(this.s.dt),this.s.dt.oApi._fnDraw(this.s.dt)),this.s.trace&&console.log("Scroll forcing redraw - top DT render row: "+b)},_fnDrawCallback:function(){var a=this,c=this.dom.scroller.scrollTop;this.dom.force.style.height=this.s.rowHeight*this.s.dt.fnRecordsDisplay()+"px";var b=this.s.rowHeight*this.s.dt._iDisplayStart;0===this.s.dt._iDisplayStart?b=0:this.s.dt._iDisplayStart=== this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength&&(b=this.s.rowHeight*this.s.dt._iDisplayStart);this.dom.table.style.top=b+"px";this.s.tableTop=b;this.s.tableBottom=d(this.s.dt.nTable).height()+this.s.tableTop;this.s.redrawTop=c-this.s.viewportHeight/2;this.s.redrawBottom=this.s.tableBottom-1.5*this.s.viewportHeight;this.s.trace&&console.log("Table redraw. Table top: "+b+"px Table bottom: "+this.s.tableBottom+" Scroll boundary top: "+this.s.redrawTop+" Scroll boundary bottom: "+this.s.redrawBottom+ " Rows drawn: "+this.s.dt._iDisplayLength);setTimeout(function(){a._fnInfo.call(a)},0);this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&"undefined"!=typeof this.s.dt.oLoadedState.iScroller&&(null!==this.s.dt.sAjaxSource&&2==this.s.dt.iDraw||null===this.s.dt.sAjaxSource&&1==this.s.dt.iDraw)&&setTimeout(function(){d(a.dom.scroller).scrollTop(a.s.dt.oLoadedState.iScroller);a.s.redrawTop=a.s.dt.oLoadedState.iScroller-a.s.viewportHeight/2},0)},_fnCalcRowHeight:function(){var a=h.createElement("div"), c=this.s.dt.nTable.cloneNode(!1),b=h.createElement("tbody"),e=h.createElement("tr"),f=h.createElement("td");f.innerHTML=" ";e.appendChild(f);b.appendChild(e);c.appendChild(b);a.className=this.s.dt.oClasses.sScrollBody;a.appendChild(c);h.body.appendChild(a);this.s.rowHeight=d(e).height();h.body.removeChild(a)},_fnInfo:function(){if(this.s.dt.oFeatures.bInfo){var a=this.s.dt,c=this.dom.scroller.scrollTop,b=this.fnPixelsToRow(c)+1,e=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),c=this.fnPixelsToRow(c+ d(this.dom.scroller).height()),c=fa?"0"+a:a)+":"+(10>b?"0"+b:b)+" "+c},getTime:function(){return this.formatTime(this.hour,this.minute,this.meridian)}, setTime:function(a){this.setValues(a);this.update()},updateElement:function(){this.$element.val(this.getTime())},updateWidget:function(){this.$widget.find("td.bootstrap-timepicker-hour").text(this.hour).end().find("td.bootstrap-timepicker-minute").text(10>this.minute?"0"+this.minute:this.minute).end().find("td.bootstrap-timepicker-meridian").text(this.meridian)},update:function(){this.updateElement();this.updateWidget()},updateFromElementVal:function(){var a=this.$element.val();a&&(this.setValues(a), this.updateWidget())},click:function(a){a.stopPropagation();a.preventDefault();!0!==this.disableFocus&&this.$element.focus();if(a=b(a.target).closest("a").data("action"))this[a](),this.update()},incrementHour:function(){12===this.hour?(this.hour=1,this.toggleMeridian()):this.hour+=1},decrementHour:function(){1===this.hour?(this.hour=12,this.toggleMeridian()):this.hour-=1},incrementMinute:function(){var a=this.minute+this.minuteStep-this.minute%this.minuteStep;59a?(this.decrementHour(),this.minute=a+60):this.minute=a},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM";this.update()}};b.fn.timepicker=function(a){return this.each(function(){var d=b(this),c=d.data("timepicker"),f="object"==typeof a&&a;c||d.data("timepicker",c=new e(this,f));if("string"==typeof a)c[a]()})};b.fn.timepicker.defaults={minuteStep:15,disableFocus:!1,defaultTime:"current",template:"dropdown", dropdownTemplate:'', modalTemplate:'
'}; b.fn.timepicker.Constructor=e;b(function(){b("body").on("focus.timepicker.data-api",'[data-provide="timepicker"]',function(a){var d=b(this);d.data("timepicker")||(a.preventDefault(),d.timepicker(d.data()))})})}(window.jQuery); /* ========================================================= * bootstrap-datepicker.js * http://www.eyecon.ro/bootstrap-datepicker * ========================================================= * Copyright 2012 Stefan Petre * Improvements by Andrew Rowls * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================= */ !function(e){var m=function(a,b){this.element=e(a);this.language=b.language||this.element.data("date-language")||"en";this.language=this.language in l?this.language:"en";this.format=g.parseFormat(b.format||this.element.data("date-format")||"mm/dd/yyyy");this.picker=e(g.template).appendTo("body").on({click:e.proxy(this.click,this),mousedown:e.proxy(this.mousedown,this)});this.isInput=this.element.is("input");if((this.component=this.element.is(".date")?this.element.find(".add-on"):!1)&&0===this.component.length)this.component= !1;if(this.isInput)this.element.on({focus:e.proxy(this.show,this),blur:e.proxy(this._hide,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)});else if(this.component)this.component.on("click",e.proxy(this.show,this)),a=this.element.find("input"),a.on({blur:e.proxy(this._hide,this)});else this.element.on("click",e.proxy(this.show,this));this.autoclose=!1;"autoclose"in b?this.autoclose=b.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")); switch(b.startView){case 2:case "decade":this.viewMode=this.startViewMode=2;break;case 1:case "year":this.viewMode=this.startViewMode=1;break;default:this.viewMode=this.startViewMode=0}this.weekStart=(b.weekStart||this.element.data("date-weekstart")||l[this.language].weekStart||0)%7;this.weekEnd=(this.weekStart+6)%7;this.startDate=-Infinity;this.endDate=Infinity;this.setStartDate(b.startDate||this.element.data("date-startdate"));this.setEndDate(b.endDate||this.element.data("date-enddate"));this.fillDow(); this.fillMonths();this.update();this.showMode()};m.prototype={constructor:m,show:function(a){this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();this.place();e(window).on("resize",e.proxy(this.place,this));a&&(a.stopPropagation(),a.preventDefault());if(!this.isInput)e(document).on("mousedown",e.proxy(this.hide,this));this.element.trigger({type:"show",date:this.date})},_hide:function(a){if(e.browser.msie){var b=this,c=arguments,f=function(){clearTimeout(j); a.target.focus();b.picker.off("click",f)};this.picker.on("click",f);var j=setTimeout(function(){b.hide.apply(b,c);b.picker.off("click",f)},100)}else return this.hide.apply(this,arguments)},hide:function(a){this.picker.hide();e(window).off("resize",this.place);this.viewMode=this.startViewMode;this.showMode();this.isInput||e(document).off("mousedown",this.hide);a&&a.currentTarget.value&&this.setValue();this.element.trigger({type:"hide",date:this.date})},setValue:function(){var a=g.formatDate(this.date, this.format,this.language);this.isInput?this.element.prop("value",a):(this.component&&this.element.find("input").prop("value",a),this.element.data("date",a))},setStartDate:function(a){this.startDate=a||-Infinity;-Infinity!==this.startDate&&(this.startDate=g.parseDate(this.startDate,this.format,this.language));this.update();this.updateNavArrows()},setEndDate:function(a){this.endDate=a||Infinity;Infinity!==this.endDate&&(this.endDate=g.parseDate(this.endDate,this.format,this.language));this.update(); this.updateNavArrows()},place:function(){var a=this.component?this.component.offset():this.element.offset(),b=e(window).width()-a.left,c=this.component?this.component.outerWidth():0;208>b?this.picker.addClass("dp_right").css({top:a.top+this.height,right:b-c,left:"auto"}):this.picker.css({top:a.top+this.height,left:a.left})},update:function(){this.date=g.parseDate(this.isInput?this.element.prop("value"):this.element.data("date"),this.format,this.language);this.viewDate=this.datethis.endDate?new Date(this.endDate):new Date(this.date);this.fill()},fillDow:function(){for(var a=this.weekStart,b="";a'+l[this.language].daysMin[a++%7]+"";this.picker.find(".datepicker-days thead").append(b+"")},fillMonths:function(){for(var a="",b=0;12>b;)a+=''+l[this.language].monthsShort[b++]+"";this.picker.find(".datepicker-months td").html(a)},fill:function(){var a=new Date(this.viewDate),b=a.getFullYear(), c=a.getMonth(),a=-Infinity!==this.startDate?this.startDate.getFullYear():-Infinity,f=-Infinity!==this.startDate?this.startDate.getMonth():-Infinity,e=Infinity!==this.endDate?this.endDate.getFullYear():Infinity,i=Infinity!==this.endDate?this.endDate.getMonth():Infinity,h=this.date.valueOf();this.picker.find(".datepicker-days th:eq(1)").text(l[this.language].months[c]+" "+b);this.updateNavArrows();this.fillMonths();var d=new Date(b,c-1,28,0,0,0,0),n=g.getDaysInMonth(d.getFullYear(),d.getMonth());d.setDate(n); d.setDate(n-(d.getDay()-this.weekStart+7)%7);n=new Date(d);n.setDate(n.getDate()+42);n=n.valueOf();html=[];for(var k;d.valueOf()");k="";if(d.getFullYear()b||d.getFullYear()==b&&d.getMonth()>c)k+=" new";d.valueOf()==h&&(k+=" active");if(d.valueOf()this.endDate)k+=" disabled";html.push(''+d.getDate()+"");d.getDay()==this.weekEnd&& html.push("");d.setDate(d.getDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(html.join(""));c=this.date.getFullYear();h=this.picker.find(".datepicker-months").find("th:eq(1)").text(b).end().find("span").removeClass("active");c==b&&h.eq(this.date.getMonth()).addClass("active");(be)&&h.addClass("disabled");b==a&&h.slice(0,f).addClass("disabled");b==e&&h.slice(i+1).addClass("disabled");html="";b=10*parseInt(b/10,10);f=this.picker.find(".datepicker-years").find("th:eq(1)").text(b+ "-"+(b+9)).end().find("td");b-=1;for(i=-1;11>i;i++)html+='e?" disabled":"")+'">'+b+"",b+=1;f.html(html)},updateNavArrows:function(){var a=new Date(this.viewDate),b=a.getFullYear(),a=a.getMonth();switch(this.viewMode){case 0:-Infinity!==this.startDate&&b<=this.startDate.getFullYear()&&a<=this.startDate.getMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});Infinity!== this.endDate&&b>=this.endDate.getFullYear()&&a>=this.endDate.getMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:-Infinity!==this.startDate&&b<=this.startDate.getFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),Infinity!==this.endDate&&b>=this.endDate.getFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}, click:function(a){a.stopPropagation();a.preventDefault();a=e(a.target).closest("span, td, th");if(1==a.length)switch(a[0].nodeName.toLowerCase()){case "th":switch(a[0].className){case "switch":this.showMode(1);break;case "prev":case "next":var b=g.modes[this.viewMode].navStep*("prev"==a[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,b);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,b)}this.fill()}break;case "span":if(!a.is(".disabled")){if(a.is(".month")){var c= a.parent().find("span").index(a);this.viewDate.setMonth(c)}else{var f=parseInt(a.text(),10)||0;this.viewDate.setFullYear(f)}this.showMode(-1);this.fill()}break;case "td":if(a.is(".day")&&!a.is(".disabled")){var j=parseInt(a.text(),10)||1,f=this.viewDate.getFullYear(),c=this.viewDate.getMonth();a.is(".old")?0==c?(c=11,f-=1):c-=1:a.is(".new")&&(11==c?(c=0,f+=1):c+=1);this.date=new Date(f,c,j,0,0,0,0);this.viewDate=new Date(f,c,j,0,0,0,0);this.fill();this.setValue();this.element.trigger({type:"changeDate", date:this.date});this.isInput?b=this.element:this.component&&(b=this.element.find("input"));b&&(b.change(),this.autoclose&&b.blur())}}},mousedown:function(a){a.stopPropagation();a.preventDefault()},moveMonth:function(a,b){if(!b)return a;var c=new Date(a.valueOf()),e=c.getDate(),j=c.getMonth(),i=Math.abs(b),h,b=0h||11div").hide().filter(".datepicker-"+g.modes[this.viewMode].clsName).show();this.updateNavArrows()}};e.fn.datepicker=function(a){var b=Array.apply(null, arguments);b.shift();return this.each(function(){var c=e(this),f=c.data("datepicker"),j="object"==typeof a&&a;f||c.data("datepicker",f=new m(this,e.extend({},e.fn.datepicker.defaults,j)));"string"==typeof a&&f[a].apply(f,b)})};e.fn.datepicker.defaults={};e.fn.datepicker.Constructor=m;var l=e.fn.datepicker.dates={en:{days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),daysShort:"Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),daysMin:"Su Mo Tu We Th Fr Sa Su".split(" "),months:"January February March April May June July August September October November December".split(" "), monthsShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}},g={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return 0===a%4&&0!==a%100||0===a%400},getDaysInMonth:function(a,b){return[31,g.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts, "\x00").split("\x00"),a=a.match(this.validParts);if(!b||!b.length||!a||0==a.length)throw Error("Invalid date format.");return{separators:b,parts:a}},parseDate:function(a,b,c){if(a instanceof Date)return a;if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(a)){for(var f=/([-+]\d+)([dmwy])/,j=a.match(/([-+]\d+)([dmwy])/g),i,h,a=new Date,d=0;dc.d?"0":"")+c.d;c.mm=(10>c.m?"0":"")+c.m;for(var a=[],f=e.extend([],b.separators),g=0,i=b.parts.length;g',contTemplate:''}; g.template='"}(window.jQuery); (function($){var methods={getSerializedTags:function(){var currentTags=[];$(this).find("li.tagItem").each(function(i,e){currentTags.push($(e).text())});return currentTags.join(',')},getTags:function(){var currentTags=[];$(this).find("li.tagItem").each(function(i,e){currentTags.push($(e).text())});return currentTags},version:function(){return"1.3.0"}};$.fn.tagHandler=function(options){if(typeof(options)=='object'||typeof(options)=='undefined'){var opts=$.extend({},$.fn.tagHandler.defaults,options);debug($(this),opts);return this.each(function(){if(!$(this).is('ul')){return true}var tagContainer=this;var tagContainerObject=$(tagContainer);if(!tagContainer.id){var d=new Date();tagContainer.id=d.getTime()}tagContainerObject.wrap('
');tagContainerObject.addClass(opts.className+"Container");if(opts.allowEdit){tagContainerObject.html('
  • ')}var inputField=tagContainerObject.find(".tagInputField");var tags=[];tags.availableTags=[];tags.originalTags=[];tags.assignedTags=[];if(opts.updateURL!==''){if(!opts.autoUpdate){$("
    ").attr({id:tagContainer.id+"_save",title:"Save Tags"}).addClass("tagUpdate").click(function(){saveTags(tags,opts,tagContainer.id)}).appendTo(tagContainerObject.parent())}$("
    ").attr({id:tagContainer.id+"_loader",title:"Saving Tags"}).addClass("tagLoader").appendTo(tagContainerObject.parent())}if(opts.getURL!==''&&opts.initLoad){$.ajax({url:opts.getURL,cache:false,data:opts.getData,dataType:'json',success:function(data,text,xhr){if(data.availableTags.length){tags.availableTags=data.availableTags.slice();tags.originalTags=tags.availableTags.slice()}if(opts.sortTags){tags=sortTags(tags)}if(data.assignedTags.length){tags.assignedTags=data.assignedTags.slice();if(opts.sortTags){tags=sortTags(tags)}tags=addAssignedTags(opts,tags,inputField,tagContainer)}if(opts.autocomplete&&typeof($.fn.autocomplete)=='function'&&opts.allowEdit){$(inputField).autocomplete("option","source",tags.availableTags)}},error:function(xhr,text,error){debug(xhr,text,error);alert(opts.msgError)}})}else if(opts.getURL!==''){tags.assignedTags=opts.assignedTags.slice();if(opts.sortTags){tags=sortTags(tags)}tags=addAssignedTags(opts,tags,inputField,tagContainer)}else{if(opts.availableTags.length){tags.availableTags=opts.availableTags.slice();tags.originalTags=tags.availableTags.slice()}if(opts.sortTags){tags=sortTags(tags)}if(opts.assignedTags.length){tags.assignedTags=opts.assignedTags.slice();if(opts.sortTags){tags=sortTags(tags)}tags=addAssignedTags(opts,tags,inputField,tagContainer)}if(opts.autocomplete&&typeof($.fn.autocomplete)=='function'&&opts.allowEdit&&opts.initLoad){$(inputField).autocomplete("option","source",tags.availableTags)}}if(opts.allowEdit){tagContainerObject.delegate("li.tagItem","click",function(){var $el=$(this);var rc=1;if(typeof(opts.onDelete)=="function"){rc=opts.onDelete.call(this,$.trim($el.text()))}if(rc){tags=removeTag($el,tags,opts.sortTags);if(opts.updateURL!==''&&opts.autoUpdate){saveTags(tags,opts,tagContainer.id)}}if(typeof(opts.afterDelete)=="function"){opts.afterDelete.call(this,$.trim($el.text()))}if(opts.autocomplete&&typeof($.fn.autocomplete)=='function'&&opts.initLoad){$(inputField).autocomplete("option","source",tags.availableTags)}});$(inputField).keypress(function(e){var $el=$(this);if(e.which===13||e.which===44||e.which===opts.delimiter.charCodeAt(0)){e.preventDefault();if($el.val()!==""&&!checkTag($.trim($el.val()),tags.assignedTags)){if(!opts.allowAdd&&!checkTag($.trim($el.val()),tags.availableTags)){alert(opts.msgNoNewTag);return}if(opts.maxTags>0&&tags.assignedTags.length>=opts.maxTags){alert('Maximum tags allowed: '+opts.maxTags)}else{var newTag=$.trim($el.val());var rc=1;if(typeof(opts.onAdd)=="function"){rc=opts.onAdd.call(this,newTag)}if(rc||typeof(rc)=="undefined"){tags=addTag(this,newTag,tags,opts.sorttags);if(opts.updateurl!==''&&opts.autoupdate){saveTags(tags,opts,tagContainer.id)}if(opts.autocomplete&&typeof($.fn.autocomplete)=='function'&&opts.initload){$(inputField).autocomplete("option","source",tags.availableTags)}if(typeof(opts.afterAdd)=="function"){opts.afterAdd.call(this,newTag)}}}$el.val("");$el.focus()}}});$(inputField).keydown(function(e){var $el=$(this);if(e.which===8&&$el.val()===""){var deleted_tag=tagContainerObject.find(".tagItem:last").text();if(typeof(opts.onDelete)=="function"){opts.onDelete.call(this,$.trim(deleted_tag))}tags=removeTag(tagContainerObject.find(".tagItem:last"),tags,opts.sortTags);if(opts.updateURL!==''&&opts.autoUpdate){saveTags(tags,opts,tagContainer.id)}if(typeof(opts.afterDelete)=="function"){opts.afterDelete.call(this,$.trim(deleted_tag))}if(opts.autocomplete&&typeof($.fn.autocomplete)=='function'&&opts.initLoad){$(inputField).autocomplete("option","source",tags.availableTags)}$el.focus()}});if(opts.autocomplete&&typeof($.fn.autocomplete)=='function'&&opts.initLoad){$(inputField).autocomplete({source:tags.availableTags,select:function(event,ui){var $el=$(this);if(!checkTag($.trim(ui.item.value),tags.assignedTags)){if(opts.maxTags>0&&tags.assignedTags.length>=opts.maxTags){alert('Maximum tags allowed: '+opts.maxTags)}else{var newTag=$.trim(ui.item.value);var rc=1;if(typeof(opts.onAdd)=="function"){rc=opts.onAdd.call(this,newTag)}if(rc||typeof(rc)=="undefined"){tags=addTag(this,newTag,tags,opts.sortTags);if(opts.updateURL!==''&&opts.autoUpdate){saveTags(tags,opts,tagContainer.id)}$(inputField).autocomplete("option","source",tags.availableTags);if(typeof(opts.afterAdd)=="function"){opts.afterAdd.call(this,newTag)}}}$el.focus()}$el.val("");return false},minLength:opts.minChars})}else if(opts.autocomplete&&typeof($.fn.autocomplete)=='function'){$(inputField).autocomplete({source:function(request,response){opts.getData[opts.queryname]=request.term;var lastXhr=$.getJSON(opts.getURL,opts.getData,function(data,status,xhr){response(data.availableTags)})},select:function(event,ui){var $el=$(this);if(!checkTag($.trim(ui.item.value),tags.assignedTags)){if(opts.maxTags>0&&tags.assignedTags.length>=opts.maxTags){alert('Maximum tags allowed: '+opts.maxTags)}else{var newTag=$.trim(ui.item.value);var rc=1;if(typeof(opts.onAdd)=="function"){opts.onAdd.call(this,newTag)}if(rc||typeof(rc)=="undefined"){tags=addTag(this,$.trim(ui.item.value),tags,opts.sortTags);if(opts.updateURL!==''&&opts.autoUpdate){saveTags(tags,opts,tagContainer.id)}if(typeof(opts.afterAdd)=="function"){opts.afterAdd.call(this,newTag)}}}$el.focus()}$el.val('');return false},minLength:opts.minChars})}$(inputField).focus(function(){if($(inputField).val()===''&&opts.autocomplete&&typeof($.fn.autocomplete)=='function'&&opts.initLoad){$(inputField).autocomplete("search","")}});tagContainerObject.click(function(){$(inputField).focus()})}this.getTags=function(){return tags.assignedTags};return 1})}else if(typeof(options)=="string"&&methods[options]){return methods[options].apply(this,Array.prototype.slice.call(arguments,1))}};$.fn.tagHandler.defaults={allowEdit:true,allowAdd:true,assignedTags:[],autocomplete:false,autoUpdate:false,availableTags:[],className:'tagHandler',debug:false,delimiter:'',getData:{},getURL:'',initLoad:true,maxTags:0,minChars:0,msgNoNewTag:"You don't have permission to create a new tag.",msgError:"There was an error getting the tag list.",onAdd:{},onDelete:{},afterAdd:{},afterDelete:{},queryname:'q',sortTags:true,updateData:{},updateURL:''};function checkTag(value,tags){var check=false;jQuery.each(tags,function(i,e){if(e===value){check=true;return false}});return check}function removeTagFromList(value,tags){jQuery.each(tags,function(i,e){if(e===value){tags.splice(i,1)}});return tags}function addTag(tagField,value,tags,sort){tags.assignedTags.push(value);tags.availableTags=removeTagFromList(value,tags.availableTags);$("
  • ").addClass("tagItem").text(value).insertBefore($(tagField).parent());if(sort){tags=sortTags(tags)}return tags}function removeTag(tag,tags,sort){var value=$(tag).text();tags.assignedTags=removeTagFromList(value,tags.assignedTags);if(checkTag(value,tags.originalTags)){tags.availableTags.push(value)}$(tag).remove();if(sort){tags=sortTags(tags)}return tags}function sortTags(tags){tags.availableTags=tags.availableTags.sort();tags.assignedTags=tags.assignedTags.sort();tags.originalTags=tags.originalTags.sort();return tags}function saveTags(tags,opts,tcID){var sendData={tags:tags.assignedTags};$.extend(sendData,opts.updateData);$.ajax({type:'POST',url:opts.updateURL,cache:false,data:sendData,dataType:'json',beforeSend:function(){if($("#"+tcID+"_save").length){$("#"+tcID+"_save").fadeOut(200,function(){$("#"+tcID+"_loader").fadeIn(200)})}else{$("#"+tcID+"_loader").fadeIn(200)}},complete:function(){$("#"+tcID+"_loader").fadeOut(200,function(){if($("#"+tcID+"_save").length){$("#"+tcID+"_save").fadeIn(200)}})}})}function addAssignedTags(opts,tags,inputField,tagContainer){$(tags.assignedTags).each(function(i,e){if(opts.allowEdit){$("
  • ").addClass("tagItem").text(e).insertBefore($(inputField).parent())}else{$("
  • ").addClass("tagItem").css("cursor","default").text(e).appendTo($(tagContainer))}tags.availableTags=removeTagFromList(e,tags.availableTags)});return tags}function debug(tagContainer,options){if(options.debug&&window.console&&window.console.log){window.console.log(tagContainer);window.console.log(options);window.console.log($.fn.tagHandler.defaults)}}})(jQuery); /* ///////////////////////////////////////////////////////////////////////////////// JQUERY UNIFORM///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// */ (function(d,i){d.uniform={options:{selectClass:"uni-selector",radioClass:"uni-radio",checkboxClass:"uni-checker",fileClass:"uni-uploader",filenameClass:"uni-filename",fileBtnClass:"uni-action",fileDefaultText:"No file selected",fileBtnText:"Choose File",checkedClass:"uni-checked",focusClass:"uni-focus",disabledClass:"uni-disabled",buttonClass:"uni-button",activeClass:"uni-active",hoverClass:"uni-hover",useID:!0,idPrefix:"uniform",resetSelector:!1,autoHide:!0,selectAutoWidth:!1},elements:[]};d.support.selectOpacity= d.browser.msie&&7>d.browser.version?!1:!0;d.fn.uniform=function(b){function j(a){var c=d("
    "),e=d("");c.addClass(b.buttonClass);b.useID&&a.attr("id")&&c.attr("id",b.idPrefix+"-"+a.attr("id"));var f;a.is("a, button")?f=a.text():a.is(":submit, :reset, input[type=button]")&&(f=a.attr("value"));f=""==f?a.is(":reset")?"Reset":"Submit":f;e.text(f);a.css("display","none");a.wrap(c);a.wrap(e);c=a.closest("div");e=a.closest("span");a.is(":disabled")&&c.addClass(b.disabledClass);c.bind("mouseenter.uniform", function(){c.addClass(b.hoverClass)}).bind("mouseleave.uniform",function(){c.removeClass(b.hoverClass);c.removeClass(b.activeClass)}).bind("mousedown.uniform touchbegin.uniform",function(){c.addClass(b.activeClass)}).bind("mouseup.uniform touchend.uniform",function(){c.removeClass(b.activeClass)}).bind("click.uniform touchend.uniform",function(b){d(b.target).is("span, div")&&(a[0].dispatchEvent?(b=document.createEvent("MouseEvents"),b.initEvent("click",!0,!0),a[0].dispatchEvent(b)):a.click())});a.bind("focus.uniform", function(){c.addClass(b.focusClass)}).bind("blur.uniform",function(){c.removeClass(b.focusClass)});d.uniform.noSelect(c);h(a)}function k(a){var c=d("
    "),e=d(""),f=a.width();"none"==a.css("display")&&b.autoHide&&c.hide();c.addClass(b.selectClass);if(b.selectAutoWidth){var g=c.width(),l=e.width()-f;c.width(g-l+25);a.width(f+32);a.css("left","2px");e.width(f)}b.useID&&a.attr("id")&&c.attr("id",b.idPrefix+"-"+a.attr("id"));g=a.find(":selected:first");0==g.length&&(g=a.find("option:first")); e.html(g.html());a.css("opacity",0);a.wrap(c);a.before(e);c=a.parent("div");e=a.siblings("span");b.selectAutoWidth&&(g=parseInt(c.css("paddingLeft"),10),e.width(f-g-15),a.width(f+g),a.css("min-width",f+g+"px"),c.width(f+g));a.bind("change.uniform",function(){e.text(a.find(":selected").html());c.removeClass(b.activeClass)}).bind("focus.uniform",function(){c.addClass(b.focusClass)}).bind("blur.uniform",function(){c.removeClass(b.focusClass);c.removeClass(b.activeClass)}).bind("mousedown.uniform touchbegin.uniform", function(){c.addClass(b.activeClass)}).bind("mouseup.uniform touchend.uniform",function(){c.removeClass(b.activeClass)}).bind("click.uniform touchend.uniform",function(){c.removeClass(b.activeClass)}).bind("mouseenter.uniform",function(){c.addClass(b.hoverClass)}).bind("mouseleave.uniform",function(){c.removeClass(b.hoverClass);c.removeClass(b.activeClass)}).bind("keyup.uniform",function(){e.text(a.find(":selected").html())});a.is(":disabled")&&c.addClass(b.disabledClass);d.uniform.noSelect(e);h(a)} function m(a){var c=d("
    "),e=d("");"none"==a.css("display")&&b.autoHide&&c.hide();c.addClass(b.checkboxClass);b.useID&&a.attr("id")&&c.attr("id",b.idPrefix+"-"+a.attr("id"));a.wrap(c);a.wrap(e);e=a.parent();c=e.parent();a.css("opacity",0).bind("focus.uniform",function(){c.addClass(b.focusClass)}).bind("blur.uniform",function(){c.removeClass(b.focusClass)}).bind("click.uniform touchend.uniform",function(){a.is(":checked")?(a.attr("checked","checked"),e.addClass(b.checkedClass)):(a.removeAttr("checked"), e.removeClass(b.checkedClass))}).bind("mousedown.uniform touchbegin.uniform",function(){c.addClass(b.activeClass)}).bind("mouseup.uniform touchend.uniform",function(){c.removeClass(b.activeClass)}).bind("mouseenter.uniform",function(){c.addClass(b.hoverClass)}).bind("mouseleave.uniform",function(){c.removeClass(b.hoverClass);c.removeClass(b.activeClass)});a.is(":checked")&&(a.attr("checked","checked"),e.addClass(b.checkedClass));a.is(":disabled")&&c.addClass(b.disabledClass);h(a)}function n(a){var c= d("
    "),e=d("");"none"==a.css("display")&&b.autoHide&&c.hide();c.addClass(b.radioClass);b.useID&&a.attr("id")&&c.attr("id",b.idPrefix+"-"+a.attr("id"));a.wrap(c);a.wrap(e);e=a.parent();c=e.parent();a.css("opacity",0).bind("focus.uniform",function(){c.addClass(b.focusClass)}).bind("blur.uniform",function(){c.removeClass(b.focusClass)}).bind("click.uniform touchend.uniform",function(){if(a.is(":checked")){var c=b.radioClass.split(" ")[0];d("."+c+" span."+b.checkedClass+":has([name='"+a.attr("name")+ "'])").removeClass(b.checkedClass);e.addClass(b.checkedClass)}else e.removeClass(b.checkedClass)}).bind("mousedown.uniform touchend.uniform",function(){a.is(":disabled")||c.addClass(b.activeClass)}).bind("mouseup.uniform touchbegin.uniform",function(){c.removeClass(b.activeClass)}).bind("mouseenter.uniform touchend.uniform",function(){c.addClass(b.hoverClass)}).bind("mouseleave.uniform",function(){c.removeClass(b.hoverClass);c.removeClass(b.activeClass)});a.is(":checked")&&e.addClass(b.checkedClass); a.is(":disabled")&&c.addClass(b.disabledClass);h(a)}function o(a){var c=d("
    "),e=d(""+b.fileDefaultText+""),f=d(""+b.fileBtnText+"");"none"==a.css("display")&&b.autoHide&&c.hide();c.addClass(b.fileClass);e.addClass(b.filenameClass);f.addClass(b.fileBtnClass);b.useID&&a.attr("id")&&c.attr("id",b.idPrefix+"-"+a.attr("id"));a.wrap(c);a.after(f);a.after(e);c=a.closest("div");e=a.siblings("."+b.filenameClass);f=a.siblings("."+b.fileBtnClass);a.attr("size")||a.attr("size", c.width()/10);var g=function(){var c=a.val();""===c?c=b.fileDefaultText:(c=c.split(/[\/\\]+/),c=c[c.length-1]);e.text(c)};g();a.css("opacity",0).bind("focus.uniform",function(){c.addClass(b.focusClass)}).bind("blur.uniform",function(){c.removeClass(b.focusClass)}).bind("mousedown.uniform",function(){a.is(":disabled")||c.addClass(b.activeClass)}).bind("mouseup.uniform",function(){c.removeClass(b.activeClass)}).bind("mouseenter.uniform",function(){c.addClass(b.hoverClass)}).bind("mouseleave.uniform", function(){c.removeClass(b.hoverClass);c.removeClass(b.activeClass)});d.browser.msie?a.bind("click.uniform.ie7",function(){setTimeout(g,0)}):a.bind("change.uniform",g);a.is(":disabled")&&c.addClass(b.disabledClass);d.uniform.noSelect(e);d.uniform.noSelect(f);h(a)}function h(a){a.data("uniformed","true");elem=a.get();1=a.attr("size"))&&k(a):a.is(":checkbox")?m(a):a.is(":radio")?n(a):a.is(":file")?o(a):a.is(":text, :password, input[type='email'], input[type='search'], input[type='tel'], input[type='url'], input[type='datetime'], input[type='date'], input[type='month'], input[type='week'], input[type='time'], input[type='datetime-local'], input[type='number'], input[type='color']")? (a.addClass(a.attr("type")),h(a)):a.is("textarea")?(a.addClass("uniform"),h(a)):a.is("a, :submit, :reset, button, input[type='button']")&&j(a))})}})(jQuery); /* * MultiSelect v0.2 * Copyright (c) 2011 Louis Cuny * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ ;(function(a){var n={init:function(c){this.settings={disabledClass:"disabled",emptyArray:!1,callbackOnInit:!1,keepOrder:!1};c&&(this.settings=a.extend(this.settings,c));var d=this;d.hide();d.each(function(){var b=a(this);if(b.next(".ms-container").length==0){b.attr("id",b.attr("id")?b.attr("id"):"ms-"+Math.ceil(Math.random()*1E3));var c=a('
    '),j=a('
    '),f=a('
    '),h=a('
      '), m=a('
        ');d.settings.emptyArray&&(b.find("option[value='']").length==0?b.prepend(""):b.find("option[value='']").attr("selected","selected"));b.data("settings",d.settings);var l=null,g=null,k=0;b.find("optgroup,option").each(function(){if(a(this).is("optgroup")){l=a(this).attr("label");g="ms-"+b.attr("id")+"-optgroup-"+k;h.append(a('
        • '+ l+"
      • "));k++}if(a(this).is("option:not(option[value=''])")){var c=a(this).attr("class")?" "+a(this).attr("class"):"",c=a('
      • '+a(this).text()+"
      • ");a(this).attr("title")&&c.attr("title",a(this).attr("title"));if(a(this).attr("disabled")||b.attr("disabled")){c.attr("disabled","disabled");c.addClass(d.settings.disabledClass)}c.click(function(){b.multiSelect("select",a(this).attr("ms-value"))});(g?h.children("#"+g).find("ul").first(): h).append(c)}});d.settings.selectableHeader&&j.append(d.settings.selectableHeader);j.append(h);d.settings.selectedHeader&&f.append(d.settings.selectedHeader);f.append(m);c.append(j);c.append(f);b.after(c);b.find("option:selected").each(function(){b.multiSelect("select",a(this).val(),"init")})}})},refresh:function(){a("#ms-"+a(this).attr("id")).remove();a(this).multiSelect("init",a(this).data("settings"))},select:function(c,d){var b=this,e=b.find('option[value="'+c+'"]'),j=e.text(),f=e.attr("class"), h=e.attr("title"),f=a('
      • '+j+"
      • "),m=a("#ms-"+b.attr("id")+" .ms-selectable ul"),l=a("#ms-"+b.attr("id")+" .ms-selection ul"),g=m.children('li[ms-value="'+c+'"]');if((!g.hasClass(b.data("settings").disabledClass)||g.hasClass(b.data("settings").disabledClass)&&"init"==d)&&""!=c&&("init"==d&&e.attr("selected")||"init"!=d&&!e.attr("selected"))){var k=g.parent(".ms-optgroup");0", "g"),"");return a=b.trim(a.toLowerCase())};this.results=function(c){"string"===typeof a.noResults&&""!==a.noResults&&(c?b(a.noResults).hide():b(a.noResults).show());return this};this.loader=function(c){"string"===typeof a.loader&&""!==a.loader&&(c?b(a.loader).show():b(a.loader).hide());return this};this.cache=function(){d=b(j);"string"===typeof a.noResults&&""!==a.noResults&&(d=d.not(a.noResults));l=("string"===typeof a.selector?d.find(a.selector):b(j).not(a.noResults)).map(function(){return g.strip_html(this.innerHTML)}); e=d.map(function(){return this});return this.go()};this.trigger=function(){this.loader(!0);a.onBefore();i.clearTimeout(k);k=i.setTimeout(function(){g.go()},a.delay);return this};this.cache();this.results(!0);this.stripe();this.loader(!1);return this.each(function(){b(this).bind(a.bind,function(){h=b(this).val();g.trigger()})})}})(jQuery,this,document); // Chosen, a Select Box Enhancer for jQuery and Protoype // by Patrick Filler for Harvest, http://getharvest.com // // Version 0.9.8 // Full source at https://github.com/harvesthq/chosen // Copyright (c) 2011 Harvest http://getharvest.com // MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md // This file is generated by `cake build`, do not edit it by hand. ((function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d"+a.html+"")},a.prototype.results_update_field=function(){return this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:a.preventDefault();if(this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.generate_field_id=function(){var a;return a=this.generate_random_id(),this.form_field.id=a,a},a.prototype.generate_random_char=function(){var a,b,c;return a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",c=Math.floor(Math.random()*a.length),b=a.substring(c,c+1)},a}(),b.AbstractChosen=a}.call(this),function(){var a,b,c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=this,a=jQuery,a.fn.extend({chosen:function(c){return!a.browser.msie||a.browser.version!=="6.0"&&a.browser.version!=="7.0"?this.each(function(d){var e;e=a(this);if(!e.hasClass("chzn-done"))return e.data("chosen",new b(this,c))}):this}}),b=function(b){function e(){e.__super__.constructor.apply(this,arguments)}return f(e,b),e.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},e.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},e.prototype.set_up_html=function(){var b,d,e,f;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/[^\w]/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),b=a("
        ",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html('
          '):b.html(''+this.default_text+'
            '),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),d=this.container.height(),e=this.f_width-c(this.dropdown),this.dropdown.css({width:e+"px",top:d+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-c(this.search_container)-c(this.search_field),this.search_field.css({width:f+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},e.prototype.register_observers=function(){var a=this;return this.container.mousedown(function(b){return a.container_mousedown(b)}),this.container.mouseup(function(b){return a.container_mouseup(b)}),this.container.mouseenter(function(b){return a.mouse_enter(b)}),this.container.mouseleave(function(b){return a.mouse_leave(b)}),this.search_results.mouseup(function(b){return a.search_results_mouseup(b)}),this.search_results.mouseover(function(b){return a.search_results_mouseover(b)}),this.search_results.mouseout(function(b){return a.search_results_mouseout(b)}),this.form_field_jq.bind("liszt:updated",function(b){return a.results_update_field(b)}),this.search_field.blur(function(b){return a.input_blur(b)}),this.search_field.keyup(function(b){return a.keyup_checker(b)}),this.search_field.keydown(function(b){return a.keydown_checker(b)}),this.is_multiple?(this.search_choices.click(function(b){return a.choices_click(b)}),this.search_field.focus(function(b){return a.input_focus(b)})):this.container.click(function(a){return a.preventDefault()})},e.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},e.prototype.container_mousedown=function(b){var c;if(!this.is_disabled)return c=b!=null?a(b.target).hasClass("search-choice-close"):!1,b&&b.type==="mousedown"&&!this.results_showing&&b.stopPropagation(),!this.pending_destroy_click&&!c?(this.active_field?!this.is_multiple&&b&&(a(b.target)[0]===this.selected_item[0]||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},e.prototype.container_mouseup=function(a){if(a.target.nodeName==="ABBR"&&!this.is_disabled)return this.results_reset(a)},e.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},e.prototype.close_field=function(){return a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},e.prototype.activate_field=function(){return!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},e.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},e.prototype.results_build=function(){var a,b,c,e,f;this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),a="",f=this.results_data;for(c=0,e=f.length;c'+a("
            ").text(b.label).html()+"")},e.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c'+b.html+''),d=a("#"+c).find("a").first(),d.click(function(a){return e.choice_destroy_link_click(a)}))},e.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),this.is_disabled?b.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(a(b.target)))},e.prototype.choice_destroy=function(a){return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel")),a.parents("li").first().remove()},e.prototype.results_reset=function(){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},e.prototype.results_reset_cleanup=function(){return this.selected_item.find("abbr").remove()},e.prototype.result_select=function(a){var b,c,d,e;if(this.result_highlight)return b=this.result_highlight,c=b.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(b):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=b,this.selected_item.removeClass("chzn-default")),b.addClass("result-selected"),e=c.substr(c.lastIndexOf("_")+1),d=this.results_data[e],d.selected=!0,this.form_field.options[d.options_index].selected=!0,this.is_multiple?this.choice_build(d):(this.selected_item.find("span").first().text(d.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!a.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change",{selected:this.form_field.options[d.options_index].value}),this.search_field_scale()},e.prototype.result_activate=function(a){return a.addClass("active-result")},e.prototype.result_deactivate=function(a){return a.removeClass("active-result")},e.prototype.result_deselect=function(b){var c,d;return d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[d.options_index].value}),this.search_field_scale()},e.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('')},e.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;this.no_results_clear(),j=0,k=this.search_field.val()===this.default_text?"":a("
            ").text(a.trim(this.search_field.val())).html(),g=this.search_contains?"":"^",f=new RegExp(g+k.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),n=new RegExp(k.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),s=this.results_data;for(o=0,q=s.length;o=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(p=0,r=e.length;p"+c.html.substr(l+k.length),m=m.substr(0,l)+""+m.substr(l)):m=c.html,h.html(m),this.result_activate(h),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&i===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(h))}}return j<1&&k.length?this.no_results(k):this.winnow_results_set_highlight()},e.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d'+this.results_none_found+' ""'),c.find("span").first().html(b),this.search_results.append(c)},e.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},e.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},e.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},e.prototype.keydown_backstroke=function(){return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(this.pending_backstroke=this.search_container.siblings("li.search-choice").last(),this.pending_backstroke.addClass("search-choice-focus"))},e.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},e.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},e.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height(),this.dropdown.css({top:b+"px"})}},e.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},e}(AbstractChosen),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}.call(this);