
/* jquery.cycle.all.min.js *//*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.75 (10-FEB-2010)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.6 or later
 */
(function($){var ver="2.75";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(opts2.currSlide,opts2.nextSlide,opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts2.rev);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"stop":cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;if(arg2===true){options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,1);}return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth;}if(!h){h=e.offsetHeight;}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}while((opts.timeout-opts.speed)<250){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){$(els).stop(true,true);opts.busy=false;}if(opts.busy){return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}if(manual||!p.cyclePause){var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after);}else{$.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent);}}}opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}if(opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(curr,next,opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).find("a").removeClass(clsName).filter("a:eq("+currSlide+")").addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}if($.isFunction(opts.prevNextClick)){opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if($.isFunction(opts.pagerClick)){opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);return false;});if(opts.pagerEvent!="click"){$a.click(function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null};})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version:	 2.72
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
/* jquery.metadata.min.js *//*
 * Metadata - jQuery plugin for parsing metadata from elements
 *
 * Copyright (c) 2006 John Resig, Yehuda Katz, J?örn Zaefferer, Paul McLanahan
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $
 *
 */
 (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="{}";var getData=function(data){if(typeof data!="string")return data;if(data.indexOf('{')<0){data=eval("("+data+")");}}
var getObject=function(data){if(typeof data!="string")return data;data=eval("("+data+")");return data;}
if(settings.type=="html5"){var object={};$(elem.attributes).each(function(){var name=this.nodeName;if(name.match(/^data-/))name=name.replace(/^data-/,'');else return true;object[name]=getObject(this.nodeValue);});}else{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;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;}
object=getObject(data.indexOf("{")<0?"{"+data+"}":data);}
$.data(elem,settings.single,object);return object;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);

/* jquery.cookie.js */
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};
/* jquery.sLib.js */;(function($){var Sonata={};$.sLib=Sonata;Sonata.imagePath="js/sLib_images";Sonata.setImagePath=function(path){Sonata.imagePath=path;}
Sonata.isCSS=false;Sonata.isW3C=false;Sonata.isIE4=false;Sonata.isNN4=false;Sonata.isIE6CSS=false;Sonata.isOpera=navigator.userAgent.indexOf("Opera")>-1;if(Sonata.isOpera)Sonata.isIE4=false;Sonata.isIE55=navigator.userAgent.indexOf("MSIE 5.5;")>-1;Sonata.isIE60=navigator.userAgent.indexOf("MSIE 6.0;")>-1;Sonata.isIE70=navigator.userAgent.indexOf("MSIE 7.0;")>-1;Sonata.isIE80=navigator.userAgent.indexOf("MSIE 8.0;")>-1;Sonata.isIE90=navigator.userAgent.indexOf("MSIE 9")>-1;Sonata.isFirefox=navigator.userAgent.indexOf("Firefox")>-1;Sonata.isGecko=navigator.userAgent.indexOf("Gecko")>-1;Sonata.isKHTML=navigator.userAgent.indexOf("KHTML")>-1;Sonata.isMac=navigator.userAgent.indexOf("Macintosh")>-1;Sonata.isSafari=navigator.userAgent.indexOf("Safari")>-1;Sonata.isChrome=navigator.userAgent.indexOf("Chrome")>-1;if(navigator.userAgent.indexOf("AppleWebKit")>-1){Sonata.isWebkit=true;}
if(Sonata.isChrome&&Sonata.isSafari)
Sonata.isSafari=false;if(Sonata.isMac||Sonata.isSafari)Sonata.isGecko=false;if(Sonata.isIE55||Sonata.isIE60)Sonata.isIE4=true;Sonata.isIE=false;if(Sonata.isIE4||Sonata.isIE55||Sonata.isIE60||Sonata.isIE70||Sonata.isIE80||Sonata.isIE90)
Sonata.isIE=true;if(Sonata.isOpera)Sonata.isIE=false;Sonata.eval=function(text){var v='('+text+')';return eval(v);}
Sonata.defArg=function(arg,def){var ret=typeof arg=='undefined'?def:arg;return ret;}
var _uniqueIdCnt=1149;document.uniqueId=Sonata.uniqueId=function(base)
{function getnext()
{return _uniqueIdCnt++;}
if(typeof cnt=="undefined")
cnt=1;if(typeof base=="undefined")
base="u";return base+getnext();}
var mprint_box=null;Sonata.mprint=function(s,bHtml){bHtml=typeof bHtml=='undefined'?false:true;if(mprint_box==null){mprint_box=$("<div align='left'>").css({backgroundColor:"white",fontFamily:"monospace",fontSize:"10pt",border:"solid red 3px",padding:"10px"});$(document.body).append(mprint_box);}
var div=$("<div>");if(bHtml==false){s=s.replace(/\n/g,"<br>");s=s.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");div.html(s);}
else div.html("<pre>"+s+"</pre>");mprint_box.append(div);}
window.mprint=Sonata.mprint;Sonata.roundies=function(cls,diam){if(typeof DD_roundies=='undefined')return;var others=true;DD_roundies.addRule(cls,diam+'px',!others);DD_roundies.addRule(cls+'-top',diam+'px '+diam+'px 0px 0px',!others);DD_roundies.addRule(cls+'-bottom','0px 0px '+diam+'px '+diam+'px',!others);if(others){addRuleOthers(cls,diam);addRuleOthers(cls+'-top',diam+'px '+diam+'px 0px 0px');addRuleOthers(cls+'-bottom','0px 0px '+diam+'px '+diam+'px');}
function addRuleOthers(selector,rad){var rad=rad.toString().replace(/[^0-9 ]/g,'').split(' ');for(var i=0;i<4;i++){rad[i]=(!rad[i]&&rad[i]!==0)?rad[Math.max((i-2),0)]:rad[i];}
var rule=' -moz-border-radius-topleft:'+rad[0]+'px '+rad[0]+'px; -moz-border-radius-topright:'+rad[1]+'px '+rad[1]+'px; -moz-border-radius-bottomright:'+rad[2]+'px '+rad[2]+'px; -moz-border-radius-bottomleft:'+rad[3]+'px '+rad[3]+'px;'
+'-webkit-border-top-left-radius:'+rad[0]+'px '+rad[0]+'px; -webkit-border-top-right-radius:'+rad[1]+'px '+rad[1]+'px; -webkit-border-bottom-right-radius:'+rad[2]+'px '+rad[2]+'px; -webkit-border-bottom-left-radius:'+rad[3]+'px '+rad[3]+'px;'
+'-khtml-border-radius-topleft:'+rad[0]+'px '+rad[0]+'px; -khtml-border-radius-topright:'+rad[1]+'px '+rad[1]+'px; -khtml-border-radius-bottomright:'+rad[2]+'px '+rad[2]+'px; -khtml-border-radius-bottomleft:'+rad[3]+'px '+rad[3]+'px;'
+' border-top-left-radius:'+rad[0]+'px '+rad[0]+'px; -border-top-right-radius:'+rad[1]+'px '+rad[1]+'px; border-bottom-right-radius:'+rad[2]+'px '+rad[2]+'px; border-bottom-left-radius:'+rad[3]+'px '+rad[3]+'px;';$.sRule(selector,rule);}}
Sonata.getIntInfo=function(s){var num=0;var ok=true;num=parseInt(s);if(isNaN(num)){ok=false;num=0;}
return{ok:ok,number:num};}
Sonata.getFloatInfo=function(s){var num=0;var ok=true;num=parseFloat(s);if(isNaN(num)){ok=false;num=0;}
return{ok:ok,number:num};}
Sonata.isInt=function(s){var t=Sonata.getIntInfo(s);return t.ok;}
Sonata.isFloat=function(s){var t=Sonata.getFloatInfo(s);return t.ok;}
Sonata.isNumber=function(s){var t=Sonata.getIntInfo(s);if(t.ok==false)
t=Sonata.getFloatInfo(s);return t.ok;}
Sonata.getInt=function(s){var t=Sonata.getIntInfo(s);return t.ok?t.number:0;}
Sonata.getNumber=function(s){var d=Sonata.getFloatInfo(s);return d.ok?d.number:0;}
Sonata.getFloat=function(s){return Sonata.getNumber(s);}
Sonata.getRect=function(div){var offs=div.offset();var ret={left:offs.left,top:offs.top,width:div.outerWidth(),height:div.outerHeight()};ret.right=ret.left+ret.width;ret.bottom=ret.top+ret.height;ret.toString=Sonata._toStringRect;ret.inRect=function(x,y){return Sonata.inRect(x,y,this);}
return ret;}
Sonata._toStringRect=function(){return"sLib.rect {left:"+this.left+", top:"+this.top+", width:"+this.width
+", height:"+this.height+", right:"+this.right+", bottom:"+this.bottom+"}";}
Sonata.inRect=function(x,y,rect){if(x>=rect.left&&x<=rect.right&&y>=rect.top&&y<=rect.bottom)return true;return false;}
Sonata.getWindowRect=function(){var d=$(document);var w=$(window);var wid=w.width();var ht=w.height();var wrect={left:d.scrollLeft(),top:d.scrollTop(),width:wid,height:ht};wrect.right=wrect.left+wid;wrect.bottom=wrect.top+ht;wrect.toString=Sonata._toStringRect;return wrect;}
$.getMetadata=Sonata.getMetadata=function($elem,opts,name){if($.metadata){var meta=$elem.metadata();name=Sonata.defArg(name,"");if(name!=""&&meta[name])meta=meta[name];opts=$.extend({},opts,meta);}
return opts;}
$.getMetadata.meta=Sonata.getMetadata.meta=function($elem,name){if($.metadata){var meta=$elem.metadata();name=Sonata.defArg(name,"");if(name!=""&&meta[name])meta=meta[name];return meta;}
return{};}
$.getMetadata.set=Sonata.getMetadata.set=function($elem,metaopts,name){if($.metadata){name=Sonata.defArg(name,"");var str=toStr(metaopts);var meta=str;if(name!=""){str="{"+name+": "+str+"}";}
$elem.addClass(str);}
function toStr(o){var outstr="{";var name;var sep="";for(name in o){var d=o[name];var t=typeof d;outstr+=sep+name+": ";if(t=='string'){outstr+='"'+d+'"';}
else outstr+=d;sep=", ";}
outstr+="}";return outstr;}}
$.sRule=function(name,cssStr,index){var sheet=document.styleSheets[0];if(sheet.insertRule){index=$.sLib.defArg(index,0);sheet.insertRule(name+" {"+cssStr+"}",index);}
else if(sheet.addRule){index=$.sLib.defArg(index,-1);sheet.addRule(name,cssStr,index);}}
$(document).ready(function(){Sonata.roundies(".sLib-roundbox7",7);Sonata.roundies(".sLib-roundbox4",4);});})(jQuery);
/* json2.js */
var JSON;if(!JSON){JSON={};}
(function(){"use strict";function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());JSON.encode=JSON.stringify;JSON.decode=JSON.parse;
/* webpage.js */
function WebPage(opts){var defs={btnSelected:"",search:"searchBox"}
var options=$.extend({},defs,opts);monitorHrefs();var search=$("#"+options.search+"BtnId").click(doSearch);if(options.btnSelected){var btn=$("#"+options.btnSelected).addClass("btnSelected");}
var smbtns=$(".button-small");smbtns.each(dosmall);function dosmall(){var p=$(this);p.mouseover(over);p.mouseout(out);var d=p.metadata();p.click(onclick);function over(){p.addClass('button-small-hover');}
function out(){p.removeClass('button-small-hover');}
function onclick(){location=d.href;}}
function doSearch(){var q=$("#"+options.search+"Id").val();location="pg_sitesearch.php?q="+q;}
function monitorHrefs(){var itn=$('.pdfcurriculum').click(onCurriculum);var wtw=$('.pdfextra').click(onExtra);function show(){mprint("href="+this.href);}
function onCurriculum(evt){doCount("curriculum",this);evt.preventDefault();}
function onExtra(evt){doCount("extra",this);evt.preventDefault();}
function doCount(categ,elem){var href=elem.href;var parts=href.split('/');href=parts[parts.length-1];href=href.replace(/\%20/g," ");_gaq.push(['_trackPageview',"/newsletters/"+categ+"/"+href]);setTimeout(reloc,100);function reloc(){location=elem.href;}}}}
WebPage.runSlideShow=function(opts){var defopts={id:'slidepics',left:'slideshowleftId',right:'slideshowrightId',controls:"visible"};$opts=$.extend({},defopts,opts);var pics=$("#"+opts.id);var left=$("#"+opts.left);var right=$("#"+opts.right);var table=$("#table"+opts.id);var controls=opts.controls;left.css("visibility",controls);right.css("visibility",controls);var slideOptions=null;setTimeout(start,400);function start(){pics.cycle({fx:"fade",pause:0,timeout:4000,speed:3000,random:1,speedIn:2000,speedOut:2000,sync:1,fit:1,after:onAfter,before:onBefore});pics.css("visibility","visible");pics.hover(mover,mout);pics.click(donext);left.click(prevPhoto);right.click(nextPhoto);if(controls=='hidden'){table.bind("mouseover",tablemover);table.bind("mouseout",tablemout);}
function tablemover(){left.css("visibility","visible");right.css("visibility","visible");}
function tablemout(){left.css("visibility","hidden");right.css("visibility","hidden");}
function donext(){nextPhoto();}
function mover(event){pics.cycle("pause");}
function mout(event){pics.cycle("resume");}
function onBefore(curr,next,opts){slideOptions=opts;}
function onAfter(curr,next,opts){}
function prevPhoto(){var opts=slideOptions;if(opts!=null){var curr=opts.currSlide;var last=opts.slideCount;if(curr>0)
pics.cycle(curr-1);else pics.cycle(last-1);}}
function nextPhoto(){var opts=slideOptions;if(opts!=null){var curr=opts.currSlide;var last=opts.slideCount-1;if(curr<last)
pics.cycle(curr+1);else pics.cycle(0);}}}}
WebPage.setActiveButton=function(pagename){var text=$(".navbuttontext").removeClass("activebuttontext");var btn=$(".").removeClass("navbuttonouter").removeClass("activebuttonouter");$("#nav_"+pagename+"_outer_id").addClass('activebuttonouter');$("#nav_"+pagename+"_text_id").addClass('activebuttontext');}
WebPage.COLOR_GRAY='#eeeeee';WebPage.COLOR_HOWLEARN='rgb(255,215,0)';WebPage.COLOR_GREY="#d1d8d8";WebPage.COLOR_GREEN="#d8ed96";WebPage.COLOR_PINK="#f9bfc1";WebPage.COLOR_TAN="#f4e5bc";WebPage.COLOR_LIGHTBLUE="#87e0e6";WebPage.COLOR_POWDERBLUE="#b0e0e6";WebPage.COLOR_SKYBLUE="#87ceeb";WebPage.COLOR_LIGHTSKYBLUE="#87cefa";WebPage.COLOR_LIGHTCYAN="#e0ffff";WebPage.COLOR_TURQUOISE="#40e0d0";WebPage.COLOR_LIGHTTURQUOISE="#5efeee";WebPage.COLOR_THISTLE="#d8bfd8";WebPage.COLOR_SILVER="#c0c0c0";WebPage.COLOR_AZURE="#f0ffff";WebPage.COLOR_AQUA="#00ffff";WebPage.COLOR_LIGHTAQUA="#7dffff";WebPage.COLOR_WHEAT="#f5deb3";WebPage.COLOR_PEACHPUFF="#ffdab9";WebPage.COLOR_PAPAYAWHIP="#ffefd5";WebPage.COLOR_PALEGOLDENROD="#eee8aa";WebPage.COLOR_MOCCASIN="#ffe4b5";WebPage.COLOR_MINTCREAM="#f5fffa";WebPage.COLOR_LINEN="#faf0e6";WebPage.COLOR_LIGHTYELLOW="#ffffe0";WebPage.COLOR_LIGHTGOLDENRODYELLOW="#fafad2";WebPage.COLOR_KHAKI="#f0e68c";WebPage.COLOR_GOLD="#ffd700";WebPage.COLOR_LIGHTSALMON="#ffa07a";WebPage.COLOR_LIGHTMISTYROSE="#ffe4e1";WebPage.COLOR_MISTYROSE="#ffd0cd";WebPage.COLOR_CORNSILK="#fff8dc";WebPage.COLOR_BEIGE="#f5f5dc";WebPage.COLOR_HONEYDEW="#f0fff0";WebPage.COLOR_AQUAMARINE="#7fffd4";WebPage.didInit=false;WebPage.init=function(){if(WebPage.didInit)return false;WebPage.didInit=true;$.sRule(".sRedarrow-arrow","padding-left:3px;background-color: white;font-size: 9pt; font-family: arial; color: red; cursor: default;overflow:hidden;background-image:url(js/sLib_images/sRedarrow.redarrow.gif);background-repeat:no-repeat; background-position:right center;");var blockstart=$(".reg_blockstart");var blocks=$(".reg_block");blockstart.each(doblockstart);blocks.each(doblocks);return true;function doblockstart(index){if(index>0){t=$(this);t.addClass("reg_blockstart2");}}
function doblocks(index){var t=$(this);var meta=t.metadata();if(meta.bgcolor)t.css({backgroundColor:meta.bgcolor});}}
WebPage.setForm=function(fldset,fields,opts){if(typeof fields=='undefined')return;var dlg=$.sDialog.makeDialogBox({width:400,height:120,hasCancel:true,hasOK:true,title:"This is my title",body:"",modal:true,draggable:true});var savingDialog=$.sDialog.makeDialogBox({width:400,height:120,title:"Saving registration...",hasOK:false,hasCancel:false,hasClose:false});var submitDialog=$.sDialog.makeDialogBox({width:400,height:120,title:"Registration submitted.",hasOK:true,hasCancel:false,hasClose:true,closeCB:closeSubmit,okCB:closeSubmit});$("#submitbtn").click(onsubmit);function closeSubmit(){submitDialog.hide();fields.clearData();}
function onsubmit(){var httpsubmit=opts.httpsubmit;fields.hideVerifyArrows();var values=fields.verifyData();if(values.ok==false){fields.showVerifyArrows(values.verifyData);}
else{var text=fields.dataToText(values.data);if(httpsubmit){savingDialog.showBody("Connecting to the server to submit your registration. Please wait.");$.post(opts.httpsubmit,{cmd:'save',data:JSON.encode(values.data),text:text},ondone,"text");}}
function ondone(response){savingDialog.hide();response=$.sLib.eval(response);if(response.ok){submitDialog.showBody("Your information has been sent to Universal Vending Management. You will be contacted shortly.");}
else{}}}}
WebPage.verifyHowlearn=function(field,s,data,kmmform){var text;if(s=="Website"){text=$("#fld_howlearn_website_text").val();if(text=="")return false;}
else if(s=="Newspaper"){text=$("#fld_howlearn_newspaper_text").val();if(text=="")return false;}
else if(s=="Other"){text=$("#fld_howlearn_other_text").val();if(text=="")return false;}
return true;}
WebPage.verifyYesNo=function(field,s,data,kmmform){return true;}
WebPage.makeDialog=function(dlgOpts){var dlg=$.sDialog.makeDialogBox(dlgOpts);dlg.showPos=dlg.show;dlg.show=doShow;return dlg;function doShow(body){if(body)dlg.setBody(body);dlg.showPos();}}
WebPage.makeDialogBox=function(dlgOpts){return WebPage.makeDialog(dlgOpts);}
WebPage.eval=function(text)
{var v='('+text+')';return eval(v);}
WebPage.dlgOptions={moverBgColor:"rgb(178,1,1)",moverCss:"",titleCss:"color:#ffffff;",bodyCss:"",closeBtn:false,closeOnEsc:false,modal:true,bgColor:"#000000",bgAlpha:.2};WebPage.makeDialogOLD=function(dlgOpts){var thisptr=this;dlgOpts=$.extend({},{title:"Working...",ondone:null,okBtn:false,cancelBtn:false,okcb:null,cancelcb:null},dlgOpts);var title=dlgOpts.title;var okcb=dlgOpts.okcb;var cancelcb=dlgOpts.cancelcb;var okBtn=dlgOpts.okBtn;var cancelBtn=dlgOpts.cancelBtn;var dlgopts=WebPage.dlgOptions;var opts=$.extend({},dlgopts);var dlg=$.sDialog.makeDialogBox(opts);var okid="ok-btn"+document.uniqueId();var cancelid="cancel-btn"+document.uniqueId();var errid="ok-errmsg"+document.uniqueId();var html="<div id='"+errid+"'>&nbsp;</div>";if(okBtn||cancelBtn){var okhtml="<button id='"+okid+"' type='button'>Ok</button>";var cancelhtml="<button id='"+cancelid+"' type='button'>Cancel</button>";var btnhtml="";if(okBtn&&cancelBtn)btnhtml=okhtml+"&nbsp;&nbsp;"+cancelhtml;else if(okBtn)btnhtml=okhtml;else if(cancelBtn)btnhtml=cancelhtml;html+="<br><div align='center' style='padding-top:10px;'>"+btnhtml+"<div>";}
if(typeof title=='undefined')
title="Working...";dlg.setHtml(dlg.options.titleid,title);dlg.setHtml(dlg.options.bodyid,html);dlg.showOrig=dlg.show;dlg.show=showme;setTimeout(getelems,200);return dlg;function showme(errmsg,title){if(typeof title!='undefined')
dlg.setHtml(dlg.options.titleid,title);dlg.setHtml(errid,errmsg);dlg.showOrig();}
function getelems(){$("#"+okid).click(ok);$("#"+cancelid).click(oncancel);}
function ok(){dlg.hide();if(typeof okcb=='function')
okcb();}
function oncancel(){dlg.hide();if(typeof cancelcb=='function')
cancelcb();}}
WebPage.scrollTop=function(top,body,ms){var ctop=body.scrollTop();var wht=$(window).height();if(top>=ctop&&top<=(ctop+wht-50))return;var dif=Math.abs(top-ctop);var start=new Date().getTime();var cnt=0;var dir=top<ctop?-1:1;var ival=setInterval(doscroll,50);function doscroll(){cnt++;var inctop=ctop;var dtime=new Date().getTime()-start;var pos=ctop+dir*Math.floor(dtime/ms*dif);if(dtime>=ms||cnt>100){pos=top;clearInterval(ival);}
body.scrollTop(pos);}}
WebPage.escapeObj=function(data){var name;var ret={};for(name in data){ret[name]=WebPage.escape(data[name]);}
return ret;}
WebPage.unescapeObj=function(data){var name;var ret={};for(name in data){ret[name]=WebPage.unescape(data[name]);}
return ret;}
WebPage.escape=function(s){if(typeof s!='string')return s;var ret=s.replace(/\'/g,"[SQ]");ret=ret.replace(/\"/g,"[DQ]");ret=ret.replace(/\n/g,"[NL]");return ret;}
WebPage.unescape=function(s){if(typeof s!='string')return s;var ret=s.replace(/\[SQ\]/g,"'");ret=ret.replace(/\[DQ\]/g,'"');ret=ret.replace(/\[NL\]/g,"\n");return ret;}
WebPage.PrintPage=function(opts){var options=$.extend({},{wrapper:'wrapperId',pageContent:'pageContentAreaId',pageContentOuter:'pageContentAreaOuterId',printBtn:'printBtnId'},opts);var ret={};ret.printContent=printContent;return ret;function printContent(){var o=options;var wrapper=$("#"+o.wrapper);var pageContent=$("#"+o.pageContent);var pageContentOuter=$("#"+o.pageContentOuter);var printBtn=$("#"+o.printBtn);var width=pageContent.width();var scrollTop=$(document).scrollTop();var $body=$(document.body);var div=$("<div>").css({position:'absolute',left:0,top:0,width:width,padding:5});div.append(pageContent);$(document).scrollTop(0);$body.addClass('printbgcolor');wrapper.css({visibility:'hidden',display:'none'});$body.append(div);var doneButton=$("<button type='button'>");doneButton.css({position:'absolute',left:width+40,top:25,display:'block',fontSize:'12pt'});doneButton.html("Return to Page View");doneButton.click(after);document.body.appendChild(doneButton[0]);printBtn.addClass("noprint_div");window.print();function after(){$body.removeClass('printbgcolor');wrapper.css({visibility:'visible',display:'block'}).removeClass("noprint_div");pageContentOuter.append(pageContent);printBtn.removeClass("noprint_div");document.body.removeChild(doneButton[0]);$(document).scrollTop(scrollTop);}}}
