/* iPhone/iPad/iPod detection

function isiPhone(){
    return (
        (navigator.platform.indexOf("iPhone") != -1) ||
        (navigator.platform.indexOf("iPod") != -1)
    );
}
if(isiPhone()){
	var popup = $.cookie('popup');
	if (popup == 'seenit') {   
		alert('Great news! We now have a new iPhone app to record and track your expense and mileage claims. It\'s free from the App store now! http://google.com');
	};
	Set cookie
		$.cookie('popup', 'seenit');
	});
}	 
*/

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});


/**
 * Validates elements that can be animated
 */
jQuery.fxCheckTag = function(e)
{
	if (/^tr$|^td$|^tbody$|^caption$|^thead$|^tfoot$|^col$|^colgroup$|^th$|^body$|^header$|^script$|^frame$|^frameset$|^option$|^optgroup$|^meta$/i.test(e.nodeName) )
		return false;
	else 
		return true;
};

/**
 * Destroy the wrapper used for some animations
 */
jQuery.fx.destroyWrapper = function(e, old)
{
	var c = e.firstChild;
	var cs = c.style;
	cs.position = old.position;
	cs.marginTop = old.margins.t;
	cs.marginLeft = old.margins.l;
	cs.marginBottom = old.margins.b;
	cs.marginRight = old.margins.r;
	cs.top = old.top + 'px';
	cs.left = old.left + 'px';
	e.parentNode.insertBefore(c, e);
	e.parentNode.removeChild(e);
};

/**
 * Builds a wrapper used for some animations
 */
jQuery.fx.buildWrapper = function(e)
{
	if (!jQuery.fxCheckTag(e))
		return false;
	var t = jQuery(e);
	var es = e.style;
	var restoreStyle = false;

	if (t.css('display') == 'none') {
		oldVisibility = t.css('visibility');
		t.css('visibility', 'hidden').show();
		restoreStyle = true;
	}
	var oldStyle = {};
	oldStyle.position = t.css('position');
	oldStyle.sizes = jQuery.iUtil.getSize(e);
	oldStyle.margins = jQuery.iUtil.getMargins(e);

	var oldFloat = e.currentStyle ? e.currentStyle.styleFloat : t.css('float');
	oldStyle.top = parseInt(t.css('top'))||0;
	oldStyle.left = parseInt(t.css('left'))||0;
	var wid = 'w_' + parseInt(Math.random() * 10000);
	var wr = document.createElement(/^img$|^br$|^input$|^hr$|^select$|^textarea$|^object$|^iframe$|^button$|^form$|^table$|^ul$|^dl$|^ol$/i.test(e.nodeName) ? 'div' : e.nodeName);
	jQuery.attr(wr,'id', wid);
	var wrapEl = jQuery(wr).addClass('fxWrapper');
	var wrs = wr.style;
	var top = 0;
	var left = 0;
	if (oldStyle.position == 'relative' || oldStyle.position == 'absolute'){
		top = oldStyle.top;
		left = oldStyle.left;
	}

	wrs.top = top + 'px';
	wrs.left = left + 'px';
	wrs.position = oldStyle.position != 'relative' && oldStyle.position != 'absolute' ? 'relative' : oldStyle.position;
	wrs.height = oldStyle.sizes.hb + 'px';
	wrs.width = oldStyle.sizes.wb + 'px';
	wrs.marginTop = oldStyle.margins.t;
	wrs.marginRight = oldStyle.margins.r;
	wrs.marginBottom = oldStyle.margins.b;
	wrs.marginLeft = oldStyle.margins.l;
	wrs.overflow = 'hidden';
	if (jQuery.browser.msie) {
		wrs.styleFloat = oldFloat;
	} else {
		wrs.cssFloat = oldFloat;
	}
	if (jQuery.browser == "msie") {
		es.filter = "alpha(opacity=" + 0.999*100 + ")";
	}
	es.opacity = 0.999;
	//t.wrap(wr);
	e.parentNode.insertBefore(wr, e);
	wr.appendChild(e);
	es.marginTop = '0px';
	es.marginRight = '0px';
	es.marginBottom = '0px';
	es.marginLeft = '0px';
	es.position = 'absolute';
	es.listStyle = 'none';
	es.top = '0px';
	es.left = '0px';
	if (restoreStyle) {
		t.hide();
		es.visibility = oldVisibility;
	}
	return {oldStyle:oldStyle, wrapper:jQuery(wr)};
};

/**
 * named colors
 */
jQuery.fx.namedColors = {
	aqua:[0,255,255],
	azure:[240,255,255],
	beige:[245,245,220],
	black:[0,0,0],
	blue:[0,0,255],
	brown:[165,42,42],
	cyan:[0,255,255],
	darkblue:[0,0,139],
	darkcyan:[0,139,139],
	darkgrey:[169,169,169],
	darkgreen:[0,100,0],
	darkkhaki:[189,183,107],
	darkmagenta:[139,0,139],
	darkolivegreen:[85,107,47],
	darkorange:[255,140,0],
	darkorchid:[153,50,204],
	darkred:[139,0,0],
	darksalmon:[233,150,122],
	darkviolet:[148,0,211],
	fuchsia:[255,0,255],
	gold:[255,215,0],
	green:[0,128,0],
	indigo:[75,0,130],
	khaki:[240,230,140],
	lightblue:[173,216,230],
	lightcyan:[224,255,255],
	lightgreen:[144,238,144],
	lightgrey:[211,211,211],
	lightpink:[255,182,193],
	lightyellow:[255,255,224],
	lime:[0,255,0],
	magenta:[255,0,255],
	maroon:[128,0,0],
	navy:[0,0,128],
	olive:[128,128,0],
	orange:[255,165,0],
	pink:[255,192,203],
	purple:[128,0,128],
	red:[255,0,0],
	silver:[192,192,192],
	white:[255,255,255],
	yellow:[255,255,0]
};

/**
 * parses a color to an object for reg, green and blue
 */
jQuery.fx.parseColor = function(color, notColor)
{
	if (jQuery.fx.namedColors[color]) 
		return {
			r: jQuery.fx.namedColors[color][0],
			g: jQuery.fx.namedColors[color][1],
			b: jQuery.fx.namedColors[color][2]
		};
	else if (result = /^rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)$/.exec(color))
		return {
			r: parseInt(result[1]),
			g: parseInt(result[2]),
			b: parseInt(result[3])
		};
	else if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)$/.exec(color)) 
		return {
			r: parseFloat(result[1])*2.55,
			g: parseFloat(result[2])*2.55,
			b: parseFloat(result[3])*2.55
		};
	else if (result = /^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(color))
		return {
			r: parseInt("0x"+ result[1] + result[1]),
			g: parseInt("0x" + result[2] + result[2]),
			b: parseInt("0x" + result[3] + result[3])
		};
	else if (result = /^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(color))
		return {
			r: parseInt("0x" + result[1]),
			g: parseInt("0x" + result[2]),
			b: parseInt("0x" + result[3])
		};
	else
		return notColor == true ? false : {r: 255, g: 255, b: 255};
};
/**
 * CSS rules that can be animated
 */
jQuery.fx.cssProps = {
	borderBottomWidth:1,
	borderLeftWidth:1,
	borderRightWidth:1,
	borderTopWidth:1,
	bottom:1,
	fontSize:1,
	height:1,
	left:1,
	letterSpacing:1,
	lineHeight:1,
	marginBottom:1,
	marginLeft:1,
	marginRight:1,
	marginTop:1,
	maxHeight:1,
	maxWidth:1,
	minHeight:1,
	minWidth:1,
	opacity:1,
	outlineOffset:1,
	outlineWidth:1,
	paddingBottom:1,
	paddingLeft:1,
	paddingRight:1,
	paddingTop:1,
	right:1,
	textIndent:1,
	top:1,
    width:1,
	zIndex:1
};
/**
 * CSS color rules that can be animated
 */
jQuery.fx.colorCssProps = {
	backgroundColor:1,
	borderBottomColor:1,
	borderLeftColor:1,
	borderRightColor:1,
	borderTopColor:1,
	color:1,
	outlineColor:1
};

jQuery.fx.cssSides = ['Top', 'Right', 'Bottom', 'Left'];
jQuery.fx.cssSidesEnd = {
	'borderWidth': ['border', 'Width'],
	'borderColor': ['border', 'Color'],
	'margin': ['margin', ''],
	'padding': ['padding', '']
};

/**
 * Overwrite animation to use new FX function
 */
jQuery.fn.extend({

	animate_interface: function( prop, speed, easing, callback ) {
		return this.queue(function(){
			var opt = jQuery.speed(speed, easing, callback);
			var e = new jQuery.fxe( this, opt, prop );

		});
	}
});
/**
 * Improved FXC function that aniamtes collection of properties per timer. Accepts inline styles and class names to animate
 */
jQuery.extend({
	pause: function(elem, options)
	{
		var z = this, values;
		z.step = function()
		{
			if ( jQuery.isFunction( options.complete ) )
				options.complete.apply( elem );
		};
		z.timer=setInterval(function(){z.step();},options.duration);
		elem.animationHandler = z;
	},
	easing :  {
		linear: function(p, n, firstNum, delta, duration) {
			return ((-Math.cos(p*Math.PI)/2) + 0.5) * delta + firstNum;
		}
	},
	fxe: function( elem, options, prop ){
		var z = this, values;

		// The styles
		var y = elem.style;
		var oldOverflow = jQuery.css(elem, "overflow");
		var oldDisplay= jQuery.css(elem, "display");
		var props = {};
		z.startTime = (new Date()).getTime();
		options.easing = options.easing && jQuery.easing[options.easing] ? options.easing : 'linear';

		z.getValues = function(tp, vp)
		{
			if (jQuery.fx.cssProps[tp]) {
				if (vp == 'show' || vp == 'hide' || vp == 'toggle') {
					if ( !elem.orig ) elem.orig = {};
					var r = parseFloat( jQuery.curCSS(elem, tp) );
					elem.orig[tp] = r && r > -10000 ? r : (parseFloat( jQuery.css(elem,tp) )||0);
					vp = vp == 'toggle' ? ( oldDisplay == 'none' ? 'show' : 'hide') : vp;
					options[vp] = true;
					props[tp] = vp == 'show' ? [0, elem.orig[tp]] : [elem.orig[tp], 0];
					if (tp != 'opacity')
						y[tp] = props[tp][0] + (tp != 'zIndex' && tp != 'fontWeight' ? 'px':'');
					else
						jQuery.attr(y, "opacity", props[tp][0]);
				} else {
					props[tp] = [parseFloat( jQuery.curCSS(elem, tp) ), parseFloat(vp)||0];
				}
			} else if (jQuery.fx.colorCssProps[tp])
				props[tp] = [jQuery.fx.parseColor(jQuery.curCSS(elem, tp)), jQuery.fx.parseColor(vp)];
			else if(/^margin$|padding$|border$|borderColor$|borderWidth$/i.test(tp)) {
				var m = vp.replace(/\s+/g, ' ').replace(/rgb\s*\(\s*/g,'rgb(').replace(/\s*,\s*/g,',').replace(/\s*\)/g,')').match(/([^\s]+)/g);
				switch(tp){
					case 'margin':
					case 'padding':
					case 'borderWidth':
					case 'borderColor':
						m[3] = m[3]||m[1]||m[0];
						m[2] = m[2]||m[0];
						m[1] = m[1]||m[0];
						for(var i = 0; i < jQuery.fx.cssSides.length; i++) {
							var nmp = jQuery.fx.cssSidesEnd[tp][0] + jQuery.fx.cssSides[i] + jQuery.fx.cssSidesEnd[tp][1];
							props[nmp] = tp == 'borderColor' ?
								[jQuery.fx.parseColor(jQuery.curCSS(elem, nmp)), jQuery.fx.parseColor(m[i])]
								: [parseFloat( jQuery.curCSS(elem, nmp) ), parseFloat(m[i])];
						}
						break;
					case 'border':
						for(var i = 0; i< m.length; i++) {
							var floatVal = parseFloat(m[i]);
							var sideEnd = !isNaN(floatVal) ? 'Width' : (!/transparent|none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset/i.test(m[i]) ? 'Color' : false);
							if (sideEnd) {
								for(var j = 0; j < jQuery.fx.cssSides.length; j++) {
									nmp = 'border' + jQuery.fx.cssSides[j] + sideEnd;
									props[nmp] = sideEnd == 'Color' ?
								[jQuery.fx.parseColor(jQuery.curCSS(elem, nmp)), jQuery.fx.parseColor(m[i])]
								: [parseFloat( jQuery.curCSS(elem, nmp) ), floatVal];
								}
							} else {
								y['borderStyle'] = m[i];
							}
						}
						break;
				}
			} else {
				y[tp] = vp;
			}
			return false;
		};

		for(p in prop) {
			if (p == 'style') {
				var newStyles = jQuery.parseStyle(prop[p]);
				for (np in newStyles) {
					this.getValues(np, newStyles[np]);
				}
			} else if (p == 'className') {
				if (document.styleSheets)
					for (var i=0; i<document.styleSheets.length; i++){
						var cssRules = document.styleSheets[i].cssRules||document.styleSheets[i].rules||null;
						if (cssRules) {
							for (var j=0; j<cssRules.length; j++) {
								if(cssRules[j].selectorText == '.' + prop[p]) {
									var rule = new RegExp('\.' + prop[p] + ' {');
									var styles = cssRules[j].style.cssText;
									var newStyles = jQuery.parseStyle(styles.replace(rule, '').replace(/}/g, ''));
									for (np in newStyles) {
										this.getValues(np, newStyles[np]);
									}
								}
							}
						}
					}
			} else {
				this.getValues(p, prop[p]);
			}
		}
		y.display = oldDisplay == 'none' ? 'block' : oldDisplay;
		y.overflow = 'hidden';

		/*if (options.show)
			y.display = "";*/

		z.step = function(){
			var t = (new Date()).getTime();
			if (t > options.duration + z.startTime) {
				clearInterval(z.timer);
				z.timer = null;
				for (p in props) {
					if ( p == "opacity" )
						jQuery.attr(y, "opacity", props[p][1]);
					else if (typeof props[p][1] == 'object')
						y[p] = 'rgb(' + props[p][1].r +',' + props[p][1].g +',' + props[p][1].b +')';
					else 
						y[p] = props[p][1] + (p != 'zIndex' && p != 'fontWeight' ? 'px':'');
				}
				if ( options.hide || options.show )
					for ( var p in elem.orig )
						if (p == "opacity")
							jQuery.attr(y, p, elem.orig[p]);
						else
							y[p] = "";
				y.display = options.hide ? 'none' : (oldDisplay !='none' ? oldDisplay : 'block');
				y.overflow = oldOverflow;
				elem.animationHandler = null;
				if ( jQuery.isFunction( options.complete ) )
					options.complete.apply( elem );
			} else {
				var n = t - this.startTime;
				var pr = n / options.duration;
				for (p in props) {
					if (typeof props[p][1] == 'object') {
						y[p] = 'rgb('
						+ parseInt(jQuery.easing[options.easing](pr, n,  props[p][0].r, (props[p][1].r-props[p][0].r), options.duration))
						+ ','
						+ parseInt(jQuery.easing[options.easing](pr, n,  props[p][0].g, (props[p][1].g-props[p][0].g), options.duration))
						+ ','
						+ parseInt(jQuery.easing[options.easing](pr, n,  props[p][0].b, (props[p][1].b-props[p][0].b), options.duration))
						+')';
					} else {
						var pValue = jQuery.easing[options.easing](pr, n,  props[p][0], (props[p][1]-props[p][0]), options.duration);
						if ( p == "opacity" )
							jQuery.attr(y, "opacity", pValue);
						else 
							y[p] = pValue + (p != 'zIndex' && p != 'fontWeight' ? 'px':'');
					}
				}

			}
		};
	z.timer=setInterval(function(){z.step();},13);
	elem.animationHandler = z;
	},
	stopAnim: function(elem, step)
	{
		if (step)
			elem.animationHandler.startTime -= 100000000;
		else {
			window.clearInterval(elem.animationHandler.timer);
			elem.animationHandler = null;
			// jQuery.dequeue(elem, "fx");
			jQuery(elem).dequeue("fx");
		}
	}
}
);

jQuery.parseStyle = function(styles) {
	var newStyles = {};
	if (typeof styles == 'string') {
		styles = styles.toLowerCase().split(';');
		for(var i=0; i< styles.length; i++){
			rule = styles[i].split(':');
			if (rule.length == 2) {
				newStyles[jQuery.trim(rule[0].replace(/\-(\w)/g,function(m,c){return c.toUpperCase();}))] = jQuery.trim(rule[1]);
			}
		}
	}
	return newStyles;
};



/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version: 2.21
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
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}('(4($){8 m=\'2.21\';8 n=$.20.22&&/2U 6.0/.1r(2V.2W);4 1B(){7(23.24&&23.24.1B)23.24.1B(\'[E] \'+2X.2Y.2Z.30(31,\'\'))};$.F.E=4(l){P B.1k(4(){l=l||{};7(l.2r==2s){32(l){25\'33\':7(B.12)1H(B.12);B.12=0;P;25\'26\':B.1j=1;P;25\'34\':B.1j=0;P;35:l={1l:l}}}7(B.12)1H(B.12);B.12=0;B.1j=0;8 c=$(B);8 d=l.27?$(l.27,B):c.36();8 e=d.37();7(e.M<2){1B(\'38; 39 3a 3b: \'+e.M);P}8 f=$.3c({},$.F.E.2t,l||{},$.2u?c.2u():$.3d?c.3e():{});7(f.28)f.29=f.2a||e.M;f.H=f.H?[f.H]:[];f.1g=f.1g?[f.1g]:[];f.1g.2v(4(){f.2b=0});7(f.1s)f.1g.I(4(){1m(e,f,0,!f.1n)});7(n&&f.1I&&!f.2w)2c(d);8 g=B.3f;f.C=V((g.1C(/w:(\\d+)/)||[])[1])||f.C;f.A=V((g.1C(/h:(\\d+)/)||[])[1])||f.A;f.W=V((g.1C(/t:(\\d+)/)||[])[1])||f.W;7(c.u(\'1J\')==\'3g\')c.u(\'1J\',\'3h\');7(f.C)c.C(f.C);7(f.A&&f.A!=\'1K\')c.A(f.A);7(f.1o){f.1t=[];1D(8 i=0;i<e.M;i++)f.1t.I(i);f.1t.3i(4(a,b){P 3j.1o()-0.5});f.1p=0;f.1d=f.1t[0]}R 7(f.1d>=e.M)f.1d=0;8 h=f.1d||0;d.u({1J:\'2x\',x:0,9:0}).T().1k(4(i){8 z=h?i>=h?e.M-(i-h):h-i:e.M-i;$(B).u(\'z-1L\',z)});$(e[h]).u(\'1e\',1).S();7($.20.22)e[h].2y.2z(\'2d\');7(f.1h&&f.C)d.C(f.C);7(f.1h&&f.A&&f.A!=\'1K\')d.A(f.A);7(f.26)c.3k(4(){B.1j=1},4(){B.1j=0});8 j=$.F.E.K[f.1l];7($.2A(j))j(c,d,f);R 7(f.1l!=\'2e\')1B(\'3l 3m: \'+f.1l);d.1k(4(){8 a=$(B);B.X=(f.1h&&f.A)?f.A:a.A();B.Y=(f.1h&&f.C)?f.C:a.C()});f.y=f.y||{};f.J=f.J||{};f.G=f.G||{};d.1M(\':2f(\'+h+\')\').u(f.y);7(f.1c)$(d[h]).u(f.1c);7(f.W){7(f.18.2r==2s)f.18={3n:3o,3p:3q}[f.18]||3r;7(!f.1N)f.18=f.18/2;3s((f.W-f.18)<3t)f.W+=f.18}7(f.2g)f.1O=f.1P=f.2g;7(!f.1u)f.1u=f.18;7(!f.1E)f.1E=f.18;f.2B=e.M;f.1i=h;7(f.1o){f.O=f.1i;7(++f.1p==e.M)f.1p=0;f.O=f.1t[f.1p]}R f.O=f.1d>=(e.M-1)?0:f.1d+1;8 k=d[h];7(f.H.M)f.H[0].1Q(k,[k,k,f,2C]);7(f.1g.M>1)f.1g[1].1Q(k,[k,k,f,2C]);7(f.1F&&!f.17)f.17=f.1F;7(f.17)$(f.17).2h(\'1F\',4(){P 2i(e,f,f.1n?-1:1)});7(f.2j)$(f.2j).2h(\'1F\',4(){P 2i(e,f,f.1n?1:-1)});7(f.1v)2D(e,f);f.3u=4(a){8 b=$(a),s=b[0];7(!f.2a)f.29++;e.I(s);7(f.19)f.19.I(s);f.2B=e.M;b.u(\'1J\',\'2x\').2E(c);7(n&&f.1I&&!f.2w)2c(b);7(f.1h&&f.C)b.C(f.C);7(f.1h&&f.A&&f.A!=\'1K\')d.A(f.A);s.X=(f.1h&&f.A)?f.A:b.A();s.Y=(f.1h&&f.C)?f.C:b.C();b.u(f.y);7(1R f.Z==\'4\')f.Z(b)};7(f.W||f.1s)B.12=1S(4(){1m(e,f,0,!f.1n)},f.1s?10:f.W+(f.2F||0))})};4 1m(a,b,c,d){7(b.2b)P;8 p=a[0].1T,1w=a[b.1i],17=a[b.O];7(p.12===0&&!c)P;7(!c&&!p.1j&&((b.28&&(--b.29<=0))||(b.1U&&!b.1o&&b.O<b.1i))){7(b.2k)b.2k(b);P}7(c||!p.1j){7(b.H.M)$.1k(b.H,4(i,o){o.1Q(17,[1w,17,b,d])});8 e=4(){7($.20.22&&b.1I)B.2y.2z(\'2d\');$.1k(b.1g,4(i,o){o.1Q(17,[1w,17,b,d])})};7(b.O!=b.1i){b.2b=1;7(b.1V)b.1V(1w,17,b,e,d);R 7($.2A($.F.E[b.1l]))$.F.E[b.1l](1w,17,b,e);R $.F.E.2e(1w,17,b,e)}7(b.1o){b.1i=b.O;7(++b.1p==a.M)b.1p=0;b.O=b.1t[b.1p]}R{8 f=(b.O+1)==a.M;b.O=f?0:b.O+1;b.1i=f?a.M-1:b.O-1}7(b.1v)$.F.E.2l(b.1v,b.1i)}7(b.W&&!b.1s)p.12=1S(4(){1m(a,b,0,!b.1n)},b.W);R 7(b.1s&&p.1j)p.12=1S(4(){1m(a,b,0,!b.1n)},10)};$.F.E.2l=4(a,b){$(a).3v(\'a\').3w(\'2G\').2d(\'a:2f(\'+b+\')\').3x(\'2G\')};4 2i(a,b,c){8 p=a[0].1T,W=p.12;7(W){1H(W);p.12=0}b.O=b.1i+c;7(b.O<0){7(b.1U)P 1W;b.O=a.M-1}R 7(b.O>=a.M){7(b.1U)P 1W;b.O=0}7(b.1X&&1R b.1X==\'4\')b.1X(c>0,b.O,a[b.O]);1m(a,b,1,c>=0);P 1W};4 2D(b,c){8 d=$(c.1v);$.1k(b,4(i,o){8 a=(1R c.2m==\'4\')?$(c.2m(i,o)):$(\'<a 3y="#">\'+(i+1)+\'</a>\');7(a.3z(\'3A\').M==0)a.2E(d);a.2h(c.2H,4(){c.O=i;8 p=b[0].1T,W=p.12;7(W){1H(W);p.12=0}7(1R c.2n==\'4\')c.2n(c.O,b[c.O]);1m(b,c,1,!c.1n);P 1W})});$.F.E.2l(c.1v,c.1d)};4 2c(b){4 1Y(s){8 s=V(s).3B(16);P s.M<2?\'0\'+s:s};4 2I(e){1D(;e&&e.3C.3D()!=\'3E\';e=e.1T){8 v=$.u(e,\'2J-2K\');7(v.3F(\'3G\')>=0){8 a=v.1C(/\\d+/g);P\'#\'+1Y(a[0])+1Y(a[1])+1Y(a[2])}7(v&&v!=\'3H\')P v}P\'#3I\'};b.1k(4(){$(B).u(\'2J-2K\',2I(B))})};$.F.E.2e=4(a,b,c,d){8 e=$(a),$n=$(b);$n.u(c.y);8 f=4(){$n.1Z(c.J,c.1u,c.1O,d)};e.1Z(c.G,c.1E,c.1P,4(){7(c.L)e.u(c.L);7(!c.1N)f()});7(c.1N)f()};$.F.E.K={2L:4(a,b,c){b.1M(\':2f(\'+c.1d+\')\').u(\'1e\',0);c.H.I(4(){$(B).S()});c.J={1e:1};c.G={1e:0};c.y={1e:0};c.L={N:\'U\'}}};$.F.E.3J=4(){P m};$.F.E.2t={1l:\'2L\',W:3K,1s:0,18:3L,1u:Q,1E:Q,17:Q,2j:Q,1X:Q,1v:Q,2n:Q,2H:\'1F\',2m:Q,H:Q,1g:Q,2k:Q,2g:Q,1O:Q,1P:Q,1G:Q,J:Q,G:Q,y:Q,L:Q,1V:Q,A:\'1K\',1d:0,1N:1,1o:0,1h:0,26:0,28:0,2a:0,2F:0,27:Q,1I:0,1U:0}})(2M);(4($){$.F.E.K.3M=4(d,e,f){d.u(\'14\',\'1a\');f.H.I(4(a,b,c){$(B).S();c.y.x=b.1x;c.G.x=0-a.1x});f.1c={x:0};f.J={x:0};f.L={N:\'U\'}};$.F.E.K.3N=4(d,e,f){d.u(\'14\',\'1a\');f.H.I(4(a,b,c){$(B).S();c.y.x=0-b.1x;c.G.x=a.1x});f.1c={x:0};f.J={x:0};f.L={N:\'U\'}};$.F.E.K.3O=4(d,e,f){d.u(\'14\',\'1a\');f.H.I(4(a,b,c){$(B).S();c.y.9=b.1y;c.G.9=0-a.1y});f.1c={9:0};f.J={9:0}};$.F.E.K.3P=4(d,e,f){d.u(\'14\',\'1a\');f.H.I(4(a,b,c){$(B).S();c.y.9=0-b.1y;c.G.9=a.1y});f.1c={9:0};f.J={9:0}};$.F.E.K.3Q=4(f,g,h){f.u(\'14\',\'1a\').C();h.H.I(4(a,b,c,d){$(B).S();8 e=a.1y,2o=b.1y;c.y=d?{9:2o}:{9:-2o};c.J.9=0;c.G.9=d?-e:e;g.1M(a).u(c.y)});h.1c={9:0};h.L={N:\'U\'}};$.F.E.K.3R=4(f,g,h){f.u(\'14\',\'1a\');h.H.I(4(a,b,c,d){$(B).S();8 e=a.1x,2p=b.1x;c.y=d?{x:-2p}:{x:2p};c.J.x=0;c.G.x=d?e:-e;g.1M(a).u(c.y)});h.1c={x:0};h.L={N:\'U\'}};$.F.E.K.3S=4(d,e,f){f.H.I(4(a,b,c){$(a).u(\'D\',1)});f.Z=4(a){a.T()};f.y={D:2};f.J={C:\'S\'};f.G={C:\'T\'}};$.F.E.K.3T=4(d,e,f){f.H.I(4(a,b,c){$(a).u(\'D\',1)});f.Z=4(a){a.T()};f.y={D:2};f.J={A:\'S\'};f.G={A:\'T\'}};$.F.E.K.1G=4(g,h,j){8 w=g.u(\'14\',\'2N\').C();h.u({9:0,x:0});j.H.I(4(){$(B).S()});j.18=j.18/2;j.1o=0;j.1G=j.1G||{9:-w,x:15};j.19=[];1D(8 i=0;i<h.M;i++)j.19.I(h[i]);1D(8 i=0;i<j.1d;i++)j.19.I(j.19.2O());j.1V=4(a,b,c,d,e){8 f=e?$(a):$(b);f.1Z(c.1G,c.1u,c.1O,4(){e?c.19.I(c.19.2O()):c.19.2v(c.19.3U());7(e)1D(8 i=0,2q=c.19.M;i<2q;i++)$(c.19[i]).u(\'z-1L\',2q-i);R{8 z=$(a).u(\'z-1L\');f.u(\'z-1L\',V(z)+1)}f.1Z({9:0,x:0},c.1E,c.1P,4(){$(e?B:a).T();7(d)d()})})};j.Z=4(a){a.T()}};$.F.E.K.3V=4(d,e,f){f.H.I(4(a,b,c){$(B).S();c.y.x=b.X;c.J.A=b.X});f.Z=4(a){a.T()};f.1c={x:0};f.y={A:0};f.J={x:0};f.G={A:0};f.L={N:\'U\'}};$.F.E.K.3W=4(d,e,f){f.H.I(4(a,b,c){$(B).S();c.J.A=b.X;c.G.x=a.X});f.Z=4(a){a.T()};f.1c={x:0};f.y={x:0,A:0};f.G={A:0};f.L={N:\'U\'}};$.F.E.K.3X=4(d,e,f){f.H.I(4(a,b,c){$(B).S();c.y.9=b.Y;c.J.C=b.Y});f.Z=4(a){a.T()};f.y={C:0};f.J={9:0};f.G={C:0};f.L={N:\'U\'}};$.F.E.K.3Y=4(d,e,f){f.H.I(4(a,b,c){$(B).S();c.J.C=b.Y;c.G.9=a.Y});f.Z=4(a){a.T()};f.y={9:0,C:0};f.J={9:0};f.G={C:0};f.L={N:\'U\'}};$.F.E.K.2P=4(d,e,f){f.1c={x:0,9:0};f.L={N:\'U\'};f.H.I(4(a,b,c){$(B).S();c.y={C:0,A:0,x:b.X/2,9:b.Y/2};c.L={N:\'U\'};c.J={x:0,9:0,C:b.Y,A:b.X};c.G={C:0,A:0,x:a.X/2,9:a.Y/2};$(a).u(\'D\',2);$(b).u(\'D\',1)});f.Z=4(a){a.T()}};$.F.E.K.3Z=4(d,e,f){f.H.I(4(a,b,c){c.y={C:0,A:0,1e:1,9:b.Y/2,x:b.X/2,D:1};c.J={x:0,9:0,C:b.Y,A:b.X}});f.G={1e:0};f.L={D:0}};$.F.E.K.40=4(d,e,f){8 w=d.u(\'14\',\'1a\').C();e.S();f.H.I(4(a,b,c){$(a).u(\'D\',1)});f.y={9:w,D:2};f.L={D:1};f.J={9:0};f.G={9:w}};$.F.E.K.41=4(d,e,f){8 h=d.u(\'14\',\'1a\').A();e.S();f.H.I(4(a,b,c){$(a).u(\'D\',1)});f.y={x:h,D:2};f.L={D:1};f.J={x:0};f.G={x:h}};$.F.E.K.42=4(d,e,f){8 h=d.u(\'14\',\'1a\').A();8 w=d.C();e.S();f.H.I(4(a,b,c){$(a).u(\'D\',1)});f.y={x:h,9:w,D:2};f.L={D:1};f.J={x:0,9:0};f.G={x:h,9:w}};$.F.E.K.43=4(d,e,f){f.H.I(4(a,b,c){c.y={9:B.Y/2,C:0,D:2};c.J={9:0,C:B.Y};c.G={9:0};$(a).u(\'D\',1)});f.Z=4(a){a.T().u(\'D\',1)}};$.F.E.K.44=4(d,e,f){f.H.I(4(a,b,c){c.y={x:B.X/2,A:0,D:2};c.J={x:0,A:B.X};c.G={x:0};$(a).u(\'D\',1)});f.Z=4(a){a.T().u(\'D\',1)}};$.F.E.K.45=4(d,e,f){f.H.I(4(a,b,c){c.y={9:b.Y/2,C:0,D:1,N:\'1z\'};c.J={9:0,C:B.Y};c.G={9:a.Y/2,C:0};$(a).u(\'D\',2)});f.Z=4(a){a.T()};f.L={D:1,N:\'U\'}};$.F.E.K.46=4(d,e,f){f.H.I(4(a,b,c){c.y={x:b.X/2,A:0,D:1,N:\'1z\'};c.J={x:0,A:B.X};c.G={x:a.X/2,A:0};$(a).u(\'D\',2)});f.Z=4(a){a.T()};f.L={D:1,N:\'U\'}};$.F.E.K.47=4(e,f,g){8 d=g.2Q||\'9\';8 w=e.u(\'14\',\'1a\').C();8 h=e.A();g.H.I(4(a,b,c){c.y={D:2,N:\'1z\'};7(d==\'2R\')c.y.9=-w;R 7(d==\'2S\')c.y.x=h;R 7(d==\'2T\')c.y.x=-h;R c.y.9=w;$(a).u(\'D\',1)});g.J={9:0,x:0};g.G={9:0,x:0};g.L={D:2,N:\'U\'}};$.F.E.K.48=4(e,f,g){8 d=g.2Q||\'9\';8 w=e.u(\'14\',\'1a\').C();8 h=e.A();g.H.I(4(a,b,c){c.y.N=\'1z\';7(d==\'2R\')c.G.9=w;R 7(d==\'2S\')c.G.x=-h;R 7(d==\'2T\')c.G.x=h;R c.G.9=-w;$(a).u(\'D\',2);$(b).u(\'D\',1)});g.Z=4(a){a.T()};g.J={9:0,x:0};g.y={D:1,x:0,9:0};g.L={D:1,N:\'U\'}};$.F.E.K.49=4(d,e,f){8 w=d.u(\'14\',\'2N\').C();8 h=d.A();f.H.I(4(a,b,c){$(a).u(\'D\',2);c.y.N=\'1z\';7(!c.G.9&&!c.G.x)c.G={9:w*2,x:-h/2,1e:0};R c.G.1e=0});f.Z=4(a){a.T()};f.y={9:0,x:0,D:1,1e:1};f.J={9:0};f.L={D:2,N:\'U\'}};$.F.E.K.4a=4(o,p,q){8 w=o.u(\'14\',\'1a\').C();8 h=o.A();q.y=q.y||{};8 s;7(q.1f){7(/4b/.1r(q.1f))s=\'1q(1b 1b \'+h+\'11 1b)\';R 7(/4c/.1r(q.1f))s=\'1q(1b \'+w+\'11 \'+h+\'11 \'+w+\'11)\';R 7(/4d/.1r(q.1f))s=\'1q(1b \'+w+\'11 1b 1b)\';R 7(/4e/.1r(q.1f))s=\'1q(\'+h+\'11 \'+w+\'11 \'+h+\'11 1b)\';R 7(/2P/.1r(q.1f)){8 t=V(h/2);8 l=V(w/2);s=\'1q(\'+t+\'11 \'+l+\'11 \'+t+\'11 \'+l+\'11)\'}}q.y.1f=q.y.1f||s||\'1q(1b 1b 1b 1b)\';8 d=q.y.1f.1C(/(\\d+)/g);8 t=V(d[0]),r=V(d[1]),b=V(d[2]),l=V(d[3]);q.H.I(4(g,i,j){7(g==i)P;8 k=$(g).u(\'D\',2);8 m=$(i).u({D:3,N:\'1z\'});8 n=1,1A=V((j.1u/13))-1;4 f(){8 a=t?t-V(n*(t/1A)):0;8 c=l?l-V(n*(l/1A)):0;8 d=b<h?b+V(n*((h-b)/1A||1)):h;8 e=r<w?r+V(n*((w-r)/1A||1)):w;m.u({1f:\'1q(\'+a+\'11 \'+e+\'11 \'+d+\'11 \'+c+\'11)\'});(n++<=1A)?1S(f,13):k.u(\'N\',\'U\')}f()});q.L={};q.J={9:0};q.G={9:0}}})(2M);',62,263,'||||function|||if|var|left|||||||||||||||||||||css|||top|cssBefore||height|this|width|zIndex|cycle|fn|animOut|before|push|animIn|transitions|cssAfter|length|display|nextSlide|return|null|else|show|hide|none|parseInt|timeout|cycleH|cycleW|onAddSlide||px|cycleTimeout||overflow|||next|speed|els|hidden|0px|cssFirst|startingSlide|opacity|clip|after|fit|currSlide|cyclePause|each|fx|go|rev|random|randomIndex|rect|test|continuous|randomMap|speedIn|pager|curr|offsetHeight|offsetWidth|block|count|log|match|for|speedOut|click|shuffle|clearTimeout|cleartype|position|auto|index|not|sync|easeIn|easeOut|apply|typeof|setTimeout|parentNode|nowrap|fxFn|false|prevNextClick|hex|animate|browser||msie|window|console|case|pause|slideExpr|autostop|countdown|autostopCount|busy|clearTypeFix|filter|custom|eq|easing|bind|advance|prev|end|updateActivePagerLink|pagerAnchorBuilder|pagerClick|nextW|nextH|len|constructor|String|defaults|metadata|unshift|cleartypeNoBg|absolute|style|removeAttribute|isFunction|slideCount|true|buildPager|appendTo|delay|activeSlide|pagerEvent|getBg|background|color|fade|jQuery|visible|shift|zoom|direction|right|up|down|MSIE|navigator|userAgent|Array|prototype|join|call|arguments|switch|stop|resume|default|children|get|terminating|too|few|slides|extend|meta|data|className|static|relative|sort|Math|hover|unknown|transition|slow|600|fast|200|400|while|250|addSlide|find|removeClass|addClass|href|parents|body|toString|nodeName|toLowerCase|html|indexOf|rgb|transparent|ffffff|ver|4000|1000|scrollUp|scrollDown|scrollLeft|scrollRight|scrollHorz|scrollVert|slideX|slideY|pop|turnUp|turnDown|turnLeft|turnRight|fadeZoom|blindX|blindY|blindZ|growX|growY|curtainX|curtainY|cover|uncover|toss|wipe|l2r|r2l|t2b|b2t'.split('|'),0,{}));


//fleXcroll v1.9.5
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}('7 E={4Q:6(){Q.M(1m,\'4T\',Q.56)},3x:6(f){7 g=17,H=1m,1P=5n;5(!g.23||!g.4X)B;5(3A(f)==\'4u\')f=17.23(f);5(f==14||1P.2H.2D(\'5m\')!=-1||((1P.2H.2D(\'5x\')!=-1||1P.2H.2D(\'6O\')!=-1)&&!(3A(4d)!="6t"&&4d.6v))||1P.6q==\'6k\'||(1P.6i.2D(\'6j\')!=-1&&1P.2H.2D(\'6x\')!=-1))B;5(f.1E){f.1E();B};5(!f.1Z||f.1Z==\'\'){7 h="6u",c=1;1B(17.23(h+c)!=14){c++};f.1Z=h+c}7 k=f.1Z;f.3f=2E 6B();7 l=f.3f;l.21={6C:[\'-1s\',0],6z:[0,\'-1s\'],6F:[\'1s\',0],6G:[0,\'1s\'],6g:[0,\'-1p\'],6e:[0,\'1p\'],6a:[0,\'-4Z\'],6d:[0,\'+4Z\']};l.3e=["-2s","2s"];l.3n=["-2s","2s"];7 m=Z(\'5N\',C),D=Z(\'5L\',C),G=Z(\'5P\',C),19=Z(\'5R\',C);7 o=Z(\'5M\',C),1i=Z(\'5J\',C),2Q=8;19.A.1t=\'5a 59 5D\';19.1x();f.1a.55=\'2F\';1i.A.5I="5T";1i.A.1w="4C";1i.A.T="4C";1i.A.22="3Y";1i.A.3B="-5Q";1i.1x();7 p=f.R,4F=f.1d;2c(f,19,\'15\',[\'1t-Y-T\',\'1t-1Y-T\',\'1t-11-T\',\'1t-1O-T\']);7 q=f.R,4O=f.1d,3Z=4F-4O,3R=p-q;7 s=(f.1Q)?f.1Q:0,4N=(f.1S)?f.1S:0;7 t=17.3G.1n,3C=/#([^#.]*)$/;7 u=[\'6b\',\'6c\',\'66\'];l.V=[];l.1W=[];l.63=l.O=[];l.5X=l.1T=[];l.1q=[8,8];l.X=[];l.1H=[0,0];l.1l=[];l.3E=[];l.W=[];1B(f.4D){m.13(f.4D)};m.13(o);f.13(D);f.13(19);5(L(f,\'22\')!=\'3Y\')f.1a.22="38";7 w=L(f,\'62-6D\');f.1a.4s=\'Y\';D.A.T="4S";D.A.1w="4S";D.A.11="15";D.A.Y="15";2c(f,19,"15",[\'J-Y\',\'J-11\',\'J-1Y\',\'J-1O\']);7 x=f.1d,4Y=f.R,3W;3W=D.R;D.A.61="5Z 59 5V";5(D.R>3W)2Q=C;D.A.5Y="15";2c(19,f,8,[\'J-Y\',\'J-11\',\'J-1Y\',\'J-1O\']);1r(D);1r(f);l.W[0]=D.1f-f.1f;l.W[2]=D.1k-f.1k;f.1a.4v=L(f,"J-1O");f.1a.4G=L(f,"J-1Y");1r(D);1r(f);l.W[1]=D.1f-f.1f;l.W[3]=D.1k-f.1k;f.1a.4v=L(19,"J-11");f.1a.4G=L(19,"J-Y");7 y=l.W[2]+l.W[3],3S=l.W[0]+l.W[1];D.1a.4s=w;2c(f,D,8,[\'J-Y\',\'J-1Y\',\'J-11\',\'J-1O\']);G.A.T=f.1d+\'F\';G.A.1w=f.R+\'F\';D.A.T=x+\'F\';D.A.1w=4Y+\'F\';G.A.22=\'3Y\';G.A.11=\'15\';G.A.Y=\'15\';G.1x();D.13(m);f.13(G);G.13(1i);m.A.22=\'38\';D.A.22=\'38\';m.A.11="0";m.A.T="4M%";D.A.55=\'2F\';D.A.Y="-"+l.W[2]+"F";D.A.11="-"+l.W[0]+"F";l.3L=1i.R;l.3a=6(){7 a=m.60,3b=64=0;1o(7 i=0;i<a.5b;i++){5(a[i].1d){3b=12.1R(a[i].1d,3b)}};l.O[0]=((l.X[1]&&!l.1l[1])||l.1W[1])?f.1d-l.1H[0]:f.1d;l.1T[0]=3b+y;B l.1T[0]};l.2N=6(){l.O[1]=((l.X[0]&&!l.1l[0])||l.1W[0])?f.R-l.1H[1]:f.R;l.1T[1]=m.R+3S-2;B l.1T[1]};l.4K=6(){m.A.3K=\'69\';m.A.3K=\'65\'};l.3D=6(){D.A.T=(2Q)?(l.O[0]-y-3Z)+\'F\':l.O[0]+\'F\'};l.3F=6(){D.A.1w=(2Q)?(l.O[1]-3S-3R)+\'F\':l.O[1]+\'F\'};l.2t=6(){l.3a();l.2N();G.2x=2E 3I();7 a=G.2x;2t(a,\'68\');a.2p=[18(L(a.4,\'J-11\')),18(L(a.4,\'J-1O\'))];a.4.A.J=\'15\';a.4.K=0;a.4.2R=C;a.4.2f=1;m.4J=a.4;44(a,0);l.1H[0]=a.1c.1d;l.3D();G.2T=2E 3I();7 b=G.2T;2t(b,\'67\');b.2p=[18(L(b.4,\'J-Y\')),18(L(b.4,\'J-1Y\'))];b.4.A.J=\'15\';b.4.K=0;b.4.2R=8;b.4.2f=0;m.5W=b.4;5(H.4z)b.4.A.22=\'38\';44(b,0);l.1H[1]=b.1c.R;l.3F();G.A.1w=f.R+\'F\';b.2j=Z(\'5U\');G.13(b.2j);b.2j.3T=6(){b.4.2S=C;l.24=b.4;b.4.2W=C;b.4.2e=8;G.2x.4.2e=8;E.M(g,\'3X\',2w);E.M(g,\'2v\',2G);E.M(g,\'2M\',2C);B 8}};l.24=14;l.2t();m.4E(o);5(!Q.2d(f,\'4R\',2b)||!Q.2d(f,\'4H\',2b)){f.5H=2b};Q.2d(f,\'4R\',2b);Q.2d(f,\'4H\',2b);f.5F(\'5B\',\'0\');Q.M(f,\'5E\',6(e){5(f.2Z)B;5(!e){7 e=H.1A};7 a=e.57;l.58=a;l.28();5(l.21[\'25\'+a]&&!1m.4z){f.1e(l.21[\'25\'+a][0],l.21[\'25\'+a][1],C);5(e.1J)e.1J();B 8}});Q.M(f,\'5G\',6(e){5(f.2Z)B;5(!e){7 e=H.1A};7 a=e.57;5(l.21[\'25\'+a]){f.1e(l.21[\'25\'+a][0],l.21[\'25\'+a][1],C);5(e.1J)e.1J();B 8}});Q.M(f,\'5K\',6(){l.58=8});Q.M(g,\'2M\',2n);Q.M(f,\'5S\',6(e){5(!e)e=H.1A;7 a=(e.1F)?e.1F:(e.1g)?e.1g:8;5(!a||(a.1u&&a.1u.U(2I("\\\\5O\\\\b"))))B;l.4V=e.2B;l.4t=e.2m;2L();1r(f);2n();E.M(g,\'2v\',3r);l.2l=[f.1k+10,f.1k+l.O[0]-10,f.1f+10,f.1f+l.O[1]-10]});6 3r(e){5(!e)e=H.1A;7 a=e.2B,3m=e.2m,3k=a+l.3q,3o=3m+l.3l;l.3p=(3k<l.2l[0]||3k>l.2l[1])?1:0;l.3t=(3o<l.2l[2]||3o>l.2l[3])?1:0;l.3v=a-l.4V;l.3y=3m-l.4t;l.33=(l.3v>40)?1:(l.3v<-40)?-1:0;l.36=(l.3y>40)?1:(l.3y<-40)?-1:0;5((l.33!=0||l.36!=0)&&!l.26)l.26=H.35(6(){5(l.33==0&&l.36==0){H.2g(l.26);l.26=8;B};2L();5(l.3p==1||l.3t==1)f.1e((l.33*l.3p)+"s",(l.36*l.3t)+"s",C)},45)}6 2n(){E.27(g,\'2v\',3r);5(l.26)H.2g(l.26);l.26=8;5(l.3d)H.50(l.3d);5(l.3i)H.2g(l.3i)}6 2L(){l.3q=(H.4w)?H.4w:(g.2a&&g.2a.1S)?g.2a.1S:0;l.3l=(H.4B)?H.4B:(g.2a&&g.2a.1Q)?g.2a.1Q:0}f.1E=6(a){5(G.N[1]()===0||G.N[0]()===0)B;m.A.J=\'5a\';7 b=l.X[0],4i=l.X[1],3c=G.2x,2u=G.2T,39,34,2o=[];G.A.T=f.1d-3Z+\'F\';G.A.1w=f.R-3R+\'F\';2o[0]=l.O[0];2o[1]=l.O[1];l.X[0]=l.3a()>l.O[0];l.X[1]=l.2N()>l.O[1];7 c=(b!=l.X[0]||4i!=l.X[1]||2o[0]!=l.O[0]||2o[1]!=l.O[1])?C:8;3c.1c.3s(l.X[1]);2u.1c.3s(l.X[0]);39=(l.X[1]||l.1W[1]);34=(l.X[0]||l.1W[0]);l.3a();l.2N();l.3F();l.3D();5(!l.X[0]||!l.X[1]||l.1l[0]||l.1l[1])2u.2j.1x();1j 2u.2j.2i();5(39)2J(3c,(34&&!l.1l[0])?l.1H[1]:0);1j m.A.11="0";5(34)2J(2u,(39&&!l.1l[1])?l.1H[0]:0);1j m.A.Y="0";5(c&&!a)f.1E(C);m.A.J=\'15\';l.1q[0]=l.1q[1]=8};f.5A=f.1e=6(a,b,c){7 d=[[8,8],[8,8]],P;5((a||a===0)&&l.V[0]){a=3w(a,0);P=G.2T.4;P.1b=(c)?12.1M(12.1R(P.1C,P.1b-a),0):-a;P.3g();d[0]=[-P.1b-P.1L,-P.1C]}5((b||b===0)&&l.V[1]){b=3w(b,1);P=G.2x.4;P.1b=(c)?12.1M(12.1R(P.1C,P.1b-b),0):-b;P.3g();d[1]=[-P.1b-P.1L,-P.1C]}5(!c)l.1q[0]=l.1q[1]=8;B d};f.30=6(a){5(a==14||!4l(a))B;7 b=4k(a);f.1e(b[0]+l.W[2],b[1]+l.W[0],8);f.1e(0,0,C)};2c(19,f,\'15\',[\'1t-Y-T\',\'1t-1Y-T\',\'1t-11-T\',\'1t-1O-T\']);f.4E(19);f.1Q=0;f.1S=0;f.2Y=C;2X(f,\'6H\',8);f.1E();f.1e(4N,s,C);5(t.U(3C)){f.30(g.23(t.U(3C)[1]))}G.2i();l.6E=H.35(6(){7 n=1i.R;5(n!=l.3L){f.1E();l.3L=n}},6I);6 3w(v,i){7 a=v.6K();v=6P(a);B 18((a.U(/p$/))?v*l.O[i]*0.9:(a.U(/s$/))?v*l.O[i]*0.1:v)}6 41(a){7 a=a.6N(\'-\'),47=a[0],i;1o(i=1;42=a[i];i++){47+=42.6J(0).6M()+42.6L(1)}B 47}6 L(a,b){5(H.4m)B H.4m(a,14).6A(b);5(a.4o)B a.4o[41(b)];B 8};6 2c(a,b,c,d){7 e=2E 3I();1o(7 i=0;i<d.5b;i++){e[i]=41(d[i]);b.1a[e[i]]=L(a,d[i],e[i]);5(c)a.1a[e[i]]=c}};6 Z(b,c){7 d=g.4X(\'4p\');d.1Z=k+\'25\'+b;d.1u=(c)?b:b+\' 6y\';d.N=[6(){B d.1d},6(){B d.R}];d.2q=[6(a){d.A.T=a},6(a){d.A.1w=a}];d.4q=[6(){B L(d,"Y")},6(){B L(d,"11")}];d.16=[6(a){d.A.Y=a},6(a){d.A.11=a}];d.1x=6(){d.A.2z="2F"};d.2i=6(a){d.A.2z=(a)?L(a,\'2z\'):"6m"};d.A=d.1a;B d};6 2t(a,b){a.1c=Z(b+\'6l\');a.2A=Z(b+\'6f\');a.20=Z(b+\'6h\');a.4=Z(b+\'6n\');a.1X=Z(b+\'6o\');a.1v=Z(b+\'6w\');G.13(a.1c);a.1c.13(a.4);a.1c.13(a.2A);a.1c.13(a.20);a.4.13(a.1X);a.4.13(a.1v)};6 44(b,c){7 d=b.1c,4=b.4,i=4.2f;4.1V=b.2p[0];4.37=d;4.D=D;4.4c=m;4.1L=0;2J(b,c,C);4.3J=6(){4.K=(12.1M(12.1R(4.K,0),4.29));4.1b=18((4.K/4.32)*4.1C);4.1L=(4.K==0)?0:(4.K==4.29)?0:4.1L;4.16[i](4.K+4.1V+"F");m.16[i](4.1b+4.1L+"F")};4.3g=6(){4.K=18((4.1b*4.32)/4.1C);4.1L=4.1b-18((4.K/4.32)*4.1C);4.K=(12.1M(12.1R(4.K,0),4.29));4.16[i](4.K+4.1V+"F");4.16[i](4.K+4.1V+"F");m.16[i](4.1b+"F")};l.2k=L(4,\'z-4a\');4.A.3B=(l.2k=="6p"||l.2k=="0"||l.2k==\'6s\')?2:l.2k;D.A.3B=L(4,\'z-4a\');4.3T=6(){4.2W=C;l.24=4;4.2S=8;4.2e=8;E.M(g,\'3X\',2w);E.M(g,\'2v\',2G);E.M(g,\'2M\',2C);B 8};4.6r=2n;d.3T=d.5C=6(e){5(!e){7 e=H.1A}5(e.1F&&(e.1F==b.1X||e.1F==b.1v||e.1F==b.4))B;5(e.1g&&(e.1g==b.1X||e.1g==b.1v||e.1g==b.4))B;7 a,1U=[];2L();l.28();1r(4);a=(4.2R)?e.2m+l.3l-4.1f:e.2B+l.3q-4.1k;1U[4.2f]=(a<0)?l.3n[0]:l.3n[1];1U[1-4.2f]=0;f.1e(1U[0],1U[1],C);5(e.5o!="5z"){2n();l.3d=H.49(6(){l.3i=H.35(6(){f.1e(1U[0],1U[1],C)},4b)},5c)}B 8};d.3s=6(r){5(r){d.2i(f);l.1l[i]=(L(d,"2z")=="2F")?C:8;5(!l.1l[i])4.2i(f);1j 4.1x();l.V[i]=C;2X(d,"","4n")}1j{d.1x();4.1x();l.1W[i]=(L(d,"2z")!="2F")?C:8;l.V[i]=8;4.K=0;m.16[i](\'15\');2X(d,"4n","")}D.16[1-i]((l.3E[i]&&(r||l.1W[i])&&!l.1l[i])?l.1H[1-i]-l.W[i*2]+"F":"-"+l.W[i*2]+"F")};d.5e=2w};6 2J(a,b,c){7 d=a.1c,4=a.4,2A=a.2A,1X=a.1X,20=a.20,1v=a.1v,i=4.2f;d.2q[i](G.N[i]()-b+\'F\');d.16[1-i](G.N[1-i]()-d.N[1-i]()+\'F\');l.3E[i]=(18(d.4q[1-i]())===0)?C:8;a.43=a.2p[0]+a.2p[1];a.3M=18((d.N[i]()-a.43)*0.5d);4.4g=12.1M(12.1R(12.1M(18(l.O[i]/l.1T[i]*d.N[i]()),a.3M),45),a.3M);4.2q[i](4.4g+\'F\');4.29=d.N[i]()-4.N[i]()-a.43;4.K=12.1M(12.1R(0,4.K),4.29);4.16[i](4.K+4.1V+\'F\');4.1C=D.N[i]()-l.1T[i];4.32=4.29;2A.2q[i](d.N[i]()-20.N[i]()+\'F\');1X.2q[i](4.N[i]()-1v.N[i]()+\'F\');1v.16[i](4.N[i]()-1v.N[i]()+\'F\');20.16[i](d.N[i]()-20.N[i]()+\'F\');5(!c)4.3J();l.4K()};l.28=6(){D.1Q=0;D.1S=0;f.1Q=0;f.1S=0};Q.M(H,\'4T\',6(){5(f.2Y)f.1E()});Q.M(H,\'5i\',6(){5(f.3N)H.50(f.3N);f.3N=H.49(6(){5(f.2Y)f.1E()},4b)});1o(7 j=0,3O;3O=u[j];j++){7 z=f.2O(3O);1o(7 i=0,31;31=z[i];i++){E.M(31,\'5k\',6(){f.2Z=C});E.M(31,\'5s\',5v=6(){f.2Z=8})}};6 2w(){B 8};6 2G(e){5(!e){7 e=H.1A};7 a=l.24,I,46,5y,5h;5(a==14)B;5(!E.4f&&!e.5t)2C();46=(a.2S)?2:1;1o(7 i=0;i<46;i++){I=(i==1)?a.4c.4J:a;5(a.2W){5(!I.2e){l.28();1r(I);1r(I.37);I.4j=e.2m-I.1f;I.4h=e.2B-I.1k;I.4e=I.K;I.2e=C};I.K=(I.2R)?e.2m-I.4j-I.37.1f-I.1V:e.2B-I.4h-I.37.1k-I.1V;5(a.2S)I.K=I.K+(I.K-I.4e);I.3J()}1j I.2e=8}};6 2C(){5(l.24!=14){l.24.2W=8}l.24=14;E.27(g,\'3X\',2w);E.27(g,\'2v\',2G);E.27(g,\'2M\',2C)};6 2b(e){5(!e)e=H.1A;5(!Q.2Y)B;7 a=Q,2V,3h,1K=8,1h=0,1D;l.28();3z=(e.1F)?e.1F:(e.1g)?e.1g:Q;5(3z.1Z&&3z.1Z.U(/5l/))1K=C;5(e.4r)1h=-e.4r;5(e.48)1h=e.48;1h=(1h<0)?-1:+1;1D=(1h<0)?0:1;l.1q[1-1D]=8;5((l.1q[1D]&&!1K)||(!l.V[0]&&!l.V[1]))B;5(l.V[1]&&!1K)1I=f.1e(8,l.3e[1D],C);2V=!l.V[1]||1K||(l.V[1]&&((1I[1][0]==1I[1][1]&&1h>0)||(1I[1][0]==0&&1h<0)));5(l.V[0]&&(!l.V[1]||1K))1I=f.1e(l.3e[1D],8,C);3h=!l.V[0]||(l.V[0]&&l.V[1]&&2V&&!1K)||(l.V[0]&&((1I[0][0]==1I[0][1]&&1h>0)||(1I[0][0]==0&&1h<0)));5(2V&&3h&&!1K)l.1q[1D]=C;1j l.1q[1D]=8;5(e.1J)e.1J();B 8};6 4l(a){1B(a.1z){a=a.1z;5(a==f)B C}B 8};6 1r(a){7 b=a,1N=1G=0;7 c="";5(b.2K){1B(b){1N+=b.4U;1G+=b.51;b=b.2K;c+=1G+" "}}1j 5(b.x){1N+=b.x;1G+=b.y}a.1k=1N;a.1f=1G};6 4k(a){7 b=a;1N=1G=0;1B(!b.R&&b.1z&&b!=m&&L(b,\'3K\')=="5j"){b=b.1z}5(b.2K){1B(b!=m){1N+=b.4U;1G+=b.51;b=b.2K}}B[1N,1G]};6 2X(a,b,c){5(!a.1u)a.1u=\'\';7 d=a.1u;5(b&&!d.U(2I("(^|\\\\s)"+b+"($|\\\\s)")))d=d.3u(/(\\S$)/,\'$1 \')+b;5(c)d=d.3u(2I("((^|\\\\s)+"+c+")+($|\\\\s)","g"),\'$2\').3u(/\\s$/,\'\');a.1u=d}},56:6(){5(E.2P)1m.2g(E.2P);7 d=/#([^#.]*)$/,2y=/(.*)#.*$/,5p,i,1y,54=17.2O("a"),2h=17.3G.1n;5(2h.U(2y))2h=2h.U(2y)[1];1o(i=0;1y=54[i];i++){5(1y.1n&&1y.1n.U(d)&&1y.1n.U(2y)&&2h===1y.1n.U(2y)[1]){1y.3j=C;E.M(1y,\'5q\',6(e){5(!e)e=1m.1A;7 a=(e.1g)?e.1g:Q;1B(!a.3j&&a.1z){a=a.1z};5(!a.3j)B;7 b=17.23(a.1n.U(d)[1]),2U=8;5(b==14)b=(b=17.5w(a.1n.U(d)[1])[0])?b:14;5(b!=14){7 c=b;1B(c.1z){c=c.1z;5(c.30){c.30(b);2U=c}};5(2U){5(e.1J)e.1J();17.3G.1n="#"+a.1n.U(d)[1];2U.3f.28();B 8}}})}};E.3V();5(1m.4A)1m.4A()},3V:6(){5(E.4y)B;E.4y=C;7 a=E.4x(17.2O("5u")[0],"4p",\'4L\');1o(7 i=0,3H;3H=a[i];i++)E.3x(3H)},4x:6(a,b,c){5(3A(a)==\'4u\')a=17.23(a);5(a==14)B 8;7 d=2E 2I("(^|\\\\s)"+c+"($|\\\\s)"),5r,3Q=[],3P=0;7 e=a.2O(b);1o(7 i=0,2r;2r=e[i];i++){5(2r.1u&&2r.1u.U(d)){3Q[3P]=2r;3P++}}B 3Q},2P:1m.35(6(){7 a=17.23(\'4L-5g\');5(a!=14){E.3V();1m.2g(E.2P)}},4M),M:6(a,b,c){5(!E.2d(a,b,c)&&a.4I){a.4I(\'4P\'+b,c)}},2d:6(a,b,c){5(a.3U){a.3U(b,c,8);E.4f=C;1m.3U("5f",6(){E.27(a,b,c)},8);B C}1j B 8},27:6(a,b,c){5(!E.53(a,b,c)&&a.52)a.52(\'4P\'+b,c)},53:6(a,b,c){5(a.4W){a.4W(b,c,8);B C}1j B 8}};6 6Q(a){E.3x(a)};E.4Q();',62,425,'||||sBr|if|function|var|false||||||||||||||||||||||||||||sY|return|true|mDv|fleXenv|px|tDv|wD|movBr|padding|curPos|getStyle|addTrggr|getSize|cntRSize|Bar|this|offsetHeight||width|match|scroller|paddings|reqS|left|createDiv||top|Math|appendChild|null|0px|setPos|document|parseInt|pDv|style|trgtScrll|sDv|offsetWidth|contentScroll|yPos|srcElement|delta|fDv|else|xPos|forcedHide|window|href|for||edge|findPos||border|className|sSBr|height|fHide|anchoR|parentNode|event|while|mxScroll|iNDx|scrollUpdate|target|curtop|barSpace|scrollState|preventDefault|hoverH|targetSkew|min|curleft|bottom|nV|scrollTop|max|scrollLeft|cntSize|mV|minPos|forcedBar|sFBr|right|id|sSDv|keyAct|position|getElementById|goScroll|_|tSelectFunc|remTrggr|mDPosFix|maxPos|documentElement|mWheelProc|copyStyles|addChckTrggr|moved|indx|clearInterval|urlBase|fShow|jBox|barZ|mTBox|clientY|intClear|cPSize|barPadding|setSize|pusher||createScrollBars|hBr|mousemove|retFalse|vrt|urlExt|visibility|sFDv|clientX|mMouseUp|indexOf|new|hidden|mMoveBar|userAgent|RegExp|updateScroll|offsetParent|pageScrolled|mouseup|getContentHeight|getElementsByTagName|catchFastInit|stdMode|vertical|scrollBoth|hrz|eScroll|vEdge|clicked|classChange|fleXcroll|focusProtect|scrollToElement|formItem|sRange|sXdir|hUpReq|setInterval|sYdir|ofstParent|relative|vUpReq|getContentWidth|maxCWidth|vBr|barClickRetard|wheelAct|fleXdata|contentScrollPos|hEdge|barClickScroll|fleXanchor|mdX|yScrld|mY|baseAct|mdY|mOnXEdge|xScrld|tSelectMouse|setVisibility|mOnYEdge|replace|xAw|calcCScrollVal|fleXcrollMain|yAw|hElem|typeof|zIndex|uReg|setWidth|forcedPos|setHeight|location|tgDiv|Array|doScrollPos|display|zTHeight|baseProp|refreshTimeout|inputName|key|retArray|brdHeightLoss|padHeightComp|onmousedown|addEventListener|initByClass|mHeight|selectstart|absolute|brdWidthLoss||camelConv|parT|padLoss|prepareScroll||maxx|reT|detail|setTimeout|index|80|scrlTrgt|HTMLElement|inCurPos|w3events|aSize|pointerOffsetX|reqV|pointerOffsetY|findRCpos|isddvChild|getComputedStyle|flexinactive|currentStyle|div|getPos|wheelDelta|textAlign|inMposY|string|paddingTop|pageXOffset|getByClassName|initialized|opera|onfleXcrollRun|pageYOffset|1em|firstChild|removeChild|brdWidth|paddingLeft|DOMMouseScroll|attachEvent|vBar|fixIEDispBug|flexcroll|100|oScrollX|intlWidth|on|fleXcrollInit|mousewheel|100px|load|offsetLeft|inMposX|removeEventListener|createElement|postHeight|100p|clearTimeout|offsetTop|detachEvent|remChckTrggr|anchorList|overflow|globalInit|keyCode|pkeY|solid|1px|length|425|75|onmouseclick|unload|init|yScroll|resize|inline|focus|_hscroller|OmniWeb|navigator|type|matcH|click|clsnm|blur|button|body|onblur|getElementsByName|AppleWebKit|xScroll|dblclick|commitScroll|tabIndex|ondblclick|blue|keydown|setAttribute|keypress|onmousewheel|fontSize|zoomdetectdiv|keyup|mcontentwrapper|domfixdiv|contentwrapper|bscrollgeneric|scrollwrapper|999|copyholder|mousedown|12px|scrollerjogbox|black|hBar|contentSize|borderBottomWidth|2px|childNodes|borderBottom|text|containerSize|compPad|block|select|hscroller|vscroller|none|_36|textarea|input|_35|_34|basebeg|_33|baseend|platform|Mac|KDE|base|visible|bar|barbeg|auto|vendor|onmouseover|normal|undefined|flex__|prototype|barend|MSIE|scrollgeneric|_38|getPropertyValue|Object|_37|align|sizeChangeDetect|_39|_40|flexcrollactive|2500|charAt|toString|substr|toUpperCase|split|Safari|parseFloat|CSBfleXcroll'.split('|'),0,{}))



// IE gives errors in the manufacturer tabs, even though it works OK, so ignore the errors...
window.onerror = function() { return true; }

$().ready(function() {
	
	// signup field
	$("input#newsletter-signup").bind("focus", function() {
		if($(this).hasClass("unchanged")) {
			$(this).val("");
			$(this).removeClass("unchanged");
		};
	});
	$("input#branch-finder-postcode").bind("focus", function() {
		if($(this).hasClass("unchanged")) {
			$(this).val("");
			$(this).removeClass("unchanged");
		};
	});
	
	// select random car model (and update flash) on load
	r = Math.ceil(Math.random() * $("img.interiorpanel-hero-background").length) - 1;
	changeModel($("div#model-selector ul li:eq("+r+")").attr("id"), false);
	
	// car model change on mouseover
	$("div#model-selector ul li a").bind("mouseenter", function() {
		if(!$(this).parent().hasClass("current") && $(this).attr("id")!="viewmorelink") {
			m = $(this).parent().attr("id");
			changeModel(m, true);
		}
	});

	/* model selector fading in/out
	$("div#model-selector").bind("mouseenter", function() {
		$(this).fadeTo("slow", 1);
	});
	$("div#model-selector").bind("mouseleave", function() {
		$(this).fadeTo("slow", 0.75);
		$("div#manufacturer-branches").fadeTo("slow", 0.75);
	});
	*/
	
	// search results mouseover
	$("div.used-search-result-detailed").hover(function() { $(this).toggleClass("used-search-result-detailed-active"); }, function() { $(this).toggleClass("used-search-result-detailed-active"); });
	// search results mouseover
	$("div.used-search-result-quick").hover(function() { $(this).toggleClass("used-search-result-quick-active"); }, function() { $(this).toggleClass("used-search-result-quick-active"); });
	// search results mouseover
	$("div.new-search-result-detailed").hover(function() { $(this).toggleClass("new-search-result-detailed-active"); }, function() { $(this).toggleClass("new-search-result-detailed-active"); });
	// search results mouseover
	$("div.new-search-result-quick").hover(function() { $(this).toggleClass("new-search-result-quick-active"); }, function() { $(this).toggleClass("new-search-result-quick-active"); });
	// search results mouseover
	$("div.model-search-result").hover(function() { $(this).toggleClass("model-search-result-active"); }, function() { $(this).toggleClass("model-search-result-active"); });
	
	// position second column of car details at bottom
	$("div.used-search-result-detailed div.details2").css("margin-top", $("div.used-search-result-detailed div.details1").height() / 2 + "px");
	
	// position buttons at bottom
	$("div.used-search-result-detailed").each(function() {
		if($.browser.msie) { offset = 58; } else { offset = 48; }
		$(this).find("div.buttons").css("padding-top", $(this).height()-offset + "px");
	});
	
	// position buttons at bottom
	$("div.new-search-result-detailed").each(function() {
		if($.browser.msie) { offset = 82; } else { offset = 72; }
		$(this).find("div.buttons").css("padding-top", $(this).height()-offset + "px");
	});
	
	// position buttons at bottom and stop h4 overlapping
	$("div.model-search-result").each(function() {
		if($(this).parents("div#fleet_content").length==1) {
			if($.browser.msie) { offset = 80; } else { offset = 85; } // fleet page
		} else {
			if($.browser.msie) { offset = 76; } else { offset = 66; } // non-fleet page
		}
		$(this).find("div.buttons").css("padding-top", $(this).height()-offset + "px");
		$(this).find("h4").css("width", 235 - $(this).find("div.price").width() - 20 + "px");
	});
	
	// position buttons at bottom
	h = $("div#used-car-detail-main h4").height();
	p = $("div#used-car-detail-main div#photo").height();
	if($.browser.msie) { offset = 170; } else { offset = 170; }
	$("div#used-car-detail-right img.top").css("margin-top", (h+p-offset)+"px");

	// models - fit headline so it doesnt overlap price
	$("h3.model-detail").css("width", 354 - $("span#new-model-price").width() - 20 + "px");
	
	// specification boxes - add margin so buttons line up with bottom of photo
	if($("div#specification").parent().attr("id")!="used-car-detail-left") { // but not on used car detail pages
		if($("div#specification").parents("div#fleet_content").length==1) {
			$("div#specification").css("margin-bottom", 230 - 45 - $("div#specification").height() - 47 + "px"); // fleet page
		} else {
			$("div#specification").css("margin-bottom", 230 - 45 - $("div#specification").height() - 23 + "px"); // non-fleet page
		}
	}	
	
	// detailed/quick view toggle
	$("ul#search-toggle li a").click(function() {
		if(!$(this).parent().hasClass("current")) {
			
			$("div.search-view").hide();
			$("div#" + $(this).parent().attr("id") + "-view").show();
			$("ul#search-toggle li.current").removeClass("current");
			$(this).parent().addClass("current");
			
			// set quick view heights to be equal
			if($(this).parent().attr("id")=="quick") {
				$("div.used-search-result-row").each(function() {
					max = 0;
					$(this).children("div.used-search-result-quick").each(function() {
						height = $(this).height();
						if(height > max) { max = height; }
					});
					$(this).children("div.used-search-result-quick").css("height", max+"px");
				});
				$("div.used-search-result-row").each(function() {
					max = 0;
					$(this).children("div.new-search-result-quick").each(function() {
						height = $(this).height();
						if(height > max) { max = height; }
					});
					$(this).children("div.new-search-result-quick").css("height", max+"px");
				});
			};
			
			return false;
		}
	});
	
	//Right hand Car Search box - tabs	
	$("div#right-car-search ul li a").removeAttr("href");
	$("div#right-car-search ul li a").click(function() {
		if(!$(this).parents("li").hasClass("current")) {
			$("div.right-car-search-view").hide();
			switch($(this).parents("li").attr("id")) {
				case "right-car-search-tab-used":
				 	$("div#right-car-search-used").show();
					$("div#right-car-search-content").removeClass("rcs-blue").addClass("rcs-red");
				 	break;
				case "right-car-search-tab-new": 
					$("div#right-car-search-new").show();
					$("div#right-car-search-content").removeClass("rcs-red").addClass("rcs-blue");
				 break;
			}
			$("div#right-car-search ul li.current").removeClass("current");
			$(this).parents("li").addClass("current");
		}
	});
	
	// model submenu	
	var modelSubmenuOpenedBefore = false;
	var modelSubmenuInitScroll = false;
	$("div#model-submenu-header").click(function() { 
		$(this).toggleClass("current");
		if($(this).hasClass("current")) {
			if($("div#model-submenu").height()>500) { // if menu is long, scroll it
				$("div#model-submenu").css("height", "500px");
				$("div#model-submenu").css("overflow", "auto");
				modelSubmenuInitScroll = true;
			}
			$("div#model-submenu").show();
			if(!modelSubmenuOpenedBefore && modelSubmenuInitScroll) { CSBfleXcroll("model-submenu"); }
		} else {
			// these lines break IE, not needed?
			//$("div#model-submenu").css("height", "auto");
			//$("div#model-submenu").css("overflow", "none");
			$("div#model-submenu").hide();
			modelSubmenuOpenedBefore = true;
		}	
	});
	$("div#model-submenu li:last").css("border-bottom", "0px").css("padding-bottom", "4px");
	
	// branch finder
	$("form#branch-finder").submit(function() {
		if(!$("input#branch-finder-postcode").hasClass("unchanged")) {
			$("input#branch-finder-postcode").val($("input#branch-finder-postcode").val().toUpperCase());
		}

		var dt = "p="+$("input#branch-finder-postcode").val();

		if( $("#branch_id").length > 0 )
		{
			dt += "&branch_pc=" + $("#branch_id").val();
			dt += "&dealer_id=" + $("#branch-finder-dealer-id").val();
		}

		$("div#mapresults").show();
		$.ajax({
			type: "POST",
			url: "/test.php",
			data: dt,
			cache: false,
			success: function(result) {
				$("div#mapresults").html(result);
				$("div#branch-finder-container").show();
				mapInit();
				return false;
			}
		});
		return false;
	});
	
	// MY SHOWROOM
	/*
	$("div#compare-selected-button").click(function() {
		$("li#my-cars-compared a").trigger("click");
	});
	*/
	$("li#my-cars-compared a").click(function() {
		beginCompare();
		//$("div#compare-selected-button").hide();
	});
	/*
	$("li#my-cars a").click(function() {
		if($("div#my-cars-view div.car-selected").length > 1) { $("div#compare-selected-button").show(); }
	});
	*/
	
	$("div#my-cars-view input.selector").bind("click", function(event) {
		if(carsToCompare < 4) {
			$(this).parent().parent().parent().trigger("click");
		} else {
			$("p#only4cars")
				.css("background-color","#FF9")
				.animate({ backgroundColor: "#FFF" }, 200)
				.animate({ backgroundColor: "#FF9" }, 200)
				.animate({ backgroundColor: "#FFF" }, 200)
				.animate({ backgroundColor: "#FF9" }, 200)
				.animate({ opacity: 1}, 1000)
				.animate({ backgroundColor: "#FFF" }, 200);
			return false;
		}
		event.stopPropagation();
	});
	
	$("div#my-cars-view label").bind("click", function(event) {
		$(this).parent().parent().parent().trigger("click");
		event.stopPropagation();
	});
	
	$("div.remove-button").bind("click", function(event) {
		if($(this).parent().hasClass("car-selected")) {
			carsToCompare--;
			//if(carsToCompare < 2) { $("div#compare-selected-button").fadeOut("fast"); }
		}
		$(this).parent().fadeOut("medium");
		event.stopPropagation();
	});
	
	$("div#my-cars-view div.car").click(function() {		
		if($(this).hasClass("car-selected")) {
			carsToCompare--;
			//if(carsToCompare < 2) { $("div#compare-selected-button").fadeOut("fast"); }
			$(this).find("input.selector").attr("checked", "");
			$(this).toggleClass("car-selected");
		} else {
			//if(carsToCompare > 0) { $("div#compare-selected-button").fadeIn("fast"); }
			if(carsToCompare < 4) { 
				carsToCompare++;
				$(this).find("input.selector").attr("checked", "checked");
				$(this).toggleClass("car-selected");
			} else {
				$("p#only4cars")
					.css("background-color","#FF9")
					.animate({ backgroundColor: "#FFF" }, 200)
					.animate({ backgroundColor: "#FF9" }, 200)
					.animate({ backgroundColor: "#FFF" }, 200)
					.animate({ backgroundColor: "#FF9" }, 200)
					.animate({ opacity: 1}, 1000)
					.animate({ backgroundColor: "#FFF" }, 200);
			}
		}	
	});
	
	$("div#my-cars-compared-view table tr td").hover(function() { 
		if(!$(this).hasClass("active") && !$(this).hasClass("nohighlight")) {
			$("div#my-cars-compared-view").find("td." + $(this).attr("class")).addClass("active");
		}
	}, function() {
		$("div#my-cars-compared-view td").removeClass("active");
	});
	
	
	
	
	// SHOP
	$("div#shop-menu li:last").css("border-bottom", "0px").css("padding-bottom", "4px");
	$("input#shop-search-field").bind("focus", function() {
		if($(this).hasClass("unchanged")) {
			$(this).val("");
			$(this).removeClass("unchanged");
		};
	});
	$("div.shop-item").hover(function() { $(this).toggleClass("shop-item-active"); }, function() { $(this).toggleClass("shop-item-active"); });
	
	$("div#shopping-basket-button").click(function() {
		if($(this).hasClass("shopping-basket-button-ready")) {
			// show loading while doing ajax call
			$(this).removeClass("shopping-basket-button-ready");
			$(this).css("background-position", "0 -20px");
			$("div#shopping-basket-spinner").show();
			// AJAX CALL HERE, CALL shopAddBasketComplete() WHEN COMPLETE
			//get pid
			var pid = $("#product_id").html();
			$.getJSON('/ajax.php', { op:"basket", ac:"addProduct", pid:pid }, function(json) {
				if(json.error=="1")
				{
					alert(json.msg);
				}
				else
				{
					updateBasket(json);
					shopAddBasketComplete();
					//setTimeout("shopAddBasketComplete()", 2000);
				}
			});

		}
	});
	

	// my showroom right
	$("div#my-showroom-content div.row").hover(function() { $(this).toggleClass("row-active"); }, function() { $(this).toggleClass("row-active"); });
	$("div#my-showroom-content div.row:last").css("border","none");
	$("div#my-showroom-footer").bind("click", function() {
		window.location.href = "/showroom/";
	});

	// new my showroom buttons
	$("div.add-showroom-button").click(function() {
		if($(this).hasClass("add-showroom-button-ready")) {
			// show loading while doing ajax call
			$(this).removeClass("add-showroom-ready");
			$(this).css("background-position", "0 -20px");
			$(this).children().find("div.add-showroom-spinner").show();

			addToShowroom($(this).attr('id'));
			// AJAX CALL HERE, CALL addShowroomComplete($(this)) WHEN COMPLETE
			addShowroomComplete($(this));
		}
		return false;
	});

});

function addShowroomComplete(clicked) {
	clicked.children().find("div.add-showroom-spinner").hide();
	clicked.css("background-position", "0 -40px");
	// click events on the button now goto showroom
	clicked.click(function() {
		window.location.href = '/showroom/';
	});
}

function shopAddBasketComplete() {
	$("div#shopping-basket-spinner").hide();
	$("div#shopping-basket-button").css("background-position", "0 -40px");
	
	// UPDATE span#shop-number-items AND span#shop-total-price HERE...
	
	// highlight the basket
	$("div#shop-basket").animate({ backgroundColor: "#FF9" }, 200).animate({ backgroundColor: "#FFF" }, 200).animate({ backgroundColor: "#FF9" }, 200).animate({ backgroundColor: "#FFF" }, 200).animate({ backgroundColor: "#FF9" }, 200).animate({ backgroundColor: "#FFF" }, 200);
	// click events on the button now goto checkout
	$("div#shopping-basket-button").click(function() {
		window.location.href = '/shop/basket/';
	});
}


function changeModel(model, fade) {
	$("img.interiorpanel-hero-background").fadeOut("slow");
	if(fade) {
		$("img#interiorpanel-hero-background-"+model).fadeIn("slow");
	} else {
		$("img#interiorpanel-hero-background-"+model).show();
	}
	$("div#model-selector ul li").removeClass("current");
	$("div#model-selector ul li#"+model).addClass("current");
}

function changeManufacturer() {
	var m = $(this).attr("id").substring(4, $(this).attr("id").length);
	if(active!=m) {
		
		$("div#homepanel-main").children("div").hide();
		$("div#homepanel-side").children("div").not("div#homepanel-right").hide();
		$("div#homepanel-main-"+m).show();
		$("div#homepanel-side-"+m).show();
		
		if(m!="rrg") {
			// hide rrg content
			$("div#homepanel-main-rrg").hide();
			$("div#homepanel-background-rrg").hide();
			// change background
			$("img#homepanel-background-"+m).show();
			$("img.homepanel-background-image").not("img#homepanel-background-"+m).hide();
			// init flexcroll on side column
			CSBfleXcroll("new-"+m+"-models-scroller");
		} else {
			// show rrg content			
			$("div#homepanel-main-rrg").show();
			$("div#homepanel-background-rrg").show();
			// change background
			$("img.homepanel-background-image").hide()
			$("div#homepanel-background-rrg").show()
			
		}
	}
	active = m;	
};

// SHOP - sort out equal heights when page has *really* loaded, not jQuery's loaded
window.onload = function() {
	$("div.shop-row").each(function() {
		max = 0;
		$(this).children("div.shop-item").each(function() {
			height = $(this).height();
			if(height > max) { max = height; }
		});
		$(this).children("div.shop-item").css("height", max+"px");
	});
}

//New homepage window added July 2010

$(document).ready(function() {

	//adding tracking to accident-repair page
	$("a[href='/files/rrg/ckfinder/file/ARC_excess_voucher.pdf\']").attr("onclick","pageTracker._trackPageview('/jtracking/accident-repair-voucher');");
	$("a[href='mailto:arcpendlebury@rrg-group.com']").attr("onclick","pageTracker._trackPageview('/jtracking/accident-repair-email');");
	$("a[href='mailto:arcbolton@rrg-group.com']").attr("onclick","pageTracker._trackPageview('/jtracking/accident-repair-email');");

	$("#hfTabs li a").removeAttr("href");
	$(".hfContent").hide();
	$("#hfRRG").show();
	CSBfleXcroll("newRRGModels"); //Activate new models scrollbar
	
	//Tabbed manufacturer window
	$("#hfTabs li").click(function() {
		var thisMan = $(this).attr("id").substring(5, $(this).attr("id").length);
		
		//If browser IE7 or less do standard show and hide because fading to buggy
	   	if($.browser.msie && $.browser.version.substr(0,1)<8){
			$(".hfContent").hide(); //Hide any visible frames
			$("#hf" + thisMan).show(); //Show selected manufacturer frame
	   	}else{
	      	$(".hfContent").fadeOut(350); //Hide any visible frames
			$("#hf" + thisMan).fadeIn(200); //Show selected manufacturer frame
	   	}
		
		$("#hfTabs li").removeClass("active"); //Remove active class from all tabs
		$(this).addClass("active"); //Add active class to selected tab
		CSBfleXcroll("new" + thisMan + "Models"); //Activate new models scrollbar
		
	});
	//Homepage window top link events.
	
	// If the tab for toyota exists on the page
	if($('#hfTabToyota').length != 0) {
		// Change the toyota manufacturer click event
		$("#topManToyota").click(function(event) {
			// Simulate the toyota tab click instead
			$('#hfTabToyota').trigger('click');
			// Prevent the original link behaving like a link
			event.preventDefault();
		});
	}
	
	// If the tab for toyota exists on the page
	if($('#hfTabPeugeot').length != 0) {
		// Change the toyota manufacturer click event
		$("#topManPeugeot").click(function(event) {
			// Simulate the toyota tab click instead
			$('#hfTabPeugeot').trigger('click');
			// Prevent the original link behaving like a link
			event.preventDefault();
		});
	}
	
	// If the tab for toyota exists on the page
	if($('#hfTabLexus').length != 0) {
		// Change the toyota manufacturer click event
		$("#topManLexus").click(function(event) {
			// Simulate the toyota tab click instead
			$('#hfTabLexus').trigger('click');
			// Prevent the original link behaving like a link
			event.preventDefault();
		});
	}
	
	// If the tab for toyota exists on the page
	if($('#hfTabMazda').length != 0) {
		// Change the toyota manufacturer click event
		$("#topManMazda").click(function(event) {
			// Simulate the toyota tab click instead
			$('#hfTabMazda').trigger('click');
			// Prevent the original link behaving like a link
			event.preventDefault();
		});
	}
	
	// If the tab for toyota exists on the page
	if($('#hfTabSuzuki').length != 0) {
		// Change the toyota manufacturer click event
		$("#topManSuzuki").click(function(event) {
			// Simulate the toyota tab click instead
			$('#hfTabSuzuki').trigger('click');
			// Prevent the original link behaving like a link
			event.preventDefault();
		});
	}
	
	// If the tab for toyota exists on the page
	if($('#hfTabKia').length != 0) {
		// Change the toyota manufacturer click event
		$("#topManKia").click(function(event) {
			// Simulate the toyota tab click instead
			$('#hfTabKia').trigger('click');
			// Prevent the original link behaving like a link
			event.preventDefault();
		});
	}

  // Change links to point to home page
  $("#topManToyota").attr('href', '/#Toyota');
  $("#topManPeugeot").attr('href', '/#Peugeot');
  $("#topManLexus").attr('href', '/#Lexus');
  $("#topManMazda").attr('href', '/#Mazda');
  $("#topManSuzuki").attr('href', '/#Suzuki');
  $("#topManKia").attr('href', '/#Kia');

  // Check the path for a manufacturer name, if so, we should show that manufacturer on page load
  var loc = location.hash.split("#");
  if(loc.length > 1) {
    var man = loc[1];
    switch(man.toLowerCase()) {
      case 'toyota':
        $('#hfTabToyota').trigger('click');
        break;
      case 'peugeot':
        $('#hfTabPeugeot').trigger('click');
        break;
      case 'lexus':
        $('#hfTabLexus').trigger('click');
        break;
      case 'mazda':
        $('#hfTabMazda').trigger('click');
        break;
      case 'suzuki':
        $('#hfTabSuzuki').trigger('click');
        break;
      case 'kia':
        $('#hfTabKia').trigger('click');
        break;
    }
  }
  
  
   //Show-hide filter model list based on url
  var ofManLoc = window.location.pathname.split("/");
  if(ofManLoc.length > 1) {
    var ofMan = ofManLoc[2];
  	$('.offersFilter li#of'+ofMan).addClass('active');
		
	$('.offersFilter ul#ofModels'+ofMan).show();
	
	var ofModel = window.location.pathname;
	$('.offersFilter li a[href="'+ofModel+'"]').parent('li').addClass('active');
  }

});
