// cookie
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('o.5=w(a,b,2){7(g b!=\'u\'){2=2||{};7(b===n){b=\'\';2.3=-1}4 3=\'\';7(2.3&&(g 2.3==\'k\'||2.3.l)){4 6;7(g 2.3==\'k\'){6=D C();6.B(6.y()+(2.3*A*m*m*E))}j{6=2.3}3=\'; 3=\'+6.l()}4 8=2.8?\'; 8=\'+2.8:\'\';4 9=2.9?\'; 9=\'+2.9:\'\';4 c=2.c?\'; c\':\'\';d.5=[a,\'=\',r(b),3,8,9,c].t(\'\')}j{4 h=n;7(d.5&&d.5!=\'\'){4 e=d.5.x(\';\');z(4 i=0;i<e.f;i++){4 5=o.q(e[i]);7(5.p(0,a.f+1)==(a+\'=\')){h=v(5.p(a.f+1));F}}}s h}};',42,42,'||options|expires|var|cookie|date|if|path|domain|name|value|secure|document|cookies|length|typeof|cookieValue||else|number|toUTCString|60|null|jQuery|substring|trim|encodeURIComponent|return|join|undefined|decodeURIComponent|function|split|getTime|for|24|setTime|Date|new|1000|break'.split('|'),0,{}))

//json
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(4($){8 m={\'\\b\':\'\\\\b\',\'\\t\':\'\\\\t\',\'\\n\':\'\\\\n\',\'\\f\':\'\\\\f\',\'\\r\':\'\\\\r\',\'"\':\'\\\\"\',\'\\\\\':\'\\\\\\\\\'},s={\'q\':4(x){8 a=[\'[\'],b,f,i,l=x.6,v;o(i=0;i<l;i+=1){v=x[i];f=s[7 v];3(f){v=f(v);3(7 v==\'e\'){3(b){a[a.6]=\',\'}a[a.6]=v;b=p}}}a[a.6]=\']\';2 a.k(\'\')},\'P\':4(x){2 B(x)},\'d\':4(x){2"d"},\'A\':4(x){2 G(x)?B(x):\'d\'},\'U\':4(x){3(x){3(x N M){2 s.q(x)}8 a=[\'{\'],b,f,i,v;o(i V x){v=x[i];f=s[7 v];3(f){v=f(v);3(7 v==\'e\'){3(b){a[a.6]=\',\'}a.H(s.e(i),\':\',v);b=p}}}a[a.6]=\'}\';2 a.k(\'\')}2\'d\'},\'e\':4(x){3(/["\\\\\\y-\\z]/.w(x)){x=x.O(/([\\y-\\z\\\\"])/g,4(a,b){8 c=m[b];3(c){2 c}c=b.Q();2\'\\\\S\'+T.K(c/h).D(h)+(c%h).D(h)})}2\'"\'+x+\'"\'}};$.I=4(v){8 f=J(v)?s[7 v]:s[\'A\'];3(f)2 f(v)};$.j=4(v,5){3(5===C)5=$.j.5;3(5&&!/^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+E-u \\n\\r\\t])+?$/.w(v))2 C;2 F(\'(\'+v+\')\')};$.j.5=L})(R);',58,58,'||return|if|function|safe|length|typeof|var|||||null|string|||16||parseJSON|join||||for|true|array||||||test||x00|x1f|number|String|undefined|toString|Eaeflnr|eval|isFinite|push|toJSON|isNaN|floor|false|Array|instanceof|replace|boolean|charCodeAt|jQuery|u00|Math|object|in'.split('|'),0,{}))

// .cookieJar - Cookie Jar Plugin
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('(4($){$.F=4(3,1){2(!$.p)5 g;2(!$.d)5 g;2(!$.a)5 g;5 o 4(){4 7(s){2(f l!=\'m\'&&f l.7!=\'m\'){l.7(\'H:\'+0.e+\' \'+s)}n{C(s)}};4 b(){2(0.1.8)7(\'b \'+$.d(0.6));5 $.a(0.e,$.d(0.6),0.1.a)};4 c(){z h=$.a(0.e);2(f h==\'D\'){2(0.1.8)7(\'c \'+h);0.6=$.p(h,v)}n{2(0.1.8)7(\'c o\');0.6={};b()}}9.t=4(3,k){2(0.1.8)7(\'t \'+3+\' = \'+k);0.6[3]=k;5 b()};9.r=4(3){2(!0.1.w){c()}2(0.1.8)7(\'r \'+3+\' = \'+0.6[3]);5 0.6[3]};9.q=4(3){2(0.1.8)7(\'q \'+3);2(f 3!=\'m\'){E(0.6[3])}n{0.j({})}5 b()};9.j=4(i){2(f i==\'i\'){2(0.1.8)7(\'j\');0.6=i;5 b()}};9.u=4(){2(0.1.8)7(\'u\');5 0.6};9.B=4(){2(0.1.8)7(\'B = \'+$.d(0.6));5 $.d(0.6)};9.A=4(){2(0.1.8)7(\'A\');0.6={};5 $.a(0.e,N,0.1.a)};9.y=4(3,1){0.1=$.I({a:{J:M,K:\'/\'},w:v,x:\'L\',8:g},1);0.e=0.1.x+3;c();5 0};z 0=9;0.y(3,1)}}})(G);',50,50,'self|options|if|name|function|return|cookieObject|log|debug|this|cookie|save|load|toJSON|cookieName|typeof|false|cookieJSON|object|setFromObject|value|console|undefined|else|new|parseJSON|remove|get||set|toObject|true|cacheCookie|cookiePrefix|construct|var|destroy|toString|alert|string|delete|cookieJar|jQuery|cookiejar|extend|expires|path|jqCookieJar_|1|null'.split('|'),0,{}));

// jQuery Color Animations
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(o(g){g.2e([\'G\',\'Y\',\'W\',\'19\',\'1h\',\'7\',\'R\'],o(i,d){g.5.U[d]=o(5){e(5.1i==0){5.c=I(5.h,d);5.n=v(5.n)}5.h.29[d]="t("+[m.y(m.z(8((5.B*(5.n[0]-5.c[0]))+5.c[0]),4),0),m.y(m.z(8((5.B*(5.n[1]-5.c[1]))+5.c[1]),4),0),m.y(m.z(8((5.B*(5.n[2]-5.c[2]))+5.c[2]),4),0)].25(",")+")"}});o v(7){A 6;e(7&&7.14==23&&7.13==3)f 7;e(6=/t\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.p(7))f[8(6[1]),8(6[2]),8(6[3])];e(6=/t\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.p(7))f[x(6[1])*2.w,x(6[2])*2.w,x(6[3])*2.w];e(6=/#([a-k-j-9]{2})([a-k-j-9]{2})([a-k-j-9]{2})/.p(7))f[8(6[1],16),8(6[2],16),8(6[3],16)];e(6=/#([a-k-j-9])([a-k-j-9])([a-k-j-9])/.p(7))f[8(6[1]+6[1],16),8(6[2]+6[2],16),8(6[3]+6[3],16)];f D[g.1M(7).1L()]}o I(h,d){A 7;1I{7=g.1H(h,d);e(7!=\'\'&&7!=\'1F\'||g.1E(h,"1D"))1C;d="G"}1z(h=h.1n);f v(7)};A D={1t:[0,4,4],1u:[H,4,4],1w:[F,F,1B],1G:[0,0,0],1K:[0,0,4],1O:[L,J,J],1Q:[0,4,4],1R:[0,0,l],1T:[0,l,l],1Y:[u,u,u],20:[0,21,0],26:[27,2a,M],2b:[l,0,l],17:[15,M,P],12:[4,K,0],11:[1X,S,1S],V:[l,0,0],1N:[1a,1b,1d],1e:[1j,0,q],1k:[4,0,4],1m:[4,1o,0],1q:[0,b,0],1r:[1v,0,1x],1J:[H,C,K],1U:[1Z,22,C],2c:[E,4,4],O:[N,Q,N],T:[q,q,q],Z:[4,1c,1f],1l:[4,4,E],1s:[0,4,0],1y:[4,0,4],1P:[b,0,0],1V:[0,0,b],24:[b,b,0],28:[4,L,0],10:[4,r,X],1g:[b,0,b],1p:[b,0,b],1W:[4,0,0],2d:[r,r,r],18:[4,4,4],1A:[4,4,0]}})(g);',62,139,'||||255|fx|result|color|parseInt|||128|start|attr|if|return|jQuery|elem||F0|fA|139|Math|end|function|exec|211|192||rgb|169|getRGB|55|parseFloat|max|min|var|pos|230|colors|224|245|backgroundColor|240|getColor|42|140|165|107|144|lightgreen|47|238|outlineColor|50|lightgrey|step|darkred|borderLeftColor|203|borderBottomColor|lightpink|pink|darkorchid|darkorange|length|constructor|85||darkolivegreen|white|borderRightColor|233|150|182|122|darkviolet|193|purple|borderTopColor|state|148|fuchsia|lightyellow|gold|parentNode|215|violet|green|indigo|lime|aqua|azure|75|beige|130|magenta|while|yellow|220|break|body|nodeName|transparent|black|curCSS|do|khaki|blue|toLowerCase|trim|darksalmon|brown|maroon|cyan|darkblue|204|darkcyan|lightblue|navy|red|153|darkgrey|173|darkgreen|100|216|Array|olive|join|darkkhaki|189|orange|style|183|darkmagenta|lightcyan|silver|each'.split('|'),0,{}))

// SelectBoxex
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.n.M=6(){5 e=6(a,v,t,b){5 c=Z.W("P");c.j=v,c.G=t;5 o=a.y;5 d=o.l;3(!a.p){a.p={};q(5 i=0;i<d;i++){a.p[o[i].j]=i}}3(9 a.p[v]=="Q")a.p[v]=d;a.y[a.p[v]]=c;3(b){c.k=8}};5 a=N;3(a.l==0)7 4;5 f=8;5 m=x;5 g,v,t;3(9(a[0])=="B"){m=8;g=a[0]}3(a.l>=2){3(9(a[1])=="L")f=a[1];h 3(9(a[2])=="L")f=a[2];3(!m){v=a[0];t=a[1]}}4.u(6(){3(4.A.s()!="z")7;3(m){q(5 a 11 g){e(4,a,g[a],f)}}h{e(4,v,t,f)}});7 4};$.n.10=6(b,c,d,e,f){3(9(b)!="E")7 4;3(9(c)!="B")c={};3(9(d)!="L")d=8;4.u(6(){5 a=4;$.Y(b,c,6(r){$(a).M(r,d);3(9 e=="6"){3(9 f=="B"){e.X(a,f)}h{e.J(a)}}})});7 4};$.n.V=6(){5 a=N;3(a.l==0)7 4;5 d=9(a[0]);5 v,C;3(d=="E"||d=="B"||d=="6")v=a[0];h 3(d=="U")C=a[0];h 7 4;4.u(6(){3(4.A.s()!="z")7;3(4.p)4.p=O;5 b=x;5 o=4.y;3(!!v){5 c=o.l;q(5 i=c-1;i>=0;i--){3(v.H==I){3(o[i].j.K(v)){b=8}}h 3(o[i].j==v){b=8}3(b&&a[1]===8)b=o[i].k;3(b){o[i]=O}b=x}}h{3(a[1]===8){b=o[C].k}h{b=8}3(b){4.T(C)}}});7 4};$.n.S=6(f){5 a=9(f)=="Q"?8:!!f;4.u(6(){3(4.A.s()!="z")7;5 o=4.y;5 d=o.l;5 e=[];q(5 i=0;i<d;i++){e[i]={v:o[i].j,t:o[i].G}}e.R(6(b,c){D=b.t.s(),F=c.t.s();3(D==F)7 0;3(a){7 D<F?-1:1}h{7 D>F?-1:1}});q(5 i=0;i<d;i++){o[i].G=e[i].t;o[i].j=e[i].v}});7 4};$.n.18=6(b,d){5 v=b;5 e=9(b);5 c=d||x;3(e!="E"&&e!="6"&&e!="B")7 4;4.u(6(){3(4.A.s()!="z")7 4;5 o=4.y;5 a=o.l;q(5 i=0;i<a;i++){3(v.H==I){3(o[i].j.K(v)){o[i].k=8}h 3(c){o[i].k=x}}h{3(o[i].j==v){o[i].k=8}h 3(c){o[i].k=x}}}});7 4};$.n.17=6(b,c){5 w=c||"k";3($(b).16()==0)7 4;4.u(6(){3(4.A.s()!="z")7 4;5 o=4.y;5 a=o.l;q(5 i=0;i<a;i++){3(w=="15"||(w=="k"&&o[i].k)){$(b).M(o[i].j,o[i].G)}}});7 4};$.n.14=6(b,c){5 d=x;5 v=b;5 e=9(v);5 f=9(c);3(e!="E"&&e!="6"&&e!="B")7 f=="6"?4:d;4.u(6(){3(4.A.s()!="z")7 4;3(d&&f!="6")7 x;5 o=4.y;5 a=o.l;q(5 i=0;i<a;i++){3(v.H==I){3(o[i].j.K(v)){d=8;3(f=="6")c.J(o[i])}}h{3(o[i].j==v){d=8;3(f=="6")c.J(o[i])}}}});7 f=="6"?4:d};$.n.13=6(){5 v=[];4.12("P:k").u(6(){v[v.l]=4.j});7 v}})(19);',62,72,'|||if|this|var|function|return|true|typeof||||||||else||value|selected|length||fn||cache|for||toLowerCase||each|||false|options|select|nodeName|object|index|o1t|string|o2t|text|constructor|RegExp|call|match|boolean|addOption|arguments|null|option|undefined|sort|sortOptions|remove|number|removeOption|createElement|apply|getJSON|document|ajaxAddOption|in|find|selectedValues|containsOption|all|size|copyOptions|selectOptions|jQuery'.split('|'),0,{}))

// getPageSize / getPageScroll
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('i z(){g 4,2;3(9.o){2=9.o;4=9.y}6 3(0.5&&0.5.d){2=0.5.d;4=0.5.r}6 3(0.1){2=0.1.d;4=0.1.r}s=p q(4,2);k s};i u(){g 4,2;3(a.c&&a.j){4=a.n+a.v;2=a.c+a.j}6 3(0.1.l>0.1.m){4=0.1.w;2=0.1.l}6{4=0.1.x;2=0.1.m}g 7,8;3(9.c){3(0.5.b){7=0.5.b}6{7=9.n}8=9.c}6 3(0.5&&0.5.h){7=0.5.b;8=0.5.h}6 3(0.1){7=0.1.b;8=0.1.h}3(2<8){f=8}6{f=2}3(4<7){e=4}6{e=7}t=p q(e,f,7,8);k t};',36,36,'document|body|yScroll|if|xScroll|documentElement|else|windowWidth|windowHeight|self|window|clientWidth|innerHeight|scrollTop|pageWidth|pageHeight|var|clientHeight|function|scrollMaxY|return|scrollHeight|offsetHeight|innerWidth|pageYOffset|new|Array|scrollLeft|arrayPageScroll|arrayPageSize|getPageSize|scrollMaxX|scrollWidth|offsetWidth|pageXOffset|getPageScroll'.split('|'),0,{}))

/* jQuery Cycle Plugin (with Transition Definitions) 2.72 */
/*!
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2009 M. Alsup
 * Version: 2.72 (09-SEP-2009)
 * 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
 *
 * Originally based on the work of:
 *	1) Matt Oakes
 *	2) Torsten Baldes (http://medienfreunde.com/lab/innerfade/)
 *	3) Benjamin Sterling (http://www.benjaminsterling.com/experiments/jqShuffle/)
 */
;(function($) {

var ver = '2.72';

// if $.support is not defined (pre jQuery 1.3) add what I need
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,' '));
	//$('body').append('<div>'+Array.prototype.join.call(arguments,' ')+'</div>');
};

// the options arg can be...
//   a number  - indicates an immediate transition should occur to the given slide index
//   a string  - 'stop', 'pause', 'resume', or the name of a transition effect (ie, 'fade', 'zoom', etc)
//   an object - properties to control the slideshow
//
// the arg2 arg can be...
//   the name of an fx (only used in conjunction with a numeric value for 'options')
//   the value true (only used in conjunction with a options == 'resume') and indicates
//	 that the resume should occur immediately (not wait for next timeout)

$.fn.cycle = function(options, arg2) {
	var o = { s: this.selector, c: this.context };

	// in 1.3+ we can fix mistakes with the ready state
	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;
		}
		// is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
		log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
		return this;
	}

	// iterate the matched nodeset
	return this.each(function() {
		var opts = handleArguments(this, options, arg2);
		if (opts === false)
			return;

		// stop existing slideshow for this container (if there is one)
		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 it's an auto slideshow, kick it off
		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);
		}
	});
};

// process the args that were passed to the plugin fn
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++; // callbacks look for change
			if (cont.cycleTimeout)
				clearTimeout(cont.cycleTimeout);
			cont.cycleTimeout = 0;
			$(cont).removeData('cycle.opts');
			return false;
		case 'pause':
			cont.cyclePause = 1;
			return false;
		case 'resume':
			cont.cyclePause = 0;
			if (arg2 === true) { // resume now!
				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) {
		// go to the requested slide
		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) {} // handle old opera versions
	}
};

// one-time initialization
function buildOptions($cont, $slides, els, options, o) {
	// support metadata plugin (v1.0 and v2.0)
	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; });

	// push some after callbacks
	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);

	// clearType corrections
	if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
		clearTypeFix($slides);

	// container requires non-static position so that slides can be position within
	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 random, mix up the slide array
	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 = 0;
		opts.startingSlide = opts.randomMap[0];
	}
	else if (opts.startingSlide >= els.length)
		opts.startingSlide = 0; // catch bogus input
	opts.currSlide = opts.startingSlide = opts.startingSlide || 0;
	var first = opts.startingSlide;

	// set position and zIndex on all the slides
	$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)
	});

	// make sure first slide is visible
	$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
	removeFilter(els[first], opts);

	// stretch slides
	if (opts.fit && opts.width)
		$slides.width(opts.width);
	if (opts.fit && opts.height && opts.height != 'auto')
		$slides.height(opts.height);

	// stretch container
	var reshape = opts.containerResize && !$cont.innerHeight();
	if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
		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;

	// apparently a lot of people use image slideshows without height/width attributes on the images.
	// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
	var requeue = false;
	options.requeueAttempts = options.requeueAttempts || 0;
	$slides.each(function() {
		// try to get height/width of each slide
		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') ) {
			// sigh..  sniffing, hacking, shrugging...  this crappy hack tries to account for what browsers do when
			// an image is being downloaded and the markup did not include sizing info (height/width attributes);
			// there seems to be some "default" sizes used in this situation
			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);
			// don't requeue for images that are still loading but have a valid size
			if (loadingIE || loadingFF || loadingOp || loadingOther) {
				if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
					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; // break each loop
				}
				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);
		// ensure that timeout and speed settings are sane
		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) // sanitize timeout
			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) {
		opts.nextSlide = opts.currSlide;
		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;

	// run transition init fn
	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;
		}
	}

	// fire artificial events
	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;
};

// save off original opts so we can restore after clearing state
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;
	// look for multiple effects
	if (opts.fx.indexOf(',') > 0) {
		opts.multiFx = true;
		opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
		// discard any bogus effect names
		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 we have an empty list then we threw everything away!
		if (!opts.fxs.length) {
			log('No valid transitions named; slideshow terminating.');
			return false;
		}
	}
	else if (opts.fx == 'all') {  // auto-gen the list of transitions
		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) {
		// munge the fxs array to make effect selection random
		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;
};

// provide a mechanism for adding slides after the slideshow has started
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); // shuffle needs this
		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(); // default behavior
	};
}

// reset internal state; we do this on every pass in order to support multiple effects
$.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); });

	// re-init
	var init = $.fn.cycle.transitions[fx];
	if ($.isFunction(init))
		init(opts.$cont, $(opts.elements), opts);
};

// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
function go(els, opts, manual, fwd) {
	// opts.busy is true if we're in the middle of an animation
	if (manual && opts.busy && opts.manualTrump) {
		// let manual transitions requests trump active ones
		$(els).stop(true,true);
		opts.busy = false;
	}
	// don't begin another timeout-based transition if there is one active
	if (opts.busy)
		return;

	var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];

	// stop cycling if we have an outstanding stop request
	if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
		return;

	// check to see if we should stop cycling based on autostop options
	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 slideshow is paused, only transition on a manual trigger
	if (manual || !p.cyclePause) {
		var fx = opts.fx;
		// keep trying to get the slide size if we don't have it yet
		curr.cycleH = curr.cycleH || $(curr).height();
		curr.cycleW = curr.cycleW || $(curr).width();
		next.cycleH = next.cycleH || $(next).height();
		next.cycleW = next.cycleW || $(next).width();

		// support multiple transition types
		if (opts.multiFx) {
			if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length)
				opts.lastFx = 0;
			fx = opts.fxs[opts.lastFx];
			opts.currFx = fx;
		}

		// one-time fx overrides apply to:  $('div').cycle(3,'zoom');
		if (opts.oneTimeFx) {
			fx = opts.oneTimeFx;
			opts.oneTimeFx = null;
		}

		$.fn.cycle.resetState(opts, fx);

		// run the before callbacks
		if (opts.before.length)
			$.each(opts.before, function(i,o) {
				if (p.cycleStop != opts.stopCount) return;
				o.apply(next, [curr, next, opts, fwd]);
			});

		// stage the after callacks
		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) {
			// get ready to perform the transition
			opts.busy = 1;
			if (opts.fxFn) // fx function provided?
				opts.fxFn(curr, next, opts, after, fwd);
			else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
				$.fn.cycle[opts.fx](curr, next, opts, after);
			else
				$.fn.cycle.custom(curr, next, opts, after, manual && opts.fastOnEvent);
		}

		// calculate the next slide
		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 { // sequence
			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)
			$.fn.cycle.updateActivePagerLink(opts.pager, opts.currSlide);
	}

	// stage the next transtion
	var ms = 0;
	if (opts.timeout && !opts.continuous)
		ms = getTimeout(curr, next, opts, fwd);
	else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
		ms = 10;
	if (ms > 0)
		p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.rev) }, ms);
};

// invoked after transition
$.fn.cycle.updateActivePagerLink = function(pager, currSlide) {
	$(pager).find('a').removeClass('activeSlide').filter('a:eq('+currSlide+')').addClass('activeSlide');
};

// calculate timeout value for current transition
function getTimeout(curr, next, opts, fwd) {
	if (opts.timeoutFn) {
		// call user provided calc fn
		var t = opts.timeoutFn(curr,next,opts,fwd);
		while ((t - opts.speed) < 250) // sanitize timeout
			t += opts.speed;
		debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
		if (t !== false)
			return t;
	}
	return opts.timeout;
};

// expose next/prev function, caller must pass in state
$.fn.cycle.next = function(opts) { advance(opts, opts.rev?-1:1); };
$.fn.cycle.prev = function(opts) { advance(opts, opts.rev?1:-1);};

// advance slide forward or back
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) {
		// move back to the previously display slide
		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) {
		if (++opts.randomIndex == els.length)
			opts.randomIndex = 0;
		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);
	});
   $.fn.cycle.updateActivePagerLink(opts.pager, opts.startingSlide);
};

$.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);
	// don't reparent if anchor is in the dom
	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);
			});
			$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); // trigger the trans
		return false;
	});

	if (opts.pagerEvent != 'click')
		$a.click(function(){return false;}); // supress click

	if (opts.pauseOnPagerHover)
		$a.hover(function() { opts.$cont[0].cyclePause++; }, function() { opts.$cont[0].cyclePause--; } );
};

// helper fn to calculate the number of slides between the current and the next
$.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;
};

// fix clearType problems in ie6 by setting an explicit bg color
// (otherwise text slides look horrible during a fade transition)
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)); });
};

// reset common props before the next transition
$.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));
};

// the actual fn for effecting a transition
$.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();
};

// transition definitions - only fade is defined here, transition pack defines the rest
$.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; };

// override these globally if you like (they are all optional)
$.fn.cycle.defaults = {
	fx:			  'fade', // name of transition effect (or comma separated names, ex: fade,scrollUp,shuffle)
	timeout:	   4000,  // milliseconds between slide transitions (0 to disable auto advance)
	timeoutFn:	 null,  // callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag)
	continuous:	   0,	  // true to start next transition immediately after current one completes
	speed:		   1000,  // speed of the transition (any valid fx speed value)
	speedIn:	   null,  // speed of the 'in' transition
	speedOut:	   null,  // speed of the 'out' transition
	next:		   null,  // selector for element to use as click trigger for next slide
	prev:		   null,  // selector for element to use as click trigger for previous slide
	prevNextClick: null,  // callback fn for prev/next clicks:	function(isNext, zeroBasedSlideIndex, slideElement)
	prevNextEvent:'click',// event which drives the manual transition to the previous or next slide
	pager:		   null,  // selector for element to use as pager container
	pagerClick:	   null,  // callback fn for pager clicks:	function(zeroBasedSlideIndex, slideElement)
	pagerEvent:	  'click', // name of event which drives the pager navigation
	pagerAnchorBuilder: null, // callback fn for building anchor links:  function(index, DOMelement)
	before:		   null,  // transition callback (scope set to element to be shown):	 function(currSlideElement, nextSlideElement, options, forwardFlag)
	after:		   null,  // transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag)
	end:		   null,  // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
	easing:		   null,  // easing method for both in and out transitions
	easeIn:		   null,  // easing for "in" transition
	easeOut:	   null,  // easing for "out" transition
	shuffle:	   null,  // coords for shuffle animation, ex: { top:15, left: 200 }
	animIn:		   null,  // properties that define how the slide animates in
	animOut:	   null,  // properties that define how the slide animates out
	cssBefore:	   null,  // properties that define the initial state of the slide before transitioning in
	cssAfter:	   null,  // properties that defined the state of the slide after transitioning out
	fxFn:		   null,  // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
	height:		  'auto', // container height
	startingSlide: 0,	  // zero-based index of the first slide to be displayed
	sync:		   1,	  // true if in/out transitions should occur simultaneously
	random:		   0,	  // true for random, false for sequence (not applicable to shuffle fx)
	fit:		   0,	  // force slides to fit container
	containerResize: 1,	  // resize container to fit largest slide
	pause:		   0,	  // true to enable "pause on hover"
	pauseOnPagerHover: 0, // true to pause when hovering over pager link
	autostop:	   0,	  // true to end slideshow after X transitions (where X == slide count)
	autostopCount: 0,	  // number of transitions (optionally used with autostop to define X)
	delay:		   0,	  // additional delay (in ms) for first transition (hint: can be negative)
	slideExpr:	   null,  // expression for selecting slides (if something other than all children is required)
	cleartype:	   !$.support.opacity,  // true if clearType corrections should be applied (for IE)
	cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
	nowrap:		   0,	  // true to prevent slideshow from wrapping
	fastOnEvent:   0,	  // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
	randomizeEffects: 1,  // valid when multiple effects are used; true to make the effect sequence random
	rev:		   0,	 // causes animations to transition in reverse
	manualTrump:   true,  // causes manual transition to stop an active transition instead of being ignored
	requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
	requeueTimeout: 250   // ms delay for requeue
};

})(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($) {

//
// These functions define one-time slide initialization for the named
// transitions. To save file size feel free to remove any of these that you
// don't need.
//
$.fn.cycle.transitions.none = function($cont, $slides, opts) {
	opts.fxFn = function(curr,next,opts,after){
		$(next).show();
		$(curr).hide();
		after();
	};
};

// scrollUp/Down/Left/Right
$.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 };
};

// slideX/slideY
$.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 };
};

// shuffle
$.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);
	});
	// only adjust speed once!
	if (!opts.speedAdjusted) {
		opts.speed = opts.speed / 2; // shuffle has 2 transitions
		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());

	// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
	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 };
};

// turnUp/Down/Left/Right
$.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 };
};

// zoom
$.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 };
};

// fadeZoom
$.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 };
};

// blindX
$.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 };
};
// blindY
$.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 };
};
// blindZ
$.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 };
};

// growX - grow horizontally from centered 0 width
$.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 };
};
// growY - grow vertically from centered 0 height
$.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 };
};

// curtainX - squeeze in both edges horizontally
$.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 };
};
// curtainY - squeeze in both edges vertically
$.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 };
};

// cover - curr slide covered by next slide
$.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 };
};

// uncover - curr slide moves off next slide
$.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 };
};

// toss - move top slide and fade away
$.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);
		// provide default toss settings if animOut not provided
		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 };
};

// wipe - clip animation
$.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);


$.fn.cycle.transitions.flash = function($cont, $slides, opts) {
		$slides.not(':eq('+opts.startingSlide+')').css('opacity',0);
		opts.before.push(function() { $(this).show(opts.speed) });
		opts.onAddSlide = function($s) { $s.hide(opts.speed) };
		opts.animIn    = { opacity: 1 };
		opts.animOut   = { opacity: 0 };
		opts.cssBefore = { opacity: 0 };
		opts.cssAfter  = { display: 'none' };
};

(function(){var $$;$$=jQuery.fn.flash=function(htmlOptions,pluginOptions,replace,update){var block=replace||$$.replace;pluginOptions=$$.copy($$.pluginOptions,pluginOptions);if(!$$.hasFlash(pluginOptions.version)){if(pluginOptions.expressInstall&&$$.hasFlash(6,0,65)){var expressInstallOptions={flashvars:{MMredirectURL:location,MMplayerType:'PlugIn',MMdoctitle:jQuery('title').text()}};}else if(pluginOptions.update){block=update||$$.update;}else{return this;}}htmlOptions=$$.copy($$.htmlOptions,expressInstallOptions,htmlOptions);return this.each(function(){block.call(this,$$.copy(htmlOptions));});};$$.copy=function(){var options={},flashvars={};for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(arg==undefined)continue;jQuery.extend(options,arg);if(arg.flashvars==undefined)continue;jQuery.extend(flashvars,arg.flashvars);}options.flashvars=flashvars;return options;};$$.hasFlash=function(){if(/hasFlash\=true/.test(location))return true;if(/hasFlash\=false/.test(location))return false;var pv=$$.hasFlash.playerVersion().match(/\d+/g);var rv=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g)||String($$.pluginOptions.version).match(/\d+/g);for(var i=0;i<3;i++){pv[i]=parseInt(pv[i]||0);rv[i]=parseInt(rv[i]||0);if(pv[i]<rv[i])return false;if(pv[i]>rv[i])return true;}return true;};$$.hasFlash.playerVersion=function(){try{try{var axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');try{axo.AllowScriptAccess='always';}catch(e){return'6,0,0';}}catch(e){}return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,',').match(/^,?(.+),?$/)[1];}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}}catch(e){}}return'0,0,0';};$$.htmlOptions={flashvars:{},pluginspage:'http://www.adobe.com/go/getflashplayer',src:'#',type:'application/x-shockwave-flash'};$$.pluginOptions={expressInstall:false,update:true,version:'6.0.65'};$$.replace=function(htmlOptions){this.innerHTML='<div class="alt">'+this.innerHTML+'</div>';jQuery(this).addClass('flash-replaced').prepend($$.transform(htmlOptions));};$$.update=function(htmlOptions){var url=String(location).split('?');url.splice(1,0,'?hasFlash=true&');url=url.join('');var msg='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+'</span>';jQuery(this).addClass('flash-update').prepend(msg);};function toAttributeString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'="'+this[key]+'" ';return s;};function toFlashvarsString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'='+encodeURIComponent(this[key])+'&';return s.replace(/&$/,'');};$$.transform=function(htmlOptions){htmlOptions.toString=toAttributeString;if(htmlOptions.flashvars)htmlOptions.flashvars.toString=toFlashvarsString;return'<embed '+String(htmlOptions)+'/>';};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};});}})();

jQuery.fn.sifr=function(prefs){var p=jQuery.extend((prefs===false)?{unsifr:true}:{},arguments.callee.prefs,prefs);if(p.save){arguments.callee.prefs=jQuery.extend(p,{save:false});}if(this[0]===document){return;}if(!p.unsifr&&typeof p.before==='function'){p.before.apply(this,[p]);}this.each(function(){var t=jQuery(this);var a=t.children('.sIFR-alternate');if(a){t.html(a.html());if(p.unsifr){return;}}if(typeof p.beforeEach==='function'){p.beforeEach.apply(this,[t,p]);}var s=t.html('<span class="flash-replaced sIFR-replaced">'+(p.content||t.html()).replace(/^\s+|\s+$/g,'')+'</span>').children();a=t.append('<span class="alt sIFR-alternate">'+s.html()+'</span>').children('.sIFR-alternate');if(a.css('display')!=='none'){a.css('display','none');}var toHex=function(c){var h=function(n){if(n===0||isNaN(n)){return'00';}n=Math.round(Math.min(Math.max(0,n),255));return'0123456789ABCDEF'.charAt((n-n%16)/16)+'0123456789ABCDEF'.charAt(n%16);};c=(c)?c.replace(/rgb|\(|\)|#$/g,''):false;if(!c){return false;}if(c.indexOf(',')>-1){c=c.split(', ');return'#'+h(c[0])+h(c[1])+h(c[2]);}if(c.search('#')>-1&&c.length<=4){c=c.split('');return'#'+c[1]+c[1]+c[2]+c[2]+c[3]+c[3];}return c;};if(p.textTransform){if(p.textTransform.toLowerCase()==='uppercase'){s.html(s.html().toUpperCase());}if(p.textTransform.toLowerCase()==='lowercase'){s.html(s.html().toLowerCase());}if(p.textTransform.toLowerCase()==='capitalize'){var c=s.html().replace(/\>/g,'> ').split(' ');for(var i=0;i<c.length;i=i+1){c[i]=c[i].charAt(0).toUpperCase()+c[i].substring(1);}s.html(c.join(' ').replace(/\> /g,'>'));}}var f={flashvars:jQuery.extend({h:s.height()*(p.zoom||1),offsetLeft:p.offsetLeft||null,offsetTop:p.offsetTop||null,textAlign:p.textAlign||(/(left|center|right)/.exec(t.css('textAlign'))||['center'])[0],textColor:toHex(p.color||t.css('color'))||null,txt:p.content||s.html()||null,underline:(p.underline||t.css('textDecoration')==='underline')?true:null,w:(p.width||s.width())*(p.zoom||1)},p.flashvars),height:p.height||s.height(),src:(p.path||'')+((p.path&&p.path.substr(p.path.length-1)!=='/')?'/':'')+(p.font||'')+((p.font&&p.font.indexOf('.swf')===-1)?'.swf':''),width:p.width||s.width(),wmode:'transparent'};f.flashvars.linkColor=toHex(p.link||t.find('a').css('color'))||f.flashvars.textColor;f.flashvars.hoverColor=toHex(p.hover)||f.flashvars.linkColor;if(p.zoom){f.flashvars.offsetTop=((p.offsetTop||0)+((s.height()-(s.height()*p.zoom))/2))*(p.zoomTop||1);f.flashvars.offsetLeft=((p.offsetLeft||0)+((s.width()-(s.width()*p.zoom))/2))*(p.zoomLeft||1);}t.flash(jQuery.extend(f,p.embedOptions),jQuery.extend({expressInstall:p.expressInstall||false,version:p.version||7,update:p.update||false},p.pluginOptions),function(f){var preHeight=t.height();var preWidth=t.width();s.html(jQuery.fn.flash.transform(f));var e=s.find(':first');e.css({verticalAlign:'text-bottom',display:'inline',width:p.width,height:p.height});var marginBottom=preHeight-t.height();var width=parseInt(e.css('width'),10)+parseInt(preWidth-t.width(),10);if(!p.height){e.css({marginBottom:marginBottom});}if(!p.width){e.css({width:width});}if(p.height&&p.verticalAlign==='middle'){e.css({marginTop:Math.floor((p.height-s.height())/2),marginBottom:Math.round((p.height-s.height())/2),height:s.height()});e.attr('height',s.height());}if(p.height&&p.verticalAlign==='bottom'){var a=t.find('.sIFR-alternate');e.css({marginTop:(p.height-s.height()),height:s.height()});e.attr('height',s.height());}if(p.css){e.css(p.css);}});if(typeof p.afterEach==='function'){p.afterEach.apply(this,[t,p]);}});if(!p.unsifr&&typeof p.after==='function'){p.after.apply(this,[p]);}};jQuery.sifr=function(prefs){jQuery().sifr(jQuery.extend({save:true},prefs));};jQuery.fn.unsifr=function(){return this.each(function(){jQuery(this).sifr(false);});};


// jqzoom
(function($){$.fn.jqueryzoom=function(options){var settings={xzoom:200,yzoom:200,offset:10,position:"right",lens:1,preload:1};if(options){$.extend(settings,options)}var noalt='';$(this).hover(function(){var imageLeft=$(this).offset().left;var imageTop=$(this).offset().top;var imageWidth=$(this).children('img').get(0).offsetWidth;var imageHeight=$(this).children('img').get(0).offsetHeight;noalt=$(this).children("img").attr("alt");var bigimage=$(this).children("img").attr("jqimg");$(this).children("img").attr("alt",'');if($("div.zoomdiv").get().length==0){$(this).after("<div class='zoomdiv'><img class='bigimg' src='"+bigimage+"'/></div>");$(this).append("<div class='jqZoomPup'>&nbsp;</div>")}if(settings.position=="right"){if(imageLeft+imageWidth+settings.offset+settings.xzoom>screen.width){leftpos=imageLeft-settings.offset-settings.xzoom}else{leftpos=imageLeft+imageWidth+settings.offset}}else{leftpos=imageLeft-settings.xzoom-settings.offset;if(leftpos<0){leftpos=imageLeft+imageWidth+settings.offset}}$("div.zoomdiv").css({top:imageTop,left:leftpos});$("div.zoomdiv").width(settings.xzoom);$("div.zoomdiv").height(settings.yzoom);$("div.zoomdiv").show();if(!settings.lens){$(this).css('cursor','crosshair')}$(document.body).mousemove(function(e){mouse=new MouseEvent(e);var bigwidth=$(".bigimg").get(0).offsetWidth;var bigheight=$(".bigimg").get(0).offsetHeight;var scaley='x';var scalex='y';if(isNaN(scalex)|isNaN(scaley)){var scalex=(bigwidth/imageWidth);var scaley=(bigheight/imageHeight);$("div.jqZoomPup").width((settings.xzoom)/scalex);$("div.jqZoomPup").height((settings.yzoom)/scaley);if(settings.lens){$("div.jqZoomPup").css('visibility','visible')}}xpos=mouse.x-$("div.jqZoomPup").width()/2-imageLeft;ypos=mouse.y-$("div.jqZoomPup").height()/2-imageTop;if(settings.lens){xpos=(mouse.x-$("div.jqZoomPup").width()/2<imageLeft)?0:(mouse.x+$("div.jqZoomPup").width()/2>imageWidth+imageLeft)?(imageWidth-$("div.jqZoomPup").width()-2):xpos;ypos=(mouse.y-$("div.jqZoomPup").height()/2<imageTop)?0:(mouse.y+$("div.jqZoomPup").height()/2>imageHeight+imageTop)?(imageHeight-$("div.jqZoomPup").height()-2):ypos}if(settings.lens){$("div.jqZoomPup").css({top:ypos,left:xpos})}scrolly=ypos;$("div.zoomdiv").get(0).scrollTop=scrolly*scaley;scrollx=xpos;$("div.zoomdiv").get(0).scrollLeft=(scrollx)*scalex})},function(){$(this).children("img").attr("alt",noalt);$(document.body).unbind("mousemove");if(settings.lens){$("div.jqZoomPup").remove()}$("div.zoomdiv").remove()});count=0;if(settings.preload){$('body').append("<div style='display:none;' class='jqPreload"+count+"'>sdsdssdsd</div>");$(this).each(function(){var imagetopreload=$(this).children("img").attr("jqimg");var content=jQuery('div.jqPreload'+count+'').html();jQuery('div.jqPreload'+count+'').html(content+'<img src=\"'+imagetopreload+'\">')})}}})(jQuery);function MouseEvent(e){this.x=e.pageX;this.y=e.pageY}


// TAble sort http://tablesorter.com
(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[Â£$â‚¬?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
//'
	$.tablesorter.addParser({
			id: 'prices',
			is: function(s) {return /\€$/.test($.trim(s));},
			format: function(s) { return $.tablesorter.formatFloat(s.replace(new RegExp(/€|\./g),""));},
			type: 'numeric'
	});

	/* MarcGrabanski.com v2.5 */
/* Pop-Up Calendar Built from Scratch by Marc Grabanski */
/* Enhanced by Keith Wood (kbwood@iprimus.com.au). */
/* Time picker functionality added by Gregor Petrin*/
/* Under the Creative Commons Licence http://creativecommons.org/licenses/by/3.0/
	Share or Remix it but please Attribute the authors. */

	var popUpCal={selectedDay:0,selectedMonth:0,selectedYear:0,selectedHour:0,selectedMinute:0,clearText:'Cancella',closeText:'Chiudi',prevText:'&lt;Prec',nextText:'Succ&gt;',currentText:'Oggi',appendText:'',buttonText:'...',buttonImage:'',buttonImageOnly:false,dayNames:['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],monthNames:['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],dateFormat:'YMD-',yearRange:'-1:+1',changeMonth:true,changeYear:true,firstDay:1,changeFirstDay:true,showOtherMonths:false,minDate:null,maxDate:null,speed:'medium',autoPopUp:'focus',closeAtTop:true,customDate:null,fieldSettings:null,timeSeparators:[' ',':'],formatDate:function(day,month,year,hour,minute){month++;var dateString='';for(var i=0;i<3;i++){dateString+=this.dateFormat.charAt(3)+(this.dateFormat.charAt(i)=='D'?(day<10?'0':'')+day:(this.dateFormat.charAt(i)=='M'?(month<10?'0':'')+month:(this.dateFormat.charAt(i)=='Y'?year:'?')))}if(this.timeSeparators&&this.timeSeparators.length>1&&this.timeSeparators[0]&&hour!=null&&minute!=null){dateString+=this.timeSeparators[0]+this.hourString(hour)+this.timeSeparators[1]+((minute>=10)?minute:('0'+minute));if(this.timeSeparators.length==4&&hour<12)dateString+=this.timeSeparators[2];else if(this.timeSeparators.length==4&&hour>=12)dateString+=this.timeSeparators[3]}return dateString.substring(1)},parseDate:function(Text){var currentYear,currentMonth,currentDay,currentHour,currentMinute;if(this.timeSeparators&&this.timeSeparators.length>1){var currentTimeAndDate=Text.split(this.timeSeparators[0]);var index=0;while(index<currentTimeAndDate.length)if(currentTimeAndDate[index])index++;else currentTimeAndDate.splice(index,1);if(currentTimeAndDate.length>0)var currentDate=currentTimeAndDate[0].split(this.dateFormat.charAt(3));else var currentDate=[];if(currentTimeAndDate.length>1)var currentTime=currentTimeAndDate[1].split(this.timeSeparators[1]);else var currentTime=[]}else{var currentDate=Text.split(this.dateFormat.charAt(3));var currentTime=null}if(currentDate.length==3){currentDay=parseInt(this.trimNumber(currentDate[this.dateFormat.indexOf('D')]));currentMonth=parseInt(this.trimNumber(currentDate[this.dateFormat.indexOf('M')]))-1;currentYear=parseInt(this.trimNumber(currentDate[this.dateFormat.indexOf('Y')]))}else{currentDay=new Date().getDate();currentMonth=new Date().getMonth();currentYear=new Date().getFullYear()}if(this.timeSeparators&&this.timeSeparators.length>1&&this.timeSeparators[0]){if(currentTime!=null&&currentTime.length==2){currentHour=parseInt(this.trimNumber(currentTime[0]));if(this.timeSeparators.length>2){if(currentTime[1].indexOf(this.timeSeparators[2])==currentTime[1].length-this.timeSeparators[2].length){if(currentHour==12)currentHour=0;currentMinute=parseInt(this.trimNumber(currentTime[1].substring(0,currentTime[1].length-this.timeSeparators[2].length)))}else{if(currentHour<12)currentHour+=12;currentMinute=parseInt(this.trimNumber(currentTime[1].substring(0,currentTime[1].length-this.timeSeparators[1].length)))}}else currentMinute=parseInt(this.trimNumber(currentTime[1]))}else{currentHour=new Date().getHours();currentMinute=new Date().getMinutes()}return new Date(currentYear,currentMonth,currentDay,currentHour,currentMinute)}else return new Date(currentYear,currentMonth,currentDay)},setDateFromField:function(){var currentDate=this.parseDate(this.input.val());this.currentDay=currentDate.getDate();this.currentMonth=currentDate.getMonth();this.currentYear=currentDate.getFullYear();if(this.timeSeparators&&this.timeSeparators.length>1&&this.timeSeparators[0]){this.currentHour=currentDate.getHours();this.currentMinute=currentDate.getMinutes()}this.selectedDay=this.currentDay;this.selectedMonth=this.currentMonth;this.selectedYear=this.currentYear;if(this.currentHour&&this.currentMinute){this.selectedHour=this.currentHour;this.selectedMinute=this.currentMinute}this.adjustDate(0,'D',true)},hourString:function(Hour){if(this.timeSeparators.length==4){if(Hour==0)return''+12;else if(Hour>12)return''+(Hour-12);else return''+Hour}else return''+Hour},selectDate:function(Input){if(!Input)var Input=this.input;this.hideCalendar(this.speed);if(this.timeSeparators.length>1)Input.val(this.formatDate(this.selectedDay,this.selectedMonth,this.selectedYear,this.selectedHour,this.selectedMinute));else Input.val(this.formatDate(this.selectedDay,this.selectedMonth,this.selectedYear))},showCalendar:function(){this.popUpShowing=true;var timeSelect='';if(this.timeSeparators.length>1){timeSelect+='<div id="calendar_time"><select id="calendar_hour">';if(this.timeSeparators.length==4){if(this.selectedHour==12||this.selectedHour==0)timeSelect+='<option value="12" selected="selected">12</option>';else timeSelect+='<option value="12">12</option>';for(var a=1;a<12;a++){if(this.selectedHour==a||(a==12&&this.selectedHour==0)||(a+12==this.selectedHour))timeSelect+='<option value="'+a+'" selected="selected">'+a+'</option>';else timeSelect+='<option value="'+a+'">'+a+'</option>'}}else{for(var a=8;a<20;a++){if(this.selectedHour==a)timeSelect+='<option value="'+a+'" selected="selected">'+a+'</option>';else timeSelect+='<option value="'+a+'">'+a+'</option>'}}timeSelect+='</select> '+this.timeSeparators[1]+' <select id="calendar_minute">';for(var a=0;a<59;a=a+15){if(this.selectedMinute==a)timeSelect+='<option value="'+a+'" selected="selected">'+((a>=10)?a:('0'+a))+'</option>';else timeSelect+='<option value="'+a+'">'+((a>=10)?a:('0'+a))+'</option>'}timeSelect+='</select>';if(this.timeSeparators.length==4){timeSelect+=' <select id="calendar_ampm">';timeSelect+='<option value="AM"'+((this.selectedHour<12)?' selected="selected"':'')+'>'+this.timeSeparators[2]+'</option>';timeSelect+='<option value="PM"'+((this.selectedHour>=12)?' selected="selected"':'')+'>'+this.timeSeparators[3]+'</option>';timeSelect+='</select>'}timeSelect+='</div>'}var html=(this.closeAtTop?'<div id="calendar_control">'+'<a id="calendar_clear">'+this.clearText+'</a>'+'<a id="calendar_close">'+this.closeText+'</a></div>':'')+'<div id="calendar_links"><a id="calendar_prev">'+this.prevText+'</a>'+'<a id="calendar_current">'+this.currentText+'</a>'+'<a id="calendar_next">'+this.nextText+'</a></div>'+'<div id="calendar_header">';if(!this.changeMonth){html+=this.monthNames[this.selectedMonth]+'&nbsp;'}else{var inMinYear=(this.minDate&&this.minDate.getFullYear()==this.selectedYear);var inMaxYear=(this.maxDate&&this.maxDate.getFullYear()==this.selectedYear);html+='<select id="calendar_newMonth">';for(var month=0;month<12;month++){if((!inMinYear||month>=this.minDate.getMonth())&&(!inMaxYear||month<=this.maxDate.getMonth())){html+='<option value="'+month+'"'+(month==this.selectedMonth?' selected="selected"':'')+'>'+this.monthNames[month]+'</option>'}}html+='</select>'}if(!this.changeYear){html+=this.selectedYear}else{var years=this.yearRange.split(':');var year=0;var endYear=0;if(years.length!=2){year=this.selectedYear-10;endYear=this.selectedYear+10}else if(years[0].charAt(0)=='+'||years[0].charAt(0)=='-'){year=this.selectedYear+parseInt(years[0]);endYear=this.selectedYear+parseInt(years[1])}else{year=parseInt(years[0]);endYear=parseInt(years[1])}year=(this.minDate?Math.max(year,this.minDate.getFullYear()):year);endYear=(this.maxDate?Math.min(endYear,this.maxDate.getFullYear()):endYear);html+='<select id="calendar_newYear">';for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==this.selectedYear?' selected="selected"':'')+'>'+year+'</option>'}html+='</select>'}html+='</div>'+timeSelect+'<table id="calendar" cellpadding="0" cellspacing="0"><thead>'+'<tr class="calendar_titleRow">';for(var dow=0;dow<7;dow++){html+='<td>'+(this.changeFirstDay?'<a>':'')+this.dayNames[(dow+this.firstDay)%7]+(this.changeFirstDay?'</a>':'')+'</td>'}html+='</tr></thead><tbody>';var daysInMonth=this.getDaysInMonth(this.selectedYear,this.selectedMonth);this.selectedDay=Math.min(this.selectedDay,daysInMonth);var leadDays=(this.getFirstDayOfMonth(this.selectedYear,this.selectedMonth)-this.firstDay+7)%7;var currentDate=new Date(this.currentYear,this.currentMonth,this.currentDay);var selectedDate=new Date(this.selectedYear,this.selectedMonth,this.selectedDay);var printDate=new Date(this.selectedYear,this.selectedMonth,1-leadDays);var numRows=Math.ceil((leadDays+daysInMonth)/7);var today=new Date();today=new Date(today.getFullYear(),today.getMonth(),today.getDate());for(var row=0;row<numRows;row++){html+='<tr class="calendar_daysRow">';for(var dow=0;dow<7;dow++){var customSettings=(this.customDate?this.customDate(printDate):[true,'']);var otherMonth=(printDate.getMonth()!=this.selectedMonth);var unselectable=otherMonth||!customSettings[0]||(this.minDate&&printDate<this.minDate)||(this.maxDate&&printDate>this.maxDate);html+='<td class="calendar_daysCell'+((dow+this.firstDay+6)%7>=5?' calendar_weekEndCell':'')+(otherMonth?' calendar_otherMonth':'')+(printDate.getTime()==selectedDate.getTime()?' calendar_daysCellOver':'')+(unselectable?' calendar_unselectable':'')+(!otherMonth||this.showOtherMonths?' '+customSettings[1]:'')+'"'+(printDate.getTime()==currentDate.getTime()?' id="calendar_currentDay"':(printDate.getTime()==today.getTime()?' id="calendar_today"':''))+'>'+(otherMonth?(this.showOtherMonths?printDate.getDate():'&nbsp;'):(unselectable?printDate.getDate():'<a>'+printDate.getDate()+'</a>'))+'</td>';printDate.setDate(printDate.getDate()+1)}html+='</tr>'}html+='</tbody></table><!--[if lte IE 6.5]><iframe src="javascript:false;" id="calendar_cover"></iframe><![endif]-->'+(this.closeAtTop?'':'<div id="calendar_control"><a id="calendar_clear">'+this.clearText+'</a>'+'<a id="calendar_close">'+this.closeText+'</a></div>');$('#calendar_div').empty().append(html).show(this.speed);this.input[0].focus();this.setupActions()},init:function(){this.popUpShowing=false;this.lastInput=null;this.disabledInputs=[];$('body').append('<div id="calendar_div"></div>');$(document).mousedown(popUpCal.checkExternalClick)},showFor:function(target){var input=(target.nodeName&&target.nodeName.toLowerCase()=='input'?target:this);if(input.nodeName.toLowerCase()!='input'){input=$('../input',input)[0]}if(popUpCal.lastInput==input){return}for(var i=0;i<popUpCal.disabledInputs.length;i++){if(popUpCal.disabledInputs[i]==input){return}}popUpCal.input=$(input);popUpCal.hideCalendar();popUpCal.lastInput=input;popUpCal.setDateFromField();popUpCal.setPos(input,$('#calendar_div'));$.extend(popUpCal,(popUpCal.fieldSettings?popUpCal.fieldSettings(input):{}));popUpCal.showCalendar()},doKeyDown:function(e){if(popUpCal.popUpShowing){switch(e.keyCode){case 9:popUpCal.hideCalendar();break;case 13:popUpCal.selectDate();break;case 27:popUpCal.hideCalendar(popUpCal.speed);break;case 33:popUpCal.adjustDate(-1,(e.ctrlKey?'Y':'M'));break;case 34:popUpCal.adjustDate(+1,(e.ctrlKey?'Y':'M'));break;case 35:if(e.ctrlKey)$('#calendar_clear').click();break;case 36:if(e.ctrlKey)$('#calendar_current').click();break;case 37:if(e.ctrlKey)popUpCal.adjustDate(-1,'D');break;case 38:if(e.ctrlKey)popUpCal.adjustDate(-7,'D');break;case 39:if(e.ctrlKey)popUpCal.adjustDate(+1,'D');break;case 40:if(e.ctrlKey)popUpCal.adjustDate(+7,'D');break}}else if(e.keyCode==36&&e.ctrlKey){popUpCal.showFor(this)}},doKeyPress:function(e){var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return(chr<' '||chr==popUpCal.dateFormat.charAt(3)||(chr>='0'&&chr<='9'))},connectCalendar:function(target){var $input=$(target);$input.after('<span class="calendar_append">'+this.appendText+'</span>');if(this.autoPopUp=='focus'||this.autoPopUp=='both'){$input.focus(this.showFor)}if(this.autoPopUp=='button'||this.autoPopUp=='both'){$input.wrap('<span class="calendar_wrap"></span>').after(this.buttonImageOnly?'<img class="calendar_trigger" src="'+this.buttonImage+'" alt="'+this.buttonText+'" title="'+this.buttonText+'"/>':'<button class="calendar_trigger">'+(this.buttonImage!=''?'<img src="'+this.buttonImage+'" alt="'+this.buttonText+'" title="'+this.buttonText+'"/>':this.buttonText)+'</button>');$((this.buttonImageOnly?'img':'button')+'.calendar_trigger',$input.parent('span')).click(this.showFor)}$input.keydown(this.doKeyDown).keypress(this.doKeyPress)},enableFor:function(inputs){inputs=(inputs.jquery?inputs:$(inputs));inputs.each(function(){this.disabled=false;$('../button.calendar_trigger',this).each(function(){this.disabled=false});$('../img.calendar_trigger',this).each(function(){$(this).css('opacity','1.0')});var $this=this;popUpCal.disabledInputs=$.map(popUpCal.disabledInputs,function(value){return(value==$this?null:value)})});return false},disableFor:function(inputs){inputs=(inputs.jquery?inputs:$(inputs));inputs.each(function(){this.disabled=true;$('../button.calendar_trigger',this).each(function(){this.disabled=true});$('../img.calendar_trigger',this).each(function(){$(this).css('opacity','0.5')});var $this=this;popUpCal.disabledInputs=$.map(popUpCal.disabledInputs,function(value){return(value==$this?null:value)});popUpCal.disabledInputs[popUpCal.disabledInputs.length]=this});return false},setupActions:function(){if(this.timeSeparators.length>1){$('#calendar_hour').change(function(){popUpCal.selecting=false;popUpCal.selectedHour=this.options[this.selectedIndex].value-0;if(popUpCal.timeSeparators.length==4){var ampm=$('#calendar_ampm').val();if(ampm=='AM'&&popUpCal.selectedHour==12)popUpCal.selectedHour=0;else if(ampm=='PM'&&popUpCal.selectedHour!=12)popUpCal.selectedHour+=12}popUpCal.adjustDate();popUpCal.input.val(popUpCal.formatDate(popUpCal.selectedDay,popUpCal.selectedMonth,popUpCal.selectedYear,popUpCal.selectedHour,popUpCal.selectedMinute))}).click(this.selectMonthYear);$("#calendar_minute").change(function(){popUpCal.selecting=false;popUpCal.selectedMinute=this.options[this.selectedIndex].value-0;popUpCal.adjustDate();popUpCal.input.val(popUpCal.formatDate(popUpCal.selectedDay,popUpCal.selectedMonth,popUpCal.selectedYear,popUpCal.selectedHour,popUpCal.selectedMinute))}).click(this.selectMonthYear);$("#calendar_ampm").change(function(){popUpCal.selecting=false;if(popUpCal.timeSeparators.length==4){var ampm=$('#calendar_ampm').val();if(ampm=='AM'&&popUpCal.selectedHour>12)popUpCal.selectedHour-=12;else if(ampm=='PM'&&popUpCal.selectedHour<12)popUpCal.selectedHour+=12;else if(ampm=='PM'&&popUpCal.selectedHour==12)popUpCal.selectedHour=12;else if(ampm=='AM'&&popUpCal.selectedHour==12)popUpCal.selectedHour=0}popUpCal.adjustDate();popUpCal.input.val(popUpCal.formatDate(popUpCal.selectedDay,popUpCal.selectedMonth,popUpCal.selectedYear,popUpCal.selectedHour,popUpCal.selectedMinute))})}$('#calendar_clear').click(function(){popUpCal.clearDate()});$('#calendar_close').click(function(){popUpCal.hideCalendar(popUpCal.speed)});$('#calendar_prev').click(function(){popUpCal.adjustDate(-1,'M')});$('#calendar_next').click(function(){popUpCal.adjustDate(+1,'M')});$('#calendar_current').click(function(){popUpCal.selectedDay=new Date().getDate();popUpCal.selectedMonth=new Date().getMonth();popUpCal.selectedYear=new Date().getFullYear();popUpCal.adjustDate()});$('#calendar_newMonth').change(function(){popUpCal.selecting=false;popUpCal.selectedMonth=this.options[this.selectedIndex].value-0;popUpCal.adjustDate()}).click(this.selectMonthYear);$('#calendar_newYear').change(function(){popUpCal.selecting=false;popUpCal.selectedYear=this.options[this.selectedIndex].value-0;popUpCal.adjustDate()}).click(this.selectMonthYear);$('.calendar_titleRow a').click(function(){for(var i=0;i<7;i++){if(popUpCal.dayNames[i]==this.firstChild.nodeValue){popUpCal.firstDay=i}}popUpCal.showCalendar()});$('.calendar_daysRow td a').hover(function(){$(this).addClass('calendar_daysCellOver')},function(){$(this).removeClass('calendar_daysCellOver')});$('.calendar_daysRow td a').click(function(){popUpCal.selectedDay=$(this).html();popUpCal.selectDate()})},hideCalendar:function(speed){if(this.popUpShowing){$('#calendar_div').hide(speed);this.popUpShowing=false;this.lastInput=null}},selectMonthYear:function(){if(popUpCal.selecting){popUpCal.input[0].focus()}popUpCal.selecting=!popUpCal.selecting},clearDate:function(){this.hideCalendar(this.speed);this.input.val('')},checkExternalClick:function(event){if(popUpCal.popUpShowing){var node=event.target;var cal=$('#calendar_div')[0];while(node&&node!=cal&&node.className!='calendar_trigger'){node=node.parentNode}if(!node){popUpCal.hideCalendar()}}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),'']},trimNumber:function(value){if(value=='')return'';while(value.charAt(0)=='0'){value=value.substring(1)}return value},adjustDate:function(offset,period,dontShow){if(this.timeSeparators.length>1){var date=new Date(this.selectedYear+(period=='Y'?offset:0),this.selectedMonth+(period=='M'?offset:0),this.selectedDay+(period=='D'?offset:0),this.selectedHour+(period=='H'?offset:0),this.selectedMinute+(period=='MIN'?offset:0))}else{var date=new Date(this.selectedYear+(period=='Y'?offset:0),this.selectedMonth+(period=='M'?offset:0),this.selectedDay+(period=='D'?offset:0))}date=(this.minDate&&date<this.minDate?this.minDate:date);date=(this.maxDate&&date>this.maxDate?this.maxDate:date);this.selectedDay=date.getDate();this.selectedMonth=date.getMonth();this.selectedYear=date.getFullYear();if(this.timeSeparators.length>1){this.selectedHour=date.getHours();this.selectedMinute=date.getMinutes()}if(!dontShow){this.showCalendar()}},getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},setPos:function(targetObj,moveObj){var coords=this.findPos(targetObj);moveObj.css('position','absolute').css('left',coords[0]+'px').css('top',(coords[1]+targetObj.offsetHeight)+'px')},findPos:function(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){var origcurleft=curleft;curleft+=obj.offsetLeft;if(curleft<0){curleft=origcurleft}curtop+=obj.offsetTop}}return[curleft,curtop]}};$.fn.calendar=function(settings){$.extend(popUpCal,settings||{});return this.each(function(){if(this.nodeName.toLowerCase()=='input'){popUpCal.connectCalendar(this)}})};$(document).ready(function(){popUpCal.init()});


/* Png Fix*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 5=B.5||{};5.J=C(3,e,D){6 f=n.f[3.1e],g=E.T(3.1f,3.1g),j=E.T(3.1h,3.1i),o=3.F.1j,p=3.F.1k,q=3.F.1l;4(!f.2){f.2={3:3,k:\'\',l:[],u:1m 1n(),m:{}}}6 2=f.2,7=2.u.U,8=2.u.V;4(e){4(!D&&e!=2.k){2.u.W=C(){n.W=1o;5.J(3,e,1)};X 2.u.k=e}}Y{4(2.k)D=1;7=8=0}2.k=e;4(!D&&g==2.m.w&&j==2.m.h&&o==2.m.x&&p==2.m.y&&q==2.m.r){X}6 K={Z:\'0%\',10:\'0%\',1p:\'1q%\',1r:\'v%\',1s:\'v%\'},x,y,z;x=K[o]||o;y=K[p]||p;4(z=x.11(/(\\d+)%/)){x=E.12((g-7)*(G(z[1])/v))}4(z=y.11(/(\\d+)%/)){y=E.12((j-8)*(G(z[1])/v))}x=G(x);y=G(y);6 L={\'H\':1,\'H-x\':1}[q],M={\'H\':1,\'H-y\':1}[q];4(L){x%=7;4(x>0)x-=7}4(M){y%=8;4(y>0)y-=8}n.13.14=0;4(!({15:1,16:1}[3.F.N])){3.O.N=\'15\'}6 b=0,9,17=L?g:x+0.1,a,18=M?j:y+0.1,d,s,I;4(7&&8){P(9=x;9<17;9+=7){P(a=y;a<18;a+=8){I=0;4(!2.l[b]){2.l[b]=1t.1u(\'1v\');I=1}6 Q=(9+7>g?g-9:7),R=(a+8>j?j-a:8);d=2.l[b];s=d.O;s.1w=\'19\';s.10=9+\'c\';s.Z=a+\'c\';s.U=Q+\'c\';s.V=R+\'c\';s.1x=\'1y(\'+(a<0?0-a:0)+\'c,\'+Q+\'c,\'+R+\'c,\'+(9<0?0-9:0)+\'c)\';s.1a=\'1z\';4(I){s.N=\'16\';s.1A=-1B;4(3.1b){3.1C(d,3.1b)}Y{3.1D(d)}}n.1c(d,e,0);b++}}}1E(b<2.l.1F){n.1c(2.l[b],\'\',0);2.l[b++].O.1a=\'19\'}n.13.14=1;2.m={w:g,h:j,x:o,y:p,r:q}};5.A=C(){P(6 i 1G 5.f){6 t=5.f[i].2;4(t&&t.3&&t.k){5.J(t.3,t.k)}}};5.A.S=0;4(B.1d&&!B.1H){B.1d(\'1I\',C(){1J(5.A.S);5.A.S=1K(5.A,v)})}',62,109,'||tiles|elm|if|IEPNGFix|var|pngW|pngH|xPos|yPos|count|px||pngSrc|data|elmW|||elmH|src|cache|old|this|bgX|bgY|bgR||||img|100||||pc|update|window|function|ready|Math|currentStyle|parseInt|repeat|isNew|tileBG|pos|repeatX|repeatY|position|style|for|clipR|clipB|timer|max|width|height|onload|return|else|top|left|match|round|hook|enabled|relative|absolute|maxX|maxY|none|display|firstChild|fix|attachEvent|uniqueID|clientWidth|scrollWidth|clientHeight|scrollHeight|backgroundPositionX|backgroundPositionY|backgroundRepeat|new|Image|null|center|50|bottom|right|document|createElement|div|behavior|clip|rect|block|zIndex|999|insertBefore|appendChild|while|length|in|opera|onresize|clearTimeout|setTimeout'.split('|'),0,{}))



$.fn.tooltip = function(options) {
	var defaults = {
		offsetX: 0,
		offsetY: 15,
		opacity: 1,
		attribute: 'title',
		keepAttribute: false,
		removeAlt: true
	};
	var options = $.extend(defaults, options);

	var textdiv = $('<div class="tooltip_text"></div>');
	var tooltip = $('<div></div>');

	tooltip
		.append('<div class="tooltip_top"></div>')
		.append(textdiv)
		.append('<div class="tooltip_bottom"></div>');



	tooltip.addClass('tooltip').appendTo('body').hide();
	if ((options.opacity >0) && (options.opacity<1 )){
		tooltip.css('opacity',options.opacity)
	}

	return this.each(function() {
		$this = $(this);
		if (options.removeAlt)
			$this.attr('alt','');

		$this.hover(function(){
  			if ($(this).attr(options.attribute)!=''){
				var text = $(this).attr(options.attribute);
				if (text.indexOf(' - ')>=0){
					var arr = text.split(' - ');
					text = '<strong>'+arr[0]+'</strong><br>';
					for (var i = 1; i<arr.length; i++){
						text +=arr[i]+'<br>';
					}

				}
				textdiv.html(text);
				tooltip.show();

				if (!options.keepAttribute)
					$(this).attr('old',$(this).attr(options.attribute)).attr(options.attribute,'');
			}

		},function(){
			tooltip.hide();
			if (!options.keepAttribute)
				$(this).attr(options.attribute,$(this).attr('old'));
		}).mousemove(function(e){
				tooltip.css({left:e.pageX+options.offsetX, top:e.pageY+options.offsetY});
		});
	});
};
