var a___="temp;";
(function(a,v,ea){a.fn.borderWidth=function(){return a(this).outerWidth()-a(this).innerWidth()};a.fn.paddingWidth=function(){return a(this).innerWidth()-a(this).width()};a.fn.extraWidth=function(){return a(this).outerWidth(!0)-a(this).width()};a.fn.offsetFrom=function(h){h=a(h);return{left:a(this).offset().left-h.offset().left,top:a(this).offset().top-h.offset().top}};a.fn.maxWidth=function(){var h=0;a(this).each(function(){a(this).width()>h&&(h=a(this).width())});return h};a.fn.triggerAll=function(h,
d){return a(this).each(function(){a(this).triggerHandler(h,d)})};var r=Array.prototype.slice,w=function(){return Math.floor(999999999*Math.random())};a.proto=function(h,d,e){var m=d,b={};opts=a.extend({elem:"elem",access:"access",init:"init",instantAccess:!1},e);d._super&&(b[opts.init]=function(){},m=d.extend(b));a.fn[h]=function(){var e,c=arguments;a(this).each(function(){var b=a(this),g=b.data(h),q=!g;q&&(g=new m,d._super&&(g[opts.init]=d.prototype.init),g[opts.elem]=b[0],g[opts.init]&&g[opts.init].apply(g,
opts.instantAccess?[]:r.call(c,0)),b.data(h,g));if(!q||opts.instantAccess)g[opts.access]&&g[opts.access].apply(g,r.call(c,0)),0<c.length?a.isFunction(g[c[0]])?e=g[c[0]].apply(g,r.call(c,1)):1===c.length?e=a.getObject?a.getObject(c[0],g):g[c[0]]:a.setObject?a.setObject(c[0],c[1],g):g[c[0]]=c[1]:void 0===e&&(e=b.data(h))});return void 0===e?a(this):e}};var J=function(){return!1};a.proto("sb",function(){var h=this,d={},e=null,m=null,b=null,k=null,c=null,p=null,g="",q=null,r=null,Q=null,R,B,S,T,C,x,U,
y,l,s,D,K,L,V,W,E,z,X,Y,F,G,Z,M,N,A,t,n,H,$,aa,ba,ca,I,O,u,da,P;R=function(){b=a("<div class='sb "+d.selectboxClass+" "+e.attr("class")+"' id='sb"+w()+"'></div>").attr("role","listbox").attr("aria-has-popup","true").attr("aria-labelledby",m.attr("id")?m.attr("id"):"");a("body").append(b);var f=0<e.children().size()?d.displayFormat.call(e.find("option:selected")[0],0,0):"&nbsp;";k=a("<div class='display "+e.attr("class")+"' id='sbd"+w()+"'></div>").append("<div data-sentencecode='"+a(e.find("option:selected")[0]).attr("data-sentencecode")+
"' class='text'>"+f+"</div>").append(d.arrowMarkup);b.append(k);c=a("<ul class='"+d.selectboxClass+" items "+e.attr("class")+"' role='menu' id='sbdd"+w()+"'></ul>").attr("aria-hidden","true");b.append(c).attr("aria-owns",c.attr("id"));0===e.children().size()?c.append(B()):e.children().each(function(f){var e,b,g,k;a(this).is("optgroup")?(b=a(this),g=a("<li class='optgroup'>"+d.optgroupFormat.call(b[0],f+1)+"</li>").addClass(b.is(":disabled")?"disabled":"").attr("aria-disabled",b.is(":disabled")?"true":
""),k=a("<ul class='items'></ul>"),g.append(k),c.append(g),b.children("option").each(function(){e=B(a(this),f).addClass(b.is(":disabled")?"disabled":"").attr("aria-disabled",b.is(":disabled")?"true":"");k.append(e)})):c.append(B(a(this),f))});p=c.find("li").not(".optgroup");b.attr("aria-active-descendant",p.filter(".selected").attr("id"));c.children(":first").addClass("first");c.children(":last").addClass("last");d.fixedWidth?d.maxWidth&&b.width()>d.maxWidth&&b.width(d.maxWidth):(f=c.find(".text, .optgroup").maxWidth()+
k.extraWidth()+1,b.width(d.maxWidth?Math.min(d.maxWidth,f):f));e.before(b).addClass("has_sb").hide().show();D();da();c.hide();e.is(":disabled")?(b.addClass("disabled").attr("aria-disabled"),k.click(function(a){a.preventDefault()})):(e.bind("blur.sb",T).bind("focus.sb",S),k.mousedown(Z).mousedown(V).click(J).focus(X).blur(Y).hover(F,G),t().click(W).hover(F,G),c.find(".optgroup").hover(F,G).click(J),p.filter(".disabled").click(J),(!a.browser.msie||9<=a.browser.version)&&a(v).resize(a.throttle?a.throttle(100,
K):L));b.bind("close.sb",s).bind("destroy.sb",C);e.bind("reload.sb",x);a.fn.tie&&d.useTie&&e.bind("domupdate.sb",U)};L=function(){clearTimeout(Q);Q=setTimeout(K,50)};K=function(){b.is(".open")&&(D(),y(!0))};B=function(f,c){f||(f=a("<option value=''>&nbsp;</option>"),c=0);var b="vt"+w(),e=f.attr("title")?f.attr("title"):d.optionFormat.call(f[0],0,c+1),e=a("<li title='"+e+"' id='sbo"+w()+"'></li>").attr("role","option").data("orig",f[0]).data("value",f?f.attr("value"):"").addClass(f.is(":selected")?
"selected":"").addClass(f.is(":disabled")?"disabled":"").attr("aria-disabled",f.is(":disabled")?"true":""),g=a("<div class='item'></div>"),b=a("<div id='"+b+"' class='text'></div>").html(d.optionFormat.call(f[0],0,c+1));return e.append(g.append(b))};S=function(){O();k.triggerHandler("focus")};T=function(){k.triggerHandler("blur")};C=function(f){b.remove();e.unbind(".sb").removeClass("has_sb");a(v).unbind("resize",L);f||e.removeData("sb")};x=function(){var a=b.is(".open"),c=k.is(".focused");s(!0);
C(!0);h.init(d);a?(e.focus(),y(!0)):c&&e.focus()};U=function(){clearTimeout(r);r=setTimeout(x,30)};I=function(){b.removeClass("focused");s();P()};P=function(){a(document).unbind("click",I).unbind("keyup",E).unbind("keypress",u).unbind("keydown",u).unbind("keydown",z)};O=function(){a(".sb.focused."+d.selectboxClass).not(b[0]).find(".display").blur()};ca=function(){a(".sb.open."+d.selectboxClass).not(b[0]).triggerAll("close")};s=function(a){b.is(".open")&&(k.blur(),p.removeClass("hover"),P(),c.attr("aria-hidden",
"true"),!0===a?(c.hide(),b.removeClass("open"),b.append(c)):c.fadeOut(d.animDuration,function(){b.removeClass("open");b.append(c)}))};N=function(){var f=null;return f="self"===d.ddCtx?b:a.isFunction(d.ddCtx)?a(d.ddCtx.call(e[0])):a(d.ddCtx)};A=function(){return p.filter(".selected")};t=function(){return p.not(".disabled")};l=function(){c.scrollTop(c.scrollTop()+A().offsetFrom(c).top-c.height()/2+A().outerHeight(!0)/2)};da=function(){a.browser.msie&&8>a.browser.version&&a("."+d.selectboxClass+" .display").hide().show()};
y=function(f){try{a("div.ContextMenuItemsContainer").css("display","none")}catch(fa){}var g;g=N();O();b.addClass("open");g.append(c);g=D();c.attr("aria-hidden","false");!0===f?(c.show(),l()):"down"===g?c.slideDown(d.animDuration,l):c.fadeIn(d.animDuration,l);e.focus()};D=function(){var f=N(),b=0,e=k.offsetFrom(f).left,g=0,h="",m,l;c.removeClass("above");c.show().css({maxHeight:"none",position:"relative",visibility:"hidden"});d.fixedWidth||c.width(k.outerWidth()-c.extraWidth()+1);b=a(v).scrollTop()+
a(v).height()-k.offset().top-k.outerHeight();h=k.offset().top-a(v).scrollTop();g=k.offsetFrom(f).top+k.outerHeight();l=b-h+d.dropupThreshold;c.outerHeight()<b?(b=d.maxHeight?d.maxHeight:b,h="down"):c.outerHeight()<h?(b=d.maxHeight?d.maxHeight:h,g=k.offsetFrom(f).top-Math.min(b,c.outerHeight()),h="up"):0<=l?(b=d.maxHeight?d.maxHeight:b,h="down"):0>l?(b=d.maxHeight?d.maxHeight:h,g=k.offsetFrom(f).top-Math.min(b,c.outerHeight()),h="up"):(b=d.maxHeight?d.maxHeight:"none",h="down");m=(""+a("body").css("margin-left")).match(/^\d+/)?
a("body").css("margin-left"):0;l=(""+a("body").css("margin-top")).match(/^\d+/)?a("body").css("margin-top"):0;m="1.4.2"<=a().jquery?parseInt(m):a("body").offset().left;l="1.4.2"<=a().jquery?parseInt(l):a("body").offset().top;c.hide().css({left:e+(f.is("body")?m:0),maxHeight:b,position:"absolute",top:g+(f.is("body")?l:0),visibility:"visible"});"up"===h&&c.addClass("above");return h};V=function(a){b.is(".open")?s():y();return!1};n=function(){var f=a(this),c=e.val(),g=f.data("value");d.useTie&&a.fn.tie?
(e.find("option").old_removeAttr("selected"),a(f.data("orig")).old_attr("selected","selected")):(e.find("option").removeAttr("selected"),a(f.data("orig")).attr("selected","selected"));t().removeClass("selected");f.addClass("selected");b.attr("aria-active-descendant",f.attr("id"));k.find(".text").attr("title",f.find(".text").html());k.find(".text").html(d.displayFormat.call(f.data("orig")));c!==g&&e.change()};W=function(a){n.call(this);I();e.focus();return!1};H=function(){g=""};$=function(a){var b,
c,d=t();for(b=0;b<d.size();b++)if(c=d.eq(b).find(".text"),c=0==c.children().size()?c.text():c.find("*").text(),0<a.length&&c.toLowerCase().match("^"+a.toLowerCase()))return d.eq(b);return null};aa=function(a){a=$(a);return null!==a?(n.call(a[0]),!0):!1};u=function(a){a.ctrlKey||a.altKey||38!==a.which&&40!==a.which&&8!==a.which&&32!==a.which||a.preventDefault()};ba=function(a){var b,c;b=A();var d=t();for(b=d.index(b)+1;b<d.size();b++)if(c=d.eq(b).find(".text").text(),""!==c&&c.substring(0,1).toLowerCase()===
a.toLowerCase())return n.call(d.eq(b)[0]),!0;return!1};z=function(a){if(a.altKey||a.ctrlKey)return!1;var b=A(),c=t();switch(a.which){case 35:0<b.size()&&(a.preventDefault(),n.call(c.filter(":last")[0]),l());break;case 36:0<b.size()&&(a.preventDefault(),n.call(c.filter(":first")[0]),l());break;case 38:0<b.size()&&(c.filter(":first")[0]!==b[0]&&(a.preventDefault(),n.call(c.eq(c.index(b)-1)[0])),l());break;case 40:0<b.size()?c.filter(":last")[0]!==b[0]&&(a.preventDefault(),n.call(c.eq(c.index(b)+1)[0]),
l()):1<p.size()&&(a.preventDefault(),n.call(p.eq(0)[0]))}};E=function(a){if(a.altKey||a.ctrlKey)return!1;38!==a.which&&40!==a.which&&(g+=String.fromCharCode(a.keyCode),aa(g)?(clearTimeout(q),q=setTimeout(H,d.acTimeout)):ba(String.fromCharCode(a.keyCode))?(l(),clearTimeout(q),q=setTimeout(H,d.acTimeout)):(H(),clearTimeout(q)))};X=function(){ca();b.addClass("focused");a(document).click(I).keyup(E).keypress(u).keydown(u).keydown(z).keydown(z)};Y=function(){b.removeClass("focused");a(document).unbind("keyup",
E).unbind("keydown",u).unbind("keydown",z)};F=function(){a(this).addClass("hover")};G=function(){a(this).removeClass("hover")};Z=function(){k.addClass("active");a(document).bind("mouseup",M)};M=function(){k.removeClass("active");a(document).unbind("mouseup",M)};this.init=function(b){a.browser.msie&&7>a.browser.version||(e=a(this.elem),e.attr("id")&&(m=a("label[for='"+e.attr("id")+"']:first")),m&&0!==m.size()||(m=e.closest("label")),e.hasClass("has_sb")||(d=a.extend({acTimeout:800,animDuration:200,
ddCtx:"body",dropupThreshold:150,fixedWidth:!1,maxHeight:!1,maxWidth:!1,selectboxClass:"selectbox",useTie:!1,arrowMarkup:"<div class='arrow_btn'><span class='arrow'></span></div>",displayFormat:ea,optionFormat:function(b,c){if(0<a(this).size()){var d=a(this).attr("label");return d&&0<d.length?d:a(this).text()}return""},optgroupFormat:function(b){return"<span class='label'>"+a(this).attr("label")+"</span>"}},b),d.displayFormat=d.displayFormat||d.optionFormat,R()))};this.open=y;this.close=s;this.refresh=
x;this.destroy=C;this.options=function(b){d=a.extend(d,b);x()}})})(jQuery,window);
