﻿(function(b){function a(c){var d;if(c&&c.constructor==Array&&c.length==3)return c;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])];if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55];if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(d[1],16),parseInt(d[2],
16),parseInt(d[3],16)];if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)];return colors[b.trim(c).toLowerCase()]}b.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,d){b.fx.step[d]=function(g){if(g.state==0){var h;h=g.elem;var l=d,o;do{o=b.curCSS(h,l);if(o!=""&&o!="transparent"||b.nodeName(h,"body"))break;l="backgroundColor"}while(h=h.parentNode);
h=a(o);g.start=h;g.end=a(g.end)}g.elem.style[d]="rgb("+[Math.max(Math.min(parseInt(g.pos*(g.end[0]-g.start[0])+g.start[0]),255),0),Math.max(Math.min(parseInt(g.pos*(g.end[1]-g.start[1])+g.start[1]),255),0),Math.max(Math.min(parseInt(g.pos*(g.end[2]-g.start[2])+g.start[2]),255),0)].join(",")+")"}})})(jQuery);
jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldY:0,build:function(b){this.each(function(){this.tableDnDConfig=jQuery.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,scrollAmount:5,serializeRegexp:/[^\-]*$/,serializeParamName:null,dragHandle:null},b||{});jQuery.tableDnD.makeDraggable(this)});jQuery(document).bind("mousemove",jQuery.tableDnD.mousemove).bind("mouseup",jQuery.tableDnD.mouseup);return this},makeDraggable:function(b){var a=
b.tableDnDConfig;b.tableDnDConfig.dragHandle?jQuery("td."+b.tableDnDConfig.dragHandle,b).each(function(){jQuery(this).mousedown(function(c){jQuery.tableDnD.dragObject=this.parentNode;jQuery.tableDnD.currentTable=b;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,c);a.onDragStart&&a.onDragStart(b,this);return false})}):jQuery("tr",b).each(function(){var c=jQuery(this);c.hasClass("nodrag")||c.mousedown(function(d){if(d.target.tagName=="TD"){jQuery.tableDnD.dragObject=this;jQuery.tableDnD.currentTable=
b;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,d);a.onDragStart&&a.onDragStart(b,this);return false}}).css("cursor","move")})},updateTables:function(){this.each(function(){this.tableDnDConfig&&jQuery.tableDnD.makeDraggable(this)})},mouseCoords:function(b){if(b.pageX||b.pageY)return{x:b.pageX,y:b.pageY};return{x:b.clientX+document.body.scrollLeft-document.body.clientLeft,y:b.clientY+document.body.scrollTop-document.body.clientTop}},getMouseOffset:function(b,a){a=a||window.event;
b=this.getPosition(b);a=this.mouseCoords(a);return{x:a.x-b.x,y:a.y-b.y}},getPosition:function(b){var a=0,c=0;if(b.offsetHeight==0)b=b.firstChild;for(;b.offsetParent;){a+=b.offsetLeft;c+=b.offsetTop;b=b.offsetParent}a+=b.offsetLeft;c+=b.offsetTop;return{x:a,y:c}},mousemove:function(b){if(jQuery.tableDnD.dragObject!=null){var a=jQuery(jQuery.tableDnD.dragObject),c=jQuery.tableDnD.currentTable.tableDnDConfig,d=jQuery.tableDnD.mouseCoords(b);b=d.y-jQuery.tableDnD.mouseOffset.y;var g=window.pageYOffset;
if(document.all)if(typeof document.compatMode!="undefined"&&document.compatMode!="BackCompat")g=document.documentElement.scrollTop;else if(typeof document.body!="undefined")g=document.body.scrollTop;if(d.y-g<c.scrollAmount)window.scrollBy(0,-c.scrollAmount);else(window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight)-(d.y-g)<c.scrollAmount&&window.scrollBy(0,c.scrollAmount);if(b!=jQuery.tableDnD.oldY){d=b>jQuery.tableDnD.oldY;
jQuery.tableDnD.oldY=b;c.onDragClass?a.addClass(c.onDragClass):a.css(c.onDragStyle);if(a=jQuery.tableDnD.findDropTargetRow(a,b))if(d&&jQuery.tableDnD.dragObject!=a)jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,a.nextSibling);else!d&&jQuery.tableDnD.dragObject!=a&&jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,a)}return false}},findDropTargetRow:function(b,a){for(var c=jQuery.tableDnD.currentTable.rows,d=0;d<c.length;d++){var g=c[d],h=
this.getPosition(g).y,l=parseInt(g.offsetHeight)/2;if(g.offsetHeight==0){h=this.getPosition(g.firstChild).y;l=parseInt(g.firstChild.offsetHeight)/2}if(a>h-l&&a<h+l){if(g==b)return null;a=jQuery.tableDnD.currentTable.tableDnDConfig;return a.onAllowDrop?a.onAllowDrop(b,g)?g:null:jQuery(g).hasClass("nodrop")?null:g}}return null},mouseup:function(){if(jQuery.tableDnD.currentTable&&jQuery.tableDnD.dragObject){var b=jQuery.tableDnD.dragObject,a=jQuery.tableDnD.currentTable.tableDnDConfig;a.onDragClass?
jQuery(b).removeClass(a.onDragClass):jQuery(b).css(a.onDropStyle);jQuery.tableDnD.dragObject=null;a.onDrop&&a.onDrop(jQuery.tableDnD.currentTable,b);jQuery.tableDnD.currentTable=null}},serialize:function(){return jQuery.tableDnD.currentTable?jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable):"Error: No Table id set, you need to set an id on your table and every row"},serializeTable:function(b){for(var a="",c=b.id,d=b.rows,g=0;g<d.length;g++){if(a.length>0)a+="&";var h=d[g].id;if(h&&h&&b.tableDnDConfig&&
b.tableDnDConfig.serializeRegexp)h=h.match(b.tableDnDConfig.serializeRegexp)[0];a+=c+"[]="+h}return a},serializeTables:function(){var b="";this.each(function(){b+=jQuery.tableDnD.serializeTable(this)});return b}};jQuery.fn.extend({tableDnD:jQuery.tableDnD.build,tableDnDUpdate:jQuery.tableDnD.updateTables,tableDnDSerialize:jQuery.tableDnD.serializeTables});
(function(b){b.extend(b.fn,{validate:function(a){if(this.length){var c=b.data(this[0],"validator");if(c)return c;c=new b.validator(a,this[0]);b.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});this.submit(function(d){function g(){if(c.settings.submitHandler){c.settings.submitHandler.call(c,c.currentForm);return false}return true}c.settings.debug&&d.preventDefault();if(c.cancelSubmit){c.cancelSubmit=false;return g()}if(c.form()){if(c.pendingRequest){c.formSubmitted=
true;return false}return g()}else{c.focusInvalid();return false}})}return c}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(b(this[0]).is("form"))return this.validate().form();else{var a=false,c=b(this[0].form).validate();this.each(function(){a|=c.element(this)});return a}},removeAttrs:function(a){var c={},d=this;b.each(a.split(/\s/),function(g,h){c[h]=d.attr(h);d.removeAttr(h)});return c},rules:function(a,c){var d=this[0];
if(a){var g=b.data(d.form,"validator").settings,h=g.rules,l=b.validator.staticRules(d);switch(a){case "add":b.extend(l,b.validator.normalizeRule(c));h[d.name]=l;if(c.messages)g.messages[d.name]=b.extend(g.messages[d.name],c.messages);break;case "remove":if(!c){delete h[d.name];return l}var o={};b.each(c.split(/\s/),function(p,C){o[C]=l[C];delete l[C]});return o}}a=b.validator.normalizeRules(b.extend({},b.validator.metadataRules(d),b.validator.classRules(d),b.validator.attributeRules(d),b.validator.staticRules(d)),
d);if(a.required){c=a.required;delete a.required;a=b.extend({required:c},a)}return a}});b.extend(b.expr[":"],{blank:function(a){return!b.trim(a.value)},filled:function(a){return!!b.trim(a.value)},unchecked:function(a){return!a.checked}});b.format=function(a,c){if(arguments.length==1)return function(){var d=b.makeArray(arguments);d.unshift(a);return b.format.apply(this,d)};if(arguments.length>2&&c.constructor!=Array)c=b.makeArray(arguments).slice(1);if(c.constructor!=Array)c=[c];b.each(c,function(d,
g){a=a.replace(RegExp("\\{"+d+"\\}","g"),g)});return a};b.validator=function(a,c){this.settings=b.extend({},b.validator.defaults,a);this.currentForm=c;this.init()};b.extend(b.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:b([]),errorLabelContainer:b([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,
a,this.settings.errorClass);this.errorsFor(a).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){a.name in this.submitted&&this.element(a)},highlight:function(a,c){b(a).addClass(c)},unhighlight:function(a,c){b(a).removeClass(c)}},setDefaults:function(a){b.extend(b.validator.defaults,a)},messages:{required:"Detta f\u00e4lt \u00e4r obligatoriskt.",
remote:"Please fix this field.",email:"Du m\u00e5ste ange en giltig emailadress",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\u00fcltiges 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:b.format("Please enter no more than {0} characters."),minlength:b.format("Please enter at least {0} characters."),rangelength:b.format("Please enter a value between {0} and {1} characters long."),range:b.format("Please enter a value between {0} and {1}."),max:b.format("Please enter a value less than or equal to {0}."),min:b.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(g){var h=b.data(this[0].form,"validator");
h.settings["on"+g.type]&&h.settings["on"+g.type].call(h,this[0])}this.labelContainer=b(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||b(this.currentForm);this.containers=b(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var c=this.groups={};b.each(this.settings.groups,function(g,h){b.each(h.split(/\s/),function(l,o){c[o]=
g})});var d=this.settings.rules;b.each(d,function(g,h){d[g]=b.validator.normalizeRule(h)});b(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",a).delegate("click",":radio, :checkbox",a);this.settings.invalidHandler&&b(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();b.extend(this.submitted,this.errorMap);this.invalid=b.extend({},this.errorMap);this.valid()||b(this.currentForm).triggerHandler("invalid-form",
[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,c=this.currentElements=this.elements();c[a];a++)this.check(c[a]);return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=b(a);var c=this.check(a);if(c)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return c},showErrors:function(a){if(a){b.extend(this.errorMap,
a);this.errorList=[];for(var c in a)this.errorList.push({message:a[c],element:this.findByName(c)[0]});this.successList=b.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){b.fn.resetForm&&b(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},
objectLength:function(a){var c=0;for(var d in a)c++;return c},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{b(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus()}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&b.grep(this.errorList,function(c){return c.element.name==a.name}).length==
1&&a},elements:function(){var a=this,c={};return b([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in c||!a.objectLength(b(this).rules()))return false;return c[this.name]=true})},clean:function(a){return b(a)[0]},errors:function(){return b(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},
reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=b([]);this.toHide=b([]);this.formSubmitted=false;this.currentElements=b([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name)[0];var c=b(a).rules(),d=false;for(method in c){var g={method:method,parameters:c[method]};try{var h=b.validator.methods[method].call(this,
a.value.replace(/\r/g,""),a,g.parameters);if(h=="dependency-mismatch")d=true;else{d=false;if(h=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!h){this.formatAndAdd(a,g);return false}}}catch(l){this.settings.debug&&window.console&&console.log("exception occured when checking element "+a.id+", check the '"+g.method+"' method");throw l;}}if(!d){this.objectLength(c)&&this.successList.push(a);return true}},customMetaMessage:function(a,c){if(b.metadata)return(a=this.settings.meta?
b(a).metadata()[this.settings.meta]:b(a).metadata())&&a.messages&&a.messages[c]},customMessage:function(a,c){return(a=this.settings.messages[a])&&(a.constructor==String?a:a[c])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a]},defaultMessage:function(a,c){return this.findDefined(this.customMessage(a.name,c),this.customMetaMessage(a,c),!this.settings.ignoreTitle&&a.title||undefined,b.validator.messages[c],"<strong>Warning: No message defined for "+
a.name+"</strong>")},formatAndAdd:function(a,c){var d=this.defaultMessage(a,c.method);if(typeof d=="function")d=d.call(this,c.parameters,a);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parents(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var c=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass);
this.showLabel(c.element,c.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(c=this.validElements();c[a];a++)this.settings.unhighlight.call(this,c[a],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 b(this.errorList).map(function(){return this.element})},showLabel:function(a,c){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(c)}else{d=b("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(c||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?
this.settings.errorPlacement(d,b(a)):d.insertAfter(a))}if(!c&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){return this.errors().filter("[for='"+this.idOrName(a)+"']")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var c=this.currentForm;
return b(document.getElementsByName(a)).map(function(d,g){return g.form==c&&g.name==a&&g||null})},getLength:function(a,c){switch(c.nodeName.toLowerCase()){case "select":return b("option:selected",c).length;case "input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return a.length},depend:function(a,c){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,c):true},dependTypes:{"boolean":function(a){return a},string:function(a,c){return!!b(a,c.form).length},
"function":function(a,c){return a(c)}},optional:function(a){return!b.validator.methods.required.call(this,b.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,c){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form())b(this.currentForm).submit();else!c&&this.pendingRequest==0&&this.formSubmitted&&
b(this.currentForm).triggerHandler("invalid-form",[this])},previousValue:function(a){return b.data(a,"previousValue")||b.data(a,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(a,"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(a,c){a.constructor==String?
this.classRuleSettings[a]=c:b.extend(this.classRuleSettings,a)},classRules:function(a){var c={};(a=b(a).attr("class"))&&b.each(a.split(" "),function(){this in b.validator.classRuleSettings&&b.extend(c,b.validator.classRuleSettings[this])});return c},attributeRules:function(a){var c={};a=b(a);for(method in b.validator.methods){var d=a.attr(method);if(d)c[method]=d}c.maxlength&&/-1|2147483647|524288/.test(c.maxlength)&&delete c.maxlength;return c},metadataRules:function(a){if(!b.metadata)return{};var c=
b.data(a.form,"validator").settings.meta;return c?b(a).metadata()[c]:b(a).metadata()},staticRules:function(a){var c={},d=b.data(a.form,"validator");if(d.settings.rules)c=b.validator.normalizeRule(d.settings.rules[a.name])||{};return c},normalizeRules:function(a,c){b.each(a,function(d,g){if(g===false)delete a[d];else if(g.param||g.depends){var h=true;switch(typeof g.depends){case "string":h=!!b(g.depends,c.form).length;break;case "function":h=g.depends.call(c,c);break}if(h)a[d]=g.param!==undefined?
g.param:true;else delete a[d]}});b.each(a,function(d,g){a[d]=b.isFunction(g)?g(c):g});b.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});b.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(b.validator.autoCreateRanges){if(a.min&&a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;
return a},normalizeRule:function(a){if(typeof a=="string"){var c={};b.each(a.split(/\s/),function(){c[this]=true});a=c}return a},addMethod:function(a,c,d){b.validator.methods[a]=c;b.validator.messages[a]=d;c.length<3&&b.validator.addClassRules(a,b.validator.normalizeRule(a))},methods:{required:function(a,c,d){if(!this.depend(d,c))return"dependency-mismatch";switch(c.nodeName.toLowerCase()){case "select":a=b("option:selected",c);return a.length>0&&(c.type=="select-multiple"||(b.browser.msie&&!a[0].attributes.value.specified?
a[0].text:a[0].value).length>0);case "input":if(this.checkable(c))return this.getLength(a,c)>0;default:return b.trim(a).length>0}},remote:function(a,c,d){if(this.optional(c))return"dependency-mismatch";var g=this.previousValue(c);this.settings.messages[c.name]||(this.settings.messages[c.name]={});this.settings.messages[c.name].remote=typeof g.message=="function"?g.message(a):g.message;d=typeof d=="string"&&{url:d}||d;if(g.old!==a){g.old=a;var h=this;this.startRequest(c);var l={};l[c.name]=a;b.ajax(b.extend(true,
{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:l,success:function(o){if(o){var p=h.formSubmitted;h.prepareElement(c);h.formSubmitted=p;h.successList.push(c);h.showErrors()}else{p={};p[c.name]=o||h.defaultMessage(c,"remote");h.showErrors(p)}g.valid=o;h.stopRequest(c,o)}},d));return"pending"}else if(this.pending[c.name])return"pending";return g.valid},minlength:function(a,c,d){return this.optional(c)||this.getLength(b.trim(a),c)>=d},maxlength:function(a,c,d){return this.optional(c)||
this.getLength(b.trim(a),c)<=d},rangelength:function(a,c,d){a=this.getLength(b.trim(a),c);return this.optional(c)||a>=d[0]&&a<=d[1]},min:function(a,c,d){return this.optional(c)||a>=d},max:function(a,c,d){return this.optional(c)||a<=d},range:function(a,c,d){return this.optional(c)||a>=d[0]&&a<=d[1]},email:function(a,c){return this.optional(c)||/^((([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(a)},
url:function(a,c){return this.optional(c)||/^(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(a)},
date:function(a,c){return this.optional(c)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,c){return this.optional(c)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},dateDE:function(a,c){return this.optional(c)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(a)},number:function(a,c){return this.optional(c)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},numberDE:function(a,c){return this.optional(c)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(a)},digits:function(a,c){return this.optional(c)||/^\d+$/.test(a)},
creditcard:function(a,c){if(this.optional(c))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var d=c=0,g=false;a=a.replace(/\D/g,"");for(n=a.length-1;n>=0;n--){d=a.charAt(n);d=parseInt(d,10);if(g)if((d*=2)>9)d-=9;c+=d;g=!g}return c%10==0},accept:function(a,c,d){d=typeof d=="string"?d:"png|jpe?g|gif";return this.optional(c)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,c,d){return a==b(d).val()}}})})(jQuery);
(function(b){var a=b.ajax,c={};b.ajax=function(d){d=b.extend(d,b.extend({},b.ajaxSettings,d));var g=d.port;if(d.mode=="abort"){c[g]&&c[g].abort();return c[g]=a.apply(this,arguments)}return a.apply(this,arguments)}})(jQuery);
(function(b){b.each({focus:"focusin",blur:"focusout"},function(a,c){b.event.special[c]={setup:function(){if(b.browser.msie)return false;this.addEventListener(a,b.event.special[c].handler,true)},teardown:function(){if(b.browser.msie)return false;this.removeEventListener(a,b.event.special[c].handler,true)},handler:function(d){arguments[0]=b.event.fix(d);arguments[0].type=c;return b.event.handle.apply(this,arguments)}}});b.extend(b.fn,{delegate:function(a,c,d){return this.bind(a,function(g){var h=b(g.target);
if(h.is(c))return d.apply(h,arguments)})},triggerEvent:function(a,c){return this.triggerHandler(a,[b.event.fix({type:a,target:c})])}})})(jQuery);
(function(){jQuery.parseUri=function(b,a){a=jQuery.extend({strictMode:false},a);var c=jQuery.parseUri.options;b=c.parser[a.strictMode?"strict":"loose"].exec(b);var d={};for(a=14;a--;)d[c.key[a]]=b[a]||"";d[c.q.name]={};d[c.key[12]].replace(c.q.parser,function(g,h,l){if(h)d[c.q.name][h]=l});return d};jQuery.parseUri.options={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},
parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}}})();
(function(b){function a(i,k){k=k==="x"?s.width():s.height();return typeof i==="string"?Math.round(i.match(/%/)?k/100*parseInt(i,10):parseInt(i,10)):i}function c(i){i=b.isFunction(i)?i.call(x):i;return f.photo||i.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function d(){for(var i in f)if(b.isFunction(f[i])&&i.substring(0,2)!=="on")f[i]=f[i].call(x);f.rel=f.rel||x.rel;f.href=f.href||x.href;f.title=f.title||x.title}function g(i){x=i;f=b.extend({},b(x).data(h));d();if(f.rel&&f.rel!=="nofollow"){m=
b(".cboxElement").filter(function(){return(b(this).data(h).rel||this.rel)===f.rel});F=m.index(x);if(F<0){m=m.add(x);F=m.length-1}}else{m=b(x);F=0}if(!z){S=z=o;Y=x;Y.blur();b(document).bind("keydown.cbox_close",function(k){if(k.keyCode===27){k.preventDefault();p.close()}}).bind("keydown.cbox_arrows",function(k){if(m.length>1)if(k.keyCode===37){k.preventDefault();D.click()}else if(k.keyCode===39){k.preventDefault();T.click()}});f.overlayClose&&U.css({cursor:"pointer"}).one("click",p.close);b.event.trigger(ia);
f.onOpen&&f.onOpen.call(x);U.css({opacity:f.opacity}).show();f.w=a(f.initialWidth,"x");f.h=a(f.initialHeight,"y");p.position(0);V&&s.bind("resize.cboxie6 scroll.cboxie6",function(){U.css({width:s.width(),height:s.height(),top:s.scrollTop(),left:s.scrollLeft()})}).trigger("scroll.cboxie6")}K.add(D).add(T).add(I).add(L).hide();ja.html(f.close).show();p.slideshow();p.load()}var h="colorbox",l="hover",o=true,p,C=b.browser.msie&&!b.support.opacity,V=C&&b.browser.version<7,ia="cbox_open",Z="cbox_load",
da="cbox_complete",ha="resize.cbox_resize",U,t,M,G,W,ea,fa,ga,m,s,r,J,E,$,L,K,I,T,D,ja,u,N,q,X,x,Y,F,f,z,S,P={transition:"elastic",speed:350,width:false,height:false,innerWidth:false,innerHeight:false,initialWidth:"400",initialHeight:"400",maxWidth:false,maxHeight:false,scalePhotos:o,scrolling:o,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:o,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,overlayClose:o,
slideshow:false,slideshowAuto:o,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false};p=b.fn.colorbox=function(i,k){var v=this;if(!v.length)if(v.selector===""){v=b("<a/>");i.open=o}else return this;v.each(function(){var w=b.extend({},b(this).data(h)?b(this).data(h):P,i);b(this).data(h,w).addClass("cboxElement");if(k)b(this).data(h).onComplete=k});i&&i.open&&g(v);return this};p.init=function(){function i(k){return b('<div id="cbox'+
k+'"/>')}s=b(window);t=b('<div id="colorbox"/>');U=i("Overlay").hide();M=i("Wrapper");G=i("Content").append(r=i("LoadedContent").css({width:0,height:0}),E=i("LoadingOverlay"),$=i("LoadingGraphic"),L=i("Title"),K=i("Current"),I=i("Slideshow"),T=i("Next"),D=i("Previous"),ja=i("Close"));M.append(b("<div/>").append(i("TopLeft"),W=i("TopCenter"),i("TopRight")),b("<div/>").append(ea=i("MiddleLeft"),G,fa=i("MiddleRight")),b("<div/>").append(i("BottomLeft"),ga=i("BottomCenter"),i("BottomRight"))).children().children().css({"float":"left"});
J=b("<div style='position:absolute; top:0; left:0; width:9999px; height:0;'/>");b("body").prepend(U,t.append(M,J));if(C){t.addClass("cboxIE");V&&U.css("position","absolute")}G.children().bind("mouseover mouseout",function(){b(this).toggleClass(l)}).addClass(l);u=W.height()+ga.height()+G.outerHeight(o)-G.height();N=ea.width()+fa.width()+G.outerWidth(o)-G.width();q=r.outerHeight(o);X=r.outerWidth(o);t.css({"padding-bottom":u,"padding-right":N}).hide();T.click(p.next);D.click(p.prev);ja.click(p.close);
G.children().removeClass(l);b(".cboxElement").live("click",function(k){if(k.button!==0&&typeof k.button!=="undefined")return o;else{g(this);return false}})};p.position=function(i,k){function v(Q){W[0].style.width=ga[0].style.width=G[0].style.width=Q.style.width;$[0].style.height=E[0].style.height=G[0].style.height=ea[0].style.height=fa[0].style.height=Q.style.height}var w=s.height();w=Math.max(w-f.h-q-u,0)/2+s.scrollTop();var H=Math.max(document.documentElement.clientWidth-f.w-X-N,0)/2+s.scrollLeft();
i=t.width()===f.w+X&&t.height()===f.h+q?0:i;M[0].style.width=M[0].style.height="9999px";t.dequeue().animate({width:f.w+X,height:f.h+q,top:w,left:H},{duration:i,complete:function(){v(this);S=false;M[0].style.width=f.w+X+N+"px";M[0].style.height=f.h+q+u+"px";k&&k()},step:function(){v(this)}})};p.resize=function(i){function k(){f.w=f.w||r.width();f.w=f.mw&&f.mw<f.w?f.mw:f.w;return f.w}function v(){f.h=f.h||r.height();f.h=f.mh&&f.mh<f.h?f.mh:f.h;return f.h}function w(R){p.position(R,function(){if(z){if(C){Q&&
r.fadeIn(100);t[0].style.removeAttribute("filter")}if(f.iframe)r.append("<iframe id='cboxIframe'"+(f.scrolling?" ":"scrolling='no'")+" name='iframe_"+(new Date).getTime()+"' frameborder=0 src='"+f.href+"' "+(C?"allowtransparency='true'":"")+" />");r.show();L.show().html(f.title);if(m.length>1){K.html(f.current.replace(/\{current\}/,F+1).replace(/\{total\}/,m.length)).show();T.html(f.next).show();D.html(f.previous).show();f.slideshow&&I.show()}E.hide();$.hide();b.event.trigger(da);f.onComplete&&f.onComplete.call(x);
f.transition==="fade"&&t.fadeTo(aa,1,function(){C&&t[0].style.removeAttribute("filter")});s.bind(ha,function(){p.position(0)})}})}if(z){var H,Q,aa=f.transition==="none"?0:f.speed;s.unbind(ha);if(i){r.remove();r=b('<div id="cboxLoadedContent"/>').html(i);r.hide().appendTo(J).css({width:k(),overflow:f.scrolling?"auto":"hidden"}).css({height:v()}).prependTo(G);b("#cboxPhoto").css({cssFloat:"none"});V&&b("select:not(#colorbox select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("cbox_cleanup",
function(){this.style.visibility="inherit"});f.transition==="fade"&&t.fadeTo(aa,0,function(){w(0)})||w(aa);if(f.preloading&&m.length>1){i=F>0?m[F-1]:m[m.length-1];H=F<m.length-1?m[F+1]:m[0];H=b(H).data(h).href||H.href;i=b(i).data(h).href||i.href;c(H)&&b("<img />").attr("src",H);c(i)&&b("<img />").attr("src",i)}}else setTimeout(function(){var R=r.wrapInner("<div style='overflow:auto'></div>").children();f.h=R.height();r.css({height:f.h});R.replaceWith(R.children());p.position(aa)},1)}};p.load=function(){var i,
k,v,w=p.resize;S=o;x=m[F];f=b.extend({},b(x).data(h));d();b.event.trigger(Z);f.onLoad&&f.onLoad.call(x);f.h=f.height?a(f.height,"y")-q-u:f.innerHeight?a(f.innerHeight,"y"):false;f.w=f.width?a(f.width,"x")-X-N:f.innerWidth?a(f.innerWidth,"x"):false;f.mw=f.w;f.mh=f.h;if(f.maxWidth){f.mw=a(f.maxWidth,"x")-X-N;f.mw=f.w&&f.w<f.mw?f.w:f.mw}if(f.maxHeight){f.mh=a(f.maxHeight,"y")-q-u;f.mh=f.h&&f.h<f.mh?f.h:f.mh}i=f.href;E.show();$.show();if(f.inline){b('<div id="cboxInlineTemp" />').hide().insertBefore(b(i)[0]).bind(Z+
" cbox_cleanup",function(){b(this).replaceWith(r.children())});w(b(i))}else if(f.iframe)w(" ");else if(f.html)w(f.html);else if(c(i)){k=new Image;k.onload=function(){var H;k.onload=null;k.id="cboxPhoto";b(k).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(f.scalePhotos){v=function(){k.height-=k.height*H;k.width-=k.width*H};if(f.mw&&k.width>f.mw){H=(k.width-f.mw)/k.width;v()}if(f.mh&&k.height>f.mh){H=(k.height-f.mh)/k.height;v()}}if(f.h)k.style.marginTop=Math.max(f.h-k.height,
0)/2+"px";w(k);m.length>1&&b(k).css({cursor:"pointer"}).click(p.next);if(C)k.style.msInterpolationMode="bicubic"};k.src=i}else b("<div />").appendTo(J).load(i,function(H,Q){Q==="success"?w(this):w(b("<p>Request unsuccessful.</p>"))})};p.next=function(){if(!S){F=F<m.length-1?F+1:0;p.load()}};p.prev=function(){if(!S){F=F>0?F-1:m.length-1;p.load()}};p.slideshow=function(){function i(){I.text(f.slideshowStop).bind(da,function(){v=setTimeout(p.next,f.slideshowSpeed)}).bind(Z,function(){clearTimeout(v)}).one("click",
function(){k();b(this).removeClass(l)});t.removeClass(w+"off").addClass(w+"on")}var k,v,w="cboxSlideshow_";I.bind("cbox_closed",function(){I.unbind();clearTimeout(v);t.removeClass(w+"off "+w+"on")});k=function(){clearTimeout(v);I.text(f.slideshowStart).unbind(da+" "+Z).one("click",function(){i();v=setTimeout(p.next,f.slideshowSpeed);b(this).removeClass(l)});t.removeClass(w+"on").addClass(w+"off")};if(f.slideshow&&m.length>1)f.slideshowAuto?i():k()};p.close=function(){b.event.trigger("cbox_cleanup");
f.onCleanup&&f.onCleanup.call(x);z=false;b(document).unbind("keydown.cbox_close keydown.cbox_arrows");s.unbind(ha+" resize.cboxie6 scroll.cboxie6");U.css({cursor:"auto"}).fadeOut("fast");t.stop(o,false).fadeOut("fast",function(){b("#colorbox iframe").attr("src","about:blank");r.remove();t.css({opacity:1});try{Y.focus()}catch(i){}b.event.trigger("cbox_closed");f.onClosed&&f.onClosed.call(x)})};p.element=function(){return b(x)};p.settings=P;b(p.init)})(jQuery);
(function(b){b.address=function(){var a=function(e){b(b.address).trigger(b.extend(b.Event(e),function(){for(var j={},A=b.address.parameterNames(),B=0,O=A.length;B<O;B++)j[A[B]]=b.address.parameter(A[B]);return{value:b.address.value(),path:b.address.path(),pathNames:b.address.pathNames(),parameterNames:A,parameters:j,queryString:b.address.queryString()}}.call(b.address)))},c=function(e,j,A){b(b.address).bind(e,j,A);return b.address},d=function(){var e=q.href.indexOf("#");return e!=-1?F(Y(l(q.href.substr(e+
1),s))):""},g=function(e,j){if(r.strict)e=j?e.substr(0,1)!="/"?"/"+e:e:e==""?"/":e;return e},h=function(e,j){return L&&q.protocol=="file:"?j?y.replace(/\?/,"%3F"):y.replace(/%253F/,"?"):e},l=function(e,j){if(r.crawlable&&j)return(e!=""?"!":"")+e;return e.replace(/^\!/,"")},o=function(e,j){return parseInt(e.css(j),10)},p=function(e){for(var j,A,B=0,O=e.childNodes.length;B<O;B++){if(e.childNodes[B].src)j=String(e.childNodes[B].src);if(A=p(e.childNodes[B]))j=A}return j},C=function(){if(!w){var e=d(),
j=y!=e;if(I&&E<523){if(v!=N.length){v=N.length;if(typeof ba[v-1]!=G)y=ba[v-1];V(s)}}else if(L&&E<7&&j)q.reload();else if(j){y=e;V(s)}}},V=function(e){a(ea);a(e?fa:ga);x(ia,10)},ia=function(){var e=(q.pathname+(/\/$/.test(q.pathname)?"":"/")+(b.address?b.address.value():"")).replace(/\/\//,"/").replace(/^\/$/,""),j=D[r.tracker];if(typeof j==M)j(e);else if(typeof urchinTracker==M)urchinTracker(e);else if(typeof pageTracker!=G&&typeof pageTracker._trackPageview==M)pageTracker._trackPageview(e);else typeof _gaq!=
G&&typeof _gaq.push==M&&_gaq.push(["_trackPageview",e])},Z=function(){var e=z.contentWindow.document;e.open();e.write("<html><head><title>"+u.title+"</title><script>var "+t+' = "'+d()+'";<\/script></head></html>');e.close()},da=function(){if(!H){H=m;var e=b("body").ajaxComplete(function(){U.call(this)}).trigger("ajaxComplete");if(r.wrap){b("body > *").wrapAll('<div style="padding:'+(o(e,"marginTop")+o(e,"paddingTop"))+"px "+(o(e,"marginRight")+o(e,"paddingRight"))+"px "+(o(e,"marginBottom")+o(e,"paddingBottom"))+
"px "+(o(e,"marginLeft")+o(e,"paddingLeft"))+'px;" />').parent().wrap('<div id="'+t+'" style="height:100%; overflow:auto;'+(I?window.statusbar.visible&&!/chrome/i.test(f)?"":" resize:both;":"")+'" />');b("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"});I&&b('<style type="text/css" />').appendTo("head").text("#"+t+"::-webkit-resizer { background-color: #fff; }")}if(L&&E<8){e=u.getElementsByTagName("frameset")[0];z=u.createElement((e?"":"i")+"frame");if(e){e.insertAdjacentElement("beforeEnd",
z);e[e.cols?"cols":"rows"]+=",0";z.src="javascript:"+s;z.noResize=m;z.frameBorder=z.frameSpacing=0}else{z.src="javascript:"+s;z.style.display="none";u.body.insertAdjacentElement("afterBegin",z)}x(function(){b(z).bind("load",function(){var j=z.contentWindow;y=typeof j[t]!=G?j[t]:"";if(y!=d()){V(s);q.hash=h(l(y,m),m)}});typeof z.contentWindow[t]==G&&Z()},50)}else if(I){if(E<418){b(u.body).append('<form id="'+t+'" style="position:absolute;top:-9999px;" method="get"></form>');S=u.getElementById(t)}if(typeof q[t]==
G)q[t]={};if(typeof q[t][q.pathname]!=G)ba=q[t][q.pathname].split(",")}x(function(){a("init");V(s)},1);if(L&&E>7||!L&&"on"+W in D)if(D.addEventListener)D.addEventListener(W,C,false);else D.attachEvent&&D.attachEvent("on"+W,C);else X(C,50);b("a").filter("[rel*=address:]").address()}},ha=function(){if(D.removeEventListener)D.removeEventListener(W,C,false);else D.detachEvent&&D.detachEvent("on"+W,C)},U=function(){var e=q.pathname.replace(/\/$/,"");b("body").html().indexOf("_escaped_fragment_")!=-1&&
b("a[href]:not([href^=http])",this).each(function(){var j=b(this).attr("href").replace(RegExp(e+"/?$"),"");if(j==""||j.indexOf("_escaped_fragment_")!=-1)b(this).attr("href","#"+decodeURIComponent(j.replace(/\/(.*)\?_escaped_fragment_=(.*)$/,"!$2")))})},t="jQueryAddress",M="function",G="undefined",W="hashchange",ea="change",fa="internalChange",ga="externalChange",m=true,s=false,r={autoUpdate:m,crawlable:s,history:m,strict:m,wrap:s},J=b.browser,E=parseFloat(b.browser.version),$=J.mozilla,L=J.msie,K=
J.opera,I=J.safari,T=s,D;try{D=top.document!==undefined?top:window}catch(ja){D=window}var u=D.document,N=D.history,q=D.location,X=setInterval,x=setTimeout,Y=decodeURI,F=encodeURI,f=navigator.userAgent,z,S,P=p(document),i=P?P.indexOf("?"):-1,k=u.title,v=N.length,w=s,H=s,Q=m,aa=m,R=s,ba=[],y=d();if(L){E=parseFloat(f.substr(f.indexOf("MSIE")+4));if(u.documentMode&&u.documentMode!=E)E=u.documentMode!=8?7:8;b(document).bind("propertychange",function(){if(u.title!=k&&u.title.indexOf("#"+d())!=-1)u.title=
k})}if(T=$&&E>=1||L&&E>=6||K&&E>=9.5||I&&E>=312){for(J=1;J<v;J++)ba.push("");ba.push(y);if(L&&q.hash!=y)q.hash="#"+h(l(y,m),m);if(K)history.navigationMode="compatible";if(P&&i!=-1){P=P.substr(i+1).split("&");for(J=0;J<P.length;J++){K=P[J].split("=");if(/^(autoUpdate|crawlable|history|strict|wrap)$/.test(K[0]))r[K[0]]=isNaN(K[1])?/^(true|yes)$/i.test(K[1]):parseInt(K[1],10)!==0;if(/^tracker$/.test(K[0]))r[K[0]]=K[1]}}document.readyState=="complete"&&da();b(da);b(window).bind("unload",ha)}else if(!T&&
d()!=""||I&&E<418&&d()!=""&&q.search!=""){u.open();u.write('<html><head><meta http-equiv="refresh" content="0;url='+encodeURI(q.href.substr(0,q.href.indexOf("#")))+'" /></head></html>');u.close()}else ia();return{bind:function(e,j,A){return c(e,j,A)},init:function(e){return c("init",e)},change:function(e){return c(ea,e)},internalChange:function(e){return c(fa,e)},externalChange:function(e){return c(ga,e)},baseURL:function(){var e=q.href;if(e.indexOf("#")!=-1)e=e.substr(0,e.indexOf("#"));if(/\/$/.test(e))e=
e.substr(0,e.length-1);return e},autoUpdate:function(e){if(e!==undefined){r.autoUpdate=e;return this}return r.autoUpdate},crawlable:function(e){if(e!==undefined){r.crawlable=e;return this}return r.crawlable},history:function(e){if(e!==undefined){r.history=e;return this}return r.history},strict:function(e){if(e!==undefined){r.strict=e;return this}return r.strict},tracker:function(e){if(e!==undefined){r.tracker=e;return this}return r.tracker},wrap:function(e){if(e!==undefined){r.wrap=e;return this}return r.wrap},
update:function(){R=m;this.value(y);R=s;return this},title:function(e){if(e!==undefined){e=Y(e);x(function(){k=u.title=e;if(aa&&z&&z.contentWindow&&z.contentWindow.document){z.contentWindow.document.title=e;aa=s}if(!Q&&$)q.replace(q.href.indexOf("#")!=-1?q.href:q.href+"#");Q=s},50);return this}return u.title},value:function(e){if(e!==undefined){e=F(Y(g(e,m)));if(e=="/")e="";if(y==e&&!R)return;Q=m;y=e;if(r.autoUpdate||R){w=m;V(m);ba[N.length]=y;if(I)if(r.history){q[t][q.pathname]=ba.toString();v=N.length+
1;if(E<418){if(q.search==""){S.action="#"+l(y,m);S.submit()}}else if(E<523||y==""){e=u.createEvent("MouseEvents");e.initEvent("click",m,m);var j=u.createElement("a");j.href="#"+l(y,m);j.dispatchEvent(e)}else q.hash="#"+l(y,m)}else q.replace("#"+l(y,m));else if(y!=d())if(r.history)q.hash="#"+h(l(y,m),m);else q.replace("#"+l(y,m));L&&E<8&&r.history&&x(Z,50);if(I)x(function(){w=s},1);else w=s}return this}if(!T)return null;return Y(g(h(y,s),s))},path:function(e){if(e!==undefined){var j=this.queryString(),
A=this.hash();this.value(e+(j?"?"+j:"")+(A?"#"+A:""));return this}return this.value().split("#")[0].split("?")[0]},queryString:function(e){if(e!==undefined){var j=this.hash();this.value(this.path()+(e?"?"+e:"")+(j?"#"+j:""));return this}e=this.value().split("?");return e.slice(1,e.length).join("?").split("#")[0]},parameter:function(e,j,A){var B,O;if(j!==undefined){var ka=this.parameterNames();O=[];for(B=0;B<ka.length;B++){var la=ka[B],ca=this.parameter(la);if(typeof ca=="string")ca=[ca];if(la==e)ca=
j===null||j===""?[]:A?ca.concat([j]):[j];for(var ma=0;ma<ca.length;ma++)O.push(la+"="+ca[ma])}b.inArray(e,ka)==-1&&j!==null&&j!==""&&O.push(e+"="+j);this.queryString(O.join("&"));return this}if(j=this.queryString()){O=j.split("&");j=[];for(B=0;B<O.length;B++){A=O[B].split("=");A[0]==e&&j.push(A[1])}if(j.length!==0)return j.length!=1?j:j[0]}},pathNames:function(){var e=this.path(),j=e.replace(/\/{2,9}/g,"/").split("/");if(e.substr(0,1)=="/"||e.length===0)j.splice(0,1);e.substr(e.length-1,1)=="/"&&
j.splice(j.length-1,1);return j},parameterNames:function(){var e=this.queryString(),j=[];if(e&&e.indexOf("=")!=-1){e=e.split("&");for(var A=0;A<e.length;A++){var B=e[A].split("=")[0];b.inArray(B,j)==-1&&j.push(B)}}return j},hash:function(e){if(e!==undefined){this.value(this.value().split("#")[0]+(e?"#"+e:""));return this}e=this.value().split("#");return e.slice(1,e.length).join("#")}}}();b.fn.address=function(a){var c=function(){if(b(this).is("a")){var d=a?a.call(this):/address:/.test(b(this).attr("rel"))?
b(this).attr("rel").split("address:")[1].split(" ")[0]:b(this).attr("href").replace(/^#\!?/,"");b.address.value(d);return false}};b(this).click(c).live("click",c);b(this).live("submit",function(){if(b(this).is("form")){var d=a?a.call(this):b(this).attr("action")+"?"+b(this).serialize();b.address.value(d);return false}});return this}})(jQuery);
(function(b){b.toJSON=function(d){if(typeof JSON=="object"&&JSON.stringify)return JSON.stringify(d);var g=typeof d;if(d===null)return"null";if(g!="undefined"){if(g=="number"||g=="boolean")return d+"";if(g=="string")return b.quoteString(d);if(g=="object"){if(typeof d.toJSON=="function")return b.toJSON(d.toJSON());if(d.constructor===Date){var h=d.getUTCMonth()+1;if(h<10)h="0"+h;var l=d.getUTCDate();if(l<10)l="0"+l;g=d.getUTCFullYear();var o=d.getUTCHours();if(o<10)o="0"+o;var p=d.getUTCMinutes();if(p<
10)p="0"+p;var C=d.getUTCSeconds();if(C<10)C="0"+C;d=d.getUTCMilliseconds();if(d<100)d="0"+d;if(d<10)d="0"+d;return'"'+g+"-"+h+"-"+l+"T"+o+":"+p+":"+C+"."+d+'Z"'}if(d.constructor===Array){h=[];for(l=0;l<d.length;l++)h.push(b.toJSON(d[l])||"null");return"["+h.join(",")+"]"}h=[];for(l in d){g=typeof l;if(g=="number")g='"'+l+'"';else if(g=="string")g=b.quoteString(l);else continue;if(typeof d[l]!="function"){o=b.toJSON(d[l]);h.push(g+":"+o)}}return"{"+h.join(", ")+"}"}}};b.evalJSON=function(d){if(typeof JSON==
"object"&&JSON.parse)return JSON.parse(d);return eval("("+d+")")};b.secureEvalJSON=function(d){if(typeof JSON=="object"&&JSON.parse)return JSON.parse(d);var g=d;g=g.replace(/\\["\\\/bfnrtu]/g,"@");g=g.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");g=g.replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(g))return eval("("+d+")");else throw new SyntaxError("Error parsing JSON, source is not valid.");};b.quoteString=function(d){if(d.match(a))return'"'+d.replace(a,
function(g){var h=c[g];if(typeof h==="string")return h;h=g.charCodeAt();return"\\u00"+Math.floor(h/16).toString(16)+(h%16).toString(16)})+'"';return'"'+d+'"'};var a=/["\\\x00-\x1f\x7f-\x9f]/g,c={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"}})(jQuery);