(function($){
	/* hoverIntent by Brian Cherne */
	$.fn.hoverIntent = function(f,g) {
		// default configuration options
		var cfg = {
			sensitivity: 7,
			interval: 100,
			timeout: 0
		};
		// override configuration options with user supplied object
		cfg = $.extend(cfg, g ? { over: f, out: g } : f );

		// instantiate variables
		// cX, cY = current X and Y position of mouse, updated by mousemove event
		// pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
		var cX, cY, pX, pY;

		// A private function for getting mouse position
		var track = function(ev) {
			cX = ev.pageX;
			cY = ev.pageY;
		};

		// A private function for comparing current and previous mouse position
		var compare = function(ev,ob) {
			ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
			// compare mouse positions to see if they've crossed the threshold
			if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
				$(ob).unbind("mousemove",track);
				// set hoverIntent state to true (so mouseOut can be called)
				ob.hoverIntent_s = 1;
				return cfg.over.apply(ob,[ev]);
			} else {
				// set previous coordinates for next time
				pX = cX; pY = cY;
				// use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
				ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
			}
		};

		// A private function for delaying the mouseOut function
		var delay = function(ev,ob) {
			ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
			ob.hoverIntent_s = 0;
			return cfg.out.apply(ob,[ev]);
		};

		// A private function for handling mouse 'hovering'
		var handleHover = function(e) {
			// next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
			var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
			while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
			if ( p == this ) { return false; }

			// copy objects to be passed into t (required for event object to be passed in IE)
			var ev = jQuery.extend({},e);
			var ob = this;

			// cancel hoverIntent timer if it exists
			if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }

			// else e.type == "onmouseover"
			if (e.type == "mouseover") {
				// set "previous" X and Y position based on initial entry point
				pX = ev.pageX; pY = ev.pageY;
				// update "current" X and Y position based on mousemove
				$(ob).bind("mousemove",track);
				// start polling interval (self-calling timeout) to compare mouse coordinates over time
				if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}

			// else e.type == "onmouseout"
			} else {
				// unbind expensive mousemove event
				$(ob).unbind("mousemove",track);
				// if hoverIntent state is true, then call the mouseOut function after the specified delay
				if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
			}
		};

		// bind the function to the two event listeners
		return this.mouseover(handleHover).mouseout(handleHover);
	};
	
})(jQuery);/*
 * jQuery UI Accordion 1.6
 * 
 * Copyright (c) 2007 Jörn Zaefferer
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.accordion.js 4876 2008-03-08 11:49:04Z joern.zaefferer $
 *
 */

;(function($) {
	
// If the UI scope is not available, add it
$.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);
			// INIT with optional options
			} else if (!$(this).is(".ui-accordion"))
				$.data(this, "ui-accordion", new $.ui.accordion(this, options));
		});
	},
	// deprecated, use accordion("activate", index) instead
	activate: function(index) {
		return this.accordion("activate", index);
	}
});

$.ui.accordion = function(container, options) {
	
	// setup configuration
	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");
			}
		}
	}
	
	// calculate active if not specified, using the first header
	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) {
		// call clickHandler with custom event
		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 removed while animated data can be empty
	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);
	
	// count elements to animate
	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;
	
	// called only when using activate(false) to close all parts programmatically
	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;
	}
	// get the click target
	var clicked = $(event.target);
	
	// due to the event delegation model, we have to check if one
	// of the parent elements is our actual header, and find that
	if ( clicked.parents(options.header).length )
		while ( !clicked.is(options.header) )
			clicked = clicked.parent();
	
	var clickedActive = clicked[0] == options.active[0];
	
	// if animations are still active, or the active header is the target, ignore click
	if (options.running || (options.alwaysOpen && clickedActive))
		return false;
	if (!clicked.is(options.header))
		return;

	// switch classes
	options.active.parent().andSelf().toggleClass(options.selectedClass);
	if ( !clickedActive ) {
		clicked.parent().andSelf().addClass(options.selectedClass);
	}

	// find elements to show and hide
	var toShow = clicked.next(),
		toHide = options.active.next(),
		//data = [clicked, options.active, toShow, toHide],
		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);
﻿;(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;}
$.fn._fadeIn=$.fn.fadeIn;var setExpr=(function(){if(!$.browser.msie)return false;var div=document.createElement('div');try{div.style.setExpression('width','0+0');}
catch(e){return false;}
return true;})();$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title)$m.append('<h1>'+title+'</h1>');if(message)$m.append('<h2>'+message+'</h2>');if(timeout==undefined)timeout=3000;$.blockUI({message:$m,fadeIn:700,fadeOut:1000,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,'position')=='static')
this.style.position='relative';if($.browser.msie)
this.style.zoom=1;install(this,opts);});};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts);});};$.blockUI.version=2.20;$.blockUI.defaults={message:'<h1>Please wait...</h1>',css:{padding:0,margin:0,width:'30%',top:'40%',left:'35%',textAlign:'center',color:'#000',border:'3px solid #aaa',backgroundColor:'#fff',cursor:'wait','-webkit-border-radius': '10px','-moz-border-radius': '10px'},overlayCSS:{backgroundColor:'#000',opacity:0.6,cursor:'wait'},growlCSS:{width:'350px',top:'10px',left:'',right:'10px',border:'none',padding:'5px',opacity:0.6,cursor:null,color:'#fff',backgroundColor:'#000','-webkit-border-radius':'10px','-moz-border-radius':'10px'},iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank',forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);var pageBlock=null;var pageBlockEls=[];function install(el,opts){var full=(el==window);var msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock)
remove(window,{fadeOut:0});if(msg&&typeof msg!='string'&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data('blockUI.history',data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent)
data.parent.removeChild(node);}
var z=opts.baseZ;var lyr1=($.browser.msie||opts.forceIframe)?$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>');var lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var lyr3=full?$('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>'):$('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');if(msg)
lyr3.css(css);if(!opts.applyPlatformOpacityRules||!($.browser.mozilla&&/Linux/.test(navigator.platform)))
lyr2.css(opts.overlayCSS);lyr2.css('position',full?'fixed':'absolute');if($.browser.msie||opts.forceIframe)
lyr1.css('opacity',0.0);$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full?'body':el);var expr=$.browser.msie&&($.browser.version<8||!$.boxModel)&&(!$.boxModel||$('object,embed',full?null:el).length>0);if(ie6||(expr&&setExpr)){if(full&&opts.allowBodyStretch&&$.boxModel)
$('html,body').css('height','100%');if((ie6||!$.boxModel)&&!full){var t=sz(el,'borderTopWidth'),l=sz(el,'borderLeftWidth');var fixT=t?'(0 - '+t+')':0;var fixL=l?'(0 - '+l+')':0;}
$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position='absolute';if(i<2){full?s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression('height','this.parentNode.offsetHeight + "px"');full?s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression('width','this.parentNode.offsetWidth + "px"');if(fixL)s.setExpression('left',fixL);if(fixT)s.setExpression('top',fixT);}
else if(opts.centerY){if(full)s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0;}
else if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top):0;var expression='((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';s.setExpression('top',expression);}});}
if(msg){lyr3.append(msg);if(msg.jquery||msg.nodeType)
$(msg).show();}
if(($.browser.msie||opts.forceIframe)&&opts.showOverlay)
lyr1.show();if(opts.fadeIn){if(opts.showOverlay)
lyr2._fadeIn(opts.fadeIn);if(msg)
lyr3.fadeIn(opts.fadeIn);}
else{if(opts.showOverlay)
lyr2.show();if(msg)
lyr3.show();}
bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(':input:enabled:visible',pageBlock);if(opts.focusInput)
setTimeout(focus,20);}
else
center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts);},opts.timeout);$(el).data('blockUI.timeout',to);}};function remove(el,opts){var full=el==window;var $el=$(el);var data=$el.data('blockUI.history');var to=$el.data('blockUI.timeout');if(to){clearTimeout(to);$el.removeData('blockUI.timeout');}
opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els=full?$('body').children().filter('.blockUI'):$('.blockUI',el);if(full)
pageBlock=pageBlockEls=null;if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el);},opts.fadeOut);}
else
reset(els,data,opts,el);};function reset(els,data,opts,el){els.each(function(i,o){if(this.parentNode)
this.parentNode.removeChild(this);});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;if(data.parent)
data.parent.appendChild(data.el);$(data.el).removeData('blockUI.history');}
if(typeof opts.onUnblock=='function')
opts.onUnblock(el,opts);};function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data('blockUI.isBlocked')))
return;if(!full)
$el.data('blockUI.isBlocked',b);if(!opts.bindEvents||(b&&!opts.showOverlay))
return;var events='mousedown mouseup keydown keypress';b?$(document).bind(events,opts,handler):$(document).unbind(events,handler);};function handler(e){if(e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target==els[els.length-1];var back=e.shiftKey&&e.target==els[0];if(fwd||back){setTimeout(function(){focus(back)},10);return false;}}}
if($(e.target).parents('div.blockMsg').length>0)
return true;return $(e.target).parents().children().filter('div.blockUI').length==0;};function focus(back){if(!pageBlockEls)
return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e)
e.focus();};function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,'borderLeftWidth');var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,'borderTopWidth');if(x)s.left=l>0?(l+'px'):'0';if(y)s.top=t>0?(t+'px'):'0';};function sz(el,p){return parseInt($.css(el,p))||0;};})(jQuery);var is={ie:navigator.appName=='Microsoft Internet Explorer',java:navigator.javaEnabled(),ns:navigator.appName=='Netscape',ua:navigator.userAgent.toLowerCase(),version:parseFloat(navigator.appVersion.substr(21))||parseFloat(navigator.appVersion),win:navigator.platform=='Win32'}
is.mac=is.ua.indexOf('mac')>=0;if(is.ua.indexOf('opera')>=0){is.ie=is.ns=false;is.opera=true;}
if(is.ua.indexOf('gecko')>=0){is.ie=is.ns=false;is.gecko=true;}/*
 * Linkselect jQuery Plug-in
 *
 * Copyright 2008 Giva, Inc. (http://www.givainc.com/labs/) 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * 	http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Date: 2009-02-10
 * Rev:  1.2.06
 */
(function(A){A.linkselect={version:"1.2.06"};A.fn.linkselect=function(E){var F=typeof arguments[0]=="string"&&arguments[0];var D=F&&Array.prototype.slice.call(arguments,1)||arguments;if(F&&this.length){var C=A.data(this[0],"linkselect");if(F.toLowerCase()=="object"){return C}else{if(C[F]){var B;this.each(function(G){var H=A.data(this,"linkselect")[F].apply(C,D);if(G==0&&H){if(!!H.jquery){B=A([]).add(H)}else{B=H;return false}}else{if(!!H&&!!H.jquery){B=B.add(H)}}});return B||this}else{return this}}}else{return this.each(function(){new A.LinkSelect(this,E)})}};A.LinkSelect=function(k,R){R=A.extend({},A.LinkSelect.defaults,R);var J=this,f=k,l=A(k),W={},Y=false,L=0,X,F=false;this.id=l.attr("id");this.val=function(p,o){if(arguments.length>0){h(p,o);return K}else{return Z.val()}};this.focus=function(){setTimeout(function(){K.focus()},1);return K};this.blur=function(){setTimeout(function(){K.blur()},1);return K};this.open=function(p,o){if(Y){return K}A(document).triggerHandler("click.linkselect");if(o!==false){K.trigger("focus")}setTimeout(function(){g(p)},1);return K};this.disable=function(o){Y=o;K.parent().find("span."+R.classDisabled).remove();K[Y?"hide":"show"]();if(Y){K.after('<span class="'+R.classDisabled+'">'+K.html()+"</span>")}return K};this.replaceOptions=function(o,p){l.children("option").remove();A.each(o,function(q){var r=A("<option/>").attr("value",this.value).html(this.text);if(this.selected==true){r.attr("selected","selected")}if(this.className){r.addClass(this.className)}r.appendTo(l)});O();C();Q().trigger("click.linkselect",[true,p])};var a=m();l.after(a).remove();var Z=a.filter("input");var K=a.filter("a");var H=a.filter("div");var P=a.find(".scrollable");var I=a.find(".title");var S=H.find("ul");var U;Z.addClass(l.attr("className"));A.data(Z[0],"linkselect",this);H.appendTo("body").bind("mousemove.linkselect",function(o){U=o});function C(){S.find("li").bind("mouseover.linkselect",function(o){if(U&&U.type=="keydown"){return }d(A(this));U=o}).bind("click.linkselect",function(t,p,s){t.preventDefault();var o=Q().removeClass(R.classSelected);var q=A(this).addClass(R.classSelected);var r=q.attr("rel")||"";var u=q.find("."+R.classValue).html();G(p);if((s!==false)&&((A.isFunction(R.change)&&(R.change.apply(J,[this,r,u,s])===false))||(A.isFunction(l[0].onchange)&&(l[0].onchange.apply(J,[this,r,u,s])===false)))){o.addClass(R.classSelected);q.removeClass(R.classSelected);return }Z.val(r);K.html(u)[(p!==true)?"trigger":"triggerHandler"]("focus",[p]);if(Y){K.parent().find("span."+R.classDisabled).html(u)}})}C();K.bind("click.linkselect",function(o){o.preventDefault();e();if(A.browser.msie){setTimeout(function(){K.trigger("focus.linkselect")},0)}}).bind("focus.linkselect",function(p,o){if(!H.is(":visible")&&(o!==true)){K.addClass(R.classLinkFocus)}}).bind("blur.linkselect",function(o){if(n(o)){G()}K.removeClass(R.classLinkFocus)}).bind((A.browser.safari?"keydown":"keypress")+".linkselect",function(t,s){if(!!s){var t=s}var p=t.keyCode||t.charCode,r=String.fromCharCode(p).toLowerCase();switch(p){case 38:case 40:t.preventDefault();b((p==38)?-1:1);U=t;break;case 13:t.preventDefault();if(H.is(":visible")){H.find("li."+R.classCurrent).trigger("click.linkselect")}else{K.trigger("click.linkselect")}break;case 9:case 27:G();break;case 35:t.preventDefault();M();U=t;break;case 36:t.preventDefault();V();U=t;break;case 33:case 34:t.preventDefault();var o=H.is(":visible");if(!o){H.show()}var q=parseInt(P.height()/S.find("li:first").outerHeight(),10);if(!o){H.hide()}b((p==33)?q*-1:q);break}if(r!=X){L=0}X=r;if(typeof W[r]!="undefined"){if(L>=W[r].length){L=0}S.find("#"+J.id+"_li_"+W[r][L]).trigger("click.linkselect");t.preventDefault();t.stopPropagation();L++}});if(A.browser.msie){K.bind("keydown.linkselect",function(o){if(",8,9,33,34,35,36,37,38,39,40,".indexOf(","+o.keyCode+",")>-1){return A(this).triggerHandler("keypress.linkselect",[o])}})}A(document).bind("click.linkselect",function(o){if((o.target!==K[0])&&(o.target!==P[0])&&H.is(":visible")){G();K.removeClass(R.classLinkFocus)}});A(window).resize(function(){if(F){N(K,H,true)}});function m(){var t=J.id;var s=l.attr("title");var r=f.selectedIndex==-1?"":f[f.selectedIndex].text;var q=f.selectedIndex==-1?"":f[f.selectedIndex][(A.browser.msie&&A.browser.version<=7&&!(f[f.selectedIndex].attributes.value.specified))?"text":"value"];var p=l.attr("tabindex");var o=['<a href="#'+J.id+'" id="'+J.id+'_link" class="'+R.classLink+'"'+(p?' tabindex="'+p+'"':"")+">"+r+"</a>",'<input type="hidden" name="'+J.id+'" id="'+J.id+'" value="'+q+'" />','<div class="'+R.classContainer+'">',(s)?'<div class="title"><span>'+s+"</span></div>":"",'<div class="scrollable"><ul id="'+J.id+'_list">',i(l.children("option")),"</ul></div>","</div>"];return A(o.join(""))}function i(o){W=[];var p=[];o.each(function(s){var w=A(this);var u=w.is(":selected");var q=A.trim(w.text());var r='<span class="'+R.classValue+'">'+q+"</span>";var v=A.browser.msie&&A.browser.version<=7&&!(this.attributes.value.specified)?this.text:this.value;if(A.isFunction(R.format)){r=R.format.apply(J,[r,v,q,s,w,R])||r}var t=(q.length>1)?q.substring(0,1).toLowerCase():"";if(!W[t]){W[t]=[]}W[t].push(s);var x=A.trim(this.className+" "+(u?R.classSelected:""));p.push('<li id="'+J.id+"_li_"+s+'" rel="'+v+(x.length>0?'" class="'+x:"")+'">'+r+"</li>")});return p.join("")}function O(){E=false;H[0].style.width="";I[0].style.width="";I.css("float","");S.html(i(l.children("option")))}function h(q,p){var o=S.find("li[rel="+q+"]");if(o.length==0){o=S.find("li:eq(0)")}return o.trigger("click.linkselect",[true,p])}function Q(){var o=S.find("li.selected");if(o.length==0){o=S.find("li:eq(0)")}return o}function T(){var o=S.find("li.current");if(o.length==0){o=Q()}return o}function d(o){H.find(".current").removeClass(R.classCurrent);o.addClass(R.classCurrent);return o}function b(p){var o=T();var q=parseInt(o.attr("id").replace(/(.+)(_(\d+$))/gi,"$3"),10);D(q+p)}function D(r){var q=A("li",H),o;if(!q||q.length==0){return false}var p=T().removeClass(R.classCurrent);if(isNaN(r)||r<0){o=q.eq(0)}else{if(r>q.length-1){o=q.eq(q.length-1)}else{o=q.eq(r)}}if(H.is(":visible")){o.addClass(R.classCurrent);B(o)}else{if(p[0]!==o[0]){o.trigger("click.linkselect")}}}function V(){D(0)}function M(){D(l.children("option").length-1)}function B(p,o){var r=p[0];var t=P[0];var q={pTop:parseInt(P.css("paddingTop"),10)||0,pBottom:parseInt(P.css("paddingBottom"),10)||0,bTop:parseInt(P.css("borderTopWidth"),10)||0,bBottom:parseInt(P.css("borderBottomWidth"),10)||0};if((r.offsetTop+r.offsetHeight)>(t.scrollTop+t.clientHeight)){t.scrollTop=p.offset().top+(t.scrollTop-P.offset().top)-((t.clientHeight/((o==true)?2:1))-(p.outerHeight()+q.pBottom))}else{if(r.offsetTop-q.bTop-q.bBottom<=(t.scrollTop+q.pTop+q.pBottom)){t.scrollTop=p.offset().top+(t.scrollTop-P.offset().top)-q.pTop}}}function e(){if(H.is(":visible")){G()}else{g()}}var E=false;function g(u){var p=Q();K.removeClass(R.classLinkFocus).addClass(R.classLinkOpen);H.show();if(!E){var t=(K.css("display").indexOf("inline")>-1)?K.parent().outerWidth():K.outerWidth();var q=R.fixedWidth?t:H.width();if(q<t){q=t}var s=parseInt(P.css("max-height"),10);if(A.browser.msie&&A.browser.version<=6){if((s>0)&&(P.height()>s)){P.height(s)}}if(S.height()>s){q+=25}var r=parseInt("0"+H.css("max-width"),10);if((r>0)&&(q>r)){q=t=r}H.width(q);if(A.browser.safari){var o=H.width();if(t>o){q=t=o}}I.width(t);if(I.outerWidth()>t){I.width(t-(I.outerWidth()-t))}if(R.titleAlign.toLowerCase()=="right"&&!R.fixedWidth){I.css("float","right")}E=true}N(K,H,true);if(!!A.fn.bgIframe){H.bgIframe()}B(p,true);d(p);if(A.isFunction(R.open)){R.open.apply(this,[H,K,p,I])}if(A.isFunction(u)){u.apply(this,[H,K,p,I])}F=true}function G(o){if(o!==true){K.addClass(R.classLinkFocus).removeClass(R.classLinkOpen)}H.hide();if(A.isFunction(R.close)){R.close.apply(this,[H,K,$selected,I])}F=false}function c(o){var p=false;if(o.is(":hidden")){p=!!o.css("visibility","hidden").show()}var q=A.extend(o.offset(),{width:o.outerWidth(),height:o.outerHeight(),marginLeft:parseInt(A.curCSS(o[0],"marginLeft",true),10)||0,marginRight:parseInt(A.curCSS(o[0],"marginRight",true),10)||0,marginTop:parseInt(A.curCSS(o[0],"marginTop",true),10)||0,marginBottom:parseInt(A.curCSS(o[0],"marginBottom",true),10)||0});if(q.marginTop<0){q.top+=q.marginTop}if(q.marginLeft<0){q.left+=q.marginLeft}q.bottom=q.top+q.height;q.right=q.left+q.width;if(p){o.hide().css("visibility","visible")}return q}function N(s,o){var u=c(s);var t=j();var q=H.outerWidth()+u.left;if(q>t.x){u.left=(u.left-H.outerWidth())+I.outerWidth()}else{var r=H.outerWidth(),p=I.outerWidth();if(r>p){I.width(r-(p-I.width()))}}o.css({position:"absolute",top:u[R.yAxis],left:u.left});return u.bottom}function j(){var o={scrollLeft:A(window).scrollLeft(),scrollTop:A(window).scrollTop(),width:A("body").width(),height:A("body").height()};o.x=o.scrollLeft+o.width;o.y=o.scrollTop+o.height;return o}function n(o){return !("bubbles" in o||"cancelBubble" in o)}if(A.isFunction(R.init)){R.init.apply(this,[l,Z,K,H,P,I,S])}};A.LinkSelect.defaults={classLink:"linkselectLink",classLinkOpen:"linkselectLinkOpen",classLinkFocus:"linkselectLinkFocus",classContainer:"linkselectContainer",classSelected:"selected",classCurrent:"current",classDisabled:"linkselectDisabled",classValue:"linkselectValue",yAxis:"top",titleAlign:"right",fixedWidth:false,init:null,change:null,format:null,open:null,close:null}})(jQuery);﻿
(function($){var pasteEventName=($.browser.msie?'paste':'input')+".mask";var iPhone=(window.orientation!=undefined);$.mask={definitions:{'9':"[0-9]",'a':"[A-Za-z]",'*':"[A-Za-z0-9]"}};$.fn.extend({caret:function(begin,end){if(this.length==0)return;if(typeof begin=='number'){end=(typeof end=='number')?end:begin;return this.each(function(){if(this.setSelectionRange){this.focus();this.setSelectionRange(begin,end);}else if(this.createTextRange){var range=this.createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',begin);range.select();}});}else{if(this[0].setSelectionRange){begin=this[0].selectionStart;end=this[0].selectionEnd;}else if(document.selection&&document.selection.createRange){var range=document.selection.createRange();begin=0-range.duplicate().moveStart('character',-100000);end=begin+range.text.length;}
return{begin:begin,end:end};}},unmask:function(){return this.trigger("unmask");},mask:function(mask,settings){if(!mask&&this.length>0){var input=$(this[0]);var tests=input.data("tests");return $.map(input.data("buffer"),function(c,i){return tests[i]?c:null;}).join('');}
settings=$.extend({placeholder:"_",completed:null},settings);var defs=$.mask.definitions;var tests=[];var partialPosition=mask.length;var firstNonMaskPos=null;var len=mask.length;$.each(mask.split(""),function(i,c){if(c=='?'){len--;partialPosition=i;}else if(defs[c]){tests.push(new RegExp(defs[c]));if(firstNonMaskPos==null)
firstNonMaskPos=tests.length-1;}else{tests.push(null);}});return this.each(function(){var input=$(this);var buffer=$.map(mask.split(""),function(c,i){if(c!='?')return defs[c]?settings.placeholder:c});var ignore=false;var focusText=input.val();input.data("buffer",buffer).data("tests",tests);function seekNext(pos){while(++pos<=len&&!tests[pos]);return pos;};function shiftL(pos){while(!tests[pos]&&--pos>=0);for(var i=pos;i<len;i++){if(tests[i]){buffer[i]=settings.placeholder;var j=seekNext(i);if(j<len&&tests[i].test(buffer[j])){buffer[i]=buffer[j];}else
break;}}
writeBuffer();input.caret(Math.max(firstNonMaskPos,pos));};function shiftR(pos){for(var i=pos,c=settings.placeholder;i<len;i++){if(tests[i]){var j=seekNext(i);var t=buffer[i];buffer[i]=c;if(j<len&&tests[j].test(t))
c=t;else
break;}}};function keydownEvent(e){var pos=$(this).caret();var k=e.keyCode;ignore=(k<16||(k>16&&k<32)||(k>32&&k<41));if((pos.begin-pos.end)!=0&&(!ignore||k==8||k==46))
clearBuffer(pos.begin,pos.end);if(k==8||k==46||(iPhone&&k==127)){shiftL(pos.begin+(k==46?0:-1));return false;}else if(k==27){input.val(focusText);input.caret(0,checkVal());return false;}};function keypressEvent(e){if(ignore){ignore=false;return(e.keyCode==8)?false:null;}
e=e||window.event;var k=e.charCode||e.keyCode||e.which;var pos=$(this).caret();if(e.ctrlKey||e.altKey||e.metaKey){return true;}else if((k>=32&&k<=125)||k>186){var p=seekNext(pos.begin-1);if(p<len){var c=String.fromCharCode(k);if(tests[p].test(c)){shiftR(p);buffer[p]=c;writeBuffer();var next=seekNext(p);$(this).caret(next);if(settings.completed&&next==len)
settings.completed.call(input);}}}
return false;};function clearBuffer(start,end){for(var i=start;i<end&&i<len;i++){if(tests[i])
buffer[i]=settings.placeholder;}};function writeBuffer(){return input.val(buffer.join('')).val();};function checkVal(allow){var test=input.val();var lastMatch=-1;for(var i=0,pos=0;i<len;i++){if(tests[i]){buffer[i]=settings.placeholder;while(pos++<test.length){var c=test.charAt(pos-1);if(tests[i].test(c)){buffer[i]=c;lastMatch=i;break;}}
if(pos>test.length)
break;}else if(buffer[i]==test[pos]&&i!=partialPosition){pos++;lastMatch=i;}}
if(!allow&&lastMatch+1<partialPosition){input.val("");clearBuffer(0,len);}else if(allow||lastMatch+1>=partialPosition){writeBuffer();if(!allow)input.val(input.val().substring(0,lastMatch+1));}
return(partialPosition?i:firstNonMaskPos);};if(!input.attr("readonly"))
input.one("unmask",function(){input.unbind(".mask").removeData("buffer").removeData("tests");}).bind("focus.mask",function(){focusText=input.val();var pos=checkVal();writeBuffer();setTimeout(function(){if(pos==mask.length)
input.caret(0,pos);else
input.caret(pos);},0);}).bind("blur.mask",function(){checkVal();if(input.val()!=focusText)
input.change();}).bind("keydown.mask",keydownEvent).bind("keypress.mask",keypressEvent).bind(pasteEventName,function(){setTimeout(function(){input.caret(checkVal(true));},0);});checkVal();});}});})(jQuery);;(function($){$.fn.media=function(options,f1,f2){return this.each(function(){if(typeof options=='function'){f2=f1;f1=options;options={};}
var o=getSettings(this,options);if(typeof f1=='function')f1(this,o);var r=getTypesRegExp();var m=r.exec(o.src.toLowerCase())||[''];o.type?m[0]=o.type:m.shift();for(var i=0;i<m.length;i++){fn=m[i].toLowerCase();if(isDigit(fn[0]))fn='fn'+fn;if(!$.fn.media[fn])
continue;var player=$.fn.media[fn+'_player'];if(!o.params)o.params={};if(player){var num=player.autoplayAttr=='autostart';o.params[player.autoplayAttr||'autoplay']=num?(o.autoplay?1:0):o.autoplay?true:false;}
var $div=$.fn.media[fn](this,o);$div.css('backgroundColor',o.bgColor).width(o.width);if(typeof f2=='function')f2(this,$div[0],o,player.name);break;}});};$.fn.media.mapFormat=function(format,player){if(!format||!player||!$.fn.media.defaults.players[player])return;format=format.toLowerCase();if(isDigit(format[0]))format='fn'+format;$.fn.media[format]=$.fn.media[player];$.fn.media[format+'_player']=$.fn.media.defaults.players[player];};$.fn.media.defaults={width:400,height:400,autoplay:0,bgColor:'#ffffff',params:{wmode:'transparent'},attrs:{},flvKeyName:'file',flashvars:{},flashVersion:'7',expressInstaller:null,flvPlayer:'mediaplayer.swf',mp3Player:'mediaplayer.swf',silverlight:{inplaceInstallPrompt:'true',isWindowless:'true',framerate:'24',version:'0.9',onError:null,onLoad:null,initParams:null,userContext:null}};$.fn.media.defaults.players={flash:{name:'flash',types:'flv,mp3,swf',oAttrs:{classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',type:'application/x-oleobject',codebase:'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+$.fn.media.defaults.flashVersion},eAttrs:{type:'application/x-shockwave-flash',pluginspage:'http://www.adobe.com/go/getflashplayer'}},quicktime:{name:'quicktime',types:'aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp',oAttrs:{classid:'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',codebase:'http://www.apple.com/qtactivex/qtplugin.cab'},eAttrs:{pluginspage:'http://www.apple.com/quicktime/download/'}},realplayer:{name:'real',types:'ra,ram,rm,rpm,rv,smi,smil',autoplayAttr:'autostart',oAttrs:{classid:'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'},eAttrs:{type:'audio/x-pn-realaudio-plugin',pluginspage:'http://www.real.com/player/'}},winmedia:{name:'winmedia',types:'asx,asf,avi,wma,wmv',autoplayAttr:'autostart',oUrl:'url',oAttrs:{classid:'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6',type:'application/x-oleobject'},eAttrs:{type:$.browser.mozilla&&isFirefoxWMPPluginInstalled()?'application/x-ms-wmp':'application/x-mplayer2',pluginspage:'http://www.microsoft.com/Windows/MediaPlayer/'}},iframe:{name:'iframe',types:'html,pdf'},silverlight:{name:'silverlight',types:'xaml'}};function isFirefoxWMPPluginInstalled(){var plugs=navigator.plugins;for(i=0;i<plugs.length;i++){var plugin=plugs[i];if(plugin['filename']=='np-mswmp.dll')
return true;}
return false;}
var counter=1;for(var player in $.fn.media.defaults.players){var types=$.fn.media.defaults.players[player].types;$.each(types.split(','),function(i,o){if(isDigit(o[0]))o='fn'+o;$.fn.media[o]=$.fn.media[player]=getGenerator(player);$.fn.media[o+'_player']=$.fn.media.defaults.players[player];});};function getTypesRegExp(){var types='';for(var player in $.fn.media.defaults.players){if(types.length)types+=',';types+=$.fn.media.defaults.players[player].types;};return new RegExp('\\.('+types.replace(/,/ig,'|')+')\\b');};function getGenerator(player){return function(el,options){return generate(el,options,player);};};function isDigit(c){return'0123456789'.indexOf(c)>-1;};function getSettings(el,options){options=options||{};var $el=$(el);var cls=el.className||'';var meta=$.metadata?$el.metadata():$.meta?$el.data():{};meta=meta||{};var w=meta.width||parseInt(((cls.match(/w:(\d+)/)||[])[1]||0));var h=meta.height||parseInt(((cls.match(/h:(\d+)/)||[])[1]||0));if(w)meta.width=w;if(h)meta.height=h;if(cls)meta.cls=cls;var a=$.fn.media.defaults;var b=options;var c=meta;var p={params:{bgColor:options.bgColor||$.fn.media.defaults.bgColor}};var opts=$.extend({},a,b,c);$.each(['attrs','params','flashvars','silverlight'],function(i,o){opts[o]=$.extend({},p[o]||{},a[o]||{},b[o]||{},c[o]||{});});if(typeof opts.caption=='undefined')opts.caption=$el.text();opts.src=opts.src||$el.attr('href')||$el.attr('src')||'unknown';return opts;};$.fn.media.swf=function(el,opts){if(!window.SWFObject&&!window.swfobject){if(opts.flashvars){var a=[];for(var f in opts.flashvars)
a.push(f+'='+opts.flashvars[f]);if(!opts.params)opts.params={};opts.params.flashvars=a.join('&');}
return generate(el,opts,'flash');}
var id=el.id?(' id="'+el.id+'"'):'';var cls=opts.cls?(' class="'+opts.cls+'"'):'';var $div=$('<div'+id+cls+'>');if(window.swfobject){$(el).after($div).appendTo($div);if(!el.id)el.id='movie_player_'+counter++;swfobject.embedSWF(opts.src,el.id,opts.width,opts.height,opts.flashVersion,opts.expressInstaller,opts.flashvars,opts.params,opts.attrs);}
else{$(el).after($div).remove();var so=new SWFObject(opts.src,'movie_player_'+counter++,opts.width,opts.height,opts.flashVersion,opts.bgColor);if(opts.expressInstaller)so.useExpressInstall(opts.expressInstaller);for(var p in opts.params)
if(p!='bgColor')so.addParam(p,opts.params[p]);for(var f in opts.flashvars)
so.addVariable(f,opts.flashvars[f]);so.write($div[0]);}
if(opts.caption)$('<div>').appendTo($div).html(opts.caption);return $div;};$.fn.media.flv=$.fn.media.mp3=function(el,opts){var src=opts.src;var player=/\.mp3\b/i.test(src)?$.fn.media.defaults.mp3Player:$.fn.media.defaults.flvPlayer;var key=opts.flvKeyName;src=encodeURIComponent(src);opts.src=player;opts.src=opts.src+'?'+key+'='+(src);var srcObj={};srcObj[key]=src;opts.flashvars=$.extend({},srcObj,opts.flashvars);return $.fn.media.swf(el,opts);};$.fn.media.xaml=function(el,opts){if(!window.Sys||!window.Sys.Silverlight){if($.fn.media.xaml.warning)return;$.fn.media.xaml.warning=1;alert('You must include the Silverlight.js script.');return;}
var props={width:opts.width,height:opts.height,background:opts.bgColor,inplaceInstallPrompt:opts.silverlight.inplaceInstallPrompt,isWindowless:opts.silverlight.isWindowless,framerate:opts.silverlight.framerate,version:opts.silverlight.version};var events={onError:opts.silverlight.onError,onLoad:opts.silverlight.onLoad};var id1=el.id?(' id="'+el.id+'"'):'';var id2=opts.id||'AG'+counter++;var cls=opts.cls?(' class="'+opts.cls+'"'):'';var $div=$('<div'+id1+cls+'>');$(el).after($div).remove();Sys.Silverlight.createObjectEx({source:opts.src,initParams:opts.silverlight.initParams,userContext:opts.silverlight.userContext,id:id2,parentElement:$div[0],properties:props,events:events});if(opts.caption)$('<div>').appendTo($div).html(opts.caption);return $div;};function generate(el,opts,player){var $el=$(el);var o=$.fn.media.defaults.players[player];if(player=='iframe'){var o=$('<iframe'+' width="'+opts.width+'" height="'+opts.height+'" >');o.attr('src',opts.src);o.css('backgroundColor',o.bgColor);}
else if($.browser.msie){var a=['<object width="'+opts.width+'" height="'+opts.height+'" '];for(var key in opts.attrs)
a.push(key+'="'+opts.attrs[key]+'" ');for(var key in o.oAttrs||{}){var v=o.oAttrs[key];if(key=='codebase'&&window.location.protocol=='https:')
v=v.replace('http','https');a.push(key+'="'+v+'" ');}
a.push('></ob'+'ject'+'>');var p=['<param name="'+(o.oUrl||'src')+'" value="'+opts.src+'">'];for(var key in opts.params)
p.push('<param name="'+key+'" value="'+opts.params[key]+'">');var o=document.createElement(a.join(''));for(var i=0;i<p.length;i++)
o.appendChild(document.createElement(p[i]));}
else{var a=['<embed width="'+opts.width+'" height="'+opts.height+'" style="display:block"'];if(opts.src)a.push(' src="'+opts.src+'" ');for(var key in opts.attrs)
a.push(key+'="'+opts.attrs[key]+'" ');for(var key in o.eAttrs||{})
a.push(key+'="'+o.eAttrs[key]+'" ');for(var key in opts.params){if(key=='wmode'&&player!='flash')
continue;a.push(key+'="'+opts.params[key]+'" ');}
a.push('></em'+'bed'+'>');}
var id=el.id?(' id="'+el.id+'"'):'';var cls=opts.cls?(' class="'+opts.cls+'"'):'';var $div=$('<div'+id+cls+'>');$el.after($div).remove();($.browser.msie||player=='iframe')?$div.append(o):$div.html(a.join(''));if(opts.caption)$('<div>').appendTo($div).html(opts.caption);return $div;};})(jQuery);
/* PaginateMe jQuery plugin by Rory Cottle */
(function($)
{$.fn.paginateMe=function(options)
{debug(this);var defaults={perpage:6,children:'li',leadlinks:3,displaylinks:3,prevClass:"pm_prev",nextClass:"pm_next",nextText:"next",prevText:"prev",buttonClass:"pageMe",disabledClass:"pm_disabled",ellipseClass:"pm_ellipse",currentClass:"pm_here",slider:false,slideClass:"pm_jumpto",slidelabelClass:"pm_jumptolabel",ellipseText:'...',scrolltoTarget:'',scrolltoDuration:0,scrolltoOffset:0};var opts=$.extend(defaults,options);var o=($.meta)?$.extend({},opts,$(this).data()):opts;var parent=$(this);if(o.scrolltoTarget==='')
{if(parent.attr("id"))
{o.scrolltoTarget="#"+parent.attr("id");}
else
{o.scrolltoTarget="."+parent.attr("class");}}
var items=$(this).children(o.children);var ellipse='<span class="'+o.ellipseClass+'">'+o.ellipseText+'</span>';var total=items.length;var totalpage=Math.ceil(total/o.perpage);parent.data("page",{current:1});if(totalpage>1)
{var nav="<br style='clear: both;'/><div id='pm_nav'></div><br style='clear: both;'/>";var prevbtn='<a class="'+o.prevClass+'" href="#nogo_'+o.prevClass+'">'+o.prevText+'</a>';var nextbtn='<a class="'+o.nextClass+'" href="#nogo_'+o.nextClass+'">'+o.nextText+'</a>';var labels=prevbtn+'<span id="pm_nav_links">';for(i=1;i<=totalpage;i++)
{labels+='<a id="'+o.buttonClass+i+'" class="'+o.buttonClass+'" href="#nogo_'+i+'">'+i+'</a>';}
labels+='</span>'+nextbtn;$(this).after(nav);$("#pm_nav").append(labels);if(o.slider&&$.ui)
{var slider='<br style="clear: both;" />';slider+='<label class="'+o.slidelabelClass+'" for="'+o.slideClass+'">Page 1 of '+totalpage+'</label>';slider+='<br style="clear: both;" />';slider+='<div id="pm_slider" ></div>';$("#pm_nav").after(slider);$("#pm_slider").slider({min:1,max:totalpage,value:1,slide:function(event,ui){var pageval=ui.value;$("."+o.slidelabelClass).text('Page '+pageval+' of '+totalpage);},change:function(event,ui){var newno=(ui.value*o.perpage);items.hide();items.slice((newno-o.perpage),newno).fadeIn('slow');parent.data("page",{current:ui.value});if(ui.value<=1)
{$("."+o.prevClass).addClass(o.disabledClass);$("."+o.nextClass).removeClass(o.disabledClass);}
else if(ui.value>=totalpage)
{$("."+o.nextClass).addClass(o.disabledClass);$("."+o.prevClass).removeClass(o.disabledClass);}
else
{$("."+o.prevClass).removeClass(o.disabledClass);$("."+o.nextClass).removeClass(o.disabledClass);}
$("."+o.buttonClass).removeClass(o.currentClass);$("#"+o.buttonClass+ui.value).addClass(o.currentClass);shuffleNav(ui.value);if($.scrollTo)
{$.scrollTo(o.scrolltoTarget,o.scrolltoDuration,{offset:o.scrolltoOffset});}}});}
else if(!$.ui&&o.slider===true)
{alert("Using the Slider requires the jQuery UI be installed...");}
var links=$("#pm_nav_links").children();$("."+o.buttonClass+":first").addClass(o.currentClass);items.filter(":gt("+(o.perpage-1)+")").hide();links.hide();var start=links.slice(0,o.leadlinks);var end=links.slice(totalpage-o.leadlinks,totalpage);var middle=links.slice(o.leadlinks,o.leadlinks+o.displaylinks);start.show();middle.show();$("#"+o.buttonClass+(totalpage-o.leadlinks)).before(ellipse);end.show();$("."+o.prevClass).addClass(o.disabledClass);$("."+o.prevClass).bind("click.prev",function()
{var onpage=parent.data("page").current;if(onpage>1)
{onpage=onpage-1;var newno=(onpage*o.perpage);items.hide();items.slice((newno-o.perpage),newno).show();$("."+o.nextClass).removeClass(o.disabledClass);parent.data("page",{current:onpage});if(onpage-1<=1)
{$("."+o.prevClass).addClass(o.disabledClass);$("."+o.nextClass).removeClass(o.disabledClass);}
else if(onpage-1>=totalpage)
{$("."+o.nextClass).addClass(o.disabledClass);$("."+o.prevClass).removeClass(o.disabledClass);}
else
{$("."+o.prevClass).removeClass(o.disabledClass);$("."+o.nextClass).removeClass(o.disabledClass);}
$("."+o.buttonClass).removeClass(o.currentClass);$("#"+o.buttonClass+onpage).addClass(o.currentClass);shuffleNav(onpage);if(o.slider)
{$("#pm_slider").slider('value',onpage);$("."+o.slidelabelClass).text('Page '+onpage+' of '+totalpage);}
if($.scrollTo)
{$.scrollTo(o.scrolltoTarget,o.scrolltoDuration,{offset:o.scrolltoOffset});}}
return false;});$("."+o.nextClass).bind("click.next",function()
{var onpage=parent.data("page").current;if(onpage<totalpage)
{onpage++;var newno=(onpage*o.perpage);items.hide();items.slice((newno-o.perpage),newno).show();parent.data("page",{current:onpage});$("."+o.buttonClass).removeClass(o.currentClass);$("#"+o.buttonClass+onpage).addClass(o.currentClass);if(onpage+1<=1)
{$("."+o.prevClass).addClass(o.disabledClass);$("."+o.nextClass).removeClass(o.disabledClass);}
else if(onpage+1>=totalpage)
{$("."+o.nextClass).addClass(o.disabledClass);$("."+o.prevClass).removeClass(o.disabledClass);}
else
{$("."+o.prevClass).removeClass(o.disabledClass);$("."+o.nextClass).removeClass(o.disabledClass);}
$("."+o.prevClass).removeClass(o.disabledClass);shuffleNav(onpage);if(o.slider)
{$("#pm_slider").slider('value',onpage);$("."+o.slidelabelClass).text('Page '+onpage+' of '+totalpage);}
if($.scrollTo)
{$.scrollTo(o.scrolltoTarget,o.scrolltoDuration,{offset:o.scrolltoOffset});}}
return false;});for(i=1;i<=totalpage;i++)
{$("#"+o.buttonClass+i).bind("click.button"+i,function()
{var newno=($(this).text()*o.perpage);items.hide();items.slice((newno-o.perpage),newno).show();parent.data("page",{current:$(this).text()});if($(this).text()<=1)
{$("."+o.prevClass).addClass(o.disabledClass);$("."+o.nextClass).removeClass(o.disabledClass);}
else if($(this).text()>=totalpage)
{$("."+o.nextClass).addClass(o.disabledClass);$("."+o.prevClass).removeClass(o.disabledClass);}
else
{$("."+o.prevClass).removeClass(o.disabledClass);$("."+o.nextClass).removeClass(o.disabledClass);}
$("."+o.buttonClass).removeClass(o.currentClass);$(this).addClass(o.currentClass);shuffleNav($(this).text());if(o.slider)
{$("#pm_slider").slider('value',$(this).text());$("."+o.slidelabelClass).text('Page '+$(this).text()+' of '+totalpage);}
if($.scrollTo)
{$.scrollTo(o.scrolltoTarget,o.scrolltoDuration,{offset:o.scrolltoOffset});}
return false;});}}
function shuffleNav(currentpage)
{start.hide();middle.hide();end.hide();$('.'+o.ellipseClass).remove();start.show();end.show();var start_n=(+currentpage)-1;var end_n=(+currentpage+(+o.displaylinks)-1);if(start_n<=o.leadlinks)
{var diff=(+o.leadlinks-start_n);start_n=start_n+diff;end_n=end_n+diff;}
else
{$("#pageMe"+o.leadlinks).after(ellipse);}
if(end_n>=(totalpage-o.leadlinks))
{start_n=(totalpage-(o.displaylinks+o.leadlinks));}
else
{$("#pageMe"+(totalpage-o.leadlinks)).before(ellipse);}
middle=links.slice(start_n,end_n);middle.show();}};function debug($obj)
{if(window.console&&window.console.log)
{window.console.log('paginateMe item count: '+$obj.size());}}})(jQuery);/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 9/11/2008
 * @author Ariel Flesler
 * @version 1.4
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.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=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
(function($){$.taconite=function(xml){processDoc(xml);};$.taconite.debug=0;$.taconite.version='3.05';$.taconite.defaults={cdataWrap:'div'};if(typeof $.fn.replace=='undefined')
$.fn.replace=function(a){return this.after(a).remove();};if(typeof $.fn.replaceContent=='undefined')
$.fn.replaceContent=function(a){return this.empty().append(a);};$.expr[':'].taconiteTag=function(a){return a.taconiteTag===1;};$.taconite._httpData=$.httpData;$.httpData=$.taconite.detect=function(xhr,type){var ct=xhr.getResponseHeader('content-type');if($.taconite.debug){log('[AJAX response] content-type: ',ct,';  status: ',xhr.status,' ',xhr.statusText,';  has responseXML: ',xhr.responseXML!=null);log('type: '+type);log('responseXML: '+xhr.responseXML);}
var data=$.taconite._httpData(xhr,type);if(data&&data.documentElement){var root=data.documentElement.tagName;log('XML document root: ',root);if(root=='taconite'){log('taconite command document detected');$.taconite(data);}}
else{log('jQuery core httpData returned: '+data);log('httpData: response is not XML (or not "valid" XML)');}
return data;};$.taconite.enableAutoDetection=function(b){$.httpData=b?$.taconite.detect:$.taconite._httpData;};var logCount=0;function log(){if(!$.taconite.debug||!window.console||!window.console.log)return;if(!logCount++)
log('Plugin Version: '+$.taconite.version);window.console.log('[taconite] '+[].join.call(arguments,''));};function processDoc(xml){var status=true,ex;try{$.event.trigger('taconite-begin-notify',[xml])
status=go(xml);}catch(e){status=ex=e;}
$.event.trigger('taconite-complete-notify',[xml,!!status,status===true?null:status]);if(ex)throw ex;};function go(xml){var trimHash={wrap:1};if(typeof xml=='string')
xml=convert(xml);if(!xml||!xml.documentElement){log('$.taconite invoked without valid document; nothing to process');return false;}
try{var t=new Date().getTime();process(xml.documentElement.childNodes);$.taconite.lastTime=(new Date().getTime())-t;log('time to process response: '+$.taconite.lastTime+'ms');}catch(e){if(window.console&&window.console.error)
window.console.error('[taconite] ERROR processing document: '+e);throw e;}
return true;function convert(s){var doc;log('attempting string to document conversion');try{if(window.DOMParser){var parser=new DOMParser();doc=parser.parseFromString(s,'text/xml');}
else{doc=$("<xml>")[0];doc.async='false';doc.loadXML(s);}}
catch(e){if(window.console&&window.console.error)
window.console.error('[taconite] ERROR parsing XML string for conversion: '+e);throw e;}
var ok=doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror';log('conversion ',ok?'successful!':'FAILED');return doc;};function process(commands){var doPostProcess=0;for(var i=0;i<commands.length;i++){if(commands[i].nodeType!=1)
continue;var cmdNode=commands[i],cmd=cmdNode.tagName;if(cmd=='eval'){var js=(cmdNode.firstChild?cmdNode.firstChild.nodeValue:null);log('invoking "eval" command: ',js);if(js)$.globalEval(js);continue;}
var q=cmdNode.getAttribute('select');var jq=$(q);if(!jq[0]){log('No matching targets for selector: ',q);continue;}
var cdataWrap=cmdNode.getAttribute('cdataWrap')||$.taconite.defaults.cdataWrap;var a=[];if(cmdNode.childNodes.length>0){doPostProcess=1;for(var j=0,els=[];j<cmdNode.childNodes.length;j++)
els[j]=createNode(cmdNode.childNodes[j]);a.push(trimHash[cmd]?cleanse(els):els);}
var n=cmdNode.getAttribute('name');var v=cmdNode.getAttribute('value');if(n!==null)a.push(n);if(v!==null)a.push(v);for(var j=1;true;j++){v=cmdNode.getAttribute('arg'+j);if(v===null)
break;a.push(v);}
if($.taconite.debug){var arg=els?'...':a.join(',');log("invoking command: $('",q,"').",cmd,'('+arg+')');}
jq[cmd].apply(jq,a);}
if(doPostProcess)
postProcess();function postProcess(){if($.browser.mozilla)return;$('select:taconiteTag').each(function(){var sel=this;$('option:taconiteTag',this).each(function(){this.setAttribute('selected','selected');this.taconiteTag=null;if(sel.type=='select-one'){var idx=$('option',sel).index(this);sel.selectedIndex=idx;}});this.taconiteTag=null;});};function cleanse(els){for(var i=0,a=[];i<els.length;i++)
if(els[i].nodeType==1)a.push(els[i]);return a;};function createNode(node){var type=node.nodeType;if(type==1)return createElement(node);if(type==3)return fixTextNode(node.nodeValue);if(type==4)return handleCDATA(node.nodeValue);return null;};function handleCDATA(s){var el=document.createElement(cdataWrap);el.innerHTML=s;var $el=$(el),$ch=$el.children();if($ch.size()==1)
return $ch[0];return el;};function fixTextNode(s){if($.browser.msie)s=s.replace(/\n/g,'\r').replace(/\s+/g,' ');return document.createTextNode(s);};function createElement(node){var e,tag=node.tagName.toLowerCase();if($.browser.msie){var type=node.getAttribute('type');if(tag=='table'||type=='radio'||type=='checkbox'||tag=='button'||(tag=='select'&&node.getAttribute('multiple'))){e=document.createElement('<'+tag+' '+copyAttrs(null,node,true)+'>');}}
if(!e){e=document.createElement(tag);copyAttrs(e,node);}
if($.browser.msie&&tag=='td'){var colspan=node.getAttribute('colspan');if(colspan)e.colSpan=parseInt(colspan);}
if($.browser.msie&&!e.canHaveChildren){if(node.childNodes.length>0)
e.text=node.text;}
else{for(var i=0,max=node.childNodes.length;i<max;i++){var child=createNode(node.childNodes[i]);if(child)e.appendChild(child);}}
if(!$.browser.mozilla){if(tag=='select'||(tag=='option'&&node.getAttribute('selected')))
e.taconiteTag=1;}
return e;};function copyAttrs(dest,src,inline){for(var i=0,attr='';i<src.attributes.length;i++){var a=src.attributes[i],n=$.trim(a.name),v=$.trim(a.value);if(inline)attr+=(n+'="'+v+'" ');else if(n=='style'){dest.style.cssText=v;dest.setAttribute(n,v);}
else $.attr(dest,n,v);}
return attr;};};};})(jQuery);/*
Copyright (c) 2009 Ronnie Garcia, Travis Nickels

This file is part of Uploadify v1.6.2

Permission is hereby granted, free of charge, to any person obtaining a copy
of Uploadify and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

UPLOADIFY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4]}if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1)}else{if(versionRevision[0]=="r"){ersionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"))}}}var flashVer=versionMajor+"."+versionMinor+"."+versionRevision}}else{if($.browser.msie){var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version")}catch(e){}flashVer=version.replace("WIN ","").replace(",",".")}}flashVer=flashVer.split(".")[0];if(jQuery){(function(a){a.extend(a.fn,{fileUpload:function(b){if(flashVer>=9){a(this).each(function(){settings=a.extend({uploader:"uploader.swf",script:"uploader.php",folder:"",height:30,width:110,cancelImg:"cancel.png",wmode:"opaque",scriptAccess:"sameDomain",fileDataName:"Filedata",displayData:"percentage",onInit:function(){},onSelect:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){}},b);var d=location.pathname;d=d.split("/");d.pop();d=d.join("/")+"/";var f="&pagepath="+d;if(settings.buttonImg){f+="&buttonImg="+escape(settings.buttonImg)}if(settings.buttonText){f+="&buttonText="+escape(settings.buttonText)}if(settings.rollover){f+="&rollover=true"}f+="&script="+settings.script;f+="&folder="+escape(settings.folder);if(settings.scriptData){var g="";for(var c in settings.scriptData){g+="&"+c+"="+settings.scriptData[c]}f+="&scriptData="+escape(g)}f+="&btnWidth="+settings.width;f+="&btnHeight="+settings.height;f+="&wmode="+settings.wmode;if(settings.hideButton){f+="&hideButton=true"}if(settings.fileDesc){f+="&fileDesc="+settings.fileDesc+"&fileExt="+settings.fileExt}if(settings.multi){f+="&multi=true"}if(settings.auto){f+="&auto=true"}if(settings.sizeLimit){f+="&sizeLimit="+settings.sizeLimit}if(settings.simUploadLimit){f+="&simUploadLimit="+settings.simUploadLimit}if(settings.checkScript){f+="&checkScript="+settings.checkScript}if(settings.fileDataName){f+="&fileDataName="+settings.fileDataName}if(a.browser.msie){flashElement='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+settings.width+'" height="'+settings.height+'" id="'+a(this).attr("id")+'Uploader" class="fileUploaderBtn"><param name="movie" value="'+settings.uploader+"?fileUploadID="+a(this).attr("id")+f+'" /><param name="quality" value="high" /><param name="wmode" value="'+settings.wmode+'" /><param name="allowScriptAccess" value="'+settings.scriptAccess+'"><param name="swfversion" value="9.0.0.0" /></object>'}else{flashElement='<embed src="'+settings.uploader+"?fileUploadID="+a(this).attr("id")+f+'" quality="high" width="'+settings.width+'" height="'+settings.height+'" id="'+a(this).attr("id")+'Uploader" class="fileUploaderBtn" name="'+a(this).attr("id")+'Uploader" allowScriptAccess="'+settings.scriptAccess+'" wmode="'+settings.wmode+'" type="application/x-shockwave-flash" />'}if(settings.onInit()!==false){a(this).css("display","none");if(a.browser.msie){a(this).after('<div id="'+a(this).attr("id")+'Uploader"></div>');document.getElementById(a(this).attr("id")+"Uploader").outerHTML=flashElement}else{a(this).after(flashElement)}a("#"+a(this).attr("id")+"Uploader").after('<div id="'+a(this).attr("id")+'Queue" class="fileUploadQueue"></div>')}a(this).bind("rfuSelect",{action:settings.onSelect},function(j,h,i){if(j.data.action(j,h,i)!==false){var k=Math.round(i.size/1024*100)*0.01;var l="KB";if(k>1000){k=Math.round(k*0.001*100)*0.01;l="MB"}var m=k.toString().split(".");if(m.length>1){k=m[0]+"."+m[1].substr(0,2)}else{k=m[0]}if(i.name.length>20){fileName=i.name.substr(0,20)+"..."}else{fileName=i.name}a("#"+a(this).attr("id")+"Queue").append('<div id="'+a(this).attr("id")+h+'" class="fileUploadQueueItem"><div class="cancel"><a href="javascript:$(\'#'+a(this).attr("id")+"').fileUploadCancel('"+h+'\')"><img src="'+settings.cancelImg+'" border="0" /></a></div><span class="fileName">'+fileName+" ("+k+l+')</span><span class="percentage">&nbsp;</span><div class="fileUploadProgress" style="width: 100%;"><div id="'+a(this).attr("id")+h+'ProgressBar" class="fileUploadProgressBar" style="width: 1px; height: 3px;"></div></div></div>')}});if(typeof(settings.onSelectOnce)=="function"){a(this).bind("rfuSelectOnce",settings.onSelectOnce)}a(this).bind("rfuCheckExist",{action:settings.onCheck},function(m,l,j,k,o){var i=new Object();i.folder=d+k;for(var h in j){i[h]=j[h];if(o){var n=h}}a.post(l,i,function(r){for(var p in r){if(m.data.action(m,l,j,k,o)!==false){var q=confirm("Do you want to replace the file '"+r[p]+"'?");if(!q){document.getElementById(a(m.target).attr("id")+"Uploader").cancelFileUpload(p)}}}if(o){document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(n,true)}else{document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});a(this).bind("rfuCancel",{action:settings.onCancel},function(j,h,i,k){if(j.data.action(j,h,i,k)!==false){a("#"+a(this).attr("id")+h).fadeOut(250,function(){a("#"+a(this).attr("id")+h).remove()})}});a(this).bind("rfuClearQueue",{action:settings.onClearQueue},function(){if(event.data.action()!==false){a("#"+a(this).attr("id")+"Queue").contents().fadeOut(250,function(){a("#"+a(this).attr("id")+"Queue").empty()})}});a(this).bind("rfuError",{action:settings.onError},function(k,h,j,i){if(k.data.action(k,h,j,i)!==false){a("#"+a(this).attr("id")+h+" .fileName").text(i.type+" Error - "+j.name);a("#"+a(this).attr("id")+h).css({border:"3px solid #FBCBBC","background-color":"#FDE5DD"})}});a(this).bind("rfuProgress",{action:settings.onProgress,toDisplay:settings.displayData},function(j,h,i,k){if(j.data.action(j,h,i,k)!==false){a("#"+a(this).attr("id")+h+"ProgressBar").css("width",k.percentage+"%");if(j.data.toDisplay=="percentage"){displayData=" - "+k.percentage+"%"}if(j.data.toDisplay=="speed"){displayData=" - "+k.speed+"KB/s"}if(j.data.toDisplay==null){displayData=" "}a("#"+a(this).attr("id")+h+" .percentage").text(displayData)}});a(this).bind("rfuComplete",{action:settings.onComplete},function(k,h,j,i,l){if(k.data.action(k,h,j,unescape(i),l)!==false){a("#"+a(this).attr("id")+h).fadeOut(250,function(){a("#"+a(this).attr("id")+h).remove()});a("#"+a(this).attr("id")+h+" .percentage").text(" - Completed")}});if(typeof(settings.onAllComplete)=="function"){a(this).bind("rfuAllComplete",settings.onAllComplete)}})}},fileUploadSettings:function(b,c){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").updateSettings(b,c)})},fileUploadStart:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").startFileUpload(b,false)})},fileUploadCancel:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").cancelFileUpload(b)})},fileUploadClearQueue:function(){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").clearFileUploadQueue()})}})})(jQuery)};/*
 * jQuery validation plug-in 1.5.2
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){validator.settings.submitHandler.call(validator,validator.currentForm);return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=false;var validator=$(this[0].form).validate();this.each(function(){valid|=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(a.value);},filled:function(a){return!!$.trim(a.value);},unchecked:function(a){return!a.checked;}});$.format=function(source,params){if(arguments.length==1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.format.apply(this,args);};if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentForm=form;this.init();};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);},highlight:function(element,errorClass){$(element).addClass(errorClass);},unhighlight:function(element,errorClass){$(element).removeClass(errorClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.format("Please enter no more than {0} characters."),minlength:$.format("Please enter at least {0} characters."),rangelength:$.format("Please enter a value between {0} and {1} characters long."),range:$.format("Please enter a value between {0} and {1}."),max:$.format("Please enter a value less than or equal to {0}."),min:$.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}$(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.formSubmitted=false;this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id
+", check the '"+rule.method+"' method");throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined)return arguments[i];}return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method);if(typeof message=="function")message=message.call(this,rule.parameters,element);this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle=toToggle.add(toToggle.parents(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass);}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow=this.toShow.add(label);},errorsFor:function(element){return this.errors().filter("[for='"+this.idOrName(element)+"']");},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findByName(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message;if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var options=$("option:selected",element);return options.length>0&&(element.type=="select-multiple"||($.browser.msie&&!(options[0].attributes['value'].specified)?options[0].text:options[0].value).length>0);case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){if(response){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};errors[element.name]=response||validator.defaultMessage(element,"remote");validator.showErrors(errors);}previous.valid=response;validator.stopRequest(element,response);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberDE:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param:"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){return value==$(param).val();}}});})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);;(function($){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie)return false;this.addEventListener(original,$.event.special[fix].handler,true);},teardown:function(){if($.browser.msie)return false;this.removeEventListener(original,$.event.special[fix].handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerEvent:function(type,target){return this.triggerHandler(type,[$.event.fix({type:type,target:target})]);}})})(jQuery);;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);;(function($){$.fn.supersubs=function(options){var opts=$.extend({},$.fn.supersubs.defaults,options);return this.each(function(){var $$=$(this);var o=$.meta?$.extend({},opts,$$.data()):opts;var fontsize=$('<li id="menu-fontsize">&#8212;</li>').css({'padding':0,'position':'absolute','top':'-999em','width':'auto'}).appendTo($$).width();$('#menu-fontsize').remove();$ULs=$$.find('ul');$ULs.each(function(i){var $ul=$ULs.eq(i);var $LIs=$ul.children();var $As=$LIs.children('a');var liFloat=$LIs.css('white-space','nowrap').css('float');var emWidth=$ul.add($LIs).add($As).css({'float':'none','width':'auto'}).end().end()[0].clientWidth/fontsize;emWidth+=o.extraWidth;if(emWidth>o.maxWidth){emWidth=o.maxWidth;}
else if(emWidth<o.minWidth){emWidth=o.minWidth;}
emWidth+='em';$ul.css('width',emWidth);$LIs.css({'float':liFloat,'width':'100%','white-space':'normal'}).each(function(){var $childUl=$('>ul',this);var offsetDirection=$childUl.css('left')!==undefined?'left':'right';$childUl.css(offsetDirection,emWidth);});});});};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0};})(jQuery);// JavaScript Document
// Tab World From BenchSketch.com
// Benchsketch.com/bquery/tab.html for documentation
// You can use it FREE!!! Yay.
// Let me know how it works, or send suggestions, comments, requests to benchsketch@gmail.com
// Thanks
	
(function($){
  $.fn.extend({
			  
   // tabworld function
   tabworld: function(options){
	   
	   // Clean up peoples goddam crappy code
	   
     // Get the user extensions and defaults
      var opts = $.extend({}, $.fn.tabworld.defaults, options);
	 
	 // Content location
	 	if(opts.contloc=="none"){
			contloc=$(this).parent();
		}else{
			contloc=opts.contloc;
		}
	 // Content location
	 	if(opts.tabloc=="none"){
			tabloc=$(this).parent();
		}else{
			tabloc=opts.tabloc;
		}
	 
	 // better define some stuff for safety
	  var newli="",newdiv="";
	 
	 // Start Building Tabs
	  return this.each(function(i){
		
		//start developing basis
		now=$(this);
		nowid=now.attr("id");
		now.addClass("menu");
		
	// tab maker function	
	  $("#"+nowid+" li").each(function(i){
		
		taba = $('#'+nowid+" li q");
		$(this).addClass("removeme");
		tabcont = taba.html();
		$(".removeme q").remove();
		tabli = $('#'+nowid+" li");
		licont = tabli.html();
		$(this).remove();
		
		newli += "<li rel='"+nowid+"-"+i+"'><a>"+licont+"</a></li>";
		newdiv += "<div id='"+nowid+"-"+i+"'>"+tabcont+"</div>";
		
	  });

	// Something weird to gain the location
	 now.remove();
	 $(tabloc).append("<ul id='"+nowid+"' class='"+opts.color+"'>"+newli+"</ul>");
	// Fix the ul
	// $("#"+nowid).append(newli);
	// Find the Parent then append the divs
	 // var parent = $("#"+nowid).parent();
	 newdiv = "<div id='"+nowid+"content' class='tabcont'><div class='"+opts.area+"'>"+newdiv+"</div></div>";
	 newdiv = newdiv.replace(/\/>/,">");
	 $(contloc).append(newdiv);	
	
	
	// Find the default
	 ndef = nowid+"-"+opts.dopen;
	 ncon = nowid+"content ."+opts.area+" div";
	 $('#'+ncon+"").hide();
	 $('#'+ndef).show();
	 $('#'+ndef).children("div").show();
	 
	 deftab = $('li[@rel*='+ndef+"]");
	 deftab.addClass(opts.tabactive);
	 deftab.children("a").addClass(opts.tabactive);
	
	// Seperate function to start the tabbing
	$("#"+nowid+" li").click(function(){
		here=$(this);
		nbound=here.attr("rel");
		
		// Make the active class / remove it from others
		$("#"+nowid+" li").removeClass(opts.tabactive);
		$("#"+nowid+" li a").removeClass(opts.tabactive);
		here.addClass(opts.tabactive);
		here.children("a").addClass(opts.tabactive);
		
			// The real action! Also detirmine transition
			 if(opts.transition=="slide"){
				 $('#'+ncon+':visible').slideUp(opts.speed, function(){	
					$('#'+nbound).children("div").show();
					$('#'+nbound).slideDown(opts.speed);
				 });
			 }else if (opts.transition=="fade"){
				 $('#'+ncon+':visible').fadeOut(opts.speed, function(){	
					$('#'+nbound).children("div").show();
					$('#'+nbound).fadeIn(opts.speed);
				 });
			 }else{
				$('#'+ncon+':visible').hide(opts.speed, function(){	
					$('#'+nbound).children("div").show();
					$('#'+nbound).show(opts.speed);
				 }); 
			 }
	 
	});
	
	  });// end return each (i) 	 
   }// end tabworld		
  })// end $.fn.extend
  
// Defaults
$.fn.tabworld.defaults = {
 mislpace:'none',
 speed:'fast',
 color:'menu',
 area:'space',
 tabloc:'none',
 contloc:'none',
 dopen:0,
 transition:'fade',
 tabactive:'tabactive'
}; // end defaults
  
})(jQuery);// end function($)// wire the 'Loading...' indicator
$(function() {
	// show a simple loading indicator
	var loader = $('<div id="ajaxloader">Loading...</div>')
		.css({position: "fixed", top: "1em", right: "1em"})
		.prependTo("body")
		.hide();
	$().ajaxStart(function() {
		loader.show();
	}).ajaxStop(function() {
		loader.hide();
	}).ajaxError(function(a, b, e) {
		throw e;
	});
	
	/*$('body > *').wrapAll('<div id="ui_site_wrapper"></div>');
	alert($('body').css('background-color'));
	$('#ui_site_wrapper').css(
		{
			backgroundColor: $('body').css('background-color'),
			backgroundImage: $('body').css('background-image'),
			backgroundRepeat: $('body').css('background-repeat'),
			backgroundPosition: $('body').css('background-position')
	});
	$('body').css(
		{
			backgroundColor: 'none',
			backgroundImage: 'none',
			backgroundRepeat: 'none',
			backgroundPosition: 'none'
	});*/
	
	//$('body').prepend('<h1>HI</h1>');
});