/*! jquery.sifr.license.txt *//*

jQuery sIFR Plugin v3.0.4 <http://jquery.thewikies.com/sifr/>
Copyright (c) 2009 Jonathan Neal
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
This software is released under the GPL License <http://www.opensource.org/licenses/gpl-2.0.php>

jQuery SWFObject Plugin v1.0.4 <http://jquery.thewikies.com/swfobject/>
Copyright (c) 2009 Jonathan Neal
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
This software is released under the GPL License <http://www.opensource.org/licenses/gpl-2.0.php>

Scalable Inman Flash Replacement (sIFR) v3.0 <http://novemberborn.net/sifr3>
Copyright (c) 2009 Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben
This software is released under the LGPL License <http://www.opensource.org/licenses/lgpl-2.1.php>

SWFObject v2.1 <http://code.google.com/p/swfobject/>
Copyright (c) 2007-2009 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>

jQuery v1.2.6 <http://jquery.com/>
Copyright (c) 2009 John Resig
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
This software is released under the GPL License <http://www.opensource.org/licenses/gpl-2.0.php>

*//*jslint
	passfail: false,
	white: true,
	browser: true,
	widget: false,
	sidebar: false,
	rhino: false,
	safe: false,
	adsafe: false,
	debug: false,
	evil: false,
	cap: false,
	on: false,
	fragment: false,
	laxbreak: false,
	forin: true,
	sub: false,
	css: false,
	undef: true,
	nomen: false,
	eqeqeq: true,
	plusplus: false,
	bitwise: true,
	regexp: false,
	onevar: true,
	strict: false
*//*global
	jQuery
*/

(function ($) {
	var t = true,
	f = false,
	x = '',
	height = 'height',
	width = 'width',
	offsetHeight = 'offsetHeight',
	offsetWidth = 'offsetWidth',
	color = 'color',
	cursor = 'cursor',
	font = 'font',
	fontSize = 'fontSize',
	fontWeight = 'fontWeight',
	lineHeight = 'lineHeight',
	textAlign = 'textAlign',
	textTransform = 'textTransform',
	childNodes = 'childNodes',
	parentNode = 'parentNode',
	children = 'children',
	content = 'content',
	sIFRreplaced = 'sIFR-replaced',
	asNumber = function (x) {
		return parseInt(x, 10);
	},
	mapOfHex = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'],
	mapOfColors = {
		aqua: '0FF',
		azure: 'F0FFFF',
		beige: 'F5F5DC',
		black: '000',
		blue: '00F',
		brown: 'A52A2A',
		cyan: '0FF',
		darkblue: '00008B',
		darkcyan: '008B8B',
		darkgrey: 'A9A9A9',
		darkgreen: '006400',
		darkkhaki: 'BDB76B',
		darkmagenta: '8B008B',
		darkolivegreen: '556B2F',
		darkorange: 'FF8C00',
		darkorchid: '9932CC',
		darkred: '8B0000',
		darksalmon: 'E9967A',
		darkviolet: '9400D3',
		fuchsia: 'F0F',
		gold: 'FFD700',
		green: '008000',
		indigo: '4B0082',
		khaki: 'F0E68C',
		lightblue: 'ADD8E6',
		lightcyan: 'E0FFFF',
		lightgreen: '90EE90',
		lightgrey: 'D3D3D3',
		lightpink: 'FFB6C1',
		lightyellow: 'FFFFE0',
		lime: '0F0',
		magenta: 'F0F',
		maroon: '800000',
		navy: '000080',
		olive: '808000',
		orange: 'FFA500',
		pink: 'FFC0CB',
		purple: '800080',
		violet: '800080',
		red: 'F00',
		silver: 'C0C0C0',
		white: 'FFF',
		yellow: 'FF0',
		transparent: 'FFF'
	},
	asHex = function (x) {
		return isNaN(x) ? '00': mapOfHex[(x - x % 16) / 16] + mapOfHex[x % 16];
	},
	toHex = function (x) {
		var rgb;

		return '#' + ((x) ? (rgb = mapOfColors[x.toLowerCase()]) ? rgb: (rgb = x.match(/rgb\((\d+),\s(\d+),\s(\d+)\)/)) ? asHex(rgb[1]) + asHex(rgb[2]) + asHex(rgb[3]) : x: '000').replace(/^#{0,}(\w)(\w)(\w)$|^#/, '$1$1$2$2$3$3').toUpperCase();
	};

	/* $.sifrNodeList */
	$.sifrNodeList = $(document).not(document);

	/* $.sifr */
	$.sifr = function (options) {
		var a,
		arrA,
		arrB,
		call = arguments.callee,
		b,
		flashvars;

		options = $.extend({}, call.options, options);

		if (options.save) {
			delete options.save;
			call.options = $.extend({}, options);
		}

		/* Build font path and name */
		options[font] = (options.path || x).replace(/([^\/])$/, '$1/') + (options[font] || x).replace(/\.swf$|$/, '.swf'); // TextTransform options
		switch (options[textTransform]) {
		case 'lowercase':
			options[content] = options[content].toLowerCase();
			break;
		case 'uppercase':
			options[content] = options[content].toUpperCase();
			break;
		case 'capitalize':
			a = options[content].split(/(\s|\>)/);
			options[content] = x;
			for (b in a) {
				options[content] += a[b].charAt(0).toUpperCase() + a[b].substr(1);
			}
		}

		/* Build flashvars */
		if (asNumber(options.version) === 3) {
			flashvars = {
				content: options[content],
				cursor: options[cursor],
				css: $.extend({
					'.sIFR-root': $.extend({
						color: toHex(options[color]),
						fontWeight: options[fontWeight] || 'normal',
						lineHeight: options[lineHeight] || 12,
						textAlign: options[textAlign] || 'left'
					},
					options.style),
					a: {},
					'a:hover': {}
				},
				options.css),
				delayrun: options.delayRun || f,
				events: options.events || f,
				fitexactly: options.fitExactly || f,
				fixhover: options.fixHover || t,
				forcesingleline: options.forceSingleLine || f,
				gridfittype: options.gridFitType || 'pixel',
				height: (options[height] * options.overY) || 14,
				offsetleft: options.offsetLeft || 0,
				offsettop: options.offsetTop || 0,
				opacity: options.opacity || 100,
				preventwrap: options.preventWrap || f,
				size: options[fontSize] || 12,
				tuneheight: options.tuneHeight || 0,
				tunewidth: options.tuneWidth || 0,
				version: options.build || 436,
				width: (options[width] * options.overX) || 320
			};
			flashvars.css.a[color] = flashvars.css.a[color] || toHex(options.linkColor || options[color]);
			flashvars.css['a:hover'][color] = flashvars.css['a:hover'][color] || toHex(options.hoverColor || flashvars.css.a[color] || options[color]);
			flashvars.selectable = options.selectable || ((/arrow|pointer/.test(flashvars[cursor])) ? f: t);

			/* Build filters options */
			if (typeof options.filter === 'object') {
				arrA = [];
				for (a in options.filter) {
					if (typeof options.filter[a] === 'object') {
						arrB = [];
						for (b in options.filter[a]) {
							arrB.push(b.replace(/([A-Z])/, '-$1').toLowerCase() + ':' + ((/color/.test(b)) ? '"0x' + toHex(options.filter[a][b]).substr(1) + '"': options.filter[a][b]));
						}
						options.filter[a] = arrB.join(',');
					}
					arrA.push(a + 'Filter,' + options.filter[a]);
				}
				flashvars.flashfilters = arrA.join(',');
			}
		} else {
			flashvars = {
				h: (options[height] * options.zoom) || 14,
				leading: Math.max(options[lineHeight] - options[fontSize], 0),
				offsetTop: Math.max((options[lineHeight] - options[fontSize]) / 2, 0),
				textAlign: options[textAlign] || 'left',
				textColor: toHex(options[color]),
				txt: options[content],
				w: (options[width] * options.zoom) || 320
			};
			flashvars.linkColor = toHex(options.linkColor || options[color]);
			flashvars.hoverColor = toHex(options.hoverColor || flashvars.linkColor || options[color]);
			if (options.underline === t) {
				flashvars.underline = t;
			}
		}
		if (options.link) {
			flashvars.link = options.link;
		}
		return $.flash({
			flashvars: flashvars,
			height: (options[height] * options.overY) || 14,
			params: {
				wmode: 'transparent'
			},
			swf: options[font],
			width: (options[width] * options.overX) || 320
		});
	};

	/* $.fn.sifr */
	$.fn.sifr = function (options) {
		/* Check if Flash is installed, return false if isn't */
		if (!$.hasFlashPlayer) {
			return f;
		}

		var $alt,
		$each,
		$swf,
		$this = this,
		each = 0,
		eachOptions,
		sendOptions;

		options = $.extend({}, options);

		/* Each */
		while (($each = $this.eq(each++))[0]) {
			sendOptions = $.extend({}, (eachOptions = $.extend({}, $each.data('options'), options)));
			if ($each.hasClass(sIFRreplaced)) {
				$each.unsifr();
			} // HTML options
			$each.addClass(sIFRreplaced)[0].innerHTML = ['<span style="display:inline-block;position:relative;"><span class="sIFR-alternate" ', ((sendOptions.debug) ? '' : 'style="' + (($.browser.msie) ? 'zoom:1;filter:alpha(opacity=0)': 'opacity:0') + ';"'), '>', $each[0].innerHTML, '</span><span class="sIFR-flash" style="position:absolute;top:0;left:0;right:0;bottom:0;"></span></span>'].join(x);

			/* Reference options */
			$alt = $each[children]()[children]().eq(0);
			$swf = $each[children]()[children]().eq(1);

			/* Content options */
			sendOptions[content] = sendOptions[content] || $.trim($alt[0].innerHTML);

			/* TextTransform options */
			sendOptions[textTransform] = sendOptions[textTransform] || $alt.css(textTransform).toLowerCase();

			/* Configure dimensions */
			sendOptions.zoom = sendOptions.zoom || 1;
			sendOptions.overX = (sendOptions.overX || 1) * (sendOptions.over || 1);
			sendOptions.overY = (sendOptions.overY || 1) * (sendOptions.over || 1);
			sendOptions[height] = sendOptions[height] || Math.max($alt[0][offsetHeight] || $alt[0][parentNode][offsetHeight], asNumber($alt.css(lineHeight).replace(/normal/, asNumber($alt.css(fontSize)) * 1.25)));
			sendOptions[width] = sendOptions[width] || $alt[0][offsetWidth] || $alt[0][parentNode][offsetWidth];

			/* Build style attributes */
			sendOptions[font] = sendOptions[font] || $each.css('fontFamily').replace(/^\s+|\s+$|,[\S|\s]+|'|"|(,)\s+/g, '$1');
			sendOptions[color] = sendOptions[color] || $alt.css(color);
			sendOptions[cursor] = sendOptions[cursor] || $alt.css(cursor);
			sendOptions[fontWeight] = (sendOptions[fontWeight] || $alt.css(fontWeight).toString()).replace('400', 'normal').replace('700', 'bold');
			sendOptions[fontSize] = (sendOptions[fontSize] || asNumber($alt.css(fontSize))) * sendOptions.zoom;
			sendOptions[lineHeight] = asNumber(sendOptions[lineHeight] || $alt.css(lineHeight).replace(/normal/, sendOptions[fontSize] * 1.25)) || sendOptions[height];
			sendOptions[textAlign] = sendOptions[textAlign] || $alt.css(textAlign).toString();
			if (sendOptions[textAlign] === 'center') {
				$swf.css('marginLeft', (sendOptions[width] - (sendOptions[width] * sendOptions.overX)) / 2);
			}
			if (sendOptions.resizable) {
				$.sifrNodeList = $.sifrNodeList.add($each.data('options', $.extend({
					offsetHeight: $alt[0][offsetHeight],
					offsetWidth: $alt[0][offsetWidth]
				},
				eachOptions)));
			}
			$swf.html($.sifr(sendOptions));
		}
		return $this;
	};

	/* $.fn.unsifr */
	$.fn.unsifr = function () {
		var $this = this,
		$each,
		each = 0;

		/* Each */
		while ((($each = $this.eq(each++))[0]) && $each.hasClass(sIFRreplaced)) {
			$each.removeClass(sIFRreplaced)[0].innerHTML = $each[0][childNodes][0][childNodes][0].innerHTML;
			$.sifrNodeList = $.sifrNodeList.not($each);
		}
		return $this;
	};

	/* Resizable */
	$(window).resize(function () {
		/* Filter by size change */
		$.sifrNodeList.filter(function (index) {
			var $each,
			alt = this[childNodes][0][childNodes][0],
			options = ($each = $(this)).data('options');

			/* If size has changed */
			if (alt[offsetHeight] !== options[offsetHeight] || alt[offsetWidth] !== options[offsetWidth]) {
				options[offsetHeight] = alt[offsetHeight];
				options[offsetWidth] = alt[offsetWidth];
				$each.data('options', options);
				return t;
			}
			return f;
		}).sifr();
	});
}(jQuery));



/*! jquery.swfobject.license.txt *//*

jQuery SWFObject Plugin v1.0.4 <http://jquery.thewikies.com/swfobject/>
Copyright (c) 2009 Jonathan Neal
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
This software is released under the GPL License <http://www.opensource.org/licenses/gpl-2.0.php>

SWFObject v2.1 <http://code.google.com/p/swfobject/>
Copyright (c) 2007-2009 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>

jQuery v1.2.6 <http://jquery.com/>
Copyright (c) 2009 John Resig
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
This software is released under the GPL License <http://www.opensource.org/licenses/gpl-2.0.php>

*//*jslint
	passfail: false,
	white: true,
	browser: true,
	widget: false,
	sidebar: false,
	rhino: false,
	safe: false,
	adsafe: false,
	debug: false,
	evil: false,
	cap: false,
	on: false,
	fragment: false,
	laxbreak: false,
	forin: true,
	sub: false,
	css: false,
	undef: true,
	nomen: false,
	eqeqeq: true,
	plusplus: false,
	bitwise: true,
	regexp: false,
	onevar: true,
	strict: false
*//*global
	jQuery,
	ActiveXObject
*/

(function ($) {
	var win = window,
	doc = document,
	x = '',
	object = 'object';

	/* $.flashPlayerVersion */
	$.flashPlayerVersion = (function () {
		var flashVersion, activeX = null,
		fp6Crash = false,
		shockwaveFlash = 'ShockwaveFlash.ShockwaveFlash';

		/* If Internet Explorer */
		if (! (flashVersion = navigator.plugins['Shockwave Flash'])) {
			try {
				activeX = new ActiveXObject(shockwaveFlash + '.7');
			} catch (errorA) {
				try {
					activeX = new ActiveXObject(shockwaveFlash + '.6');
					flashVersion = [6, 0, 21];
					activeX.AllowScriptAccess = 'always';
				} catch (errorB) {
					if (flashVersion && flashVersion[0] === 6) {
						fp6Crash = true;
					}
				}
				if (!fp6Crash) {
					try {
						activeX = new ActiveXObject(shockwaveFlash);
					} catch (errorC) {
						flashVersion = 'X 0,0,0';
					}
				}
			}
			if (!fp6Crash && activeX) {
				try {
					/* Will crash fp6.0.21/23/29 */
					flashVersion = activeX.GetVariable('$version');
				} catch (errorD) {}
			}
		}

		/* If NOT Internet Explorer */
		else {
			flashVersion = flashVersion.description;
		}

		/* Return flash version */
		flashVersion = flashVersion.match(/^[A-Za-z\s]*?(\d+)(\.|,)(\d+)(\s+r|,)(\d+)/);
		return [flashVersion[1] * 1, flashVersion[3] * 1, flashVersion[5] * 1];
	}());

	/* $.flashExpressInstaller */
	$.flashExpressInstaller = 'expressInstall.swf';

	/* $.hasFlashPlayer */
	$.hasFlashPlayer = ($.flashPlayerVersion[0] !== 0);

	/* $.hasFlashPlayerVersion */
	$.hasFlashPlayerVersion = function (options) {
		var flashVersion = $.flashPlayerVersion;
		options = (/string|integer/.test(typeof options)) ? options.toString().split('.') : options;
		options = [options.major || options[0] || flashVersion[0], options.minor || options[1] || flashVersion[1], options.release || options[2] || flashVersion[2]];

		/* Return true or false */
		return ($.hasFlashPlayer && (options[0] > flashVersion[0] || (options[0] === flashVersion[0] && (options[1] > flashVersion[1] || (options[1] === flashVersion[1] && options[2] >= flashVersion[2])))));
	};

	/* $.flash */
	$.flash = function (options) {
		/* Check if Flash is installed, return false if it isn't */
		if (!$.hasFlashPlayer) {
			return false;
		}

		var movieFilename = options.swf || x,
		paramAttributes = options.params || {},
		buildDOM = doc.createElement('body'),
		aArr,
		bArr,
		cArr,
		dArr,
		a,
		b,
		c,
		d;

		/* Set the default height and width if not already set */
		options.height = options.height || 180;
		options.width = options.width || 320;

		/* Inject ExpressInstall if "hasVersion" is requested and the version requirement is not met */
		if (options.hasVersion && !$.hasFlashPlayerVersion(options.hasVersion)) {
			$.extend(options, {
				id: 'SWFObjectExprInst',
				height: Math.max(options.height, 137),
				width: Math.max(options.width, 214)
			});
			movieFilename = options.expressInstaller || $.flashExpressInstaller;
			paramAttributes = {
				flashvars: {
					MMredirectURL: win.location.href,
					MMplayerType: ($.browser.msie && $.browser.win) ? 'ActiveX': 'PlugIn',
					MMdoctitle: doc.title.slice(0, 47) + ' - Flash Player Installation'
				}
			};
		}

		/* Append as a param if specified separately */
		if (typeof paramAttributes === object) {
			/* flashvars */
			if (options.flashvars) {
				paramAttributes.flashvars = options.flashvars;
			}

			/* wmode */
			if (options.wmode) {
				paramAttributes.wmode = options.wmode;
			}
		}

		/* Delete the reformatted constructors */
		for (a in (b = ['swf', 'expressInstall', 'hasVersion', 'params', 'flashvars', 'wmode'])) {
			delete options[b[a]];
		}

		/* Create the OBJECT tag attributes */
		aArr = [];
		for (a in options) {
			if (typeof options[a] === object) {
				bArr = [];
				for (b in options[a]) {
					bArr.push(b.replace(/([A-Z])/, '-$1').toLowerCase() + ':' + options[a][b] + ';');
				}
				options[a] = bArr.join(x);
			}
			aArr.push(a + '="' + options[a] + '"');
		}
		options = aArr.join(' ');

		/* Create the PARAM tags */
		if (typeof paramAttributes === object) {
			aArr = [];
			for (a in paramAttributes) {
				if (typeof paramAttributes[a] === object) {
					bArr = [];
					for (b in paramAttributes[a]) {
						if (typeof paramAttributes[a][b] === object) {
							cArr = [];
							for (c in paramAttributes[a][b]) {
								if (typeof paramAttributes[a][b][c] === object) {
									dArr = [];
									for (d in paramAttributes[a][b][c]) {
										dArr.push([d.replace(/([A-Z])/, '-$1').toLowerCase(), ':', paramAttributes[a][b][c][d], ';'].join(x));
									}
									paramAttributes[a][b][c] = dArr.join(x);
								}
								cArr.push([c, '{', paramAttributes[a][b][c], '}'].join(x));
							}
							paramAttributes[a][b] = cArr.join(x);
						}
						bArr.push([b, '=', win.escape(win.escape(paramAttributes[a][b]))].join(x));
					}
					paramAttributes[a] = bArr.join('&amp;');
				}
				aArr.push(['<PARAM NAME="', a, '" VALUE="', paramAttributes[a], '">'].join(x));
			}
			paramAttributes = aArr.join(x);
		}

		/* Unify the visual display between all browsers */
		if (! (/style=/.test(options))) {
			options += ' style="vertical-align:text-top;"';
		}
		if (! (/style=(.*?)vertical-align/.test(options))) {
			options = options.replace(/style="/, 'style="vertical-align:text-top;');
		}

		/* Specify the object and param tags between browsers */
		if ($.browser.msie) {
			options += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
			paramAttributes = '<PARAM NAME="movie" VALUE="' + movieFilename + '">' + paramAttributes;
		} else {
			options += ' type="application/x-shockwave-flash" data="' + movieFilename + '"';
		}

		/* Return the jQuery'd flash OBJECT */
		buildDOM.innerHTML = ['<OBJECT ', options, '>', paramAttributes, '</OBJECT>'].join(x);
		return $(buildDOM.firstChild);
	};

	/* $.fn.flash */
	$.fn.flash = function (options) {
		/* Check if Flash is installed, return the jQuery node if it isn't */
		if (!$.hasFlashPlayer) {
			return this;
		}

		var a = 0,
		each;

		/* Each */
		while ((each = this.eq(a++))[0]) {
			each.html($.flash($.extend({},
			options)));
			if (document.getElementById('SWFObjectExprInst')) {
				a = this.length;
			}
		}

		/* Return the jQuery node */
		return this;
	};
}(jQuery));

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};
