(function(b,C,eb){var bb={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,fastIframe:true,photo:false,href:false,title:false,rel:false,opacity:.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,returnFocus:true,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true,top:false,bottom:false,left:false,right:false,fixed:false,data:false},o="colorbox",i="cbox",x=i+"Element",ab=i+"_open",R=i+"_load",M=i+"_complete",H=i+"_cleanup",X=i+"_closed",I=i+"_purge",y=b.browser.msie&&!b.support.opacity,G=y&&b.browser.version<7,J=i+"_IE6",u,h,w,n,Q,P,O,N,e,l,j,A,z,W,S,B,E,F,V,L,a,s,t,p,q,m,f,g,r,D,K,T,Y,c;function d(c,d,a){a=C.createElement("div");if(c)a.id=i+c;a.style.cssText=d||"";return b(a)}function k(a,b){return Math.round((/%/.test(a)?(b==="x"?l.width():l.height())/100:1)*parseInt(a,10))}function U(b){return a.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(b)}function Z(c){a=b.extend({},b.data(m,o));for(c in a)if(b.isFunction(a[c])&&c.substring(0,2)!=="on")a[c]=a[c].call(m);a.rel=a.rel||m.rel||"nofollow";a.href=a.href||b(m).attr("href");a.title=a.title||m.title;if(typeof a.href==="string")a.href=b.trim(a.href)}function v(c,a){a&&a.call(m);b.event.trigger(c)}function db(){var d,b=i+"Slideshow_",g="click."+i,j,k,l;if(a.slideshow&&e[1]){j=function(){B.text(a.slideshowStop).unbind(g).bind(M,function(){if(f<e.length-1||a.loop)d=setTimeout(c.next,a.slideshowSpeed)}).bind(R,function(){clearTimeout(d)}).one(g+" "+H,k);h.removeClass(b+"off").addClass(b+"on");d=setTimeout(c.next,a.slideshowSpeed)};k=function(){clearTimeout(d);B.text(a.slideshowStart).unbind([M,R,H,g].join(" ")).one(g,j);h.removeClass(b+"on").addClass(b+"off")};if(a.slideshowAuto)j();else k()}else h.removeClass(b+"off "+b+"on")}function cb(d){if(!K){m=d;Z();e=b(m);f=0;if(a.rel!=="nofollow"){e=b("."+x).filter(function(){var c=b.data(this,o).rel||this.rel;return c===a.rel});f=e.index(m);if(f===-1){e=e.add(m);f=e.length-1}}if(!r){r=D=true;h.show();if(a.returnFocus)try{m.blur();b(m).one(X,function(){try{this.focus()}catch(a){}})}catch(g){}u.css({opacity:+a.opacity,cursor:a.overlayClose?"pointer":"auto"}).show();a.w=k(a.initialWidth,"x");a.h=k(a.initialHeight,"y");c.position();G&&l.bind("resize."+J+" scroll."+J,function(){u.css({width:l.width(),height:l.height(),top:l.scrollTop(),left:l.scrollLeft()})}).trigger("resize."+J);v(ab,a.onOpen);L.add(W).hide();V.html(a.close).show()}c.load(true)}}c=b.fn[o]=b[o]=function(a,d){var c=this;a=a||{};if(!c[0]){if(c.selector)return c;c=b("<a/>");a.open=true}if(d)a.onComplete=d;c.each(function(){b.data(this,o,b.extend({},b.data(this,o)||bb,a));b(this).addClass(x)});(b.isFunction(a.open)&&a.open.call(c)||a.open)&&cb(c[0]);return c};c.init=function(){l=b(eb);h=d().attr({id:o,"class":y?i+(G?"IE6":"IE"):""});u=d("Overlay",G?"position:absolute":"").hide();w=d("Wrapper");n=d("Content").append(j=d("LoadedContent","width:0; height:0; overflow:hidden"),z=d("LoadingOverlay").add(d("LoadingGraphic")),W=d("Title"),S=d("Current"),E=d("Next"),F=d("Previous"),B=d("Slideshow").bind(ab,db),V=d("Close"));w.append(d().append(d("TopLeft"),Q=d("TopCenter"),d("TopRight")),d(false,"clear:left").append(P=d("MiddleLeft"),n,O=d("MiddleRight")),d(false,"clear:left").append(d("BottomLeft"),N=d("BottomCenter"),d("BottomRight"))).children().children().css({"float":"left"});A=d(false,"position:absolute; width:9999px; visibility:hidden; display:none");b("body").prepend(u,h.append(w,A));n.children().hover(function(){b(this).addClass("hover")},function(){b(this).removeClass("hover")}).addClass("hover");s=Q.height()+N.height()+n.outerHeight(true)-n.height();t=P.width()+O.width()+n.outerWidth(true)-n.width();p=j.outerHeight(true);q=j.outerWidth(true);h.css({"padding-bottom":s,"padding-right":t}).hide();E.click(function(){c.next()});F.click(function(){c.prev()});V.click(function(){c.close()});L=E.add(F).add(S).add(B);n.children().removeClass("hover");u.click(function(){a.overlayClose&&c.close()});b(C).bind("keydown."+i,function(b){var d=b.keyCode;if(r&&a.escKey&&d===27){b.preventDefault();c.close()}if(r&&a.arrowKey&&e[1])if(d===37){b.preventDefault();F.click()}else if(d===39){b.preventDefault();E.click()}})};c.remove=function(){h.add(u).remove();b("."+x).removeData(o).removeClass(x)};c.position=function(e,g){var d=0,b=0;l.unbind("resize."+i);h.hide();if(a.fixed&&!G)h.css({position:"fixed"});else{d=l.scrollTop();b=l.scrollLeft();h.css({position:"absolute"})}if(a.right!==false)b+=Math.max(l.width()-a.w-q-t-k(a.right,"x"),0);else if(a.left!==false)b+=k(a.left,"x");else b+=Math.round(Math.max(l.width()-a.w-q-t,0)/2);if(a.bottom!==false)d+=Math.max(C.documentElement.clientHeight-a.h-p-s-k(a.bottom,"y"),0);else if(a.top!==false)d+=k(a.top,"y");else d+=Math.round(Math.max(C.documentElement.clientHeight-a.h-p-s,0)/2);h.show();e=h.width()===a.w+q&&h.height()===a.h+p?0:e||0;w[0].style.width=w[0].style.height="9999px";function f(a){Q[0].style.width=N[0].style.width=n[0].style.width=a.style.width;z[0].style.height=z[1].style.height=n[0].style.height=P[0].style.height=O[0].style.height=a.style.height}h.dequeue().animate({width:a.w+q,height:a.h+p,top:d,left:b},{duration:e,complete:function(){f(this);D=false;w[0].style.width=a.w+q+t+"px";w[0].style.height=a.h+p+s+"px";g&&g();setTimeout(function(){l.bind("resize."+i,c.position)},1)},step:function(){f(this)}})};c.resize=function(b){if(r){b=b||{};if(b.width)a.w=k(b.width,"x")-q-t;if(b.innerWidth)a.w=k(b.innerWidth,"x");j.css({width:a.w});if(b.height)a.h=k(b.height,"y")-p-s;if(b.innerHeight)a.h=k(b.innerHeight,"y");if(!b.innerHeight&&!b.height){var d=j.wrapInner("<div style='overflow:auto'></div>").children();a.h=d.height();d.replaceWith(d.children())}j.css({height:a.h});c.position(a.transition==="none"?0:a.speed)}};c.prep=function(q){if(!r)return;var k,l=a.transition==="none"?0:a.speed;j.remove();j=d("LoadedContent").append(q);function p(){a.w=a.w||j.width();a.w=a.mw&&a.mw<a.w?a.mw:a.w;return a.w}function m(){a.h=a.h||j.height();a.h=a.mh&&a.mh<a.h?a.mh:a.h;return a.h}j.hide().appendTo(A.show()).css({width:p(),overflow:a.scrolling?"auto":"hidden"}).css({height:m()}).prependTo(n);A.hide();b(g).css({"float":"none"});G&&b("select").not(h.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(H,function(){this.style.visibility="inherit"});k=function(){var q,k,p,d,m=e.length,c,n;if(!r)return;function s(){y&&h[0].style.removeAttribute("filter")}n=function(){clearTimeout(Y);z.hide();v(M,a.onComplete)};if(y)g&&j.fadeIn(100);W.html(a.title).add(j).show();if(m>1){typeof a.current==="string"&&S.html(a.current.replace("{current}",f+1).replace("{total}",m)).show();E[a.loop||f<m-1?"show":"hide"]().html(a.next);F[a.loop||f?"show":"hide"]().html(a.previous);q=f?e[f-1]:e[m-1];p=f<m-1?e[f+1]:e[0];a.slideshow&&B.show();if(a.preloading){d=b.data(p,o).href||p.href;k=b.data(q,o).href||q.href;d=b.isFunction(d)?d.call(p):d;k=b.isFunction(k)?k.call(q):k;if(U(d))b("<img/>")[0].src=d;if(U(k))b("<img/>")[0].src=k}}else L.hide();if(a.iframe){c=b("<iframe/>").addClass(i+"Iframe")[0];if(a.fastIframe)n();else b(c).one("load",n);c.name=i+ +new Date;c.src=a.href;if(!a.scrolling)c.scrolling="no";if(y){c.frameBorder=0;c.allowTransparency="true"}b(c).appendTo(j).one(I,function(){c.src="//about:blank"})}else n();if(a.transition==="fade")h.fadeTo(l,1,s);else s()};if(a.transition==="fade")h.fadeTo(l,0,function(){c.position(0,k)});else c.position(l,k)};c.load=function(o){var h,n,l=c.prep;D=true;g=false;m=e[f];!o&&Z();v(I);v(R,a.onLoad);a.h=a.height?k(a.height,"y")-p-s:a.innerHeight&&k(a.innerHeight,"y");a.w=a.width?k(a.width,"x")-q-t:a.innerWidth&&k(a.innerWidth,"x");a.mw=a.w;a.mh=a.h;if(a.maxWidth){a.mw=k(a.maxWidth,"x")-q-t;a.mw=a.w&&a.w<a.mw?a.w:a.mw}if(a.maxHeight){a.mh=k(a.maxHeight,"y")-p-s;a.mh=a.h&&a.h<a.mh?a.h:a.mh}h=a.href;Y=setTimeout(function(){z.show()},100);if(a.inline){d().hide().insertBefore(b(h)[0]).one(I,function(){b(this).replaceWith(j.children())});l(b(h))}else if(a.iframe)l(" ");else if(a.html)l(a.html);else if(U(h)){b(g=new Image).addClass(i+"Photo").error(function(){a.title=false;l(d("Error").text("This image could not be loaded"))}).load(function(){var b;g.onload=null;if(a.scalePhotos){n=function(){g.height-=g.height*b;g.width-=g.width*b};if(a.mw&&g.width>a.mw){b=(g.width-a.mw)/g.width;n()}if(a.mh&&g.height>a.mh){b=(g.height-a.mh)/g.height;n()}}if(a.h)g.style.marginTop=Math.max(a.h-g.height,0)/2+"px";if(e[1]&&(f<e.length-1||a.loop)){g.style.cursor="pointer";g.onclick=function(){c.next()}}if(y)g.style.msInterpolationMode="bicubic";setTimeout(function(){l(g)},1)});setTimeout(function(){g.src=h},1)}else h&&A.load(h,a.data,function(e,a,c){l(a==="error"?d("Error").text("Request unsuccessful: "+c.statusText):b(this).contents())})};c.next=function(){if(!D&&e[1]&&(f<e.length-1||a.loop)){f=f<e.length-1?f+1:0;c.load()}};c.prev=function(){if(!D&&e[1]&&(f||a.loop)){f=f?f-1:e.length-1;c.load()}};c.close=function(){if(r&&!K){K=true;r=false;v(H,a.onCleanup);l.unbind("."+i+" ."+J);u.fadeTo(200,0);h.stop().fadeTo(300,0,function(){h.add(u).css({opacity:1,cursor:"auto"}).hide();v(I);j.remove();setTimeout(function(){K=false;v(X,a.onClosed)},1)})}};c.element=function(){return b(m)};c.settings=bb;T=function(a){if(!(a.button!==0&&typeof a.button!=="undefined"||a.ctrlKey||a.shiftKey||a.altKey)){a.preventDefault();cb(this)}};if(b.fn.delegate)b(C).delegate("."+x,"click",T);else b("."+x).live("click",T);b(c.init)})(jQuery,document,this);(function(a){a.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(b,a){this.defaults.type=b;this.defaults.name=a},"get":function(d,h){var c=a.extend({},this.defaults,h);if(!c.single.length)c.single="metadata";var b=a.data(d,c.single);if(b)return b;b="{}";if(c.type=="class"){var g=c.cre.exec(d.className);if(g)b=g[1]}else if(c.type=="elem"){if(!d.getElementsByTagName)return undefined;var f=d.getElementsByTagName(c.name);if(f.length)b=a.trim(f[0].innerHTML)}else if(d.getAttribute!=undefined){var e=d.getAttribute(c.name);if(e)b=e}if(b.indexOf("{")<0)b="{"+b+"}";b=eval("("+b+")");a.data(d,c.single,b);return b}}});a.fn.metadata=function(b){return a.metadata.get(this[0],b)}})(jQuery);(function(a){a.fn.extend({autocomplete:function(c,b){b=a.extend({},a.Autocompleter.defaults,{url:typeof c=="string"?c:null,data:typeof c=="object"?c:null,func:typeof c=="function"?c:null,delay:typeof c=="string"||typeof c=="function"?a.Autocompleter.defaults.delay:10,max:b&&!b.scroll?10:150},b);b.highlight=b.highlight||function(a){return a};b.formatMatch=b.formatMatch||b.formatItem;return this.each(function(){new a.Autocompleter(this,b)})},result:function(a){return this.bind("result",a)},search:function(a){return this.trigger("search",[a])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(a){return this.trigger("setOptions",[a])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(f,b){var e={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},d=a(f).attr("autocomplete","off").addClass(b.inputClass),l,g="",m=a.Autocompleter.Cache(b),j=0,o,t={mouseDownOnSelect:false},c=a.Autocompleter.Select(b,f,r,t),p;a.browser.opera&&a(f.form).bind("submit.autocomplete",function(){if(p){p=false;return false}});d.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(d){j=1;o=d.keyCode;switch(d.keyCode){case e.UP:d.preventDefault();if(c.visible())c.prev();else i(0,true);break;case e.DOWN:d.preventDefault();if(c.visible())c.next();else i(0,true);break;case e.PAGEUP:d.preventDefault();if(c.visible())c.pageUp();else i(0,true);break;case e.PAGEDOWN:d.preventDefault();if(c.visible())c.pageDown();else i(0,true);break;case b.multiple&&a.trim(b.multipleSeparator)==","&&e.COMMA:case e.TAB:case e.RETURN:if(r()){d.preventDefault();p=true;return false}break;case e.ESC:c.hide();break;default:clearTimeout(l);l=setTimeout(i,b.delay)}}).focus(function(){j++}).blur(function(){j=0;!t.mouseDownOnSelect&&v()}).click(function(){j++>1&&!c.visible()&&i(0,true)}).bind("search",function(){var c=arguments.length>1?arguments[1]:null;function b(f,b){var a;if(b&&b.length)for(var e=0;e<b.length;e++)if(b[e].result.toLowerCase()==f.toLowerCase()){a=b[e];break}if(typeof c=="function")c(a);else d.trigger("result",a&&[a.data,a.value])}a.each(h(d.val()),function(c,a){s(a,b,b)})}).bind("flushCache",function(){m.flush()}).bind("setOptions",function(){a.extend(b,arguments[1]);"data" in arguments[1]&&m.populate()}).bind("unautocomplete",function(){c.unbind();d.unbind();a(f.form).unbind(".autocomplete")});function r(){var i=c.selected();if(!i)return false;var e=i.result;g=e;if(b.multiple){var j=h(d.val());if(j.length>1){var m=b.multipleSeparator.length,o=a(f).selection().start,l,k=0;a.each(j,function(b,a){k+=a.length;if(o<=k){l=b;return false}k+=m});j[l]=e;e=j.join(b.multipleSeparator)}e+=b.multipleSeparator}d.val(e);n();d.trigger("result",[i.data,i.value]);return true}function i(h,f){if(o==e.DEL){c.hide();return}var a=d.val();if(!f&&a==g)return;g=a;a=k(a);if(a.length>=b.minChars){d.addClass(b.loadingClass);if(!b.matchCase)a=a.toLowerCase();s(a,w,n)}else{q();c.hide()}}function h(c){if(!c)return [""];if(!b.multiple)return [a.trim(c)];return a.map(c.split(b.multipleSeparator),function(b){return a.trim(c).length?a.trim(b):null})}function k(c){if(!b.multiple)return c;var d=h(c);if(d.length==1)return d[0];var e=a(f).selection().start;if(e==c.length)d=h(c);else d=h(c.replace(c.substring(e),""));return d[d.length-1]}function x(h,c){if(b.autoFill&&k(d.val()).toLowerCase()==h.toLowerCase()&&o!=e.BACKSPACE){d.val(d.val()+c.substring(k(g).length));a(f).selection(g.length,g.length+c.length)}}function v(){clearTimeout(l);l=setTimeout(n,200)}function n(){var a=c.visible();c.hide();clearTimeout(l);q();b.mustMatch&&d.search(function(c){if(!c)if(b.multiple){var a=h(d.val()).slice(0,-1);d.val(a.join(b.multipleSeparator)+(a.length?b.multipleSeparator:""))}else{d.val("");d.trigger("result",null)}})}function w(b,a){if(a&&a.length&&j){q();c.display(a,b);x(b,a[0].value);c.show()}else n()}function s(d,g,i){if(!b.matchCase)d=d.toLowerCase();var h=m.load(d);if(h&&h.length)g(d,h);else if(typeof b.url=="string"&&b.url.length>0){var e={};a.each(b.extraParams,function(b,a){e[b]=typeof a=="function"?a():a});a.ajax({mode:"abort",port:"autocomplete"+f.name,dataType:b.dataType,url:b.url,data:a.extend({q:k(d),limit:b.max},e),success:function(c){var a=b.parse&&b.parse(c)||u(c);m.add(d,a);g(d,a)}})}else if(b.func){var e={};a.each(b.extraParams,function(b,a){e[b]=typeof a=="function"?a():a});b.func(a.extend({q:k(d),limit:b.max},e),function(c){var a=b.parse&&b.parse(c)||u(c);m.add(d,a);g(d,a)})}else{c.emptyList();i(d)}}function u(f){var d=[];if(f!=null)for(var g=f.split("\n"),e=0;e<g.length;e++){var c=a.trim(g[e]);if(c){c=c.split("|");d[d.length]={data:c,value:c[0],result:b.formatResult&&b.formatResult(c,c[0])||c[0]}}}return d}function q(){d.removeClass(b.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(a){return a[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(a,b){return a.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:200};a.Autocompleter.Cache=function(b){var c={},d=0;function e(a,d){if(!b.matchCase)a=a.toLowerCase();var c=a.indexOf(d);if(b.matchContains=="word")c=a.toLowerCase().search("\\b"+d.toLowerCase());if(c==-1)return false;return c==0||b.matchContains}function h(a,e){d>b.cacheLength&&g();if(!c[a])d++;c[a]=e}function f(){if(!b.data)return false;var d={},j=0;if(!b.url&&!b.func)b.cacheLength=1;d[""]=[];for(var f=0,k=b.data.length;f<k;f++){var c=b.data[f];c=typeof c=="string"?[c]:c;var e=b.formatMatch(c,f+1,b.data.length);if(e===false)continue;var g=e.charAt(0).toLowerCase();if(!d[g])d[g]=[];var i={value:e,data:c,result:b.formatResult&&b.formatResult(c)||e};d[g].push(i);j++<b.max&&d[""].push(i)}a.each(d,function(c,a){b.cacheLength++;h(c,a)})}setTimeout(f,25);function g(){c={};d=0}return {flush:g,add:h,populate:f,load:function(f){if(!b.cacheLength||!d)return null;if(!b.url&&!b.func&&b.matchContains){var g=[];for(var j in c)if(j.length>0){var h=c[j];a.each(h,function(b,a){e(a.value,f)&&g.push(a)})}return g}else if(c[f])return c[f];else if(b.matchSubset)for(var i=f.length-1;i>=b.minChars;i--){var h=c[f.substr(0,i)];if(h){var g=[];a.each(h,function(b,a){if(e(a.value,f))g[g.length]=a});return g}}return null}}};a.Autocompleter.Select=function(d,k,r,n){var f={ACTIVE:"ac_over"},b,c=-1,i,l="",m=true,g,e;function s(){if(!m)return;g=a("<div/>").hide().addClass(d.resultsClass).css("position","absolute").appendTo(document.body);e=a("<ul/>").appendTo(g).mouseover(function(b){if(j(b).nodeName&&j(b).nodeName.toUpperCase()=="LI"){c=a("li",e).removeClass(f.ACTIVE).index(j(b));a(j(b)).addClass(f.ACTIVE)}}).click(function(b){a(j(b)).addClass(f.ACTIVE);r();k.focus();return false}).mousedown(function(){n.mouseDownOnSelect=true}).mouseup(function(){n.mouseDownOnSelect=false});d.width>0&&g.css("width",d.width);m=false}function j(b){var a=b.target;while(a&&a.tagName!="LI")a=a.parentNode;if(!a)return [];return a}function h(h){b.slice(c,c+1).removeClass(f.ACTIVE);p(h);var g=b.slice(c,c+1).addClass(f.ACTIVE);if(d.scroll){var a=0;b.slice(0,c).each(function(){a+=this.offsetHeight});if(a+g[0].offsetHeight-e.scrollTop()>e[0].clientHeight)e.scrollTop(a+g[0].offsetHeight-e.innerHeight());else a<e.scrollTop()&&e.scrollTop(a)}}function p(a){c+=a;if(c<0)c=b.size()-1;else if(c>=b.size())c=0}function o(a){return d.max&&d.max<a?d.max:a}function q(){e.empty();for(var j=o(i.length),g=0;g<j;g++){if(!i[g])continue;var h=d.formatItem(i[g].data,g+1,j,i[g].value,l);if(h===false)continue;var k=a("<li/>").html(d.highlight(h,l)).addClass(g%2==0?"ac_even":"ac_odd").appendTo(e)[0];a.data(k,"ac_data",i[g])}b=e.find("li");if(d.selectFirst){b.slice(0,1).addClass(f.ACTIVE);c=0}a.fn.bgiframe&&e.bgiframe()}return {display:function(a,b){s();i=a;l=b;q()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){if(c!=0&&c-8<0)h(-c);else h(-8)},pageDown:function(){if(c!=b.size()-1&&c+8>b.size())h(b.size()-1-c);else h(8)},hide:function(){g&&g.hide();b&&b.removeClass(f.ACTIVE);c=-1},visible:function(){return g&&g.is(":visible")},current:function(){return this.visible()&&(b.filter("."+f.ACTIVE)[0]||d.selectFirst&&b[0])},show:function(){var h=a(k).offset();g.css({width:typeof d.width=="string"||d.width>0?d.width:a(k).width(),top:h.top+k.offsetHeight,left:h.left}).show();if(d.scroll){e.scrollTop(0);e.css({maxHeight:d.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var c=0;b.each(function(){c+=this.offsetHeight});var f=c>d.scrollHeight;e.css("height",f?d.scrollHeight:c);!f&&b.width(e.width()-parseInt(b.css("padding-left"))-parseInt(b.css("padding-right")))}}},selected:function(){var c=b&&b.filter("."+f.ACTIVE).removeClass(f.ACTIVE);return c&&c.length&&a.data(c[0],"ac_data")},emptyList:function(){e&&e.empty()},unbind:function(){g&&g.remove()}}};a.fn.selection=function(b,c){if(b!==undefined)return this.each(function(){if(this.createTextRange){var a=this.createTextRange();if(c===undefined||b==c){a.move("character",b);a.select()}else{a.collapse(true);a.moveStart("character",b);a.moveEnd("character",c);a.select()}}else if(this.setSelectionRange)this.setSelectionRange(b,c);else if(this.selectionStart){this.selectionStart=b;this.selectionEnd=c}});var a=this[0];if(a.createTextRange){var g=document.selection.createRange(),h=a.value,e="<->",f=g.text.length;g.text=e;var d=a.value.indexOf(e);a.value=h;this.selection(d,d+f);return {start:d,end:d+f}}else if(a.selectionStart!==undefined)return {start:a.selectionStart,end:a.selectionEnd}}})(jQuery);jQuery.cookie=function(d,c,a){if(typeof c!="undefined"){a=a||{};if(c===null){c="";a.expires=-1}var h="";if(a.expires&&(typeof a.expires=="number"||a.expires.toUTCString)){var b;if(typeof a.expires=="number"){b=new Date;b.setTime(b.getTime()+a.expires*24*60*60*1e3)}else b=a.expires;h="; expires="+b.toUTCString()}var l=a.path?"; path="+a.path:"",j=a.domain?"; domain="+a.domain:"",k=a.secure?"; secure":"";document.cookie=[d,"=",encodeURIComponent(c),h,l,j,k].join("")}else{var f=null;if(document.cookie&&document.cookie!="")for(var g=document.cookie.split(";"),e=0;e<g.length;e++){var i=jQuery.trim(g[e]);if(i.substring(0,d.length+1)==d+"="){f=decodeURIComponent(i.substring(d.length+1));break}}return f}};"use strict";(function(a,h,j){var c=true,b=false,e=null,f,d,m,g="ui-tooltip",q="ui-widget",i="ui-state-disabled",o="div.qtip."+g,l=g+"-focus",s=g+"-hover",z="-31000px",p="_replacedByqTip",k="oldtitle";function n(c){var e;if(!c||"object"!==typeof c)return b;if("object"!==typeof c.metadata)c.metadata={type:c.metadata};if("content" in c){if("object"!==typeof c.content||c.content.jquery)c.content={text:c.content};e=c.content.text||b;if(!a.isFunction(e)&&(!e&&!e.attr||e.length<1||"object"===typeof e&&!e.jquery))c.content.text=b;if("title" in c.content){if("object"!==typeof c.content.title)c.content.title={text:c.content.title};e=c.content.title.text||b;if(!a.isFunction(e)&&(!e&&!e.attr||e.length<1||"object"===typeof e&&!e.jquery))c.content.title.text=b}}if("position" in c)if("object"!==typeof c.position)c.position={my:c.position,at:c.position};if("show" in c)if("object"!==typeof c.show)if(c.show.jquery)c.show={target:c.show};else c.show={event:c.show};if("hide" in c)if("object"!==typeof c.hide)if(c.hide.jquery)c.hide={target:c.hide};else c.hide={event:c.hide};if("style" in c)if("object"!==typeof c.style)c.style={classes:c.style};a.each(d,function(){this.sanitize&&this.sanitize(c)});return c}function x(w,r,y,M){var j=this,L=document.body,A=g+"-"+y,z=0,x=0,p=a(),v=".qtip-"+y,t,u;j.id=y;j.rendered=b;j.elements=t={target:w};j.timers={img:[]};j.options=r;j.checks={};j.plugins={};j.cache=u={event:{},target:e,disabled:b,attr:M};function D(e){var d=0,c,b=r,a=e.split(".");while(b=b[a[d++]])if(d<a.length)c=b;return [c||r,a.pop()]}function J(){var a=r.style.widget;p.toggleClass(q,a);t.content.toggleClass(q+"-content",a);t.titlebar&&t.titlebar.toggleClass(q+"-header",a);t.button&&t.button.toggleClass(g+"-icon",!a)}function H(){if(t.title){t.titlebar.remove();t.titlebar=t.title=t.button=e;j.reposition()}}function G(){var c=r.content.title.button,e=typeof c==="string",d=e?c:"Close tooltip";t.button&&t.button.remove();if(c.jquery)t.button=c;else t.button=a("<a />",{"class":"ui-state-default "+(r.style.widget?"":g+"-icon"),title:d,"aria-label":d}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}));t.button.appendTo(t.titlebar).attr("role","button").hover(function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseenter")}).click(function(a){!p.hasClass(i)&&j.hide(a);return b}).bind("mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")});j.redraw()}function C(){var b=A+"-title";t.titlebar&&H();t.titlebar=a("<div />",{"class":g+"-titlebar "+(r.style.widget?"ui-widget-header":"")}).append(t.title=a("<div />",{id:b,"class":g+"-title","aria-atomic":c})).insertBefore(t.content);if(r.content.title.button)G();else j.rendered&&j.redraw()}function K(a){var d=t.button,c=t.title;if(!j.rendered)return b;if(!a)d.remove();else{!c&&C();G()}}function I(c){var d=t.title;if(!j.rendered||!c)return b;if(a.isFunction(c))c=c.call(w,j)||"";if(c.jquery&&c.length>0)d.empty().append(c.css({display:"block"}));else d.html(c);j.redraw();j.rendered&&p.is(":visible")&&j.reposition(u.event)}function B(c,f){var d=t.content;c=c||r.content.text;if(!j.rendered||!c)return b;if(a.isFunction(c))c=c.call(w,j)||"";if(c.jquery&&c.length>0)d.empty().append(c.css({display:"block"}));else d.html(c);function e(e){var a;function c(){if((a=a.not(this)).length===0){j.redraw();f!==b&&j.reposition(u.event);e()}}if((a=d.find("img:not([height]):not([width])")).length===0)return c.call(a);a.each(function(b,a){(function d(){var e=j.timers.img;if(a.height&&a.width){clearTimeout(e[b]);return c.call(a)}e[b]=setTimeout(d,20)})()})}if(j.rendered<0)p.queue("fx",e);else{x=0;e(a.noop)}return j}function F(){var d=r.position,c={show:r.show.target,hide:r.hide.target,viewport:a(d.viewport),document:a(document),window:a(h)},e={show:a.trim(""+r.show.event).split(" "),hide:a.trim(""+r.hide.event).split(" ")},q=a.browser.msie&&parseInt(a.browser.version,10)===6;function n(d){if(p.hasClass(i))return b;c.show.trigger("qtip-"+y+"-inactive");clearTimeout(j.timers.show);clearTimeout(j.timers.hide);var a=function(){j.show(d)};if(r.show.delay>0)j.timers.show=setTimeout(a,r.show.delay);else a()}function l(e){if(p.hasClass(i))return b;var f=a(e.relatedTarget||e.target),g=f.closest(o)[0]===p[0],h=f[0]===c.show[0];clearTimeout(j.timers.show);clearTimeout(j.timers.hide);if(d.target==="mouse"&&g||r.hide.fixed&&(/mouse(out|leave|move)/.test(e.type)&&(g||h))){e.preventDefault();return}if(r.hide.delay>0)j.timers.hide=setTimeout(function(){j.hide(e)},r.hide.delay);else j.hide(e)}function k(a){if(p.hasClass(i))return b;clearTimeout(j.timers.inactive);j.timers.inactive=setTimeout(function(){j.hide(a)},r.hide.inactive)}function g(a){p.is(":visible")&&j.reposition(a)}p.bind("mouseenter"+v+" mouseleave"+v,function(a){var b=a.type==="mouseenter";b&&j.focus(a);p.toggleClass(s,b)});if(r.hide.fixed){c.hide=c.hide.add(p);p.bind("mouseover"+v,function(){!p.hasClass(i)&&clearTimeout(j.timers.hide)})}if(/mouse(out|leave)/i.test(r.hide.event))r.hide.leave&&c.window.bind("mouse"+(r.hide.leave.indexOf("frame")>-1?"out":"leave")+v,function(a){!a.relatedTarget&&j.hide(a)});else/mouse(over|enter)/i.test(r.show.event)&&c.hide.bind("mouseleave"+v,function(){clearTimeout(j.timers.show)});(""+r.hide.event).indexOf("unfocus")>0&&c.document.bind("mousedown"+v,function(c){var b=a(c.target),d=!p.hasClass(i)&&p.is(":visible");b.parents(o).length===0&&b.add(w).length>1&&j.hide(c)});if("number"===typeof r.hide.inactive){c.show.bind("qtip-"+y+"-inactive",k);a.each(f.inactiveEvents,function(b,a){c.hide.add(t.tooltip).bind(a+v+"-inactive",k)})}a.each(e.hide,function(g,b){var f=a.inArray(b,e.show),d=a(c.hide);if(f>-1&&d.add(c.show).length===d.length||b==="unfocus"){c.show.bind(b+v,function(a){if(p.is(":visible"))l(a);else n(a)});delete e.show[f]}else c.hide.bind(b+v,l)});a.each(e.show,function(b,a){c.show.bind(a+v,n)});"number"===typeof r.hide.distance&&c.show.bind("mousemove"+v,function(a){var b=u.origin||{},c=r.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&j.hide(a)});if(d.target==="mouse"){c.show.add(p).bind("mousemove"+v,function(a){m={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}});if(d.adjust.mouse){r.hide.event&&p.bind("mouseleave"+v,function(a){(a.relatedTarget||a.target)!==c.show[0]&&j.hide(a)});c.document.bind("mousemove"+v,function(a){!p.hasClass(i)&&p.is(":visible")&&j.reposition(a||m)})}}(d.adjust.resize||c.viewport.length)&&(a.event.special.resize?c.viewport:c.window).bind("resize"+v,g);(c.viewport.length||q&&p.css("position")==="fixed")&&c.viewport.bind("scroll"+v,g)}function E(){var b=[r.show.target[0],r.hide.target[0],j.rendered&&t.tooltip[0],r.position.container[0],r.position.viewport[0],h,document];if(j.rendered)a([]).pushStack(a.grep(b,function(a){return typeof a==="object"})).unbind(v);else r.show.target.unbind(v+"-create")}j.checks.builtin={"^id$":function(i,j,h){var e=h===c?f.nextid:h,d=g+"-"+e;if(e!==b&&e.length>0&&!a("#"+d).length){p[0].id=d;t.content[0].id=d+"-content";t.title[0].id=d+"-title"}},"^content.text$":function(b,c,a){B(a)},"^content.title.text$":function(b,c,a){if(!a)return H();!t.title&&a&&C();I(a)},"^content.title.button$":function(b,c,a){K(a)},"^position.(my|at)$":function(b,c,a){if("string"===typeof a)b[c]=new d.Corner(a)},"^position.container$":function(b,c,a){j.rendered&&p.appendTo(a)},"^show.ready$":function(){if(!j.rendered)j.render(1);else j.show()},"^style.classes$":function(c,d,b){a.attr(p[0],"class",g+" qtip ui-helper-reset "+b)},"^style.widget|content.title":J,"^events.(render|show|move|hide|focus|blur)$":function(d,c,b){p[(a.isFunction(b)?"":"un")+"bind"]("tooltip"+c,b)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)$":function(){E();F()}};a.extend(j,{render:function(h){if(j.rendered)return j;var f=r.content.title.text,e=a.Event("tooltiprender");a.attr(w[0],"aria-describedby",A);p=t.tooltip=a("<div/>",{id:A,"class":g+" qtip ui-helper-reset "+r.style.classes,width:r.style.width||"",role:"alert","aria-live":"polite","aria-atomic":b,"aria-describedby":A+"-content","aria-hidden":c}).toggleClass(i,u.disabled).data("qtip",j).appendTo(r.position.container).append(t.content=a("<div />",{"class":g+"-content",id:A+"-content","aria-atomic":c}));j.rendered=-1;x=1;if(f){C();I(f)}B(b,b);j.rendered=c;J();a.each(r.events,function(c,b){a.isFunction(b)&&p.bind(c==="toggle"?"tooltipshow tooltiphide":"tooltip"+c,b)});a.each(d,function(){this.initialize==="render"&&this(j)});F();p.queue("fx",function(a){e.originalEvent=u.event;p.trigger(e,[j]);x=0;j.redraw();(r.show.ready||h)&&j.show(u.event);a()});return j},"get":function(c){var a,b;switch(c.toLowerCase()){case "dimensions":a={height:p.outerHeight(),width:p.outerWidth()};break;case "offset":a=d.offset(p,r.position.container);break;default:b=D(c.toLowerCase());a=b[0][b[1]];a=a.precedance?a.string():a}return a},"set":function(d,o){var m=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,l=/^content\.(title|attr)|style/i,f=b,h=b,g=j.checks,i;function k(e,d){var a,b,c;for(a in g)for(b in g[a])if(c=(new RegExp(b,"i")).exec(e)){d.push(c);g[a][b].apply(j,d)}}if("string"===typeof d){i=d;d={};d[i]=o}else d=a.extend(c,{},d);a.each(d,function(e,c){var b=D(e.toLowerCase()),g;g=b[0][b[1]];b[0][b[1]]="object"===typeof c&&c.nodeType?a(c):c;d[e]=[b[0],b[1],c,g];f=m.test(e)||f;h=l.test(e)||h});n(r);z=x=1;a.each(d,k);z=x=0;if(p.is(":visible")&&j.rendered){f&&j.reposition(r.position.target==="mouse"?e:u.event);h&&j.redraw()}return j},toggle:function(c,d){if(!j.rendered)if(c)j.render(1);else return j;var i=c?"show":"hide",f=r[i],k=p.is(":visible"),l,g;if((typeof c).search("boolean|number"))c=!k;if(k===c)return j;if(d){if(/over|enter/.test(d.type)&&/out|leave/.test(u.event.type)&&d.target===r.show.target[0]&&p.has(d.relatedTarget).length)return j;u.event=a.extend({},d)}g=a.Event("tooltip"+i);g.originalEvent=d?u.event:e;p.trigger(g,[j,90]);if(g.isDefaultPrevented())return j;a.attr(p[0],"aria-hidden",!!!c);if(c){u.origin=a.extend({},m);j.focus(d);a.isFunction(r.content.text)&&B();j.reposition(d);f.solo&&a(o,f.solo).not(p).qtip("hide",g)}else{clearTimeout(j.timers.show);delete u.origin;j.blur(d)}function h(){if(!c)p.css({display:"",visibility:"",width:r.style.width||"",opacity:"",left:"",top:""});else{a.browser.msie&&p[0].style.removeAttribute("filter");p.css("overflow","")}}p.stop(0,1);if(a.isFunction(f.effect)){f.effect.call(p,j);p.queue("fx",function(a){h();a()})}else if(f.effect===b){p[i]();h.call(p)}else p.fadeTo(90,c?1:0,h);c&&f.target.trigger("qtip-"+y+"-inactive");return j},show:function(a){return j.toggle(c,a)},hide:function(a){return j.toggle(b,a)},focus:function(h){if(!j.rendered)return j;var d=a(o),g=parseInt(p[0].style.zIndex,10),c=f.zindex+d.length,e=a.extend({},h),i,b;if(!p.hasClass(l)){b=a.Event("tooltipfocus");b.originalEvent=e;p.trigger(b,[j,c]);if(!b.isDefaultPrevented()){if(g!==c){d.each(function(){if(this.style.zIndex>g)this.style.zIndex=this.style.zIndex-1});d.filter("."+l).qtip("blur",e)}p.addClass(l)[0].style.zIndex=c}}return j},blur:function(d){var c=a.extend({},d),b;p.removeClass(l);b=a.Event("tooltipblur");b.originalEvent=c;p.trigger(b,[j]);return j},reposition:function(k,C){if(!j.rendered||z)return j;z=1;var f=r.position.target,v=r.position,i=v.my,o=v.at,n=v.adjust,B=n.method.split(" "),x=p.outerWidth(),w=p.outerHeight(),t=0,s=0,A=a.Event("tooltipmove"),y=p.css("position")==="fixed",e=v.viewport,c={left:0,top:0},q=(j.plugins.tip||{}).corner,l={horizontal:B[0],vertical:B[1]||B[0],tip:r.style.tip||{},left:function(a){var m=l.horizontal==="shift",h=e.offset.left+e.scrollLeft,p=i.x==="left"?x:i.x==="right"?-x:-x/2,r=o.x==="left"?t:o.x==="right"?-t:-t/2,k=l.tip.width+l.tip.border*2||0,f=q&&q.precedance==="x"&&!m?k:0,g=h-a-f,d=a+x-e.width-h+f,b=p-(i.precedance==="x"||i.x===i.y?r:0),j=i.x==="center";if(m){f=q&&q.precedance==="y"?k:0;b=(i.x==="left"?1:-1)*p-f;c.left+=g>0?g:d>0?-d:0;c.left=Math.max(e.offset.left+(f&&q.x==="center"?l.tip.offset:0),a-b,Math.min(Math.max(e.offset.left+e.width,a+b),c.left))}else{if(g>0&&(i.x!=="left"||d>0))c.left-=b+(j?0:2*n.x);else if(d>0&&(i.x!=="right"||g>0))c.left-=j?-b:b+2*n.x;if(c.left!==a&&j)c.left-=n.x;if(c.left<h&&-c.left>d)c.left=a}return c.left-a},top:function(a){var p=l.vertical==="shift",j=e.offset.top+e.scrollTop,m=i.y==="top"?w:i.y==="bottom"?-w:-w/2,r=o.y==="top"?s:o.y==="bottom"?-s:-s/2,k=l.tip.height+l.tip.border*2||0,f=q&&q.precedance==="y"&&!p?k:0,g=j-a-f,d=a+w-e.height-j+f,b=m-(i.precedance==="y"||i.x===i.y?r:0),h=i.y==="center";if(p){f=q&&q.precedance==="x"?k:0;b=(i.y==="top"?1:-1)*m-f;c.top+=g>0?g:d>0?-d:0;c.top=Math.max(e.offset.top+(f&&q.x==="center"?l.tip.offset:0),a-b,Math.min(Math.max(e.offset.top+e.height,a+b),c.top))}else{if(g>0&&(i.y!=="top"||d>0))c.top-=b+(h?0:2*n.y);else if(d>0&&(i.y!=="bottom"||g>0))c.top-=h?-b:b+2*n.y;if(c.top!==a&&h)c.top-=n.y;if(c.top<0&&-c.top>d)c.top=a}return c.top-a}};if(f==="mouse"){o={x:"left",y:"top"};k=k&&(k.type==="resize"||k.type==="scroll")?u.event:!n.mouse&&u.origin?u.origin:m&&(n.mouse||!k||!k.pageX)?{pageX:m.pageX,pageY:m.pageY}:k;c={top:k.pageY,left:k.pageX}}else{if(f==="event")if(k&&k.target&&k.type!=="scroll"&&k.type!=="resize")f=u.target=a(k.target);else f=u.target;f=a(f).eq(0);if(f.length===0)return j;else if(f[0]===document||f[0]===h){t=d.iOS?h.innerWidth:f.width();s=d.iOS?h.innerHeight:f.height();if(f[0]===h)c={top:!y||d.iOS?(e||f).scrollTop():0,left:!y||d.iOS?(e||f).scrollLeft():0}}else if(f.is("area")&&d.imagemap)c=d.imagemap(f,o);else if(f[0].namespaceURI==="http://www.w3.org/2000/svg"&&d.svg)c=d.svg(f,o);else{t=f.outerWidth();s=f.outerHeight();c=d.offset(f,v.container,y)}if(c.offset){t=c.width;s=c.height;c=c.offset}c.left+=o.x==="right"?t:o.x==="center"?t/2:0;c.top+=o.y==="bottom"?s:o.y==="center"?s/2:0}c.left+=n.x+(i.x==="right"?-x:i.x==="center"?-x/2:0);c.top+=n.y+(i.y==="bottom"?-w:i.y==="center"?-w/2:0);if(e.jquery&&f[0]!==h&&f[0]!==L&&l.vertical+l.horizontal!=="nonenone"){e={elem:e,height:e[(e[0]===h?"h":"outerH")+"eight"](),width:e[(e[0]===h?"w":"outerW")+"idth"](),scrollLeft:y?0:e.scrollLeft(),scrollTop:y?0:e.scrollTop(),offset:e.offset()||{left:0,top:0}};c.adjusted={left:l.horizontal!=="none"?l.left(c.left):0,top:l.vertical!=="none"?l.top(c.top):0}}else c.adjusted={left:0,top:0};p.attr("class",function(){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(g+"-pos-"+i.abbreviation());A.originalEvent=a.extend({},k);p.trigger(A,[j,c,e.elem||e]);if(A.isDefaultPrevented())return j;delete c.adjusted;if(C===b||isNaN(c.left)||isNaN(c.top)||!a.isFunction(v.effect))p.css(c);else if(a.isFunction(v.effect)){v.effect.call(p,j,a.extend({},c));p.queue(function(b){a(this).css({opacity:"",height:""});a.browser.msie&&this.style.removeAttribute("filter");b()})}z=0;return j},redraw:function(){if(j.rendered<1||x)return j;var f=g+"-fluid",h=r.position.container,e,d,b,c;x=1;if(r.style.width)p.css("width",r.style.width);else{p.css("width","").addClass(f);d=p.width()+(a.browser.mozilla?1:0);b=p.css("max-width")||"";c=p.css("min-width")||"";e=(b+c).indexOf("%")>-1?h.width()/100:0;b=(b.indexOf("%")>-1?e:1)*parseInt(b,10)||d;c=(c.indexOf("%")>-1?e:1)*parseInt(c,10)||0;d=b+c?Math.min(Math.max(d,c),b):d;p.css("width",Math.round(d)).removeClass(f)}x=0;return j},disable:function(b){var c=i;if("boolean"!==typeof b)b=!(p.hasClass(c)||u.disabled);if(j.rendered){p.toggleClass(c,b);a.attr(p[0],"aria-disabled",b)}else u.disabled=!!b;return j},enable:function(){return j.disable(b)},destroy:function(){var b=w[0],c=a.attr(b,k);if(j.rendered){p.remove();a.each(j.plugins,function(){this.destroy&&this.destroy()})}clearTimeout(j.timers.show);clearTimeout(j.timers.hide);E();a.removeData(b,"qtip");if(c){a.attr(b,"title",c);w.removeAttr(k)}w.removeAttr("aria-describedby").unbind(".qtip");return w}})}function w(s,l){var p,h,o,g,i=a(this),r=a(document.body),q=this===document?r:i,m=i.metadata?i.metadata(l.metadata):e,t=l.metadata.type==="html5"&&m?m[l.metadata.name]:e,j=i.data(l.metadata.name||"qtipopts");try{j=typeof j==="string"?new Function("return "+j)():j}catch(u){a.error("Unable to parse HTML5 attribute data: "+j)}g=a.extend(c,{},f.defaults,l,typeof j==="object"?n(j):e,n(t||m));m&&a.removeData(this,"metadata");h=g.position;g.id=s;if("boolean"===typeof g.content.text){o=i.attr(g.content.attr);if(g.content.attr!==b&&o)g.content.text=o;else return b}if(h.container===b)h.container=r;if(h.target===b)h.target=q;if(g.show.target===b)g.show.target=q;if(g.show.solo===c)g.show.solo=r;if(g.hide.target===b)g.hide.target=q;if(g.position.viewport===c)g.position.viewport=h.container;h.at=new d.Corner(h.at);h.my=new d.Corner(h.my);if(a.data(this,"qtip"))if(g.overwrite)i.qtip("destroy");else if(g.overwrite===b)return b;if(a.attr(this,"title")){a.attr(this,k,a.attr(this,"title"));this.removeAttribute("title")}p=new x(i,g,s,!!o);a.data(this,"qtip",p);i.bind("remove.qtip",function(){p.destroy()});return p}f=a.fn.qtip=function(h,g,o){var d=(""+h).toLowerCase(),l=e,m=d==="disable"?[c]:a.makeArray(arguments).slice(1,10),i=m[m.length-1],k=this[0]?a.data(this[0],"qtip"):e;if(!arguments.length&&k||d==="api")return k;else if("string"===typeof h){this.each(function(){var e=a.data(this,"qtip");if(!e)return c;if(i&&i.timeStamp)e.cache.event=i;if((d==="option"||d==="options")&&g)if(a.isPlainObject(g)||o!==j)e.set(g,o);else{l=e.get(g);return b}else e[d]&&e[d].apply(e[d],m)});return l!==e?l:this}else if("object"===typeof h||!arguments.length){k=n(a.extend(c,{},h));return f.bind.call(this,k,i)}};f.bind=function(e,h){return this.each(function(){var i,m,j,o=!e.id||e.id===b||e.id.length<1||a("#"+g+"-"+e.id).length?f.nextid++:e.id,l=".qtip-"+o+"-create",k=w.call(this,o,e);if(k===b)return c;i=k.options;a.each(d,function(){this.initialize==="initialize"&&this(k)});m={show:i.show.target,hide:i.hide.target};j={show:a.trim(""+i.show.event).replace(/ /g,l+" ")+l,hide:a.trim(""+i.hide.event).replace(/ /g,l+" ")+l};if(/mouse(over|enter)/i.test(j.show)&&!/mouse(out|leave)/i.test(j.hide))j.hide+=" mouseleave"+l;function n(d){function c(){k.render(typeof d==="object"||i.show.ready);m.show.unbind(j.show);m.hide.unbind(j.hide)}if(k.cache.disabled)return b;k.cache.event=a.extend({},d);if(i.show.delay>0){clearTimeout(k.timers.show);k.timers.show=setTimeout(c,i.show.delay);j.show!==j.hide&&m.hide.bind(j.hide,function(){clearTimeout(k.timers.show)})}else c()}m.show.bind(j.show,n);(i.show.ready||i.prerender)&&n(h)})};d=f.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase();this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase();this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.precedance=a.charAt(0).search(/^(t|b)/)>-1?"y":"x";this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y};this.abbreviation=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},offset:function(l,e,k){var c=l.offset(),b=e,j=0,g=document.body,f;function i(a,b){c.left+=b*a.scrollLeft();c.top+=b*a.scrollTop()}if(b){do if(b[0]===g)break;else if(b.css("position")!=="static"){f=b.position();c.left-=f.left+(parseInt(b.css("borderLeftWidth"),10)||0);c.top-=f.top+(parseInt(b.css("borderTopWidth"),10)||0);j++}while(b=b.offsetParent());(e[0]!==g||j>1)&&i(e,1);(d.iOS<4.1&&d.iOS>3.1||!d.iOS&&k)&&i(a(h),-1)}return c},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||b,fn:{attr:function(e,f){if(!this.length)return;var d=this[0],c="title",b=a.data(d,"qtip");if(e===c)if(arguments.length<2)return a.attr(d,k);else if(typeof b==="object"){b&&b.rendered&&b.options.content.attr===c&&b.cache.attr&&b.set("content.text",f);a.fn["attr"+p].apply(this,arguments);a.attr(d,k,a.attr(d,c));return this.removeAttr(c)}},clone:function(){var e=a([]),c="title",b;b=a.fn["clone"+p].apply(this,arguments).filter("[oldtitle]").each(function(){a.attr(this,c,a.attr(this,k));this.removeAttribute(k)}).end();return b},remove:a.ui?e:function(b,c){a(this).each(function(){if(!c)(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}};a.each(d.fn,function(b,d){if(!d)return c;var e=a.fn[b+p]=a.fn[b];a.fn[b]=function(){return d.apply(this,arguments)||e.apply(this,arguments)}});f.version="nightly";f.nextid=0;f.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" ");f.zindex=15000;f.defaults={prerender:b,id:b,overwrite:c,content:{text:c,attr:"title",title:{text:b,button:b}},position:{my:"top left",at:"bottom right",target:b,container:b,viewport:b,adjust:{x:0,y:0,mouse:c,resize:c,method:"flip flip"},effect:c},show:{target:b,event:"mouseenter",effect:c,delay:90,solo:b,ready:b},hide:{target:b,event:"mouseleave",effect:c,delay:0,fixed:b,inactive:b,leave:"window",distance:b},style:{classes:"",widget:b,width:b},events:{render:e,move:e,show:e,hide:e,toggle:e,focus:e,blur:e}};function v(f){var e=this,g=f.elements.tooltip,d=f.options.content.ajax,h=".qtip-ajax",i=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,j=c;f.checks.ajax={"^content.ajax":function(c,a,b){if(a==="ajax")d=b;if(a==="once")e.init();else if(d&&d.url)e.load();else g.unbind(h)}};a.extend(e,{init:function(){d&&d.url&&g.unbind(h)[d.once?"one":"bind"]("tooltipshow"+h,e.load);return e},load:function(m,n){if(m&&m.isDefaultPrevented())return e;var h=d.url.indexOf(" "),c=d.url,j,k=d.once&&!d.loading&&n;k&&g.css("visibility","hidden");if(h>-1){j=c.substr(h);c=c.substr(0,h)}function l(){if(k){g.css("visibility","");n=b}}function o(b){if(j)b=a("<div/>").append(b.replace(i,"")).find(j);f.set("content.text",b);l()}function p(c,a,b){f.set("content.text",a+": "+b);l()}a.ajax(a.extend({success:o,error:p,context:f},d,{url:c}));return e}});e.init()}d.ajax=function(a){var b=a.plugins.ajax;return "object"===typeof b?b:(a.plugins.ajax=new v(a))};d.ajax.initialize="render";d.ajax.sanitize=function(c){var b=c.content,a;if(b&&"ajax" in b){a=b.ajax;if(typeof a!=="object")a=c.content.ajax={url:a};if("boolean"!==typeof a.once&&a.once)a.once=!!a.once}};a.extend(c,f.defaults,{content:{ajax:{loading:c,once:c}}});d.imagemap=function(f,d){if(!f.jquery)f=a(f);var k=f.attr("shape").toLowerCase(),i=f.attr("coords").split(","),c=[],g=a('img[usemap="#'+f.parent("map").attr("name")+'"]'),h=g.offset(),b={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},j=0,e=0;function l(c,e){var j=0,a=1,b=1,h=0,i=0,g=c.width,f=c.height;while(g>0&&f>0&&a>0&&b>0){g=Math.floor(g/2);f=Math.floor(f/2);if(d.x==="left")a=g;else if(d.x==="right")a=c.width-g;else a+=Math.floor(g/2);if(d.y==="top")b=f;else if(d.y==="bottom")b=c.height-f;else b+=Math.floor(f/2);j=e.length;while(j--){if(e.length<2)break;h=e[j][0]-c.offset.left;i=e[j][1]-c.offset.top;(d.x==="left"&&h>=a||d.x==="right"&&h<=a||d.x==="center"&&(h<a||h>c.width-a)||d.y==="top"&&i>=b||d.y==="bottom"&&i<=b||d.y==="center"&&(i<b||i>c.height-b))&&e.splice(j,1)}}return {left:e[0][0],top:e[0][1]}}h.left+=Math.ceil((g.outerWidth()-g.width())/2);h.top+=Math.ceil((g.outerHeight()-g.height())/2);if(k==="poly"){j=i.length;while(j--){e=[parseInt(i[--j],10),parseInt(i[j+1],10)];if(e[0]>b.offset.right)b.offset.right=e[0];if(e[0]<b.offset.left)b.offset.left=e[0];if(e[1]>b.offset.bottom)b.offset.bottom=e[1];if(e[1]<b.offset.top)b.offset.top=e[1];c.push(e)}}else c=a.map(i,function(a){return parseInt(a,10)});switch(k){case "rect":b={width:Math.abs(c[2]-c[0]),height:Math.abs(c[3]-c[1]),offset:{left:c[0],top:c[1]}};break;case "circle":b={width:c[2]+2,height:c[2]+2,offset:{left:c[0],top:c[1]}};break;case "poly":a.extend(b,{width:Math.abs(b.offset.right-b.offset.left),height:Math.abs(b.offset.bottom-b.offset.top)});if(d.string()==="centercenter")b.offset={left:b.offset.left+b.width/2,top:b.offset.top+b.height/2};else b.offset=l(b,c.slice());b.width=b.height=0}b.offset.left+=h.left;b.offset.top+=h.top;return b};function r(f,b,a){var e=Math.ceil(b/2),d=Math.ceil(a/2),c={bottomright:[[0,0],[b,a],[b,0]],bottomleft:[[0,0],[b,0],[0,a]],topright:[[0,a],[b,0],[b,a]],topleft:[[0,0],[0,a],[b,a]],topcenter:[[0,a],[e,0],[b,a]],bottomcenter:[[0,0],[b,0],[e,a]],rightcenter:[[0,0],[b,d],[0,a]],leftcenter:[[b,0],[b,a],[0,d]]};c.lefttop=c.bottomright;c.righttop=c.bottomleft;c.leftbottom=c.topright;c.rightbottom=c.topleft;return c[f.string()]}function y(m){var f=this,k=m.options.style.tip,g=m.elements,l=g.tooltip,o={top:0,left:0,corner:""},n={width:k.width,height:k.height},i={},h=k.border||0,s=".qtip-tip",q=!!(a("<canvas />")[0]||{}).getContext;f.corner=e;f.mimic=e;f.position={};m.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){!f.init()&&f.destroy();m.reposition()},"^style.tip.(height|width)$":function(){n={width:k.width,height:k.height};f.create();f.update();m.reposition()},"^content.title.text|style.(classes|widget)$":function(){g.tip&&f.update()}};function v(u,v,p){if(!g.tip)return;var e=a.extend({},f.corner),h=p.adjusted,s=m.options.position.adjust.method.split(" "),q=s[0],r=s[1]||s[0],i={left:b,top:b,x:0,y:0},d,n={},l;if(f.corner.fixed!==c){if(q==="shift"&&e.precedance==="x"&&h.left&&e.y!=="center")e.precedance=e.precedance==="x"?"y":"x";else if(q==="flip"&&h.left)e.x=e.x==="center"?h.left>0?"left":"right":e.x==="left"?"right":"left";if(r==="shift"&&e.precedance==="y"&&h.top&&e.x!=="center")e.precedance=e.precedance==="y"?"x":"y";else if(r==="flip"&&h.top)e.y=e.y==="center"?h.top>0?"top":"bottom":e.y==="top"?"bottom":"top";e.string()!==o.corner&&(o.top!==h.top||o.left!==h.left)&&f.update(e,b)}d=f.position(e,h);if(d.right!==j)d.left=-d.right;if(d.bottom!==j)d.top=-d.bottom;d.user=Math.max(0,k.offset);if(i.left=q==="shift"&&!!h.left)if(e.x==="center")n["margin-left"]=i.x=d["margin-left"]-h.left;else{l=d.right!==j?[h.left,-d.left]:[-h.left,d.left];if((i.x=Math.max(l[0],l[1]))>l[0]){p.left-=h.left;i.left=b}n[d.right!==j?"right":"left"]=i.x}if(i.top=r==="shift"&&!!h.top)if(e.y==="center")n["margin-top"]=i.y=d["margin-top"]-h.top;else{l=d.bottom!==j?[h.top,-d.top]:[-h.top,d.top];if((i.y=Math.max(l[0],l[1]))>l[0]){p.top-=h.top;i.top=b}n[d.bottom!==j?"bottom":"top"]=i.y}g.tip.css(n).toggle(!(i.x&&i.y||e.x==="center"&&i.y||e.y==="center"&&i.x));p.left-=d.left.charAt?d.user:q!=="shift"||i.top||!i.left&&!i.top?d.left:0;p.top-=d.top.charAt?d.user:r!=="shift"||i.left||!i.left&&!i.top?d.top:0;o.left=h.left;o.top=h.top;o.corner=e.string()}function p(b,a,f){a=!a?b[b.precedance]:a;var e=g.titlebar&&b.y==="top",h=e?g.titlebar:g.content,c="border-"+a+"-width",d=parseInt(h.css(c),10);return (f?d||parseInt(l.css(c),10):d)||0}function u(b){var f=g.titlebar&&b.y==="top",i=f?g.titlebar:g.content,c=a.browser.mozilla,h=c?"-moz-":a.browser.webkit?"-webkit-":"",d=b.y+(c?"":"-")+b.x,e=h+(c?"border-radius-"+d:"border-"+d+"-radius");return parseInt(i.css(e),10)||parseInt(l.css(e),10)||0}function t(k){var d=k.precedance==="y",m=n[d?"width":"height"],e=n[d?"height":"width"],i=k.string().indexOf("center")>-1,o=m*(i?.5:1),b=Math.pow,l=Math.round,j,g,f,c=Math.sqrt(b(o,2)+b(e,2)),a=[h/o*c,h/e*c];a[2]=Math.sqrt(b(a[0],2)-b(h,2));a[3]=Math.sqrt(b(a[1],2)-b(h,2));j=c+a[2]+a[3]+(i?0:a[0]);g=j/c;f=[l(g*e),l(g*m)];return {height:f[d?0:1],width:f[d?1:0]}}a.extend(f,{init:function(){var b=f.detectCorner()&&(q||a.browser.msie);if(b){f.create();f.update();l.unbind(s).bind("tooltipmove"+s,v)}return b},detectCorner:function(){var e=k.corner,a=m.options.position,h=a.at,g=a.my.string?a.my.string():a.my;if(e===b||g===b&&h===b)return b;else if(e===c)f.corner=new d.Corner(g);else if(!e.string){f.corner=new d.Corner(e);f.corner.fixed=c}return f.corner.string()!=="centercenter"},detectColours:function(){var x,j,b,c=g.tip.css({backgroundColor:"",border:""}),h=f.corner,p=h[h.precedance],q="border-"+p+"-color",t="border"+p.charAt(0)+p.substr(1)+"Color",e=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,d="background-color",o="transparent",s="ui-tooltip-fluid",v=a(document.body).css("color"),u=m.elements.content.css("color"),w=g.titlebar&&(h.y==="top"||h.y==="center"&&c.position().top+n.height/2+k.offset<g.titlebar.outerHeight(1)),r=w?g.titlebar:g.content;l.addClass(s);i.fill=j=c.css(d);i.border=b=c[0].style[t]||l.css(q);if(!j||e.test(j)){i.fill=r.css(d)||o;if(e.test(i.fill))i.fill=l.css(d)||j}if(!b||e.test(b)||b===v){i.border=r.css(q)||o;if(e.test(i.border)||i.border===u)i.border=b}a("*",c).add(c).css(d,o).css("border","");l.removeClass(s)},create:function(){var d=n.width,c=n.height,b;g.tip&&g.tip.remove();g.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:d,height:c}).prependTo(l);if(q)a("<canvas />").appendTo(g.tip)[0].getContext("2d").save();else{b='<vml:shape coordorigin="0,0" style="display:inline-block; position:absolute; behavior:url(#default#VML);"></vml:shape>';g.tip.html(h?(b+=b):b)}},update:function(o,B){var A=g.tip,z=A.children(),w=n.width,v=n.height,D="px solid ",C="px dashed transparent",j=k.mimic,x=Math.round,y,l,m,s,u;if(!o)o=f.corner;if(j===b)j=o;else{j=new d.Corner(j);j.precedance=o.precedance;if(j.x==="inherit")j.x=o.x;else if(j.y==="inherit")j.y=o.y;else if(j.x===j.y)j[o.precedance]=o[o.precedance]}y=j.precedance;f.detectColours();h=i.border==="transparent"||i.border==="#123456"?0:k.border===c?p(o,e,c):k.border;m=r(j,w,v);u=t(o);A.css(u);if(o.precedance==="y")s=[x(j.x==="left"?h:j.x==="right"?u.width-w-h:(u.width-w)/2),x(j.y==="top"?u.height-v:0)];else s=[x(j.x==="left"?u.width-w:0),x(j.y==="top"?h:j.y==="bottom"?u.height-v-h:(u.height-v)/2)];if(q){z.attr(u);l=z[0].getContext("2d");l.restore();l.save();l.clearRect(0,0,3e3,3e3);l.translate(s[0],s[1]);l.beginPath();l.moveTo(m[0][0],m[0][1]);l.lineTo(m[1][0],m[1][1]);l.lineTo(m[2][0],m[2][1]);l.closePath();l.fillStyle=i.fill;l.strokeStyle=i.border;l.lineWidth=h*2;l.lineJoin="miter";l.miterLimit=100;h&&l.stroke();l.fill()}else{m="m"+m[0][0]+","+m[0][1]+" l"+m[1][0]+","+m[1][1]+" "+m[2][0]+","+m[2][1]+" xe";s[2]=h&&/^(r|b)/i.test(o.string())?parseFloat(a.browser.version,10)===8?2:1:0;z.css({antialias:""+(j.string().indexOf("center")>-1),left:s[0]-s[2]*Number(y==="x"),top:s[1]-s[2]*Number(y==="y"),width:w+h,height:v+h}).each(function(c){var b=a(this);b[b.prop?"prop":"attr"]({coordsize:w+h+" "+(v+h),path:m,fillcolor:i.fill,filled:!!c,stroked:!!!c}).css({display:h||c?"block":"none"});!c&&h>0&&b.html()===""&&b.html('<vml:stroke weight="'+h*2+'px" color="'+i.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:inline-block;" />')})}B!==b&&f.position(o)},position:function(d){var m=g.tip,h={},l=Math.max(0,k.offset),e,i,j;if(k.corner===b||!m)return b;d=d||f.corner;e=d.precedance;i=t(d);j=[d.x,d.y];e==="x"&&j.reverse();a.each(j,function(g,b){var a,f;if(b==="center"){a=e==="y"?"left":"top";h[a]="50%";h["margin-"+a]=-Math.round(i[e==="y"?"width":"height"]/2)+l}else{a=p(d,b,c);f=u(d);h[b]=g?p(d,b):l+(f>a?f:0)}});h[d[e]]-=i[e==="x"?"width":"height"];m.css({top:"",bottom:"",left:"",right:"",margin:""}).css(h);return h},destroy:function(){g.tip&&g.tip.remove();l.unbind(s)}});f.init()}d.tip=function(a){var b=a.plugins.tip;return "object"===typeof b?b:(a.plugins.tip=new y(a))};d.tip.initialize="render";d.tip.sanitize=function(b){var d=b.style,a;if(d&&"tip" in d){a=b.style.tip;if(typeof a!=="object")b.style.tip={corner:a};if(!/string|boolean/i.test(typeof a.corner))a.corner=c;if(typeof a.width!=="number")delete a.width;if(typeof a.height!=="number")delete a.height;if(typeof a.border!=="number"&&a.border!==c)delete a.border;if(typeof a.offset!=="number")delete a.offset}};a.extend(c,f.defaults,{style:{tip:{corner:c,mimic:b,width:6,height:6,border:c,offset:0}}});d.svg=function(j){var i=a(document),e=j[0],b={width:0,height:0,offset:{top:1e10,left:1e10}},f,h,g,c,d;if(e.getBBox&&e.parentNode){f=e.getBBox();h=e.getScreenCTM();g=e.farthestViewportElement||e;if(!g.createSVGPoint)return b;c=g.createSVGPoint();c.x=f.x;c.y=f.y;d=c.matrixTransform(h);b.offset.left=d.x;b.offset.top=d.y;c.x+=f.width;c.y+=f.height;d=c.matrixTransform(h);b.width=d.x-b.offset.left;b.height=d.y-b.offset.top;b.offset.left+=i.scrollLeft();b.offset.top+=i.scrollTop()}return b};function u(j){var e=this,m=j.options.show.modal,i=j.elements,g=i.tooltip,o="#qtip-overlay",f=".qtipmodal",k=f+j.id,n="is-modal-qtip",d;j.checks.modal={"^show.modal.(on|blur)$":function(){e.init();i.overlay.toggle(g.is(":visible"))}};a.extend(e,{init:function(){if(!m.on)return e;d=e.create();g.attr(n,c).unbind(f).unbind(k).bind("tooltipshow"+f+" tooltiphide"+f,function(a,c,b){e[a.type.replace("tooltip","")](a,b)}).bind("tooltipfocus"+f,function(b,c,a){d[0].style.zIndex=a-1}).bind("tooltipblur"+f,function(b){a("["+n+"]:visible").not(g).last().qtip("focus",b)});m.escape&&a(h).unbind(k).bind("keydown"+k,function(a){a.keyCode===27&&g.hasClass(l)&&j.hide(a)});m.blur&&i.overlay.unbind(k).bind("click"+k,function(a){g.hasClass(l)&&j.hide(a)});return e},create:function(){var c=a(o);if(c.length){i.overlay=c;return c}d=i.overlay=a("<div />",{id:o.substr(1),css:{position:"absolute",top:0,left:0,display:"none"},mousedown:function(){return b}}).appendTo(document.body);a(h).unbind(f).bind("resize"+f,function(){d.css({height:Math.max(a(h).height(),a(document).height()),width:Math.max(a(h).width(),a(document).width())})}).trigger("resize");return d},toggle:function(j,f,k){if(j&&j.isDefaultPrevented())return e;var h=m.effect,o=f?"show":"hide",l=a("["+n+"]:visible").not(g),p;if(!d)d=e.create();if(d.is(":animated")&&!f||!f&&l.length)return e;f&&i.overlay.css("cursor",m.blur?"pointer":"");d.stop(c,b);if(a.isFunction(h))h.call(d,f);else if(h===b)d[o]();else d.fadeTo(parseInt(k,10)||90,f?.7:0,function(){!f&&a(this).hide()});return e},show:function(b,a){return e.toggle(b,c,a)},hide:function(c,a){return e.toggle(c,b,a)},destroy:function(){var b=d;if(b){b=a("["+n+"]").not(g).length<1;if(b){i.overlay.remove();a(h).unbind(f)}else i.overlay.unbind(f+j.id)}return g.removeAttr(n).unbind(f)}});e.init()}d.modal=function(a){var b=a.plugins.modal;return "object"===typeof b?b:(a.plugins.modal=new u(a))};d.modal.initialize="render";d.modal.sanitize=function(a){if(a.show)if(typeof a.show.modal!=="object")a.show.modal={on:!!a.show.modal};else if(typeof a.show.modal.on==="undefined")a.show.modal.on=c};a.extend(c,f.defaults,{show:{modal:{on:b,effect:c,blur:c,escape:c}}});function t(d){var e=this,b=d.elements,c=b.tooltip,f=".bgiframe-"+d.id;a.extend(e,{init:function(){b.bgiframe=a('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>');b.bgiframe.appendTo(c);c.bind("tooltipmove"+f,e.adjust)},adjust:function(){var h=d.get("dimensions"),f=d.plugins.tip,g=b.tip,e,a;a=parseInt(c.css("border-left-width"),10)||0;a={left:-a,top:-a};if(f&&g){e=f.corner.precedance==="x"?["width","left"]:["height","top"];a[e[1]]-=g[e[0]]()}b.bgiframe.css(a).css(h)},destroy:function(){b.bgiframe.remove();c.unbind(f)}});e.init()}d.bgiframe=function(c){var d=a.browser,e=c.plugins.bgiframe;if(a("select, object").length<1||!(d.msie&&d.version.charAt(0)==="6"))return b;return "object"===typeof e?e:(c.plugins.bgiframe=new t(c))};d.bgiframe.initialize="render"})(jQuery,window);(function(a){var e="1.3.1",c=d(location.pathname);function b(d){var b=[],c=false;this.each(function(){if(this==document||this==window)return;var d=a(this);if(d.scrollTop()>0){b.push(this);return}d.scrollTop(1);c=d.scrollTop()>0;d.scrollTop(0);if(c){b.push(this);return}});if(d==="first"&&b.length)b=[b.shift()];return b}a.fn.extend({scrollable:function(){var a=b.call(this);return this.pushStack(a)},firstScrollable:function(){var a=b.call(this,"first");return this.pushStack(a)},smoothScroll:function(e){e=e||{};var b=a.extend({},a.fn.smoothScroll.defaults,e);this.die("click.smoothscroll").live("click.smoothscroll",function(p){var g=this,m=a(this),n=location.hostname===g.hostname||!g.hostname,o=b.scrollTarget||(d(g.pathname)||c)===c,k=g.hash,f=true;if(!b.scrollTarget&&(!n||!o||!k))f=false;else{var l=b.exclude,j=0,r=l.length;while(f&&j<r)if(m.is(l[j++]))f=false;var h=b.excludeWithin,i=0,q=h.length;while(f&&i<q)if(m.closest(h[i++]).length)f=false}if(f){b.scrollTarget=e.scrollTarget||k;b.link=g;p.preventDefault();a.smoothScroll(b)}});return this}});a.smoothScroll=function(e,j){var b,c,d,g=0,f="offset",i={top:"Top",left:"Left"},h={};if(typeof e==="number"){b=a.fn.smoothScroll.defaults;d=e}else{b=a.extend({},a.fn.smoothScroll.defaults,e||{});if(b.scrollElement){f="position";b.scrollElement.css("position")=="static"&&b.scrollElement.css("position","relative")}d=j||a(b.scrollTarget)[f]()&&a(b.scrollTarget)[f]()[b.direction]||0}b=a.extend({link:null},b);if(b.scrollElement){c=b.scrollElement;g=c.scrollTop()}else c=a("html, body").firstScrollable();h["scroll"+i[b.direction]]=d+g+b.offset;c.animate(h,{duration:b.speed,easing:b.easing,complete:function(){b.afterScroll&&a.isFunction(b.afterScroll)&&b.afterScroll.call(b.link,b)}})};a.smoothScroll.version=e;a.fn.smoothScroll.defaults={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,afterScroll:null,easing:"swing",speed:400};function d(a){return a.replace(/^\//,"").replace(/(index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")}})(jQuery);var loadingImage='<img class="loading" src="/images/main/loading.gif" height="32" width="32" alt="Loading..." />';function fbs_click(){u=location.href;t=document.title;window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(u)+"&t="+encodeURIComponent(t),"sharer","toolbar=0,status=0,width=626,height=436");return false}$(document).ready(function(){var a=false;$("ul.mainNav > li").hover(function(){var b=this;typeof menuHide!="undefined"&&clearTimeout(menuHide);if(a){$("ul.mainNav li").removeClass("active");$(b).addClass("active")}else{typeof menuShow!="undefined"&&clearTimeout(menuShow);menuShow=setTimeout(function(){$(b).addClass("active");a=true},200)}},function(){typeof menuShow!="undefined"&&clearTimeout(menuShow);typeof menuHide!="undefined"&&clearTimeout(menuHide);menuHide=setTimeout(function(){$("ul.mainNav li").removeClass("active");$("a.schoolMenu, div.mySchoolsMenu").removeClass("active").removeAttr("data-ajaxcompleted");$("a.collegeMenu, ul.collegeMenu").removeClass("active");a=false},500)});$("div.profileWrapper a.schoolMenu, div.mySchoolsMenu").hover(function(){typeof schoolMenuHide!="undefined"&&clearTimeout(schoolMenuHide);typeof schoolMenuShow!="undefined"&&clearTimeout(schoolMenuShow);schoolMenuShow=setTimeout(function(){$("a.schoolMenu, div.mySchoolsMenu").addClass("active");if(!$("div.mySchoolsMenu").attr("data-ajaxcompleted")){$("div.mySchoolsMenu").html('<img src="/images/main/loading.gif" alt="Loading..." style="margin:10px 47%;" />');typeof req!="undefined"&&req.abort();req=$.ajax({url:"/_ajax/account/schoolsDropDownMenu.aspx",cache:false,contentType:"text/html",dataType:"html",success:function(a){$("div.mySchoolsMenu").html(a).attr("data-ajaxcompleted","true")}})}},200)},function(){typeof schoolMenuHide!="undefined"&&clearTimeout(schoolMenuHide);typeof schoolMenuShow!="undefined"&&clearTimeout(schoolMenuShow);schoolMenuHide=setTimeout(function(){$("a.schoolMenu, div.mySchoolsMenu").removeClass("active").removeAttr("data-ajaxcompleted")},200)});$("div.profileWrapper a.collegeMenu, ul.collegeMenu").hover(function(){typeof collegeMenuHide!="undefined"&&clearTimeout(collegeMenuHide);typeof collegeMenuShow!="undefined"&&clearTimeout(collegeMenuShow);collegeMenuShow=setTimeout(function(){$("a.collegeMenu, ul.collegeMenu").addClass("active")},200)},function(){typeof collegeMenuHide!="undefined"&&clearTimeout(collegeMenuHide);typeof collegeMenuShow!="undefined"&&clearTimeout(collegeMenuShow);collegeMenuHide=setTimeout(function(){$("a.collegeMenu, ul.collegeMenu").removeClass("active")},200)});$("ul.mainNav > li div ul li a").click(function(){_gaq.push(["_trackEvent","Header Nav","Click",$(this).text()])});isIos()&&$("ul.mainNav > li").click(function(){if(a){$("ul.mainNav li").removeClass("active");a=false}});$(".searchBox").focus(function(){$(this).addClass("focus")}).blur(function(){$(this).val()==""&&$(this).removeClass("focus")});bindTabs();$("input.selectTextInBox").click(function(){$(this).focus().select();_gaq.push(["_trackEvent","Copy Share","Referral Code","Referral Code"])})});function isIos(){return navigator.platform.indexOf("iPad")!=-1||navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1}function bindTabs(){$("div.tabWrapper ul.tabs li a").click(function(){var a=$(this).attr("data-tab");$("div.tabWrapper ul.tabs li a").removeClass("selected");$(this).addClass("selected");$("div.tabWrapper div.tab").hide();$("#"+a).show();if(typeof selectedTab!="undefined"){selectedTab=a;history.replaceState&&history.replaceState({q:null},"","default.aspx?"+BuildQueryString()+"&tab="+selectedTab)}return false})}function doHeadSearch(){doSearch(document.getElementById("qHead").value)}function doFootSearch(){doSearch(document.getElementById("qFoot").value)}function doSearch(a){if(a.length>0)window.location.href="/s/?q="+escape(a)+"&safe=on&cx=partner-pub-4386007180384455:7712495912&cof=FORID:10&ie=UTF-8"}function commentvote(b,a){jQuery.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:"/_ajax/CommentOperations.asmx/Vote",data:"{ 'guid': '"+b+"', 'voteValue': "+a+" }"});return false}function AddMajor(d,c,a,b){$("#"+c).hide();$("#"+a).show();$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:"/_ajax/SaveMajorOperations.asmx/AddMajorToBackpack",data:"{ 'majorId': "+d.toString()+" }",dataType:"json",success:function(c){if(c.d=="1"){$("#"+a).hide();$("#"+b).show()}else if(c.d=="2"){$("#"+a).hide();$("#"+b).show();$("#"+b).empty().html("already added")}},failure:function(){}});return false}function AddAndRateBackpack(b,a){switch(a.toLowerCase()){case "remove":$("div.afterDeciding").addClass("decideNo");$("div.loadingDecision").addClass("no");break;case "high":$("div.afterDeciding").addClass("decideYes");break;default:$("div.afterDeciding").addClass("decideMaybe");$("div.loadingDecision").addClass("maybe")}$("div.beforeDeciding").fadeOut(300,function(){$("div.loadingDecision").fadeIn(300);$("div.ymnBar").addClass("noReview");$("p.disclaimer").hide()});$("div.loadingDecision").promise().done(function(){$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:"/_ajax/BackPackOperations.asmx/AddUpdateBackpackItemById",data:"{ 'schoolId': '"+b+"', 'interest': '"+a+"', 'origin': 'SCHOOL_PAGE' }",dataType:"json",success:function(a){if(a.d.ServiceResult!=0)$("div.loadingDecision").fadeOut(200,function(){$(this).siblings("div.afterDeciding").fadeIn()});else $("div.loadingDecision").fadeOut(200,function(){$(this).siblings("div.afterDeciding").html("<h6>Oops! There was an error.</h6><p>Reload the page and try again.</p>").fadeIn()})},error:function(){$("div.loadingDecision").fadeOut(200,function(){$(this).siblings("div.afterDeciding").html("<h6>Oops! There was an error.</h6><p>Reload the page and try again.</p>").fadeIn()})}})});return false}function schoolBump(a){$("div.decisionDisplay").fadeOut(300,function(){$("div.afterDeciding").addClass("decideYes");$("div.loadingDecision").fadeIn(300)});$("div.loadingDecision").promise().done(function(){$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:"/_ajax/BackPackOperations.asmx/AddUpdateBackpackItemById",data:"{ 'schoolId': '"+a+"', 'interest': 'High', 'origin': 'SCHOOL_PAGE' }",dataType:"json",success:function(a){if(a.d.ServiceResult!=0)$("div.loadingDecision").fadeOut(200,function(){$(this).siblings("div.afterDeciding").fadeIn()});else $("div.loadingDecision").fadeOut(200,function(){$(this).siblings("div.afterDeciding").html("<h6>Oops! There was an error.</h6><p>Reload the page and try again.</p>").fadeIn()})},failure:function(){$("div.loadingDecision").fadeOut(200,function(){$(this).siblings("div.afterDeciding").html("<h6>Oops! There was an error.</h6><p>Reload the page and try again.</p>").fadeIn()})}})});return false}$(document).ready(function(){if(!isIos()&&isSendable){$("div.ymnBtn a.yes").qtip({content:{text:"Try to tell this school I'm interested<br />and save for later reference."},position:{at:"top center",my:"bottom center"}});$("div.ymnBtn a.maybe").qtip({content:{text:"Save for later reference."},position:{at:"top center",my:"bottom center"}});$("div.ymnBtn a.no").qtip({content:{text:"Remove from my<br />recommendations."},position:{at:"top center",my:"bottom center"}});$("div.decisionDisplay.decideMaybe p.maybe a").qtip({content:{text:"Try to tell this<br />school I'm interested."},position:{at:"top center",my:"bottom center"}})}});$(document).ready(function(){$("div.schoolHeader").clone().appendTo("div.schoolHeaderFloating");$("div.schoolHeaderFloating").find("a").removeAttr("id");$("div.schoolHeaderFloating").find("a.helpIcon").remove();$("div.schoolHeaderFloating").find("a.yes, a.maybe, a.no").each(function(){var a=$(this).attr("onclick");if(!($.browser.msie&&$.browser.version.substr(0,1)<8)){a=a.replace("School YMN","School YMN - Floating");$(this).attr("onclick",a)}});if(!isIos())if($("div.schoolHeader").length){var a=$("div.schoolHeader").offset();$(window).scroll(function(){if($(this).scrollTop()>a.top)$("div.schoolHeaderFloating").show();else $("div.schoolHeaderFloating").hide()})}$("div.reviewMenu").hover(function(){var a=$(this).position(),b=$(this).closest("div.ymnBar").position();$(this).addClass("hover");$(this).closest("div.ymnBar").siblings("div.reviewMenuBody").css({left:a.left,top:a.top+b.top+33}).show()},function(){var a=$(this);a.removeClass("hover");$(this).closest("div.ymnBar").siblings("div.reviewMenuBody").hide().hover(function(){$(this).show();a.addClass("hover")},function(){$(this).hide();a.removeClass("hover")})})});var colorboxDefaults={width:"700px",height:"70%",iframe:true},colorboxDefaultsInline={maxWidth:"700px",maxHeight:"70%",inline:true},colorboxDefaultsForm={width:"530px",height:"530px",iframe:true};function getUrlVars(){for(var b=[],a,d=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),c=0;c<d.length;c++){a=d[c].split("=");b.push(a[0]);b[a[0]]=a[1]}return b}function replaceQueryString(b,a,c){var d=new RegExp("([?|&])"+a+"=.*?(&|$)","i");if(b.match(d))return b.replace(d,"$1"+a+"="+c+"$2");else return b+"&"+a+"="+c}function isUndefined(a){if(a==null&&a!==null||typeof a==undefined||a=="undefined"||a==undefined)return true;else return false}function URLDecode(a){var b=/\+/g;return unescape(String(a).replace(b," "))}if(!Array.prototype.indexOf)Array.prototype.indexOf=function(e){"use strict";if(this===void 0||this===null)throw new TypeError;var d=Object(this),c=d.length>>>0;if(c===0)return -1;var a=0;if(arguments.length>0){a=Number(arguments[1]);if(a!==a)a=0;else if(a!==0&&a!==1/0&&a!==-(1/0))a=(a>0||-1)*Math.floor(Math.abs(a))}if(a>=c)return -1;for(var b=a>=0?a:Math.max(c-Math.abs(a),0);b<c;b++)if(b in d&&d[b]===e)return b;return -1}
