jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyInit:function(d){jQuery.historyCallback=d;var a=location.hash;jQuery.historyCurrentHash=a;if(jQuery.browser.msie){if(jQuery.historyCurrentHash==""){jQuery.historyCurrentHash="#"}$("body").append('<iframe id="jQuery_history" width="0" height="0" style="visibility: hidden"></iframe>');var b=$("#jQuery_history")[0];var c=b.contentWindow.document;c.open();c.close();c.location.hash=a}else{if($.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.isFirst=true}}if(jQuery.browser.msie&&$.browser.version=="6.0"){a=AddQueryString(a)}jQuery.historyCallback(a.replace(/^#/,""));setInterval(jQuery.historyCheck,100)},historyAddHistory:function(a){jQuery.historyBackStack.push(a);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if(jQuery.browser.msie){var b=$("#jQuery_history")[0];var c=b.contentDocument||b.contentWindow.document;var a=c.location.hash;if(a!=jQuery.historyCurrentHash){location.hash=a;jQuery.historyCurrentHash=a;if($.browser.version=="6.0"){a=AddQueryString(a)}jQuery.historyCallback(a.replace(/^#/,""))}}else{if($.browser.safari){if(!jQuery.dontCheck){var e=history.length-jQuery.historyBackStack.length;if(e){jQuery.isFirst=false;if(e<0){for(var d=0;d<Math.abs(e);d++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(var d=0;d<e;d++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var f=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(f!=undefined){jQuery.historyCurrentHash=location.hash;jQuery.historyCallback(f)}}else{if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(document.URL.indexOf("#")>=0){jQuery.historyCallback(document.URL.split("#")[1])}else{var a=location.hash;jQuery.historyCallback("")}jQuery.isFirst=true}}}}else{var a=location.hash;if(a!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=a;jQuery.historyCallback(a.replace(/^#/,""))}}}},historyLoad:function(b){var e;if(jQuery.browser.safari){e=b}else{e="#"+b;if($.browser.msie&&$.browser.version=="6.0"){e=RemoveQueryString(e)}location.hash=e}jQuery.historyCurrentHash=e;if(jQuery.browser.msie){var c=$("#jQuery_history")[0];var d=c.contentWindow.document;d.open();d.close();d.location.hash=e;if($.browser.version=="6.0"){b=AddQueryString(b)}jQuery.historyCallback(b)}else{if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(b);var a=function(){jQuery.dontCheck=false};window.setTimeout(a,200);jQuery.historyCallback(b);location.hash=e}else{jQuery.historyCallback(b)}}}});function RemoveQueryString(a){var b=a.split("?");if(b.length>1){a=b[0];query=b[1];a+="__qs="+query}return a}function AddQueryString(a){var b=a.split("__qs=");if(b.length>1){a=b[0];query=b[1];a+="?"+query}return a};(function(a){a.fn.extend({autocomplete:function(b,d){var c=typeof b=="string";d=a.extend({},a.Autocompleter.defaults,{url:c?b:null,data:c?null:b,delay:c?a.Autocompleter.defaults.delay:10,max:d&&!d.scroll?10:150},d);d.highlight=d.highlight||function(e){return e};d.formatMatch=d.formatMatch||d.formatItem;return this.each(function(){new a.Autocompleter(this,d)})},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(s,m){var x={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var i=a(s).attr("autocomplete","off").addClass(m.inputClass);var p;var b="";var t=a.Autocompleter.Cache(m);var k=0;var n;var e={mouseDownOnSelect:false};var r=a.Autocompleter.Select(m,s,j,e);var q;a.browser.opera&&a(s.form).bind("submit.autocomplete",function(){if(q){q=false;return false}});i.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(y){n=y.keyCode;switch(y.keyCode){case x.UP:y.preventDefault();if(r.visible()){r.prev()}else{w(0,true)}break;case x.DOWN:y.preventDefault();if(r.visible()){r.next()}else{w(0,true)}break;case x.PAGEUP:y.preventDefault();if(r.visible()){r.pageUp()}else{w(0,true)}break;case x.PAGEDOWN:y.preventDefault();if(r.visible()){r.pageDown()}else{w(0,true)}break;case m.multiple&&a.trim(m.multipleSeparator)==","&&x.COMMA:case x.TAB:case x.RETURN:if(j()){y.preventDefault();q=true;return false}break;case x.ESC:r.hide();break;default:clearTimeout(p);p=setTimeout(w,m.delay);break}}).focus(function(){k++}).blur(function(){k=0;if(!e.mouseDownOnSelect){f()}}).click(function(){if(k++>1&&!r.visible()){w(0,true)}}).bind("search",function(){var y=(arguments.length>1)?arguments[1]:null;function z(D,B){var A;if(B&&B.length){for(var C=0;C<B.length;C++){if(B[C].result.toLowerCase()==D.toLowerCase()){A=B[C];break}}}if(typeof y=="function"){y(A)}else{i.trigger("result",A&&[A.data,A.value])}}a.each(c(i.val()),function(B,A){v(A,z,z)})}).bind("flushCache",function(){t.flush()}).bind("setOptions",function(){a.extend(m,arguments[1]);if("data" in arguments[1]){t.populate()}}).bind("unautocomplete",function(){r.unbind();i.unbind();a(s.form).unbind(".autocomplete")});function j(){var A=r.selected();if(!A){return false}var y=A.result;b=y;if(m.multiple){var z=c(i.val());if(z.length>1){y=z.slice(0,z.length-1).join(m.multipleSeparator)+m.multipleSeparator+y}y+=m.multipleSeparator}i.val(y);g();i.trigger("result",[A.data,A.value]);return true}function w(y,z){if(n==x.DEL){r.hide();return}var A=i.val();if(!z&&A==b){return}b=A;A=l(A);if(A.length>=m.minChars){i.addClass(m.loadingClass);if(!m.matchCase){A=A.toLowerCase()}v(A,o,g)}else{u();r.hide()}}function c(y){if(!y){return[""]}var A=y.split(m.multipleSeparator);var z=[];a.each(A,function(C,B){if(a.trim(B)){z[C]=a.trim(B)}});return z}function l(y){if(!m.multiple){return y}var z=c(y);return z[z.length-1]}function d(z,y){if(m.autoFill&&(l(i.val()).toLowerCase()==z.toLowerCase())&&n!=x.BACKSPACE){i.val(i.val()+y.substring(l(b).length));a.Autocompleter.Selection(s,b.length,b.length+y.length)}}function f(){clearTimeout(p);p=setTimeout(g,200)}function g(){var y=r.visible();r.hide();clearTimeout(p);u();if(m.mustMatch){i.search(function(z){if(!z){if(m.multiple){var A=c(i.val()).slice(0,-1);i.val(A.join(m.multipleSeparator)+(A.length?m.multipleSeparator:""))}else{i.val("")}}})}if(y){a.Autocompleter.Selection(s,s.value.length,s.value.length)}}function o(z,y){if(y&&y.length&&k){u();r.display(y,z);d(z,y[0].value);r.show()}else{g()}}function v(B,y,z){if(!m.matchCase){B=B.toLowerCase()}var C=t.load(B);if(C&&C.length){y(B,C)}else{if((typeof m.url=="string")&&(m.url.length>0)){var A={timestamp:+new Date()};a.each(m.extraParams,function(D,E){A[D]=typeof E=="function"?E():E});a.ajax({mode:"abort",port:"autocomplete"+s.name,dataType:m.dataType,url:m.url,data:a.extend({q:l(B),limit:m.max},A),success:function(E){var D=m.parse&&m.parse(E)||h(E);t.add(B,D);y(B,D)}})}else{r.emptyList();z(B)}}}function h(C){var A=[];var B=C.split("\n");for(var z=0;z<B.length;z++){var y=a.trim(B[z]);if(y){y=y.split("|");A[A.length]={data:y,value:y[0],result:m.formatResult&&m.formatResult(y,y[0])||y[0]}}}return A}function u(){i.removeClass(m.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]+b[1]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(b,c){return b.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+c.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(f){var h={};var g=0;function b(k,j){if(!f.matchCase){k=k.toLowerCase()}var l=k.indexOf(j);if(l==-1){return false}return l==0||f.matchContains}function d(j,i){if(g>f.cacheLength){c()}if(!h[j]){g++}h[j]=i}function e(){if(!f.data){return false}var m={},o=0;if(!f.url){f.cacheLength=1}m[""]=[];for(var j=0,k=f.data.length;j<k;j++){var q=f.data[j];q=(typeof q=="string")?[q]:q;var l=f.formatMatch(q,j+1,f.data.length);if(l===false){continue}var p=l.charAt(0).toLowerCase();if(!m[p]){m[p]=[]}var n={value:l,data:q,result:f.formatResult&&f.formatResult(q)||l};m[p].push(n);if(o++<f.max){m[""].push(n)}}a.each(m,function(s,r){f.cacheLength++;d(s,r)})}setTimeout(e,25);function c(){h={};g=0}return{flush:c,add:d,populate:e,load:function(o){if(!f.cacheLength||!g){return null}if(!f.url&&f.matchContains){var j=[];for(var n in h){if(n.length>0){var l=h[n];a.each(l,function(p,k){if(b(k.value,o)){j.push(k)}})}}return j}else{if(h[o]){return h[o]}else{if(f.matchSubset){for(var m=o.length-1;m>=f.minChars;m--){var l=h[o.substr(0,m)];if(l){var j=[];a.each(l,function(p,k){if(b(k.value,o)){j[j.length]=k}});return j}}}}}return null}}};a.Autocompleter.Select=function(c,q,p,b){var l={ACTIVE:"ac_over"};var k,f=-1,e,s="",d=true,j,o;function n(){if(!d){return}j=a("<div/>").hide().addClass(c.resultsClass).css("position","absolute").appendTo(document.body);o=a("<ul/>").appendTo(j).mouseover(function(t){if(r(t).nodeName&&r(t).nodeName.toUpperCase()=="LI"){f=a("li",o).removeClass(l.ACTIVE).index(r(t));a(r(t)).addClass(l.ACTIVE)}}).click(function(t){a(r(t)).addClass(l.ACTIVE);p();q.focus();return false}).mousedown(function(){b.mouseDownOnSelect=true}).mouseup(function(){b.mouseDownOnSelect=false});if(c.width>0){j.css("width",c.width)}d=false}function r(t){var u=t.target;while(u&&u.tagName!="LI"){u=u.parentNode}if(!u){return[]}return u}function h(t){k.slice(f,f+1).removeClass(l.ACTIVE);g(t);var u=k.slice(f,f+1).addClass(l.ACTIVE);if(c.scroll){var v=0;k.slice(0,f).each(function(){v+=this.offsetHeight});if((v+u[0].offsetHeight-o.scrollTop())>o[0].clientHeight){o.scrollTop(v+u[0].offsetHeight-o.innerHeight())}else{if(v<o.scrollTop()){o.scrollTop(v)}}}}function g(t){f+=t;if(f<0){f=k.size()-1}else{if(f>=k.size()){f=0}}}function i(t){return c.max&&c.max<t?c.max:t}function m(){o.empty();var w=i(e.length);for(var v=0;v<w;v++){if(!e[v]){continue}var t=c.formatItem(e[v].data,v+1,w,e[v].value,s);if(t===false){continue}var u=a("<li/>").html(c.highlight(t,s)).addClass(v%2==0?"ac_even":"ac_odd").appendTo(o)[0];a.data(u,"ac_data",e[v])}k=o.find("li");if(c.selectFirst){k.slice(0,1).addClass(l.ACTIVE);f=0}if(a.fn.bgiframe){o.bgiframe()}}return{display:function(t,u){n();e=t;s=u;m()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){if(f!=0&&f-8<0){h(-f)}else{h(-8)}},pageDown:function(){if(f!=k.size()-1&&f+8>k.size()){h(k.size()-1-f)}else{h(8)}},hide:function(){j&&j.hide();k&&k.removeClass(l.ACTIVE);f=-1},visible:function(){return j&&j.is(":visible")},current:function(){return this.visible()&&(k.filter("."+l.ACTIVE)[0]||c.selectFirst&&k[0])},show:function(){var u=a(q).offset();j.css({width:typeof c.width=="string"||c.width>0?c.width:a(q).width(),top:u.top+q.offsetHeight,left:u.left}).show();if(c.scroll){if(o.scroll.scrollTop){o.scrollTop(0)}o.css({maxHeight:c.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var t=0;k.each(function(){t+=this.offsetHeight});var v=t>c.scrollHeight;o.css("height",v?c.scrollHeight:t);if(!v){k.width(o.width()-parseInt(k.css("padding-left"))-parseInt(k.css("padding-right")))}}}},selected:function(){var t=k&&k.filter("."+l.ACTIVE).removeClass(l.ACTIVE);return t&&t.length&&a.data(t[0],"ac_data")},emptyList:function(){o&&o.empty()},unbind:function(){j&&j.remove()}}};a.Autocompleter.Selection=function(e,c,d){if(e.createTextRange){var b=e.createTextRange();b.collapse(true);b.moveStart("character",c);b.moveEnd("character",d);b.select()}else{if(e.setSelectionRange){e.setSelectionRange(c,d)}else{if(e.selectionStart){e.selectionStart=c;e.selectionEnd=d}}}e.focus()}})(jQuery);if(window.jQuery){(function(a){if(a.browser.msie){try{document.execCommand("BackgroundImageCache",false,true)}catch(b){}}a.fn.rating=function(d){if(this.length==0){return this}if(typeof arguments[0]=="string"){if(this.length>1){var c=arguments;return this.each(function(){a.fn.rating.apply(a(this),c)})}a.fn.rating[arguments[0]].apply(this,a.makeArray(arguments).slice(1)||[]);return this}var d=a.extend({},a.fn.rating.options,d||{});a.fn.rating.calls++;this.not(".star-rating-applied").addClass("star-rating-applied").each(function(){var n,h=a(this);var e=(this.name||"unnamed-rating").replace(/\[|\]/g,"_").replace(/^\_+|\_+$/g,"");var k=a(this.form||document.body);var f=k.data("rating");if(!f||f.call!=a.fn.rating.calls){f={count:0,call:a.fn.rating.calls}}var m=f[e];if(m){n=m.data("rating")}if(m&&n){n.count++}else{n=a.extend({},d||{},(a.metadata?h.metadata():(a.meta?h.data():null))||{},{count:0,stars:[],inputs:[]});n.serial=f.count++;m=a('<span class="star-rating-control"/>');h.before(m);m.addClass("rating-to-be-drawn");if(h.attr("disabled")){n.readOnly=true}}var j=a('<div class="star-rating rater-'+n.serial+'"><a title="'+(this.title||this.value)+'">'+this.value+"</a></div>");m.append(j);if(this.id){j.attr("id",this.id)}if(this.className){j.addClass(this.className)}if(n.half){n.split=2}if(typeof n.split=="number"&&n.split>0){var g=(a.fn.width?j.width():0)||n.starWidth;var i=(n.count%n.split),l=Math.floor(g/n.split);j.width(l).find("a").css({"margin-left":"-"+(i*l)+"px"})}if(n.readOnly){j.addClass("star-rating-readonly")}else{j.addClass("star-rating-live").mouseover(function(){a(this).rating("fill");a(this).rating("focus")}).mouseout(function(){a(this).rating("draw");a(this).rating("blur")}).click(function(){a(this).rating("select")})}if(this.checked){n.current=j}h.hide();h.change(function(){a(this).rating("select")});j.data("rating.input",h.data("rating.star",j));n.stars[n.stars.length]=j[0];n.inputs[n.inputs.length]=h[0];n.rater=f[e]=m;n.context=k;h.data("rating",n);m.data("rating",n);j.data("rating",n);k.data("rating",f)});a(".rating-to-be-drawn").rating("draw").removeClass("rating-to-be-drawn");return this};a.extend(a.fn.rating,{calls:0,focus:function(){var c=this.data("rating");if(!c){return this}if(!c.focus){return this}var d=a(this).data("rating.input")||a(this.tagName=="INPUT"?this:null);if(c.focus){c.focus.apply(d[0],[d.val(),a("a",d.data("rating.star"))[0]])}},blur:function(){var c=this.data("rating");if(!c){return this}if(!c.blur){return this}var d=a(this).data("rating.input")||a(this.tagName=="INPUT"?this:null);if(c.blur){c.blur.apply(d[0],[d.val(),a("a",d.data("rating.star"))[0]])}},fill:function(){var c=this.data("rating");if(!c){return this}if(c.readOnly){return}this.rating("drain");this.prevAll().andSelf().filter(".rater-"+c.serial).addClass("star-rating-hover")},drain:function(){var c=this.data("rating");if(!c){return this}if(c.readOnly){return}c.rater.children().filter(".rater-"+c.serial).removeClass("star-rating-on").removeClass("star-rating-hover")},draw:function(){var c=this.data("rating");if(!c){return this}this.rating("drain");if(c.current){c.current.data("rating.input").attr("checked","checked");c.current.prevAll().andSelf().filter(".rater-"+c.serial).addClass("star-rating-on")}else{a(c.inputs).removeAttr("checked")}this.siblings()[c.readOnly?"addClass":"removeClass"]("star-rating-readonly")},select:function(c){var d=this.data("rating");if(!d){return this}if(d.readOnly){return}d.current=null;if(typeof c!="undefined"){if(typeof c=="number"){return a(d.stars[c]).rating("select")}if(typeof c=="string"){a.each(d.stars,function(){if(a(this).data("rating.input").val()==c){a(this).rating("select")}})}}else{d.current=this[0].tagName=="INPUT"?this.data("rating.star"):(this.is(".rater-"+d.serial)?this:null)}this.data("rating",d);this.rating("draw");var e=a(d.current?d.current.data("rating.input"):null);if(d.callback){d.callback.apply(e[0],[e.val(),a("a",d.current)[0]])}},readOnly:function(e,c){var d=this.data("rating");if(!d){return this}d.readOnly=e||e==undefined?true:false;if(c){a(d.inputs).attr("disabled","disabled")}else{a(d.inputs).removeAttr("disabled")}this.data("rating",d);this.rating("draw")},disable:function(){this.rating("readOnly",true,true)},enable:function(){this.rating("readOnly",false,false)}});a.fn.rating.options={split:0,starWidth:16};a(function(){a("input[type=radio].star").rating()})})(jQuery)};jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,e,f,g,h){return jQuery.easing[jQuery.easing.def](a,e,f,g,h)},easeInQuad:function(a,e,f,g,h){return g*(e/=h)*e+f},easeOutQuad:function(a,e,f,g,h){return -g*(e/=h)*(e-2)+f},easeInOutQuad:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e+f}return -g/2*((--e)*(e-2)-1)+f},easeInCubic:function(a,e,f,g,h){return g*(e/=h)*e*e+f},easeOutCubic:function(a,e,f,g,h){return g*((e=e/h-1)*e*e+1)+f},easeInOutCubic:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e+f}return g/2*((e-=2)*e*e+2)+f},easeInQuart:function(a,e,f,g,h){return g*(e/=h)*e*e*e+f},easeOutQuart:function(a,e,f,g,h){return -g*((e=e/h-1)*e*e*e-1)+f},easeInOutQuart:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e*e+f}return -g/2*((e-=2)*e*e*e-2)+f},easeInQuint:function(a,e,f,g,h){return g*(e/=h)*e*e*e*e+f},easeOutQuint:function(a,e,f,g,h){return g*((e=e/h-1)*e*e*e*e+1)+f},easeInOutQuint:function(a,e,f,g,h){if((e/=h/2)<1){return g/2*e*e*e*e*e+f}return g/2*((e-=2)*e*e*e*e+2)+f},easeInSine:function(a,e,f,g,h){return -g*Math.cos(e/h*(Math.PI/2))+g+f},easeOutSine:function(a,e,f,g,h){return g*Math.sin(e/h*(Math.PI/2))+f},easeInOutSine:function(a,e,f,g,h){return -g/2*(Math.cos(Math.PI*e/h)-1)+f},easeInExpo:function(a,e,f,g,h){return(e==0)?f:g*Math.pow(2,10*(e/h-1))+f},easeOutExpo:function(a,e,f,g,h){return(e==h)?f+g:g*(-Math.pow(2,-10*e/h)+1)+f},easeInOutExpo:function(a,e,f,g,h){if(e==0){return f}if(e==h){return f+g}if((e/=h/2)<1){return g/2*Math.pow(2,10*(e-1))+f}return g/2*(-Math.pow(2,-10*--e)+2)+f},easeInCirc:function(a,e,f,g,h){return -g*(Math.sqrt(1-(e/=h)*e)-1)+f},easeOutCirc:function(a,e,f,g,h){return g*Math.sqrt(1-(e=e/h-1)*e)+f},easeInOutCirc:function(a,e,f,g,h){if((e/=h/2)<1){return -g/2*(Math.sqrt(1-e*e)-1)+f}return g/2*(Math.sqrt(1-(e-=2)*e)+1)+f},easeInElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i)==1){return g+h}if(!j){j=i*0.3}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}return -(f*Math.pow(2,10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j))+g},easeOutElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i)==1){return g+h}if(!j){j=i*0.3}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}return f*Math.pow(2,-10*l)*Math.sin((l*i-k)*(2*Math.PI)/j)+h+g},easeInOutElastic:function(e,l,g,h,i){var k=1.70158;var j=0;var f=h;if(l==0){return g}if((l/=i/2)==2){return g+h}if(!j){j=i*(0.3*1.5)}if(f<Math.abs(h)){f=h;var k=j/4}else{var k=j/(2*Math.PI)*Math.asin(h/f)}if(l<1){return -0.5*(f*Math.pow(2,10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j))+g}return f*Math.pow(2,-10*(l-=1))*Math.sin((l*i-k)*(2*Math.PI)/j)*0.5+h+g},easeInBack:function(a,e,f,g,h,i){if(i==undefined){i=1.70158}return g*(e/=h)*e*((i+1)*e-i)+f},easeOutBack:function(a,e,f,g,h,i){if(i==undefined){i=1.70158}return g*((e=e/h-1)*e*((i+1)*e+i)+1)+f},easeInOutBack:function(a,e,f,g,h,i){if(i==undefined){i=1.70158}if((e/=h/2)<1){return g/2*(e*e*(((i*=(1.525))+1)*e-i))+f}return g/2*((e-=2)*e*(((i*=(1.525))+1)*e+i)+2)+f},easeInBounce:function(a,e,f,g,h){return g-jQuery.easing.easeOutBounce(a,h-e,0,g,h)+f},easeOutBounce:function(a,e,f,g,h){if((e/=h)<(1/2.75)){return g*(7.5625*e*e)+f}else{if(e<(2/2.75)){return g*(7.5625*(e-=(1.5/2.75))*e+0.75)+f}else{if(e<(2.5/2.75)){return g*(7.5625*(e-=(2.25/2.75))*e+0.9375)+f}else{return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+f}}}},easeInOutBounce:function(a,e,f,g,h){if(e<h/2){return jQuery.easing.easeInBounce(a,e*2,0,g,h)*0.5+f}return jQuery.easing.easeOutBounce(a,e*2-h,0,g,h)*0.5+g*0.5+f}});(function(b){b.fn.fixPNG=function(){return this.each(function(){var j=b(this).css("backgroundImage");if(j.match(/^url\(["']?(.*\.png)["']?\)$/i)){j=RegExp.$1;b(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod="+(b(this).css("backgroundRepeat")=="no-repeat"?"crop":"scale")+", src='"+j+"')"}).each(function(){var k=b(this).css("position");if(k!="absolute"&&k!="relative"){b(this).css("position","relative")}})}})};var d,i,h=false,g=new Image,a,e=1,c=/\.(jpg|gif|png|bmp|jpeg|tif|psd)(.*)?$/i;var f=(b.browser.msie&&parseInt(b.browser.version.substr(0,1))<8);b.fn.fancybox=function(s){s=b.extend({},b.fn.fancybox.defaults,s);var p=this;function m(){d=this;i=s;r();return false}function r(){if(h){return}if(b.isFunction(i.callbackOnStart)){i.callbackOnStart()}i.itemArray=[];i.itemCurrent=0;if(s.itemArray.length>0){i.itemArray=s.itemArray}else{var v={};if(!d.rel||d.rel==""){var v={href:d.href,title:d.title};if(b(d).children("img:first").length){v.orig=b(d).children("img:first")}i.itemArray.push(v)}else{var t=b(p).filter("a[rel="+d.rel+"]");var v={};for(var u=0;u<t.length;u++){v={href:t[u].href,title:t[u].title};if(b(t[u]).children("img:first").length){v.orig=b(t[u]).children("img:first")}i.itemArray.push(v)}while(i.itemArray[i.itemCurrent].href!=d.href){i.itemCurrent++}}}if(i.overlayShow){if(f){b("embed, object, select").css("visibility","hidden")}b(".mainContent").fadeTo(i.zoomSpeedIn,i.overlayOpacity)}n()}function n(){b("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide();var u=i.itemArray[i.itemCurrent].href;if(u.match(/#/)){var t=window.location.href.split("#")[0];t=u.replace(t,"");t=t.substr(t.indexOf("#"));q('<div id="fancy_div">'+b(t).html()+"</div>",i.frameWidth,i.frameHeight)}else{if(u.match(c)){g=new Image;g.src=u;if(g.complete){k()}else{b.fn.fancybox.showLoading();b(g).unbind().bind("load",function(){b(".fancy_loading").hide();k()})}}else{if(u.match("iframe")||d.className.indexOf("iframe")>=0){q('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe'+Math.round(Math.random()*1000)+'" frameborder="0" hspace="0" src="'+u+'"></iframe>',i.frameWidth,i.frameHeight)}else{b.get(u,function(v){q('<div id="fancy_ajax">'+v+"</div>",i.frameWidth,i.frameHeight)})}}}}function k(){if(i.imageScale){var x=b.fn.fancybox.getViewport();var t=Math.min(Math.min(x[0]-36,g.width)/g.width,Math.min(x[1]-60,g.height)/g.height);var v=Math.round(t*g.width);var u=Math.round(t*g.height)}else{var v=g.width;var u=g.height}q('<img alt="" id="fancy_img" src="'+g.src+'" />',v,u)}function l(){if((i.itemArray.length-1)>i.itemCurrent){var t=i.itemArray[i.itemCurrent+1].href;if(t.match(c)){objNext=new Image();objNext.src=t}}if(i.itemCurrent>0){var t=i.itemArray[i.itemCurrent-1].href;if(t.match(c)){objNext=new Image();objNext.src=t}}}function q(x,u,A){h=true;var t=i.padding;if(f){b("#fancy_content")[0].style.removeExpression("height");b("#fancy_content")[0].style.removeExpression("width")}if(t>0){u+=t*2;A+=t*2;b("#fancy_content").css({top:t+"px",right:t+"px",bottom:t+"px",left:t+"px",width:"auto",height:"auto"});if(f){b("#fancy_content")[0].style.setExpression("height","(this.parentNode.clientHeight - 20)");b("#fancy_content")[0].style.setExpression("width","(this.parentNode.clientWidth - 20)")}}else{b("#fancy_content").css({top:0,right:0,bottom:0,left:0,width:"100%",height:"100%"})}if(b("#fancy_outer").is(":visible")&&u==b("#fancy_outer").width()&&A==b("#fancy_outer").height()){b("#fancy_content").fadeOut("fast",function(){b("#fancy_content").empty().append(b(x)).fadeIn("normal",function(){o()})});return}var C=b.fn.fancybox.getViewport();var z=(u+36)>C[0]?C[2]:(C[2]+Math.round((C[0]-u-36)/2));var D=(A+50)>C[1]?C[3]:(C[3]+Math.round((C[1]-A-50)/2));var B={left:z,top:D,width:u+"px",height:A+"px"};if(b("#fancy_outer").is(":visible")){b("#fancy_content").fadeOut("normal",function(){b("#fancy_content").empty();b("#fancy_outer").animate(B,i.zoomSpeedChange,i.easingChange,function(){b("#fancy_content").append(b(x)).fadeIn("normal",function(){o()})})})}else{if(i.zoomSpeedIn>0&&i.itemArray[i.itemCurrent].orig!==undefined){b("#fancy_content").empty().append(b(x));var y=i.itemArray[i.itemCurrent].orig;var v=b.fn.fancybox.getPosition(y);b("#fancy_outer").css({left:(v.left-18)+"px",top:(v.top-18)+"px",width:b(y).width(),height:b(y).height()});if(i.zoomOpacity){B.opacity="show"}b("#fancy_outer").animate(B,i.zoomSpeedIn,i.easingIn,function(){o()})}else{b("#fancy_content").hide().empty().append(b(x)).show();b("#fancy_outer").css(B).fadeIn("normal",function(){o()})}}}function j(){if(i.itemCurrent!=0){b("#fancy_left, #fancy_left_ico").unbind().bind("click",function(t){t.stopPropagation();i.itemCurrent--;n();return false});b("#fancy_left").show()}if(i.itemCurrent!=(i.itemArray.length-1)){b("#fancy_right, #fancy_right_ico").unbind().bind("click",function(t){t.stopPropagation();i.itemCurrent++;n();return false});b("#fancy_right").show()}}function o(){j();l();b(document).keydown(function(t){if(t.keyCode==27){b.fn.fancybox.close();b(document).unbind("keydown")}else{if(t.keyCode==37&&i.itemCurrent!=0){i.itemCurrent--;n();b(document).unbind("keydown")}else{if(t.keyCode==39&&i.itemCurrent!=(i.itemArray.length-1)){i.itemCurrent++;n();b(document).unbind("keydown")}}}});if(i.centerOnScroll){b(window).bind("resize scroll",b.fn.fancybox.scrollBox)}else{b("div#fancy_outer").css("position","absolute")}if(i.hideOnContentClick){b("#fancy_wrap").click(b.fn.fancybox.close)}b("#fancy_overlay, #fancy_close").bind("click",b.fn.fancybox.close);b("#fancy_close").show();if(i.itemArray[i.itemCurrent].title!==undefined&&i.itemArray[i.itemCurrent].title.length>0){b("#fancy_title div").html(i.itemArray[i.itemCurrent].title);b("#fancy_title").show()}if(i.overlayShow&&f){b("embed, object, select",b("#fancy_content")).css("visibility","visible")}if(b.isFunction(i.callbackOnShow)){i.callbackOnShow()}h=false}return this.unbind("click").click(m)};b.fn.fancybox.scrollBox=function(){var j=b.fn.fancybox.getViewport();b("#fancy_outer").css("left",((b("#fancy_outer").width()+36)>j[0]?j[2]:j[2]+Math.round((j[0]-b("#fancy_outer").width()-36)/2)));b("#fancy_outer").css("top",((b("#fancy_outer").height()+50)>j[1]?j[3]:j[3]+Math.round((j[1]-b("#fancy_outer").height()-50)/2)))};b.fn.fancybox.getNumeric=function(j,k){return parseInt(b.curCSS(j.jquery?j[0]:j,k,true))||0};b.fn.fancybox.getPosition=function(j){var k=j.offset();k.top+=b.fn.fancybox.getNumeric(j,"paddingTop");k.top+=b.fn.fancybox.getNumeric(j,"borderTopWidth");k.left+=b.fn.fancybox.getNumeric(j,"paddingLeft");k.left+=b.fn.fancybox.getNumeric(j,"borderLeftWidth");return k};b.fn.fancybox.showIframe=function(){b(".fancy_loading").hide();b("#fancy_frame").show()};b.fn.fancybox.getViewport=function(){return[b(window).width(),b(window).height(),b(document).scrollLeft(),b(document).scrollTop()]};b.fn.fancybox.animateLoading=function(){if(!b("#fancy_loading").is(":visible")){clearInterval(a);return}b("#fancy_loading > div").css("top",(e*-40)+"px");e=(e+1)%12};b.fn.fancybox.showLoading=function(){clearInterval(a);var j=b.fn.fancybox.getViewport();b("#fancy_loading").css({left:((j[0]-40)/2+j[2]),top:((j[1]-40)/2+j[3])}).show();b("#fancy_loading").bind("click",b.fn.fancybox.close);a=setInterval(b.fn.fancybox.animateLoading,66)};b.fn.fancybox.close=function(){h=true;b(g).unbind();b("#fancy_overlay, #fancy_close").unbind();if(i.hideOnContentClick){b("#fancy_wrap").unbind()}b("#fancy_close, .fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide();b(".mainContent").fadeTo(i.zoomSpeedOut,1);if(i.centerOnScroll){b(window).unbind("resize scroll")}__cleanup=function(){b("#fancy_overlay, #fancy_outer").hide();if(i.centerOnScroll){b(window).unbind("resize scroll")}if(f){b("embed, object, select").css("visibility","visible")}if(b.isFunction(i.callbackOnClose)){i.callbackOnClose()}h=false};if(b("#fancy_outer").is(":visible")!==false){if(i.zoomSpeedOut>0&&i.itemArray[i.itemCurrent].orig!==undefined){var k=i.itemArray[i.itemCurrent].orig;var j=b.fn.fancybox.getPosition(k);var l={left:(j.left-18)+"px",top:"136px",width:b(k).width(),height:b(k).height()};if(i.zoomOpacity){l.opacity="hide"}b("#fancy_outer").stop(false,true).animate(l,i.zoomSpeedOut,i.easingOut,__cleanup)}else{b("#fancy_outer").stop(false,true).fadeOut("fast",__cleanup)}}else{__cleanup()}return false};b.fn.fancybox.build=function(){var j="";j+='<div id="fancy_overlay"></div>';j+='<div id="fancy_wrap">';j+='<div class="fancy_loading" id="fancy_loading"><div></div></div>';j+='<div id="fancy_outer">';j+='<div id="fancy_inner">';j+='<div id="fancy_close"></div>';j+='<div id="fancy_bg"><div class="fancy_bg fancy_bg_n"></div><div class="fancy_bg fancy_bg_ne"></div><div class="fancy_bg fancy_bg_e"></div><div class="fancy_bg fancy_bg_se"></div><div class="fancy_bg fancy_bg_s"></div><div class="fancy_bg fancy_bg_sw"></div><div class="fancy_bg fancy_bg_w"></div><div class="fancy_bg fancy_bg_nw"></div></div>';j+='<a href="javascript:;" id="fancy_left"><span class="fancy_ico" id="fancy_left_ico"></span></a><a href="javascript:;" id="fancy_right"><span class="fancy_ico" id="fancy_right_ico"></span></a>';j+='<div id="fancy_content"></div>';j+='<div id="fancy_title"></div>';j+="</div>";j+="</div>";j+="</div>";b(j).appendTo("body");b('<table cellspacing="0" cellpadding="0" border="0"><tr><td class="fancy_title" id="fancy_title_left"></td><td class="fancy_title" id="fancy_title_main"><div></div></td><td class="fancy_title" id="fancy_title_right"></td></tr></table>').appendTo("#fancy_title");if(f){b("#fancy_inner").prepend('<iframe class="fancy_bigIframe" scrolling="no" frameborder="0"></iframe>');b("#fancy_close, .fancy_bg, .fancy_title, .fancy_ico").fixPNG()}};b.fn.fancybox.defaults={padding:10,imageScale:true,zoomOpacity:false,zoomSpeedIn:0,zoomSpeedOut:0,zoomSpeedChange:300,easingIn:"swing",easingOut:"swing",easingChange:"swing",frameWidth:425,frameHeight:355,overlayShow:true,overlayOpacity:0.6,hideOnContentClick:true,centerOnScroll:true,itemArray:[],callbackOnStart:null,callbackOnShow:null,callbackOnClose:null};b(document).ready(function(){b.fn.fancybox.build()})})(jQuery);(function(a){a.fn.focusMagic=function(d){originalFieldContent=[];var c=a(this);c.find("label").not(".ignore").each(function(){a(this).css({position:"absolute",left:"-9999px"});var e=a(this).attr("for");if(a("#"+e).val().length==0){a("#"+e).val(a(this).html())}});c.find("input,textarea").focus(function(){var f=a(this).val();var e=a(this).parent().find("label[for="+this.id+"]");if(f==e.html()){a(this).val("")}a(this).blur(function(){if(a(this).val()==""&&e.hasClass("ignore")==false){a(this).val(e.html())}})});function b(e){if(window.console&&window.console.log){window.console.log(e)}}}})(jQuery);jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyInit:function(d){jQuery.historyCallback=d;var a=location.hash;jQuery.historyCurrentHash=a;if(jQuery.browser.msie){if(jQuery.historyCurrentHash==""){jQuery.historyCurrentHash="#"}$("body").append('<iframe id="jQuery_history" width="0" height="0" style="visibility: hidden"></iframe>');var b=$("#jQuery_history")[0];var c=b.contentWindow.document;c.open();c.close();c.location.hash=a}else{if($.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.isFirst=true}}if(jQuery.browser.msie&&$.browser.version=="6.0"){a=AddQueryString(a)}jQuery.historyCallback(a.replace(/^#/,""));setInterval(jQuery.historyCheck,100)},historyAddHistory:function(a){jQuery.historyBackStack.push(a);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if(jQuery.browser.msie){var b=$("#jQuery_history")[0];var c=b.contentDocument||b.contentWindow.document;var a=c.location.hash;if(a!=jQuery.historyCurrentHash){location.hash=a;jQuery.historyCurrentHash=a;if($.browser.version=="6.0"){a=AddQueryString(a)}jQuery.historyCallback(a.replace(/^#/,""))}}else{if($.browser.safari){if(!jQuery.dontCheck){var e=history.length-jQuery.historyBackStack.length;if(e){jQuery.isFirst=false;if(e<0){for(var d=0;d<Math.abs(e);d++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(var d=0;d<e;d++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var f=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(f!=undefined){jQuery.historyCurrentHash=location.hash;jQuery.historyCallback(f)}}else{if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(document.URL.indexOf("#")>=0){jQuery.historyCallback(document.URL.split("#")[1])}else{var a=location.hash;jQuery.historyCallback("")}jQuery.isFirst=true}}}}else{var a=location.hash;if(a!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=a;jQuery.historyCallback(a.replace(/^#/,""))}}}},historyLoad:function(b){var e;if(jQuery.browser.safari){e=b}else{e="#"+b;if($.browser.msie&&$.browser.version=="6.0"){e=RemoveQueryString(e)}location.hash=e}jQuery.historyCurrentHash=e;if(jQuery.browser.msie){var c=$("#jQuery_history")[0];var d=c.contentWindow.document;d.open();d.close();d.location.hash=e;if($.browser.version=="6.0"){b=AddQueryString(b)}jQuery.historyCallback(b)}else{if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(b);var a=function(){jQuery.dontCheck=false};window.setTimeout(a,200);jQuery.historyCallback(b);location.hash=e}else{jQuery.historyCallback(b)}}}});function RemoveQueryString(a){var b=a.split("?");if(b.length>1){a=b[0];query=b[1];a+="__qs="+query}return a}function AddQueryString(a){var b=a.split("__qs=");if(b.length>1){a=b[0];query=b[1];a+="?"+query}return a};(function(a){(function(b){jQuery.fn.slides=function(f){var g={doIt:false,activeClass:"active",ulClass:"nav"};var c=jQuery.extend({containerWidth:646,containerHeight:66,slideWidth:200,marginWidth:10,numOfSlideJump:1,nextButtonClass:"nextButton",prevButtonClass:"prevButton",useMenu:"useMenuDefaults",slideIsPage:false},f);c.useMenu=jQuery.extend(g,f.useMenu);return this.each(function(){var q=this;var m=false;var j=0;var n=c.numOfSlideJump*(c.marginWidth+c.slideWidth);var p=b(q).find("li").length;var o=p*(c.marginWidth+c.slideWidth);b(this).wrap('<div class="slideContainer"></div>');b(".slideContainer").css({overflow:"hidden",position:"relative",width:c.containerWidth,height:c.containerHeight});b(this).css({position:"absolute",left:0,width:o+"px"});b(".slideContainer").parent().addClass("prevDisabled");if(o<=c.containerWidth){b(q).parent(".slideContainer").parent().addClass("nextDisabled")}if(c.slideIsPage){b(q).find("li > img").each(function(v){b(this).data("imageURL",b(this).attr("src")).attr("src","").data("index",v).addClass("sl-"+v)})}b(this).parent().parent().find("."+c.nextButtonClass).click(function(){if(m||b(this).parent().hasClass("nextDisabled")){}else{j++;k(-n,this,1)}b(this).parent().attr("class");return false});b(this).parent().parent().find("."+c.prevButtonClass).click(function(){if(m||b(this).parent().hasClass("prevDisabled")){}else{j--;k(n,this,1)}b(this).parent().attr("class");return false});if(c.slideIsPage){b(".jumper").click(function(){if(m){}else{r(e(b(this).attr("class").split("sl-")[1].split(" ")[0]))}return false});if(t()){var h=t();b(q).css({left:-h*(c.marginWidth+c.slideWidth)});if(h!=0){b(".slideContainer").parent().removeClass("prevDisabled")}if(h==b(q).find("li").length-1){b(".slideContainer").parent().addClass("nextDisabled")}j=h;l();b(q).find("li:eq("+j+") > img:eq(0)").each(function(){u(b(this).data("index"),b(q).find("li > img").length)})}else{u(0,b(q).find("li > img").length)}}function k(w,x,y){m=true;var v=e(b(q).css("left"))+w;d(b(x).parent().html());b(x).parent().find(".slideContainer").parent().removeClass("prevDisabled").removeClass("nextDisabled");if(v<=(-o+c.containerWidth+c.marginWidth)){b(x).parent().find(".slideContainer").parent().addClass("nextDisabled");v=(-o+c.containerWidth)+c.marginWidth}else{if(v>=0){b(x).parent().find(".slideContainer").parent().addClass("prevDisabled");v=0}}s(v,y);if(c.slideIsPage){l();window.location.hash="slide="+j}}function s(v,w){if(w<0){w=-w}b(q).animate({left:v},1000*w,"easeOutSine",function(){m=false})}function u(x,y){var z=x;var w=".sl-"+z;if(b(w).data("loaded")=="true"){return false}else{var v=new Image();v.onload=function(){b(w).attr("src",b(w).data("imageURL")).data("loaded","true");if(z<y-1){z++;u(z,y)}else{z=0;u(z,y)}if(IsIE6()){pngfix()}};v.src=b(w).data("imageURL")}}function l(){b("."+c.useMenu.ulClass).find("li:eq("+j+")").siblings("li").removeClass(c.useMenu.activeClass);b("."+c.useMenu.ulClass).find("li:eq("+j+")").addClass(c.useMenu.activeClass)}function r(v){if(v>b(q).find("li").length-1){return false}else{var w=j-v;var x=w*(c.marginWidth+c.slideWidth);if(v==j){return false}else{j=v;k(x,"."+c.nextButtonClass,w);return false}}}function t(){var w=[],v;var y=window.location.hash.replace("#","").split("&");for(var x=0;x<y.length;x++){if(y[x]==""){}else{v=y[x].split("=");w.push(v[0]);w[v[0]]=v[1]}}return w.slide}});function e(h){i=h.replace("px","");var j=parseInt(i);return j}function d(h){if(window.console&&window.console.log){window.console.log(h)}}}})(jQuery)})(jQuery);(function(a){a.fn.selectReplace=function(g){var b=jQuery.extend({wrapAll:false,addClear:false,clearText:"Clear",hideSubmit:true},g);jQuery(this).hide();if(b.hideSubmit){jQuery(this).next("input[type=submit]").hide()}var h=this.length;this.each(function(k){var j=this;jQuery(j).wrap('<div class="selectReplace sr-'+k+" "+jQuery(j).attr("class").replace("selectReplace","")+'"></div>');jQuery(".sr-"+k).append('<ul class="sList"></ul>');jQuery(j).children("option").each(function(l){var i=this;if(l==0){jQuery(".sr-"+k).prepend('<a href="" class="head">'+jQuery(i).html()+"</a>");jQuery(".head").data("originalValue",jQuery(i).html())}else{jQuery(".sr-"+k+" > ul").append('<li class="or-'+l+'" title="'+a(i).val()+'"><a href="">'+a(i).html()+"</a></li>");jQuery(".sr-"+k+" li.or-"+l).attr("alt",jQuery(i).attr("label"))}});if(b.addClear){jQuery(".sr-"+k).children(".sList").append('<li><a href="" class="reset">'+b.clearText+"</a></li>")}});if(b.wrapAll){jQuery(".selectReplace").wrapAll('<ul class="selectors"></ul>')}jQuery(".sList a").not(".reset").click(function(){var i=f(this);i.html(jQuery(this).html())});jQuery(".reset").click(function(){var i=f(this);i.html(i.data("originalValue"));return false});jQuery("ul.sList a").click(function(){a(this).trigger({type:"mouseleave"})});function f(i){var j=jQuery(i).parent().parent().parent().children("a.head");return j}function c(){a(this).addClass("over")}function e(){a(this).removeClass("over")}function d(i){if(window.console&&window.console.log){window.console.log(i)}}}})(jQuery);var inAjax=false;var AjaxResultsContainer;var firstLoad=true;var RootHistoryUrl="";function HistoryCallback(a){if(inAjax){return}if($.trim(a)==""){return}if(a){GetUrlContent(a)}else{if(!firstLoad&&RootHistoryUrl.length>0){GetUrlContent(RootHistoryUrl)}else{firstLoad=false}}return true}function GetUrlContent(a){if(AjaxResultsContainer===undefined){return}inAjax=true;window.setTimeout("StartAjax()",1);$.get(a,function(c){try{HandleHtmlResponse(c)}catch(b){}finally{try{OnPageLoad()}catch(b){}inAjax=false;EndAjax();return true}})}$(function(){if(!IsIE6()){$.historyInit(HistoryCallback)}});$.fn.ajaxPartial=function(a){$(this).submit(function(){AjaxResultsContainer=a;var c=FormUrlForAjax($(this));var b=c;b=b.replace(/^.*#/,"");if(IsIE6()){GetUrlContent(b)}else{$.historyLoad(b)}return false});return $(this)};function HandleHtmlResponse(b){$("#"+AjaxResultsContainer).html(b);var a=$.map($("ul.filterHeading").get(),function(c,d){if($.inArray(d,openFilters)!=-1){return c}});$("#"+AjaxResultsContainer).fadeTo("slow",1)}function StartAjax(){if(inAjax==true){$(".products").append('<div id="ajaxSpinner"><div id="ajaxBg"></div><div id="ajaxImg"></div></div>');$(".products").append('<div class="ajaxCover"></div>');$("#ajaxBg,.ajaxCover").fadeTo("slow",0.8)}}function EndAjax(){$("#ajaxBg").fadeTo("slow",0,function(){$("#ajaxImg").remove()});InitializeProductGrid();$("#ajaxSpinner").remove()}function FormUrlForAjax(b){var a=$(b).serialize();if(a.length>0){a+="&"}a+="__ajax=true";var c=$(b).attr("action");if(c.indexOf("?")<0){c+="?"}else{c+="&"}return c+a};$(function(){jQuery(".landingSlider").slides({containerHeight:614,containerWidth:980,marginWidth:0,slideWidth:980,useMenu:{doIt:true,ulClass:"sliderNav"},slideIsPage:true});jQuery("form.focusMagic,form#shipping-form").focusMagic();jQuery("select.replace").selectReplace();jQuery("a.zoom").fancybox({zoomOpacity:true,overlayShow:false,overlayOpacity:0,zoomSpeedIn:500,zoomSpeedOut:500,centerOnScroll:true,padding:60,imageScale:false,callbackOnStart:function(){var a=".productDetail .bodyContent";if(jQuery(a).height()<890){jQuery(a).data("orig",jQuery(a).height()).animate({height:890},"slow")}},callbackOnClose:function(){var a=".productDetail .bodyContent";if(jQuery(a).height()>jQuery(a).data("orig")){jQuery(a).animate({height:jQuery(a).data("orig")},"slow",function(){jQuery(this).css("height","auto")})}}});tweakBreadcrumbs();InitializeProductGrid();_overHover("#dimensions ul.dimensions li");alternateViews();everyThree(".relatedProducts ul li");jQuery(".slider").slides({containerWidth:440,marginWidth:10,slideWidth:105});tabs();reviewForm();colorSwatches(".rightCol .color ul li a span");_overHover(".rightCol .color ul li")});function InitializeProductGrid(){addSpan(".colorSizeDD a.head, .colorSizeDD ul.sList li a","wrap");jQuery(".toProduct").html("");_overHover(".products .product");_overClick(".replace");everyFourProducts(".products");colorSwatches(".colorSelector .gridColorSwatches li a span");colorSelector(10);jQuery(".filters a").click(function(){jQuery(".filters li").removeClass("active");jQuery(this).parent().addClass("active");jQuery("#SelectedSort").attr("value",jQuery(this).attr("id"));jQuery("#filterForm").submit();return false});jQuery(".product .productIMG .color-0").show();jQuery("input.star").rating()}function addSpan(b,a){if(a=="wrap"){jQuery(b).wrapInner("<span></span>")}}function alternateViews(){jQuery(".alternateViews").hide();jQuery("a.altView").click(function(){if(jQuery(".alternateViews").css("display")=="none"){jQuery(".alternateViews").slideDown()}else{jQuery(".alternateViews").slideUp()}jQuery(".productDetail .alternateViews ul li a").click(function(){jQuery(".productImage .zoom").attr("href",jQuery(this).find("img.zoom").attr("src"));jQuery(".productImage .zoom img").attr("src",jQuery(this).attr("href"));return false});return false})}function colorSelector(a){jQuery(".colorSelector").each(function(){var b=jQuery(this).width();if(jQuery(this).width()<=156){var c=Math.ceil(-1*b/2);jQuery(this).css({"margin-left":c,left:"50%"})}else{jQuery(this).find(".gridSliderWrapper").addClass("withButtons");jQuery(this).css({"margin-left":"-76px",left:"50%"});jQuery(this).find(".gridSliderWrapper").append('<a href="#" class="prevButton">&lt;</a><a href="#" class="nextButton">&gt;</a>').find("ul").slides({containerHeight:12,containerWidth:122,marginWidth:5,slideWidth:16,numOfSlideJump:3})}});jQuery("div.gridSliderWrapper").append('<span class="rtBG"></span>');jQuery(".gridColorSwatches").each(function(){jQuery(this).find("li a").each(function(b){jQuery(this).data("index","color-"+b)}).show()});jQuery(".product").each(function(){jQuery(this).find(".productIMG").find("img").each(function(b){jQuery(this).addClass("color-"+b);if(b!=0){jQuery(this).hide()}})});jQuery(".gridColorSwatches li a").click(function(){var b=jQuery(this).parents(".product").find(".productIMG");b.find("img").hide().parent().find("."+jQuery(this).data("index")).show();jQuery(this).parent().addClass("active").siblings(".active").removeClass("active");b.parent().find("a.toProduct").attr("href",jQuery(this).attr("href"));return false})}function colorSwatches(a){jQuery(a).each(function(){jQuery(this).css({background:"#"+jQuery(this).html()}).html("");jQuery(this).width(jQuery(this).parent().width()/jQuery(this).parent().find("span").length+"px")}).show()}function IsIE6(){return $.browser.msie&&$.browser.version=="6.0"}function _overClick(a){jQuery(a).not(".notOver").click(function(){jQuery(this).addClass("over");return false}).mouseleave(function(){jQuery(this).removeClass("over")})}function _overHover(a){jQuery(a).not(".notOver").mouseover(function(){jQuery(this).addClass("over")}).mouseleave(function(){jQuery(this).removeClass("over")})}function everyFourProducts(a){jQuery(a).find("div.product").each(function(b){if(b%4==3){jQuery(this).addClass("last")}})}function everyThree(a){jQuery(a).each(function(b){if(b%3==2){jQuery(this).addClass("last")}})}function reviewForm(){var a=0;jQuery("a.writeReviewButton").click(function(){jQuery(".writeReviewContainer").css("visibility","hidden").show();a=jQuery(".writeReviewContainer").height()+60;jQuery(".reviewContent").fadeTo("slow",0);if(IsIE6()){jQuery(".tabContent").animate({height:a+"px"},1500,function(){jQuery(".writeReviewContainer").css({visibility:"visible",opacity:0}).fadeTo("slow",1)});jQuery("a.submitReviewButton,.reviewSubmit, a.cancelReview").click(function(){jQuery(".writeReviewContainer").fadeOut(function(){jQuery(".tabContent").animate({height:"0px"},1500);jQuery(".reviewContent").fadeTo("slow",1)});return false})}else{jQuery(".tabContent").animate({minHeight:a+"px"},1500,function(){jQuery(".writeReviewContainer").css({visibility:"visible",opacity:0}).fadeTo("slow",1)});jQuery("a.submitReviewButton,.reviewSubmit, a.cancelReview").click(function(){jQuery(".writeReviewContainer").fadeOut(function(){jQuery(".tabContent").animate({minHeight:"0px"},1500);jQuery(".reviewContent").fadeTo("slow",1)});return false})}return false})}function tabs(){jQuery("ul.tabs li:first").addClass("active");jQuery(".tabContents > div").hide();jQuery(".tabContents > div:first").show();jQuery("ul.tabs li a").click(function(){jQuery(".tabContents").height(jQuery(".tabContents div."+this.id).height());jQuery(".tabContents > div").hide();jQuery(this).parent().parent("li").addClass("active").siblings().removeClass("active");jQuery(".tabContents div."+this.id).show();jQuery(".tabContents").height("auto");return false})}function tweakBreadcrumbs(){jQuery(".breadcrumb > li").not("li:first").each(function(){jQuery(this).prepend("<span>&raquo;</span>")})}function debug(a){if(window.console&&window.console.log){window.console.log(a)}};jQuery.extend({createUploadIframe:function(d,b){var a="jUploadFrame"+d;if(window.ActiveXObject){var c=document.createElement('<iframe id="'+a+'" name="'+a+'" />');if(typeof b=="boolean"){c.src="javascript:false"}else{if(typeof b=="string"){c.src=b}}}else{var c=document.createElement("iframe");c.id=a;c.name=a}c.style.position="absolute";c.style.top="-1000px";c.style.left="-1000px";document.body.appendChild(c);return c},createUploadForm:function(f,a){var c="jUploadForm"+f;var b="jUploadFile"+f;var d=$('<form  action="" method="POST" name="'+c+'" id="'+c+'" enctype="multipart/form-data"></form>');var g=$("#"+a);var e=$(g).clone();$(g).attr("id",b);$(g).before(e);$(g).appendTo(d);$(d).css("position","absolute");$(d).css("top","-1200px");$(d).css("left","-1200px");$(d).appendTo("body");return d},ajaxFileUpload:function(i){i=jQuery.extend({},jQuery.ajaxSettings,i);var b=new Date().getTime();var d=jQuery.createUploadForm(b,i.fileElementId);var c=jQuery.createUploadIframe(b,i.secureuri);var h="jUploadFrame"+b;var a="jUploadForm"+b;if(i.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var j=false;var f={};if(i.global){jQuery.event.trigger("ajaxSend",[f,i])}var g=function(l){var n=document.getElementById(h);try{if(n.contentWindow){f.responseText=n.contentWindow.document.body?n.contentWindow.document.body.innerHTML:null;f.responseXML=n.contentWindow.document.XMLDocument?n.contentWindow.document.XMLDocument:n.contentWindow.document}else{if(n.contentDocument){f.responseText=n.contentDocument.document.body?n.contentDocument.document.body.innerHTML:null;f.responseXML=n.contentDocument.document.XMLDocument?n.contentDocument.document.XMLDocument:n.contentDocument.document}}}catch(o){jQuery.handleError(i,f,null,o)}if(f||l=="timeout"){j=true;var m;try{m=l!="timeout"?"success":"error";if(m!="error"){var p=jQuery.uploadHttpData(f,i.dataType);if(i.success){i.success(p,m)}if(i.global){jQuery.event.trigger("ajaxSuccess",[f,i])}}else{jQuery.handleError(i,f,m)}}catch(o){m="error";jQuery.handleError(i,f,m,o)}if(i.global){jQuery.event.trigger("ajaxComplete",[f,i])}if(i.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}if(i.complete){i.complete(f,m)}jQuery(n).unbind();setTimeout(function(){try{$(n).remove();$(d).remove()}catch(q){jQuery.handleError(i,f,null,q)}},100);f=null}};if(i.timeout>0){setTimeout(function(){if(!j){g("timeout")}},i.timeout)}try{var d=$("#"+a);$(d).attr("action",i.url);$(d).attr("method","POST");$(d).attr("target",h);if(d.encoding){d.encoding="multipart/form-data"}else{d.enctype="multipart/form-data"}$(d).submit()}catch(k){jQuery.handleError(i,f,null,k)}if(window.attachEvent){document.getElementById(h).attachEvent("onload",g)}else{document.getElementById(h).addEventListener("load",g,false)}return{abort:function(){}}},uploadHttpData:function(r,type){var data=!type;data=type=="xml"||data?r.responseXML:r.responseText;if(type=="script"){jQuery.globalEval(data)}if(type=="json"){eval("data = "+data)}if(type=="html"){jQuery("<div>").html(data).evalScripts()}return data}});function PostComments(){$(".IsAjax").val("1");var serializedForm=$("#commentForm").serialize();$.post(SubmitAction,serializedForm,function(responseMsg){try{var response=eval("("+responseMsg+")");if(response.RedirectTo){document.location=response.RedirectTo}else{if(response.IsUpdated){try{UploadImage()}catch(e){}$("#commentForm").remove()}}if(response.Message){SetReviewMessage(response.Message)}}catch(ex){}});$(".IsAjax").val("0");return false}function PostRating(ratingCode){var f=$("#commentForm");$(".IsAjax").val("1");var serializedForm=f.serialize();$.post(RateProductAction,serializedForm,function(responseMsg){try{var response=eval("("+responseMsg+")");if(response.RedirectTo){document.location=response.RedirectTo}else{if(response.IsUpdated){GetRatings(serializedForm)}}if(response.Message){SetReviewMessage(response.Message)}}catch(ex){}});$(".IsAjax").val("0");return false}function PostReviewHelpfulness(btn,val){var form=$(btn).parents("form");$(".IsAjax").val("1");$(form).children("#helpfulness").val(val);$.post(RateReviewAction,$(form).serialize(),function(data){var response=eval("("+data+")");if(response.RedirectTo){document.location=response.RedirectTo}else{if(response.IsUpdated){GetComments($("#toolbarForm").serialize());SetReviewMessage(response.Message)}}});$(".IsAjax").val("0");return false}function GetRatings(a){$.post(ReviewProductAction,a,function(b){$("#reviewform").html(b);InitRating();SetupRatings()})}function SetReviewMessage(a){if(a){$(".reviewMessage").html(a);$(".reviewMessage").show()}else{$(".reviewMessage").html("");$(".reviewMessage").hide()}}function GetCommentsPage(a){$("#SelectedPage").val(a);GetComments($("#toolbarForm").serialize())}function GetComments(a){AjaxWait();$.post(ProductCommentListingAction,a,function(b){$("#comments").html(b);if(!IsIE6()){$("select#SelectedSort").selectbox()}$("select#SelectedSort").live(function(){var c=$("#toolbarForm").serialize();GetComments(c)});AjaxStop()})}function SetupRatings(){$(".ratingStar").rating({required:true});if(!IsIE6()){$("select#SelectedSort").selectbox({replaceInvisible:"true"})}$(".hideForAjax").css("visibility","hidden").css("display","none");$(".showForAjax").removeClass("showForAjax");$("select#SelectedSort").unbind("change").change(function(){var a=$("#toolbarForm").serialize();GetComments(a)})}function AjaxWait(){}function AjaxStop(){}function UploadImage(){$.ajaxFileUpload({url:FileUploadAction,secureuri:false,fileElementId:"ReviewImage",dataType:"json",success:function(b,a){},error:function(c,a,b){}});return false};function DimensionSelector(d,e,b,f){this.Selector=d;this.SelectedDimensionID=0;this.ActiveDimensionID=0;this.ActiveText="";this.SelectedText="";this.JQSelectedObject=null;this.JQActiveObject=null;this.JQTextContainer=this.Selector.find("input.dimTextDisplay:first");this.JQDimensions=this.Selector.find("label.pdp-options");this.JQIDContainer=this.Selector.find("input.dimID:first");this.DimensionTypeName=this.Selector.find(".dimType:first").val();var c=this;this.StyleArray=b;if(this.Selector.length==0){return}var a=this.JQDimensions.find("input:radio:first").attr("name");if(f!=undefined&&f!=null&&parseInt(f)>0){this.JQIDContainer.attr("value",f.toString())}this.JQDimensions.find("input:radio").remove();if(this.JQIDContainer.val()!=""){this.SelectDimension(this.JQIDContainer.siblings('label[value="'+this.JQIDContainer.val()+'"]'));this.DisplayValidDimensions(e,parseInt(this.JQIDContainer.val()))}this.JQDimensions.bind("mouseenter",function(){c.HoverIn($(this));c.OnHoverIn(c)}).bind("mouseleave",function(){c.HoverOut($(this));c.OnHoverOut(c)}).click(function(){c.SelectDimension($(this));c.OnSelected(c);return false})}DimensionSelector.prototype.OnHoverIn=function(a){};DimensionSelector.prototype.OnHoverOut=function(a){};DimensionSelector.prototype.OnSelected=function(a){};DimensionSelector.prototype.IsSelectedValid=function(){return this.Selector.length==0||(this.JQSelectedObject!=null&&this.JQSelectedObject.hasClass("valid"))};DimensionSelector.prototype.IsActiveValid=function(){return this.Selector.length==0||(this.JQActiveObject==null||this.JQActiveObject.hasClass("valid"))};DimensionSelector.prototype.IsSelectedOutOfStock=function(){return this.JQSelectedObject!=null&&this.JQSelectedObject.hasClass("outOfStock")};DimensionSelector.prototype.IsActiveOutOfStock=function(){return this.JQActiveObject!=null&&this.JQActiveObject.hasClass("outOfStock")};DimensionSelector.prototype.HoverIn=function(a){this.JQActiveObject=a;this.ActiveDimensionID=parseInt(this.JQActiveObject.attr("value"));this.ActiveText=this.JQActiveObject.attr("title");this.JQActiveObject.siblings().removeClass("selected");this.JQActiveObject.addClass("selected");this.JQTextContainer.val(this.JQActiveObject.attr("title"))};DimensionSelector.prototype.HoverOut=function(a){if(this.SelectedDimensionID!=this.ActiveDimensionID){this.JQActiveObject.removeClass("selected")}if(this.JQSelectedObject!=null){this.JQSelectedObject.addClass("selected")}this.ActiveDimensionID=this.SelectedDimensionID;this.ActiveText=this.SelectedText;this.JQActiveObject=this.JQSelectedObject;this.JQTextContainer.val(this.SelectedText)};DimensionSelector.prototype.SelectDimension=function(a){if(a.length==0){return}this.JQActiveObject=this.JQSelectedObject=a;this.SelectedDimensionID=this.ActiveDimensionID=parseInt(this.JQSelectedObject.attr("value"));this.SelectedText=this.ActiveText=this.JQSelectedObject.attr("title");this.JQIDContainer.val(this.SelectedDimensionID);this.JQTextContainer.val(this.JQSelectedObject.attr("title"));this.JQSelectedObject.siblings().removeClass("selected");this.JQSelectedObject.addClass("selected")};DimensionSelector.prototype.UnselectDimension=function(){this.JQActiveObject=this.JQSelectedObject=null;this.SelectedDimensionID=this.ActiveDimensionID=0;this.SelectedText=this.ActiveText="";this.JQIDContainer.val("");this.JQTextContainer.val("");this.JQDimensions.removeClass("selected")};DimensionSelector.prototype.SelectSingleValid=function(){if(this.JQDimensions.not(".invalid").length==1){this.SelectDimension(this.JQDimensions.not(".invalid"))}};DimensionSelector.prototype.DisplayValidDimensions=function(a,c){if(this.Selector.length==0){return}var b=StyleSelector.FindVariations(this.StyleArray,a,c);this.JQDimensions.each(function(){var e=parseInt($(this).attr("value"));var f=null;var g=false;for(var d in b){if(b[d].Dimension1ID==e){f=b[d];if(f.IsInStock){g=true}}else{if(b[d].Dimension2ID==e){f=b[d];if(f.IsInStock){g=true}}}}if(f==null){$(this).removeClass("valid").removeClass("outOfStock").addClass("invalid")}else{if(!g){$(this).removeClass("invalid").removeClass("valid").addClass("outOfStock")}else{$(this).removeClass("invalid").removeClass("outOfStock").addClass("valid")}}});if(this.SelectedDimensionID==0){if(this.JQDimensions.filter(".valid").length==1){this.HoverIn(this.JQDimensions.filter(".valid:first"))}else{this.HoverOut(this.JQDimensions.filter(".selected"))}}};DimensionSelector.prototype.ValidateSelected=function(){if(this.JQSelectedObject===null){return}if(this.JQSelectedObject.hasClass("invalid")){this.UnselectDimension()}};function StyleSelector(c,d,a){this.SelectedStyle=a;this.ActiveStyle=a;this.JQStyles=c.find("a");this.Selector=c;this.JQIDContainer=$("#styleId");var b=this;this.StyleArray=d;if(this.JQIDContainer.val()!=a.Key){this.SelectStyle(this.JQStyles.filter("[value='"+this.JQIDContainer.val()+"']"))}this.JQStyles.bind("mouseenter",function(){b.StyleHoverIn($(this));b.OnHoverIn(b)}).bind("mouseleave",function(){b.StyleHoverOut($(this));b.OnHoverOut(b)}).click(function(){b.SelectStyle($(this));b.OnSelected(b);return false})}StyleSelector.prototype.FindJQStyleObject=function(a){return this.Selector.find("a[value='"+a.toString()+"']")};StyleSelector.prototype.StyleHoverIn=function(b){b.addClass("selected");var a=parseInt(b.attr("value"));this.ActiveStyle=StyleSelector.FindStyle(this.StyleArray,a);if(this.SelectedStyle!=null){$("#mainProductImage").attr("src",this.ActiveStyle.MainImage);$("#mainProductImage").attr("alt",this.ActiveStyle.StockNumber);$("#selectedColor").val(this.ActiveStyle.SpecificColorName);$("#stylePrice").html(this.ActiveStyle.StylePrice)}};StyleSelector.prototype.StyleHoverOut=function(a){a.removeClass("selected");this.FindJQStyleObject(this.SelectedStyle.Key).addClass("selected");this.ActiveStyle=this.SelectedStyle;$("#mainProductImage").attr("src",this.SelectedStyle.MainImage);$("#selectedColor").val(this.SelectedStyle.SpecificColorName);$("#stylePrice").html(this.SelectedStyle.StylePrice)};StyleSelector.prototype.SelectStyle=function(a){this.StyleHoverIn(a);a.removeClass("invalid");this.SelectedStyle=this.ActiveStyle;$("#mainzoom").attr("href",this.SelectedStyle.ZoomImage);this.JQStyles.removeClass("selected");a.addClass("selected");this.JQIDContainer.val(this.SelectedStyle.Key);try{this.SelectedStyle.DoAnalytics()}catch(c){var b=this;$(function(){b.SelectedStyle.DoAnalytics()})}};StyleSelector.prototype.DisplayValidStyles=function(c,d){if(c==0&&d==0){return}var a=new Array();var b=this;this.JQStyles.each(function(){var g=parseInt($(this).attr("value"));var e=new Array();var h=null;var i=false;if(d==0){e=StyleSelector.FindVariations(b.StyleArray,g,c,true)}else{if(c==0){e=StyleSelector.FindVariations(b.StyleArray,g,d,true)}else{h=StyleSelector.FindVariation(b.StyleArray,g,c,d);if(h!=null){i=h.IsInStock}}}for(var f in e){if((e[f].Dimension1ID==c&&c>0)||(e[f].Dimension2ID==d&&d>0)){h=e[f];if(e[f].IsInStock){i=true}}}if(h==null){$(this).removeClass("valid").removeClass("outOfStock").addClass("invalid")}else{if(!i){$(this).removeClass("invalid").removeClass("valid").addClass("outOfStock")}else{$(this).removeClass("invalid").removeClass("outOfStock").addClass("valid")}}})};StyleSelector.prototype.FindAndSelectStyle=function(d,e){if(d==0||e==0){return false}var c=this;var b=false;var a=null;this.JQStyles.each(function(){if(!b){var f=parseInt($(this).attr("value"));var g=StyleSelector.FindVariation(c.StyleArray,f,d,e);if(g!=null){if(g.IsInStock){c.SelectStyle($(this));b=true}else{if(a==null){a=$(this)}}}}});if(!b&&a!=null){c.SelectStyle(a);b=true}if(b){c.OnSelected(c)}return b};StyleSelector.prototype.OnHoverIn=function(a){};StyleSelector.prototype.OnHoverOut=function(a){};StyleSelector.prototype.OnHoverSelected=function(a){};StyleSelector.FindVariations=function(e,d,f){var c=new Array();for(var b in e){if(e[b].Key==d){for(var a in e[b].Variations){if((f==0||f==null)||(e[b].Variations[a].Dimension1ID==f||e[b].Variations[a].Dimension2ID==f)){c.push(e[b].Variations[a])}}}}return c};StyleSelector.FindVariation=function(d,c,e,b){for(var f in d){if(d[f].Key==c){for(var a in d[f].Variations){if((d[f].Variations[a].Dimension1ID==e||d[f].Variations[a].Dimension1ID==b)&&(d[f].Variations[a].Dimension2ID==e||d[f].Variations[a].Dimension2ID==b)){return d[f].Variations[a];break}}}}return null};StyleSelector.FindStyle=function(c,b){for(var a in c){if(c[a].Key==b){return c[a]}}return null};function showOverlay(e,a,d){var c=getElementsByClass("positionedOverlay",document,"div");for(i=0;i<c.length;i++){c[i].style.visibility="hidden"}var b=document.getElementById(e);AssignPosition(b,a,d)}function hideOverlay(a){document.getElementById(a).style.visibility="hidden"}function getElementsByClass(c,f,b){var e=new Array();if(f==null){f=document}if(b==null){b="*"}var a=f.getElementsByTagName(b);var d=a.length;for(i=0,j=0;i<d;i++){if(a[i].className.indexOf(c)>-1){e[j]=a[i];j++}}return e}var cX=0;var cY=0;var rX=0;var rY=0;var divY=0;if(document.all){document.onmousemove=UpdateCursorPositionDocAll}else{document.onmousemove=UpdateCursorPosition}function UpdateCursorPosition(a){cX=a.pageX;cY=a.pageY}function UpdateCursorPositionDocAll(a){cX=event.clientX;cY=event.clientY}function AssignPosition(b,a,c){var e=0;if(c!=null){e=findPos(document.getElementById(c))[0]}if(self.pageYOffset){rX=self.pageXOffset;rY=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){rX=document.documentElement.scrollLeft;rY=document.documentElement.scrollTop}else{if(document.body){rX=document.body.scrollLeft;rY=document.body.scrollTop}}}if(document.all){cX+=rX;cY+=rY}b.style.marginLeft="-5000px";b.style.visibility="visible";divY=cY-(b.clientHeight);if(divY<0){divY=0}b.style.marginLeft="0"}function findPos(b){var a=curtop=0;if(b.offsetParent){do{a+=b.offsetLeft;curtop+=b.offsetTop}while(b=b.offsetParent)}return[a,curtop]}function getElementsByClass(c,f,b){var e=new Array();if(f==null){f=document}if(b==null){b="*"}var a=f.getElementsByTagName(b);var d=a.length;for(i=0,j=0;i<d;i++){if(a[i].className.indexOf(c)>-1){e[j]=a[i];j++}}return e}function checkSelection(c,a){var b=$(c);if(b.length==1){if(b.val().length<=0){return confirm(a)}}return true};