(function(){function s(f,e){if(e){for(var g in e){if(e.hasOwnProperty(g)){f[g]=e[g]}}}return f}function d(f,e){var i=[];for(var g in f){if(f.hasOwnProperty(g)){i[g]=e(f[g])}}return i}function c(f,e,i){if(t.isSupported(e.version)){f.innerHTML=t.getHTML(e,i)}else{if(e.expressInstall&&t.isSupported([6,65])){f.innerHTML=t.getHTML(s(e,{src:e.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="<h2>Flash version "+e.version+" or greater is required</h2><h3>"+(r[0]>0?"Your version is "+r:"You have no flash plugin installed")+"</h3>"+(f.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+h+"'>here</a></p>");if(f.tagName=="A"){f.onclick=function(){location.href=h}}}if(e.onFail){var g=e.onFail.call(this);if(typeof g=="string"){f.innerHTML=g}}}}if(q){window[e.id]=document.getElementById(e.id)}s(this,{getRoot:function(){return f},getOptions:function(){return e},getConf:function(){return i},getApi:function(){return f.firstChild}})}var q=document.all,h="http://www.adobe.com/go/getflashplayer",b=typeof jQuery=="function",a=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,p={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});window.flashembed=function(f,e,g){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(f){if(typeof e=="string"){e={src:e}}return new c(f,s(s({},p),e),g)}};var t=s(window.flashembed,{conf:p,getVersion:function(){var f,e;try{e=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(j){try{e=(f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"))&&f.GetVariable("$version")}catch(i){try{e=(f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"))&&f.GetVariable("$version")}catch(g){}}}return(e=a.exec(e))?[e[1],e[3]]:[0,0]},asString:function(f){if(f===null||f===undefined){return null}var e=typeof f;if(e=="object"&&f.push){e="array"}switch(e){case"string":f=f.replace(new RegExp('(["\\\\])',"g"),"\\$1");f=f.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+f+'"';case"array":return"["+d(f,function(i){return t.asString(i)}).join(",")+"]";case"function":return'"function()"';case"object":e=[];for(var g in f){f.hasOwnProperty(g)&&e.push('"'+g+'":'+t.asString(f[g]))}return"{"+e.join(",")+"}"}return String(f).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(f,e){f=s({},f);var j='<object width="'+f.width+'" height="'+f.height+'" id="'+f.id+'" name="'+f.id+'"';if(f.cachebusting){f.src+=(f.src.indexOf("?")!=-1?"&":"?")+Math.random()}j+=f.w3c||!q?' data="'+f.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';j+=">";if(f.w3c||q){j+='<param name="movie" value="'+f.src+'" />'}f.width=f.height=f.id=f.w3c=f.src=null;f.onFail=f.version=f.expressInstall=null;for(var i in f){if(f[i]){j+='<param name="'+i+'" value="'+f[i]+'" />'}}f="";if(e){for(var g in e){if(e[g]){i=e[g];f+=g+"="+(/function|object/.test(typeof i)?t.asString(i):i)+"&"}}f=f.slice(0,-1);j+='<param name="flashvars" value=\''+f+"' />"}j+="</object>";return j},isSupported:function(e){return r[0]>e[0]||r[0]==e[0]&&r[1]>=e[1]}}),r=t.getVersion();if(b){jQuery.tools=jQuery.tools||{version:"1.2.5"};jQuery.tools.flashembed={conf:p};jQuery.fn.flashembed=function(f,e){return this.each(function(){$(this).data("flashembed",flashembed(this,f,e))})}}})();(function(a){function e(d){if(d){var b=l.contentWindow.document;b.open().close();b.location.hash=d}}var j,l,k,c;a.tools=a.tools||{version:"1.2.5"};a.tools.history={init:function(b){if(!c){if(a.browser.msie&&a.browser.version<"8"){if(!l){l=a("<iframe/>").attr("src","javascript:false;").hide().get(0);a("body").append(l);setInterval(function(){var d=l.contentWindow.document;d=d.location.hash;j!==d&&a.event.trigger("hash",d)},100);e(location.hash||"#")}}else{setInterval(function(){var d=location.hash;d!==j&&a.event.trigger("hash",d)},100)}k=!k?b:k.add(b);b.click(function(d){var f=a(this).attr("href");l&&e(f);if(f.slice(0,1)!="#"){location.href="#"+f;return d.preventDefault()}});c=true}}};a(window).bind("hash",function(d,b){b?k.filter(function(){var f=a(this).attr("href");return f==b||f==b.replace("#","")}).trigger("history",[b]):k.eq(0).trigger("history",[b]);j=b});a.fn.history=function(b){a.tools.history.init(this);return this.bind("history",b)}})(jQuery);(function(r){function d(){if(r.browser.msie){var b=r(document).height(),c=r(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,b-c<20?c:b]}return[r(document).width(),r(document).height()]}function n(b){if(b){return b.call(r.mask)}}r.tools=r.tools||{version:"1.2.5"};var a;a=r.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};var q,m,p,o,f;r.mask={load:function(c,e){if(p){return this}if(typeof c=="string"){c={color:c}}c=c||o;o=c=r.extend(r.extend({},a.conf),c);q=r("#"+c.maskId);if(!q.length){q=r("<div/>").attr("id",c.maskId);r("body").append(q)}var b=d();q.css({position:"absolute",top:0,left:0,width:b[0],height:b[1],display:"none",opacity:c.startOpacity,zIndex:c.zIndex});c.color&&q.css("backgroundColor",c.color);if(n(c.onBeforeLoad)===false){return this}c.closeOnEsc&&r(document).bind("keydown.mask",function(g){g.keyCode==27&&r.mask.close(g)});c.closeOnClick&&q.bind("click.mask",function(g){r.mask.close(g)});r(window).bind("resize.mask",function(){r.mask.fit()});if(e&&e.length){f=e.eq(0).css("zIndex");r.each(e,function(){var g=r(this);/relative|absolute|fixed/i.test(g.css("position"))||g.css("position","relative")});m=e.css({zIndex:Math.max(c.zIndex+1,f=="auto"?0:f)})}q.css({display:"block"}).fadeTo(c.loadSpeed,c.opacity,function(){r.mask.fit();n(c.onLoad);p="full"});p=true;return this},close:function(){if(p){if(n(o.onBeforeClose)===false){return this}q.fadeOut(o.closeSpeed,function(){n(o.onClose);m&&m.css({zIndex:f});p=false});r(document).unbind("keydown.mask");q.unbind("click.mask");r(window).unbind("resize.mask")}return this},fit:function(){if(p){var b=d();q.css({width:b[0],height:b[1]})}},getMask:function(){return q},isLoaded:function(b){return b?p=="full":p},getConf:function(){return o},getExposed:function(){return m}};r.fn.mask=function(b){r.mask.load(b);return this};r.fn.expose=function(b){r.mask.load(b,this);return this}})(jQuery);(function(a){function f(b){switch(b.type){case"mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case"DOMMouseScroll":a.extend(b,b.data);b.delta=-b.detail/3;break;case"mousewheel":b.delta=b.wheelDelta/120;break}b.type="wheel";return a.event.handle.call(this,b,b.delta)}a.fn.mousewheel=function(b){return this[b?"bind":"trigger"]("wheel",b)};a.event.special.wheel={setup:function(){a.event.add(this,e,f,{})},teardown:function(){a.event.remove(this,e,f)}};var e=!a.browser.mozilla?"mousewheel":"DOMMouseScroll"+(a.browser.version<"1.9"?" mousemove":"")})(jQuery);(function(e){function b(p,c,g){var o=this,f=p.add(this),n=p.find(g.tabs),m=c.jquery?c:p.children(c),k;n.length||(n=p.children());m.length||(m=p.parent().find(c));m.length||(m=e(c));e.extend(this,{click:function(j,i){var h=n.eq(j);if(typeof j=="string"&&j.replace("#","")){h=n.filter("[href*="+j.replace("#","")+"]");j=Math.max(n.index(h),0)}if(g.rotate){var l=n.length-1;if(j<0){return o.click(l,i)}if(j>l){return o.click(0,i)}}if(!h.length){if(k>=0){return o}j=g.initialIndex;h=n.eq(j)}if(j===k){return o}i=i||e.Event();i.type="onBeforeClick";f.trigger(i,[j]);if(!i.isDefaultPrevented()){d[g.effect].call(o,j,function(){i.type="onClick";f.trigger(i,[j])});k=j;n.removeClass(g.current);h.addClass(g.current);return o}},getConf:function(){return g},getTabs:function(){return n},getPanes:function(){return m},getCurrentPane:function(){return m.eq(k)},getCurrentTab:function(){return n.eq(k)},getIndex:function(){return k},next:function(){return o.click(k+1)},prev:function(){return o.click(k-1)},destroy:function(){n.unbind(g.event).removeClass(g.current);m.find("a[href^=#]").unbind("click.T");return o}});e.each("onBeforeClick,onClick".split(","),function(i,h){e.isFunction(g[h])&&e(o).bind(h,g[h]);o[h]=function(j){j&&e(o).bind(h,j);return o}});if(g.history&&e.fn.history){e.tools.history.init(n);g.event="history"}n.each(function(h){e(this).bind(g.event,function(i){o.click(h,i);return i.preventDefault()})});m.find("a[href^=#]").bind("click.T",function(h){o.click(e(this).attr("href"),h)});if(location.hash&&g.tabs=="a"&&p.find("[href="+location.hash+"]").length){o.click(location.hash)}else{if(g.initialIndex===0||g.initialIndex>0){o.click(g.initialIndex)}}}e.tools=e.tools||{version:"1.2.5"};e.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,history:false},addEffect:function(f,c){d[f]=c}};var d={"default":function(f,c){this.getPanes().hide().eq(f).show();c.call()},fade:function(i,c){var g=this.getConf(),h=g.fadeOutSpeed,f=this.getPanes();h?f.fadeOut(h):f.hide();f.eq(i).fadeIn(g.fadeInSpeed,c)},slide:function(f,c){this.getPanes().slideUp(200);this.getPanes().eq(f).slideDown(400,c)},ajax:function(f,c){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),c)}},a;e.tools.tabs.addEffect("horizontal",function(f,c){a||(a=this.getPanes().eq(0).width());this.getCurrentPane().animate({width:0},function(){e(this).hide()});this.getPanes().eq(f).animate({width:a},function(){e(this).show();c.call()})});e.fn.tabs=function(g,c){var f=this.data("tabs");if(f){f.destroy();this.removeData("tabs")}if(e.isFunction(c)){c={onBeforeClick:c}}c=e.extend({},e.tools.tabs.conf,c);this.each(function(){f=new b(e(this),g,c);e(this).data("tabs",f)});return c.api?f:this}})(jQuery);(function(d){function a(s,v){function e(g){var h=d(g);return h.length<2?h:s.parent().find(g)}var u=this,q=s.add(this),t=s.data("tabs"),r,p=true,c=e(v.next).click(function(){t.next()}),o=e(v.prev).click(function(){t.prev()});d.extend(u,{getTabs:function(){return t},getConf:function(){return v},play:function(){if(r){return u}var g=d.Event("onBeforePlay");q.trigger(g);if(g.isDefaultPrevented()){return u}r=setInterval(t.next,v.interval);p=false;q.trigger("onPlay");return u},pause:function(){if(!r){return u}var g=d.Event("onBeforePause");q.trigger(g);if(g.isDefaultPrevented()){return u}r=clearInterval(r);q.trigger("onPause");return u},stop:function(){u.pause();p=true}});d.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(g,h){d.isFunction(v[h])&&d(u).bind(h,v[h]);u[h]=function(i){return d(u).bind(h,i)}});v.autopause&&t.getTabs().add(c).add(o).add(t.getPanes()).hover(u.pause,function(){p||u.play()});v.autoplay&&u.play();v.clickable&&t.getPanes().click(function(){t.next()});if(!t.getConf().rotate){var f=v.disabledClass;t.getIndex()||o.addClass(f);t.onBeforeClick(function(g,h){o.toggleClass(f,!h);c.toggleClass(f,h==t.getTabs().length-1)})}}var b;b=d.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:false,autopause:true,interval:3000,clickable:true,api:false}};d.fn.slideshow=function(e){var c=this.data("slideshow");if(c){return c}e=d.extend({},b.conf,e);this.each(function(){c=new a(d(this),e);d(this).data("slideshow",c)});return e.api?c:this}})(jQuery);(function(b){function c(f,e,n){var l=n.relative?f.position().top:f.offset().top,m=n.relative?f.position().left:f.offset().left,k=n.position[0];l-=e.outerHeight()-n.offset[0];m+=f.outerWidth()+n.offset[1];if(/iPad/i.test(navigator.userAgent)){l-=b(window).scrollTop()}var g=e.outerHeight()+f.outerHeight();if(k=="center"){l+=g/2}if(k=="bottom"){l+=g}k=n.position[1];f=e.outerWidth()+f.outerWidth();if(k=="center"){m-=f/2}if(k=="left"){m-=f}return{top:l,left:m}}function a(A,z){var y=this,w=A.add(y),x,u=0,p=0,g=A.attr("title"),f=A.attr("data-tooltip"),e=d[z.effect],n,D=A.is(":input"),B=D&&A.is(":checkbox, :radio, select, :button, :submit"),C=A.attr("type"),o=z.events[C]||z.events[D?B?"widget":"input":"def"];if(!e){throw'Nonexistent effect "'+z.effect+'"'}o=o.split(/,\s*/);if(o.length!=2){throw"Tooltip: bad events configuration for "+C}A.bind(o[0],function(h){clearTimeout(u);if(z.predelay){p=setTimeout(function(){y.show(h)},z.predelay)}else{y.show(h)}}).bind(o[1],function(h){clearTimeout(p);if(z.delay){u=setTimeout(function(){y.hide(h)},z.delay)}else{y.hide(h)}});if(g&&z.cancelDefault){A.removeAttr("title");A.data("title",g)}b.extend(y,{show:function(i){if(!x){if(f){x=b(f)}else{if(z.tip){x=b(z.tip).eq(0)}else{if(g){x=b(z.layout).addClass(z.tipClass).appendTo(document.body).hide().append(g)}else{x=A.next();x.length||(x=A.parent().next())}}}if(!x.length){throw"Cannot find tooltip for "+A}}if(y.isShown()){return y}x.stop(true,true);var h=c(A,x,z);z.tip&&x.html(A.data("title"));i=i||b.Event();i.type="onBeforeShow";w.trigger(i,[h]);if(i.isDefaultPrevented()){return y}h=c(A,x,z);x.css({position:"absolute",top:h.top,left:h.left});n=true;e[0].call(y,function(){i.type="onShow";n="full";w.trigger(i)});h=z.events.tooltip.split(/,\s*/);if(!x.data("__set")){x.bind(h[0],function(){clearTimeout(u);clearTimeout(p)});h[1]&&!A.is("input:not(:checkbox, :radio), textarea")&&x.bind(h[1],function(j){j.relatedTarget!=A[0]&&A.trigger(o[1].split(" ")[0])});x.data("__set",true)}return y},hide:function(h){if(!x||!y.isShown()){return y}h=h||b.Event();h.type="onBeforeHide";w.trigger(h);if(!h.isDefaultPrevented()){n=false;d[z.effect][1].call(y,function(){h.type="onHide";w.trigger(h)});return y}},isShown:function(h){return h?n=="full":n},getConf:function(){return z},getTip:function(){return x},getTrigger:function(){return A}});b.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(i,h){b.isFunction(z[h])&&b(y).bind(h,z[h]);y[h]=function(j){j&&b(y).bind(h,j);return y}})}b.tools=b.tools||{version:"1.2.5"};b.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(f,e,g){d[f]=[e,g]}};var d={toggle:[function(f){var e=this.getConf(),g=this.getTip();e=e.opacity;e<1&&g.css({opacity:e});g.show();f.call()},function(e){this.getTip().hide();e.call()}],fade:[function(f){var e=this.getConf();this.getTip().fadeTo(e.fadeInSpeed,e.opacity,f)},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e)}]};b.fn.tooltip=function(f){var e=this.data("tooltip");if(e){return e}f=b.extend(true,{},b.tools.tooltip.conf,f);if(typeof f.position=="string"){f.position=f.position.split(/,?\s/)}this.each(function(){e=new a(b(this),f);b(this).data("tooltip",e)});return f.api?e:this}})(jQuery);(function(c){var a=c.tools.tooltip;c.extend(a.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!c.browser.msie});var b={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};a.addEffect("slide",function(h){var e=this.getConf(),i=this.getTip(),d=e.slideFade?{opacity:e.opacity}:{},j=b[e.direction]||b.up;d[j[1]]=j[0]+"="+e.slideOffset;e.slideFade&&i.css({opacity:0});i.show().animate(d,e.slideInSpeed,h)},function(j){var e=this.getConf(),k=e.slideOffset,d=e.slideFade?{opacity:0}:{},l=b[e.direction]||b.up,i=""+l[0];if(e.bounce){i=i=="+"?"-":"+"}d[l[1]]=i+"="+k;this.getTip().animate(d,e.slideOutSpeed,function(){c(this).hide();j.call()})})})(jQuery);(function(d){function b(e){var i=d(window),g=i.width()+i.scrollLeft(),f=i.height()+i.scrollTop();return[e.offset().top<=i.scrollTop(),g<=e.offset().left+e.width(),f<=e.offset().top+e.height(),i.scrollLeft()>=e.offset().left]}function a(e){for(var f=e.length;f--;){if(e[f]){return false}}return true}var c=d.tools.tooltip;c.dynamic={conf:{classNames:"top right bottom left"}};d.fn.dynamic=function(e){if(typeof e=="number"){e={speed:e}}e=d.extend({},c.dynamic.conf,e);var g=e.classNames.split(/\s/),f;this.each(function(){var i=d(this).tooltip().onBeforeShow(function(k,j){k=this.getTip();var h=this.getConf();f||(f=[h.position[0],h.position[1],h.offset[0],h.offset[1],d.extend({},h)]);d.extend(h,f[4]);h.position=[f[0],f[1]];h.offset=[f[2],f[3]];k.css({visibility:"hidden",position:"absolute",top:j.top,left:j.left}).show();j=b(k);if(!a(j)){if(j[2]){d.extend(h,e.top);h.position[0]="top";k.addClass(g[0])}if(j[3]){d.extend(h,e.right);h.position[1]="right";k.addClass(g[1])}if(j[0]){d.extend(h,e.bottom);h.position[0]="bottom";k.addClass(g[2])}if(j[1]){d.extend(h,e.left);h.position[1]="left";k.addClass(g[3])}if(j[0]||j[2]){h.offset[0]*=-1}if(j[1]||j[3]){h.offset[1]*=-1}}k.css({visibility:"visible"}).hide()});i.onBeforeShow(function(){var h=this.getConf();this.getTip();setTimeout(function(){h.position=[f[0],f[1]];h.offset=[f[2],f[3]]},0)});i.onHide(function(){var h=this.getTip();h.removeClass(e.classNames)});ret=i});return e.api?ret:this}})(jQuery);(function(d){function c(g,h){var e=d(h);return e.length<2?e:g.parent().find(h)}function b(v,w){var x=this,i=v.add(x),u=v.children(),p=0,r=w.vertical;a||(a=x);if(u.length>1){u=d(w.items,v)}d.extend(x,{getConf:function(){return w},getIndex:function(){return p},getSize:function(){return x.getItems().size()},getNaviButtons:function(){return h.add(e)},getRoot:function(){return v},getItemWrap:function(){return u},getItems:function(){return u.children(w.item).not("."+w.clonedClass)},move:function(f,g){return x.seekTo(p+f,g)},next:function(f){return x.move(1,f)},prev:function(f){return x.move(-1,f)},begin:function(f){return x.seekTo(0,f)},end:function(f){return x.seekTo(x.getSize()-1,f)},focus:function(){return a=x},addItem:function(f){f=d(f);if(w.circular){u.children("."+w.clonedClass+":last").before(f);u.children("."+w.clonedClass+":first").replaceWith(f.clone().addClass(w.clonedClass))}else{u.append(f)}i.trigger("onAddItem",[f]);return x},seekTo:function(f,m,j){f.jquery||(f*=1);if(w.circular&&f===0&&p==-1&&m!==0){return x}if(!w.circular&&f<0||f>x.getSize()||f<-1){return x}var g=f;if(f.jquery){f=x.getItems().index(f)}else{g=x.getItems().eq(f)}var l=d.Event("onBeforeSeek");if(!j){i.trigger(l,[f,m]);if(l.isDefaultPrevented()||!g.length){return x}}g=r?{top:-g.position().top}:{left:-g.position().left};p=f;a=x;if(m===undefined){m=w.speed}u.animate(g,m,w.easing,j||function(){i.trigger("onSeek",[f])});return x}});d.each(["onBeforeSeek","onSeek","onAddItem"],function(f,g){d.isFunction(w[g])&&d(x).bind(g,w[g]);x[g]=function(j){j&&d(x).bind(g,j);return x}});if(w.circular){var z=x.getItems().slice(-1).clone().prependTo(u),y=x.getItems().eq(1).clone().appendTo(u);z.add(y).addClass(w.clonedClass);x.onBeforeSeek(function(f,j,g){if(!f.isDefaultPrevented()){if(j==-1){x.seekTo(z,g,function(){x.end(0)});return f.preventDefault()}else{j==x.getSize()&&x.seekTo(y,g,function(){x.begin(0)})}}});x.seekTo(0,0,function(){})}var h=c(v,w.prev).click(function(){x.prev()}),e=c(v,w.next).click(function(){x.next()});if(!w.circular&&x.getSize()>1){x.onBeforeSeek(function(f,g){setTimeout(function(){if(!f.isDefaultPrevented()){h.toggleClass(w.disabledClass,g<=0);e.toggleClass(w.disabledClass,g>=x.getSize()-1)}},1)});w.initialIndex||h.addClass(w.disabledClass)}w.mousewheel&&d.fn.mousewheel&&v.mousewheel(function(f,g){if(w.mousewheel){x.move(g<0?1:-1,w.wheelSpeed||50);return false}});if(w.touch){var k={};u[0].ontouchstart=function(f){f=f.touches[0];k.x=f.clientX;k.y=f.clientY};u[0].ontouchmove=function(f){if(f.touches.length==1&&!u.is(":animated")){var j=f.touches[0],g=k.x-j.clientX;j=k.y-j.clientY;x[r&&j>0||!r&&g>0?"next":"prev"]();f.preventDefault()}}}w.keyboard&&d(document).bind("keydown.scrollable",function(f){if(!(!w.keyboard||f.altKey||f.ctrlKey||d(f.target).is(":input"))){if(!(w.keyboard!="static"&&a!=x)){var g=f.keyCode;if(r&&(g==38||g==40)){x.move(g==38?-1:1);return f.preventDefault()}if(!r&&(g==37||g==39)){x.move(g==37?-1:1);return f.preventDefault()}}}});w.initialIndex&&x.seekTo(w.initialIndex,0,function(){})}d.tools=d.tools||{version:"1.2.5"};d.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};var a;d.fn.scrollable=function(e){var g=this.data("scrollable");if(g){return g}e=d.extend({},d.tools.scrollable.conf,e);this.each(function(){g=new b(d(this),e);d(this).data("scrollable",g)});return e.api?g:this}})(jQuery);(function(a){var c=a.tools.scrollable;c.autoscroll={conf:{autoplay:true,interval:3000,autopause:true}};a.fn.autoscroll=function(f){if(typeof f=="number"){f={interval:f}}var e=a.extend({},c.autoscroll.conf,f),b;this.each(function(){var d=a(this).data("scrollable");if(d){b=d}var i,g=true;d.play=function(){if(!i){g=false;i=setInterval(function(){d.next()},e.interval)}};d.pause=function(){i=clearInterval(i)};d.stop=function(){d.pause();g=true};e.autopause&&d.getRoot().add(d.getNaviButtons()).hover(d.pause,d.play);e.autoplay&&d.play()});return e.api?b:this}})(jQuery);(function(c){function b(d,f){var e=c(f);return e.length<2?e:d.parent().find(f)}var a=c.tools.scrollable;a.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,idPrefix:null,history:false}};c.fn.navigator=function(d){if(typeof d=="string"){d={navi:d}}d=c.extend({},a.navigator.conf,d);var e;this.each(function(){function t(f,j,h){v.seekTo(j);if(s){if(location.hash){location.hash=f.attr("href").replace("#","")}}else{return h.preventDefault()}}function u(){return r.find(d.naviItem||"> *")}function m(f){var h=c("<"+(d.naviItem||"a")+"/>").click(function(j){t(c(this),f,j)}).attr("href","#"+f);f===0&&h.addClass(p);d.indexed&&h.text(f+1);d.idPrefix&&h.attr("id",d.idPrefix+f);return h.appendTo(r)}function i(f,h){f=u().eq(h.replace("#",""));f.length||(f=u().filter("[href="+h+"]"));f.click()}var v=c(this).data("scrollable"),r=d.navi.jquery?d.navi:b(v.getRoot(),d.navi),g=v.getNaviButtons(),p=d.activeClass,s=d.history&&c.fn.history;if(v){e=v}v.getNaviButtons=function(){return g.add(r)};u().length?u().each(function(f){c(this).click(function(h){t(c(this),f,h)})}):c.each(v.getItems(),function(f){m(f)});v.onBeforeSeek(function(f,h){setTimeout(function(){if(!f.isDefaultPrevented()){var j=u().eq(h);!f.isDefaultPrevented()&&j.length&&u().removeClass(p).eq(h).addClass(p)}},1)});v.onAddItem(function(f,h){h=m(v.getItems().index(h));s&&h.history(i)});s&&u().history(i)});return d.api?e:this}})(jQuery);(function(b){function c(u,w){var v=this,r=u.add(v),h=b(window),q,t,l,s=b.tools.expose&&(w.mask||w.expose),i=Math.random().toString().slice(10);if(s){if(typeof s=="string"){s={color:s}}s.closeOnClick=s.closeOnEsc=false}var a=w.target||u.attr("rel");t=a?b(a):u;if(!t.length){throw"Could not find Overlay: "+a}u&&u.index(t)==-1&&u.click(function(f){v.load(f);return f.preventDefault()});b.extend(v,{load:function(n){if(v.isOpened()){return v}var k=e[w.effect];if(!k){throw'Overlay: cannot find effect : "'+w.effect+'"'}w.oneInstance&&b.each(d,function(){this.close(n)});n=n||b.Event();n.type="onBeforeLoad";r.trigger(n);if(n.isDefaultPrevented()){return v}l=true;s&&b(t).expose(s);var j=w.top,m=w.left,g=t.outerWidth({margin:true}),f=t.outerHeight({margin:true});if(typeof j=="string"){j=j=="center"?Math.max((h.height()-f)/2,0):parseInt(j,10)/100*h.height()}if(m=="center"){m=Math.max((h.width()-g)/2,0)}k[0].call(v,{top:j,left:m},function(){if(l){n.type="onLoad";r.trigger(n)}});s&&w.closeOnClick&&b.mask.getMask().one("click",v.close);w.closeOnClick&&b(document).bind("click."+i,function(o){b(o.target).parents(t).length||v.close(o)});w.closeOnEsc&&b(document).bind("keydown."+i,function(o){o.keyCode==27&&v.close(o)});return v},close:function(f){if(!v.isOpened()){return v}f=f||b.Event();f.type="onBeforeClose";r.trigger(f);if(!f.isDefaultPrevented()){l=false;e[w.effect][1].call(v,function(){f.type="onClose";r.trigger(f)});b(document).unbind("click."+i).unbind("keydown."+i);s&&b.mask.close();return v}},getOverlay:function(){return t},getTrigger:function(){return u},getClosers:function(){return q},isOpened:function(){return l},getConf:function(){return w}});b.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(g,f){b.isFunction(w[f])&&b(v).bind(f,w[f]);v[f]=function(j){j&&b(v).bind(f,j);return v}});q=t.find(w.close||".close");if(!q.length&&!w.close){q=b('<a class="close"></a>');t.prepend(q)}q.click(function(f){v.close(f)});w.load&&v.load()}b.tools=b.tools||{version:"1.2.5"};b.tools.overlay={addEffect:function(f,a,g){e[f]=[a,g]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!b.browser.msie||b.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var d=[],e={};b.tools.overlay.addEffect("default",function(g,a){var h=this.getConf(),f=b(window);if(!h.fixed){g.top+=f.scrollTop();g.left+=f.scrollLeft()}g.position=h.fixed?"fixed":"absolute";this.getOverlay().css(g).fadeIn(h.speed,a)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});b.fn.overlay=function(f){var a=this.data("overlay");if(a){return a}if(b.isFunction(f)){f={onBeforeLoad:f}}f=b.extend(true,{},b.tools.overlay.conf,f);this.each(function(){a=new c(b(this),f);d.push(a);b(this).data("overlay",a)});return f.api?a:this}})(jQuery);(function(c){function b(h){var f=h.offset();return{top:f.top+h.height()/2,left:f.left+h.width()/2}}var a=c.tools.overlay,e=c(window);c.extend(a.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function g(s,r){var v=this.getOverlay(),t=this.getConf(),q=this.getTrigger(),f=this,k=v.outerWidth({margin:true}),u=v.data("img"),h=t.fixed?"fixed":"absolute";if(!u){u=v.css("backgroundImage");if(!u){throw"background-image CSS property not set for overlay"}u=u.slice(u.indexOf("(")+1,u.indexOf(")")).replace(/\"/g,"");v.css("backgroundImage","none");u=c('<img src="'+u+'"/>');u.css({border:0,display:"none"}).width(k);c("body").append(u);v.data("img",u)}var o=t.start.top||Math.round(e.height()/2),l=t.start.left||Math.round(e.width()/2);if(q){q=b(q);o=q.top;l=q.left}if(t.fixed){o-=e.scrollTop();l-=e.scrollLeft()}else{s.top+=e.scrollTop();s.left+=e.scrollLeft()}u.css({position:"absolute",top:o,left:l,width:0,zIndex:t.zIndex}).show();s.position=h;v.css(s);u.animate({top:v.css("top"),left:v.css("left"),width:k},t.speed,function(){v.css("zIndex",t.zIndex+1).fadeIn(t.fadeInSpeed,function(){f.isOpened()&&!c(this).index(v)?r.call():v.hide()})}).css("position",h)}function d(j){var i=this.getOverlay().hide(),f=this.getConf(),k=this.getTrigger();i=i.data("img");var h={top:f.start.top,left:f.start.left,width:0};k&&c.extend(h,b(k));f.fixed&&i.css({position:"absolute"}).animate({top:"+="+e.scrollTop(),left:"+="+e.scrollLeft()},0);i.animate(h,f.closeSpeed,j)}a.addEffect("apple",g,d)})(jQuery);(function(n){function l(d,p){return 32-(new Date(d,p,32)).getDate()}function k(d,p){d=""+d;for(p=p||2;d.length<p;){d="0"+d}return d}function j(d,w,p){var v=d.getDate(),s=d.getDay(),t=d.getMonth();d=d.getFullYear();var u={d:v,dd:k(v),ddd:e[p].shortDays[s],dddd:e[p].days[s],m:t+1,mm:k(t+1),mmm:e[p].shortMonths[t],mmmm:e[p].months[t],yy:String(d).slice(2),yyyy:d};w=w.replace(f,function(q){return q in u?u[q]:q.slice(1,q.length-1)});return c.html(w).html()}function o(d){return parseInt(d,10)}function i(d,p){return d.getFullYear()===p.getFullYear()&&d.getMonth()==p.getMonth()&&d.getDate()==p.getDate()}function a(d){if(d){if(d.constructor==Date){return d}if(typeof d=="string"){var p=d.split("-");if(p.length==3){return new Date(o(p[0]),o(p[1])-1,o(p[2]))}if(!/^-?\d+$/.test(d)){return}d=o(d)}p=new Date;p.setDate(p.getDate()+d);return p}}function b(ag,af){function ac(p,r,q){Z=p;U=p.getFullYear();S=p.getMonth();R=p.getDate();q=q||n.Event("api");q.type="change";P.trigger(q,[p]);if(!q.isDefaultPrevented()){ag.val(j(p,r.format,r.lang));ag.data("date",p);ad.hide(q)}}function W(p){p.type="onShow";P.trigger(p);n(document).bind("keydown.d",function(w){if(w.ctrlKey){return true}var s=w.keyCode;if(s==8){ag.val("");return ad.hide(w)}if(s==27){return ad.hide(w)}if(n(h).index(s)>=0){if(!Q){ad.show(w);return w.preventDefault()}var r=n("#"+ae.weeks+" a"),q=n("."+ae.focus),z=r.index(q);q.removeClass(ae.focus);if(s==74||s==40){z+=7}else{if(s==75||s==38){z-=7}else{if(s==76||s==39){z+=1}else{if(s==72||s==37){z-=1}}}}if(z>41){ad.addMonth();q=n("#"+ae.weeks+" a:eq("+(z-42)+")")}else{if(z<0){ad.addMonth(-1);q=n("#"+ae.weeks+" a:eq("+(z+42)+")")}else{q=r.eq(z)}}q.addClass(ae.focus);return w.preventDefault()}if(s==34){return ad.addMonth()}if(s==33){return ad.addMonth(-1)}if(s==36){return ad.today()}if(s==13){n(w.target).is("select")||n("."+ae.focus).click()}return n([16,17,18,9]).index(s)>=0});n(document).bind("click.d",function(r){var q=r.target;if(!n(q).parents("#"+ae.root).length&&q!=ag[0]&&(!x||q!=x[0])){ad.hide(r)}})}var ad=this,V=new Date,ae=af.css,T=e[af.lang],ab=n("#"+ae.root),v=ab.find("#"+ae.title),x,F,C,U,S,R,Z=ag.attr("data-value")||af.value||ag.val(),aa=ag.attr("min")||af.min,Y=ag.attr("max")||af.max,Q;if(aa===0){aa="0"}Z=a(Z)||V;aa=a(aa||af.yearRange[0]*365);Y=a(Y||af.yearRange[1]*365);if(!T){throw"Dateinput: invalid language: "+af.lang}if(ag.attr("type")=="date"){var u=n("<input/>");n.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(p,q){u.attr(q,ag.attr(q))});ag.replaceWith(u);ag=u}ag.addClass(ae.input);var P=ag.add(ad);if(!ab.length){ab=n("<div><div><a/><div/><a/></div><div><div/><div/></div></div>").hide().css({position:"absolute"}).attr("id",ae.root);ab.children().eq(0).attr("id",ae.head).end().eq(1).attr("id",ae.body).children().eq(0).attr("id",ae.days).end().eq(1).attr("id",ae.weeks).end().end().end().find("a").eq(0).attr("id",ae.prev).end().eq(1).attr("id",ae.next);v=ab.find("#"+ae.head).find("div").attr("id",ae.title);if(af.selectors){var B=n("<select/>").attr("id",ae.month),X=n("<select/>").attr("id",ae.year);v.html(B.add(X))}for(var d=ab.find("#"+ae.days),t=0;t<7;t++){d.append(n("<span/>").text(T.shortDays[(t+af.firstDay)%7]))}n("body").append(ab)}if(af.trigger){x=n("<a/>").attr("href","#").addClass(ae.trigger).click(function(p){ad.show();return p.preventDefault()}).insertAfter(ag)}var y=ab.find("#"+ae.weeks);X=ab.find("#"+ae.year);B=ab.find("#"+ae.month);n.extend(ad,{show:function(p){if(!(ag.attr("readonly")||ag.attr("disabled")||Q)){p=p||n.Event();p.type="onBeforeShow";P.trigger(p);if(!p.isDefaultPrevented()){n.each(g,function(){this.hide()});Q=true;B.unbind("change").change(function(){ad.setValue(X.val(),n(this).val())});X.unbind("change").change(function(){ad.setValue(n(this).val(),B.val())});F=ab.find("#"+ae.prev).unbind("click").click(function(){F.hasClass(ae.disabled)||ad.addMonth(-1);return false});C=ab.find("#"+ae.next).unbind("click").click(function(){C.hasClass(ae.disabled)||ad.addMonth();return false});ad.setValue(Z);var q=ag.offset();if(/iPad/i.test(navigator.userAgent)){q.top-=n(window).scrollTop()}ab.css({top:q.top+ag.outerHeight({margins:true})+af.offset[0],left:q.left+af.offset[1]});if(af.speed){ab.show(af.speed,function(){W(p)})}else{ab.show();W(p)}return ad}}},setValue:function(D,z,w){var r=o(z)>=-1?new Date(o(D),o(z),o(w||1)):D||Z;if(r<aa){r=aa}else{if(r>Y){r=Y}}D=r.getFullYear();z=r.getMonth();w=r.getDate();if(z==-1){z=11;D--}else{if(z==12){z=0;D++}}if(!Q){ac(r,af);return ad}S=z;U=D;w=new Date(D,z,1-af.firstDay);w=w.getDay();var G=l(D,z),p=l(D,z-1),s;if(af.selectors){B.empty();n.each(T.months,function(H,I){aa<new Date(D,H+1,-1)&&Y>new Date(D,H,0)&&B.append(n("<option/>").html(I).attr("value",H))});X.empty();r=V.getFullYear();for(var q=r+af.yearRange[0];q<r+af.yearRange[1];q++){aa<=new Date(q+1,-1,1)&&Y>new Date(q,0,0)&&X.append(n("<option/>").text(q))}B.val(z);X.val(D)}else{v.html(T.months[z]+" "+D)}y.empty();F.add(C).removeClass(ae.disabled);q=!w?-7:0;for(var E,A;q<(!w?35:42);q++){E=n("<a/>");if(q%7===0){s=n("<div/>").addClass(ae.week);y.append(s)}if(q<w){E.addClass(ae.off);A=p-w+q+1;r=new Date(D,z-1,A)}else{if(q>=w+G){E.addClass(ae.off);A=q-G-w+1;r=new Date(D,z+1,A)}else{A=q-w+1;r=new Date(D,z,A);if(i(Z,r)){E.attr("id",ae.current).addClass(ae.focus)}else{i(V,r)&&E.attr("id",ae.today)}}}aa&&r<aa&&E.add(F).addClass(ae.disabled);Y&&r>Y&&E.add(C).addClass(ae.disabled);E.attr("href","#"+A).text(A).data("date",r);s.append(E)}y.find("a").click(function(H){var I=n(this);if(!I.hasClass(ae.disabled)){n("#"+ae.current).removeAttr("id");I.attr("id",ae.current);ac(I.data("date"),af,H)}return false});ae.sunday&&y.find(ae.week).each(function(){var H=af.firstDay?7-af.firstDay:0;n(this).children().slice(H,H+1).addClass(ae.sunday)});return ad},setMin:function(p,q){aa=a(p);q&&Z<aa&&ad.setValue(aa);return ad},setMax:function(p,q){Y=a(p);q&&Z>Y&&ad.setValue(Y);return ad},today:function(){return ad.setValue(V)},addDay:function(p){return this.setValue(U,S,R+(p||1))},addMonth:function(p){return this.setValue(U,S+(p||1),R)},addYear:function(p){return this.setValue(U+(p||1),S,R)},hide:function(p){if(Q){p=n.Event();p.type="onHide";P.trigger(p);n(document).unbind("click.d").unbind("keydown.d");if(p.isDefaultPrevented()){return}ab.hide();Q=false}return ad},getConf:function(){return af},getInput:function(){return ag},getCalendar:function(){return ab},getValue:function(p){return p?j(Z,p,af.lang):Z},isOpen:function(){return Q}});n.each(["onBeforeShow","onShow","change","onHide"],function(p,q){n.isFunction(af[q])&&n(ad).bind(q,af[q]);ad[q]=function(r){r&&n(ad).bind(q,r);return ad}});ag.bind("focus click",ad.show).keydown(function(p){var q=p.keyCode;if(!Q&&n(h).index(q)>=0){ad.show(p);return p.preventDefault()}return p.shiftKey||p.ctrlKey||p.altKey||q==9?true:p.preventDefault()});a(ag.val())&&ac(Z,af)}n.tools=n.tools||{version:"1.2.5"};var g=[],m,h=[75,76,38,39,74,72,40,37],e={};m=n.tools.dateinput={conf:{format:"mm/dd/yy",selectors:false,yearRange:[-5,5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:undefined,max:undefined,trigger:false,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},localize:function(d,p){n.each(p,function(r,s){p[r]=s.split(",")});e[d]=p}};m.localize("en",{months:"January,February,March,April,May,June,July,August,September,October,November,December",shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});var f=/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,c=n("<a/>");n.expr[":"].date=function(d){var p=d.getAttribute("type");return p&&p=="date"||!!n(d).data("dateinput")};n.fn.dateinput=function(d){if(this.data("dateinput")){return this}d=n.extend(true,{},m.conf,d);n.each(d.css,function(r,s){if(!s&&r!="prefix"){d.css[r]=(d.css.prefix||"")+(s||r)}});var p;this.each(function(){var q=new b(n(this),d);g.push(q);q=q.getInput().data("dateinput",q);p=p?p.add(q):q});return p?p:this}})(jQuery);(function(g){function c(j,e){e=Math.pow(10,e);return Math.round(j*e)/e}function f(j,e){if(e=parseInt(j.css(e),10)){return e}return(j=j[0].currentStyle)&&j.width&&parseInt(j.width,10)}function h(e){return(e=e.data("events"))&&e.onSlide}function b(T,U){function R(o,k,n,l){if(n===undefined){n=k/P*e}else{if(l){n-=U.min}}if(F){n=Math.round(n/F)*F}if(k===undefined||F){k=n*P/e}if(isNaN(n)){return S}k=Math.max(0,Math.min(k,P));n=k/P*e;if(l||!M){n+=U.min}if(M){if(l){k=P-k}else{n=U.max-n}}n=c(n,C);var m=o.type=="click";if(E&&O!==undefined&&!m){o.type="onSlide";J.trigger(o,[n,k]);if(o.isDefaultPrevented()){return S}}l=m?U.speed:0;m=m?function(){o.type="change";J.trigger(o,[n])}:null;if(M){N.animate({top:k},l,m);U.progress&&G.animate({height:P-k+N.width()/2},l)}else{N.animate({left:k},l,m);U.progress&&G.animate({width:k+N.width()/2},l)}O=n;r=k;T.val(n);return S}function L(){if(M=U.vertical||f(Q,"height")>f(Q,"width")){P=f(Q,"height")-f(N,"height");y=Q.offset().top+P}else{P=f(Q,"width")-f(N,"width");y=Q.offset().left}}function x(){L();S.setValue(U.value!==undefined?U.value:U.min)}var S=this,K=U.css,Q=g("<div><div/><a href='#'/></div>").data("rangeinput",S),M,O,y,P,r;T.before(Q);var N=Q.addClass(K.slider).find("a").addClass(K.handle),G=Q.find("div").addClass(K.progress);g.each("min,max,step,value".split(","),function(l,k){l=T.attr(k);if(parseFloat(l)){U[k]=parseFloat(l,10)}});var e=U.max-U.min,F=U.step=="any"?0:U.step,C=U.precision;if(C===undefined){try{C=F.toString().split(".")[1].length}catch(j){C=0}}if(T.attr("type")=="range"){var q=g("<input/>");g.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(l,k){q.attr(k,T.attr(k))});q.val(U.value);T.replaceWith(q);T=q}T.addClass(K.input);var J=g(S).add(T),E=true;g.extend(S,{getValue:function(){return O},setValue:function(l,k){L();return R(k||g.Event("api"),undefined,l,true)},getConf:function(){return U},getProgress:function(){return G},getHandle:function(){return N},getInput:function(){return T},step:function(m,k){k=k||g.Event();var l=U.step=="any"?1:U.step;S.setValue(O+l*(m||1),k)},stepUp:function(k){return S.step(k||1)},stepDown:function(k){return S.step(-k||-1)}});g.each("onSlide,change".split(","),function(l,k){g.isFunction(U[k])&&g(S).bind(k,U[k]);S[k]=function(m){m&&g(S).bind(k,m);return S}});N.drag({drag:false}).bind("dragStart",function(){L();E=h(g(S))||h(T)}).bind("drag",function(m,k,l){if(T.is(":disabled")){return false}R(m,M?k:l)}).bind("dragEnd",function(k){if(!k.isDefaultPrevented()){k.type="change";J.trigger(k,[O])}}).click(function(k){return k.preventDefault()});Q.click(function(l){if(T.is(":disabled")||l.target==N[0]){return l.preventDefault()}L();var k=N.width()/2;R(l,M?P-y-k+l.pageY:l.pageX-y-k)});U.keyboard&&T.keydown(function(n){if(!T.attr("readonly")){var k=n.keyCode,m=g([75,76,38,33,39]).index(k)!=-1,l=g([74,72,40,34,37]).index(k)!=-1;if((m||l)&&!(n.shiftKey||n.altKey||n.ctrlKey)){if(m){S.step(k==33?10:1,n)}else{if(l){S.step(k==34?-10:-1,n)}}return n.preventDefault()}}});T.blur(function(l){var k=g(this).val();k!==O&&S.setValue(k,l)});g.extend(T[0],{stepUp:S.stepUp,stepDown:S.stepDown});x();P||g(window).load(x)}g.tools=g.tools||{version:"1.2.5"};var d;d=g.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:true,progress:false,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var a,i;g.fn.drag=function(e){document.ondragstart=function(){return false};e=g.extend({x:true,y:true,drag:true},e);a=a||g(document).bind("mousedown mouseup",function(j){var l=g(j.target);if(j.type=="mousedown"&&l.data("drag")){var q=l.position(),k=j.pageX-q.left,m=j.pageY-q.top,n=true;a.bind("mousemove.drag",function(p){var r=p.pageX-k;p=p.pageY-m;var o={};if(e.x){o.left=r}if(e.y){o.top=p}if(n){l.trigger("dragStart");n=false}e.drag&&l.css(o);l.trigger("drag",[p,r]);i=l});j.preventDefault()}else{try{i&&i.trigger("dragEnd")}finally{a.unbind("mousemove.drag");i=null}}});return this.data("drag",true)};g.expr[":"].range=function(j){var e=j.getAttribute("type");return e&&e=="range"||!!g(j).filter("input").data("rangeinput")};g.fn.rangeinput=function(j){if(this.data("rangeinput")){return this}j=g.extend(true,{},d.conf,j);var e;this.each(function(){var k=new b(g(this),g.extend(true,{},j));k=k.getInput().data("rangeinput",k);e=e?e.add(k):k});return e?e:this}})(jQuery);(function(i){function n(o,e,t){var q=o.offset().top,r=o.offset().left,h=t.position.split(/,?\s+/),s=h[0];h=h[1];q-=e.outerHeight()-t.offset[0];r+=o.outerWidth()+t.offset[1];if(/iPad/i.test(navigator.userAgent)){q-=i(window).scrollTop()}t=e.outerHeight()+o.outerHeight();if(s=="center"){q+=t/2}if(s=="bottom"){q+=t}o=o.outerWidth();if(h=="center"){r-=(o+e.outerWidth())/2}if(h=="left"){r-=o}return{top:q,left:r}}function k(h){function e(){return this.getAttribute("type")==h}e.key="[type="+h+"]";return e}function m(o,e,t){function q(v,w,u){if(!(!t.grouped&&v.length)){var p;if(u===false||i.isArray(u)){p=g.messages[w.key||w]||g.messages["*"];p=p[t.lang]||g.messages["*"].en;(w=p.match(/\$\d/g))&&i.isArray(u)&&i.each(w,function(x){p=p.replace(this,u[x])})}else{p=u[t.lang]||u}v.push(p)}}var r=this,h=e.add(r);o=o.not(":button, :image, :reset, :submit");i.extend(r,{getConf:function(){return t},getForm:function(){return e},getInputs:function(){return o},reflow:function(){o.each(function(){var p=i(this),u=p.data("msg.el");if(u){p=n(p,u,t);u.css({top:p.top,left:p.left})}});return r},invalidate:function(u,v){if(!v){var p=[];i.each(u,function(x,w){x=o.filter("[name='"+x+"']");if(x.length){x.trigger("OI",[w]);p.push({input:x,messages:[w]})}});u=p;v=i.Event()}v.type="onFail";h.trigger(v,[u]);v.isDefaultPrevented()||b[t.effect][0].call(r,u,v);return r},reset:function(p){p=p||o;p.removeClass(t.errorClass).each(function(){var u=i(this).data("msg.el");if(u){u.remove();i(this).data("msg.el",null)}}).unbind(t.errorInputEvent||"");return r},destroy:function(){e.unbind(t.formEvent+".V").unbind("reset.V");o.unbind(t.inputEvent+".V").unbind("change.V");return r.reset()},checkValidity:function(v,w){v=v||o;v=v.not(":disabled");if(!v.length){return true}w=w||i.Event();w.type="onBeforeValidate";h.trigger(w,[v]);if(w.isDefaultPrevented()){return w.result}var u=[];v.not(":radio:not(:checked)").each(function(){var x=[],z=i(this).data("messages",x),y=a&&z.is(":date")?"onHide.v":t.errorInputEvent+".v";z.unbind(y);i.each(l,function(){var C=this,B=C[0];if(z.filter(B).length){C=C[1].call(r,z,z.val());if(C!==true){w.type="onBeforeFail";h.trigger(w,[z,B]);if(w.isDefaultPrevented()){return false}var A=z.attr(t.messageAttr);if(A){x=[A];return false}else{q(x,B,C)}}}});if(x.length){u.push({input:z,messages:x});z.trigger("OI",[x]);t.errorInputEvent&&z.bind(y,function(A){r.checkValidity(z,A)})}if(t.singleError&&u.length){return false}});var p=b[t.effect];if(!p){throw'Validator: cannot find effect "'+t.effect+'"'}if(u.length){r.invalidate(u,w);return false}else{p[1].call(r,v,w);w.type="onSuccess";h.trigger(w,[v]);v.unbind(t.errorInputEvent+".v")}return true}});i.each("onBeforeValidate,onBeforeFail,onFail,onSuccess".split(","),function(p,u){i.isFunction(t[u])&&i(r).bind(u,t[u]);r[u]=function(v){v&&i(r).bind(u,v);return r}});t.formEvent&&e.bind(t.formEvent+".V",function(p){if(!r.checkValidity(null,p)){return p.preventDefault()}});e.bind("reset.V",function(){r.reset()});o[0]&&o[0].validity&&o.each(function(){this.oninvalid=function(){return false}});if(e[0]){e[0].checkValidity=r.checkValidity}t.inputEvent&&o.bind(t.inputEvent+".V",function(p){r.checkValidity(i(this),p)});o.filter(":checkbox, select").filter("[required]").bind("change.V",function(p){var u=i(this);if(this.checked||u.is("select")&&i(this).val()){b[t.effect][1].call(r,u,p)}});var s=o.filter(":radio").change(function(p){r.checkValidity(s,p)});i(window).resize(function(){r.reflow()})}i.tools=i.tools||{version:"1.2.5"};var j=/\[type=([a-z]+)\]/,f=/^-?[0-9]*(\.[0-9]+)?$/,a=i.tools.dateinput,d=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,c=/^(https?:\/\/)?[\da-z\.\-]+\.[a-z\.]{2,6}[#&+_\?\/\w \.\-=]*$/i,g;g=i.tools.validator={conf:{grouped:false,effect:"default",errorClass:"invalid",inputEvent:null,errorInputEvent:"keyup",formEvent:"submit",lang:"en",message:"<div/>",messageAttr:"data-message",messageClass:"error",offset:[0,0],position:"center right",singleError:false,speed:"normal"},messages:{"*":{en:"Please correct this value"}},localize:function(h,e){i.each(e,function(p,o){g.messages[p]=g.messages[p]||{};g.messages[p][h]=o})},localizeFn:function(h,e){g.messages[h]=g.messages[h]||{};i.extend(g.messages[h],e)},fn:function(h,e,o){if(i.isFunction(e)){o=e}else{if(typeof e=="string"){e={en:e}}this.messages[h.key||h]=e}if(e=j.exec(h)){h=k(e[1])}l.push([h,o])},addEffect:function(h,e,o){b[h]=[e,o]}};var l=[],b={"default":[function(h){var e=this.getConf();i.each(h,function(q,o){q=o.input;q.addClass(e.errorClass);var p=q.data("msg.el");if(!p){p=i(e.message).addClass(e.messageClass).appendTo(document.body);q.data("msg.el",p)}p.css({visibility:"hidden"}).find("p").remove();i.each(o.messages,function(r,s){i("<p/>").html(s).appendTo(p)});p.outerWidth()==p.parent().width()&&p.add(p.find("p")).css({display:"inline"});o=n(q,p,e);p.css({visibility:"visible",position:"absolute",top:o.top,left:o.left}).fadeIn(e.speed)})},function(h){var e=this.getConf();h.removeClass(e.errorClass).each(function(){var o=i(this).data("msg.el");o&&o.css({visibility:"hidden"})})}]};i.each("email,url,number".split(","),function(h,e){i.expr[":"][e]=function(o){return o.getAttribute("type")===e}});i.fn.oninvalid=function(e){return this[e?"bind":"trigger"]("OI",e)};g.fn(":email","Please enter a valid email address",function(h,e){return !e||d.test(e)});g.fn(":url","Please enter a valid URL",function(h,e){return !e||c.test(e)});g.fn(":number","Please enter a numeric value.",function(h,e){return f.test(e)});g.fn("[max]","Please enter a value smaller than $1",function(h,e){if(e===""||a&&h.is(":date")){return true}h=h.attr("max");return parseFloat(e)<=parseFloat(h)?true:[h]});g.fn("[min]","Please enter a value larger than $1",function(h,e){if(e===""||a&&h.is(":date")){return true}h=h.attr("min");return parseFloat(e)>=parseFloat(h)?true:[h]});g.fn("[required]","Please complete this mandatory field.",function(h,e){if(h.is(":checkbox")){return h.is(":checked")}return !!e});g.fn("[pattern]",function(h){var e=new RegExp("^"+h.attr("pattern")+"$");return e.test(h.val())});i.fn.validator=function(h){var e=this.data("validator");if(e){e.destroy();this.removeData("validator")}h=i.extend(true,{},g.conf,h);if(this.is("form")){return this.each(function(){var o=i(this);e=new m(o.find(":input"),o,h);o.data("validator",e)})}else{e=new m(this,this.eq(0).closest("form"),h);return this.data("validator",e)}}})(jQuery);(function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(type,name){this.defaults.type=type;this.defaults.name=name},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length){settings.single="metadata"}var data=$.data(elem,settings.single);if(data){return data}data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m){data=m[1]}}else{if(settings.type=="elem"){if(!elem.getElementsByTagName){return undefined}var e=elem.getElementsByTagName(settings.name);if(e.length){data=$.trim(e[0].innerHTML)}}else{if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr){data=attr}}}}if(data.indexOf("{")<0){data="{"+data+"}"}data=eval("("+data+")");$.data(elem,settings.single,data);return data}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts)}})(jQuery);jQuery.fn.extend({everyTime:function(b,c,d,e,a){return this.each(function(){jQuery.timer.add(this,b,c,d,e,a)})},oneTime:function(a,b,c){return this.each(function(){jQuery.timer.add(this,a,b,c,1)})},stopTime:function(a,b){return this.each(function(){jQuery.timer.remove(this,a,b)})}});jQuery.extend({timer:{guid:1,global:{},regex:/^([0-9]+)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1000,das:10000,hs:100000,ks:1000000},timeParse:function(c){if(c==undefined||c==null){return null}var a=this.regex.exec(jQuery.trim(c.toString()));if(a[2]){var b=parseInt(a[1],10);var d=this.powers[a[2]]||1;return b*d}else{return c}},add:function(e,c,d,g,h,b){var a=0;if(jQuery.isFunction(d)){if(!h){h=g}g=d;d=c}c=jQuery.timer.timeParse(c);if(typeof c!="number"||isNaN(c)||c<=0){return}if(h&&h.constructor!=Number){b=!!h;h=0}h=h||0;b=b||false;if(!e.$timers){e.$timers={}}if(!e.$timers[d]){e.$timers[d]={}}g.$timerID=g.$timerID||this.guid++;var f=function(){if(b&&this.inProgress){return}this.inProgress=true;if((++a>h&&h!==0)||g.call(e,a)===false){jQuery.timer.remove(e,d,g)}this.inProgress=false};f.$timerID=g.$timerID;if(!e.$timers[d][g.$timerID]){e.$timers[d][g.$timerID]=window.setInterval(f,c)}if(!this.global[d]){this.global[d]=[]}this.global[d].push(e)},remove:function(c,b,d){var e=c.$timers,a;if(e){if(!b){for(b in e){this.remove(c,b,d)}}else{if(e[b]){if(d){if(d.$timerID){window.clearInterval(e[b][d.$timerID]);delete e[b][d.$timerID]}}else{for(var d in e[b]){window.clearInterval(e[b][d]);delete e[b][d]}}for(a in e[b]){break}if(!a){a=null;delete e[b]}}}for(a in e){break}if(!a){c.$timers=null}}}}});if(jQuery.browser.msie){jQuery(window).one("unload",function(){var d=jQuery.timer.global;for(var a in d){var c=d[a],b=c.length;while(--b){jQuery.timer.remove(c[b],a)}}});
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 * 
 * Requires: 1.2.2+
 */
}(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(i){var g=i||window.event,f=[].slice.call(arguments,1),j=0,h=true,e=0,d=0;i=c.event.fix(g);i.type="mousewheel";if(i.wheelDelta){j=i.wheelDelta/120}if(i.detail){j=-i.detail/3}d=j;if(g.axis!==undefined&&g.axis===g.HORIZONTAL_AXIS){d=0;e=-1*j}if(g.wheelDeltaY!==undefined){d=g.wheelDeltaY/120}if(g.wheelDeltaX!==undefined){e=-1*g.wheelDeltaX/120}f.unshift(i,j,e,d);return c.event.handle.apply(this,f)}})(jQuery);(function(d,e,f){d.fn.jScrollPane=function(a){function c(br,bc){var bk,ba=this,a2,bF,aK,bD,a7,a1,s,aO,bi,bS,bs,aW,bh,aX,aV,a0,a6,bz,a3,aM,bv,by,bK,bC,bl,aT,bu,bm,aI,bq,bP,aZ,bf,bG=true,bb=true,bQ=false,aU=false,bA=br.clone(false,false).empty(),bN=d.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";bP=br.css("paddingTop")+" "+br.css("paddingRight")+" "+br.css("paddingBottom")+" "+br.css("paddingLeft");aZ=(parseInt(br.css("paddingLeft"),10)||0)+(parseInt(br.css("paddingRight"),10)||0);function bx(i){var k,j,o,m,n,g,h,l;bk=i;if(a2===f){h=br.scrollTop();l=br.scrollLeft();br.css({overflow:"hidden",padding:0});bF=br.innerWidth()+aZ;aK=br.innerHeight();br.width(bF);a2=d('<div class="jspPane" />').css("padding",bP).append(br.children());bD=d('<div class="jspContainer" />').css({width:bF+"px",height:aK+"px"}).append(a2).appendTo(br)}else{br.css("width","");g=br.innerWidth()+aZ!=bF||br.outerHeight()!=aK;if(g){bF=br.innerWidth()+aZ;aK=br.innerHeight();bD.css({width:bF+"px",height:aK+"px"})}if(!g&&bf==a7&&a2.outerHeight()==a1){br.width(bF);return}bf=a7;a2.css("width","");br.width(bF);bD.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}k=a2.clone(false,false).css("position","absolute");j=d('<div style="width:1px; position: relative;" />').append(k);d("body").append(j);a7=Math.max(a2.outerWidth(),k.outerWidth());j.remove();a1=a2.outerHeight();s=a7/bF;aO=a1/aK;bi=aO>1;bS=s>1;if(!(bS||bi)){br.removeClass("jspScrollable");a2.css({top:0,width:bD.width()-aZ});aR();bp();a9();aJ();bH()}else{br.addClass("jspScrollable");o=bk.maintainPosition&&(bh||a0);if(o){m=bU();n=bW()}bR();bw();bn();if(o){bd(m,false);be(n,false)}bg();bJ();bB();if(bk.enableKeyboardNavigation){a8()}if(bk.clickOnTrack){aP()}bt();if(bk.hijackInternalLinks){aS()}}if(bk.autoReinitialise&&!bq){bq=setInterval(function(){bx(bk)},bk.autoReinitialiseDelay)}else{if(!bk.autoReinitialise&&bq){clearInterval(bq)}}h&&br.scrollTop(0)&&be(h,false);l&&br.scrollLeft(0)&&bd(l,false);br.trigger("jsp-initialised",[bS||bi])}function bR(){if(bi){bD.append(d('<div class="jspVerticalBar" />').append(d('<div class="jspCap jspCapTop" />'),d('<div class="jspTrack" />').append(d('<div class="jspDrag" />').append(d('<div class="jspDragTop" />'),d('<div class="jspDragBottom" />'))),d('<div class="jspCap jspCapBottom" />')));a6=bD.find(">.jspVerticalBar");bz=a6.find(">.jspTrack");bs=bz.find(">.jspDrag");if(bk.showArrows){by=d('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",bT(0,-1)).bind("click.jsp",bV);bK=d('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",bT(0,1)).bind("click.jsp",bV);if(bk.arrowScrollOnHover){by.bind("mouseover.jsp",bT(0,-1,by));bK.bind("mouseover.jsp",bT(0,1,bK))}bE(bz,bk.verticalArrowPositions,by,bK)}aM=aK;bD.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){aM-=d(this).outerHeight()});bs.hover(function(){bs.addClass("jspHover")},function(){bs.removeClass("jspHover")}).bind("mousedown.jsp",function(h){d("html").bind("dragstart.jsp selectstart.jsp",bV);bs.addClass("jspActive");var g=h.pageY-bs.position().top;d("html").bind("mousemove.jsp",function(i){a5(i.pageY-g,false)}).bind("mouseup.jsp mouseleave.jsp",bo);return false});aQ()}}function aQ(){bz.height(aM+"px");bh=0;a3=bk.verticalGutter+bz.outerWidth();a2.width(bF-a3-aZ);if(a6.position().left===0){a2.css("margin-left",a3+"px")}}function bw(){if(bS){bD.append(d('<div class="jspHorizontalBar" />').append(d('<div class="jspCap jspCapLeft" />'),d('<div class="jspTrack" />').append(d('<div class="jspDrag" />').append(d('<div class="jspDragLeft" />'),d('<div class="jspDragRight" />'))),d('<div class="jspCap jspCapRight" />')));bC=bD.find(">.jspHorizontalBar");bl=bC.find(">.jspTrack");aX=bl.find(">.jspDrag");if(bk.showArrows){bm=d('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",bT(-1,0)).bind("click.jsp",bV);aI=d('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",bT(1,0)).bind("click.jsp",bV);if(bk.arrowScrollOnHover){bm.bind("mouseover.jsp",bT(-1,0,bm));aI.bind("mouseover.jsp",bT(1,0,aI))}bE(bl,bk.horizontalArrowPositions,bm,aI)}aX.hover(function(){aX.addClass("jspHover")},function(){aX.removeClass("jspHover")}).bind("mousedown.jsp",function(h){d("html").bind("dragstart.jsp selectstart.jsp",bV);aX.addClass("jspActive");var g=h.pageX-aX.position().left;d("html").bind("mousemove.jsp",function(i){a4(i.pageX-g,false)}).bind("mouseup.jsp mouseleave.jsp",bo);return false});aT=bD.innerWidth();bI()}}function bI(){bD.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){aT-=d(this).outerWidth()});bl.width(aT+"px");a0=0}function bn(){if(bS&&bi){var h=bl.outerHeight(),g=bz.outerWidth();aM-=h;d(bC).find(">.jspCap:visible,>.jspArrow").each(function(){aT+=d(this).outerWidth()});aT-=g;aK-=g;bF-=h;bl.parent().append(d('<div class="jspCorner" />').css("width",h+"px"));aQ();bI()}if(bS){a2.width((bD.outerWidth()-aZ)+"px")}a1=a2.outerHeight();aO=a1/aK;if(bS){bu=Math.ceil(1/s*aT);if(bu>bk.horizontalDragMaxWidth){bu=bk.horizontalDragMaxWidth}else{if(bu<bk.horizontalDragMinWidth){bu=bk.horizontalDragMinWidth}}aX.width(bu+"px");aV=aT-bu;bL(a0)}if(bi){bv=Math.ceil(1/aO*aM);if(bv>bk.verticalDragMaxHeight){bv=bk.verticalDragMaxHeight}else{if(bv<bk.verticalDragMinHeight){bv=bk.verticalDragMinHeight}}bs.height(bv+"px");aW=aM-bv;bM(bh)}}function bE(l,j,m,h){var g="before",k="after",i;if(j=="os"){j=/Mac/.test(navigator.platform)?"after":"split"}if(j==g){k=j}else{if(j==k){g=j;i=m;m=h;h=i}}l[g](m)[k](h)}function bT(i,g,h){return function(){bj(i,g,this,h);this.blur();return false}}function bj(k,l,g,i){g=d(g).addClass("jspActive");var j,m,n=true,h=function(){if(k!==0){ba.scrollByX(k*bk.arrowButtonSpeed)}if(l!==0){ba.scrollByY(l*bk.arrowButtonSpeed)}m=setTimeout(h,n?bk.initialDelay:bk.arrowRepeatFreq);n=false};h();j=i?"mouseout.jsp":"mouseup.jsp";i=i||d("html");i.bind(j,function(){g.removeClass("jspActive");m&&clearTimeout(m);m=null;i.unbind(j)})}function aP(){aJ();if(bi){bz.bind("mousedown.jsp",function(i){if(i.originalTarget===f||i.originalTarget==i.currentTarget){var k=d(this),g=k.offset(),j=i.pageY-g.top-bh,m,n=true,h=function(){var p=k.offset(),o=i.pageY-p.top-bv/2,r=aK*bk.scrollPagePercent,q=aW*r/(a1-aK);if(j<0){if(bh-q>o){ba.scrollByY(-r)}else{a5(o)}}else{if(j>0){if(bh+q<o){ba.scrollByY(r)}else{a5(o)}}else{l();return}}m=setTimeout(h,n?bk.initialDelay:bk.trackClickRepeatFreq);n=false},l=function(){m&&clearTimeout(m);m=null;d(document).unbind("mouseup.jsp",l)};h();d(document).bind("mouseup.jsp",l);return false}})}if(bS){bl.bind("mousedown.jsp",function(i){if(i.originalTarget===f||i.originalTarget==i.currentTarget){var k=d(this),g=k.offset(),j=i.pageX-g.left-a0,m,n=true,h=function(){var p=k.offset(),o=i.pageX-p.left-bu/2,r=bF*bk.scrollPagePercent,q=aV*r/(a7-bF);if(j<0){if(a0-q>o){ba.scrollByX(-r)}else{a4(o)}}else{if(j>0){if(a0+q<o){ba.scrollByX(r)}else{a4(o)}}else{l();return}}m=setTimeout(h,n?bk.initialDelay:bk.trackClickRepeatFreq);n=false},l=function(){m&&clearTimeout(m);m=null;d(document).unbind("mouseup.jsp",l)};h();d(document).bind("mouseup.jsp",l);return false}})}}function aJ(){if(bl){bl.unbind("mousedown.jsp")}if(bz){bz.unbind("mousedown.jsp")}}function bo(){d("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");if(bs){bs.removeClass("jspActive")}if(aX){aX.removeClass("jspActive")}}function a5(g,h){if(!bi){return}if(g<0){g=0}else{if(g>aW){g=aW}}if(h===f){h=bk.animateScroll}if(h){ba.animate(bs,"top",g,bM)}else{bs.css("top",g);bM(g)}}function bM(k){if(k===f){k=bs.position().top}bD.scrollTop(0);bh=k;var h=bh===0,j=bh==aW,i=k/aW,g=-i*(a1-aK);if(bG!=h||bQ!=j){bG=h;bQ=j;br.trigger("jsp-arrow-change",[bG,bQ,bb,aU])}aL(h,j);a2.css("top",g);br.trigger("jsp-scroll-y",[-g,h,j]).trigger("scroll")}function a4(h,g){if(!bS){return}if(h<0){h=0}else{if(h>aV){h=aV}}if(g===f){g=bk.animateScroll}if(g){ba.animate(aX,"left",h,bL)}else{aX.css("left",h);bL(h)}}function bL(k){if(k===f){k=aX.position().left}bD.scrollTop(0);a0=k;var h=a0===0,i=a0==aV,j=k/aV,g=-j*(a7-bF);if(bb!=h||aU!=i){bb=h;aU=i;br.trigger("jsp-arrow-change",[bG,bQ,bb,aU])}aN(h,i);a2.css("left",g);br.trigger("jsp-scroll-x",[-g,h,i]).trigger("scroll")}function aL(h,g){if(bk.showArrows){by[h?"addClass":"removeClass"]("jspDisabled");bK[g?"addClass":"removeClass"]("jspDisabled")}}function aN(h,g){if(bk.showArrows){bm[h?"addClass":"removeClass"]("jspDisabled");aI[g?"addClass":"removeClass"]("jspDisabled")}}function be(g,i){var h=g/(a1-aK);a5(h*aW,i)}function bd(i,g){var h=i/(a7-bF);a4(h*aV,g)}function bO(i,n,g){var p,t,r,u=0,j=0,h,o,l,m,k;try{p=d(i)}catch(q){return}t=p.outerHeight();r=p.outerWidth();bD.scrollTop(0);bD.scrollLeft(0);while(!p.is(".jspPane")){u+=p.position().top;j+=p.position().left;p=p.offsetParent();if(/^body|html$/i.test(p[0].nodeName)){return}}h=bW();o=h+aK;if(u<h||n){m=u-bk.verticalGutter}else{if(u+t>o){m=u-aK+t+bk.verticalGutter}}if(m){be(m,g)}viewportLeft=bU();l=viewportLeft+bF;if(j<viewportLeft||n){k=j-bk.horizontalGutter}else{if(j+r>l){k=j-bF+r+bk.horizontalGutter}}if(k){bd(k,g)}}function bU(){return -a2.position().left}function bW(){return -a2.position().top}function bJ(){bD.unbind(bN).bind(bN,function(i,h,j,l){var k=a0,g=bh;ba.scrollBy(j*bk.mouseWheelSpeed,-l*bk.mouseWheelSpeed,false);return k==a0&&g==bh})}function aR(){bD.unbind(bN)}function bV(){return false}function bg(){a2.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(g){bO(g.target,false)})}function bp(){a2.find(":input,a").unbind("focus.jsp")}function a8(){var g,i;a2.focus(function(){br.focus()});br.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(j){if(j.target!==this){return}var k=a0,l=bh;switch(j.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:g=j.keyCode;h();break;case 35:be(a1-aK);g=null;break;case 36:be(0);g=null;break}i=j.keyCode==g&&k!=a0||l!=bh;return !i}).bind("keypress.jsp",function(j){if(j.keyCode==g){h()}return !i});if(bk.hideFocus){br.css("outline","none");if("hideFocus" in bD[0]){br.attr("hideFocus",true)}}else{br.css("outline","");if("hideFocus" in bD[0]){br.attr("hideFocus",false)}}function h(){var j=a0,k=bh;switch(g){case 40:ba.scrollByY(bk.keyboardSpeed,false);break;case 38:ba.scrollByY(-bk.keyboardSpeed,false);break;case 34:case 32:ba.scrollByY(aK*bk.scrollPagePercent,false);break;case 33:ba.scrollByY(-aK*bk.scrollPagePercent,false);break;case 39:ba.scrollByX(bk.keyboardSpeed,false);break;case 37:ba.scrollByX(-bk.keyboardSpeed,false);break}i=j!=a0||k!=bh;return i}}function a9(){br.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function bt(){if(location.hash&&location.hash.length>1){var h,i;try{h=d(location.hash)}catch(g){return}if(h.length&&a2.find(location.hash)){if(bD.scrollTop()===0){i=setInterval(function(){if(bD.scrollTop()>0){bO(location.hash,true);d(document).scrollTop(bD.position().top);clearInterval(i)}},50)}else{bO(location.hash,true);d(document).scrollTop(bD.position().top)}}}}function bH(){d("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function aS(){bH();d("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var g=this.href.split("#"),h;if(g.length>1){h=g[1];if(h.length>0&&a2.find("#"+h).length>0){bO("#"+h,true);return false}}})}function bB(){var k,l,i,j,h,g=false;bD.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(n){var m=n.originalEvent.touches[0];k=bU();l=bW();i=m.pageX;j=m.pageY;h=false;g=true}).bind("touchmove.jsp",function(m){if(!g){return}var n=m.originalEvent.touches[0],o=a0,p=bh;ba.scrollTo(k+i-n.pageX,l+j-n.pageY);h=h||Math.abs(i-n.pageX)>5||Math.abs(j-n.pageY)>5;return o==a0&&p==bh}).bind("touchend.jsp",function(m){g=false}).bind("click.jsp-touchclick",function(m){if(h){h=false;return false}})}function aY(){var g=bW(),h=bU();br.removeClass("jspScrollable").unbind(".jsp");br.replaceWith(bA.append(a2.children()));bA.scrollTop(g);bA.scrollLeft(h)}d.extend(ba,{reinitialise:function(g){g=d.extend({},bk,g);bx(g)},scrollToElement:function(h,i,g){bO(h,i,g)},scrollTo:function(h,g,i){bd(h,i);be(g,i)},scrollToX:function(h,g){bd(h,g)},scrollToY:function(g,h){be(g,h)},scrollToPercentX:function(h,g){bd(h*(a7-bF),g)},scrollToPercentY:function(h,g){be(h*(a1-aK),g)},scrollBy:function(i,g,h){ba.scrollByX(i,h);ba.scrollByY(g,h)},scrollByX:function(g,i){var j=bU()+g,h=j/(a7-bF);a4(h*aV,i)},scrollByY:function(g,i){var j=bW()+g,h=j/(a1-aK);a5(h*aW,i)},positionDragX:function(g,h){a4(g,h)},positionDragY:function(h,g){a4(h,g)},animate:function(k,h,g,i){var j={};j[h]=g;k.animate(j,{duration:bk.animateDuration,ease:bk.animateEase,queue:false,step:i})},getContentPositionX:function(){return bU()},getContentPositionY:function(){return bW()},getContentWidth:function(){return a7()},getContentHeight:function(){return a1()},getPercentScrolledX:function(){return bU()/(a7-bF)},getPercentScrolledY:function(){return bW()/(a1-aK)},getIsScrollableH:function(){return bS},getIsScrollableV:function(){return bi},getContentPane:function(){return a2},scrollToBottom:function(g){a5(aW,g)},hijackInternalLinks:function(){aS()},destroy:function(){aY()}});bx(bc)}a=d.extend({},d.fn.jScrollPane.defaults,a);d.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){a[this]=a[this]||a.speed});var b;this.each(function(){var j=d(this),i=j.data("jsp");if(i){i.reinitialise(a)}else{i=new c(j,a);j.data("jsp",i)}b=b?b.add(j):j});return b};d.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this);
