$.fn.highlightFade=function(g,f,e,a){var b={linear:function(i,j,d,k){return parseInt(i+(k/d)*(j-i))},sinusoidal:function(i,j,d,k){return parseInt(i+Math.sin(((k/d)*90)*(Math.PI/180))*(j-i))},exponential:function(i,j,d,k){return parseInt(i+(Math.pow(k/d,2))*(j-i))}};if(a&&a.constructor==Function){a=a}else{if(a&&b[a]){a=b[a]}else{a=b.linear}}return this.each(function(){var c=20;var k=(this.highlighting)?this.highlighting.end:$.getBGColor(this)||[255,255,255];var d=$.speed(f,e);var j=$(this).css("backgroundColor");if(this.highlighting&&this.highlighting.end){j=this.highlighting.end}g=$.getRGB(g||[255,255,128]);if(this.highlighting&&this.highlighting.timer){window.clearInterval(this.highlighting.timer)}this.highlighting={steps:((d.duration)/c),interval:c,currentStep:0,start:g,end:k,orig:j};$.highlightFade(this,d.onComplete,a)})};$.highlightFade=function(b,c,a){b.highlighting.timer=window.setInterval(function(){var e=a(b.highlighting.start[0],b.highlighting.end[0],b.highlighting.steps,b.highlighting.currentStep);var d=a(b.highlighting.start[1],b.highlighting.end[1],b.highlighting.steps,b.highlighting.currentStep);var f=a(b.highlighting.start[2],b.highlighting.end[2],b.highlighting.steps,b.highlighting.currentStep);$(b).css("backgroundColor",$.asRGBString([e,d,f]));if(b.highlighting.currentStep++>=b.highlighting.steps){$(b).css("backgroundColor",b.highlighting.orig||"");if(c&&c.constructor==Function){c.call(b)}window.clearInterval(b.highlighting.timer);b.highlighting=null}},b.highlighting.interval)};$.getRGB=function(e,b){var a;if(e&&e.constructor==Array&&e.length==3){return e}if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e)){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}else{if(a=/#([a-fA-F0-9]{1})([a-fA-F0-9]{1})([a-fA-F0-9]{1})/.exec(e)){return[parseInt("0x"+a[1]+a[1]),parseInt("0x"+a[2]+a[2]),parseInt("0x"+a[3]+a[3])]}else{if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e)){return[parseInt("0x"+a[1]),parseInt("0x"+a[2]),parseInt("0x"+a[3])]}else{return $.checkColorName(e)||b||null}}}};$.asRGBString=function(b){return"rgb("+b.join(",")+")"};$.getBGColor=function(b){var a;do{if(((a=$.css(b,"backgroundColor"))!=""&&a!="transparent")||(b.tagName.match(/^body$/i))){break}}while(b=b.parentNode);if(a==undefined||a==""||a=="transparent"){a=[255,255,255]}return $.getRGB(a)};$.checkColorName=function(a){switch(a.replace(/^\s*|\s*$/g,"").toLowerCase()){case"aqua":return[0,255,255];case"black":return[0,0,0];case"blue":return[0,0,255];case"fuchsia":return[255,0,255];case"gray":return[128,128,128];case"green":return[0,128,0];case"lime":return[0,255,0];case"maroon":return[128,0,0];case"navy":return[0,0,128];case"olive":return[128,128,0];case"purple":return[128,0,128];case"red":return[255,0,0];case"silver":return[192,192,192];case"teal":return[0,128,128];case"white":return[255,255,255];case"yellow":return[255,255,0]}};jQuery.fn.maxHeight=function(){var c={min_height:0,base:1,unit:"px",force:false,height_rule:"min-height",exclude:"#non-existant-id72172799"};var b=arguments[0]||{};for(property in b){c[property]=b[property]}if(c.height_rule=="min-height"&&navigator.appVersion.match(/\bMSIE\b/)){c.height_rule="height"}var a=c.min_height;return this.each(function(){h=$(this).css("height");if(h=="auto"){h=this.clientHeight}h=parseInt(h);if(h>a&&!c.force){a=h}}).not(c.exclude).css(c.height_rule,parseInt(a/c.base)+c.unit)};(function(a){a.fn.jNice=function(d){var c=this;var g=a.browser.safari;this.each(function(){var j=function(){a(this).replaceWith('<button id="'+this.id+'" name="'+this.name+'" type="'+this.type+'" class="'+this.className+'"><span><span>'+a(this).attr("value")+"</span></span>")};a("input:submit, input:reset",this).each(j);var i=function(){var l=a(this);l.addClass("jNiceInput").wrap('<div class="jNiceInputWrapper"><div class="jNiceInputInner"><div></div></div></div>');var k=l.parents("div.jNiceInputWrapper");k.css("width",a(this).width()+10);l.focus(function(){k.addClass("jNiceInputWrapper_hover")}).blur(function(){k.removeClass("jNiceInputWrapper_hover")})};a("input:text:visible, input:password",this).each(i);if(g){a(".jNiceInputWrapper").each(function(){a(this).addClass("jNiceSafari").find("input").css("width",a(this).width()+11)})}a("input:checkbox",this).each(function(){a(this).addClass("jNiceHidden").wrap("<span></span>");var k=a(this).parent();k.prepend('<a href="#" class="jNiceCheckbox"></a>');a(this).siblings("a.jNiceCheckbox").click(function(){var m=a(this);var l=m.siblings("input")[0];if(l.checked===true){l.checked=false;m.removeClass("jNiceChecked")}else{l.checked=true;m.addClass("jNiceChecked")}return false});if(this.checked){a("a.jNiceCheckbox",k).addClass("jNiceChecked")}});a("input:radio",this).each(function(){$input=a(this);$input.addClass("jNiceHidden").wrap('<span class="jRadioWrapper"></span>');var k=$input.parent();k.prepend('<a href="#" class="jNiceRadio" rel="'+this.name+'"></a>');a("a.jNiceRadio",k).click(function(){var l=a(this);l.siblings("input")[0].checked=true;l.addClass("jNiceChecked");a('a[rel="'+l.attr("rel")+'"]').not(l).each(function(){a(this).removeClass("jNiceChecked").siblings("input")[0].checked=false});return false});if(this.checked){a("a.jNiceRadio",k).addClass("jNiceChecked")}});a("select",this).each(function(m){var l=a(this);a(this).addClass("jNiceHidden").wrap('<div class="jNiceSelectWrapper"></div>');var n=a(this).parent().css({zIndex:100-m});n.prepend('<div><span></span><a href="#" class="jNiceSelectOpen"></a></div><ul></ul>');var k=a("ul",n);a("option",this).each(function(o){k.append('<li><a href="#" index="'+o+'">'+this.text+"</a></li>")});k.hide().find("a").click(function(){a("a.selected",n).removeClass("selected");a(this).addClass("selected");if(l[0].selectedIndex!=a(this).attr("index")&&l[0].onchange){l[0].selectedIndex=a(this).attr("index");l[0].onchange()}l[0].selectedIndex=a(this).attr("index");a("span:eq(0)",n).html(a(this).html());k.hide();return false});a("a:eq("+this.selectedIndex+")",k).click()});a("a.jNiceSelectOpen",this).click(function(){var k=a(this).parent().siblings("ul");if(k.css("display")=="none"){f()}k.slideToggle();var l=(a("a.selected",k).offset().top-k.offset().top);k.animate({scrollTop:l});return false})});var f=function(){a(".jNiceSelectWrapper ul:visible").hide()};var b=function(i){if(a(i.target).parents(".jNiceSelectWrapper").length===0){f()}};a(document).mousedown(b);var e=function(j){var i;a(".jNiceSelectWrapper select",j).each(function(){i=(this.selectedIndex<0)?0:this.selectedIndex;a("ul",a(this).parent()).each(function(){a("a:eq("+i+")",this).click()})});a("a.jNiceCheckbox, a.jNiceRadio",j).removeClass("jNiceChecked");a("input:checkbox, input:radio",j).each(function(){if(this.checked){a("a",a(this).parent()).addClass("jNiceChecked")}})};this.bind("reset",function(){var i=function(){e(this)};window.setTimeout(i,10)})};a(function(){a(".jNice").jNice()})})(jQuery);(function(e){var b={},l,n,p,k=e.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),a=false;e.tooltip={blocked:false,defaults:{delay:200,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){e.tooltip.blocked=!e.tooltip.blocked}};e.fn.extend({tooltip:function(q){q=e.extend({},e.tooltip.defaults,q);i(q);return this.each(function(){e.data(this,"tooltip-settings",q);this.tooltipText=this.title;e(this).removeAttr("title");this.alt=""}).hover(m,f).click(f)},fixPNG:k?function(){return this.each(function(){var q=e(this).css("backgroundImage");if(q.match(/^url\(["']?(.*\.png)["']?\)$/i)){q=RegExp.$1;e(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+q+"')"}).each(function(){var r=e(this).css("position");if(r!="absolute"&&r!="relative"){e(this).css("position","relative")}})}})}:function(){return this},unfixPNG:k?function(){return this.each(function(){e(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){e(this)[e(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function i(q){if(b.parent){return}b.parent=e('<div id="'+q.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if(e.fn.bgiframe){b.parent.bgiframe()}b.title=e("h3",b.parent);b.body=e("div.body",b.parent);b.url=e("div.url",b.parent)}function c(q){return e.data(q,"tooltip-settings")}function g(q){if(c(this).delay){p=setTimeout(o,c(this).delay)}else{o()}a=!!c(this).track;e(document.body).bind("mousemove",d);d(q)}function m(){if(e.tooltip.blocked||this==l||(!this.tooltipText&&!c(this).bodyHandler)){return}l=this;n=this.tooltipText;if(c(this).bodyHandler){b.title.hide();var t=c(this).bodyHandler.call(this);if(t.nodeType||t.jquery){b.body.empty().append(t)}else{b.body.html(t)}b.body.show()}else{if(c(this).showBody){var s=n.split(c(this).showBody);b.title.html(s.shift()).show();b.body.empty();for(var r=0,q;q=s[r];r++){if(r>0){b.body.append("<br/>")}b.body.append(q)}b.body.hideWhenEmpty()}else{b.title.html(n).show();b.body.hide()}}if(c(this).showURL&&e(this).url()){b.url.html(e(this).url().replace("http://","")).show()}else{b.url.hide()}b.parent.addClass(c(this).extraClass);if(c(this).fixPNG){b.parent.fixPNG()}g.apply(this,arguments)}function o(){p=null;b.parent.show();d()}function d(s){if(e.tooltip.blocked){return}if(!a&&b.parent.is(":visible")){e(document.body).unbind("mousemove",d)}if(l==null){e(document.body).unbind("mousemove",d);return}b.parent.removeClass("viewport-right").removeClass("viewport-bottom");var u=b.parent[0].offsetLeft;var t=b.parent[0].offsetTop;if(s){u=s.pageX+c(l).left;t=s.pageY+c(l).top;b.parent.css({left:u+"px",top:t+"px"})}var q=j(),r=b.parent[0];if(q.x+q.cx<r.offsetLeft+r.offsetWidth){u-=r.offsetWidth+20+c(l).left;b.parent.css({left:u+"px"}).addClass("viewport-right")}if(q.y+q.cy<r.offsetTop+r.offsetHeight){t-=r.offsetHeight+20+c(l).top;b.parent.css({top:t+"px"}).addClass("viewport-bottom")}}function j(){return{x:e(window).scrollLeft(),y:e(window).scrollTop(),cx:e(window).width(),cy:e(window).height()}}function f(q){if(e.tooltip.blocked){return}if(p){clearTimeout(p)}l=null;b.parent.hide().removeClass(c(this).extraClass);if(c(this).fixPNG){b.parent.unfixPNG()}}e.fn.Tooltip=e.fn.tooltip})(jQuery);jQuery.extend(jQuery.easing,{easein:function(e,f,a,i,g){return i*(f/=g)*f+a},easeinout:function(e,f,a,j,i){if(f<i/2){return 2*j*f*f/(i*i)+a}var g=f-i/2;return -2*j*g*g/(i*i)+2*j*g/i+j/2+a},easeout:function(e,f,a,i,g){return -i*f*f/(g*g)+2*i*f/g+a},expoin:function(e,f,a,j,i){var g=1;if(j<0){g*=-1;j*=-1}return g*(Math.exp(Math.log(j)/i*f))+a},expoout:function(e,f,a,j,i){var g=1;if(j<0){g*=-1;j*=-1}return g*(-Math.exp(-Math.log(j)/i*(f-i))+j+1)+a},expoinout:function(e,f,a,j,i){var g=1;if(j<0){g*=-1;j*=-1}if(f<i/2){return g*(Math.exp(Math.log(j/2)/(i/2)*f))+a}return g*(-Math.exp(-2*Math.log(j/2)/i*(f-i))+j+1)+a},bouncein:function(e,f,a,i,g){return i-jQuery.easing.bounceout(e,g-f,0,i,g)+a},bounceout:function(e,f,a,i,g){if((f/=g)<(1/2.75)){return i*(7.5625*f*f)+a}else{if(f<(2/2.75)){return i*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return i*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return i*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},bounceinout:function(e,f,a,i,g){if(f<g/2){return jQuery.easing.bouncein(e,f*2,0,i,g)*0.5+a}return jQuery.easing.bounceout(e,f*2-g,0,i,g)*0.5+i*0.5+a},elasin:function(f,i,e,m,l){var j=1.70158;var k=0;var g=m;if(i==0){return e}if((i/=l)==1){return e+m}if(!k){k=l*0.3}if(g<Math.abs(m)){g=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/g)}return -(g*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+e},elasout:function(f,i,e,m,l){var j=1.70158;var k=0;var g=m;if(i==0){return e}if((i/=l)==1){return e+m}if(!k){k=l*0.3}if(g<Math.abs(m)){g=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/g)}return g*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+e},elasinout:function(f,i,e,m,l){var j=1.70158;var k=0;var g=m;if(i==0){return e}if((i/=l/2)==2){return e+m}if(!k){k=l*(0.3*1.5)}if(g<Math.abs(m)){g=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/g)}if(i<1){return -0.5*(g*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+e}return g*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+e},backin:function(e,f,a,j,i){var g=1.70158;return j*(f/=i)*f*((g+1)*f-g)+a},backout:function(e,f,a,j,i){var g=1.70158;return j*((f=f/i-1)*f*((g+1)*f+g)+1)+a},backinout:function(e,f,a,j,i){var g=1.70158;if((f/=i/2)<1){return j/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return j/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a}});(function(a){a.fn.extend({autocomplete:function(b,c){var d=typeof b=="string";c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c);c.highlight=c.highlight||function(e){return e};c.formatMatch=c.formatMatch||c.formatItem;return this.each(function(){new a.Autocompleter(this,c)})},result:function(b){return this.bind("result",b)},search:function(b){return this.trigger("search",[b])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(b){return this.trigger("setOptions",[b])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(m,g){var c={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var b=a(m).attr("autocomplete","off").addClass(g.inputClass);var k;var q="";var n=a.Autocompleter.Cache(g);var e=0;var v;var y={mouseDownOnSelect:false};var s=a.Autocompleter.Select(g,m,d,y);var x;a.browser.opera&&a(m.form).bind("submit.autocomplete",function(){if(x){x=false;return false}});b.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(z){v=z.keyCode;switch(z.keyCode){case c.UP:z.preventDefault();if(s.visible()){s.prev()}else{u(0,true)}break;case c.DOWN:z.preventDefault();if(s.visible()){s.next()}else{u(0,true)}break;case c.PAGEUP:z.preventDefault();if(s.visible()){s.pageUp()}else{u(0,true)}break;case c.PAGEDOWN:z.preventDefault();if(s.visible()){s.pageDown()}else{u(0,true)}break;case g.multiple&&a.trim(g.multipleSeparator)==","&&c.COMMA:case c.TAB:case c.RETURN:if(d()){z.preventDefault();x=true;return false}break;case c.ESC:s.hide();break;default:clearTimeout(k);k=setTimeout(u,g.delay);break}}).focus(function(){e++}).blur(function(){e=0;if(!y.mouseDownOnSelect){t()}}).click(function(){if(e++>1&&!s.visible()){u(0,true)}}).bind("search",function(){var z=(arguments.length>1)?arguments[1]:null;function A(E,D){var B;if(D&&D.length){for(var C=0;C<D.length;C++){if(D[C].result.toLowerCase()==E.toLowerCase()){B=D[C];break}}}if(typeof z=="function"){z(B)}else{b.trigger("result",B&&[B.data,B.value])}}a.each(i(b.val()),function(B,C){f(C,A,A)})}).bind("flushCache",function(){n.flush()}).bind("setOptions",function(){a.extend(g,arguments[1]);if("data" in arguments[1]){n.populate()}}).bind("unautocomplete",function(){s.unbind();b.unbind();a(m.form).unbind(".autocomplete")});function d(){var A=s.selected();if(!A){return false}var z=A.result;q=z;if(g.multiple){var B=i(b.val());if(B.length>1){z=B.slice(0,B.length-1).join(g.multipleSeparator)+g.multipleSeparator+z}z+=g.multipleSeparator}b.val(z);w();b.trigger("result",[A.data,A.value]);return true}function u(B,A){if(v==c.DEL){s.hide();return}var z=b.val();if(!A&&z==q){return}q=z;z=j(z);if(z.length>=g.minChars){b.addClass(g.loadingClass);if(!g.matchCase){z=z.toLowerCase()}f(z,l,w)}else{o();s.hide()}}function i(A){if(!A){return[""]}var B=A.split(g.multipleSeparator);var z=[];a.each(B,function(C,D){if(a.trim(D)){z[C]=a.trim(D)}});return z}function j(z){if(!g.multiple){return z}var A=i(z);return A[A.length-1]}function r(z,A){if(g.autoFill&&(j(b.val()).toLowerCase()==z.toLowerCase())&&v!=c.BACKSPACE){b.val(b.val()+A.substring(j(q).length));a.Autocompleter.Selection(m,q.length,q.length+A.length)}}function t(){clearTimeout(k);k=setTimeout(w,200)}function w(){var z=s.visible();s.hide();clearTimeout(k);o();if(g.mustMatch){b.search(function(A){if(!A){if(g.multiple){var B=i(b.val()).slice(0,-1);b.val(B.join(g.multipleSeparator)+(B.length?g.multipleSeparator:""))}else{b.val("")}}})}if(z){a.Autocompleter.Selection(m,m.value.length,m.value.length)}}function l(A,z){if(z&&z.length&&e){o();s.display(z,A);r(A,z[0].value);s.show()}else{w()}}function f(A,C,z){if(!g.matchCase){A=A.toLowerCase()}var B=n.load(A);if(B&&B.length){C(A,B)}else{if((typeof g.url=="string")&&(g.url.length>0)){var D={timestamp:+new Date()};a.each(g.extraParams,function(E,F){D[E]=typeof F=="function"?F():F});a.ajax({mode:"abort",port:"autocomplete"+m.name,dataType:g.dataType,url:g.url,data:a.extend({q:j(A),limit:g.max},D),success:function(F){var E=g.parse&&g.parse(F)||p(F);n.add(A,E);C(A,E)}})}else{s.emptyList();z(A)}}}function p(C){var z=[];var B=C.split("\n");for(var A=0;A<B.length;A++){var D=a.trim(B[A]);if(D){D=D.split("|");z[z.length]={data:D,value:D[0],result:g.formatResult&&g.formatResult(D,D[0])||D[0]}}}return z}function o(){b.removeClass(g.loadingClass)}};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(b){return b[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,b){return c.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(c){var f={};var d=0;function i(l,k){if(!c.matchCase){l=l.toLowerCase()}var j=l.indexOf(k);if(j==-1){return false}return j==0||c.matchContains}function g(k,j){if(d>c.cacheLength){b()}if(!f[k]){d++}f[k]=j}function e(){if(!c.data){return false}var k={},j=0;if(!c.url){c.cacheLength=1}k[""]=[];for(var m=0,l=c.data.length;m<l;m++){var p=c.data[m];p=(typeof p=="string")?[p]:p;var o=c.formatMatch(p,m+1,c.data.length);if(o===false){continue}var n=o.charAt(0).toLowerCase();if(!k[n]){k[n]=[]}var q={value:o,data:p,result:c.formatResult&&c.formatResult(p)||o};k[n].push(q);if(j++<c.max){k[""].push(q)}}a.each(k,function(r,s){c.cacheLength++;g(r,s)})}setTimeout(e,25);function b(){f={};d=0}return{flush:b,add:g,populate:e,load:function(n){if(!c.cacheLength||!d){return null}if(!c.url&&c.matchContains){var m=[];for(var j in f){if(j.length>0){var o=f[j];a.each(o,function(p,k){if(i(k.value,n)){m.push(k)}})}}return m}else{if(f[n]){return f[n]}else{if(c.matchSubset){for(var l=n.length-1;l>=c.minChars;l--){var o=f[n.substr(0,l)];if(o){var m=[];a.each(o,function(p,k){if(i(k.value,n)){m[m.length]=k}});return m}}}}}return null}}};a.Autocompleter.Select=function(e,k,m,q){var j={ACTIVE:"ac_over"};var l,f=-1,s,n="",t=true,c,p;function o(){if(!t){return}c=a("<div/>").hide().addClass(e.resultsClass).css("position","absolute").appendTo(document.body);p=a("<ul/>").appendTo(c).mouseover(function(u){if(r(u).nodeName&&r(u).nodeName.toUpperCase()=="LI"){f=a("li",p).removeClass(j.ACTIVE).index(r(u));a(r(u)).addClass(j.ACTIVE)}}).click(function(u){a(r(u)).addClass(j.ACTIVE);m();k.focus();return false}).mousedown(function(){q.mouseDownOnSelect=true}).mouseup(function(){q.mouseDownOnSelect=false});if(e.width>0){c.css("width",e.width)}t=false}function r(v){var u=v.target;while(u&&u.tagName!="LI"){u=u.parentNode}if(!u){return[]}return u}function i(u){l.slice(f,f+1).removeClass(j.ACTIVE);g(u);var w=l.slice(f,f+1).addClass(j.ACTIVE);if(e.scroll){var v=0;l.slice(0,f).each(function(){v+=this.offsetHeight});if((v+w[0].offsetHeight-p.scrollTop())>p[0].clientHeight){p.scrollTop(v+w[0].offsetHeight-p.innerHeight())}else{if(v<p.scrollTop()){p.scrollTop(v)}}}}function g(u){f+=u;if(f<0){f=l.size()-1}else{if(f>=l.size()){f=0}}}function b(u){return e.max&&e.max<u?e.max:u}function d(){p.empty();var v=b(s.length);for(var w=0;w<v;w++){if(!s[w]){continue}var x=e.formatItem(s[w].data,w+1,v,s[w].value,n);if(x===false){continue}var u=a("<li/>").html(e.highlight(x,n)).addClass(w%2==0?"ac_even":"ac_odd").appendTo(p)[0];a.data(u,"ac_data",s[w])}l=p.find("li");if(e.selectFirst){l.slice(0,1).addClass(j.ACTIVE);f=0}if(a.fn.bgiframe){p.bgiframe()}}return{display:function(v,u){o();s=v;n=u;d()},next:function(){i(1)},prev:function(){i(-1)},pageUp:function(){if(f!=0&&f-8<0){i(-f)}else{i(-8)}},pageDown:function(){if(f!=l.size()-1&&f+8>l.size()){i(l.size()-1-f)}else{i(8)}},hide:function(){c&&c.hide();l&&l.removeClass(j.ACTIVE);f=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(l.filter("."+j.ACTIVE)[0]||e.selectFirst&&l[0])},show:function(){var w=a(k).offset();c.css({width:typeof e.width=="string"||e.width>0?e.width:a(k).width(),top:w.top+k.offsetHeight,left:w.left}).show();if(e.scroll){p.scrollTop(0);p.css({maxHeight:e.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var u=0;l.each(function(){u+=this.offsetHeight});var v=u>e.scrollHeight;p.css("height",v?e.scrollHeight:u);if(!v){l.width(p.width()-parseInt(l.css("padding-left"))-parseInt(l.css("padding-right")))}}}},selected:function(){var u=l&&l.filter("."+j.ACTIVE).removeClass(j.ACTIVE);return u&&u.length&&a.data(u[0],"ac_data")},emptyList:function(){p&&p.empty()},unbind:function(){c&&c.remove()}}};a.Autocompleter.Selection=function(d,e,c){if(d.createTextRange){var b=d.createTextRange();b.collapse(true);b.moveStart("character",e);b.moveEnd("character",c);b.select()}else{if(d.setSelectionRange){d.setSelectionRange(e,c)}else{if(d.selectionStart){d.selectionStart=e;d.selectionEnd=c}}}d.focus()}})(jQuery);(function(e){e.ui=e.ui||{};e.fn.extend({accordion:function(i,j){var g=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof i=="string"){var k=e.data(this,"ui-accordion");k[i].apply(k,g)}else{if(!e(this).is(".ui-accordion")){e.data(this,"ui-accordion",new e.ui.accordion(this,i))}}})},activate:function(g){return this.accordion("activate",g)}});e.ui.accordion=function(g,i){this.options=i=e.extend({},e.ui.accordion.defaults,i);this.element=g;e(g).addClass("ui-accordion");if(i.navigation){var l=e(g).find("a").filter(i.navigationFilter);if(l.length){if(l.filter(i.header).length){i.active=l}else{i.active=l.parent().parent().prev();l.addClass("current")}}}i.headers=e(g).find(i.header);i.active=c(i.headers,i.active);if(i.fillSpace){var k=e(g).parent().height();i.headers.each(function(){k-=e(this).outerHeight()});var j=0;i.headers.next().each(function(){j=Math.max(j,e(this).innerHeight()-e(this).height())}).height(k-j)}else{if(i.autoheight){var k=0;i.headers.next().each(function(){k=Math.max(k,e(this).outerHeight())}).height(k)}}i.headers.not(i.active||"").next().hide();i.active.parent().andSelf().addClass(i.selectedClass);if(i.event){e(g).bind((i.event)+".ui-accordion",f)}};e.ui.accordion.prototype={activate:function(g){f.call(this.element,{target:c(this.options.headers,g)[0]})},enable:function(){this.options.disabled=false},disable:function(){this.options.disabled=true},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoheight){this.options.headers.next().css("height","")}e.removeData(this.element,"ui-accordion");e(this.element).removeClass("ui-accordion").unbind(".ui-accordion")}};function b(i,g){return function(){return i.apply(g,arguments)}}function d(j){if(!e.data(this,"ui-accordion")){return}var g=e.data(this,"ui-accordion");var i=g.options;i.running=j?0:--i.running;if(i.running){return}if(i.clearStyle){i.toShow.add(i.toHide).css({height:"",overflow:""})}e(this).triggerHandler("change.ui-accordion",[i.data],i.change)}function a(g,l,m,k,n){var j=e.data(this,"ui-accordion").options;j.toShow=g;j.toHide=l;j.data=m;var i=b(d,this);j.running=l.size()==0?g.size():l.size();if(j.animated){if(!j.alwaysOpen&&k){e.ui.accordion.animations[j.animated]({toShow:jQuery([]),toHide:l,complete:i,down:n,autoheight:j.autoheight})}else{e.ui.accordion.animations[j.animated]({toShow:g,toHide:l,complete:i,down:n,autoheight:j.autoheight})}}else{if(!j.alwaysOpen&&k){g.toggle()}else{l.hide();g.show()}i(true)}}function f(m){var k=e.data(this,"ui-accordion").options;if(k.disabled){return false}if(!m.target&&!k.alwaysOpen){k.active.parent().andSelf().toggleClass(k.selectedClass);var j=k.active.next(),n={instance:this,options:k,newHeader:jQuery([]),oldHeader:k.active,newContent:jQuery([]),oldContent:j},g=k.active=e([]);a.call(this,g,j,n);return false}var l=e(m.target);if(l.parents(k.header).length){while(!l.is(k.header)){l=l.parent()}}var i=l[0]==k.active[0];if(k.running||(k.alwaysOpen&&i)){return false}if(!l.is(k.header)){return}k.active.parent().andSelf().toggleClass(k.selectedClass);if(!i){l.parent().andSelf().addClass(k.selectedClass)}var g=l.next(),j=k.active.next(),n={instance:this,options:k,newHeader:l,oldHeader:k.active,newContent:g,oldContent:j},o=k.headers.index(k.active[0])>k.headers.index(l[0]);k.active=i?e([]):l;a.call(this,g,j,n,i,o);return false}function c(i,g){return g!=undefined?typeof g=="number"?i.filter(":eq("+g+")"):i.not(i.not(g)):g===false?e([]):i.filter(":eq(0)")}e.extend(e.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoheight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(g,j){g=e.extend({easing:"swing",duration:300},g,j);if(!g.toHide.size()){g.toShow.animate({height:"show"},g);return}var i=g.toHide.height(),k=g.toShow.height(),l=k/i;g.toShow.css({height:0,overflow:"hidden"}).show();g.toHide.filter(":hidden").each(g.complete).end().filter(":visible").animate({height:"hide"},{step:function(m){var n=(i-m)*l;if(e.browser.msie||e.browser.opera){n=Math.ceil(n)}g.toShow.height(n)},duration:g.duration,easing:g.easing,complete:function(){if(!g.autoheight){g.toShow.css("height","auto")}g.complete()}})},bounceslide:function(g){this.slide(g,{easing:g.down?"bounceout":"swing",duration:g.down?1000:200})},easeslide:function(g){this.slide(g,{easing:"easeinout",duration:700})}}})})(jQuery);(function(i){i.tools=i.tools||{};i.tools.overlay={version:"1.1.2",addEffect:function(c,b,a){e[c]=[b,a]},conf:{top:"10%",left:"center",absolute:false,speed:"normal",closeSpeed:"fast",effect:"default",close:null,oneInstance:true,closeOnClick:true,closeOnEsc:true,api:false,expose:null,target:null}};var e={};i.tools.overlay.addEffect("default",function(a){this.getOverlay().fadeIn(this.getConf().speed,a)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});var g=[];function f(t,p){var a=this,c=i(this),b=i(window),q,r,s,v=p.expose&&i.tools.expose.version;var u=p.target||t.attr("rel");r=u?i(u):null||t;if(!r.length){throw"Could not find Overlay: "+u}if(t&&t.index(r)==-1){t.click(function(j){a.load(j);return j.preventDefault()})}i.each(p,function(k,j){if(i.isFunction(j)){c.bind(k,j)}});i.extend(a,{load:function(j){if(a.isOpened()){return a}var m=e[p.effect];if(!m){throw'Overlay: cannot find effect : "'+p.effect+'"'}if(p.oneInstance){i.each(g,function(){this.close(j)})}j=j||i.Event();j.type="onBeforeLoad";c.trigger(j);if(j.isDefaultPrevented()){return a}s=true;if(v){r.expose().load(j)}var k=p.top;var l=p.left;var o=r.outerWidth({margin:true});var n=r.outerHeight({margin:true});if(typeof k=="string"){k=k=="center"?Math.max((b.height()-n)/2,0):parseInt(k,10)/100*b.height()}if(l=="center"){l=Math.max((b.width()-o)/2,0)}if(!p.absolute){k+=b.scrollTop();l+=b.scrollLeft()}r.css({top:k,left:l,position:"absolute"});j.type="onStart";c.trigger(j);m[0].call(a,function(){if(s){j.type="onLoad";c.trigger(j)}});if(p.closeOnClick){i(document).bind("click.overlay",function(x){if(!a.isOpened()){return}var y=i(x.target);if(y.parents(r).length>1){return}i.each(g,function(){this.close(x)})})}if(p.closeOnEsc){i(document).unbind("keydown.overlay").bind("keydown.overlay",function(w){if(w.keyCode==27){i.each(g,function(){this.close(w)})}})}return a},close:function(j){if(!a.isOpened()){return a}j=j||i.Event();j.type="onBeforeClose";c.trigger(j);if(j.isDefaultPrevented()){return}s=false;e[p.effect][1].call(a,function(){j.type="onClose";c.trigger(j)});var k=true;i.each(g,function(){if(this.isOpened()){k=false}});if(k){i(document).unbind("click.overlay").unbind("keydown.overlay")}return a},getContent:function(){return r},getOverlay:function(){return r},getTrigger:function(){return t},getClosers:function(){return q},isOpened:function(){return s},getConf:function(){return p},bind:function(k,j){c.bind(k,j);return a},unbind:function(j){c.unbind(j);return a}});i.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(k,j){a[j]=function(l){return a.bind(j,l)}});if(v){if(typeof p.expose=="string"){p.expose={color:p.expose}}i.extend(p.expose,{api:true,closeOnClick:p.closeOnClick,closeOnEsc:false});var d=r.expose(p.expose);d.onBeforeClose(function(j){a.close(j)});a.onClose(function(j){d.close(j)})}q=r.find(p.close||".close");if(!q.length&&!p.close){q=i('<div class="close"></div>');r.prepend(q)}q.click(function(j){a.close(j)})}i.fn.overlay=function(c){var b=this.eq(typeof c=="number"?c:0).data("overlay");if(b){return b}if(i.isFunction(c)){c={onBeforeLoad:c}}var a=i.extend({},i.tools.overlay.conf);c=i.extend(true,a,c);this.each(function(){b=new f(i(this),c);g.push(b);i(this).data("overlay",b)});return c.api?b:this}})(jQuery);(function(d){d.tools=d.tools||{};d.tools.expose={version:"1.0.5",conf:{maskId:null,loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,color:"#456",api:false}};function e(){if(d.browser.msie){var a=d(document).height(),b=d(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-b<20?b:a]}return[d(window).width(),d(document).height()]}function f(c,k){var m=this,a=d(this),n=null,l=false,b=0;d.each(k,function(i,g){if(d.isFunction(g)){a.bind(i,g)}});d(window).resize(function(){m.fit()});d.extend(this,{getMask:function(){return n},getExposed:function(){return c},getConf:function(){return k},isLoaded:function(){return l},load:function(o){if(l){return m}b=c.eq(0).css("zIndex");if(k.maskId){n=d("#"+k.maskId)}if(!n||!n.length){var i=e();n=d("<div/>").css({position:"absolute",top:0,left:0,width:i[0],height:i[1],display:"none",opacity:0,zIndex:k.zIndex});if(k.maskId){n.attr("id",k.maskId)}d("body").append(n);var j=n.css("backgroundColor");if(!j||j=="transparent"||j=="rgba(0, 0, 0, 0)"){n.css("backgroundColor",k.color)}if(k.closeOnEsc){d(document).bind("keydown.unexpose",function(p){if(p.keyCode==27){m.close()}})}if(k.closeOnClick){n.bind("click.unexpose",function(p){m.close(p)})}}o=o||d.Event();o.type="onBeforeLoad";a.trigger(o);if(o.isDefaultPrevented()){return m}d.each(c,function(){var p=d(this);if(!/relative|absolute|fixed/i.test(p.css("position"))){p.css("position","relative")}});c.css({zIndex:Math.max(k.zIndex+1,b=="auto"?0:b)});var g=n.height();if(!this.isLoaded()){n.css({opacity:0,display:"block"}).fadeTo(k.loadSpeed,k.opacity,function(){if(n.height()!=g){n.css("height",g)}o.type="onLoad";a.trigger(o)})}l=true;return m},close:function(g){if(!l){return m}g=g||d.Event();g.type="onBeforeClose";a.trigger(g);if(g.isDefaultPrevented()){return m}n.fadeOut(k.closeSpeed,function(){g.type="onClose";a.trigger(g);c.css({zIndex:d.browser.msie?b:null})});l=false;return m},fit:function(){if(n){var g=e();n.css({width:g[0],height:g[1]})}},bind:function(i,g){a.bind(i,g);return m},unbind:function(g){a.unbind(g);return m}});d.each("onBeforeLoad,onLoad,onBeforeClose,onClose".split(","),function(i,g){m[g]=function(j){return m.bind(g,j)}})}d.fn.expose=function(c){var b=this.eq(typeof c=="number"?c:0).data("expose");if(b){return b}if(typeof c=="string"){c={color:c}}var a=d.extend({},d.tools.expose.conf);c=d.extend(a,c);this.each(function(){b=new f(d(this),c);d(this).data("expose",b)});return c.api?b:this}})(jQuery);