
jQuery.fn.center=function(f){return this.each(function(){var p=this.parentNode;if(jQuery.css(p,"position")=='static')p.style.position='relative';var s=this.style;s.position='absolute';if(!f||f=="horizontal"){if(((parseInt(jQuery.css(p,"width"))-parseInt(jQuery.css(this,"width")))/2)>0)s.left=((parseInt(jQuery.css(p,"width"))-parseInt(jQuery.css(this,"width")))/2)+"px";else
s.left="0";}if(!f||f=="vertical"){if(((parseInt(jQuery.css(p,"height"))-parseInt(jQuery.css(this,"height")))/2)>0){s.top=((parseInt(jQuery.css(p,"height"))-parseInt(jQuery.css(this,"height")))/2)+"px";}else{if(p.nodeName.toLowerCase()=="body"){if(window.innerHeight)var clientHeight=window.innerHeight;else if(document.body&&document.body.offsetHeight)var clientHeight=document.body.offsetHeight;s.top=((clientHeight-parseInt(jQuery.css(this,"height")))/2)+"px";}else{s.top="0";}}}});};jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value="";options.expires=-1;}var expires='';if(options.expires){var date;if(typeof options.expires=='string'&&options.expires.match(/^[+-]?[0-9]+[YMWDhms]$/)!==null){var match=options.expires.match(/^([+-]?[0-9]+)([YMDWhms])$/);options.expires=parseInt(match[0],10)*(({"Y":(60*60*24*365),"M":(60*60*24*365/12),"W":(60*60*24*7),"D":(60*60*24),"h":(60*60),"m":(60),"s":(1)}[match[1]])||0);date=new Date();date.setTime(date.getTime()+options.expires*1000);}else if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+options.expires*24*60*60*1000);}else if(typeof options.expires.toGMTString!='undefined')date=options.expires;else
throw"invalid \"expires\" option";expires='; expires='+date.toGMTString();}var path=options.path?'; path='+options.path:'';var domain=options.domain?'; domain='+options.domain:'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};jQuery.fn._height=jQuery.fn.height;jQuery.fn._width=jQuery.fn.width;jQuery.fn.height=function(){if(this[0]==window)return self.innerHeight||jQuery.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;if(this[0]==document)return Math.max(document.body.scrollHeight,document.body.offsetHeight);return this._height(arguments[0]);};jQuery.fn.width=function(){if(this[0]==window)return self.innerWidth||jQuery.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;if(this[0]==document)return Math.max(document.body.scrollWidth,document.body.offsetWidth);return this._width(arguments[0]);};jQuery.fn.innerHeight=function(){return this[0]==window||this[0]==document?this.height():this.css('display')!='none'?this[0].offsetHeight-(parseInt(this.css("borderTopWidth"))||0)-(parseInt(this.css("borderBottomWidth"))||0):this.height()+(parseInt(this.css("paddingTop"))||0)+(parseInt(this.css("paddingBottom"))||0);};jQuery.fn.innerWidth=function(){return this[0]==window||this[0]==document?this.width():this.css('display')!='none'?this[0].offsetWidth-(parseInt(this.css("borderLeftWidth"))||0)-(parseInt(this.css("borderRightWidth"))||0):this.height()+(parseInt(this.css("paddingLeft"))||0)+(parseInt(this.css("paddingRight"))||0);};jQuery.fn.outerHeight=function(){return this[0]==window||this[0]==document?this.height():this.css('display')!='none'?this[0].offsetHeight:this.height()+(parseInt(this.css("borderTopWidth"))||0)+(parseInt(this.css("borderBottomWidth"))||0)+(parseInt(this.css("paddingTop"))||0)+(parseInt(this.css("paddingBottom"))||0);};jQuery.fn.outerWidth=function(){return this[0]==window||this[0]==document?this.width():this.css('display')!='none'?this[0].offsetWidth:this.height()+(parseInt(this.css("borderLeftWidth"))||0)+(parseInt(this.css("borderRightWidth"))||0)+(parseInt(this.css("paddingLeft"))||0)+(parseInt(this.css("paddingRight"))||0);};jQuery.fn.scrollLeft=function(){if(this[0]==window||this[0]==document)return self.pageXOffset||jQuery.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;return this[0].scrollLeft;};jQuery.fn.scrollTop=function(){if(this[0]==window||this[0]==document)return self.pageYOffset||jQuery.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;return this[0].scrollTop;};jQuery.fn.offset=function(options,returnObject){var x=0,y=0,elem=this[0],parent=this[0],op,sl=0,st=0,options=jQuery.extend({margin:true,border:true,padding:false,scroll:true},options||{});do{x+=parent.offsetLeft||0;y+=parent.offsetTop||0;if(jQuery.browser.mozilla||jQuery.browser.msie){var bt=parseInt(jQuery.css(parent,'borderTopWidth'))||0;var bl=parseInt(jQuery.css(parent,'borderLeftWidth'))||0;x+=bl;y+=bt;if(jQuery.browser.mozilla&&parent!=elem&&jQuery.css(parent,'overflow')!='visible'){x+=bl;y+=bt;}}if(options.scroll){op=parent.offsetParent;do{sl+=parent.scrollLeft||0;st+=parent.scrollTop||0;parent=parent.parentNode;if(jQuery.browser.mozilla&&parent!=elem&&parent!=op&&jQuery.css(parent,'overflow')!='visible'){y+=parseInt(jQuery.css(parent,'borderTopWidth'))||0;x+=parseInt(jQuery.css(parent,'borderLeftWidth'))||0;}}while(parent!=op);}else
parent=parent.offsetParent;if(parent&&(parent.tagName.toLowerCase()=='body'||parent.tagName.toLowerCase()=='html')){if((jQuery.browser.safari||(jQuery.browser.msie&&jQuery.boxModel))&&jQuery.css(parent,'position')!='absolute'){x+=parseInt(jQuery.css(op,'marginLeft'))||0;y+=parseInt(jQuery.css(op,'marginTop'))||0;}break;}}while(parent);if(!options.margin){x-=parseInt(jQuery.css(elem,'marginLeft'))||0;y-=parseInt(jQuery.css(elem,'marginTop'))||0;}if(options.border&&(jQuery.browser.safari||jQuery.browser.opera)){x+=parseInt(jQuery.css(elem,'borderLeftWidth'))||0;y+=parseInt(jQuery.css(elem,'borderTopWidth'))||0;}else if(!options.border&&!(jQuery.browser.safari||jQuery.browser.opera)){x-=parseInt(jQuery.css(elem,'borderLeftWidth'))||0;y-=parseInt(jQuery.css(elem,'borderTopWidth'))||0;}if(options.padding){x+=parseInt(jQuery.css(elem,'paddingLeft'))||0;y+=parseInt(jQuery.css(elem,'paddingTop'))||0;}if(options.scroll&&jQuery.browser.opera&&jQuery.css(elem,'display')=='inline'){sl-=elem.scrollLeft||0;st-=elem.scrollTop||0;}var returnValue=options.scroll?{top:y-st,left:x-sl,scrollTop:st,scrollLeft:sl}:{top:y,left:x};if(returnObject){jQuery.extend(returnObject,returnValue);return this;}else{return returnValue;}};jQuery.fn.bgIframe=jQuery.fn.bgiframe=function(){if(!(jQuery.browser.msie&&typeof XMLHttpRequest=='function'))return this;var html='<iframe class="bgiframe" src="javascript:;" tabindex="-1" '+'style="display:block; position:absolute; '+'top: expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)  || 0) * -1) + \'px\'); '+'left:expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth) || 0) * -1) + \'px\'); '+'z-index:-1; filter:Alpha(Opacity=\'0\'); '+'width:expression(this.parentNode.offsetWidth + \'px\'); '+'height:expression(this.parentNode.offsetHeight + \'px\')"/>';return this.each(function(){if(!jQuery('iframe.bgiframe',this)[0])this.insertBefore(document.createElement(html),this.firstChild);});};(function($){$.fn.tabs=function(initial,settings){if(typeof initial=='object')settings=initial;settings=$.extend({initial:(initial&&typeof initial=='number'&&initial>0)?--initial:0,disabled:null,bookmarkable:$.ajaxHistory?true:false,remote:false,fxFade:null,fxSlide:null,fxShow:null,fxHide:null,fxSpeed:'normal',fxShowSpeed:null,fxHideSpeed:null,fxAutoHeight:false,onClick:null,onHide:null,onShow:null,selectedClass:'tabs-selected',disabledClass:'tabs-disabled',hideClass:'tabs-hide',loadingClass:'tabs-loading',tabStruct:'div'},settings||{});$.browser.msie6=$.browser.msie6||$.browser.msie&&typeof XMLHttpRequest=='function';function unFocus(){scrollTo(0,0);}return this.each(function(){var container=this;var tabs=$('>ul:eq(0)>li>a',this);if(settings.remote){var remoteUrls={};tabs.each(function(i){var id='tabs-remote-'+(i+1);var hash='#'+id;remoteUrls[hash]=this.href;this.href=hash;$(container).append('<div id="'+id+'" class="fragment"></div>');});}if(location.hash){tabs.each(function(i){if(this.hash==location.hash){settings.initial=i;if(($.browser.msie||$.browser.opera)&&!settings.remote){var toShow=$(location.hash);var toShowId=toShow.attr('id');toShow.attr('id','');setTimeout(function(){toShow.attr('id',toShowId);},500);}unFocus();return false;}});}if($.browser.msie){unFocus();}$('>'+settings.tabStruct,this).filter(':eq('+settings.initial+')').show().end().not(':eq('+settings.initial+')').addClass(settings.hideClass);if(!settings.remote){$('>ul:eq(0)>li:eq('+settings.initial+')',this).addClass(settings.selectedClass);}if(settings.fxAutoHeight){var tabsContents=$('>'+settings.tabStruct,container);var _setAutoHeight=function(reset){var heights=$.map(tabsContents.get(),function(el){var h,jq=$(el);if(reset){if($.browser.msie6){el.style.removeExpression('behaviour');el.style.height='';el.minHeight=null;}h=jq.css({'min-height':''}).height();}else{h=jq.height();}return h;}).sort(function(a,b){return b-a;});if($.browser.msie6){tabsContents.each(function(){this.minHeight=heights[0]+'px';this.style.setExpression('behaviour','this.style.height = this.minHeight ? this.minHeight : "1px"');});}else{tabsContents.css({'min-height':heights[0]+'px'});}};_setAutoHeight();var cachedWidth=container.offsetWidth;var cachedHeight=container.offsetHeight;var watchFontSize=$('#tabs-watch-font-size').get(0)||$('<span id="tabs-watch-font-size">M</span>').css({display:'block',position:'absolute',visibility:'hidden'}).appendTo(document.body).get(0);var cachedFontSize=watchFontSize.offsetHeight;setInterval(function(){var currentWidth=container.offsetWidth;var currentHeight=container.offsetHeight;var currentFontSize=watchFontSize.offsetHeight;if(currentHeight>cachedHeight||currentWidth!=cachedWidth||currentFontSize!=cachedFontSize){_setAutoHeight((currentWidth>cachedWidth||currentFontSize<cachedFontSize));cachedWidth=currentWidth;cachedHeight=currentHeight;cachedFontSize=currentFontSize;}},50);}var showAnim={},hideAnim={},showSpeed=settings.fxShowSpeed||settings.fxSpeed,hideSpeed=settings.fxHideSpeed||settings.fxSpeed;if(settings.fxSlide||settings.fxFade){if(settings.fxSlide){showAnim['height']='show';hideAnim['height']='hide';}if(settings.fxFade){showAnim['opacity']='show';hideAnim['opacity']='hide';}}else{if(settings.fxShow){showAnim=settings.fxShow;}else{showAnim['min-width']=0;showSpeed=settings.bookmarkable?50:1;}if(settings.fxHide){hideAnim=settings.fxHide;}else{hideAnim['min-width']=0;hideSpeed=settings.bookmarkable?50:1;}}var onClick=settings.onClick,onHide=settings.onHide,onShow=settings.onShow;tabs.bind('triggerTab',function(){var hash=this.hash;if($(hash).is(':hidden')&&!$(this.parentNode).is('.'+settings.disabledClass)){if($.browser.msie){$(this).click();if(settings.bookmarkable){$.ajaxHistory.update(hash);location.hash=hash.replace('#','');}}else if($.browser.safari){var tempForm=$('<form action="'+hash+'"><div><input type="submit" value="h" /></div></form>').get(0);tempForm.submit();$(this).click();if(settings.bookmarkable){$.ajaxHistory.update(hash);}}else{if(settings.bookmarkable){location.hash=hash.replace('#','');}else{$(this).click();}}}});tabs.bind('disableTab',function(){$(this.parentNode).addClass(settings.disabledClass);});if(settings.disabled&&settings.disabled.length){for(var i=0,k=settings.disabled.length;i<k;i++){tabs.eq(--settings.disabled[i]).trigger('disableTab').end();}};tabs.bind('enableTab',function(){var jq=$(this.parentNode);jq.removeClass(settings.disabledClass);if($.browser.safari){jq.fadeTo(1,1.0).css({display:'',opacity:1});setTimeout(function(){jq.css({opacity:''});},30);}});tabs.bind('click',function(e){var trueClick=e.clientX;var jqLi=$(this.parentNode);if(container.locked||jqLi.is('.'+settings.selectedClass)||jqLi.is('.'+settings.disabledClass)){this.blur();return false;}container['locked']=true;var toShow=$(this.hash);if(toShow.size()>0){if($.browser.msie&&settings.bookmarkable){var toShowId=this.hash.replace('#','');toShow.attr('id','');setTimeout(function(){toShow.attr('id',toShowId);},0);}var clicked=this;var toHide=$('>'+settings.tabStruct+':visible',container);if(typeof onClick=='function'){setTimeout(function(){onClick(clicked,toShow[0],toHide[0]);},0);}function switchTab(){if(settings.bookmarkable&&trueClick){$.ajaxHistory.update(clicked.hash);}toHide.animate(hideAnim,hideSpeed,function(){$(clicked.parentNode).addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass);if(typeof onHide=='function'){onHide(clicked,toShow[0],toHide[0]);}toHide.addClass(settings.hideClass).css({display:'',overflow:'',height:'',opacity:''});toShow.removeClass(settings.hideClass).animate(showAnim,showSpeed,function(){toShow.css({overflow:'',height:'',opacity:''});if($.browser.msie){toHide[0].style.filter='';toShow[0].style.filter='';}if(typeof onShow=='function'){onShow(clicked,toShow[0],toHide[0]);}container.locked=null;});});}if(!settings.remote){switchTab();}else{var jqThis=$(this);jqThis.addClass(settings.loadingClass);setTimeout(function(){$(clicked.hash).load(remoteUrls[clicked.hash],function(){switchTab();jqThis.removeClass(settings.loadingClass);});},0);}}else{alert('There is no such container.');}var scrollX=window.pageXOffset||document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft||0;var scrollY=window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop||0;setTimeout(function(){window.scrollTo(scrollX,scrollY);},0);this.blur();return settings.bookmarkable;});if(settings.remote){tabs.eq(settings.initial).trigger('click').end();}if(settings.bookmarkable){$.ajaxHistory.initialize(function(){tabs.eq(settings.initial).trigger('click').end();});}});};var tabEvents=['triggerTab','disableTab','enableTab'];for(var i=0;i<tabEvents.length;i++){$.fn[tabEvents[i]]=(function(tabEvent){return function(tabIndex){return this.each(function(){var i=tabIndex&&tabIndex>0&&tabIndex-1||0;$('>ul:eq(0)>li>a',this).eq(i).trigger(tabEvent);});};})(tabEvents[i]);}})(jQuery);jQuery.extend(jQuery.fn,{validate:function(options){var validator=new jQuery.validator(options,this);validator.elements=this.find(":input:not(:submit):not(:reset)").focus(function(){validator.lastActive=this;});if(validator.settings.onsubmit){this.submit(function(event){if(validator.settings.debug)event.preventDefault();return validator.form();});}if(validator.settings.event){validator.elements.bind(validator.settings.event,function(){validator.element(this);});}return validator;},push:function(t){return this.setArray(jQuery.merge(this.get(),t));},forId:function(id){return this.filter("[@for="+id+"]");}});jQuery.validator=function(options,form){this.settings=jQuery.extend({},jQuery.validator.defaults,options);this.currentForm=form[0];this.labelContainer=this.settings.errorLabelContainer;this.errorContext=this.labelContainer.length&&this.labelContainer||form;this.containers=this.settings.errorContainer.add(this.settings.errorLabelContainer);this.reset();};jQuery.extend(jQuery.validator,{defaults:{messages:{},errorClass:"error",focusInvalid:true,errorContainer:jQuery([]),errorLabelContainer:jQuery([]),onsubmit:true},setDefaults:function(settings){jQuery.extend(jQuery.validator.defaults,settings);},messages:{required:"This field is required.",maxLength:"Please enter a value no longer then {0} characters.",minLength:"Please enter a value of at least {0} characters.",rangeLength:"Please enter a value between {0} and {1} characters long.",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黮tiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",equalTo:"Please enter the same value again.",rangeValue:"Please enter a value between {0} and {1}.",maxValue:"Please enter a value less than or equal to {0}.",minValue:"Please enter a value greater than or equal to {0}."},prototype:{form:function(){this.prepareForm();for(var i=0,element;element=this.elements[i++];){this.check(element);}return this.valid();},element:function(element){this.prepareElement(element);this.check(element);this.showErrors();},showErrors:function(errors){if(errors)jQuery.extend(this.errorList,errors);this.settings.showErrors?this.settings.showErrors(this.errorList,this):this.defaultShowErrors();},clean:function(selector){return jQuery(selector)[0];},errors:function(){return jQuery("label."+this.settings.errorClass,this.errorContext);},reset:function(element){this.errorList={};this.toShow=$([]);this.toHide=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().push(this.containers);this.toShow.push(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errors().forId(this.findId(this.clean(element)));},check:function(element){element=this.clean(element);jQuery(element).removeClass(this.settings.errorClass);var rules=this.rules(element);for(var i=0,rule;rule=rules[i++];){try{var result=jQuery.validator.methods[rule.method](jQuery.trim(element.value),element,rule.parameters);if(result===-1)break;if(!result){jQuery(element).addClass(this.settings.errorClass);this.formatAndAdd(rule,element);break;}}catch(e){this.settings.debug&&window.console&&console.error("exception occured when checking element "+element.id
+", check the '"+rule.method+"' method");throw e;}}},message:function(id,rule){var m=this.settings.messages[id];return m&&(m.constructor==String?m:m[rule.method]);},formatAndAdd:function(rule,element){var id=this.findId(element),param=rule.parameters;this.errorList[id]=(element.title||this.message(id,rule)||jQuery.validator.messages[rule.method]||"<strong>Warning: No message defined for "+id+"</strong>").replace("{0}",(param.constructor==Array?param[0]:param)||"").replace("{1}",param[1]||"");},valid:function(){if(this.countErrors()){this.showErrors();return false;}else{this.hideErrors();if(this.settings.submitHandler){this.settings.submitHandler(this.currentForm);return false;}return true;}},countErrors:function(){var count=0;jQuery.each(this.errorList,function(){count++;});return count;},hideErrors:function(){this.toggle("Hide");},toggle:function(that){var self=this;function which(){return self["to"+that];}if(this.settings.wrapper){which().push(which().parents(this.settings.wrapper));}which()[that.toLowerCase()]();return this;},defaultShowErrors:function(){var first=true;for(var elementID in this.errorList){if(first&&this.settings.focusInvalid){if(this.lastActive&&this.errorList[this.lastActive.id])this.lastActive.focus();else{try{var element=jQuery("#"+elementID);if(element.length)element[0].focus();}catch(e){this.settings.debug&&window.console&&console.error(e);}}first=false;}this.showError(elementID,this.errorList[elementID]);}this.toHide=this.toHide.not(this.toShow);this.toggle("Hide").toggle("Show");},showError:function(id,message){var error=this.errors().forId(id);if(error.length){if(error.attr("generated")){error.html(message);}}else{error=jQuery("<label>").attr({"for":id,generated:true}).addClass(this.settings.errorClass).html(message);if(this.settings.wrapper){error=error.hide().show().wrap("<"+this.settings.wrapper+">").parent();}if(!this.labelContainer.append(error).length)this.settings.errorPlacement?this.settings.errorPlacement(error,jQuery("#"+id)):error.insertAfter("#"+id);}this.toShow.push(error);},rules:function(element){if(!this.data(element))return[];var rules=[];jQuery.each(this.data(element),function(key,value){rules[rules.length]={method:key,parameters:value};});return rules;},data:function(element){return this.settings.rules?this.settings.rules[this.findId(element)]:this.settings.meta?jQuery(element).data()[this.settings.meta]:jQuery(element).data();},findId:function(element){var id=(/radio|checkbox/i.test(element.type))?element.name:element.id;if(!id){var formId=element.form.id,idcleanup=/[^a-zA-Z0-9\-_]/g;id=element.id=(formId?formId.replace(idcleanup,""):"")+element.name.replace(idcleanup,"");}return id;}},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return jQuery("option:selected",element).length;case'input':if(/radio|checkbox/i.test(element.type))return jQuery(element.form||document).find('[@name='+element.name+']: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!!jQuery(param,element.form).length;},"function":function(param,element){return param(element);}},methods:{required:function(value,element,param){if(!jQuery.validator.depend(param,element))return-1;switch(element.nodeName.toLowerCase()){case'select':var options=jQuery("option:selected",element);return options.length>0&&(element.type=="select-multiple"||options[0].value.length>0);case'input':switch(element.type.toLowerCase()){case'checkbox':case'radio':return jQuery.validator.getLength(value,element)>0;}default:return value.length>0;}},minLength:function(value,element,param){var length=jQuery.validator.getLength(value,element);return!jQuery.validator.methods.required(value,element)||length>=param;},maxLength:function(value,element,param){var length=jQuery.validator.getLength(value,element);return!jQuery.validator.methods.required(value,element)||length<=param;},rangeLength:function(value,element,param){var length=jQuery.validator.getLength(value,element);return!jQuery.validator.methods.required(value,element)||(length>=param[0]&&length<=param[1]);},minValue:function(value,element,param){return!jQuery.validator.methods.required(value,element)||value>=param;},maxValue:function(value,element,param){return!jQuery.validator.methods.required(value,element)||value<=param;},rangeValue:function(value,element,param){return!jQuery.validator.methods.required(value,element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return!jQuery.validator.methods.required(value,element)||/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/i.test(value);},url:function(value,element){return!jQuery.validator.methods.required(value,element)||/^(https?|ftp):\/\/[A-Z0-9](\.?[A-Z0-9能謁[A-Z0-9_\-能謁*)*(\/([A-Z0-9能謁[A-Z0-9_\-\.能謁*)?)*(\?([A-Z0-9能謁[A-Z0-9_\-\.%\+=&能謁*)?)?$/i.test(value);},date:function(value,element){return!jQuery.validator.methods.required(value,element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return!jQuery.validator.methods.required(value,element)||/^\d{4}[/-]\d{1,2}[/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return!jQuery.validator.methods.required(value,element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return!jQuery.validator.methods.required(value,element)||/^-?[,0-9]+(\.\d+)?$/.test(value);},numberDE:function(value,element){return!jQuery.validator.methods.required(value,element)||/^-?[\.0-9]+(,\d+)?$/.test(value);},digits:function(value,element){return!jQuery.validator.methods.required(value,element)||/^\d+$/.test(value);},equalTo:function(value,element,param){return value==jQuery(""+param).val();}},addMethod:function(name,method,message){jQuery.validator.methods[name]=method;jQuery.validator.messages[name]=message;}});(function(){function add(name,method){if(!Array.prototype[name]){Array.prototype[name]=method;}};add("forEach",function(handler,scope){scope=scope||window;for(var i=0;i<this.length;i++)handler.call(scope,this[i],i,this);});add("every",function(handler,scope){scope=scope||window;for(var i=0;i<this.length;i++)if(!handler.call(scope,this[i],i,this))return false;return true;});add("some",function(handler,scope){scope=scope||window;for(var i=0;i<this.length;i++)if(handler.call(scope,this[i],i,this))return true;return false;});add("map",function(handler,scope){scope=scope||window;var r=[];for(var i=0;i<this.length;i++)r[r.length]=handler.call(scope,this[i],i,this);return r;});add("filter",function(handler,scope){scope=scope||window;var r=[];for(var i=0;i<this.length;i++)if(handler.call(scope,this[i],i,this))r[r.length]=this[i];return r;});add("indexOf",function(subject,offset){for(var i=offset||0;i<this.length;i++)if(this[i]===subject)return i;return-1;});add("unique",function(){return this.filter(function(element,index,array){return array.indexOf(element)>=index;});});})();(function($){var helper,tTitle,tBody,tUrl,current,oldTitle,tID;$.fn.Tooltip=function(settings){settings=$.extend({},arguments.callee.defaults,settings);if(!helper){helper=$('<div id="tooltip"><h3></h3><p class="body"></p><p class="url"></p></div>').hide().css({position:'absolute',zIndex:"3000"}).appendTo('body');tTitle=$('h3',helper);tBody=$('p.body',helper);tUrl=$('p.url',helper);}$(this).filter('[@title]').each(function(){this.tSettings=settings;}).bind("mouseover",save).bind(settings.event,handle);return this;};function handle(event){if(this.tSettings.delay)tID=setTimeout(show,this.tSettings.delay);else
show();if(this.tSettings.track)$('body').bind('mousemove',update);update(event);$(this).bind('mouseout',hide);}function save(){if(this==current||!this.title)return;current=this;var source=$(this),settings=this.tSettings;var title=oldTitle=source.attr('title');source.attr('title','');if(settings.showBody){var parts=title.split(settings.showBody);tTitle.html(parts.shift());tBody.empty();for(var i=0,part;part=parts[i];i++){if(i>0)tBody.append("<br/>");tBody.append(part);}if(tBody.html())tBody.show();else
tBody.hide();}else{tTitle.html(title);tBody.hide();}var href=(source.attr('href')||source.attr('src'));if(settings.showURL&&href)tUrl.html(href.replace('http://','')).show();else
tUrl.hide();if(settings.extraClass){helper.addClass(settings.extraClass);}if(settings.fixPNG&&$.browser.msie){helper.each(function(){if(this.currentStyle.backgroundImage!='none'){var image=this.currentStyle.backgroundImage;image=image.substring(5,image.length-2);$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"});}});}}function show(){tID=null;helper.show();update();}function update(event){if(current==null){$('body').unbind('mousemove',update);return;}var left=helper[0].offsetLeft;var top=helper[0].offsetTop;if(event){left=event.pageX+15;top=event.pageY+15;helper.css({left:left+'px',top:top+'px'});}var v=viewport(),h=helper[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20;helper.css({left:left+'px'});}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20;helper.css({top:top+'px'});}}function viewport(){var e=document.documentElement||{},b=document.body||{},w=window;function min(){var v=Infinity;for(var i=0;i<arguments.length;i++){var n=arguments[i];if(n&&n<v)v=n;}return v;}return{x:w.pageXOffset||e.scrollLeft||b.scrollLeft||0,y:w.pageYOffset||e.scrollTop||b.scrollTop||0,cx:min(e.clientWidth,b.clientWidth,w.innerWidth),cy:min(e.clientHeight,b.clientHeight,w.innerHeight)};}function hide(){if(tID)clearTimeout(tID);current=null;helper.hide();if(this.tSettings.extraClass){helper.removeClass(this.tSettings.extraClass);}$(this).attr('title',oldTitle).unbind('mouseout',hide);if(this.tSettings.fixPNG&&$.browser.msie){helper.each(function(){$(this).css({'filter':'',backgroundImage:''});});}}$.fn.Tooltip.defaults={delay:250,event:"mouseover",track:false,showURL:true,showBody:null,extraClass:null,fixPNG:false};})(jQuery);
