function toggleNewBookmark(){$("#new_bookmark_form").toggle();$("#new_bookmark_call").toggle();$("#new_bookmark").reset()}function toggleSponsorAdsHeader(){$("#google_ads_div_Seshamo_bottom_article_300x250").is(":empty")&&$("#sponsor_ads_header").show()}var doGoal=function(a){pageTracker._trackPageview("/partner/sponsor/"+a)};function highlight(a){$(a).focus(function(){$("form li").animate({backgroundColor:"#FFFFFF"},300);$(this).parent().animate({backgroundColor:"#FFF7C0"},500)})}
function refreshPhotoSlideshow(){$.fn.colorbox&&$("a[rel='colorbox-gallery']").colorbox({transition:"elastic"})}function initColorbox(){if($.fn.colorbox){$.fn.colorbox.settings.opacity="0.4";$("a[rel='colorbox-avatar']").colorbox({transition:"elastic",maxWidth:"800px",maxHeight:"600px"});$("a[rel='colorbox-gallery']").colorbox({transition:"elastic"});$("a[rel='colorbox-iframe']").colorbox({width:"900px",height:"99%",iframe:true,overlayClose:false})}}
function analyticsTrackPageview(a){pageTracker._trackPageview(a)}function analyticsTrackPageviewForElements(a,b){$(a).live("click",function(){analyticsTrackPageview(b)})}function analyticsInitObservers(){analyticsTrackPageviewForElements("#bookmarks ul li a","/partner/bookmark");analyticsTrackPageviewForElements("#related_terms a","/partner/related");analyticsTrackPageviewForElements("article .entry a","/outbound/article")}
function sendAjaxRequest(a,b,c,t,m){$.ajax({type:b,url:a,success:function(){c.replaceWith(t)},error:function(){c.replaceWith(m)}})}
function initCountrySelector(){$("#country_selector_button").toggle(function(){$("#country_selector_flags").toggle("drop",{direction:"down"});$("#country_selector .country_current").removeClass("country_selector_hide");$("#country_selector .country_current").addClass("country_selector_show")},function(){$("#country_selector_flags").toggle("drop",{direction:"down"});$("#country_selector .country_current").removeClass("country_selector_show");$("#country_selector .country_current").addClass("country_selector_hide")})}
function initSearchFormWithAutocomplete(){var a=$("#search-form #q");a.autocomplete("/search/autocomplete",{delay:10,minChars:2,matchSubset:1,matchContains:1,cacheLength:10,selectFirst:false,scroll:false});a.result(function(){$("#search-form").submit()})}function highlightInput(){highlight(".form .highlighted li :input")}function hideBlankSponsorsResults(a){$(a+" ul li").length==0&&$(a).hide(200)}
function initToggleRejectionCauses(){$(".status .rejected").live("click",function(a){a="#rejection_cause_"+$(this).attr("rel");$(a).toggle();return false})}$(function(){initColorbox();initSearchFormWithAutocomplete();initCountrySelector();highlightInput();analyticsInitObservers();$("#user_session_login").defaultValue("username");$("form.prevent-double-submit").preventDoubleSubmit()});
var comments=function(){return{init:function(){},updateTextCounter:function(a,b){b=b||1E3;var c=a.value?$.trim(a.value).length:0;counter=$(a).parents("form").find("span.text-counter");counter.html(b-c)}}}();
(function(a){a.fn.extend({autocomplete:function(b,c){var t=typeof b=="string";c=a.extend({},a.Autocompleter.defaults,{url:t?b:null,data:t?null:b,delay:t?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c);c.highlight=c.highlight||function(m){return m};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(b,c){function t(){var e=o.selected();if(!e)return false;var l=e.result;B=l;if(c.multiple){var H=x(n.val());if(H.length>1){var s=c.multipleSeparator.length,I=a(b).selection().start,C,O=0;a.each(H,function(R,S){O+=S.length;if(I<=O){C=R;return false}O+=s});H[C]=l;l=H.join(c.multipleSeparator)}l+=c.multipleSeparator}n.val(l);r();n.trigger("result",[e.data,
e.value]);return true}function m(e,l){if(j==u.DEL)o.hide();else{e=n.val();if(!(!l&&e==B)){B=e;e=f(e);if(e.length>=c.minChars){n.addClass(c.loadingClass);c.matchCase||(e=e.toLowerCase());y(e,p,r)}else{g();o.hide()}}}}function x(e){if(!e)return[""];if(!c.multiple)return[a.trim(e)];return a.map(e.split(c.multipleSeparator),function(l){return a.trim(e).length?a.trim(l):null})}function f(e){if(!c.multiple)return e;var l=x(e);if(l.length==1)return l[0];l=a(b).selection().start;l=l==e.length?x(e):x(e.replace(e.substring(l),
""));return l[l.length-1]}function v(e,l){if(c.autoFill&&f(n.val()).toLowerCase()==e.toLowerCase()&&j!=u.BACKSPACE){n.val(n.val()+l.substring(f(B).length));a(b).selection(B.length,B.length+l.length)}}function q(){clearTimeout(M);M=setTimeout(r,200)}function r(){o.visible();o.hide();clearTimeout(M);g();c.mustMatch&&n.search(function(e){if(!e)if(c.multiple){e=x(n.val()).slice(0,-1);n.val(e.join(c.multipleSeparator)+(e.length?c.multipleSeparator:""))}else{n.val("");n.trigger("result",null)}})}function p(e,
l){if(l&&l.length&&h){g();o.display(l,e);v(e,l[0].value);o.show()}else r()}function y(e,l,H){c.matchCase||(e=e.toLowerCase());var s=z.load(e);if(s&&s.length)l(e,s);else if(typeof c.url=="string"&&c.url.length>0){var I={timestamp:+new Date};a.each(c.extraParams,function(C,O){I[C]=typeof O=="function"?O():O});a.ajax({mode:"abort",port:"autocomplete"+b.name,dataType:c.dataType,url:c.url,data:a.extend({q:f(e),limit:c.max},I),success:function(C){C=c.parse&&c.parse(C)||k(C);z.add(e,C);l(e,C)}})}else{o.emptyList();
H(e)}}function k(e){var l=[];e=e.split("\n");for(var H=0;H<e.length;H++){var s=a.trim(e[H]);if(s){s=s.split("|");l[l.length]={data:s,value:s[0],result:c.formatResult&&c.formatResult(s,s[0])||s[0]}}}return l}function g(){n.removeClass(c.loadingClass)}var u={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},n=a(b).attr("autocomplete","off").addClass(c.inputClass),M,B="",z=a.Autocompleter.Cache(c),h=0,j,E={mouseDownOnSelect:false},o=a.Autocompleter.Select(c,b,t,
E),U;a.browser.opera&&a(b.form).bind("submit.autocomplete",function(){if(U)return U=false});n.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(e){h=1;j=e.keyCode;switch(e.keyCode){case u.UP:e.preventDefault();o.visible()?o.prev():m(0,true);break;case u.DOWN:e.preventDefault();o.visible()?o.next():m(0,true);break;case u.PAGEUP:e.preventDefault();o.visible()?o.pageUp():m(0,true);break;case u.PAGEDOWN:e.preventDefault();o.visible()?o.pageDown():m(0,true);break;case c.multiple&&a.trim(c.multipleSeparator)==
","&&u.COMMA:case u.TAB:case u.RETURN:if(t()){e.preventDefault();U=true;return false}break;case u.ESC:o.hide();break;default:clearTimeout(M);M=setTimeout(m,c.delay);break}}).focus(function(){h++}).blur(function(){h=0;E.mouseDownOnSelect||q()}).click(function(){h++>1&&!o.visible()&&m(0,true)}).bind("search",function(){function e(H,s){var I;if(s&&s.length)for(var C=0;C<s.length;C++)if(s[C].result.toLowerCase()==H.toLowerCase()){I=s[C];break}typeof l=="function"?l(I):n.trigger("result",I&&[I.data,I.value])}
var l=arguments.length>1?arguments[1]:null;a.each(x(n.val()),function(H,s){y(s,e,e)})}).bind("flushCache",function(){z.flush()}).bind("setOptions",function(e,l){a.extend(c,l);"data"in l&&z.populate()}).bind("unautocomplete",function(){o.unbind();n.unbind();a(b.form).unbind(".autocomplete")})};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(b,c){return b.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+c.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(b){function c(q,r){b.matchCase||(q=q.toLowerCase());var p=q.indexOf(r);if(b.matchContains=="word")p=q.toLowerCase().search("\\b"+
r.toLowerCase());if(p==-1)return false;return p==0||b.matchContains}function t(q,r){v>b.cacheLength&&x();f[q]||v++;f[q]=r}function m(){if(!b.data)return false;var q={},r=0;if(!b.url)b.cacheLength=1;q[""]=[];for(var p=0,y=b.data.length;p<y;p++){var k=b.data[p];k=typeof k=="string"?[k]:k;var g=b.formatMatch(k,p+1,b.data.length);if(g!==false){var u=g.charAt(0).toLowerCase();q[u]||(q[u]=[]);k={value:g,data:k,result:b.formatResult&&b.formatResult(k)||g};q[u].push(k);r++<b.max&&q[""].push(k)}}a.each(q,
function(n,M){b.cacheLength++;t(n,M)})}function x(){f={};v=0}var f={},v=0;setTimeout(m,25);return{flush:x,add:t,populate:m,load:function(q){if(!b.cacheLength||!v)return null;if(!b.url&&b.matchContains){var r=[];for(var p in f)if(p.length>0){var y=f[p];a.each(y,function(k,g){c(g.value,q)&&r.push(g)})}return r}else if(f[q])return f[q];else if(b.matchSubset)for(p=q.length-1;p>=b.minChars;p--)if(y=f[q.substr(0,p)]){r=[];a.each(y,function(k,g){if(c(g.value,q))r[r.length]=g});return r}return null}}};a.Autocompleter.Select=
function(b,c,t,m){function x(){if(M){B=a("<div/>").hide().addClass(b.resultsClass).css("position","absolute").appendTo(document.body);z=a("<ul/>").appendTo(B).mouseover(function(h){if(f(h).nodeName&&f(h).nodeName.toUpperCase()=="LI"){g=a("li",z).removeClass(y.ACTIVE).index(f(h));a(f(h)).addClass(y.ACTIVE)}}).click(function(h){a(f(h)).addClass(y.ACTIVE);t();c.focus();return false}).mousedown(function(){m.mouseDownOnSelect=true}).mouseup(function(){m.mouseDownOnSelect=false});b.width>0&&B.css("width",
b.width);M=false}}function f(h){for(h=h.target;h&&h.tagName!="LI";)h=h.parentNode;if(!h)return[];return h}function v(h){k.slice(g,g+1).removeClass(y.ACTIVE);q(h);h=k.slice(g,g+1).addClass(y.ACTIVE);if(b.scroll){var j=0;k.slice(0,g).each(function(){j+=this.offsetHeight});if(j+h[0].offsetHeight-z.scrollTop()>z[0].clientHeight)z.scrollTop(j+h[0].offsetHeight-z.innerHeight());else j<z.scrollTop()&&z.scrollTop(j)}}function q(h){g+=h;if(g<0)g=k.size()-1;else if(g>=k.size())g=0}function r(h){return b.max&&
b.max<h?b.max:h}function p(){z.empty();for(var h=r(u.length),j=0;j<h;j++)if(u[j]){var E=b.formatItem(u[j].data,j+1,h,u[j].value,n);if(E!==false){E=a("<li/>").html(b.highlight(E,n)).addClass(j%2==0?"ac_even":"ac_odd").appendTo(z)[0];a.data(E,"ac_data",u[j])}}k=z.find("li");if(b.selectFirst){k.slice(0,1).addClass(y.ACTIVE);g=0}a.fn.bgiframe&&z.bgiframe()}var y={ACTIVE:"ac_over"},k,g=-1,u,n="",M=true,B,z;return{display:function(h,j){x();u=h;n=j;p()},next:function(){v(1)},prev:function(){v(-1)},pageUp:function(){g!=
0&&g-8<0?v(-g):v(-8)},pageDown:function(){g!=k.size()-1&&g+8>k.size()?v(k.size()-1-g):v(8)},hide:function(){B&&B.hide();k&&k.removeClass(y.ACTIVE);g=-1},visible:function(){return B&&B.is(":visible")},current:function(){return this.visible()&&(k.filter("."+y.ACTIVE)[0]||b.selectFirst&&k[0])},show:function(){var h=a(c).offset();B.css({width:typeof b.width=="string"||b.width>0?b.width:a(c).width(),top:h.top+c.offsetHeight,left:h.left}).show();if(b.scroll){z.scrollTop(0);z.css({maxHeight:b.scrollHeight,
overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var j=0;k.each(function(){j+=this.offsetHeight});h=j>b.scrollHeight;z.css("height",h?b.scrollHeight:j);h||k.width(z.width()-parseInt(k.css("padding-left"))-parseInt(k.css("padding-right")))}}},selected:function(){var h=k&&k.filter("."+y.ACTIVE).removeClass(y.ACTIVE);return h&&h.length&&a.data(h[0],"ac_data")},emptyList:function(){z&&z.empty()},unbind:function(){B&&B.remove()}}};a.fn.selection=function(b,c){if(b!==
undefined)return this.each(function(){if(this.createTextRange){var v=this.createTextRange();if(c===undefined||b==c)v.move("character",b);else{v.collapse(true);v.moveStart("character",b);v.moveEnd("character",c)}v.select()}else if(this.setSelectionRange)this.setSelectionRange(b,c);else if(this.selectionStart){this.selectionStart=b;this.selectionEnd=c}});var t=this[0];if(t.createTextRange){var m=document.selection.createRange(),x=t.value,f=m.text.length;m.text="<->";m=t.value.indexOf("<->");t.value=
x;this.selection(m,m+f);return{start:m,end:m+f}}else if(t.selectionStart!==undefined)return{start:t.selectionStart,end:t.selectionEnd}}})(jQuery);
(function(a){function b(d){if(d.keyCode===37){d.preventDefault();C.click()}else if(d.keyCode===39){d.preventDefault();I.click()}}function c(d,w){w=w==="x"?document.documentElement.clientWidth:document.documentElement.clientHeight;return typeof d==="string"?d.match(/%/)?w/100*parseInt(d,10):parseInt(d,10):d}function t(d){return i.photo||d.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function m(){for(var d in i)if(typeof i[d]==="function")i[d]=i[d].call(K)}var x="hover",f,v=!a.support.opacity,
q=v&&!window.XMLHttpRequest,r="cbox_load",p="cbox_complete",y="resize.cbox_resize",k,g,u,n,M,B,z,h,j,E,o,U,e,l,H,s,I,C,O,R,S,V,W,P,Q,K,J,i,X,Z,aa={transition:"elastic",speed:350,width:false,height:false,initialWidth:"400",initialHeight:"400",maxWidth:false,maxHeight:false,scalePhotos:true,scrollbars:true,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,
overlayClose:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow"};f=a.fn.colorbox=function(d,w){this.length?this.each(function(){var A=a(this).data("colorbox")?a.extend({},a(this).data("colorbox"),d):a.extend({},aa,d);a(this).data("colorbox",A).addClass("cboxelement")}):a(this).data("colorbox",a.extend({},aa,d));a(this).unbind("click.colorbox").bind("click.colorbox",function(A){K=this;i=a(K).data("colorbox");m();a().bind("keydown.cbox_close",
function(L){if(L.keyCode===27){L.preventDefault();f.close()}});i.overlayClose&&k.css({cursor:"pointer"}).one("click",f.close);K.blur();Z=w||false;var F=i.rel||K.rel;if(F&&F!=="nofollow"){j=a(".cboxelement").filter(function(){return(a(this).data("colorbox").rel||this.rel)===F});J=j.index(K);if(J<0){j=j.add(K);J=j.length-1}}else{j=a(K);J=0}if(!X){X=true;a.event.trigger("cbox_open");O.html(i.close);k.css({opacity:i.opacity}).show();f.position(c(i.initialWidth,"x"),c(i.initialHeight,"y"),0);q&&E.bind("resize.cboxie6 scroll.cboxie6",
function(){k.css({width:E.width(),height:E.height(),top:E.scrollTop(),left:E.scrollLeft()})}).trigger("resize.cboxie6 scroll.cboxie6")}f.slideshow();f.load();A.preventDefault()});d&&d.open&&a(this).triggerHandler("click.colorbox");return this};f.init=function(){function d(w){return a('<div id="cbox'+w+'"/>')}E=a(window);g=a('<div id="colorbox"/>');k=d("Overlay").hide();u=d("Wrapper");n=d("Content").append(o=d("LoadedContent").css({width:0,height:0}),U=d("LoadingOverlay"),e=d("LoadingGraphic"),l=d("Title"),
H=d("Current"),s=d("Slideshow"),I=d("Next"),C=d("Previous"),O=d("Close"));u.append(a("<div/>").append(d("TopLeft"),M=d("TopCenter"),d("TopRight")),a("<div/>").append(B=d("MiddleLeft"),n,z=d("MiddleRight")),a("<div/>").append(d("BottomLeft"),h=d("BottomCenter"),d("BottomRight"))).children().children().css({"float":"left"});a("body").prepend(k,g.append(u));if(v){g.addClass("cboxIE");q&&k.css("position","absolute")}n.children().addClass(x).mouseover(function(){a(this).addClass(x)}).mouseout(function(){a(this).removeClass(x)}).hide();
R=M.height()+h.height()+n.outerHeight(true)-n.height();S=B.width()+z.width()+n.outerWidth(true)-n.width();V=o.outerHeight(true);W=o.outerWidth(true);g.css({"padding-bottom":R,"padding-right":S}).hide();I.click(f.next);C.click(f.prev);O.click(f.close);n.children().removeClass(x)};f.position=function(d,w,A,F){function L(T){M[0].style.width=h[0].style.width=n[0].style.width=T.style.width;e[0].style.height=U[0].style.height=n[0].style.height=B[0].style.height=z[0].style.height=T.style.height}var G=document.documentElement.clientHeight,
D=G/2-w/2,N=document.documentElement.clientWidth/2-d/2;if(w>G)D-=w-G;if(D<0)D=0;if(N<0)N=0;D+=E.scrollTop();N+=E.scrollLeft();d-=S;w-=R;A=g.width()===d&&g.height()===w?0:A;u[0].style.width=u[0].style.height="9999px";g.dequeue().animate({height:w,width:d,top:D,left:N},{duration:A,complete:function(){L(this);u[0].style.width=d+S+"px";u[0].style.height=w+R+"px";F&&F()},step:function(){L(this)}})};f.resize=function(d){function w(){return L=i.width?P:P&&P<o.width()?P:o.width()}function A(){return G=i.height?
Q:Q&&Q<o.height()?Q:o.height()}function F(Y){var ba=L+W+S,ca=G+V+R;a().unbind("keydown",b);f.position(ba,ca,Y,function(){if(X){if(v){N&&o.fadeIn(100);g[0].style.removeAttribute("filter")}n.children().show();a("#cboxIframeTemp").after("<iframe id='cboxIframe' name='iframe_"+(new Date).getTime()+"' frameborder=0 src='"+(i.href||K.href)+"' />").remove();U.hide();e.hide();s.hide();if(j.length>1){H.html(i.current.replace(/\{current\}/,J+1).replace(/\{total\}/,j.length));I.html(i.next);C.html(i.previous);
a().bind("keydown",b);i.slideshow&&s.show()}else{H.hide();I.hide();C.hide()}l.html(i.title||K.title);a.event.trigger(p);Z&&Z.call(K);i.transition==="fade"&&g.fadeTo(T,1,function(){v&&g[0].style.removeAttribute("filter")});E.bind(y,function(){f.position(ba,ca,0)})}})}if(X){var L,G,D,N,T=i.transition==="none"?0:i.speed;E.unbind(y);if(d){o.remove();o=a(d);i.scrollbars||o.css({overflow:"hidden"});o.hide().appendTo("body").attr({id:"cboxLoadedContent"}).css({width:w()}).css({height:A()}).prependTo(n);
q&&a("select:not(#colorbox select)").filter(function(){return a(this).css("visibility")!=="hidden"}).css({visibility:"hidden"}).one("cbox_cleanup",function(){a(this).css({visibility:"inherit"})});if((N=a("#cboxPhoto")[0])&&i.height){d=(G-parseInt(N.style.height,10))/2;N.style.marginTop=(d>0?d:0)+"px"}i.transition==="fade"&&g.fadeTo(T,0,function(){F(0)})||F(T);if(i.preloading&&j.length>1){d=J>0?j[J-1]:j[j.length-1];D=J<j.length-1?j[J+1]:j[0];D=a(D).data("colorbox").href||D.href;d=a(d).data("colorbox").href||
d.href;t(D)&&a("<img />").attr("src",D);t(d)&&a("<img />").attr("src",d)}}else setTimeout(function(){G=o.children().outerHeight(true);o[0].style.height=G+"px";f.position(o.width()+W+S,G+V+R,T)},1)}};f.load=function(){var d,w,A,F,L=f.resize;K=j[J];i=a(K).data("colorbox");m();a.event.trigger(r);d=i.height?c(i.height,"y")-V-R:false;w=i.width?c(i.width,"x")-W-S:false;A=i.href||K.href;U.show();e.show();O.show();if(i.maxHeight){Q=i.maxHeight?c(i.maxHeight,"y")-V-R:false;d=d&&d<Q?d:Q}if(i.maxWidth){P=i.maxWidth?
c(i.maxWidth,"x")-W-S:false;w=w&&w<P?w:P}Q=d;P=w;if(i.inline){a('<div id="cboxInlineTemp" />').hide().insertBefore(a(A)[0]).bind(r+" cbox_cleanup",function(){o.children().insertBefore(this);a(this).remove()});L(a(A).wrapAll("<div/>").parent())}else if(i.iframe)L(a("<div><div id='cboxIframeTemp' /></div>"));else if(i.html)L(a("<div/>").html(i.html));else if(t(A)){F=new Image;F.onload=function(){F.onload=null;if((Q||P)&&i.scalePhotos){var G=this.width,D=this.height,N=0,T=this,Y=function(){D+=D*N;G+=
G*N;T.height=D;T.width=G};if(P&&G>P){N=(P-G)/G;Y()}if(Q&&D>Q){N=(Q-D)/D;Y()}}L(a("<div />").css({width:this.width,height:this.height}).append(a(this).css({width:this.width,height:this.height,display:"block",margin:"auto",border:0}).attr("id","cboxPhoto")));j.length>1&&a(this).css({cursor:"pointer"}).click(f.next);if(v)this.style.msInterpolationMode="bicubic"};F.src=A}else a("<div />").load(A,function(G,D){D==="success"?L(a(this)):L(a("<p>Request unsuccessful.</p>"))})};f.next=function(){J=J<j.length-
1?J+1:0;f.load()};f.prev=function(){J=J>0?J-1:j.length-1;f.load()};f.slideshow=function(){function d(){s.text(i.slideshowStop).bind(p,function(){A=setTimeout(f.next,i.slideshowSpeed)}).bind(r,function(){clearTimeout(A)}).one("click",function(){w();a(this).removeClass(x)});g.removeClass(F+"off").addClass(F+"on")}var w,A,F="cboxSlideshow_";s.bind("cbox_cleanup",function(){clearTimeout(A);s.unbind(p+" "+r+" click")});w=function(){clearTimeout(A);s.text(i.slideshowStart).unbind(p+" "+r).one("click",function(){d();
A=setTimeout(f.next,i.slideshowSpeed);a(this).removeClass(x)});g.removeClass(F+"on").addClass(F+"off")};if(i.slideshow&&j.length>1)i.slideshowAuto?d():w()};f.close=function(){a.event.trigger("cbox_cleanup");X=false;a().unbind("keydown",b).unbind("keydown.cbox_close");E.unbind(y+" resize.cboxie6 scroll.cboxie6");k.css({cursor:"auto"}).fadeOut("fast");g.stop(true,false).fadeOut("fast",function(){o.remove();g.css({opacity:1});n.children().hide();a.event.trigger("cbox_closed")})};f.element=function(){return K};
f.settings=aa;a(f.init)})(jQuery);
(function(a){a.fn.extend({elastic:function(){var b=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight"];return this.each(function(){function c(p,y){curratedHeight=Math.floor(parseInt(p,10));m.height()!=curratedHeight&&m.css({height:curratedHeight+"px",overflow:y})}function t(){var p=m.val().replace(/<|>/g," ").replace(/\n/g,"<br />").replace(/&/g,"&amp;"),y=x.html();if(p+"&nbsp;"!=y){x.html(p+"&nbsp;");if(Math.abs(x.height()+f-m.height())>
3){p=x.height()+f;if(p>=q)c(q,"auto");else p<=v?c(v,"hidden"):c(p,"hidden")}}}if(this.type!="textarea")return false;var m=a(this),x=a("<div />").css({position:"absolute",display:"none"}),f=parseInt(m.css("line-height"),10)||parseInt(m.css("font-size"),"10"),v=parseInt(m.css("height"),10)||f*3,q=parseInt(m.css("max-height"),10)||Number.MAX_VALUE,r=0;x.appendTo(m.parent());for(r=b.length;r--;)x.css(b[r].toString(),m.css(b[r].toString()));m.css({overflow:"hidden"});m.keyup(function(){t()});m.live("input paste",
function(){setTimeout(t,250)});t()})}})})(jQuery);jQuery.fn.defaultValue=function(a){return this.each(function(){if(!(this.type!="text"&&this.type!="password"&&this.type!="textarea")){var b=this;if(this.value==""){this.value=a;$(this).focus(function(){if(this.value==a||this.value=="")this.value=""});$(this).blur(function(){if(this.value==a||this.value=="")this.value=a});$(this).parents("form").each(function(){$(this).submit(function(){if(b.value==a)b.value=""})})}}})};
jQuery.fn.preventDoubleSubmit=function(){this.find(":submit").each(function(){$(this).click(function(){this.originalValue=this.value;this.value="Submitting...";this.beenClicked=true})});return this.submit(function(){if(this.beenSubmitted)return false;else this.beenSubmitted=true})};jQuery.fn.resetDoubleSubmit=function(){this.beenSubmitted=false;this.find(":submit").each(function(){if(this.beenClicked){this.value=this.originalValue;this.beenClicked=false}});return this};
