/*
 * jQuery UI @VERSION
 *
 * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
;(function($) {

/** jQuery core modifications and additions **/
$.keyCode = {
	BACKSPACE: 8,
	CAPS_LOCK: 20,
	COMMA: 188,
	CONTROL: 17,
	DELETE: 46,
	DOWN: 40,
	END: 35,
	ENTER: 13,
	ESCAPE: 27,
	HOME: 36,
	INSERT: 45,
	LEFT: 37,
	NUMPAD_ADD: 107,
	NUMPAD_DECIMAL: 110,
	NUMPAD_DIVIDE: 111,
	NUMPAD_ENTER: 108,
	NUMPAD_MULTIPLY: 106,
	NUMPAD_SUBTRACT: 109,
	PAGE_DOWN: 34,
	PAGE_UP: 33,
	PERIOD: 190,
	RIGHT: 39,
	SHIFT: 16,
	SPACE: 32,
	TAB: 9,
	UP: 38
};

//Temporary mappings
var _remove = $.fn.remove;
var isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);


//Helper functions and ui object
$.ui = {
	
	version: "@VERSION",
	
	// $.ui.plugin is deprecated.  Use the proxy pattern instead.
	plugin: {
		add: function(module, option, set) {
			var proto = $.ui[module].prototype;
			for(var i in set) {
				proto.plugins[i] = proto.plugins[i] || [];
				proto.plugins[i].push([option, set[i]]);
			}
		},
		call: function(instance, name, args) {
			var set = instance.plugins[name];
			if(!set) { return; }
			
			for (var i = 0; i < set.length; i++) {
				if (instance.options[set[i][0]]) {
					set[i][1].apply(instance.element, args);
				}
			}
		}	
	},
	
	cssCache: {},
	css: function(name) {
		if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; }
		var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body');
		
		//if (!$.browser.safari)
			//tmp.appendTo('body');
		
		//Opera and Safari set width and height to 0px instead of auto
		//Safari returns rgba(0,0,0,0) when bgcolor is not set
		$.ui.cssCache[name] = !!(
			(!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) || 
			!(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
		);
		try { $('body').get(0).removeChild(tmp.get(0));	} catch(e){}
		return $.ui.cssCache[name];
	},

	hasScroll: function(e, a) {
		
		//If overflow is hidden, the element might have extra content, but the user wants to hide it
		if ($(e).css('overflow') == 'hidden') { return false; }
		
		var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
			has = false;
		
		if (e[scroll] > 0) { return true; }
		
		// TODO: determine which cases actually cause this to happen
		// if the element doesn't have the scroll set, see if it's possible to
		// set the scroll
		e[scroll] = 1;
		has = (e[scroll] > 0);
		e[scroll] = 0;
		return has;
	}
};


//jQuery plugins
$.fn.extend({
	
	remove: function() {
		// Safari has a native remove event which actually removes DOM elements,
		// so we have to use triggerHandler instead of trigger (#3037).
		$("*", this).add(this).each(function() {
			$(this).triggerHandler("remove");
		});
		return _remove.apply(this, arguments );
	},
	
	enableSelection: function() {
		return this
			.attr('unselectable', 'off')
			.css('MozUserSelect', '')
			.unbind('selectstart.ui');
	},
	
	disableSelection: function() {
		return this
			.attr('unselectable', 'on')
			.css('MozUserSelect', 'none')
			.bind('selectstart.ui', function() { return false; });
	},
	
	// WAI-ARIA Semantics
	ariaRole: function(role) {
		return (role !== undefined
			
			// setter
			? this.attr("role", isFF2 ? "wairole:" + role : role)
			
			// getter
			: (this.attr("role") || "").replace(/^wairole:/, ""));
	},
	
	ariaState: function(state, value) {
		return (value !== undefined
			
			// setter
			? this.each(function(i, el) {
				(isFF2
					? el.setAttributeNS("http://www.w3.org/2005/07/aaa",
						"aaa:" + state, value)
					: $(el).attr("aria-" + state, value));
			})
			
			// getter
			: this.attr(isFF2 ? "aaa:" + state : "aria-" + state));
	}
	
});


//Additional selectors
$.extend($.expr[':'], {
	
	data: function(a, i, m) {
		return $.data(a, m[3]);
	},
	
	// TODO: add support for object, area
	tabbable: function(a, i, m) {

		var nodeName = a.nodeName.toLowerCase();
		var isVisible = function(element) {
			function checkStyles(element) {
				var style = element.style;
				return (style.display != 'none' && style.visibility != 'hidden');
			}
			
			var visible = checkStyles(element);
			
			(visible && $.each($.dir(element, 'parentNode'), function() {
				return (visible = checkStyles(this));
			}));
			
			return visible;
		};
		
		return (
			// in tab order
			a.tabIndex >= 0 &&
			
			( // filter node types that participate in the tab order
				
				// anchor tag
				('a' == nodeName && a.href) ||
				
				// enabled form element
				(/input|select|textarea|button/.test(nodeName) &&
					'hidden' != a.type && !a.disabled)
			) &&
			
			// visible on page
			isVisible(a)
		);
		
	}
	
});


// $.widget is a factory to create jQuery plugins
// taking some boilerplate code out of the plugin code
// created by Scott González and Jörn Zaefferer
function getter(namespace, plugin, method, args) {
	function getMethods(type) {
		var methods = $[namespace][plugin][type] || [];
		return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
	}
	
	var methods = getMethods('getter');
	if (args.length == 1 && typeof args[0] == 'string') {
		methods = methods.concat(getMethods('getterSetter'));
	}
	return ($.inArray(method, methods) != -1);
}

$.widget = function(name, prototype) {
	var namespace = name.split(".")[0];
	name = name.split(".")[1];
	
	// create plugin method
	$.fn[name] = function(options) {
		var isMethodCall = (typeof options == 'string'),
			args = Array.prototype.slice.call(arguments, 1);
		
		// prevent calls to internal methods
		if (isMethodCall && options.substring(0, 1) == '_') {
			return this;
		}
		
		// handle getter methods
		if (isMethodCall && getter(namespace, name, options, args)) {
			var instance = $.data(this[0], name);
			return (instance ? instance[options].apply(instance, args)
				: undefined);
		}
		
		// handle initialization and non-getter methods
		return this.each(function() {
			var instance = $.data(this, name);
			
			// constructor
			(!instance && !isMethodCall &&
				$.data(this, name, new $[namespace][name](this, options)));
			
			// method call
			(instance && isMethodCall && $.isFunction(instance[options]) &&
				instance[options].apply(instance, args));
		});
	};
	
	// create widget constructor
	$[namespace] = $[namespace] || {};
	$[namespace][name] = function(element, options) {
		var self = this;
		
		this.widgetName = name;
		this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
		this.widgetBaseClass = namespace + '-' + name;
		
		this.options = $.extend({},
			$.widget.defaults,
			$[namespace][name].defaults,
			$.metadata && $.metadata.get(element)[name],
			options);
		
		this.element = $(element)
			.bind('setData.' + name, function(e, key, value) {
				return self._setData(key, value);
			})
			.bind('getData.' + name, function(e, key) {
				return self._getData(key);
			})
			.bind('remove', function() {
				return self.destroy();
			});
		
		this._init();
	};
	
	// add widget prototype
	$[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
	
	// TODO: merge getter and getterSetter properties from widget prototype
	// and plugin prototype
	$[namespace][name].getterSetter = 'option';
};

$.widget.prototype = {
	_init: function() {},
	destroy: function() {
		this.element.removeData(this.widgetName);
	},
	
	option: function(key, value) {
		var options = key,
			self = this;
		
		if (typeof key == "string") {
			if (value === undefined) {
				return this._getData(key);
			}
			options = {};
			options[key] = value;
		}
		
		$.each(options, function(key, value) {
			self._setData(key, value);
		});
	},
	_getData: function(key) {
		return this.options[key];
	},
	_setData: function(key, value) {
		this.options[key] = value;
		
		if (key == 'disabled') {
			this.element[value ? 'addClass' : 'removeClass'](
				this.widgetBaseClass + '-disabled');
		}
	},
	
	enable: function() {
		this._setData('disabled', false);
	},
	disable: function() {
		this._setData('disabled', true);
	},
	
	_trigger: function(type, e, data) {
		var eventName = (type == this.widgetEventPrefix
			? type : this.widgetEventPrefix + type);
		e = e  || $.event.fix({ type: eventName, target: this.element[0] });
		return this.element.triggerHandler(eventName, [e, data], this.options[type]);
	}
};

$.widget.defaults = {
	disabled: false
};


/** Mouse Interaction Plugin **/

$.ui.mouse = {
	_mouseInit: function() {
		var self = this;
	
		this.element
			.bind('mousedown.'+this.widgetName, function(e) {
				return self._mouseDown(e);
			})
			.bind('click.'+this.widgetName, function(e) {
				if(self._preventClickEvent) {
					self._preventClickEvent = false;
					return false;
				}
			});
		
		// Prevent text selection in IE
		if ($.browser.msie) {
			this._mouseUnselectable = this.element.attr('unselectable');
			this.element.attr('unselectable', 'on');
		}
		
		this.started = false;
	},
	
	// TODO: make sure destroying one instance of mouse doesn't mess with
	// other instances of mouse
	_mouseDestroy: function() {
		this.element.unbind('.'+this.widgetName);
		
		// Restore text selection in IE
		($.browser.msie
			&& this.element.attr('unselectable', this._mouseUnselectable));
	},
	
	_mouseDown: function(e) {
		// we may have missed mouseup (out of window)
		(this._mouseStarted && this._mouseUp(e));
		
		this._mouseDownEvent = e;
		
		var self = this,
			btnIsLeft = (e.which == 1),
			elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
		if (!btnIsLeft || elIsCancel || !this._mouseCapture(e)) {
			return true;
		}
		
		this.mouseDelayMet = !this.options.delay;
		if (!this.mouseDelayMet) {
			this._mouseDelayTimer = setTimeout(function() {
				self.mouseDelayMet = true;
			}, this.options.delay);
		}
		
		if (this._mouseDistanceMet(e) && this._mouseDelayMet(e)) {
			this._mouseStarted = (this._mouseStart(e) !== false);
			if (!this._mouseStarted) {
				e.preventDefault();
				return true;
			}
		}
		
		// these delegates are required to keep context
		this._mouseMoveDelegate = function(e) {
			return self._mouseMove(e);
		};
		this._mouseUpDelegate = function(e) {
			return self._mouseUp(e);
		};
		$(document)
			.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
			.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
		
		return false;
	},
	
	_mouseMove: function(e) {
		// IE mouseup check - mouseup happened when mouse was out of window
		if ($.browser.msie && !e.button) {
			return this._mouseUp(e);
		}
		
		if (this._mouseStarted) {
			this._mouseDrag(e);
			return false;
		}
		
		if (this._mouseDistanceMet(e) && this._mouseDelayMet(e)) {
			this._mouseStarted =
				(this._mouseStart(this._mouseDownEvent, e) !== false);
			(this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e));
		}
		
		return !this._mouseStarted;
	},
	
	_mouseUp: function(e) {
		$(document)
			.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
			.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
		
		if (this._mouseStarted) {
			this._mouseStarted = false;
			this._preventClickEvent = true;
			this._mouseStop(e);
		}
		
		return false;
	},
	
	_mouseDistanceMet: function(e) {
		return (Math.max(
				Math.abs(this._mouseDownEvent.pageX - e.pageX),
				Math.abs(this._mouseDownEvent.pageY - e.pageY)
			) >= this.options.distance
		);
	},
	
	_mouseDelayMet: function(e) {
		return this.mouseDelayMet;
	},
	
	// These are placeholder methods, to be overriden by extending plugin
	_mouseStart: function(e) {},
	_mouseDrag: function(e) {},
	_mouseStop: function(e) {},
	_mouseCapture: function(e) { return true; }
};

$.ui.mouse.defaults = {
	cancel: null,
	distance: 1,
	delay: 0
};

})(jQuery);



/*
 * jQuery UI Tabs @VERSION
 *
 * Copyright (c) 2007, 2008 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	ui.core.js
 */
(function($) {

$.widget("ui.tabs", {
	_init: function() {
		// create tabs
		this._tabify(true);
	},
	_setData: function(key, value) {
		if ((/^selected/).test(key))
			this.select(value);
		else {
			this.options[key] = value;
			this._tabify();
		}
	},
	length: function() {
		return this.$tabs.length;
	},
	_tabId: function(a) {
		return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
			|| this.options.idPrefix + $.data(a);
	},
	ui: function(tab, panel) {
		return {
			options: this.options,
			tab: tab,
			panel: panel,
			index: this.$tabs.index(tab)
		};
	},
	_sanitizeSelector: function(hash) {
		return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":"
	},
	_cookie: function() {
		var cookie = this.cookie || (this.cookie = 'ui-tabs-' + $.data(this.element[0]));
		return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
	},
	_tabify: function(init) {
		
		this.$lis = $('li:has(a[href])', this.element);
		this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
		this.$panels = $([]);
		
		var self = this, o = this.options;
		
		this.$tabs.each(function(i, a) {
			// inline tab
			if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
				self.$panels = self.$panels.add(self._sanitizeSelector(a.hash));
			// remote tab
			else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
				$.data(a, 'href.tabs', a.href); // required for restore on destroy
				$.data(a, 'load.tabs', a.href); // mutable
				var id = self._tabId(a);
				a.href = '#' + id;
				var $panel = $('#' + id);
				if (!$panel.length) {
					$panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
						.insertAfter(self.$panels[i - 1] || self.element);
					$panel.data('destroy.tabs', true);
				}
				self.$panels = self.$panels.add($panel);
			}
			// invalid tab href
			else
				o.disabled.push(i + 1);
		});
		
		// initialization from scratch
		if (init) {
			
			// attach necessary classes for styling if not present
			this.element.addClass(o.navClass);
			this.$panels.addClass(o.panelClass);
			
			// Selected tab
			// use "selected" option or try to retrieve:
			// 1. from fragment identifier in url
			// 2. from cookie
			// 3. from selected class attribute on <li>
			if (o.selected === undefined) {
				if (location.hash) {
					this.$tabs.each(function(i, a) {
						if (a.hash == location.hash) {
							o.selected = i;
							return false; // break
						}
					});
				}
				else if (o.cookie) {
					var index = parseInt(self._cookie(), 10);
					if (index && self.$tabs[index]) o.selected = index;
				}
				else if (self.$lis.filter('.' + o.selectedClass).length)
					o.selected = self.$lis.index( self.$lis.filter('.' + o.selectedClass)[0] );
			}
			o.selected = o.selected === null || o.selected !== undefined ? o.selected : 0; // first tab selected by default
			
			// Take disabling tabs via class attribute from HTML
			// into account and update option properly.
			// A selected tab cannot become disabled.
			o.disabled = $.unique(o.disabled.concat(
				$.map(this.$lis.filter('.' + o.disabledClass),
					function(n, i) { return self.$lis.index(n); } )
			)).sort();
			if ($.inArray(o.selected, o.disabled) != -1)
				o.disabled.splice($.inArray(o.selected, o.disabled), 1);
			
			// highlight selected tab
			this.$panels.addClass(o.hideClass);
			this.$lis.removeClass(o.selectedClass);
			if (o.selected !== null) {
				this.$panels.eq(o.selected).removeClass(o.hideClass);
				var classes = [o.selectedClass];
				if (o.deselectable) classes.push(o.deselectableClass);
				this.$lis.eq(o.selected).addClass(classes.join(' '));
				
				// seems to be expected behavior that the show callback is fired
				var onShow = function() {
					
					self._trigger('show', null,
						self.ui(self.$tabs[o.selected], self.$panels[o.selected]));
				};
				
				// load if remote tab
				if ($.data(this.$tabs[o.selected], 'load.tabs'))
					this.load(o.selected, onShow);
				// just trigger show event
				else onShow();
			}
			
			// clean up to avoid memory leaks in certain versions of IE 6
			$(window).bind('unload', function() {
				self.$tabs.unbind('.tabs');
				self.$lis = self.$tabs = self.$panels = null;
			});
			
		}
		// update selected after add/remove
		else
			o.selected = this.$lis.index( this.$lis.filter('.' + o.selectedClass)[0] );
		
		// set or update cookie after init and add/remove respectively
		if (o.cookie) this._cookie(o.selected, o.cookie);
		
		// disable tabs
		for (var i = 0, li; li = this.$lis[i]; i++)
			$(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);
		
		// reset cache if switching from cached to not cached
		if (o.cache === false) this.$tabs.removeData('cache.tabs');
		
		// set up animations
		var hideFx, showFx;
		if (o.fx) {
			if (o.fx.constructor == Array) {
				hideFx = o.fx[0];
				showFx = o.fx[1];
			}
			else hideFx = showFx = o.fx;
		}
		
		// Reset certain styles left over from animation
		// and prevent IE's ClearType bug...
		function resetStyle($el, fx) {
			$el.css({ display: '' });
			if ($.browser.msie && fx.opacity) $el[0].style.removeAttribute('filter');
		}

		// Show a tab...
		var showTab = showFx ?
			function(clicked, $show) {
				$show.animate(showFx, showFx.duration || 'normal', function() {
					$show.removeClass(o.hideClass);
					resetStyle($show, showFx);
					self._trigger('show', null, self.ui(clicked, $show[0]));
				});
			} :
			function(clicked, $show) {
				
				$show.removeClass(o.hideClass);
				self._trigger('show', null, self.ui(clicked, $show[0]));
			};
		
		// Hide a tab, $show is optional...
		var hideTab = hideFx ? 
			function(clicked, $hide, $show) {
				$hide.animate(hideFx, hideFx.duration || 'normal', function() {
					$hide.addClass(o.hideClass);
					resetStyle($hide, hideFx);
					if ($show) showTab(clicked, $show, $hide);
				});
			} :
			function(clicked, $hide, $show) {
				$hide.addClass(o.hideClass);
				if ($show) showTab(clicked, $show);
			};
		
		// Switch a tab...
		function switchTab(clicked, $li, $hide, $show) {
			var classes = [o.selectedClass];
			if (o.deselectable) classes.push(o.deselectableClass);
			$li.addClass(classes.join(' ')).siblings().removeClass(classes.join(' '));
			hideTab(clicked, $hide, $show);
		}
		
		// attach tab event handler, unbind to avoid duplicates from former tabifying...
		this.$tabs.unbind('.tabs').bind(o.event + '.tabs', function() {
			
			//var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
			var $li = $(this).parents('li:eq(0)'),
				$hide = self.$panels.filter(':visible'),
				$show = $(self._sanitizeSelector(this.hash));
			
			// If tab is already selected and not deselectable or tab disabled or 
			// or is already loading or click callback returns false stop here.
			// Check if click handler returns false last so that it is not executed
			// for a disabled or loading tab!
			if (($li.hasClass(o.selectedClass) && !o.deselectable)
				|| $li.hasClass(o.disabledClass)
				|| $(this).hasClass(o.loadingClass)
				|| self._trigger('select', null, self.ui(this, $show[0])) === false
				) {
				this.blur();
				return false;
			}
			
			o.selected = self.$tabs.index(this);
			
			// if tab may be closed
			if (o.deselectable) {
				if ($li.hasClass(o.selectedClass)) {
					self.options.selected = null;
					$li.removeClass([o.selectedClass, o.deselectableClass].join(' '));
					self.$panels.stop();
					hideTab(this, $hide);
					this.blur();
					return false;
				} else if (!$hide.length) {
					self.$panels.stop();
					var a = this;
					self.load(self.$tabs.index(this), function() {
						$li.addClass([o.selectedClass, o.deselectableClass].join(' '));
						showTab(a, $show);
					});
					this.blur();
					return false;
				}
			}
			
			if (o.cookie) self._cookie(o.selected, o.cookie);
			
			// stop possibly running animations
			self.$panels.stop();
			
			// show new tab
			if ($show.length) {
				var a = this;
				self.load(self.$tabs.index(this), $hide.length ? 
					function() {
						switchTab(a, $li, $hide, $show);
					} :
					function() {
						$li.addClass(o.selectedClass);
						showTab(a, $show);
					}
				);
			} else
				throw 'jQuery UI Tabs: Mismatching fragment identifier.';
				
			// Prevent IE from keeping other link focussed when using the back button
			// and remove dotted border from clicked link. This is controlled via CSS
			// in modern browsers; blur() removes focus from address bar in Firefox
			// which can become a usability and annoying problem with tabs('rotate').
			if ($.browser.msie) this.blur();
			
			return false;
			
		});
		
		// disable click if event is configured to something else
		if (o.event != 'click') this.$tabs.bind('click.tabs', function(){return false;});
		
	},
	add: function(url, label, index) {
		if (index == undefined)
			index = this.$tabs.length; // append by default
		
		var o = this.options;
		var $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label));
		$li.data('destroy.tabs', true);
		
		var id = url.indexOf('#') == 0 ? url.replace('#', '') : this._tabId( $('a:first-child', $li)[0] );
		
		// try to find an existing element before creating a new one
		var $panel = $('#' + id);
		if (!$panel.length) {
			$panel = $(o.panelTemplate).attr('id', id)
				.addClass(o.hideClass)
				.data('destroy.tabs', true);
		}
		$panel.addClass(o.panelClass);
		if (index >= this.$lis.length) {
			$li.appendTo(this.element);
			$panel.appendTo(this.element[0].parentNode);
		} else {
			$li.insertBefore(this.$lis[index]);
			$panel.insertBefore(this.$panels[index]);
		}
		
		o.disabled = $.map(o.disabled,
			function(n, i) { return n >= index ? ++n : n });
		
		this._tabify();
		
		if (this.$tabs.length == 1) {
			$li.addClass(o.selectedClass);
			$panel.removeClass(o.hideClass);
			var href = $.data(this.$tabs[0], 'load.tabs');
			if (href)
				this.load(index, href);
		}
		
		// callback
		this._trigger('add', null, this.ui(this.$tabs[index], this.$panels[index]));
	},
	remove: function(index) {
		var o = this.options, $li = this.$lis.eq(index).remove(),
			$panel = this.$panels.eq(index).remove();
		
		// If selected tab was removed focus tab to the right or
		// in case the last tab was removed the tab to the left.
		if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
			this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
		
		o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
			function(n, i) { return n >= index ? --n : n });
		
		this._tabify();
		
		// callback
		this._trigger('remove', null, this.ui($li.find('a')[0], $panel[0]));
	},
	enable: function(index) {
		var o = this.options;
		if ($.inArray(index, o.disabled) == -1)
			return;
		
		var $li = this.$lis.eq(index).removeClass(o.disabledClass);
		if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
			$li.css('display', 'inline-block');
			setTimeout(function() {
				$li.css('display', 'block');
			}, 0);
		}
		
		o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
		
		// callback
		this._trigger('enable', null, this.ui(this.$tabs[index], this.$panels[index]));
	},
	disable: function(index) {
		var self = this, o = this.options;
		if (index != o.selected) { // cannot disable already selected tab
			this.$lis.eq(index).addClass(o.disabledClass);
			
			o.disabled.push(index);
			o.disabled.sort();
			
			// callback
			this._trigger('disable', null, this.ui(this.$tabs[index], this.$panels[index]));
		}
	},
	select: function(index) {
		// TODO make null as argument work
		if (typeof index == 'string')
			index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
		this.$tabs.eq(index).trigger(this.options.event + '.tabs');
	},
	load: function(index, callback) { // callback is for internal usage only
		
		var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0],
				bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs');
		
		callback = callback || function() {};
		
		// no remote or from cache - just finish with callback
		if (!url || !bypassCache && $.data(a, 'cache.tabs')) {
			callback();
			return;
		}
		
		// load remote from here on
		
		var inner = function(parent) {
			var $parent = $(parent), $inner = $parent.find('*:last');
			return $inner.length && $inner.is(':not(img)') && $inner || $parent;
		};
		var cleanup = function() {
			self.$tabs.filter('.' + o.loadingClass).removeClass(o.loadingClass)
					.each(function() {
						if (o.spinner)
							inner(this).parent().html(inner(this).data('label.tabs'));
					});
			self.xhr = null;
			hideLoading();
		};
		showLoading();
		if (o.spinner) {
			var label = inner(a).html();
			inner(a).wrapInner('<em></em>')
				.find('em').data('label.tabs', label).html(o.spinner);
				
		}
		
		var ajaxOptions = $.extend({}, o.ajaxOptions, {
			url: url,
			success: function(r, s) {
				$(self._sanitizeSelector(a.hash)).html(r);
				cleanup();
				
				if (o.cache)
					$.data(a, 'cache.tabs', true); // if loaded once do not load them again
				
				// callbacks
				self._trigger('load', null, self.ui(self.$tabs[index], self.$panels[index]));
				try {
					o.ajaxOptions.success(r, s);
				}
				catch (e) {}
				
				// This callback is required because the switch has to take
				// place after loading has completed. Call last in order to 
				// fire load before show callback...
				callback();
			}
		});
		if (this.xhr) {
			// terminate pending requests from other tabs and restore tab label
			this.xhr.abort();
			cleanup();
		}
		$a.addClass(o.loadingClass);
		self.xhr = $.ajax(ajaxOptions);
	},
	url: function(index, url) {
		this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs', url);
	},
	destroy: function() {
		var o = this.options;
		this.element.unbind('.tabs')
			.removeClass(o.navClass).removeData('tabs');
		this.$tabs.each(function() {
			var href = $.data(this, 'href.tabs');
			if (href)
				this.href = href;
			var $this = $(this).unbind('.tabs');
			$.each(['href', 'load', 'cache'], function(i, prefix) {
				$this.removeData(prefix + '.tabs');
			});
		});
		this.$lis.add(this.$panels).each(function() {
			if ($.data(this, 'destroy.tabs'))
				$(this).remove();
			else
				$(this).removeClass([o.selectedClass, o.deselectableClass,
					o.disabledClass, o.panelClass, o.hideClass].join(' '));
		});
		if (o.cookie)
			this._cookie(null, o.cookie);
	}
});

$.extend($.ui.tabs, {
	version: '@VERSION',
	getter: 'length',
	defaults: {
		// basic setup
		deselectable: false,
		event: 'click',
		disabled: [],
		cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
		// Ajax
		spinner: 'Loading&#8230;',
		cache: false,
		idPrefix: 'ui-tabs-',
		ajaxOptions: null,
		// animations
		fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
		// templates
		tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
		panelTemplate: '<div></div>',
		// CSS class names
		navClass: 'ui-tabs-nav',
		selectedClass: 'ui-tabs-selected',
		deselectableClass: 'ui-tabs-deselectable',
		disabledClass: 'ui-tabs-disabled',
		panelClass: 'ui-tabs-panel',
		hideClass: 'ui-tabs-hide',
		loadingClass: 'ui-tabs-loading'
	}
});

/*
 * Tabs Extensions
 */

/*
 * Rotate
 */
$.extend($.ui.tabs.prototype, {
	rotation: null,
	rotate: function(ms, continuing) {
		
		continuing = continuing || false;
		
		var self = this, t = this.options.selected;
		
		function start() {
			self.rotation = setInterval(function() {
				t = ++t < self.$tabs.length ? t : 0;
				self.select(t);
			}, ms);
		}
		
		function stop(e) {
			if (!e || e.clientX) { // only in case of a true click
				clearInterval(self.rotation);
			}
		}
		
		// start interval
		if (ms) {
			start();
			if (!continuing)
				this.$tabs.bind(this.options.event + '.tabs', stop);
			else
				this.$tabs.bind(this.options.event + '.tabs', function() {
					stop();
					t = self.options.selected;
					start();
				});
		}
		// stop interval
		else {
			stop();
			this.$tabs.unbind(this.options.event + '.tabs', stop);
		}
	}
});

})(jQuery);




// JavaScript Document
/* // JCARRUSEL 0.2.3// */
(function($) {$.fn.jcarousel = function(o) {return this.each(function() {new $jc(this, o);});};var defaults = {vertical: false,start: 1,offset: 1,size: null,scroll: 3,visible: null,animation: 'normal',easing: 'swing',auto: 0,wrap: null,initCallback: null,reloadCallback: null,itemLoadCallback: null,itemFirstInCallback: null,itemFirstOutCallback: null,itemLastInCallback: null,itemLastOutCallback: null,itemVisibleInCallback: null,itemVisibleOutCallback: null,buttonNextHTML: '<div></div>',buttonPrevHTML: '<div></div>',buttonNextEvent: 'click',buttonPrevEvent: 'click',buttonNextCallback: null,buttonPrevCallback: null};$.jcarousel = function(e, o) {this.options    = $.extend({}, defaults, o || {});this.locked     = false;this.container  = null;this.clip       = null;this.list       = null;this.buttonNext = null;this.buttonPrev = null;this.wh = !this.options.vertical ? 'width' : 'height';this.lt = !this.options.vertical ? 'left' : 'top';var skin = '', split = e.className.split(' ');for (var i = 0; i < split.length; i++) {if (split[i].indexOf('jcarousel-skin') != -1) {$(e).removeClass(split[i]);var skin = split[i];break;}}if (e.nodeName == 'UL' || e.nodeName == 'OL') {this.list = $(e);this.container = this.list.parent();if (this.container.hasClass('jcarousel-clip')) {if (!this.container.parent().hasClass('jcarousel-container'))this.container = this.container.wrap('<div></div>');this.container = this.container.parent();} else if (!this.container.hasClass('jcarousel-container'))this.container = this.list.wrap('<div></div>').parent();} else {this.container = $(e);this.list = $(e).find('>ul,>ol,div>ul,div>ol');}if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1)this.container.wrap('<div class=" '+ skin + '"></div>');this.clip = this.list.parent();if (!this.clip.length || !this.clip.hasClass('jcarousel-clip'))this.clip = this.list.wrap('<div></div>').parent();this.buttonPrev = $('.jcarousel-prev', this.container);if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null)this.buttonPrev = this.clip.before(this.options.buttonPrevHTML).prev();this.buttonPrev.addClass(this.className('jcarousel-prev'));this.buttonNext = $('.jcarousel-next', this.container);if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null)this.buttonNext = this.clip.before(this.options.buttonNextHTML).prev();this.buttonNext.addClass(this.className('jcarousel-next'));this.clip.addClass(this.className('jcarousel-clip'));this.list.addClass(this.className('jcarousel-list'));this.container.addClass(this.className('jcarousel-container'));var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null;var li = this.list.children('li');var self = this;if (li.size() > 0) {var wh = 0, i = this.options.offset;li.each(function() {self.format(this, i++);wh += self.dimension(this, di);});this.list.css(this.wh, wh + 'px');if (!o || o.size === undefined)this.options.size = li.size();}this.container.css('display', 'block');this.buttonNext.css('display', 'block');this.buttonPrev.css('display', 'block');this.funcNext   = function() { self.next(); };this.funcPrev   = function() { self.prev(); };this.funcResize = function() { self.reload(); };if (this.options.initCallback != null)this.options.initCallback(this, 'init');if ($.browser.safari) {this.buttons(false, false);$(window).bind('load', function() { self.setup(); });} else
this.setup();};var $jc = $.jcarousel;$jc.fn = $jc.prototype = {jcarousel: '0.2.3'};$jc.fn.extend = $jc.extend = $.extend;$jc.fn.extend({setup: function() {this.first     = null;this.last      = null;this.prevFirst = null;this.prevLast  = null;this.animating = false;this.timer     = null;this.tail      = null;this.inTail    = false;if (this.locked)return;this.list.css(this.lt, this.pos(this.options.offset) + 'px');var p = this.pos(this.options.start);this.prevFirst = this.prevLast = null;this.animate(p, false);$(window).unbind('resize', this.funcResize).bind('resize', this.funcResize);},reset: function() {this.list.empty();this.list.css(this.lt, '0px');this.list.css(this.wh, '10px');if (this.options.initCallback != null)this.options.initCallback(this, 'reset');this.setup();},reload: function() {if (this.tail != null && this.inTail)this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail);this.tail   = null;this.inTail = false;if (this.options.reloadCallback != null)this.options.reloadCallback(this);if (this.options.visible != null) {var self = this;var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0;$('li', this.list).each(function(i) {wh += self.dimension(this, di);if (i + 1 < self.first)lt = wh;});this.list.css(this.wh, wh + 'px');this.list.css(this.lt, -lt + 'px');}this.scroll(this.first, false);},lock: function() {this.locked = true;this.buttons();},unlock: function() {this.locked = false;this.buttons();},size: function(s) {if (s != undefined) {this.options.size = s;if (!this.locked)this.buttons();}return this.options.size;},has: function(i, i2) {if (i2 == undefined || !i2)i2 = i;if (this.options.size !== null && i2 > this.options.size)i2 = this.options.size;for (var j = i; j <= i2; j++) {var e = this.get(j);if (!e.length || e.hasClass('jcarousel-item-placeholder'))return false;}return true;},get: function(i) {return $('.jcarousel-item-' + i, this.list);},add: function(i, s) {var e = this.get(i), old = 0, add = 0;if (e.length == 0) {var c, e = this.create(i), j = $jc.intval(i);while (c = this.get(--j)) {if (j <= 0 || c.length) {j <= 0 ? this.list.prepend(e) : c.after(e);break;}}} else old = this.dimension(e);e.removeClass(this.className('jcarousel-item-placeholder'));typeof s == 'string' ? e.html(s) : e.empty().append(s);var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null;var wh = this.dimension(e, di) - old;if (i > 0 && i < this.first)this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px');this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px');return e;},remove: function(i) {var e = this.get(i);if (!e.length || (i >= this.first && i <= this.last))return;var d = this.dimension(e);if (i < this.first)this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px');e.remove();this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px');},next: function() {this.stopAuto();if (this.tail != null && !this.inTail)this.scrollTail(false);else this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll);},prev: function() {this.stopAuto();if (this.tail != null && this.inTail)this.scrollTail(true);else this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll);},scrollTail: function(b) {if (this.locked || this.animating || !this.tail)return;var pos  = $jc.intval(this.list.css(this.lt));!b ? pos -= this.tail : pos += this.tail;this.inTail = !b;this.prevFirst = this.first;this.prevLast  = this.last;this.animate(pos);},scroll: function(i, a) {if (this.locked || this.animating)return;this.animate(this.pos(i), a);},pos: function(i) {if (this.locked || this.animating)return;if (this.options.wrap != 'circular')i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i);var back = this.first > i;var pos  = $jc.intval(this.list.css(this.lt));var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first;var c = back ? this.get(f) : this.get(this.last);var j = back ? f : f - 1;var e = null, l = 0, p = false, d = 0;while (back ? --j >= i : ++j < i) {e = this.get(j);p = !e.length;if (e.length == 0) {e = this.create(j).addClass(this.className('jcarousel-item-placeholder'));c[back ? 'before' : 'after' ](e);}c = e;d = this.dimension(e);if (p) l += d;if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size))))pos = back ? pos + d : pos - d;}var clipping = this.clipping();var cache = [];var visible = 0, j = i, v = 0;var c = this.get(i - 1);while (++visible) {e = this.get(j);p = !e.length;if (e.length == 0) {e = this.create(j).addClass(this.className('jcarousel-item-placeholder'));c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after' ](e);}c = e;var d = this.dimension(e);if (d == 0) {alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');return 0;}if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size)cache.push(e);else if (p)l += d;v += d;if (v >= clipping)break;j++;}for (var x = 0; x < cache.length; x++)cache[x].remove();if (l > 0) {this.list.css(this.wh, this.dimension(this.list) + l + 'px');if (back) {pos -= l;this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px');}}var last = i + visible - 1;if (this.options.wrap != 'circular' && this.options.size && last > this.options.size)last = this.options.size;if (j > last) {visible = 0, j = last, v = 0;while (++visible) {var e = this.get(j--);if (!e.length)break;v += this.dimension(e);if (v >= clipping)break;}}var first = last - visible + 1;if (this.options.wrap != 'circular' && first < 1)first = 1;if (this.inTail && back) {pos += this.tail;this.inTail = false;}this.tail = null;if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) {var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom');if ((v - m) > clipping)this.tail = v - clipping - m;}while (i-- > first)pos += this.dimension(this.get(i));this.prevFirst = this.first;this.prevLast  = this.last;this.first     = first;this.last      = last;return pos;},animate: function(p, a) {if (this.locked || this.animating)return;this.animating = true;var self = this;var scrolled = function() {self.animating = false;if (p == 0)self.list.css(self.lt,  0);if (self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size)self.startAuto();self.buttons();self.notify('onAfterAnimation');};this.notify('onBeforeAnimation');if (!this.options.animation || a == false) {this.list.css(this.lt, p + 'px');scrolled();} else {var o = !this.options.vertical ? {'left': p} : {'top': p};this.list.animate(o, this.options.animation, this.options.easing, scrolled);}},startAuto: function(s) {if (s != undefined)this.options.auto = s;if (this.options.auto == 0)return this.stopAuto();if (this.timer != null)return;var self = this;this.timer = setTimeout(function() { self.next(); }, this.options.auto * 1000);},stopAuto: function() {if (this.timer == null)return;clearTimeout(this.timer);this.timer = null;},buttons: function(n, p) {if (n == undefined || n == null) {var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size);if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size)n = this.tail != null && !this.inTail;}if (p == undefined || p == null) {var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1);if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1)p = this.tail != null && this.inTail;}var self = this;this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent, this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true);this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent, this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true);if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != n) && this.options.buttonNextCallback != null) {this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); });this.buttonNext[0].jcarouselstate = n;}if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != p) && this.options.buttonPrevCallback != null) {this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); });this.buttonPrev[0].jcarouselstate = p;}},notify: function(evt) {var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev');this.callback('itemLoadCallback', evt, state);if (this.prevFirst !== this.first) {this.callback('itemFirstInCallback', evt, state, this.first);this.callback('itemFirstOutCallback', evt, state, this.prevFirst);}if (this.prevLast !== this.last) {this.callback('itemLastInCallback', evt, state, this.last);this.callback('itemLastOutCallback', evt, state, this.prevLast);}this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast);this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last);},callback: function(cb, evt, state, i1, i2, i3, i4) {if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation'))return;var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb];if (!$.isFunction(callback))return;var self = this;if (i1 === undefined)callback(self, state, evt);else if (i2 === undefined)this.get(i1).each(function() { callback(self, this, i1, state, evt); });else {for (var i = i1; i <= i2; i++)if (i !== null && !(i >= i3 && i <= i4))this.get(i).each(function() { callback(self, this, i, state, evt); });}},create: function(i) {return this.format('<li></li>', i);},format: function(e, i) {var $e = $(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i));$e.attr('jcarouselindex', i);return $e;},className: function(c) {return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical');},dimension: function(e, d) {var el = e.jquery != undefined ? e[0] : e;var old = !this.options.vertical ? el.offsetWidth + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') : el.offsetHeight + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom');if (d == undefined || old == d)return old;var w = !this.options.vertical ? d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') : d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom');$(el).css(this.wh, w + 'px');return this.dimension(el);},clipping: function() {return !this.options.vertical ? this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth'));},index: function(i, s) {if (s == undefined)s = this.options.size;return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1;}});$jc.extend({defaults: function(d) {return $.extend(defaults, d || {});},margin: function(e, p) {if (!e)return 0;var el = e.jquery != undefined ? e[0] : e;if (p == 'marginRight' && $.browser.safari) {var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2;$.swap(el, old, function() { oWidth = el.offsetWidth; });old['marginRight'] = 0;$.swap(el, old, function() { oWidth2 = el.offsetWidth; });return oWidth2 - oWidth;}return $jc.intval($.css(el, p));},intval: function(v) {v = parseInt(v);return isNaN(v) ? 0 : v;}});})(jQuery);

/*tab*/
$.tabs = function(containerId, start) {var ON_CLASS = 'on';var id = '#' + containerId;var i = (typeof start == "number") ? start - 1 : 0;$(id + '>div:lt(' + i + ')').add(id + '>div:gt(' + i + ')').hide();$(id + '>ul>li:nth-child(' + (i+1) + ')').addClass(ON_CLASS);$(id + '>ul>li>a').click(function() {$(this).load( function() { alert("Hello"); } );if (!$(this.parentNode).is('.' + ON_CLASS)) {var re = /([_\-\w]+$)/i;var target = $('#' + re.exec(this.href)[1]);if (target.size() > 0) {$(id + '>div:visible').hide();target.show();$(id + '>ul>li').removeClass(ON_CLASS);$(this.parentNode).addClass(ON_CLASS);} else {alert('There is no such container.');}}return false;});};

$.tabsmenu = function(containerId, start) {var ON_CLASS = 'on';var id = '#' + containerId;var i = (typeof start == "number") ? start - 1 : 0;$(id + '>div:lt(' + i + ')').add(id + '>div:gt(' + i + ')').hide();$(id + '>ul>li:nth-child(' + (i+1) + ')').addClass(ON_CLASS);$(id + '>ul>li>a').click(function() {$(this).load( function() { alert("Hello");} );if (!$(this.parentNode).is('.' + ON_CLASS)) {var re = /([_\-\w]+$)/i;var target = $('#' + re.exec(this.href)[1]);if (target.size() > 0) {$(id + '>div:visible').slideUp();target.slideDown("slow");$(id + '>ul>li').removeClass(ON_CLASS);$(this.parentNode).addClass(ON_CLASS);} else {alert('There is no such container.');}}return false;});};

/*ScrollTo 1.4.1*/
;(function($){var m=$.scrollTo=function(b,h,f){$(window).scrollTo(b,h,f)};m.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};m.window=function(b){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var b=this,h=!b.nodeName||$.inArray(b.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!h)return b;var f=(b.contentWindow||b).document||b.ownerDocument||b;return $.browser.safari||f.compatMode=='BackCompat'?f.body:f.documentElement})};$.fn.scrollTo=function(l,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};if(l=='max')l=9e9;a=$.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=$(k),d=l,p,g={},q=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(d)){d=n(d);break}d=$(d,this);case'object':if(d.is||d.style)p=(d=$(d)).offset()}$.each(a.axis.split(''),function(b,h){var f=h=='x'?'Left':'Top',i=f.toLowerCase(),c='scroll'+f,r=k[c],s=h=='x'?'Width':'Height';if(p){g[c]=p[i]+(q?0:r-o.offset()[i]);if(a.margin){g[c]-=parseInt(d.css('margin'+f))||0;g[c]-=parseInt(d.css('border'+f+'Width'))||0}g[c]+=a.offset[i]||0;if(a.over[i])g[c]+=d[s.toLowerCase()]()*a.over[i]}else g[c]=d[i];if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],u(s));if(!b&&a.queue){if(r!=g[c])t(a.onAfterFirst);delete g[c]}});t(a.onAfter);function t(b){o.animate(g,j,a.easing,b&&function(){b.call(this,l,a)})};function u(b){var h='scroll'+b;if(!q)return k[h];var f='client'+b,i=k.ownerDocument.documentElement,c=k.ownerDocument.body;return Math.max(i[h],c[h])-Math.min(i[f],c[f])}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
;(function($){var a='serialScroll',b='.'+a,c='bind',C=$[a]=function(b){$.scrollTo.window()[a](b)};C.defaults={duration:1e3,axis:'x',event:'click',start:0,step:1,lock:1,cycle:1,constant:1};$.fn[a]=function(y){y=$.extend({},C.defaults,y);var z=y.event,A=y.step,B=y.lazy;return this.each(function(){var j=y.target?this:document,k=$(y.target||this,j),l=k[0],m=y.items,o=y.start,p=y.interval,q=y.navigation,r;if(!B)m=w();if(y.force)t({},o);$(y.prev||[],j)[c](z,-A,s);$(y.next||[],j)[c](z,A,s);if(!l.ssbound)k[c]('prev'+b,-A,s)[c]('next'+b,A,s)[c]('goto'+b,t);if(p)k[c]('start'+b,function(e){if(!p){v();p=1;u()}})[c]('stop'+b,function(){v();p=0});k[c]('notify'+b,function(e,a){var i=x(a);if(i>-1)o=i});l.ssbound=1;if(y.jump)(B?k:w())[c](z,function(e){t(e,x(e.target))});if(q)q=$(q,j)[c](z,function(e){e.data=Math.round(w().length/q.length)*q.index(this);t(e,this)});function s(e){e.data+=o;t(e,this)};function t(e,a){if(!isNaN(a)){e.data=a;a=l}var c=e.data,n,d=e.type,f=y.exclude?w().slice(0,-y.exclude):w(),g=f.length,h=f[c],i=y.duration;if(d)e.preventDefault();if(p){v();r=setTimeout(u,y.interval)}if(!h){n=c<0?0:n=g-1;if(o!=n)c=n;else if(!y.cycle)return;else c=g-n-1;h=f[c]}if(!h||d&&o==c||y.lock&&k.is(':animated')||d&&y.onBefore&&y.onBefore.call(a,e,h,k,w(),c)===!1)return;if(y.stop)k.queue('fx',[]).stop();if(y.constant)i=Math.abs(i/A*(o-c));k.scrollTo(h,i,y).trigger('notify'+b,[c])};function u(){k.trigger('next'+b)};function v(){clearTimeout(r)};function w(){return $(m,l)};function x(a){if(!isNaN(a))return a;var b=w(),i;while((i=b.index(a))==-1&&a!=l)a=a.parentNode;return i}})}})(jQuery);


/* innerfade 2008-02-14*/
(function($) {$.fn.innerfade = function(options) {return this.each(function() {   $.innerfade(this, options);});};$.innerfade = function(container, options) {var settings = {'animationtype':    'fade','speed': 'normal','type': 'sequence','timeout': 2000,'containerheight': 'auto','runningclass':  'innerfade','children': null};if (options)$.extend(settings, options);if (settings.children === null)var elements = $(container).children();else var elements = $(container).children(settings.children);if (elements.length > 1) {$(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);for (var i = 0; i < elements.length; i++) {$(elements[i]).css('z-index', String(elements.length-i)).css('position', 'absolute').hide();};if (settings.type == "sequence") {setTimeout(function() {$.innerfade.next(elements, settings, 1, 0);}, settings.timeout);$(elements[0]).show();} else if (settings.type == "random") {var last = Math.floor ( Math.random () * ( elements.length ) );setTimeout(function() {do { current = Math.floor ( Math.random ( ) * ( elements.length ) );} while (last == current ); $.innerfade.next(elements, settings, current, last);}, settings.timeout);
$(elements[last]).show();} else if ( settings.type == 'random_start' ) {settings.type = 'sequence';var current = Math.floor ( Math.random () * ( elements.length ) );setTimeout(function(){$.innerfade.next(elements, settings, (current + 1) %  elements.length, current);}, settings.timeout);$(elements[current]).show();}	else {alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');}}};$.innerfade.next = function(elements, settings, current, last) {if (settings.animationtype == 'slide') {$(elements[last]).slideUp(settings.speed);$(elements[current]).slideDown(settings.speed);} else if (settings.animationtype == 'fade') {$(elements[last]).fadeOut(settings.speed);$(elements[current]).fadeIn(settings.speed, function() {removeFilter($(this)[0]);});} else alert('Innerfade-animationtype must either be \'slide\' or \'fade\'');if (settings.type == "sequence") {if ((current + 1) < elements.length) {current = current + 1;last = current - 1;} else {current = 0;last = elements.length - 1;}} else if (settings.type == "random") {last = current;while (current == last) current = Math.floor(Math.random() * elements.length);} else alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');setTimeout((function() {$.innerfade.next(elements, settings, current, last);}), settings.timeout);};})(jQuery);function removeFilter(element) {if(element.style.removeAttribute){element.style.removeAttribute('filter');}}

/* jQuery (PNG Fix) v1.2 */
(function($) {$.fn.pngfix = function(options) {var elements = this;var settings = $.extend({imageFixSrc: false,sizingMethod: false }, options);if(!$.browser.msie || ($.browser.msie &&  $.browser.version >= 7)) {return(elements);}function setFilter(el, path, mode) {var fs = el.attr("filters");var alpha = "DXImageTransform.Microsoft.AlphaImageLoader";if (fs[alpha]) {fs[alpha].enabled = true;fs[alpha].src = path; fs[alpha].sizingMethod = mode;} else {el.css("filter", 'progid:' + alpha + '(enabled="true", sizingMethod="' + mode + '", src="' + path + '")');	}}function setDOMElementWidth(el) {if(el.css("width") == "auto" & el.css("height") == "auto") {el.css("width", el.attr("offsetWidth") + "px");}}return(elements.each(function() {var el = $(this);if(el.attr("tagName").toUpperCase() == "IMG" && (/\.png/i).test(el.attr("src"))) {if(!settings.imageFixSrc) {el.wrap("<span></span>");var par = el.parent();par.css({height: 	el.height(),width: 		el.width(),display: 	"inline-block"});setFilter(par, el.attr("src"), "scale");el.remove();} else if((/\.gif/i).test(settings.imageFixSrc)) {setDOMElementWidth(el);setFilter(el, el.attr("src"), "image");el.attr("src", settings.imageFixSrc);}} else {var bg = new String(el.css("backgroundImage"));var matches = bg.match(/^url\("(.*)"\)$/);if(matches && matches.length) {setDOMElementWidth(el);el.css("backgroundImage", "none");var sc = "crop";if(settings.sizingMethod) {sc = settings.sizingMethod;} setFilter(el, matches[1], sc);el.find("a").each(function() {$(this).css("position", "relative");});}}}));}})(jQuery);

/* // STYLESWICTH //*/
function setActiveStyleSheet(title) {var i, a, main;for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {a.disabled = true;if(a.getAttribute("title") == title) a.disabled = false;}}}
function getActiveStyleSheet() {var i, a;for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
}return null;}
function getPreferredStyleSheet() {var i, a;for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("rel").indexOf("alt") == -1 && a.getAttribute("title")) return a.getAttribute("title");}return null;}

/* // Accordion 1.6 // */
;(function($) {$.ui = $.ui || {};$.fn.extend({accordion: function(options, data) {var args = Array.prototype.slice.call(arguments, 1);return this.each(function() {if (typeof options == "string") {var accordion = $.data(this, "ui-accordion");accordion[options].apply(accordion, args);} else if (!$(this).is(".ui-accordion"))$.data(this, "ui-accordion", new $.ui.accordion(this, options));});},activate: function(index) {return this.accordion("activate", index);}});$.ui.accordion = function(container, options) {this.options = options = $.extend({}, $.ui.accordion.defaults, options);this.element = container;$(container).addClass("ui-accordion");if ( options.navigation ) {var current = $(container).find("a").filter(options.navigationFilter);if ( current.length ) {if ( current.filter(options.header).length ) {options.active = current;} else {options.active = current.parent().parent().prev();current.addClass("current");}}}options.headers = $(container).find(options.header);options.active = findActive(options.headers, options.active);if ( options.fillSpace ) {var maxHeight = $(container).parent().height();options.headers.each(function() {maxHeight -= $(this).outerHeight();});var maxPadding = 0;options.headers.next().each(function() {maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());}).height(maxHeight - maxPadding);} else if ( options.autoheight ) {var maxHeight = 0;options.headers.next().each(function() {maxHeight = Math.max(maxHeight, $(this).outerHeight());}).height(maxHeight);}options.headers.not(options.active || "").next().hide();options.active.parent().andSelf().addClass(options.selectedClass);if (options.event)$(container).bind((options.event) + ".ui-accordion", clickHandler);};$.ui.accordion.prototype = {activate: function(index) {clickHandler.call(this.element, {target: findActive( this.options.headers, index )[0]});},
enable: function() {this.options.disabled = false;},disable: function() {this.options.disabled = true;},destroy: function() {this.options.headers.next().css("display", "");if ( this.options.fillSpace || this.options.autoheight ) {this.options.headers.next().css("height", "");}$.removeData(this.element, "ui-accordion");$(this.element).removeClass("ui-accordion").unbind(".ui-accordion");}}
function scopeCallback(callback, scope) {return function() {return callback.apply(scope, arguments);};}function completed(cancel) {if (!$.data(this, "ui-accordion"))return;var instance = $.data(this, "ui-accordion");var options = instance.options;options.running = cancel ? 0 : --options.running;if ( options.running )return;if ( options.clearStyle ) {options.toShow.add(options.toHide).css({height: "",overflow: ""});}$(this).triggerHandler("change.ui-accordion", [options.data], options.change);}function toggle(toShow, toHide, data, clickedActive, down) {var options = $.data(this, "ui-accordion").options;options.toShow = toShow;options.toHide = toHide;options.data = data;var complete = scopeCallback(completed, this);options.running = toHide.size() == 0 ? toShow.size() : toHide.size();if ( options.animated ) {if ( !options.alwaysOpen && clickedActive ) {$.ui.accordion.animations[options.animated]({toShow: jQuery([]),toHide: toHide,complete: complete,down: down,autoheight: options.autoheight});} else {$.ui.accordion.animations[options.animated]({toShow: toShow,toHide: toHide,complete: complete,down: down,autoheight: options.autoheight});}} else {if ( !options.alwaysOpen && clickedActive ) {toShow.toggle();} else {toHide.hide();toShow.show();}complete(true);}}function clickHandler(event) {var options = $.data(this, "ui-accordion").options;if (options.disabled)return false;if ( !event.target && !options.alwaysOpen ) {options.active.parent().andSelf().toggleClass(options.selectedClass);var toHide = options.active.next(),data = {instance: this,options: options,newHeader: jQuery([]),oldHeader: options.active,newContent: jQuery([]),oldContent: toHide},toShow = options.active = $([]);toggle.call(this, toShow, toHide, data );return false;}var clicked = $(event.target);if ( clicked.parents(options.header).length )while ( !clicked.is(options.header) )clicked = clicked.parent();var clickedActive = clicked[0] == options.active[0];if (options.running || (options.alwaysOpen && clickedActive))return false;if (!clicked.is(options.header))return;options.active.parent().andSelf().toggleClass(options.selectedClass);if ( !clickedActive ) {clicked.parent().andSelf().addClass(options.selectedClass);}var toShow = clicked.next(),toHide = options.active.next(),data = {instance: this,options: options,newHeader: clicked,oldHeader: options.active,newContent: toShow,oldContent: toHide},down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );options.active = clickedActive ? $([]) : clicked;toggle.call(this, toShow, toHide, data, clickedActive, down );return false;};function findActive(headers, selector) {return selector != undefined ? typeof selector == "number" ? headers.filter(":eq(" + selector + ")") : headers.not(headers.not(selector)) : selector === false ? $([]) : headers.filter(":eq(0)");}$.extend($.ui.accordion, {defaults: {selectedClass: "selected",alwaysOpen: true,animated: 'slide',event: "click",header: "a",autoheight: true,running: 0,navigationFilter: function() {return this.href.toLowerCase() == location.href.toLowerCase();}},animations: {slide: function(options, additions) {options = $.extend({easing: "swing",duration: 300}, options, additions);if ( !options.toHide.size() ) {options.toShow.animate({height: "show"}, options);return;}var hideHeight = options.toHide.height(),showHeight = options.toShow.height(),difference = showHeight / hideHeight;options.toShow.css({ height: 0, overflow: 'hidden' }).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step: function(now) {var current = (hideHeight - now) * difference;if ($.browser.msie || $.browser.opera) {current = Math.ceil(current);}options.toShow.height( current );},duration: options.duration,easing: options.easing,complete: function() {if ( !options.autoheight ) {options.toShow.css("height", "auto");}options.complete();}});},bounceslide: function(options) {this.slide(options, {easing: options.down ? "bounceout" : "swing",duration: options.down ? 1000 : 200});},easeslide: function(options) {this.slide(options, {easing: "easeinout",duration: 700})}}});})(jQuery);

/*jHelperTip 1.0*/
(function($) {$.fn.jHelperTip = function(options) {var opts = $.extend({}, $.fn.jHelperTip.defaults, options);if ($(opts.ttC).length == 0)$('<div id="'+opts.ttC.slice(1)+'"></div>').appendTo("body");if ($(opts.dC).length == 0)$('<div id="'+opts.dC.slice(1)+'"></div>').appendTo("body");if ($(opts.aC).length == 0)$('<div id="'+opts.aC.slice(1)+'"></div>').appendTo("body");$(opts.ttC).add(opts.aC).css({position: "absolute",display: "inline"}).hide();$(opts.dC).hide();var closeBox = function(){if (opts.source == "attribute")$(opts.aC).hide().empty();else $(opts.ttC).hide().empty();};$(".jHelperTipClose").bind("click", closeBox);$(opts.ttC).bind("mouseover",function(){$(opts.ttC).show();return false;});var getData = function(obj,e){if (opts.source == "ajax") {getPosition(e);$(opts.ttC).html('<div><img src="'+opts.loadingImg+'"/> '+opts.loadingText+'</div>').show();$.ajax({type: opts.type,url: opts.url,data: opts.data,success: function(msg){$(opts.ttC).html(msg);$(".jHelperTipClose").unbind("click", closeBox); $(".jHelperTipClose").bind("click", closeBox);}});}else if (opts.source == "container"){$(opts.ttC).show().empty();$(opts.dC).clone(true).show().appendTo(opts.ttC);}if (opts.source == "attribute"){$(opts.aC).html($(obj).attr(opts.attrName));}};var getPosition = function (e){var top = e.pageY+opts.topOff;var left = e.pageX+opts.leftOff;if (opts.source == "attribute"){$(opts.aC).css({top: top,left: left,opacity: opts.opacity}).show();}else {$(opts.ttC).css({top: top,left: left,opacity: opts.opacity}).show();}};if (opts.trigger == "hover") {$(this).bind("mouseover", function(e){e.preventDefault();getData(this, e);return false;});$(this).bind("mousemove", function(e){getPosition(e);return false;});$(this).bind("mouseout", function(e){if (opts.source == "attribute")$(opts.aC).hide().empty();else $(opts.ttC).hide().empty();return false;});}else if (opts.trigger == "click") {$(this).bind("click", function(e){getData(this, e);getPosition(e);$(document).bind("click", function(e){if (opts.autoClose) {if (opts.source == "attribute")$(opts.aC).hide().empty();else $(opts.ttC).hide().empty();}});return false;});}};$.fn.jHelperTip.defaults = {trigger: "click",topOff: 3,leftOff: 10,source: "container", attrName: '',ttC: "#jHelperTipContainer", dC: "#jHelperTipDataContainer", aC: "#jHelperTipAttrContainer", opacity:  1.0,loadingImg: "ajax-loader.gif",loadingText: "Loading...",type: "GET",autoClose: true};})(jQuery);

// jquery.event.hover.js - rev 5 
;(function($){ $.fn._hover = $.fn.hover;$.fn.hover = function( fn1, fn2, fn3 ) {if ( fn3 ) this.bind('hoverstart', fn1 ); if ( fn2 ) this.bind('hoverend', fn3 ? fn3 : fn2 ); return !fn1 ? this.trigger('hover') : this.bind('hover', fn3 ? fn2 : fn1 ); };	var hover = $.event.special.hover = {delay: 100,speed: 100, setup: function( data ){data = $.extend({ speed: hover.speed, delay: hover.delay, hovered:0 }, data||{} );$.event.add( this, "mouseenter mouseleave", hoverHandler, data );},teardown: function(){$.event.remove( this, "mouseenter mouseleave", hoverHandler );}};function hoverHandler( event ){var data = event.data || event;switch ( event.type ){case 'mouseenter': data.dist2 = 0; data.event = event; event.type = "hoverstart"; if ( $.event.handle.call( this, event )!==false ){ data.elem = this; $.event.add( this, "mousemove", hoverHandler, data );data.timer = setTimeout( compare, data.delay ); }break;case 'mousemove': data.dist2 += Math.pow( event.pageX-data.event.pageX, 2 ) + Math.pow( event.pageY-data.event.pageY, 2 ); data.event = event; break;case 'mouseleave': clearTimeout( data.timer ); if ( data.hovered ){ event.type = "hoverend"; $.event.handle.call( this, event ); data.hovered--; }else $.event.remove( data.elem, "mousemove", hoverHandler ); break;default: if ( data.dist2  <= Math.pow( data.speed*( data.delay/1e3 ), 2 ) ){ $.event.remove( data.elem, "mousemove", hoverHandler ); data.hovered++; data.event.type = "hover"; if ( $.event.handle.call( data.elem, data.event ) === false ) data.hovered--; }else data.timer = setTimeout( compare, data.delay ); data.dist2 = 0; break;}function compare(){ hoverHandler( data ); }; };})(jQuery);


/*jPrintArea 1.0.0*/
jQuery.jPrintArea=function(el)
{var iframe=document.createElement('IFRAME');var doc=null;$(iframe).attr('style','position:absolute;width:0px;height:0px;left:-500px;top:-500px;');document.body.appendChild(iframe);doc=iframe.contentWindow.document;var links=window.document.getElementsByTagName('link');
for(var i=0;i<links.length;i++)
if(links[i].rel.toLowerCase()=='stylesheet')
doc.write('<link type="text/css" rel="stylesheet" href="'+links[i].href+'"></link>');doc.write('<div class="'+$(el).attr("class")+'">'+$(el).html()+'</div>');doc.close();iframe.contentWindow.focus();iframe.contentWindow.print();
//alert('Printing...');
wait(1);document.body.removeChild(iframe);
}

/**
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
* Author: Drew Diller
* Email: drew.diller@gmail.com
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
* Version: 0.0.8a
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
*
* Example usage:
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
**/
if($.browser.version.substr(0,3)=="6.0") {
var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();}

/**
 * jQuery[a] - Animated scrolling of series
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 3/20/2008
 * @author Ariel Flesler
 * @version 1.2.1
 *
 * http://flesler.blogspot.com/2008/02/jqueryserialscroll.html
 */
;(function($){var a='serialScroll',b='.'+a,c='bind',C=$[a]=function(b){$.scrollTo.window()[a](b)};C.defaults={duration:1e3,axis:'x',event:'click',start:0,step:1,lock:1,cycle:1,constant:1};$.fn[a]=function(y){y=$.extend({},C.defaults,y);var z=y.event,A=y.step,B=y.lazy;return this.each(function(){var j=y.target?this:document,k=$(y.target||this,j),l=k[0],m=y.items,o=y.start,p=y.interval,q=y.navigation,r;if(!B)m=w();if(y.force)t({},o);$(y.prev||[],j)[c](z,-A,s);$(y.next||[],j)[c](z,A,s);if(!l.ssbound)k[c]('prev'+b,-A,s)[c]('next'+b,A,s)[c]('goto'+b,t);if(p)k[c]('start'+b,function(e){if(!p){v();p=1;u()}})[c]('stop'+b,function(){v();p=0});k[c]('notify'+b,function(e,a){var i=x(a);if(i>-1)o=i});l.ssbound=1;if(y.jump)(B?k:w())[c](z,function(e){t(e,x(e.target))});if(q)q=$(q,j)[c](z,function(e){e.data=Math.round(w().length/q.length)*q.index(this);t(e,this)});function s(e){e.data+=o;t(e,this)};function t(e,a){if(!isNaN(a)){e.data=a;a=l}var c=e.data,n,d=e.type,f=y.exclude?w().slice(0,-y.exclude):w(),g=f.length,h=f[c],i=y.duration;if(d)e.preventDefault();if(p){v();r=setTimeout(u,y.interval)}if(!h){n=c<0?0:n=g-1;if(o!=n)c=n;else if(!y.cycle)return;else c=g-n-1;h=f[c]}if(!h||d&&o==c||y.lock&&k.is(':animated')||d&&y.onBefore&&y.onBefore.call(a,e,h,k,w(),c)===!1)return;if(y.stop)k.queue('fx',[]).stop();if(y.constant)i=Math.abs(i/A*(o-c));k.scrollTo(h,i,y).trigger('notify'+b,[c])};function u(){k.trigger('next'+b)};function v(){clearTimeout(r)};function w(){return $(m,l)};function x(a){if(!isNaN(a))return a;var b=w(),i;while((i=b.index(a))==-1&&a!=l)a=a.parentNode;return i}})}})(jQuery);

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// 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;
	}
});