/* Copyright (c) 2011 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.6
 * 
 * Requires: 1.2.2+
 */
(function(d){var b=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks){for(var a=b.length;a;){d.event.fixHooks[b[--a]]=d.event.mouseHooks}}d.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var e=b.length;e;){this.addEventListener(b[--e],c,false)}}else{this.onmousewheel=c}},teardown:function(){if(this.removeEventListener){for(var e=b.length;e;){this.removeEventListener(b[--e],c,false)}}else{this.onmousewheel=null}}};d.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}});function c(j){var h=j||window.event,g=[].slice.call(arguments,1),k=0,i=true,f=0,e=0;j=d.event.fix(h);j.type="mousewheel";if(h.wheelDelta){k=h.wheelDelta/120}if(h.detail){k=-h.detail/3}e=k;if(h.axis!==undefined&&h.axis===h.HORIZONTAL_AXIS){e=0;f=-1*k}if(h.wheelDeltaY!==undefined){e=h.wheelDeltaY/120}if(h.wheelDeltaX!==undefined){f=-1*h.wheelDeltaX/120}g.unshift(j,k,f,e);return(d.event.dispatch||d.event.handle).apply(this,g)}})(jQuery);(function(a){a.fn.bgiframe=(a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(d){d=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d);var c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(d.top))+";left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(d.left))+";width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(d.width))+";height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(d.height))+';"/>';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(c),this.firstChild)}})}:function(){return this});a.fn.bgIframe=a.fn.bgiframe;function b(c){return c&&c.constructor===Number?c+"px":c}})(jQuery);(function(b){b.fn.superfish=function(k){var g=b.fn.superfish,j=g.c,f=b(['<span class="',j.arrowClass,'"> »</span>'].join("")),i=function(){var c=b(this),l=d(c);clearTimeout(l.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=b(this),m=d(c),l=g.op;clearTimeout(m.sfTimer);m.sfTimer=setTimeout(function(){l.retainPath=(b.inArray(c[0],l.$path)>-1);c.hideSuperfishUl();if(l.$path.length&&c.parents(["li.",l.hoverClass].join("")).length<1){i.call(l.$path)}},l.delay)},d=function(c){var l=c.parents(["ul.",j.menuClass,":first"].join(""))[0];g.op=g.o[l.serial];return l},h=function(c){c.addClass(j.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=g.o.length;var m=b.extend({},g.defaults,k);m.$path=b("li."+m.pathClass,this).slice(0,m.pathLevels).each(function(){b(this).addClass([m.hoverClass,j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)});g.o[c]=g.op=m;b("li:has(ul)",this)[(b.fn.hoverIntent&&!m.disableHI)?"hoverIntent":"hover"](i,e).each(function(){if(m.autoArrows){h(b(">a:first-child",this))}}).not("."+j.bcClass).hideSuperfishUl();var l=b("a",this);l.each(function(n){var o=l.eq(n).parents("li");l.eq(n).focus(function(){i.call(o)}).blur(function(){e.call(o)})});m.onInit.call(this)}).each(function(){var c=[j.menuClass];if(g.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(j.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")
}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery);(function(a){a.fn.infiniteCarousel=function(){function b(d,c){return new Array(c+1).join(d)}return this.each(function(){var g=a("> div",this).css("overflow","hidden"),i=g.find("> ul"),h=i.find("> li"),e=h.filter(":first"),j=e.outerWidth(),d=Math.ceil(g.innerWidth()/j),f=1,c=Math.ceil(h.length/d);if((h.length%d)!=0){i.append(b('<li class="empty" />',d-(h.length%d)));h=i.find("> li")}h.filter(":first").before(h.slice(-d).clone().addClass("cloned"));h.filter(":last").after(h.slice(0,d).clone().addClass("cloned"));h=i.find("> li");g.scrollLeft(j*d);function k(m){var l=m<f?-1:1,q=Math.abs(f-m),o=j*l*d*q;g.filter(":not(:animated)").animate({scrollLeft:"+="+o},500,function(){if(m==0){g.scrollLeft(j*d*c);m=c}else{if(m>c){g.scrollLeft(j*d);m=1}}f=m});return false}g.after('<a class="arrow back"><</a><a class="arrow forward">></a>');a("a.back",this).click(function(){return k(f-1)});a("a.forward",this).click(function(){return k(f+1)});a(this).bind("goto",function(l,m){k(m)})})}})(jQuery);(function(a){a.fn.jqueryMyModaluiDialog=function(b){var c=a.extend({},a.fn.jqueryMyModaluiDialog.defaults,b);return this.each(function(){var e=a(this);e.click(function(){if(c.openEffect==="scale"){var f={effect:c.openEffect,percent:100,duration:c.openEffectDuration}}else{var f={effect:c.openEffect,duration:c.openEffectDuration}}if(c.closeEffect==="scale"){var g={effect:c.closeEffect,percent:0,duration:c.closeEffectDuration}}else{var g={effect:c.closeEffect,duration:c.closeEffectDuration}}var h=a('<div id="myModal"></div>').load(c.ajaxFormUrl).dialog({autoOpen:false,modal:true,show:f,hide:g,close:function(){h.remove()},width:c.dialogWidth,height:c.dialogHeight,title:c.dialogTitle});h.dialog("open");return false});a("form#"+c.formID).live("submit",function(){formData=a(this).serialize();a.ajax({type:"GET",dataType:"json",url:c.ajaxFormValidationUrl,data:formData,success:d});return false});function d(f){if(f.validformsubmission==0){a(".modalError").hide();a("label").removeClass();a("form#"+c.formID).hide();a("#modalFeedback").hide().fadeIn("slow").html(c.successMessage);setTimeout('$("#myModal").dialog("close")',c.timeOutLength)}else{a("#modalFeedback").fadeIn("slow").html(c.errorMessage);a(".modalError").hide();a("label").removeClass();for(var g in f){if(f.hasOwnProperty(g)){a("form#"+c.formID+" :input#"+g).prev("label").addClass("alert").append("<span class='modalError'>"+f[g]+"</span>");if(f.databaseCheck){a("#modalFeedback").fadeIn("slow").html(f.databaseCheck)}}}}}a("form#"+c.formID+" input[type='reset']").live("click",function(){a("#modalFeedback").fadeOut("slow");a(".modalError").hide();a("label").removeClass()})})};a.fn.jqueryMyModaluiDialog.defaults={ajaxFormUrl:"/testsite_oo_html5_new/ajax/form_feedbackJQUERYUI.php",dialogTitle:"Please leave us some feedback!",dialogWidth:500,dialogHeight:470,openEffect:"scale",closeEffect:"fade",openEffectDuration:"1500",closeEffectDuration:"5500",timeOutLength:"2000",formID:"feedbackForm",ajaxFormValidationUrl:"/testsite_oo_html5_new/ajax/form_validationJQUERYUI.php",successMessage:"Many thanks for leaving feedback!",errorMessage:"There are errors in the submission of your form, please amend"}
})(jQuery);(function(b){b.fn.ajaxSubmit=function(u){if(!this.length){a("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof u=="function"){u={success:u}}var h=this.attr("action");var d=(typeof h==="string")?b.trim(h):"";if(d){d=(d.match(/^([^#]+)/)||[])[1]}d=d||window.location.href||"";u=b.extend(true,{url:d,success:b.ajaxSettings.success,type:this[0].getAttribute("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},u);var w={};this.trigger("form-pre-serialize",[this,u,w]);if(w.veto){a("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(u.beforeSerialize&&u.beforeSerialize(this,u)===false){a("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var f,r,m=this.formToArray(u.semantic);if(u.data){u.extraData=u.data;for(f in u.data){if(u.data[f] instanceof Array){for(var i in u.data[f]){m.push({name:f,value:u.data[f][i]})}}else{r=u.data[f];r=b.isFunction(r)?r():r;m.push({name:f,value:r})}}}if(u.beforeSubmit&&u.beforeSubmit(m,this,u)===false){a("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[m,this,u,w]);if(w.veto){a("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var c=b.param(m);if(u.type.toUpperCase()=="GET"){u.url+=(u.url.indexOf("?")>=0?"&":"?")+c;u.data=null}else{u.data=c}var t=this,l=[];if(u.resetForm){l.push(function(){t.resetForm()})}if(u.clearForm){l.push(function(){t.clearForm()})}if(!u.dataType&&u.target){var s=u.success||function(){};l.push(function(n){var k=u.replaceTarget?"replaceWith":"html";b(u.target)[k](n).each(s,arguments)})}else{if(u.success){l.push(u.success)}}u.success=function(x,n,y){var v=u.context||u;for(var q=0,k=l.length;q<k;q++){l[q].apply(v,[x,n,y||t,t])}};var g=b("input:file",this).length>0;var e="multipart/form-data";var j=(t.attr("enctype")==e||t.attr("encoding")==e);if(u.iframe!==false&&(g||u.iframe||j)){if(u.closeKeepAlive){b.get(u.closeKeepAlive,o)}else{o()}}else{b.ajax(u)}this.trigger("form-submit-notify",[this,u]);return this;function o(){var v=t[0];if(b(":input[name=submit],:input[id=submit]",v).length){alert('Error: Form elements must not have name or id of "submit".');return}var E=b.extend(true,{},b.ajaxSettings,u);E.context=E.context||E;var H="jqFormIO"+(new Date().getTime()),B="_"+H;var y=b('<iframe id="'+H+'" name="'+H+'" src="'+E.iframeSrc+'" />');var C=y[0];y.css({position:"absolute",top:"-1000px",left:"-1000px"});var z={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(n){var P=(n==="timeout"?"timeout":"aborted");a("aborting upload... "+P);this.aborted=1;y.attr("src",E.iframeSrc);z.error=P;E.error&&E.error.call(E.context,z,P,P);L&&b.event.trigger("ajaxError",[z,E,P]);E.complete&&E.complete.call(E.context,z,P)}};var L=E.global;if(L&&!b.active++){b.event.trigger("ajaxStart")}if(L){b.event.trigger("ajaxSend",[z,E])}if(E.beforeSend&&E.beforeSend.call(E.context,z,E)===false){if(E.global){b.active--}return}if(z.aborted){return}var K=0,D;var A=v.clk;if(A){var I=A.name;if(I&&!A.disabled){E.extraData=E.extraData||{};E.extraData[I]=A.value;if(A.type=="image"){E.extraData[I+".x"]=v.clk_x;E.extraData[I+".y"]=v.clk_y}}}function J(){var R=t.attr("target"),P=t.attr("action");v.setAttribute("target",H);if(v.getAttribute("method")!="POST"){v.setAttribute("method","POST")}if(v.getAttribute("action")!=E.url){v.setAttribute("action",E.url)}if(!E.skipEncodingOverride){t.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(E.timeout){D=setTimeout(function(){K=true;G(true)},E.timeout)}var Q=[];try{if(E.extraData){for(var S in E.extraData){Q.push(b('<input type="hidden" name="'+S+'" value="'+E.extraData[S]+'" />').appendTo(v)[0])}}y.appendTo("body");C.attachEvent?C.attachEvent("onload",G):C.addEventListener("load",G,false);v.submit()}finally{v.setAttribute("action",P);
if(R){v.setAttribute("target",R)}else{t.removeAttr("target")}b(Q).remove()}}if(E.forceSync){J()}else{setTimeout(J,10)}var N,O,M=50,x;function G(U){if(z.aborted||x){return}if(U===true&&z){z.abort("timeout");return}var T=C.contentWindow?C.contentWindow.document:C.contentDocument?C.contentDocument:C.document;if(!T||T.location.href==E.iframeSrc){if(!K){return}}C.detachEvent?C.detachEvent("onload",G):C.removeEventListener("load",G,false);var Q=true;try{if(K){throw"timeout"}var V=E.dataType=="xml"||T.XMLDocument||b.isXMLDoc(T);a("isXml="+V);if(!V&&window.opera&&(T.body==null||T.body.innerHTML=="")){if(--M){a("requeing onLoad callback, DOM not available");setTimeout(G,250);return}}z.responseText=T.body?T.body.innerHTML:T.documentElement?T.documentElement.innerHTML:null;z.responseXML=T.XMLDocument?T.XMLDocument:T;if(V){E.dataType="xml"}z.getResponseHeader=function(X){var W={"content-type":E.dataType};return W[X]};var S=/(json|script|text)/.test(E.dataType);if(S||E.textarea){var P=T.getElementsByTagName("textarea")[0];if(P){z.responseText=P.value}else{if(S){var R=T.getElementsByTagName("pre")[0];var n=T.getElementsByTagName("body")[0];if(R){z.responseText=R.textContent}else{if(n){z.responseText=n.innerHTML}}}}}else{if(E.dataType=="xml"&&!z.responseXML&&z.responseText!=null){z.responseXML=F(z.responseText)}}N=k(z,E.dataType,E)}catch(U){a("error caught:",U);Q=false;z.error=U;E.error&&E.error.call(E.context,z,"error",U);L&&b.event.trigger("ajaxError",[z,E,U])}if(z.aborted){a("upload aborted");Q=false}if(Q){E.success&&E.success.call(E.context,N,"success",z);L&&b.event.trigger("ajaxSuccess",[z,E])}L&&b.event.trigger("ajaxComplete",[z,E]);if(L&&!--b.active){b.event.trigger("ajaxStop")}E.complete&&E.complete.call(E.context,z,Q?"success":"error");x=true;if(E.timeout){clearTimeout(D)}setTimeout(function(){y.removeData("form-plugin-onload");y.remove();z.responseXML=null},100)}var F=b.parseXML||function(n,P){if(window.ActiveXObject){P=new ActiveXObject("Microsoft.XMLDOM");P.async="false";P.loadXML(n)}else{P=(new DOMParser()).parseFromString(n,"text/xml")}return(P&&P.documentElement&&P.documentElement.nodeName!="parsererror")?P:null};var q=b.parseJSON||function(n){return window["eval"]("("+n+")")};var k=function(T,R,Q){var P=T.getResponseHeader("content-type")||"",n=R==="xml"||!R&&P.indexOf("xml")>=0,S=n?T.responseXML:T.responseText;if(n&&S.documentElement.nodeName==="parsererror"){b.error&&b.error("parsererror")}if(Q&&Q.dataFilter){S=Q.dataFilter(S,R)}if(typeof S==="string"){if(R==="json"||!R&&P.indexOf("json")>=0){S=q(S)}else{if(R==="script"||!R&&P.indexOf("javascript")>=0){b.globalEval(S)}}}return S}}};b.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};if(!b.isReady&&d.s){a("DOM not ready, queuing ajaxForm");b(function(){b(d.s,d.c).ajaxForm(c)});return this}a("terminating; zero elements found by selector"+(b.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(f){if(!f.isDefaultPrevented()){f.preventDefault();b(this).ajaxSubmit(c)}}).bind("click.form-plugin",function(j){var i=j.target;var g=b(i);if(!(g.is(":submit,input:image"))){var f=g.closest(":submit");if(f.length==0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!=undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof b.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)})};b.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};b.fn.formToArray=function(r){var q=[];if(this.length===0){return q}var d=this[0];var g=r?d.getElementsByTagName("*"):d.elements;if(!g){return q}var k,h,f,s,e,m,c;for(k=0,m=g.length;k<m;k++){e=g[k];f=e.name;if(!f){continue}if(r&&d.clk&&e.type=="image"){if(!e.disabled&&d.clk==e){q.push({name:f,value:b(e).val()});q.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})
}continue}s=b.fieldValue(e,true);if(s&&s.constructor==Array){for(h=0,c=s.length;h<c;h++){q.push({name:f,value:s[h]})}}else{if(s!==null&&typeof s!="undefined"){q.push({name:f,value:s})}}}if(!r&&d.clk){var l=b(d.clk),o=l[0];f=o.name;if(f&&!o.disabled&&o.type=="image"){q.push({name:f,value:l.val()});q.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}}return q};b.fn.formSerialize=function(c){return b.param(this.formToArray(c))};b.fn.fieldSerialize=function(d){var c=[];this.each(function(){var h=this.name;if(!h){return}var f=b.fieldValue(this,d);if(f&&f.constructor==Array){for(var g=0,e=f.length;g<e;g++){c.push({name:h,value:f[g]})}}else{if(f!==null&&typeof f!="undefined"){c.push({name:this.name,value:f})}}});return b.param(c)};b.fn.fieldValue=function(h){for(var g=[],e=0,c=this.length;e<c;e++){var f=this[e];var d=b.fieldValue(f,h);if(d===null||typeof d=="undefined"||(d.constructor==Array&&!d.length)){continue}d.constructor==Array?b.merge(g,d):g.push(d)}return g};b.fieldValue=function(c,j){var e=c.name,q=c.type,r=c.tagName.toLowerCase();if(j===undefined){j=true}if(j&&(!e||c.disabled||q=="reset"||q=="button"||(q=="checkbox"||q=="radio")&&!c.checked||(q=="submit"||q=="image")&&c.form&&c.form.clk!=c||r=="select"&&c.selectedIndex==-1)){return null}if(r=="select"){var k=c.selectedIndex;if(k<0){return null}var m=[],d=c.options;var g=(q=="select-one");var l=(g?k+1:d.length);for(var f=(g?k:0);f<l;f++){var h=d[f];if(h.selected){var o=h.value;if(!o){o=(h.attributes&&h.attributes.value&&!(h.attributes.value.specified))?h.text:h.value}if(g){return o}m.push(o)}}return m}return b(c).val()};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var d=this.type,c=this.tagName.toLowerCase();if(d=="text"||d=="password"||c=="textarea"){this.value=""}else{if(d=="checkbox"||d=="radio"){this.checked=false}else{if(c=="select"){this.selectedIndex=-1}}}})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};b.fn.enable=function(c){if(c===undefined){c=true}return this.each(function(){this.disabled=!c})};b.fn.selected=function(c){if(c===undefined){c=true}return this.each(function(){var d=this.type;if(d=="checkbox"||d=="radio"){this.checked=c}else{if(this.tagName.toLowerCase()=="option"){var e=b(this).parent("select");if(c&&e[0]&&e[0].type=="select-one"){e.find("option").selected(false)}this.selected=c}}})};function a(){if(b.fn.ajaxSubmit.debug){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(c)}else{if(window.opera&&window.opera.postError){window.opera.postError(c)}}}}})(jQuery);(function(i){var l="2.99";if(i.support==undefined){i.support={opacity:!(i.browser.msie)}}function a(r){i.fn.cycle.debug&&f(r)}function f(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}i.expr[":"].paused=function(r){return r.cyclePause};i.fn.cycle=function(s,r){var t={s:this.selector,c:this.context};if(this.length===0&&s!="stop"){if(!i.isReady&&t.s){f("DOM not ready, queuing slideshow");i(function(){i(t.s,t.c).cycle(s,r)});return this}f("terminating; zero elements found by selector"+(i.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var x=m(this,s,r);if(x===false){return}x.updateActivePagerLink=x.updateActivePagerLink||i.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var y=i(this);var z=x.slideExpr?i(x.slideExpr,this):y.children();var v=z.get();if(v.length<2){f("terminating; too few slides: "+v.length);return}var u=k(y,z,v,x,t);if(u===false){return}var w=u.continuous?10:h(v[u.currSlide],v[u.nextSlide],u,!u.backwards);if(w){w+=(u.delay||0);if(w<10){w=10}a("first timeout: "+w);this.cycleTimeout=setTimeout(function(){e(v,u,0,!x.backwards)
},w)}})};function m(r,u,s){if(r.cycleStop==undefined){r.cycleStop=0}if(u===undefined||u===null){u={}}if(u.constructor==String){switch(u){case"destroy":case"stop":var w=i(r).data("cycle.opts");if(!w){return false}r.cycleStop++;if(r.cycleTimeout){clearTimeout(r.cycleTimeout)}r.cycleTimeout=0;i(r).removeData("cycle.opts");if(u=="destroy"){q(w)}return false;case"toggle":r.cyclePause=(r.cyclePause===1)?0:1;v(r.cyclePause,s,r);return false;case"pause":r.cyclePause=1;return false;case"resume":r.cyclePause=0;v(false,s,r);return false;case"prev":case"next":var w=i(r).data("cycle.opts");if(!w){f('options not found, "prev/next" ignored');return false}i.fn.cycle[u](w);return false;default:u={fx:u}}return u}else{if(u.constructor==Number){var t=u;u=i(r).data("cycle.opts");if(!u){f("options not found, can not advance slide");return false}if(t<0||t>=u.elements.length){f("invalid slide index: "+t);return false}u.nextSlide=t;if(r.cycleTimeout){clearTimeout(r.cycleTimeout);r.cycleTimeout=0}if(typeof s=="string"){u.oneTimeFx=s}e(u.elements,u,1,t>=u.currSlide);return false}}return u;function v(y,z,x){if(!y&&z===true){var A=i(x).data("cycle.opts");if(!A){f("options not found, can not resume");return false}if(x.cycleTimeout){clearTimeout(x.cycleTimeout);x.cycleTimeout=0}e(A.elements,A,1,!A.backwards)}}}function b(r,s){if(!i.support.opacity&&s.cleartype&&r.style.filter){try{r.style.removeAttribute("filter")}catch(t){}}}function q(r){if(r.next){i(r.next).unbind(r.prevNextEvent)}if(r.prev){i(r.prev).unbind(r.prevNextEvent)}if(r.pager||r.pagerAnchorBuilder){i.each(r.pagerAnchors||[],function(){this.unbind().remove()})}r.pagerAnchors=null;if(r.destroy){r.destroy(r)}}function k(z,L,v,u,F){var D=i.extend({},i.fn.cycle.defaults,u||{},i.metadata?z.metadata():i.meta?z.data():{});if(D.autostop){D.countdown=D.autostopCount||v.length}var s=z[0];z.data("cycle.opts",D);D.$cont=z;D.stopCount=s.cycleStop;D.elements=v;D.before=D.before?[D.before]:[];D.after=D.after?[D.after]:[];if(!i.support.opacity&&D.cleartype){D.after.push(function(){b(this,D)})}if(D.continuous){D.after.push(function(){e(v,D,0,!D.backwards)})}n(D);if(!i.support.opacity&&D.cleartype&&!D.cleartypeNoBg){g(L)}if(z.css("position")=="static"){z.css("position","relative")}if(D.width){z.width(D.width)}if(D.height&&D.height!="auto"){z.height(D.height)}if(D.startingSlide){D.startingSlide=parseInt(D.startingSlide)}else{if(D.backwards){D.startingSlide=v.length-1}}if(D.random){D.randomMap=[];for(var J=0;J<v.length;J++){D.randomMap.push(J)}D.randomMap.sort(function(N,w){return Math.random()-0.5});D.randomIndex=1;D.startingSlide=D.randomMap[1]}else{if(D.startingSlide>=v.length){D.startingSlide=0}}D.currSlide=D.startingSlide||0;var y=D.startingSlide;L.css({position:"absolute",top:0,left:0}).hide().each(function(w){var N;if(D.backwards){N=y?w<=y?v.length+(w-y):y-w:v.length-w}else{N=y?w>=y?v.length-(w-y):y-w:v.length-w}i(this).css("z-index",N)});i(v[y]).css("opacity",1).show();b(v[y],D);if(D.fit&&D.width){L.width(D.width)}if(D.fit&&D.height&&D.height!="auto"){L.height(D.height)}var E=D.containerResize&&!z.innerHeight();if(E){var x=0,C=0;for(var H=0;H<v.length;H++){var r=i(v[H]),M=r[0],B=r.outerWidth(),K=r.outerHeight();if(!B){B=M.offsetWidth||M.width||r.attr("width")}if(!K){K=M.offsetHeight||M.height||r.attr("height")}x=B>x?B:x;C=K>C?K:C}if(x>0&&C>0){z.css({width:x+"px",height:C+"px"})}}if(D.pause){z.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(c(D)===false){return false}var t=false;u.requeueAttempts=u.requeueAttempts||0;L.each(function(){var P=i(this);this.cycleH=(D.fit&&D.height)?D.height:(P.height()||this.offsetHeight||this.height||P.attr("height")||0);this.cycleW=(D.fit&&D.width)?D.width:(P.width()||this.offsetWidth||this.width||P.attr("width")||0);if(P.is("img")){var N=(i.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var Q=(i.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var O=(i.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);
var w=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(N||Q||O||w){if(F.s&&D.requeueOnImageNotLoaded&&++u.requeueAttempts<100){f(u.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){i(F.s,F.c).cycle(u)},D.requeueTimeout);t=true;return false}else{f("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(t){return false}D.cssBefore=D.cssBefore||{};D.cssAfter=D.cssAfter||{};D.cssFirst=D.cssFirst||{};D.animIn=D.animIn||{};D.animOut=D.animOut||{};L.not(":eq("+y+")").css(D.cssBefore);i(L[y]).css(D.cssFirst);if(D.timeout){D.timeout=parseInt(D.timeout);if(D.speed.constructor==String){D.speed=i.fx.speeds[D.speed]||parseInt(D.speed)}if(!D.sync){D.speed=D.speed/2}var G=D.fx=="none"?0:D.fx=="shuffle"?500:250;while((D.timeout-D.speed)<G){D.timeout+=D.speed}}if(D.easing){D.easeIn=D.easeOut=D.easing}if(!D.speedIn){D.speedIn=D.speed}if(!D.speedOut){D.speedOut=D.speed}D.slideCount=v.length;D.currSlide=D.lastSlide=y;if(D.random){if(++D.randomIndex==v.length){D.randomIndex=0}D.nextSlide=D.randomMap[D.randomIndex]}else{if(D.backwards){D.nextSlide=D.startingSlide==0?(v.length-1):D.startingSlide-1}else{D.nextSlide=D.startingSlide>=(v.length-1)?0:D.startingSlide+1}}if(!D.multiFx){var I=i.fn.cycle.transitions[D.fx];if(i.isFunction(I)){I(z,L,D)}else{if(D.fx!="custom"&&!D.multiFx){f("unknown transition: "+D.fx,"; slideshow terminating");return false}}}var A=L[y];if(D.before.length){D.before[0].apply(A,[A,A,D,true])}if(D.after.length){D.after[0].apply(A,[A,A,D,true])}if(D.next){i(D.next).bind(D.prevNextEvent,function(){return o(D,1)})}if(D.prev){i(D.prev).bind(D.prevNextEvent,function(){return o(D,0)})}if(D.pager||D.pagerAnchorBuilder){d(v,D)}j(D,v);return D}function n(r){r.original={before:[],after:[]};r.original.cssBefore=i.extend({},r.cssBefore);r.original.cssAfter=i.extend({},r.cssAfter);r.original.animIn=i.extend({},r.animIn);r.original.animOut=i.extend({},r.animOut);i.each(r.before,function(){r.original.before.push(this)});i.each(r.after,function(){r.original.after.push(this)})}function c(x){var v,t,s=i.fn.cycle.transitions;if(x.fx.indexOf(",")>0){x.multiFx=true;x.fxs=x.fx.replace(/\s*/g,"").split(",");for(v=0;v<x.fxs.length;v++){var w=x.fxs[v];t=s[w];if(!t||!s.hasOwnProperty(w)||!i.isFunction(t)){f("discarding unknown transition: ",w);x.fxs.splice(v,1);v--}}if(!x.fxs.length){f("No valid transitions named; slideshow terminating.");return false}}else{if(x.fx=="all"){x.multiFx=true;x.fxs=[];for(p in s){t=s[p];if(s.hasOwnProperty(p)&&i.isFunction(t)){x.fxs.push(p)}}}}if(x.multiFx&&x.randomizeEffects){var u=Math.floor(Math.random()*20)+30;for(v=0;v<u;v++){var r=Math.floor(Math.random()*x.fxs.length);x.fxs.push(x.fxs.splice(r,1)[0])}a("randomized fx sequence: ",x.fxs)}return true}function j(s,r){s.addSlide=function(u,v){var t=i(u),w=t[0];if(!s.autostopCount){s.countdown++}r[v?"unshift":"push"](w);if(s.els){s.els[v?"unshift":"push"](w)}s.slideCount=r.length;t.css("position","absolute");t[v?"prependTo":"appendTo"](s.$cont);if(v){s.currSlide++;s.nextSlide++}if(!i.support.opacity&&s.cleartype&&!s.cleartypeNoBg){g(t)}if(s.fit&&s.width){t.width(s.width)}if(s.fit&&s.height&&s.height!="auto"){t.height(s.height)}w.cycleH=(s.fit&&s.height)?s.height:t.height();w.cycleW=(s.fit&&s.width)?s.width:t.width();t.css(s.cssBefore);if(s.pager||s.pagerAnchorBuilder){i.fn.cycle.createPagerAnchor(r.length-1,w,i(s.pager),r,s)}if(i.isFunction(s.onAddSlide)){s.onAddSlide(t)}else{t.hide()}}}i.fn.cycle.resetState=function(s,r){r=r||s.fx;s.before=[];s.after=[];s.cssBefore=i.extend({},s.original.cssBefore);s.cssAfter=i.extend({},s.original.cssAfter);s.animIn=i.extend({},s.original.animIn);s.animOut=i.extend({},s.original.animOut);s.fxFn=null;i.each(s.original.before,function(){s.before.push(this)});i.each(s.original.after,function(){s.after.push(this)});var t=i.fn.cycle.transitions[r];if(i.isFunction(t)){t(s.$cont,i(s.elements),s)}};function e(y,r,x,A){if(x&&r.busy&&r.manualTrump){a("manualTrump in go(), stopping active transition");
i(y).stop(true,true);r.busy=0}if(r.busy){a("transition active, ignoring new tx request");return}var v=r.$cont[0],C=y[r.currSlide],B=y[r.nextSlide];if(v.cycleStop!=r.stopCount||v.cycleTimeout===0&&!x){return}if(!x&&!v.cyclePause&&!r.bounce&&((r.autostop&&(--r.countdown<=0))||(r.nowrap&&!r.random&&r.nextSlide<r.currSlide))){if(r.end){r.end(r)}return}var z=false;if((x||!v.cyclePause)&&(r.nextSlide!=r.currSlide)){z=true;var w=r.fx;C.cycleH=C.cycleH||i(C).height();C.cycleW=C.cycleW||i(C).width();B.cycleH=B.cycleH||i(B).height();B.cycleW=B.cycleW||i(B).width();if(r.multiFx){if(r.lastFx==undefined||++r.lastFx>=r.fxs.length){r.lastFx=0}w=r.fxs[r.lastFx];r.currFx=w}if(r.oneTimeFx){w=r.oneTimeFx;r.oneTimeFx=null}i.fn.cycle.resetState(r,w);if(r.before.length){i.each(r.before,function(D,E){if(v.cycleStop!=r.stopCount){return}E.apply(B,[C,B,r,A])})}var t=function(){r.busy=0;i.each(r.after,function(D,E){if(v.cycleStop!=r.stopCount){return}E.apply(B,[C,B,r,A])})};a("tx firing("+w+"); currSlide: "+r.currSlide+"; nextSlide: "+r.nextSlide);r.busy=1;if(r.fxFn){r.fxFn(C,B,r,t,A,x&&r.fastOnEvent)}else{if(i.isFunction(i.fn.cycle[r.fx])){i.fn.cycle[r.fx](C,B,r,t,A,x&&r.fastOnEvent)}else{i.fn.cycle.custom(C,B,r,t,A,x&&r.fastOnEvent)}}}if(z||r.nextSlide==r.currSlide){r.lastSlide=r.currSlide;if(r.random){r.currSlide=r.nextSlide;if(++r.randomIndex==y.length){r.randomIndex=0}r.nextSlide=r.randomMap[r.randomIndex];if(r.nextSlide==r.currSlide){r.nextSlide=(r.currSlide==r.slideCount-1)?0:r.currSlide+1}}else{if(r.backwards){var u=(r.nextSlide-1)<0;if(u&&r.bounce){r.backwards=!r.backwards;r.nextSlide=1;r.currSlide=0}else{r.nextSlide=u?(y.length-1):r.nextSlide-1;r.currSlide=u?0:r.nextSlide+1}}else{var u=(r.nextSlide+1)==y.length;if(u&&r.bounce){r.backwards=!r.backwards;r.nextSlide=y.length-2;r.currSlide=y.length-1}else{r.nextSlide=u?0:r.nextSlide+1;r.currSlide=u?y.length-1:r.nextSlide-1}}}}if(z&&r.pager){r.updateActivePagerLink(r.pager,r.currSlide,r.activePagerClass)}var s=0;if(r.timeout&&!r.continuous){s=h(y[r.currSlide],y[r.nextSlide],r,A)}else{if(r.continuous&&v.cyclePause){s=10}}if(s>0){v.cycleTimeout=setTimeout(function(){e(y,r,0,!r.backwards)},s)}}i.fn.cycle.updateActivePagerLink=function(r,t,s){i(r).each(function(){i(this).children().removeClass(s).eq(t).addClass(s)})};function h(w,u,v,s){if(v.timeoutFn){var r=v.timeoutFn.call(w,w,u,v,s);while(v.fx!="none"&&(r-v.speed)<250){r+=v.speed}a("calculated timeout: "+r+"; speed: "+v.speed);if(r!==false){return r}}return v.timeout}i.fn.cycle.next=function(r){o(r,1)};i.fn.cycle.prev=function(r){o(r,0)};function o(u,t){var x=t?1:-1;var s=u.elements;var w=u.$cont[0],v=w.cycleTimeout;if(v){clearTimeout(v);w.cycleTimeout=0}if(u.random&&x<0){u.randomIndex--;if(--u.randomIndex==-2){u.randomIndex=s.length-2}else{if(u.randomIndex==-1){u.randomIndex=s.length-1}}u.nextSlide=u.randomMap[u.randomIndex]}else{if(u.random){u.nextSlide=u.randomMap[u.randomIndex]}else{u.nextSlide=u.currSlide+x;if(u.nextSlide<0){if(u.nowrap){return false}u.nextSlide=s.length-1}else{if(u.nextSlide>=s.length){if(u.nowrap){return false}u.nextSlide=0}}}}var r=u.onPrevNextEvent||u.prevNextClick;if(i.isFunction(r)){r(x>0,u.nextSlide,s[u.nextSlide])}e(s,u,1,t);return false}function d(s,t){var r=i(t.pager);i.each(s,function(u,v){i.fn.cycle.createPagerAnchor(u,v,r,s,t)});t.updateActivePagerLink(t.pager,t.startingSlide,t.activePagerClass)}i.fn.cycle.createPagerAnchor=function(v,w,t,u,x){var s;if(i.isFunction(x.pagerAnchorBuilder)){s=x.pagerAnchorBuilder(v,w);a("pagerAnchorBuilder("+v+", el) returned: "+s)}else{s='<a href="#">'+(v+1)+"</a>"}if(!s){return}var y=i(s);if(y.parents("body").length===0){var r=[];if(t.length>1){t.each(function(){var z=y.clone(true);i(this).append(z);r.push(z[0])});y=i(r)}else{y.appendTo(t)}}x.pagerAnchors=x.pagerAnchors||[];x.pagerAnchors.push(y);y.bind(x.pagerEvent,function(C){C.preventDefault();x.nextSlide=v;var B=x.$cont[0],A=B.cycleTimeout;if(A){clearTimeout(A);B.cycleTimeout=0}var z=x.onPagerEvent||x.pagerClick;if(i.isFunction(z)){z(x.nextSlide,u[x.nextSlide])
}e(u,x,1,x.currSlide<v)});if(!/^click/.test(x.pagerEvent)&&!x.allowPagerClickBubble){y.bind("click.cycle",function(){return false})}if(x.pauseOnPagerHover){y.hover(function(){x.$cont[0].cyclePause++},function(){x.$cont[0].cyclePause--})}};i.fn.cycle.hopsFromLast=function(u,t){var s,r=u.lastSlide,v=u.currSlide;if(t){s=v>r?v-r:u.slideCount-r}else{s=v<r?r-v:r+u.slideCount-v}return s};function g(t){a("applying clearType background-color hack");function s(u){u=parseInt(u).toString(16);return u.length<2?"0"+u:u}function r(x){for(;x&&x.nodeName.toLowerCase()!="html";x=x.parentNode){var u=i.css(x,"background-color");if(u&&u.indexOf("rgb")>=0){var w=u.match(/\d+/g);return"#"+s(w[0])+s(w[1])+s(w[2])}if(u&&u!="transparent"){return u}}return"#ffffff"}t.each(function(){i(this).css("background-color",r(this))})}i.fn.cycle.commonReset=function(x,u,v,s,t,r){i(v.elements).not(x).hide();if(typeof v.cssBefore.opacity=="undefined"){v.cssBefore.opacity=1}v.cssBefore.display="block";if(v.slideResize&&s!==false&&u.cycleW>0){v.cssBefore.width=u.cycleW}if(v.slideResize&&t!==false&&u.cycleH>0){v.cssBefore.height=u.cycleH}v.cssAfter=v.cssAfter||{};v.cssAfter.display="none";i(x).css("zIndex",v.slideCount+(r===true?1:0));i(u).css("zIndex",v.slideCount+(r===true?0:1))};i.fn.cycle.custom=function(D,x,r,u,w,s){var C=i(D),y=i(x);var t=r.speedIn,B=r.speedOut,v=r.easeIn,A=r.easeOut;y.css(r.cssBefore);if(s){if(typeof s=="number"){t=B=s}else{t=B=1}v=A=null}var z=function(){y.animate(r.animIn,t,v,function(){u()})};C.animate(r.animOut,B,A,function(){C.css(r.cssAfter);if(!r.sync){z()}});if(r.sync){z()}};i.fn.cycle.transitions={fade:function(s,t,r){t.not(":eq("+r.currSlide+")").css("opacity",0);r.before.push(function(w,u,v){i.fn.cycle.commonReset(w,u,v);v.cssBefore.opacity=0});r.animIn={opacity:1};r.animOut={opacity:0};r.cssBefore={top:0,left:0}}};i.fn.cycle.ver=function(){return l};i.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,autostop:0,autostopCount:0,backwards:false,before:null,cleartype:!i.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null}})(jQuery);(function(a){a.fn.cycle.transitions.none=function(c,d,b){b.fxFn=function(g,e,f,h){a(e).show();a(g).hide();h()}};a.fn.cycle.transitions.fadeout=function(c,d,b){d.not(":eq("+b.currSlide+")").css({display:"block",opacity:1});b.before.push(function(k,i,j,f,g,e){a(k).css("zIndex",j.slideCount+(!e===true?1:0));a(i).css("zIndex",j.slideCount+(!e===true?0:1))});b.animIn.opacity=1;b.animOut.opacity=0;b.cssBefore.opacity=1;b.cssBefore.display="block";b.cssAfter.zIndex=0};a.fn.cycle.transitions.scrollUp=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssBefore.top=b;c.cssBefore.left=0;c.cssFirst.top=0;c.animIn.top=0;c.animOut.top=-b};a.fn.cycle.transitions.scrollDown=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssFirst.top=0;c.cssBefore.top=-b;c.cssBefore.left=0;c.animIn.top=0;c.animOut.top=b};a.fn.cycle.transitions.scrollLeft=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst.left=0;c.cssBefore.left=b;c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=0-b};a.fn.cycle.transitions.scrollRight=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst.left=0;c.cssBefore.left=-b;
c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=b};a.fn.cycle.transitions.scrollHorz=function(c,d,b){c.css("overflow","hidden").width();b.before.push(function(h,f,g,e){if(g.rev){e=!e}a.fn.cycle.commonReset(h,f,g);g.cssBefore.left=e?(f.cycleW-1):(1-f.cycleW);g.animOut.left=e?-h.cycleW:h.cycleW});b.cssFirst.left=0;b.cssBefore.top=0;b.animIn.left=0;b.animOut.top=0};a.fn.cycle.transitions.scrollVert=function(c,d,b){c.css("overflow","hidden");b.before.push(function(h,f,g,e){if(g.rev){e=!e}a.fn.cycle.commonReset(h,f,g);g.cssBefore.top=e?(1-f.cycleH):(f.cycleH-1);g.animOut.top=e?h.cycleH:-h.cycleH});b.cssFirst.top=0;b.cssBefore.left=0;b.animIn.top=0;b.animOut.left=0};a.fn.cycle.transitions.slideX=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.width="show";b.animOut.width=0};a.fn.cycle.transitions.slideY=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animIn.height="show";b.animOut.height=0};a.fn.cycle.transitions.shuffle=function(e,f,d){var c,b=e.css("overflow","visible").width();f.css({left:0,top:0});d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h,true,true,true)});if(!d.speedAdjusted){d.speed=d.speed/2;d.speedAdjusted=true}d.random=0;d.shuffle=d.shuffle||{left:-b,top:15};d.els=[];for(c=0;c<f.length;c++){d.els.push(f[c])}for(c=0;c<d.currSlide;c++){d.els.push(d.els.shift())}d.fxFn=function(m,j,l,g,i){if(l.rev){i=!i}var h=i?a(m):a(j);a(j).css(l.cssBefore);var k=l.slideCount;h.animate(l.shuffle,l.speedIn,l.easeIn,function(){var o=a.fn.cycle.hopsFromLast(l,i);for(var q=0;q<o;q++){i?l.els.push(l.els.shift()):l.els.unshift(l.els.pop())}if(i){for(var r=0,n=l.els.length;r<n;r++){a(l.els[r]).css("z-index",n-r+k)}}else{var s=a(m).css("z-index");h.css("z-index",parseInt(s)+1+k)}h.animate({left:0,top:0},l.speedOut,l.easeOut,function(){a(i?this:m).hide();if(g){g()}})})};a.extend(d.cssBefore,{display:"block",opacity:1,top:0,left:0})};a.fn.cycle.transitions.turnUp=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=e.cycleH;f.animIn.height=e.cycleH;f.animOut.width=e.cycleW});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.height=0;b.animIn.top=0;b.animOut.height=0};a.fn.cycle.transitions.turnDown=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH;f.animOut.top=g.cycleH});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animOut.height=0};a.fn.cycle.transitions.turnLeft=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=e.cycleW;f.animIn.width=e.cycleW});b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.left=0;b.animOut.width=0};a.fn.cycle.transitions.turnRight=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW;f.animOut.left=g.cycleW});a.extend(b.cssBefore,{top:0,left:0,width:0});b.animIn.left=0;b.animOut.width=0};a.fn.cycle.transitions.zoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false,true);f.cssBefore.top=e.cycleH/2;f.cssBefore.left=e.cycleW/2;a.extend(f.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH});a.extend(f.animOut,{width:0,height:0,top:g.cycleH/2,left:g.cycleW/2})});b.cssFirst.top=0;b.cssFirst.left=0;b.cssBefore.width=0;b.cssBefore.height=0};a.fn.cycle.transitions.fadeZoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false);f.cssBefore.left=e.cycleW/2;f.cssBefore.top=e.cycleH/2;a.extend(f.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH})});b.cssBefore.width=0;b.cssBefore.height=0;b.animOut.opacity=0};a.fn.cycle.transitions.blindX=function(d,e,c){var b=d.css("overflow","hidden").width();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);
g.animIn.width=f.cycleW;g.animOut.left=h.cycleW});c.cssBefore.left=b;c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=b};a.fn.cycle.transitions.blindY=function(d,e,c){var b=d.css("overflow","hidden").height();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.height=f.cycleH;g.animOut.top=h.cycleH});c.cssBefore.top=b;c.cssBefore.left=0;c.animIn.top=0;c.animOut.top=b};a.fn.cycle.transitions.blindZ=function(e,f,d){var c=e.css("overflow","hidden").height();var b=e.width();d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h);h.animIn.height=g.cycleH;h.animOut.top=i.cycleH});d.cssBefore.top=c;d.cssBefore.left=b;d.animIn.top=0;d.animIn.left=0;d.animOut.top=c;d.animOut.left=b};a.fn.cycle.transitions.growX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=this.cycleW/2;f.animIn.left=0;f.animIn.width=this.cycleW;f.animOut.left=0});b.cssBefore.top=0;b.cssBefore.width=0};a.fn.cycle.transitions.growY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=this.cycleH/2;f.animIn.top=0;f.animIn.height=this.cycleH;f.animOut.top=0});b.cssBefore.height=0;b.cssBefore.left=0};a.fn.cycle.transitions.curtainX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true,true);f.cssBefore.left=e.cycleW/2;f.animIn.left=0;f.animIn.width=this.cycleW;f.animOut.left=g.cycleW/2;f.animOut.width=0});b.cssBefore.top=0;b.cssBefore.width=0};a.fn.cycle.transitions.curtainY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false,true);f.cssBefore.top=e.cycleH/2;f.animIn.top=0;f.animIn.height=e.cycleH;f.animOut.top=g.cycleH/2;f.animOut.height=0});b.cssBefore.height=0;b.cssBefore.left=0};a.fn.cycle.transitions.cover=function(f,g,e){var i=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(j,d,h){a.fn.cycle.commonReset(j,d,h);if(i=="right"){h.cssBefore.left=-b}else{if(i=="up"){h.cssBefore.top=c}else{if(i=="down"){h.cssBefore.top=-c}else{h.cssBefore.left=b}}}});e.animIn.left=0;e.animIn.top=0;e.cssBefore.top=0;e.cssBefore.left=0};a.fn.cycle.transitions.uncover=function(f,g,e){var i=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(j,d,h){a.fn.cycle.commonReset(j,d,h,true,true,true);if(i=="right"){h.animOut.left=b}else{if(i=="up"){h.animOut.top=-c}else{if(i=="down"){h.animOut.top=c}else{h.animOut.left=-b}}}});e.animIn.left=0;e.animIn.top=0;e.cssBefore.top=0;e.cssBefore.left=0};a.fn.cycle.transitions.toss=function(e,f,d){var b=e.css("overflow","visible").width();var c=e.height();d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h,true,true,true);if(!h.animOut.left&&!h.animOut.top){a.extend(h.animOut,{left:b*2,top:-c/2,opacity:0})}else{h.animOut.opacity=0}});d.cssBefore.left=0;d.cssBefore.top=0;d.animIn.left=0};a.fn.cycle.transitions.wipe=function(s,m,e){var q=s.css("overflow","hidden").width();var j=s.height();e.cssBefore=e.cssBefore||{};var g;if(e.clip){if(/l2r/.test(e.clip)){g="rect(0px 0px "+j+"px 0px)"}else{if(/r2l/.test(e.clip)){g="rect(0px "+q+"px "+j+"px "+q+"px)"}else{if(/t2b/.test(e.clip)){g="rect(0px "+q+"px 0px 0px)"}else{if(/b2t/.test(e.clip)){g="rect("+j+"px "+q+"px "+j+"px 0px)"}else{if(/zoom/.test(e.clip)){var o=parseInt(j/2);var f=parseInt(q/2);g="rect("+o+"px "+f+"px "+o+"px "+f+"px)"}}}}}}e.cssBefore.clip=e.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var k=e.cssBefore.clip.match(/(\d+)/g);var u=parseInt(k[0]),c=parseInt(k[1]),n=parseInt(k[2]),i=parseInt(k[3]);e.before.push(function(w,h,t){if(w==h){return}var d=a(w),b=a(h);a.fn.cycle.commonReset(w,h,t,true,true,false);t.cssAfter.display="block";var r=1,l=parseInt((t.speedIn/13))-1;(function v(){var y=u?u-parseInt(r*(u/l)):0;var z=i?i-parseInt(r*(i/l)):0;var A=n<j?n+parseInt(r*((j-n)/l||1)):j;var x=c<q?c+parseInt(r*((q-c)/l||1)):q;b.css({clip:"rect("+y+"px "+x+"px "+A+"px "+z+"px)"});(r++<=l)?setTimeout(v,13):d.css("display","none")
})()});a.extend(e.cssBefore,{display:"block",opacity:1,top:0,left:0});e.animIn={left:0};e.animOut={left:0}}})(jQuery);(function(a9,aK){var aR="none",aq="LoadedContent",a8=false,aP="resize.",aW="y",aU="auto",a6=true,ar="nofollow",aY="x";function a5(b,d){b=b?' id="'+a2+b+'"':"";d=d?' style="'+d+'"':"";return a9("<div"+b+d+"/>")}function aV(d,c){c=c===aY?aX.width():aX.height();return typeof d==="string"?Math.round(/%/.test(d)?c/100*parseInt(d,10):parseInt(d,10)):d}function ai(a){return ba.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function aI(b){for(var d in b){if(a9.isFunction(b[d])&&d.substring(0,2)!=="on"){b[d]=b[d].call(aZ)}}b.rel=b.rel||aZ.rel||ar;b.href=b.href||a9(aZ).attr("href");b.title=b.title||aZ.title;return b}function aO(d,b){b&&b.call(aZ);a9.event.trigger(d)}function aH(){var a,h=a2+"Slideshow_",i="click."+a2,g,d;if(ba.slideshow&&a3[1]){g=function(){ay.text(ba.slideshowStop).unbind(i).bind(ah,function(){if(a4<a3.length-1||ba.loop){a=setTimeout(a7.next,ba.slideshowSpeed)}}).bind(ag,function(){clearTimeout(a)}).one(i+" "+ap,d);a1.removeClass(h+"off").addClass(h+"on");a=setTimeout(a7.next,ba.slideshowSpeed)};d=function(){clearTimeout(a);ay.text(ba.slideshowStart).unbind([ah,ag,ap,i].join(" ")).one(i,g);a1.removeClass(h+"on").addClass(h+"off")};ba.slideshowAuto?g():d()}}function aF(b){if(!ao){aZ=b;ba=aI(a9.extend({},a9.data(aZ,aT)));a3=a9(aZ);a4=0;if(ba.rel!==ar){a3=a9("."+ax).filter(function(){return(a9.data(this,aT).rel||this.rel)===ba.rel});a4=a3.index(aZ);if(a4===-1){a3=a3.add(aZ);a4=a3.length-1}}if(!aQ){aQ=aA=a6;a1.show();if(ba.returnFocus){try{aZ.blur();a9(aZ).one(aa,function(){try{this.focus()}catch(c){}})}catch(a){}}aN.css({opacity:+ba.opacity,cursor:ba.overlayClose?"pointer":aU}).show();ba.w=aV(ba.initialWidth,aY);ba.h=aV(ba.initialHeight,aW);a7.position(0);af&&aX.bind(aP+an+" scroll."+an,function(){aN.css({width:aX.width(),height:aX.height(),top:aX.scrollTop(),left:aX.scrollLeft()})}).trigger("scroll."+an);aO(aJ,ba.onOpen);ae.add(aw).add(av).add(ay).add(ad).hide();aD.html(ba.close).show()}a7.load(a6)}}var aG={transition:"elastic",speed:300,width:a8,initialWidth:"600",innerWidth:a8,maxWidth:a8,height:a8,initialHeight:"450",innerHeight:a8,maxHeight:a8,scalePhotos:a6,scrolling:a6,inline:a8,html:a8,iframe:a8,photo:a8,href:a8,title:a8,rel:a8,opacity:0.9,preloading:a6,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:a8,returnFocus:a6,loop:a6,slideshow:a8,slideshowAuto:a6,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:a8,onLoad:a8,onComplete:a8,onCleanup:a8,onClosed:a8,overlayClose:a6,escKey:a6,arrowKey:a6},aT="colorbox",a2="cbox",aJ=a2+"_open",ag=a2+"_load",ah=a2+"_complete",ap=a2+"_cleanup",aa=a2+"_closed",am=a2+"_purge",ac=a2+"_loaded",az=a9.browser.msie&&!a9.support.opacity,af=az&&a9.browser.version<7,an=a2+"_IE6",aN,a1,aE,aS,bc,aj,al,ak,a3,aX,a0,au,at,ad,ae,ay,av,aw,aD,aC,aB,aM,aL,aZ,a4,ba,aQ,aA,ao=a8,a7,ax=a2+"Element";a7=a9.fn[aT]=a9[aT]=function(h,e){var b=this,g;if(!b[0]&&b.selector){return b}h=h||{};if(e){h.onComplete=e}if(!b[0]||b.selector===undefined){b=a9("<a/>");h.open=a6}b.each(function(){a9.data(this,aT,a9.extend({},a9.data(this,aT)||aG,h));a9(this).addClass(ax)});g=h.open;if(a9.isFunction(g)){g=g.call(b)}g&&aF(b[0]);return b};a7.init=function(){var b="hover",a="clear:left";aX=a9(aK);a1=a5().attr({id:aT,"class":az?a2+"IE":""});aN=a5("Overlay",af?"position:absolute":"").hide();aE=a5("Wrapper");aS=a5("Content").append(a0=a5(aq,"width:0; height:0; overflow:hidden"),at=a5("LoadingOverlay").add(a5("LoadingGraphic")),ad=a5("Title"),ae=a5("Current"),av=a5("Next"),aw=a5("Previous"),ay=a5("Slideshow").bind(aJ,aH),aD=a5("Close"));aE.append(a5().append(a5("TopLeft"),bc=a5("TopCenter"),a5("TopRight")),a5(a8,a).append(aj=a5("MiddleLeft"),aS,al=a5("MiddleRight")),a5(a8,a).append(a5("BottomLeft"),ak=a5("BottomCenter"),a5("BottomRight"))).children().children().css({"float":"left"});au=a5(a8,"position:absolute; width:9999px; visibility:hidden; display:none");
a9("body").prepend(aN,a1.append(aE,au));aS.children().hover(function(){a9(this).addClass(b)},function(){a9(this).removeClass(b)}).addClass(b);aC=bc.height()+ak.height()+aS.outerHeight(a6)-aS.height();aB=aj.width()+al.width()+aS.outerWidth(a6)-aS.width();aM=a0.outerHeight(a6);aL=a0.outerWidth(a6);a1.css({"padding-bottom":aC,"padding-right":aB}).hide();av.click(a7.next);aw.click(a7.prev);aD.click(a7.close);aS.children().removeClass(b);a9("."+ax).live("click",function(c){if(!(c.button!==0&&typeof c.button!=="undefined"||c.ctrlKey||c.shiftKey||c.altKey)){c.preventDefault();aF(this)}});aN.click(function(){ba.overlayClose&&a7.close()});a9(document).bind("keydown",function(c){if(aQ&&ba.escKey&&c.keyCode===27){c.preventDefault();a7.close()}if(aQ&&ba.arrowKey&&!aA&&a3[1]){if(c.keyCode===37&&(a4||ba.loop)){c.preventDefault();aw.click()}else{if(c.keyCode===39&&(a4<a3.length-1||ba.loop)){c.preventDefault();av.click()}}}})};a7.remove=function(){a1.add(aN).remove();a9("."+ax).die("click").removeData(aT).removeClass(ax)};a7.position=function(j,l){function a(b){bc[0].style.width=ak[0].style.width=aS[0].style.width=b.style.width;at[0].style.height=at[1].style.height=aS[0].style.height=aj[0].style.height=al[0].style.height=b.style.height}var k,c=Math.max(document.documentElement.clientHeight-ba.h-aM-aC,0)/2+aX.scrollTop(),i=Math.max(aX.width()-ba.w-aL-aB,0)/2+aX.scrollLeft();k=a1.width()===ba.w+aL&&a1.height()===ba.h+aM?0:j;aE[0].style.width=aE[0].style.height="9999px";a1.dequeue().animate({width:ba.w+aL,height:ba.h+aM,top:c,left:i},{duration:k,complete:function(){a(this);aA=a8;aE[0].style.width=ba.w+aL+aB+"px";aE[0].style.height=ba.h+aM+aC+"px";l&&l()},step:function(){a(this)}})};a7.resize=function(a){if(aQ){a=a||{};if(a.width){ba.w=aV(a.width,aY)-aL-aB}if(a.innerWidth){ba.w=aV(a.innerWidth,aY)}a0.css({width:ba.w});if(a.height){ba.h=aV(a.height,aW)-aM-aC}if(a.innerHeight){ba.h=aV(a.innerHeight,aW)}if(!a.innerHeight&&!a.height){a=a0.wrapInner("<div style='overflow:auto'></div>").children();ba.h=a.height();a.replaceWith(a.children())}a0.css({height:ba.h});a7.position(ba.transition===aR?0:ba.speed)}};a7.prep=function(a){var g="hidden";function b(i){var n,k,e,o,h=a3.length,j=ba.loop;a7.position(i,function(){function c(){az&&a1[0].style.removeAttribute("filter")}if(aQ){az&&f&&a0.fadeIn(100);a0.show();aO(ac);ad.show().html(ba.title);if(h>1){typeof ba.current==="string"&&ae.html(ba.current.replace(/\{current\}/,a4+1).replace(/\{total\}/,h)).show();av[j||a4<h-1?"show":"hide"]().html(ba.next);aw[j||a4?"show":"hide"]().html(ba.previous);n=a4?a3[a4-1]:a3[h-1];e=a4<h-1?a3[a4+1]:a3[0];ba.slideshow&&ay.show();if(ba.preloading){o=a9.data(e,aT).href||e.href;k=a9.data(n,aT).href||n.href;o=a9.isFunction(o)?o.call(e):o;k=a9.isFunction(k)?k.call(n):k;if(ai(o)){a9("<images/>")[0].src=o}if(ai(k)){a9("<images/>")[0].src=k}}}at.hide();ba.transition==="fade"?a1.fadeTo(d,1,function(){c()}):c();aX.bind(aP+a2,function(){a7.position(0)});aO(ah,ba.onComplete)}})}if(aQ){var f,d=ba.transition===aR?0:ba.speed;aX.unbind(aP+a2);a0.remove();a0=a5(aq).html(a);a0.hide().appendTo(au.show()).css({width:function(){ba.w=ba.w||a0.width();ba.w=ba.mw&&ba.mw<ba.w?ba.mw:ba.w;return ba.w}(),overflow:ba.scrolling?aU:g}).css({height:function(){ba.h=ba.h||a0.height();ba.h=ba.mh&&ba.mh<ba.h?ba.mh:ba.h;return ba.h}()}).prependTo(aS);au.hide();a9("#"+a2+"Photo").css({cssFloat:aR,marginLeft:aU,marginRight:aU});af&&a9("select").not(a1.find("select")).filter(function(){return this.style.visibility!==g}).css({visibility:g}).one(ap,function(){this.style.visibility="inherit"});ba.transition==="fade"?a1.fadeTo(d,0,function(){b(0)}):b(d)}};a7.load=function(a){var f,e,b,d=a7.prep;aA=a6;aZ=a3[a4];a||(ba=aI(a9.extend({},a9.data(aZ,aT))));aO(am);aO(ag,ba.onLoad);ba.h=ba.height?aV(ba.height,aW)-aM-aC:ba.innerHeight&&aV(ba.innerHeight,aW);ba.w=ba.width?aV(ba.width,aY)-aL-aB:ba.innerWidth&&aV(ba.innerWidth,aY);ba.mw=ba.w;ba.mh=ba.h;if(ba.maxWidth){ba.mw=aV(ba.maxWidth,aY)-aL-aB;ba.mw=ba.w&&ba.w<ba.mw?ba.w:ba.mw}if(ba.maxHeight){ba.mh=aV(ba.maxHeight,aW)-aM-aC;
ba.mh=ba.h&&ba.h<ba.mh?ba.h:ba.mh}f=ba.href;at.show();if(ba.inline){a5().hide().insertBefore(a9(f)[0]).one(am,function(){a9(this).replaceWith(a0.children())});d(a9(f))}else{if(ba.iframe){a1.one(ac,function(){var g=a9("<iframe frameborder='0' style='width:100%; height:100%; border:0; display:block'/>")[0];g.name=a2+ +new Date;g.src=ba.href;if(!ba.scrolling){g.scrolling="no"}if(az){g.allowtransparency="true"}a9(g).appendTo(a0).one(am,function(){g.src="//about:blank"})});d(" ")}else{if(ba.html){d(ba.html)}else{if(ai(f)){e=new Image;e.onload=function(){var c;e.onload=null;e.id=a2+"Photo";a9(e).css({border:aR,display:"block",cssFloat:"left"});if(ba.scalePhotos){b=function(){e.height-=e.height*c;e.width-=e.width*c};if(ba.mw&&e.width>ba.mw){c=(e.width-ba.mw)/e.width;b()}if(ba.mh&&e.height>ba.mh){c=(e.height-ba.mh)/e.height;b()}}if(ba.h){e.style.marginTop=Math.max(ba.h-e.height,0)/2+"px"}a3[1]&&(a4<a3.length-1||ba.loop)&&a9(e).css({cursor:"pointer"}).click(a7.next);if(az){e.style.msInterpolationMode="bicubic"}setTimeout(function(){d(e)},1)};setTimeout(function(){e.src=f},1)}else{f&&au.load(f,function(h,i,g){d(i==="error"?"Request unsuccessful: "+g.statusText:a9(this).children())})}}}}};a7.next=function(){if(!aA){a4=a4<a3.length-1?a4+1:0;a7.load()}};a7.prev=function(){if(!aA){a4=a4?a4-1:a3.length-1;a7.load()}};a7.close=function(){if(aQ&&!ao){ao=a6;aQ=a8;aO(ap,ba.onCleanup);aX.unbind("."+a2+" ."+an);aN.fadeTo("fast",0);a1.stop().fadeTo("fast",0,function(){aO(am);a0.remove();a1.add(aN).css({opacity:1,cursor:aU}).hide();setTimeout(function(){ao=a8;aO(aa,ba.onClosed)},1)})}};a7.element=function(){return a9(aZ)};a7.settings=aG;a9(a7.init)})(jQuery,this);(function(d,e,f){d.fn.jScrollPane=function(a){function b(bs,bc){var bj,ba=this,a2,bF,aL,bD,a7,a1,s,aP,bY,bT,br,aX,bi,aY,aW,bP,a6,bz,a3,aN,bx,by,bK,bC,bm,aU,bt,bl,aJ,bp,bQ,a0,bf,bG=true,bb=true,bR=false,aV=false,bA=bs.clone(false,false).empty(),bN=d.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";bQ=bs.css("paddingTop")+" "+bs.css("paddingRight")+" "+bs.css("paddingBottom")+" "+bs.css("paddingLeft");a0=(parseInt(bs.css("paddingLeft"),10)||0)+(parseInt(bs.css("paddingRight"),10)||0);function bv(h){var m,k,l,o,g,i,j=false,n=false;bj=h;if(a2===f){g=bs.scrollTop();i=bs.scrollLeft();bs.css({overflow:"hidden",padding:0});bF=bs.innerWidth()+a0;aL=bs.innerHeight();bs.width(bF);a2=d('<div class="jspPane" />').css("padding",bQ).append(bs.children());bD=d('<div class="jspContainer" />').css({width:bF+"px",height:aL+"px"}).append(a2).appendTo(bs)}else{bs.css("width","");j=bj.stickToBottom&&bg();n=bj.stickToRight&&bw();o=bs.innerWidth()+a0!=bF||bs.outerHeight()!=aL;if(o){bF=bs.innerWidth()+a0;aL=bs.innerHeight();bD.css({width:bF+"px",height:aL+"px"})}if(!o&&bf==a7&&a2.outerHeight()==a1){bs.width(bF);return}bf=a7;a2.css("width","");bs.width(bF);bD.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}a2.css("overflow","auto");if(h.contentWidth){a7=h.contentWidth}else{a7=a2[0].scrollWidth}a1=a2[0].scrollHeight;a2.css("overflow","");s=a7/bF;aP=a1/aL;bY=aP>1;bT=s>1;if(!(bT||bY)){bs.removeClass("jspScrollable");a2.css({top:0,width:bD.width()-a0});aS();bq();a9();aK();bH()}else{bs.addClass("jspScrollable");m=bj.maintainPosition&&(bi||bP);if(m){k=bV();l=bX()}bS();c();bo();if(m){bd(n?(a7-bF):k,false);be(j?(a1-aL):l,false)}bh();bJ();bB();if(bj.enableKeyboardNavigation){a8()}if(bj.clickOnTrack){aQ()}bu();if(bj.hijackInternalLinks){aT()}}if(bj.autoReinitialise&&!bp){bp=setInterval(function(){bv(bj)},bj.autoReinitialiseDelay)}else{if(!bj.autoReinitialise&&bp){clearInterval(bp)}}g&&bs.scrollTop(0)&&be(g,false);i&&bs.scrollLeft(0)&&bd(i,false);bs.trigger("jsp-initialised",[bT||bY])}function bS(){if(bY){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");
br=bz.find(">.jspDrag");if(bj.showArrows){by=d('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",bU(0,-1)).bind("click.jsp",bW);bK=d('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",bU(0,1)).bind("click.jsp",bW);if(bj.arrowScrollOnHover){by.bind("mouseover.jsp",bU(0,-1,by));bK.bind("mouseover.jsp",bU(0,1,bK))}bE(bz,bj.verticalArrowPositions,by,bK)}aN=aL;bD.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){aN-=d(this).outerHeight()});br.hover(function(){br.addClass("jspHover")},function(){br.removeClass("jspHover")}).bind("mousedown.jsp",function(h){d("html").bind("dragstart.jsp selectstart.jsp",bW);br.addClass("jspActive");var g=h.pageY-br.position().top;d("html").bind("mousemove.jsp",function(i){a5(i.pageY-g,false)}).bind("mouseup.jsp mouseleave.jsp",bn);return false});aR()}}function aR(){bz.height(aN+"px");bi=0;a3=bj.verticalGutter+bz.outerWidth();a2.width(bF-a3-a0);try{if(a6.position().left===0){a2.css("margin-left",a3+"px")}}catch(g){}}function c(){if(bT){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");bm=bC.find(">.jspTrack");aY=bm.find(">.jspDrag");if(bj.showArrows){bl=d('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",bU(-1,0)).bind("click.jsp",bW);aJ=d('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",bU(1,0)).bind("click.jsp",bW);if(bj.arrowScrollOnHover){bl.bind("mouseover.jsp",bU(-1,0,bl));aJ.bind("mouseover.jsp",bU(1,0,aJ))}bE(bm,bj.horizontalArrowPositions,bl,aJ)}aY.hover(function(){aY.addClass("jspHover")},function(){aY.removeClass("jspHover")}).bind("mousedown.jsp",function(h){d("html").bind("dragstart.jsp selectstart.jsp",bW);aY.addClass("jspActive");var g=h.pageX-aY.position().left;d("html").bind("mousemove.jsp",function(i){a4(i.pageX-g,false)}).bind("mouseup.jsp mouseleave.jsp",bn);return false});aU=bD.innerWidth();bI()}}function bI(){bD.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){aU-=d(this).outerWidth()});bm.width(aU+"px");bP=0}function bo(){if(bT&&bY){var h=bm.outerHeight(),g=bz.outerWidth();aN-=h;d(bC).find(">.jspCap:visible,>.jspArrow").each(function(){aU+=d(this).outerWidth()});aU-=g;aL-=g;bF-=h;bm.parent().append(d('<div class="jspCorner" />').css("width",h+"px"));aR();bI()}if(bT){a2.width((bD.outerWidth()-a0)+"px")}a1=a2.outerHeight();aP=a1/aL;if(bT){bt=Math.ceil(1/s*aU);if(bt>bj.horizontalDragMaxWidth){bt=bj.horizontalDragMaxWidth}else{if(bt<bj.horizontalDragMinWidth){bt=bj.horizontalDragMinWidth}}aY.width(bt+"px");aW=aU-bt;bL(bP)}if(bY){bx=Math.ceil(1/aP*aN);if(bx>bj.verticalDragMaxHeight){bx=bj.verticalDragMaxHeight}else{if(bx<bj.verticalDragMinHeight){bx=bj.verticalDragMinHeight}}br.height(bx+"px");aX=aN-bx;bM(bi)}}function bE(l,j,m,i){var g="before",k="after",h;if(j=="os"){j=/Mac/.test(navigator.platform)?"after":"split"}if(j==g){k=j}else{if(j==k){g=j;h=m;m=i;i=h}}l[g](m)[k](i)}function bU(i,g,h){return function(){bk(i,g,this,h);this.blur();return false}}function bk(k,l,g,h){g=d(g).addClass("jspActive");var j,m,n=true,i=function(){if(k!==0){ba.scrollByX(k*bj.arrowButtonSpeed)}if(l!==0){ba.scrollByY(l*bj.arrowButtonSpeed)}m=setTimeout(i,n?bj.initialDelay:bj.arrowRepeatFreq);n=false};i();j=h?"mouseout.jsp":"mouseup.jsp";h=h||d("html");h.bind(j,function(){g.removeClass("jspActive");m&&clearTimeout(m);m=null;h.unbind(j)})}function aQ(){aK();if(bY){bz.bind("mousedown.jsp",function(h){if(h.originalTarget===f||h.originalTarget==h.currentTarget){var k=d(this),g=k.offset(),j=h.pageY-g.top-bi,m,n=true,i=function(){var o=k.offset(),t=h.pageY-o.top-bx/2,r=aL*bj.scrollPagePercent,q=aX*r/(a1-aL);if(j<0){if(bi-q>t){ba.scrollByY(-r)}else{a5(t)}}else{if(j>0){if(bi+q<t){ba.scrollByY(r)}else{a5(t)}}else{l();return}}m=setTimeout(i,n?bj.initialDelay:bj.trackClickRepeatFreq);
n=false},l=function(){m&&clearTimeout(m);m=null;d(document).unbind("mouseup.jsp",l)};i();d(document).bind("mouseup.jsp",l);return false}})}if(bT){bm.bind("mousedown.jsp",function(h){if(h.originalTarget===f||h.originalTarget==h.currentTarget){var k=d(this),g=k.offset(),j=h.pageX-g.left-bP,m,n=true,i=function(){var o=k.offset(),t=h.pageX-o.left-bt/2,r=bF*bj.scrollPagePercent,q=aW*r/(a7-bF);if(j<0){if(bP-q>t){ba.scrollByX(-r)}else{a4(t)}}else{if(j>0){if(bP+q<t){ba.scrollByX(r)}else{a4(t)}}else{l();return}}m=setTimeout(i,n?bj.initialDelay:bj.trackClickRepeatFreq);n=false},l=function(){m&&clearTimeout(m);m=null;d(document).unbind("mouseup.jsp",l)};i();d(document).bind("mouseup.jsp",l);return false}})}}function aK(){if(bm){bm.unbind("mousedown.jsp")}if(bz){bz.unbind("mousedown.jsp")}}function bn(){d("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");if(br){br.removeClass("jspActive")}if(aY){aY.removeClass("jspActive")}}function a5(g,h){if(!bY){return}if(g<0){g=0}else{if(g>aX){g=aX}}if(h===f){h=bj.animateScroll}if(h){ba.animate(br,"top",g,bM)}else{br.css("top",g);bM(g)}}function bM(k){if(k===f){k=br.position().top}bD.scrollTop(0);bi=k;var h=bi===0,j=bi==aX,i=k/aX,g=-i*(a1-aL);if(bG!=h||bR!=j){bG=h;bR=j;bs.trigger("jsp-arrow-change",[bG,bR,bb,aV])}aM(h,j);a2.css("top",g);bs.trigger("jsp-scroll-y",[-g,h,j]).trigger("scroll")}function a4(h,g){if(!bT){return}if(h<0){h=0}else{if(h>aW){h=aW}}if(g===f){g=bj.animateScroll}if(g){ba.animate(aY,"left",h,bL)}else{aY.css("left",h);bL(h)}}function bL(k){if(k===f){k=aY.position().left}bD.scrollTop(0);bP=k;var h=bP===0,i=bP==aW,j=k/aW,g=-j*(a7-bF);if(bb!=h||aV!=i){bb=h;aV=i;bs.trigger("jsp-arrow-change",[bG,bR,bb,aV])}aO(h,i);a2.css("left",g);bs.trigger("jsp-scroll-x",[-g,h,i]).trigger("scroll")}function aM(h,g){if(bj.showArrows){by[h?"addClass":"removeClass"]("jspDisabled");bK[g?"addClass":"removeClass"]("jspDisabled")}}function aO(h,g){if(bj.showArrows){bl[h?"addClass":"removeClass"]("jspDisabled");aJ[g?"addClass":"removeClass"]("jspDisabled")}}function be(g,i){var h=g/(a1-aL);a5(h*aX,i)}function bd(i,g){var h=i/(a7-bF);a4(h*aW,g)}function bO(h,m,v){var q,u,t,w=0,i=0,g,n,o,k,l,j;try{q=d(h)}catch(r){return}u=q.outerHeight();t=q.outerWidth();bD.scrollTop(0);bD.scrollLeft(0);while(!q.is(".jspPane")){w+=q.position().top;i+=q.position().left;q=q.offsetParent();if(/^body|html$/i.test(q[0].nodeName)){return}}g=bX();o=g+aL;if(w<g||m){l=w-bj.verticalGutter}else{if(w+u>o){l=w-aL+u+bj.verticalGutter}}if(l){be(l,v)}n=bV();k=n+bF;if(i<n||m){j=i-bj.horizontalGutter}else{if(i+t>k){j=i-bF+t+bj.horizontalGutter}}if(j){bd(j,v)}}function bV(){return -a2.position().left}function bX(){return -a2.position().top}function bg(){var g=a1-aL;return(g>20)&&(g-bX()<10)}function bw(){var g=a7-bF;return(g>20)&&(g-bV()<10)}function bJ(){bD.unbind(bN).bind(bN,function(i,h,j,l){var k=bP,g=bi;ba.scrollBy(j*bj.mouseWheelSpeed,-l*bj.mouseWheelSpeed,false);return k==bP&&g==bi})}function aS(){bD.unbind(bN)}function bW(){return false}function bh(){a2.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(g){bO(g.target,false)})}function bq(){a2.find(":input,a").unbind("focus.jsp")}function a8(){var g,j,h=[];bT&&h.push(bC[0]);bY&&h.push(a6[0]);a2.focus(function(){bs.focus()});bs.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(k){if(k.target!==this&&!(h.length&&d(k.target).closest(h).length)){return}var l=bP,m=bi;switch(k.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:g=k.keyCode;i();break;case 35:be(a1-aL);g=null;break;case 36:be(0);g=null;break}j=k.keyCode==g&&l!=bP||m!=bi;return !j}).bind("keypress.jsp",function(k){if(k.keyCode==g){i()}return !j});if(bj.hideFocus){bs.css("outline","none");if("hideFocus" in bD[0]){bs.attr("hideFocus",true)}}else{bs.css("outline","");if("hideFocus" in bD[0]){bs.attr("hideFocus",false)}}function i(){var k=bP,l=bi;switch(g){case 40:ba.scrollByY(bj.keyboardSpeed,false);break;case 38:ba.scrollByY(-bj.keyboardSpeed,false);
break;case 34:case 32:ba.scrollByY(aL*bj.scrollPagePercent,false);break;case 33:ba.scrollByY(-aL*bj.scrollPagePercent,false);break;case 39:ba.scrollByX(bj.keyboardSpeed,false);break;case 37:ba.scrollByX(-bj.keyboardSpeed,false);break}j=k!=bP||l!=bi;return j}}function a9(){bs.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function bu(){if(location.hash&&location.hash.length>1){var h,j,i=escape(location.hash);try{h=d(i)}catch(g){return}if(h.length&&a2.find(i)){if(bD.scrollTop()===0){j=setInterval(function(){if(bD.scrollTop()>0){bO(i,true);d(document).scrollTop(bD.position().top);clearInterval(j)}},50)}else{bO(i,true);d(document).scrollTop(bD.position().top)}}}}function bH(){d("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function aT(){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=bV();l=bX();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=bP,q=bi;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==bP&&q==bi}).bind("touchend.jsp",function(m){g=false}).bind("click.jsp-touchclick",function(m){if(h){h=false;return false}})}function aZ(){var g=bX(),h=bV();bs.removeClass("jspScrollable").unbind(".jsp");bs.replaceWith(bA.append(a2.children()));bA.scrollTop(g);bA.scrollLeft(h)}d.extend(ba,{reinitialise:function(g){g=d.extend({},bj,g);bv(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-aL),g)},scrollBy:function(i,g,h){ba.scrollByX(i,h);ba.scrollByY(g,h)},scrollByX:function(g,i){var j=bV()+Math[g<0?"floor":"ceil"](g),h=j/(a7-bF);a4(h*aW,i)},scrollByY:function(g,i){var j=bX()+Math[g<0?"floor":"ceil"](g),h=j/(a1-aL);a5(h*aX,i)},positionDragX:function(g,h){a4(g,h)},positionDragY:function(h,g){a5(h,g)},animate:function(k,h,g,i){var j={};j[h]=g;k.animate(j,{duration:bj.animateDuration,easing:bj.animateEase,queue:false,step:i})},getContentPositionX:function(){return bV()},getContentPositionY:function(){return bX()},getContentWidth:function(){return a7},getContentHeight:function(){return a1},getPercentScrolledX:function(){return bV()/(a7-bF)},getPercentScrolledY:function(){return bX()/(a1-aL)},getIsScrollableH:function(){return bT},getIsScrollableV:function(){return bY},getContentPane:function(){return a2},scrollToBottom:function(g){a5(aX,g)},hijackInternalLinks:function(){aT()},destroy:function(){aZ()}});bv(bc)}a=d.extend({},d.fn.jScrollPane.defaults,a);d.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){a[this]=a[this]||a.speed});return this.each(function(){var h=d(this),c=h.data("jsp");if(c){c.reinitialise(a)}else{c=new b(h,a);h.data("jsp",c)}})};d.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,stickToBottom:false,stickToRight:false,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:f,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);(function(d){d.fn.jMyCarousel=function(e){e=d.extend({btnPrev:null,btnNext:null,mouseWheel:true,auto:false,speed:500,easing:"linear",vertical:false,circular:true,visible:"4",start:0,scroll:1,step:50,eltByElt:false,evtStart:"mouseover",evtStop:"mouseout",beforeStart:null,afterEnd:null},e||{});
return this.each(function(){var x=false,u=e.vertical?"top":"left",h=e.vertical?"height":"width";var Q=d(this),D=d("ul",Q),C=d("li",D),f=C.size(),I=e.visible;var r=0;var J=(e.btnNext===null&&e.btnPrev===null)?true:false;var O=(I.toString().indexOf("%")!=-1?"%":(I.toString().indexOf("px")!=-1)?"px":"el");var n=null;if(e.circular){var K=C.clone();D.prepend(K).append(K.clone())}var B=d("li",D);Q.css("visibility","visible");B.css("overflow","hidden").css("float",e.vertical?"none":"left").children().css("overflow","hidden");if(!e.vertical){B.css("display","inline")}if(B.children().get(0).tagName.toLowerCase()=="a"&&!e.vertical){B.children().css("float","left")}if(e.vertical&&jQuery.browser.msie){B.css("line-height","4px").children().css("margin-bottom","-4px")}D.css("margin","0").css("padding","0").css("position","relative").css("list-style-type","none").css("z-index","1");Q.css("overflow","hidden").css("position","relative").css("z-index","2").css("left","0px");var g=e.vertical?a(B):c(B);var M=e.vertical?F(B):a(B);var E=e.start;var z=B.size();var L=g*z;var H=f;var y=H*g;var P=z*g;var A=e.step=="default"?g:e.step;e.btnPrev=J?d('<input type="button" class="'+(e.vertical?"up":"prev")+'" />'):d(e.btnPrev);e.btnNext=J?d('<input type="button" class="'+(e.vertical?"down":"next")+'" />'):d(e.btnNext);var w=e.btnPrev;var j=e.btnNext;if(J&&e.auto!==true){w.css({opacity:"0.6"});j.css({opacity:"0.6"});Q.prepend(w);Q.prepend(j);e.btnPrev=w;e.btnNext=j}if(e.eltByElt){A=g;if(e.start%g!==0){var N=parseInt(e.start/g);E=e.start=(N*g)}}if(e.circular){e.start+=(g*f);E+=(g*f)}var m,l,R;if(O=="%"){m=0;l=parseInt(I);R="%"}else{if(O=="px"){m=parseInt(I);l=parseInt(I);R="px"}else{m=g*parseInt(I);l=g*parseInt(I);R="px"}}D.css(h,L+"px").css(u,-(e.start));Q.css(h,l+R);if(e.vertical&&R=="%"){var k=((g*H)*(parseInt(I)/100));Q.css(h,k+"px")}if(m===0){m=Q.width()}if(e.vertical){Q.css("width",M+"px");D.css("width",M+"px");B.css("margin-bottom",(parseInt(B.css("margin-bottom"))*2)+"px");B.eq(B.size()-1).css("margin-bottom",B.css("margin-top"))}else{Q.css("height",M+"px");D.css("height",M+"px")}if(O=="%"){I=m/B.width();if(I%1!==0){I+=1}I=parseInt(I)}var t=Q.height();if(J){j.css({"z-index":200,position:"absolute"});w.css({"z-index":200,position:"absolute"});if(e.vertical){w.css({width:w.width(),height:w.height(),top:"0px",left:parseInt(M/2)-parseInt(w.width()/2)+"px"});j.css({width:w.width(),height:w.height(),top:(t-w.height())+"px",left:parseInt(M/2)-parseInt(w.width()/2)+"px"})}else{w.css({left:"0px",top:parseInt(M/2)-parseInt(w.height()/2)+"px"});j.css({right:"0px",top:parseInt(M/2)-parseInt(w.height()/2)+"px"})}}if(e.btnPrev){d(e.btnPrev).bind(e.evtStart,function(){if(J){e.btnPrev.css("opacity",0.9)}x=true;n="backward";return i()});d(e.btnPrev).bind(e.evtStop,function(){if(J){e.btnPrev.css("opacity",0.6)}x=false;n=null;return q()})}if(e.btnNext){d(e.btnNext).bind(e.evtStart,function(){if(J){e.btnNext.css("opacity",0.9)}x=true;n="forward";return G()});d(e.btnNext).bind(e.evtStop,function(){if(J){e.btnNext.css("opacity",0.6)}x=false;n=null;return q()})}if(e.auto===true){x=true;G()}if(e.mouseWheel&&Q.mousewheel){Q.mousewheel(function(v,S){if(!e.circular&&(S>0?(E+m<L):(E>0))||e.circular){r+=1;if(x===false){if(S>0){G(A,true)}else{i(A,true)}x=true}}})}function G(v,T){var S=(v?v:A);if(x===true&&n==="backward"){return}if(!e.circular){if(E+S+(e.vertical?t:m)>y){S=y-(E+(e.vertical?t:m))}}D.animate(u=="left"?{left:-(E+S)}:{top:-(E+S)},e.speed,e.easing,function(){E+=S;if(e.circular){if(E+(e.vertical?t:m)+g>=P){D.css(e.vertical?"top":"left",-E+y);E-=y}}if(!T&&x){G()}else{if(T){if(--r>0){this.forward(A,true)}else{x=false;n=null}}}})}function i(v,T){var S=(v?v:A);if(x===true&&n==="forward"){return}if(!e.circular){if(E-S<0){S=E-0}}D.animate(u=="left"?{left:-(E-S)}:{top:-(E-S)},e.speed,e.easing,function(){E-=S;if(e.circular){if(E<=g){D.css(e.vertical?"top":"left",-(E+y));E+=y}}if(!T&&x){i()}else{if(T){if(--r>0){i(A,true)}else{x=false;n=null}}}})}function q(){if(!e.eltByElt){D.stop();
E=0-parseInt(D.css(u))}x=false;n=null}function o(v,S){if(S=="width"){return v.find("img").width()}else{return v.find("img").height()}}function F(S){var v=S.find("img");if(e.vertical){return parseInt(S.css("margin-left"))+parseInt(S.css("margin-right"))+parseInt(v.width())+parseInt(S.css("border-left-width"))+parseInt(S.css("border-right-width"))+parseInt(S.css("padding-right"))+parseInt(S.css("padding-left"))}else{return parseInt(S.css("margin-top"))+parseInt(S.css("margin-bottom"))+parseInt(v.width())+parseInt(S.css("border-top-height"))+parseInt(S.css("border-bottom-height"))+parseInt(S.css("padding-top"))+parseInt(S.css("padding-bottom"))}}function s(v){d("#debug").html(d("#debug").html()+v+"<br/>")}})};function b(e,f){return parseInt(d.css(e[0],f))||0}function c(e){return e[0].offsetWidth+b(e,"marginLeft")+b(e,"marginRight")}function a(e){return e[0].offsetHeight+b(e,"marginTop")+b(e,"marginBottom")}})(jQuery);(function(a){a.fn.center=function(){return this.each(function(){var b=a(this);b.css("position","absolute");b.css("top",(a(window).height()-b.outerHeight())/2+a(window).scrollTop()+"px");b.css("left",(a(window).width()-b.outerWidth())/2+a(window).scrollLeft()+"px")})}})(jQuery);(function(a){a.fn.myTooltip=function(b){var c=a.extend({},a.fn.myTooltip.defaults,b);return this.each(function(){var e=a(this);var d=c.tooltip.replace(/./,"");e.mouseover(function(o){var m=e.offset();var h=a(window).width();var f=a(window).height();var l=a(window).scrollTop();var k=c.tooltipWidth;var i=c.tooltipHeight;if(o.pageX+k>h){var j=k}else{var j=c.offsetLeft}var g=0;if((i+c.offsetTop+l)>o.pageY){g=0}else{if((o.pageY+i)>f){g=c.offsetTop+i}else{g=c.offsetTop}}if(c.attribute==""){var n=a("<div>").html(a(e).next(a(c.target)).html())}else{var n=a("<div>").html(a(e).attr(c.attribute));a(e).attr(c.attribute,"")}n.addClass(d).css({width:k,height:i,left:(m.left-j),top:(m.top-g)}).appendTo("body");tip=setTimeout("$('"+c.tooltip+"').show('drop',{direction:'up'});",c.timeout)});e.mouseout(function(f){clearTimeout(tip);if(c.attribute!=""){a(e).attr(c.attribute,a(c.tooltip).text())}a(c.tooltip).remove().fadeOut("slow")})})};a.fn.myTooltip.defaults={tooltip:".tooltipSnippets",tooltipWidth:200,tooltipHeight:100,offsetLeft:0,offsetTop:0,target:"div",timeout:750,attribute:"",opacity:1}})(jQuery);(function(a){a.fn.myDialog=function(b){var c=a.extend({},a.fn.myDialog.defaults,b);return this.each(function(){var d=a(this);d.click(function(){var e=d.next(c.target).html();a.fn.myDialog.loadBackground(c,e);return false})})};a.fn.myDialog.loadBackground=function(c,b){a("<div id='modal'><div>").bgiframe().appendTo("body");a.fn.myDialog.loadPopup(c,b)};a.fn.myDialog.loadPopup=function(c,b){a("#modal").css({height:a(window).height(),opacity:c.opacity}).fadeIn("slow");options={};if(c.openEffect==="scale"){options={percent:100}}if(c.openEffect==="drop"){options={direction:"up"}}a("<div id='popUp'></div>").html(b).css({width:c.dialogWidth,height:c.dialogHeight}).insertAfter("#wrapper").center().show(c.openEffect,options);a("a.close").live("click",function(){a.fn.myDialog.closePopup(c);return false})};a.fn.myDialog.closePopup=function(b){if(b.closeEffect==="fade"){a("#popUp").fadeOut("slow",function(){a(this).remove()})}else{options={};if(b.closeEffect==="scale"){options={percent:0}}if(b.closeEffect==="drop"){options={direction:"up"}}a("#popUp").hide(b.closeEffect,options,function(){a(this).remove()})}a("#modal").delay(500).fadeOut("slow",function(){a(this).remove()})};a.fn.myDialog.defaults={target:"dd",opacity:0.7,dialogWidth:400,dialogHeight:500,openEffect:"scale",closeEffect:"fade"}})(jQuery);(function(a){a.fn.myModal=function(b){var c=a.extend({},a.fn.myModal.defaults,b);return this.each(function(){var d=a(this);d.click(function(){a.fn.myModal.loadBackground(c);return false})})};a.fn.myModal.loadBackground=function(b){a("<div id='modal'><div>").bgiframe().appendTo("body");a.fn.myModal.centerPopup(b)};a.fn.myModal.centerPopup=function(c){a("<div id='popUp'></div>").insertAfter("#wrapper");
var b=a(window).width();var i=a(window).height();var g=a(document).height();var h=c.popupHeight;var f=a("#popUp").width();var e=(i-h)/2+a(window).scrollTop();var d=(b-f)/2+a(window).scrollLeft();a("#popUp").css({position:"absolute",top:e+"px",left:d+"px"});a("#modal").css({height:i});a.fn.myModal.loadPopup(c)};a.fn.myModal.loadPopup=function(b){a("#modal").css({opacity:b.opacity}).fadeIn("slow");a("#popUp").load(b.ajaxFormUrl,function(){a("#popUp form").hide();a("p#closePopup").html("")});a("#popUp").fadeIn("slow",function(){a("#popUp form").delay(2000).slideDown("slow",function(){a("#formTitle").html("<h2>"+b.initialMessage+"</h2>");a("p#closePopup").html("<a href='#'>"+b.closeLink+"</a>")})});a("p#closePopup").live("click",function(){a.fn.myModal.closePopup(b.closeMessage);return false});a("#popUp").live("submit",function(){var d=(a("#popUp form").serialize());a.ajax({type:"GET",dataType:"json",url:b.ajaxValidationUrl,data:d,success:c});return false});function c(e){if(e.goodresult==0){a.fn.myModal.closePopup(b.sentMessage)}else{a("label span.errorMessage").hide();a("label").removeClass();for(var d in e){if(e.hasOwnProperty(d)){a("#popUp :input#"+d).prev("label").addClass("popupError").append("<span class='errorMessage'>"+e[d]+"</span>");if(e.emailUserExists){a("#feedback").fadeIn("slow").html(e.emailUserExists)}}}}}};a.fn.myModal.closePopup=function(b){a("#popUp").css({height:"auto"});a("p#closePopup").html("");a("label span.errorMessage,#feedback").hide();a("label").removeClass();a("#popUp form").css({position:"relative","z-index":"0"}).slideUp("slow",function(){a("#formTitle").html("<h2>"+b+"</h2>");a("#popUp").delay(1500).fadeOut("slow",function(){a("#modal").fadeOut("slow",function(){a(this).remove()});a("#popUp").remove()})})};a.fn.myModal.defaults={popupHeight:300,initialMessage:"Sign Up To Our Newsletter!",closeLink:"Close",closeMessage:"Goodbye!",sentMessage:"Thanks For Your Enquiry",opacity:0.7,ajaxFormUrl:"http://localhost/plantsgalore2/ajax/form_newsletter.php",ajaxValidationUrl:"http://localhost/plantsgalore2/ajax/form_validation.php"}})(jQuery);window.log=function(){log.history=log.history||[];log.history.push(arguments);arguments.callee=arguments.callee.caller;if(this.console){console.log(Array.prototype.slice.call(arguments))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})(window.console=window.console||{});
