function extractParamFromUri(uri,paramName){if(!uri){return;}
uri=uri.split('#')[0];var parts=uri.split('?');if(parts.length==1){return;}
var query=decodeURI(parts[1]);paramName+='=';var params=query.split('&');for(var i=0,param;param=params[i];++i){if(param.indexOf(paramName)===0){return unescape(param.split('=')[1]);}}}
$.extend($.expr[':'],{external:function(obj){return typeof obj.href!='undefined'&&obj.href!=''&&!obj.href.match(/^mailto\:/)&&!obj.href.match(/^javascript\:/)&&!obj.href.match(/^\#$/)&&(obj.hostname!=location.hostname);},mailto:function(obj){return typeof obj.href!='undefined'&&obj.href!=''&&obj.href.match(/^mailto\:/);},data:function(obj,index,meta){return $(obj).data(meta[3].split(',')[0])==meta[3].split(',')[1];}});$.extend($.fn,{here:function(msg)
{if(typeof console=='undefined')
return;console.log("%s: %o",msg,this);return this;},center:function(){if(this.css('position')!='absolute')
this.css("position","absolute");this.css('top',(($(window).height()-this.outerHeight())/2)+$(window).scrollTop()+"px").css('left',(($(window).width()-this.outerWidth())/2)+$(window).scrollLeft()+"px");return this;},autosenseDate:function()
{var selectedDate=$(this).val().match(/^([0-3]?[0-9])[\.-]?([0-1]?[0-9]?)[\.-]?(((19|20)?[0-9]{2})?)$/);if(!selectedDate)
{$(this).val('');return;}
if(!selectedDate[3])
{var now=new Date();selectedDate[3]=now.getUTCFullYear();if(now.getDate()>Number(selectedDate[1])&&now.getMonth()+1>=Number(selectedDate[2]))
{selectedDate[3]++;}}
selectedDate=$.datepicker.parseDate('ddmmyy',selectedDate.slice(1,4).join(''));$(this).val($.datepicker.formatDate($.datepicker._defaults.dateFormat,selectedDate));},autosenseTime:function()
{var selectedTime=$(this).val().match(/^([0-2]?[0-9])[:]?([0-5]?[0-9]?)[:]?([0-5]?[0-9]?)$/);if(!selectedTime)
{$(this).val('');return;}
if(selectedTime[1]<10)
{selectedTime[1]='0'+Number(selectedTime[1]);}
if(!selectedTime[2])
{selectedTime[2]=0;}
if(selectedTime[2]<10)
{selectedTime[2]='0'+Number(selectedTime[2]);}
if(!selectedTime[3])
{$(this).val(selectedTime.slice(1,3).join(':'));}
else
{if(selectedTime[3]<10)
{selectedTime[3]='0'+Number(selectedTime[3]);}
$(this).val(selectedTime.slice(1,4).join(':'));}}});$.document_path='';jQuery.cookie=function(key,value,options){if(arguments.length>1&&String(value)!=="[object Object]"){options=jQuery.extend({},options);if(value===null||value===undefined){options.expires=-1;}
if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}
value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}
options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;};(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)
data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)
return undefined;var e=elem.getElementsByTagName(settings.name);if(e.length)
data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)
data=attr;}
if(data.indexOf('{')<0)
data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);;(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
var method,action,url,$form=this;if(typeof options=='function'){options={success:options};}
method=this.attr('method');action=this.attr('action');url=(typeof action==='string')?$.trim(action):'';url=url||window.location.href||'';if(url){url=(url.match(/^([^#]+)/)||[])[1];}
options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options);var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}
var n,v,a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(n in options.data){if(options.data[n]instanceof Array){for(var k in options.data[n]){a.push({name:n,value:options.data[n][k]});}}
else{v=options.data[n];v=$.isFunction(v)?v():v;a.push({name:n,value:v});}}}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else{options.data=q;}
var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});}
if(options.clearForm){callbacks.push(function(){$form.clearForm();});}
if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(oldSuccess,arguments);});}
else if(options.success){callbacks.push(options.success);}
options.success=function(data,status,xhr){var context=options.context||options;for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(context,[data,status,xhr||$form,$form]);}};var fileInputs=$('input:file',this).length>0;var mp='multipart/form-data';var multipart=($form.attr('enctype')==mp||$form.attr('encoding')==mp);if(options.iframe!==false&&(fileInputs||options.iframe||multipart)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){fileUpload(a);});}
else{fileUpload(a);}}
else{if($.browser.msie&&method=='get'){var ieMeth=$form[0].getAttribute('method');if(typeof ieMeth==='string')
options.type=ieMeth;}
$.ajax(options);}
this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(a){var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var useProp=!!$.fn.prop;if(a){for(i=0;i<a.length;i++){el=$(form[a[i].name]);el[useProp?'prop':'attr']('disabled',false);}}
if($(':input[name=submit],:input[id=submit]',form).length){alert('Error: Form elements must not have name or id of "submit".');return;}
s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id='jqFormIO'+(new Date().getTime());if(s.iframeTarget){$io=$(s.iframeTarget);n=$io.attr('name');if(n==null)
$io.attr('name',id);else
id=n;}
else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />');$io.css({position:'absolute',top:'-1000px',left:'-1000px'});}
io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;$io.attr('src',s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,e,status);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}
if(g){$.event.trigger("ajaxSend",[xhr,s]);}
if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}
return;}
if(xhr.aborted){return;}
sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}}
var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document;return doc;}
function doSubmit(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(!method){form.setAttribute('method','POST');}
if(a!=s.url){form.setAttribute('action',s.url);}
if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}
if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);}
function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state.toLowerCase()=='uninitialized')
setTimeout(checkState,50);}
catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);timeoutHandle&&clearTimeout(timeoutHandle);timeoutHandle=undefined;}}
var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){extraInputs.push($('<input type="hidden" name="'+n+'" />').attr('value',s.extraData[n]).appendTo(form)[0]);}}
if(!s.iframeTarget){$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);}
setTimeout(checkState,15);form.submit();}
finally{form.setAttribute('action',a);if(t){form.setAttribute('target',t);}else{$form.removeAttr('target');}
$(extraInputs).remove();}}
if(s.forceSync){doSubmit();}
else{setTimeout(doSubmit,10);}
var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;}
try{doc=getDoc(io);}
catch(ex){log('cannot access response document: ',ex);e=SERVER_ABORT;}
if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');return;}
else if(e==SERVER_ABORT&&xhr){xhr.abort('server abort');return;}
if(!doc||doc.location.href==s.iframeSrc){if(!timedOut)
return;}
io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var status='success',errMsg;try{if(timedOut){throw'timeout';}
var isXml=s.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body==null||doc.body.innerHTML=='')){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}}
var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml)
s.dataType='xml';xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;}
var dt=s.dataType||'';var scr=/(json|script|text)/.test(dt.toLowerCase());if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;}
else if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerHTML;}
else if(b){xhr.responseText=b.innerHTML;}}}
else if(s.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}
try{data=httpData(xhr,s.dataType,s);}
catch(e){status='parsererror';xhr.error=errMsg=(e||status);}}
catch(e){log('error caught: ',e);status='error';xhr.error=errMsg=(e||status);}
if(xhr.aborted){log('upload aborted');status=null;}
if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?'success':'error';}
if(status==='success'){s.success&&s.success.call(s.context,data,'success',xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s]);}
else if(status){if(errMsg==undefined)
errMsg=xhr.statusText;s.error&&s.error.call(s.context,xhr,status,errMsg);g&&$.event.trigger("ajaxError",[xhr,s,errMsg]);}
g&&$.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");}
s.complete&&s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout)
clearTimeout(timeoutHandle);setTimeout(function(){if(!s.iframeTarget)
$io.remove();xhr.responseXML=null;},100);}
var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else{doc=(new DOMParser()).parseFromString(s,'text/xml');}
return(doc&&doc.documentElement&&doc.documentElement.nodeName!='parsererror')?doc:null;};var parseJSON=$.parseJSON||function(s){return window['eval']('('+s+')');};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=type==='xml'||!type&&ct.indexOf('xml')>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror'){$.error&&$.error('parsererror');}
if(s&&s.dataFilter){data=s.dataFilter(data,type);}
if(typeof data==='string'){if(type==='json'||!type&&ct.indexOf('json')>=0){data=parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data);}}
return data;};}};$.fn.ajaxForm=function(options){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;}
log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
return this.ajaxFormUnbind().bind('submit.form-plugin',function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(options);}}).bind('click.form-plugin',function(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(':submit');if(t.length==0){return;}
target=t[0];}
var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}}
setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic){var a=[];if(this.length===0){return a;}
var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els){return a;}
var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}
if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}
continue;}
v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}
else if(v!==null&&typeof v!='undefined'){a.push({name:n,value:v});}}
if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;}
var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}
else if(v!==null&&typeof v!='undefined'){a.push({name:this.name,value:v});}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length)){continue;}
v.constructor==Array?$.merge(val,v):val.push(v);}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(successful===undefined){successful=true;}
if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1)){return null;}
if(tag=='select'){var index=el.selectedIndex;if(index<0){return null;}
var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;}
if(one){return v;}
a.push(v);}}
return a;}
return $(el).val();};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=='textarea'){this.value='';}
else if(t=='checkbox'||t=='radio'){this.checked=false;}
else if(tag=='select'){this.selectedIndex=-1;}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}
return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select===undefined){select=true;}
return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio'){this.checked=select;}
else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false);}
this.selected=select;}});};function log(){var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log){window.console.log(msg);}
else if(window.opera&&window.opera.postError){window.opera.postError(msg);}};})(jQuery);if(typeof $.widget!='undefined')
{$.widget('ui.gmap',{markers:[],layers:[],_create:function(){var self=this;self.options=$.extend(true,{},$.ui.gmap.defaults,self.options);if(self._loadApi())
{self._initialize();}},_loadApi:function()
{var self=this,$element=self.element;if(typeof google=='undefined')
{$element.bind('googleLoaded.gmap',function(){$.ui.gmap.api.google.loaded=true;$element.unbind('googleLoaded.gmap');self._loadApi();});if($.ui.gmap.api.google.loading===true)
return false;$.ui.gmap.api.google.loading=true;$.getScript('http://www.google.de/jsapi',function(){$(':ui-gmap').trigger('googleLoaded.gmap');});return false;}
else
{$.ui.gmap.api.google.loaded=true;}
if(typeof google.maps=='undefined'){$element.bind('mapsLoaded.gmap',function(){$.ui.gmap.api.maps.loaded=true;$element.unbind('mapsLoaded.gmap');self._initialize();});if($.ui.gmap.api.maps.loading===true)
return false;$.ui.gmap.api.maps.loading=true;google.load('maps','3',{other_params:'language='+$.ui.gmap.api.options.language
+'&sensor='+$.ui.gmap.api.options.sensor+'&libraries='+$.ui.gmap.api.options.libraries,callback:function(){$(':ui-gmap').trigger('mapsLoaded.gmap',0,[]);}});return false;}
else
{$.ui.gmap.api.maps.loaded=true;}
return true;},_initialize:function(){var self=this,options=self.options,$element=self.element;$element.append('<div class="ui-gmap-content"></div>');if(!options.center.position)
{options.center.position=new google.maps.LatLng(options.center.lat,options.center.lng);}
options.center=options.center.position;if(this.options.clientLocate&&google.loader.ClientLocation)
{options.center=new google.maps.LatLng(google.loader.ClientLocation.latitude,google.loader.ClientLocation.longitude);}
if(!options.mapTypeId)
options.mapTypeId=google.maps.MapTypeId.ROADMAP;this.map=new google.maps.Map(this.element.find('div.ui-gmap-content')[0],this.options);$element.bind('resize.gmap',function(){google.maps.event.trigger(self.map,'resize');});this.element.bind('showMarkers.gmap',function(e)
{$(this).gmap('showMarkers');});this.uid=new Date().getTime()+Math.random(1000);this.markers=[];this.layers=[];this.directions={display:new google.maps.DirectionsRenderer({map:this.map,suppressMarkers:true}),service:new google.maps.DirectionsService()};if(typeof this.options.directionspanel=='object')
{this.directions.display.setPanel(this.options.directionspanel[0]);}
this.geocoder=new google.maps.Geocoder;this.infowindow={marker:-1,obj:new google.maps.InfoWindow};google.maps.event.addListener(this.map,'click',function(){self.infowindow.obj.close();self.infowindow.marker=-1;});if(typeof this.options.autocomplete=='object')
{this.autocomplete=new google.maps.places.Autocomplete(this.options.autocomplete[0]);this.autocomplete.bindTo('bounds',this.map);google.maps.event.addListener(this.autocomplete,'place_changed',function(){self._trigger('placechanged',0,self.autocomplete.getPlace());});this.options.autocomplete.change(function(){self._trigger('placechanged',0,self.autocomplete.getPlace());}).keyup(function(event){event.preventDefault();if(event.which==13)
self._trigger('placechanged',0,self.autocomplete.getPlace());});}
$.each(this.options.markers,function(i,params){self.addMarker(params);});if($.ui.gmap.markertypes.url!=null&&!$.ui.gmap.markertypes.loaded&&!$.ui.gmap.markertypes.loading)
{this._loadmarkertypes();}
else
{this.showMarkers();}
self._trigger('init');},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);this.map.setOptions(this.options);},destroy:function(){this.element.find('div.ui-gmap-content').remove();this.marker=[];$.Widget.prototype.destroy.apply(this,arguments);},_loadmarkertypes:function(){if(!$.ui.gmap.markertypes.loading)
{$.ui.gmap.markertypes.loading=true;$.ajax({url:$.document_path+$.ui.gmap.markertypes.url,context:this.element,contentType:'application/json',cache:true,success:function(data)
{$.extend($.ui.gmap.markertypes.definitions,data);$.ui.gmap.markertypes.loaded=true;$(':ui-gmap').trigger('showMarkers.gmap');},error:function(xhr,status){$(xhr).here(status);$.ui.gmap.markertypes.loaded=true;$.ui.gmap.markertypes.status=status;$(':ui-gmap').trigger('showMarkers.gmap');}});}},addMarker:function(params){var i=this.markers.length;params.element=this.element;params.layer=params.layer||'default';params.deleted=params.deleted||false;if(typeof params.position=='undefined')
{var latitude=null;var longitude=null;if(typeof params.latitude=='object')
{if(params.latitude.val())
latitude=params.latitude.val();}
else if(typeof params.latitude!='undefined')
latitude=params.latitude;if(typeof params.longitude=='object')
{if(params.longitude.val())
longitude=params.longitude.val();}
else if(typeof params.longitude!='undefined')
longitude=params.longitude;if(latitude==null||longitude==null)
{if(typeof params.address!='undefined')
{if(typeof params.address.search=='undefined')
{params.address.search=params.address.street.val()+', '+params.address.postcode.val()+' '
+params.address.city.val();}
var self=this;this.geocoder.geocode({address:params.address.search},function(result,status){if(status==google.maps.GeocoderStatus.OK)
{if(typeof params.latitude=='object')
params.latitude.val(result[0].geometry.location.lat());else
params.latitude=result[0].geometry.location.lat();if(typeof params.longitude=='object')
params.longitude.val(result[0].geometry.location.lng());else
params.longitude=result[0].geometry.location.lng();params.address=result[0].formatted_address;params.title=params.title||result[0].formatted_address;self._trigger('markergeocoded',0,params);self.addMarker(params);}
else
self.element.here(status);});}
else
{$(params).here('No position defined');}
return;}}
this.markers.push(params);if(typeof this.layers[params.layer]=='undefined')
this.layers[params.layer]=[];this.layers[params.layer].push(i);if($.ui.gmap.markertypes.url==null||$.ui.gmap.markertypes.loaded)
{this.showMarker(i);}
return i;},geocode:function(address){var self=this;this.geocoder.geocode({address:address},function(result,status){if(status==google.maps.GeocoderStatus.OK)
self._trigger('addressgeocoded',0,result[0]);else
self.element.here(status);});},getMarker:function(key){return this.markers[key];},setMarker:function(key,marker){this.markers[key]=marker;return this.element;},deleteMarker:function(key){var marker=this.getMarker(key);marker.obj.setMap(null);marker.deleted=true;this.setMarker(key,marker);},showMarker:function(key)
{var marker=this.getMarker(key),self=this;if(marker.deleted)
return;if(typeof(marker.obj)=='undefined')
{if(typeof marker.position=='undefined')
{var latitude=null;var longitude=null;if(typeof marker.latitude=='object')
latitude=marker.latitude.val();else
latitude=marker.latitude;if(typeof marker.longitude=='object')
longitude=marker.longitude.val();else
longitude=marker.longitude;marker.position=new google.maps.LatLng(latitude,longitude);}
var markerOptions={title:marker.title,position:marker.position};if(typeof(marker.type)!='undefined')
{var markertype=$.ui.gmap.markertypes.definitions[marker.type];if(typeof markertype=='undefined')
{this.element.here('markertype not defined');}
else
{if(markertype.Image==null)
{markertype.Image=new google.maps.MarkerImage($.document_path+markertype.ImageOptions.url,new google.maps.Size(markertype.ImageOptions.size[0],markertype.ImageOptions.size[1]),new google.maps.Point(markertype.ImageOptions.origin[0],markertype.ImageOptions.origin[1]),new google.maps.Point(markertype.ImageOptions.anchor[0],markertype.ImageOptions.anchor[1]));if(typeof markertype.ShadowOptions!='undefined')
{markertype.Shadow=new google.maps.MarkerImage($.document_path+markertype.ShadowOptions.url,new google.maps.Size(markertype.ShadowOptions.size[0],markertype.ShadowOptions.size[1]),new google.maps.Point(markertype.ShadowOptions.origin[0],markertype.ShadowOptions.origin[1]),new google.maps.Point(markertype.ShadowOptions.anchor[0],markertype.ShadowOptions.anchor[1]));}
if(typeof markertype.HilightOptions!='undefined')
{markertype.HilightImage=new google.maps.MarkerImage($.document_path+markertype.HilightOptions.url,new google.maps.Size(markertype.HilightOptions.size[0],markertype.HilightOptions.size[1]),new google.maps.Point(markertype.HilightOptions.origin[0],markertype.HilightOptions.origin[1]),new google.maps.Point(markertype.HilightOptions.anchor[0],markertype.HilightOptions.anchor[1]));}
$.ui.gmap.markertypes.definitions[marker.type]=markertype;}
markerOptions.icon=markertype.Image;if(typeof markertype.Shadow!='undefined')
markerOptions.shadow=markertype.Shadow;if(typeof markertype.shape!='undefined')
markerOptions.shape=markertype.Shape;}}
if(typeof(marker.draggable)=='undefined')
{marker.draggable=false;}
markerOptions.draggable=marker.draggable;marker.obj=new google.maps.Marker(markerOptions);if(marker.infourl||marker.infostring)
{google.maps.event.addListener(marker.obj,'click',function(){self._openInfoWindow(key);});}
google.maps.event.addListener(marker.obj,'click',function(){self._trigger('markerclick',0,[key,marker]);});if(marker.draggable)
{google.maps.event.addListener(marker.obj,'dragend',function(){self._trigger('markerdragend',0,marker.obj);});if(marker.dragendfill){google.maps.event.addListener(marker.obj,'dragend',function(){marker.dragendfill.latitude.val(marker.obj.position.lat());marker.dragendfill.longitude.val(marker.obj.position.lng());});}}}
marker.obj.setMap(this.map);if(marker.center)
{this.map.setCenter(marker.position);}
this.setMarker(key,marker);},hilightMarker:function(key){var marker=this.getMarker(key);var markertype=$.ui.gmap.markertypes.definitions[marker.type];if(typeof markertype.HilightImage=='undefined')
return false;marker.obj.setIcon(markertype.HilightImage);},unhilightMarker:function(key){var marker=this.getMarker(key);var markertype=$.ui.gmap.markertypes.definitions[marker.type];if(typeof markertype.Image=='undefined')
return false;marker.obj.setIcon(markertype.Image);},viewportLayer:function(layers){var bounds=new google.maps.LatLngBounds();layers=layers.split(',');$.each(layers,function(j,layer){$.each(self.layers[layer],function(i,key){if(!self.markers[key].deleted)
{bounds.extend(self.markers[key].obj.getPosition());}});});this.map.fitBounds(bounds);},showMarkers:function(){$.each(this.markers,function(i,marker){marker.element.gmap('showMarker',i);});this._trigger('showmarkers');},clearLayer:function(key){var self=this;if(typeof this.layers[key]!='undefined')
$.each(this.layers[key],function(i,marker){self.deleteMarker(marker);});this.layers[key]=[];},_openInfoWindow:function(key)
{var marker=this.getMarker(key);if(key==this.infowindow.marker)
return;if(typeof marker.infostring=='undefined')
{if(typeof marker.infourl=='undefined')
{$(marker).log('no infowindow content');}
else
{$.ajax({url:$.document_path+marker.infourl,context:this,contentType:'text/html',dataType:'html',cache:true,success:function(data)
{marker.infostring=data;this.setMarker(key,marker);this._openInfoWindow(key);},error:function(xhr,status){}});}}
else
{var content='<div class="ui-gmap-infowindow-content">';content+=marker.infostring+'</div>';this.infowindow.obj.setContent(content);this.infowindow.obj.open(this.map,marker.obj);this.infowindow.marker=key;$('.ui-gmap-infowindow-link').unbind('click').click(function(event){event.preventDefault();window.open($(this).attr('href'));});}},directionFromFieldToMarker:function(startSelector,key){var self=this;this.clearLayer('directionsrenderer');this.directions.service.route({origin:$(startSelector).val(),destination:this.getMarker(key).obj.getPosition().toUrlValue(),travelMode:google.maps.DirectionsTravelMode.DRIVING,provideRouteAlternatives:true},function(result,status){if(status==google.maps.DirectionsStatus.OK)
self.showRoute(result);});},showRoute:function(result)
{this.directions.display.setDirections(result);var start=result.routes[0].legs[0];this.addMarker({title:start.start_address,type:'start',latitude:start.start_location.lat(),longitude:start.start_location.lng(),layer:'directionsrenderer'});this._trigger('displayroute',0);}});$.extend($.ui.gmap,{version:"1.0",api:{google:{loaded:false,loading:false},maps:{loaded:false,loading:false},options:{sensor:'false',libraries:'places',language:'de'}},markertypes:{url:null,definitions:{start:{Image:null,ImageOptions:{url:'http://maps.google.com/mapfiles/ms/icons/green-dot.png',size:[32,32],origin:[0,0],anchor:[16,32]},Shadow:null,ShadowOptions:{url:'http://maps.google.com/mapfiles/ms/icons/msmarker.shadow.png',size:[59,32],origin:[0,0],anchor:[16,32]}}},loaded:false,loading:false,status:null},defaults:{zoom:16,markers:[],center:{position:null,lat:0.0,lng:0.0},navigationControl:true,mapTypeControl:true,scaleControl:true,streetViewControl:false,clientLocate:false}});}if(typeof $.widget!='undefined')
{$.widget('ui.rotate',{current:0,interval:null,_create:function(){this.options=$.extend(true,{},$.ui.rotate.defaults,this.options);this.element.find(this.options.selector+':not(:first)').hide();this.element.find(this.options.selector+':first').show();},_init:function(){this.element.addClass('hasRotate');this.current=0;this.start();},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);if(this.intervall!=null)
{this.stop();this.start();}},start:function(){if(this.interval!=null)
this.stop();if(this._trigger('beforestart')===false)
return;var self=this;this.interval=window.setInterval(function(){self.next();},Number(this.options.wait)+Number(this.options.fadeTime));this._trigger('started');},stop:function(){window.clearInterval(this.interval);this.interval=null;this._trigger('stopped')},prev:function(){var slides=this.element.find(this.options.selector);var prev=Number(this.current)+Number(1);if(prev<=0)
prev=slides.size()-1;slides.eq(prev).stop().css('opacity','').hide().fadeIn(this.options.fadeTime);slides.eq(this.current).stop().css('opacity','').show().fadeOut(this.options.fadeTime);this._trigger('prev',prev);this.current=prev;},next:function(){var slides=this.element.find(this.options.selector);var next=Number(this.current)+Number(1);if(next>=slides.size())
next=0;slides.eq(next).stop().css('opacity','').hide().fadeIn(this.options.fadeTime);slides.eq(this.current).stop().css('opacity','').show().fadeOut(this.options.fadeTime);this._trigger('next',next);this.current=next;},destroy:function(){this.stop();this.element.removeClass('hasRotate').find(this.options.selector).show();$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.rotate,{version:'1.0',defaults:{wait:5000,selector:null,fadeTime:1000}});}if(typeof $.widget!='undefined')
{$.widget('ui.pager',{_create:function(){this.options=$.extend(true,{},$.ui.pager.defaults,this.options);if(this.element.is(':empty'))
{this.element.append('<div class="ui-pager-content"></div>');}
else
{this.element.wrapInner('<div class="ui-pager-content"></div>');}
this.$buttons=$('<div class="ui-pager-buttons"></div>').appendTo(this.element);this.$content=this.element.find('.ui-pager-content');this.$start=$('<button class="ui-pager-start ui-pager-button">'+this.options.firstName+'</button>').appendTo(this.$buttons);this.$prev=$('<button class="ui-pager-prev ui-pager-button">'+this.options.prevName+'</button>').appendTo(this.$buttons);if(this.options.showPage)
{this.$page=$('<select class="ui-pager-page ui-widget-content ui-corner-all"></select>').appendTo(this.$buttons);for(var i=1;i<=this.options.pages;i++)
{this.$page.append('<option value="'+i+'">'+i
+'/'+this.options.pages+'</option>');}}
this.$next=$('<button class="ui-pager-next ui-pager-button">'+this.options.nextName+'</button>').appendTo(this.$buttons);this.$end=$('<button class="ui-pager-end ui-pager-button">'+this.options.lastName+'</button>').appendTo(this.$buttons);if(this.options.showEpp)
{this.$epp=$('<select class="ui-pager-epp ui-corner-all"></select>').appendTo(this.$buttons).append('<option value="1">1</option>').append('<option value="10">10</option>').append('<option value="20">20</option>').append('<option value="50">50</option>').append('<option value="100">100</option>');}
if(this.options.showResults)
{this.$results=$('<span class="ui-widget-content ui-corner-all ui-pager-results">'
+'Results: '+this.options.items+'</span>');this.$results.appendTo(this.$buttons);}},_init:function(){var self=this;this.element.addClass('ui-pager');this.$start.button({icons:{primary:'ui-icon-seek-start'}}).click(function(event){self._start();});this.$prev.button({icons:{primary:'ui-icon-seek-prev'}}).click(function(event){self._prev();});this.$next.button({icons:{secondary:'ui-icon-seek-next'}}).click(function(event){self._next();});this.$end.button({icons:{secondary:'ui-icon-seek-end'}}).click(function(event){self._end();});if(this.$content.is(':empty'))
{this._loadPage(this.options.page);}
else
{this._handleButtons();}
if(this.options.showEpp)
{this.$epp.change(function(event){self.options.epp=$(this).val();self.options.pages=Math.ceil(self.options.items/self.options.epp);if(self.options.page>self.options.pages)
{self.options.page=self.options.pages;}
self.refresh();}).val(this.options.epp);}
if(this.options.showPage)
{this.$page.change(function(event){self.options.page=$(this).val();self.refresh();}).val(this.options.page);}},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);},destroy:function(){this.element.removeClass('ui-pager').empty();$.Widget.prototype.destroy.apply(this,arguments);},refresh:function(){var self=this;self._loadPage(self.options.page);if(this.options.showResults)
{self.$results.text('Results: '+self.options.items);}
if(self.options.showPage)
{self.$page.empty();for(var i=1;i<=self.options.pages;i++)
{self.$page.append('<option value="'+i+'">'+i
+'/'+self.options.pages+'</option>');}
self.$page.val(self.options.page);}},_handleButtons:function(){this.$buttons.find('button').removeClass('ui-state-focus').removeClass('ui-state-hover');if(this.options.page<=1)
{this.$start.button('disable');this.$prev.button('disable');}
else
{this.$start.button('enable');this.$prev.button('enable');}
if(this.options.page>=this.options.pages)
{this.$end.button('disable');this.$next.button('disable');}
else
{this.$end.button('enable');this.$next.button('enable');}},_start:function(){this._loadPage(1);},_prev:function(){this._loadPage(Number(this.options.page)-Number(1));},_next:function(){this._loadPage(Number(this.options.page)+Number(1));},_end:function(){this._loadPage(this.options.pages);},_loadPage:function(pagenumber){var self=this;this.$content.queue('pager',function(){var options=$.extend(true,{dataType:'html',data:{epp:self.options.epp}},self.options.ajaxOptions,{url:self.options.url+pagenumber,context:self,success:function(data){this.$content.html(data).ready(function(){self._trigger('ready',0,pagenumber);});this._trigger('show',0,pagenumber);this.options.page=pagenumber;if(this.options.showPage)
{this.$page.val(this.options.page);}
if(typeof FB!='undefined')
{FB.XFBML.parse();}
this._handleButtons();this.$content.dequeue('pager');},error:function(xhr,status){this.$content.dequeue('pager');}});$.ajax(options);}).dequeue('pager');}});$.extend($.ui.pager,{version:'1.0',defaults:{showEpp:false,showResults:false,showPage:false,page:1,firstName:'Erste Seite',prevName:'Vorherige Seite',nextName:'Nächste Seite',lastName:'Letzte Seite'}});}if(typeof $.widget!='undefined')
{$.widget('ui.bbcode',{_create:function(){this.options=$.extend(true,{},$.ui.pager.defaults,this.options);this.element.wrap('<div class="ui-bbcode-canvas"></div>');this.canvas=this.element.parent();this.canvas.prepend('<div class="ui-bbcode-toolbar ui-widget-header ui-corner-all"></div>');this.toolbar=this.element.prev();this.toolbar.append('<button data-func="bold"><span class="bbcode-format bbcode-icon-bold"></span></button>');this.toolbar.append('<button data-func="italic"><span class="bbcode-format bbcode-icon-italic"></span></button>');this.toolbar.append('<button data-func="underline"><span class="bbcode-format bbcode-icon-underline"></span></button>');this.toolbar.append('<button data-func="center"><span class="bbcode-format bbcode-icon-center"></span></button>');this.toolbar.append('<button data-func="url"><span class="bbcode-format bbcode-icon-url"></span></button>');this.toolbar.append('<button data-func="image"><span class="bbcode-format bbcode-icon-image"></span></button>');this.toolbar.append('<button data-func="emicons"><span class="bbcode-emicon bbcode-emicon-happy"</span></button>');this.toolbar.append('<div class="ui-bbcode-emicons"></div>');},_init:function(){var self=this;this.element.addClass('hasBBCode');this.toolbar.find(':button').button().click(function(event){event.preventDefault();self._handleFunction($(this));});this.emicons=this.toolbar.find(':button[data-func="emicons"]').button({icons:{secondary:'ui-icon-triangle-1-s'}}).data('opened',false);this.emicons.next().hide();},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);},destroy:function(){this.element.removeClass('hasBBCode').prev().remove();this.element.unwrap();$.Widget.prototype.destroy.apply(this,arguments);},_handleFunction:function(button){switch(button.attr('data-func')){case'bold':this._insert('[b]','[/b]');break;case'italic':this._insert('[i]','[/i]');break;case'underline':this._insert('[u]','[/u]');break;case'center':this._insert('[center]','[/center]');break;case'url':this._insert('[url=]','[/url]');break;case'image':this._insert('[image]','[/image]');break;case'emicons':this._emicons();break;}},_insert:function(startTag,endTag){var field=this.element[0];field.focus();this.element.trigger('change');if(document.getSelection){var selStart=field.selectionStart;var selEnd=field.selectionEnd;var text=field.value.substring(selStart,selEnd);field.value=field.value.substring(0,selStart)+startTag
+text+endTag+field.value.substring(selEnd);if(text.length>0){field.selectionStart=selStart+startTag.length+text.length+endTag.length;}else{field.selectionStart=selStart+startTag.length;}
field.selectionEnd=field.selectionStart;}else{if(document.selection){var marker=document.selection.createRange();var text=marker.text;marker.text=startTag+text+endTag;marker=document.selection.createRange();if(text.length>0){marker.move('character',startTag.length+text.length+endTag.length+offset);}else{marker.move('character',-(endTag.length));}
marker.select();}}},_emicons:function(){var self=this;if($('#bbcode-emicons-dialog').size()==0)
{$('body').append('<div id="bbcode-emicons-dialog"></div>');$('#bbcode-emicons-dialog').load('/bbcode-emicons.html',{},function(){self._emicons();});return;}
if(this.emicons.data('opened'))
{this.emicons.next().slideUp('fast');this.emicons.data('opened',false);}
else
{var dialog=this.emicons.next().append($('#bbcode-emicons-dialog'));dialog.slideDown('fast');dialog.find('button').unbind('click').click(function(event){event.preventDefault();self._emicon($(this));});this.emicons.data('opened',true);}},_emicon:function(button){this._insert(button.attr('data-emicon'),'');this.emicons.next().slideUp('fast');this.emicons.data('opened',false);}});$.extend($.ui.bbcode,{version:'1.0',defaults:{},emicons:{loaded:false,loading:false,definitions:{}}});}if(typeof $.widget!='undefined')
{$.widget('ui.gallery',{_create:function(){this.options=$.extend(true,{},$.ui.gallery.defaults,this.options);this.element.wrapInner('<div class="ui-gallery-inner-container"></div>');this.element.wrapInner('<div class="ui-gallery-container"></div>');this.element.prepend('<button class="ui-gallery-prev">previous</button>');this.element.append('<button class="ui-gallery-next">next</button>');if($.browser.msie&&$.browser.version<=7)
this.element.append('<div class="ui-gallery-clear"></div>');},_init:function(){var self=this;this.element.addClass('hasGallery');this.slides=this.element.find('a').addClass('ui-gallery-slide').click(function(event){self._clickSlide(event,this);});this.current=0;this.inner=this.element.find('.ui-gallery-inner-container').attr('title',self.element.attr('title')).draggable({axis:'x',start:function(event){if(typeof self.positions=='undefined')
self._initInner();self.dragging=true;},drag:function(event,ui)
{if(ui.position.left>0)
{ui.helper.position({left:0});return false;}
else if(ui.position.left*-1>self.positions[self.positions.length-1])
{ui.helper.position({left:self.positions[self.positions.length-1]*-1});return false;}},stop:function(event,ui)
{var direction=(ui.originalPosition.left>ui.position.left)?'right':'left';var position=ui.position.left*-1;$.each(self.positions,function(i,imageposition)
{if(i>0&&direction=='left'&&position>=self.positions[i-1]&&position<imageposition)
{self.goToSlide(i-1);}
else if(i<self.positions.length-1&&direction=='right'&&position>=imageposition&&position<self.positions[i+1])
{self.goToSlide(i+1);}});window.setTimeout(function(){self.dragging=false;},500);}});if(self.options.useLightbox)
self.inner.lightbox();this.prev=this.element.find('.ui-gallery-prev').button({text:false,icons:{primary:'ui-icon-seek-prev'}}).button('disable').click(function(){self.goToSlide(self.current-1);});this.next=this.element.find('.ui-gallery-next').button({text:false,icons:{primary:'ui-icon-seek-next'}}).click(function(){self.goToSlide(Number(self.current)+Number(1));});;if($.browser.msie&&$.browser.version<=7)
{var cssblock={display:'block','float':'left'};this.prev.css(cssblock);this.inner.parent().css(cssblock);this.next.css(cssblock);this.element.find('.ui-gallery-clear').css('clear','both');}},_clickSlide:function(event,obj){var self=this;if(self.dragging)
{event.preventDefault();event.stopImmediatePropagation();}
else
{self._trigger('slideclicked',event,obj);}},_initInner:function(){if(this.slides.size()>0)
{var self=this;this.positions=[];this.summe=0;this.slides.each(function(i,slide){self.positions.push(self.summe);self.summe+=Number($(slide).outerWidth(true));});this.inner.css('width',this.summe);}},goToSlide:function(slide)
{if(typeof this.positions=='undefined')
{this._initInner();}
if(slide<=0)
{slide=0;this.prev.button('disable');}
else
this.prev.button('enable');if(slide>=this.slides.size()-1)
{slide=this.slides.size()-1;this.next.button('disable');}
else
this.next.button('enable');if(this.current!=slide)
{this.inner.animate({'left':this.positions[slide]*-1});}
this.current=slide;},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);},destroy:function(){this.element.removeClass('hasGallery');this.prev.remove();this.next.remove();this.slides.unwrap().unwrap();$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.gallery,{version:'1.0',defaults:{useLightbox:true,lightBoxOptions:{txtImage:'Bild',txtOf:'von',imageLoading:$.document_path+'/layout/jquery/lightbox-ico-loading.gif',imageBtnClose:$.document_path+'/layout/jquery/lightbox-btn-close.gif',imageBtnPrev:$.document_path+'/layout/jquery/lightbox-btn-prev.gif',imageBtnNext:$.document_path+'/layout/jquery/lightbox-btn-next.gif',imageBlank:$.document_path+'/layout/jquery/lightbox-blank.gif'}}});}if(typeof $.widget!='undefined')
{$.widget('ui.lightbox',{_create:function(){this.options=$.extend({},$.ui.lightbox.defaults,this.options);var self=this,options=self.options;var html='<div class="ui-lightbox">';html+='<div class="ui-lightbox-canvas">';html+='<img class="ui-lightbox-image" /></div>';html+='<div class="ui-lightbox-nav">';html+='<a class="ui-lightbox-prev" href="#"></a>';html+='<a class="ui-lightbox-next" href="#"></a>';html+='<a class="ui-lightbox-close" href="#"></a>';html+='</div>';html+='<div class="ui-lightbox-title"></div>';html+='<div class="ui-lightbox-infos"></div>';html+='</div>';uiLightbox=(self.uiLightbox=$(html));uiLightbox.hide().keydown(function(event){if(options.closeOnEscape&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE){self.close(event);event.preventDefault();}});self.uiCanvas=uiLightbox.find('.ui-lightbox-canvas');self.uiImage=uiLightbox.find('.ui-lightbox-image');self.uiNavigation=uiLightbox.find('.ui-lightbox-nav');self.uiPrev=uiLightbox.find('.ui-lightbox-prev');self.uiNext=uiLightbox.find('.ui-lightbox-next');self.uiTitle=uiLightbox.find('.ui-lightbox-title');self.uiInfos=uiLightbox.find('.ui-lightbox-infos');self.uiClose=uiLightbox.find('.ui-lightbox-close');},_init:function(){var self=this;var selector='a';if(self.options.linkClass!='')
{selector+='.'+self.options.linkClass;}
self.images=this.element.find(selector).click(function(event){self._click(event,this);});self.enabled=true;},enable:function(){this.enabled=true;},widget:function(){return this.uiLightbox;},disable:function(){this.enabled=false;},_click:function(event,obj){if(this.enabled)
{event.preventDefault();this.open(obj);}},open:function(obj){var self=this,options=self.options;self.current=self.images.index(obj);self.uiLightbox.appendTo(document.body);self.overlay=new $.ui.dialog.overlay(self);self.overlay.$el.css('z-index',options.zIndex-1);self.uiTitle.text(self.element.attr('title'));var infos=options.txtImage+': <span class="ui-lightbox-current">';infos+=(Number(self.current)+Number(1))+'</span> ';infos+=options.txtOf+' '+self.images.size();self.uiInfos.empty().append(infos);self.uiCurrent=self.uiInfos.find('.ui-lightbox-current');self.uiLightbox.css({zIndex:options.zIndex}).center().show();self._isOpen=true;this._loadImage();},close:function(){var self=this;self.overlay.destroy();self.uiLightbox.hide().remove().unbind('keypress.ui-dialog');self._isOpen=false;return self;},previous:function(){this.current--;if(this.current<0)
this.current=this.images.size()-1;this._loadImage();},next:function(){this.current++;if(this.current>=this.images.size())
this.current=0;this._loadImage();},_loadImage:function(){var self=this;this.uiImage.stop().fadeTo('medium',0);var objImagePreloader=new Image();objImagePreloader.onload=function(){var image=self.images.eq(self.current);self.uiImage.attr({src:image.attr('href'),alt:image.attr('title')}).stop().fadeTo('medium',1);if(image.attr('title')!='')
{self.uiTitle.text(image.attr('title'));}
else
{self.uiTitle.text(self.element.attr('title'));}
self.uiCurrent.text(String(Number(self.current)+Number(1)));self._resizeImage(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=this.images.eq(self.current).attr('href');},_refreshNavigation:function()
{var self=this;self.uiNavigation.show();self.uiPrev.unbind().click(function(event){event.preventDefault();self.previous();}).hover(function(){$(this).addClass('ui-lightbox-prev-hover');},function(){$(this).removeClass('ui-lightbox-prev-hover');});self.uiNext.unbind().click(function(event){event.preventDefault();self.next();}).hover(function(){$(this).addClass('ui-lightbox-next-hover');},function(){$(this).removeClass('ui-lightbox-next-hover');});self.uiClose.unbind().click(function(event){event.preventDefault();self.close();});},_resizeImage:function(width,height){var self=this;height+=Number(self.uiTitle.outerHeight(true))+Number(self.uiInfos.outerHeight(true));if(self.options.useMinHeight)
{var minHeight=($(window).height()*0.6)-20-self.uiLightbox.css('paddingTop').replace('px','')
-self.uiLightbox.css('paddingBottom').replace('px','');if(height<minHeight)
{width=(minHeight*width)/height;height=minHeight;}}
var maxWidth=$(window).width()-20-self.uiLightbox.css('paddingLeft').replace('px','')
-self.uiLightbox.css('paddingRight').replace('px','');if(width>maxWidth)
{height=(maxWidth*height)/width;width=maxWidth;}
var maxHeight=$(window).height()-20-self.uiLightbox.css('paddingTop').replace('px','')
-self.uiLightbox.css('paddingBottom').replace('px','');if(height>maxHeight)
{width=(maxHeight*width)/height;height=maxHeight;}
var top=(($(window).height()-height)/2)+$(window).scrollTop()+"px";var left=(($(window).width()-width)/2)+$(window).scrollLeft()+"px";self.uiLightbox.animate({width:width,height:height,top:top,left:left});self._refreshNavigation();},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);},destroy:function(){var self=this;if(self.overlay){self.overlay.destroy();}
self.uiLightbox.hide();self.uiLightbox.remove();self.enabled=false;self.element.unbind('.lightbox');$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.lightbox,{version:'1.0',defaults:{closeOnEscape:true,txtImage:'Bild',txtOf:'von',zIndex:100,useMinHeight:true,linkClass:''}});}if(typeof $.widget!='undefined')
{$.widget('ui.treeview',{_create:function(){this.options=$.extend(true,{},$.ui.treeview.defaults,this.options);var self=this;this.element.addClass('ui-treeview');this.element.find('li > ul').parent().addClass('ui-treeview-fold');this.element.find('li:not(.ui-treeview-fold)').prepend('<span class="ui-treeview-icon"></span>');this.element.find('.ui-treeview-fold').prev().find('.ui-treeview-icon').addClass('ui-icon').addClass('ui-icon-circlesmall-plus').click(function(event){event.preventDefault();var fold=$(this).parent().next();if(fold.is(':visible'))
{$(this).removeClass('ui-icon-circlesmall-minus').addClass('ui-icon-circlesmall-plus');fold.stop().slideUp('medium');}
else
{$(this).removeClass('ui-icon-circlesmall-plus').addClass('ui-icon-circlesmall-minus');fold.stop().slideDown('medium');}});},_init:function(){},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);},destroy:function(){this.element.removeClass('ui-treeview');$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.treeview,{version:'1.0',defaults:{}});}if(typeof $.widget!='undefined')
{$.widget('ui.scrollto',{_create:function(){var self=this;this.options=$.extend(true,{},$.ui.scrollto.defaults,this.options);this.element.addClass('ui-scrollto');this.buttons=$('<div class="ui-scrollto-buttons"></div>').prependTo(this.element);this.linkElements=this.element.find(this.options.linkElement).each(function(){self.buttons.append('<button class="ui-scrollto-button">'+$(this).text()+'</button>');$(this).after('<a class="ui-scrollto-top">'+self.options.topText+'</a>');});this.element.find('a.ui-scrollto-top').click(function(event){event.preventDefault();self._scrollTo(self.buttons);});this.buttons.buttonset().find('.ui-scrollto-button').click(function(event){event.preventDefault();var linkElement=self.linkElements.eq(self.buttons.find('.ui-scrollto-button').index($(this)));self._scrollTo(linkElement);});},_init:function(){},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);},destroy:function(){this.element.removeClass('ui-scrollto').find('.ui-scrollto-buttons, .ui-scrollto-top').remove();$.Widget.prototype.destroy.apply(this,arguments);},_scrollTo:function(element){$('html,body').animate({scrollTop:element.offset().top},Math.abs($('html,body').scrollTop()-element.offset().top)/5);}});$.extend($.ui.scrollto,{version:'1.0',defaults:{linkElement:'h2',topText:'nach oben'}});}if(typeof $.widget!='undefined')
{$.widget('ui.socialbookmark',{_create:function(){this.options=$.extend(true,{},$.ui.socialbookmark.defaults,this.options);if(this.options.facebook)
{if($('#fb-root').size()==0)
{$('<div id="fb-root"></div>').prependTo('body');}}},_init:function(){this._fbInit();this._plusoneInit();this._tweetInit();},_setOption:function(a,b){$.Widget.prototype._setOption.apply(this,arguments);},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);},_fbInit:function(){var self=this;if(self.options.facebook)
{if(typeof FB=='undefined')
{self.element.bind('fbLoaded.socialbookmark',function(){$.ui.socialbookmark.api.fb.loaded=true;self.element.unbind('fbLoaded.socialbookmark');self._fbInit();});if($.ui.socialbookmark.api.fb.loading===true)
return false;$.getScript(document.location.protocol+'//connect.facebook.net/'
+self.options.lang+'/all.js',function(){$(':ui-socialbookmark').trigger('fbLoaded.socialbookmark');});}
else
{FB.init(self.options.fbinit);if(typeof _gaq!='undefined')
{FB.Event.subscribe('edge.create',function(targetUrl){_gaq.push(['_trackSocial','facebook','like',targetUrl]);});FB.Event.subscribe('edge.remove',function(targetUrl){_gaq.push(['_trackSocial','facebook','unlike',targetUrl]);});}}}},_plusoneInit:function()
{var self=this;if(self.options.plusoneElements)
{if(typeof gapi=='undefined'||typeof gapi.plusone=='undefined')
{self.element.bind('plusoneLoaded.socialbookmark',function(){$.ui.socialbookmark.api.plusone.loaded=true;self.element.unbind('plusoneLoaded.socialbookmark');self._plusoneInit();});if($.ui.socialbookmark.api.plusone.loading===true)
return false;window.___gcfg={lang:self.options.lang.substr(0,2),parsetags:'explicit'};$.getScript('https://apis.google.com/js/plusone.js',function(){$(':ui-socialbookmark').trigger('plusoneLoaded.socialbookmark');});}
else
{self.element.find(self.options.plusoneElements).each(function(){gapi.plusone.render(this,$(this).data('plusone'));});}}},_tweetInit:function()
{var self=this;if(self.options.twitter)
{if(typeof twttr=='undefined')
{self.element.bind('tweetLoaded.socialbookmark',function(){$.ui.socialbookmark.api.tweet.loaded=true;self.element.unbind('tweetLoaded.socialbookmark');self._tweetInit();});if($.ui.socialbookmark.api.tweet.loading===true)
return false;$.getScript('http://platform.twitter.com/widgets.js',function(){$(':ui-socialbookmark').trigger('tweetLoaded.socialbookmark');});}
else
{if(typeof _gaq!='undefined')
{twttr.events.bind('tweet',function(event){if(event){var targetUrl='';if(event.target&&event.target.nodeName=='IFRAME'){targetUrl=extractParamFromUri(event.target.src,'url');}
_gaq.push(['_trackSocial','twitter','tweet',targetUrl]);}});}}}}});$.extend($.ui.socialbookmark,{version:'1.0',api:{fb:{loaded:false,loading:false},plusone:{loaded:false,loading:false},tweet:{loaded:false,loading:false}},defaults:{fbinit:{status:true,cookie:true,xfbml:true},facebook:false,twitter:false,lang:'de_DE',plusoneElements:false,}});}
$.datepicker.regional['de']={closeText:'schließen',prevText:'&#x3c;zurück',nextText:'Vor&#x3e;',currentText:'heute',monthNames:['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],monthNamesShort:['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'],dayNames:['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],dayNamesShort:['So','Mo','Di','Mi','Do','Fr','Sa'],dayNamesMin:['So','Mo','Di','Mi','Do','Fr','Sa'],weekHeader:'Wo',dateFormat:'dd.mm.yy',firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:''};$.datepicker.setDefaults($.datepicker.regional['de']);$(document).ready(function(){$('a:external').live('click',function(event){event.preventDefault();window.open($(this).attr('href'));});$.ui.socialbookmark.defaults.fbinit.appId='116581295040746';$('body').socialbookmark({facebook:true,plusoneElements:'#plusone',twitter:true});$('#buttonbar a').removeAttr('href').css('cursor','pointer').unbind('click').click(function(e){e.preventDefault();var $self=$(this),$element=$('#sidebar '+$self.data('sidebar')),$old=$('#sidebar >:visible');if($old.size())
{if($old[0]==$element[0])
{$old.slideUp('fast');}
else
{$old.slideUp('fast',function(){$element.slideDown('fast');});}
return;}
else
{$element.slideDown('fast');}});$('#menu div.submenu').each(function(){$(this).prev().hover(function()
{var element=$(this);var subMenu=$(this).next();clearTimeout(subMenu.data('hideTimer'));subMenu.data('showTimer',setTimeout(function(){subMenu.stop().hide().css({height:'',margin:(-1*element.height()
-element.css('padding-top').replace('px','')
-element.css('padding-bottom').replace('px','')
-element.css('margin-bottom').replace('px',''))
+'px 0 0 '+element.width()+'px'}).slideDown('medium');},100));},function()
{var subMenu=$(this).next();clearTimeout(subMenu.data('showTimer'));subMenu.data('hideTimer',setTimeout(function(){subMenu.stop().slideUp('medium');},400));}).attr('title','');$(this).hover(function()
{clearTimeout($(this).data('hideTimer'));},function()
{var subMenu=$(this);$(this).data('hideTimer',setTimeout(function(){subMenu.stop().slideUp('medium');},500));});});$('#termine a.place').click(function(event){event.preventDefault();if($('#placedialog').size()==0)
{$('body').append('<div id="placedialog"></div>');}
$('#placedialog').load('/place/'+$(this).attr('data-id'));});$('#bandfotos').rotate({selector:'img'});$('#tabs').tabs({ajaxOptions:{cache:true,type:'POST',data:{tabs:'true'}}});$('#guestbook #neuer_eintrag').button({icons:{primary:'ui-icon-comment'}}).click(function(){if($('#dialog').size()==0)
$('body').append('<div id="dialog"></div>');$('#dialog').load('/gaestebuch/eintrag',{},function(){$('#dialog').dialog({width:'auto',title:'Kommentar senden',resizable:false,draggable:false,modal:true});});});$('#contact #formular_buttons').buttonset().find('button').click(function(event){event.preventDefault();var self=$(this);$('#dialog').load('/kontakt/'+$(this).attr('data-formular'),{},function(){$('#dialog').dialog({width:'auto',title:self.text(),resizable:false,draggable:false,modal:true});});});$('#setliste').scrollto({topText:'<span class="ui-icon ui-icon-circle-arrow-n" title="nach oben">nach oben</span>'});$('#setlist #pdf').click(function(event){event.preventDefault();window.open($(this).attr('href'));});$('#sitemap > ul').treeview();$('.gallery').gallery();$('#album').lightbox({linkClass:'lightbox'});});(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;this.attr("novalidate","novalidate");b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){a=this.find("input, button");a.filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&a.filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("<input type='hidden'/>").attr("name",
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name];
return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a,
b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:":hidden",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.settings.validClass);this.addWrapper(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){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,
a)},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).",number:"Please enter a valid number.",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:c.validator.format("Please enter no more than {0} characters."),
minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator"),g="on"+e.type.replace(/^validate/,
"");f.settings[g]&&f.settings[g].call(f,this[0],e)}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=
this.settings.rules;c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",a).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",
a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=
a=this.validationTargetFor(this.clean(a));this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.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(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0,d;for(d in a)b++;return b},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{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").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 b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},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.validationTargetFor(this.clean(a));var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+
a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a]},defaultMessage:function(a,
b){return this.findDefined(this.customMessage(a.name,b),this.customMetaMessage(a,b),!this.settings.ignoreTitle&&a.title||undefined,c.validator.messages[b],"<strong>Warning: No message defined for "+a.name+"</strong>")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);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.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.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(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}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 c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||"");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,c(a)):d.insertAfter(a))}if(!b&&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){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];return a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,
e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,
c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{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,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,
a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b={};a=c(a);for(var d in c.validator.methods){var e;if(e=d==="required"&&typeof c.fn.prop==="function"?a.prop(d):a.attr(d))b[d]=e;else if(a[0].getAttribute("type")===d)b[d]=true}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};
var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?
e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.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 b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,
b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,
mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,
b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([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,b){return this.optional(b)||/^(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,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 -]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>=
0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery);
(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery);
(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a,
b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery);
(function(){function a(b){return b.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,"")}jQuery.validator.addMethod("maxWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length<d},jQuery.validator.format("Please enter {0} words or less."));jQuery.validator.addMethod("minWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d},jQuery.validator.format("Please enter at least {0} words."));jQuery.validator.addMethod("rangeWords",
function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d[0]&&b.match(/bw+b/g).length<d[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})();jQuery.validator.addMethod("letterswithbasicpunc",function(a,b){return this.optional(b)||/^[a-z-.,()'\"\s]+$/i.test(a)},"Letters or punctuation only please");jQuery.validator.addMethod("alphanumeric",function(a,b){return this.optional(b)||/^\w+$/i.test(a)},"Letters, numbers, spaces or underscores only please");
jQuery.validator.addMethod("lettersonly",function(a,b){return this.optional(b)||/^[a-z]+$/i.test(a)},"Letters only please");jQuery.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please");jQuery.validator.addMethod("ziprange",function(a,b){return this.optional(b)||/^90[2-5]\d\{2}-\d{4}$/.test(a)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
jQuery.validator.addMethod("integer",function(a,b){return this.optional(b)||/^-?\d+$/.test(a)},"A positive or negative non-decimal number please");
jQuery.validator.addMethod("vinUS",function(a){if(a.length!=17)return false;var b,c,d,f,e,g=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],h=0;for(b=0;b<17;b++){f=j[b];d=a.slice(b,b+1);if(b==8)e=d;if(isNaN(d))for(c=0;c<g.length;c++){if(d.toUpperCase()===g[c]){d=i[c];d*=f;if(isNaN(e)&&c==8)e=g[c];break}}else d*=f;h+=d}a=h%11;if(a==10)a="X";if(a==e)return true;return false},
"The specified vehicle identification number (VIN) is invalid.");jQuery.validator.addMethod("dateITA",function(a,b){var c=false;if(/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(a)){var d=a.split("/");c=parseInt(d[0],10);var f=parseInt(d[1],10);d=parseInt(d[2],10);var e=new Date(d,f-1,c);c=e.getFullYear()==d&&e.getMonth()==f-1&&e.getDate()==c?true:false}else c=false;return this.optional(b)||c},"Please enter a correct date");
jQuery.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(a)},"Vul hier een geldige datum in.");jQuery.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59");jQuery.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(a)},"Please enter a valid time, between 00:00 am and 12:00 pm");
jQuery.validator.addMethod("phoneUS",function(a,b){a=a.replace(/\s+/g,"");return this.optional(b)||a.length>9&&a.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number");jQuery.validator.addMethod("phoneUK",function(a,b){return this.optional(b)||a.length>9&&a.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/)},"Please specify a valid phone number");
jQuery.validator.addMethod("mobileUK",function(a,b){return this.optional(b)||a.length>9&&a.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/)},"Please specify a valid mobile number");jQuery.validator.addMethod("strippedminlength",function(a,b,c){return jQuery(a).text().length>=c},jQuery.validator.format("Please enter at least {0} characters"));
jQuery.validator.addMethod("email2",function(a,b){return this.optional(b)||/^((([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)},jQuery.validator.messages.email);
jQuery.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(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)},
jQuery.validator.messages.url);
jQuery.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9-]+/.test(a))return false;a=a.replace(/\D/g,"");b=0;if(c.mastercard)b|=1;if(c.visa)b|=2;if(c.amex)b|=4;if(c.dinersclub)b|=8;if(c.enroute)b|=16;if(c.discover)b|=32;if(c.jcb)b|=64;if(c.unknown)b|=128;if(c.all)b=255;if(b&1&&/^(51|52|53|54|55)/.test(a))return a.length==16;if(b&2&&/^(4)/.test(a))return a.length==16;if(b&4&&/^(34|37)/.test(a))return a.length==15;if(b&8&&/^(300|301|302|303|304|305|36|38)/.test(a))return a.length==14;if(b&
16&&/^(2014|2149)/.test(a))return a.length==15;if(b&32&&/^(6011)/.test(a))return a.length==16;if(b&64&&/^(3)/.test(a))return a.length==16;if(b&64&&/^(2131|1800)/.test(a))return a.length==15;if(b&128)return true;return false},"Please enter a valid credit card number.");
jQuery.validator.addMethod("ipv4",function(a,b){return this.optional(b)||/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(a)},"Please enter a valid IP v4 address.");
jQuery.validator.addMethod("ipv6",function(a,b){return this.optional(b)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(a)},"Please enter a valid IP v6 address.");
jQuery.validator.addMethod("pattern",function(a,b,c){return this.optional(b)||c.test(a)},"Invalid format.");
(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.slice(0,q)||"*";var o=s.slice(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).slice(2,10)}var h=function(t,r,s){var q=this,p={},u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.slice(0,v.length-1);var w="onBefore"+v.slice(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var o=this,s={},u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var z=q._api().fp_getPlugin(p);if(!z){return}i(o,z);delete o.methods;if(!u){m(z.methods,function(){var B=""+this;o[B]=function(){var C=[].slice.call(arguments);var D=q._api().fp_invoke(p,B,C);return D==="undefined"||D===undefined?o:D}});u=true}}var A=s[w];if(A){var y=A.apply(o,v);if(w.slice(0,1)=="_"){delete s[w]}return y}return o}})};function b(q,G,t){var w=this,v=null,D=false,u,s,F=[],y={},x={},E,r,p,C,o,A;i(w,{id:function(){return E},isLoaded:function(){return(v!==null&&v.fp_play!==undefined&&!D)},getParent:function(){return q},hide:function(H){if(H){q.style.height="0px"}if(w.isLoaded()){v.style.height="0px"}return w},show:function(){q.style.height=A+"px";if(w.isLoaded()){v.style.height=o+"px"}return w},isHidden:function(){return w.isLoaded()&&parseInt(v.style.height,10)===0},load:function(J){if(!w.isLoaded()&&w._fireEvent("onBeforeLoad")!==false){var H=function(){u=q.innerHTML;if(u&&!flashembed.isSupported(G.version)){q.innerHTML=""}if(J){J.cached=true;j(x,"onLoad",J)}flashembed(q,G,{config:t})};var I=0;m(a,function(){this.unload(function(K){if(++I==a.length){H()}})})}return w},unload:function(J){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(J){J(false)}return w}if(u.replace(/\s/g,"")!==""){if(w._fireEvent("onBeforeUnload")===false){if(J){J(false)}return w}D=true;try{if(v){v.fp_close();w._fireEvent("onUnload")}}catch(H){}var I=function(){v=null;q.innerHTML=u;D=false;if(J){J(true)}};setTimeout(I,50)}else{if(J){J(false)}}return w},getClip:function(H){if(H===undefined){H=C}return F[H]},getCommonClip:function(){return s},getPlaylist:function(){return F},getPlugin:function(H){var J=y[H];if(!J&&w.isLoaded()){var I=w._api().fp_getPlugin(H);if(I){J=new l(H,I,w);y[H]=J}}return J},getScreen:function(){return w.getPlugin("screen")},getControls:function(){return w.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return w.getPlugin("logo")._fireEvent("onUpdate")}catch(H){}},getPlay:function(){return w.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(H){return H?k(t):t},getFlashParams:function(){return G},loadPlugin:function(K,J,M,L){if(typeof M=="function"){L=M;M={}}var I=L?e():"_";w._api().fp_loadPlugin(K,J,M,I);var H={};H[I]=L;var N=new l(K,null,w,H);y[K]=N;return N},getState:function(){return w.isLoaded()?v.fp_getState():-1},play:function(I,H){var J=function(){if(I!==undefined){w._api().fp_play(I,H)}else{w._api().fp_play()}};if(w.isLoaded()){J()}else{if(D){setTimeout(function(){w.play(I,H)},50)}else{w.load(function(){J()})}}return w},getVersion:function(){var I="flowplayer.js 3.2.6";if(w.isLoaded()){var H=v.fp_getVersion();H.push(I);return H}return I},_api:function(){if(!w.isLoaded()){throw"Flowplayer "+w.id()+" not loaded when calling an API method"}return v},setClip:function(H){w.setPlaylist([H]);return w},getIndex:function(){return p},_swfHeight:function(){return v.clientHeight}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var H="on"+this;if(H.indexOf("*")!=-1){H=H.slice(0,H.length-1);var I="onBefore"+H.slice(2);w[I]=function(J){j(x,I,J);return w}}w[H]=function(J){j(x,H,J);return w}});m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","),function(){var H=this;w[H]=function(J,I){if(!w.isLoaded()){return w}var K=null;if(J!==undefined&&I!==undefined){K=v["fp_"+H](J,I)}else{K=(J===undefined)?v["fp_"+H]():v["fp_"+H](J)}return K==="undefined"||K===undefined?w:K}});w._fireEvent=function(Q){if(typeof Q=="string"){Q=[Q]}var R=Q[0],O=Q[1],M=Q[2],L=Q[3],K=0;if(t.debug){g(Q)}if(!w.isLoaded()&&R=="onLoad"&&O=="player"){v=v||c(r);o=w._swfHeight();m(F,function(){this._fireEvent("onLoad")});m(y,function(S,T){T._fireEvent("onUpdate")});s._fireEvent("onLoad")}if(R=="onLoad"&&O!="player"){return}if(R=="onError"){if(typeof O=="string"||(typeof O=="number"&&typeof M=="number")){O=M;M=L}}if(R=="onContextMenu"){m(t.contextMenu[O],function(S,T){T.call(w)});return}if(R=="onPluginEvent"||R=="onBeforePluginEvent"){var H=O.name||O;var I=y[H];if(I){I._fireEvent("onUpdate",O);return I._fireEvent(M,Q.slice(3))}return}if(R=="onPlaylistReplace"){F=[];var N=0;m(O,function(){F.push(new h(this,N++,w))})}if(R=="onClipAdd"){if(O.isInStream){return}O=new h(O,M,w);F.splice(M,0,O);for(K=M+1;K<F.length;K++){F[K].index++}}var P=true;if(typeof O=="number"&&O<F.length){C=O;var J=F[O];if(J){P=J._fireEvent(R,M,L)}if(!J||P!==false){P=s._fireEvent(R,M,L,J)}}m(x[R],function(){P=this.call(w,O,M);if(this.cached){x[R].splice(K,1)}if(P===false){return false}K++});return P};function B(){if($f(q)){$f(q).getParent().innerHTML="";p=$f(q).getIndex();a[p]=w}else{a.push(w);p=a.length-1}A=parseInt(q.style.height,10)||q.clientHeight;E=q.id||"fp"+e();r=G.id||E+"_api";G.id=r;t.playerId=E;if(typeof t=="string"){t={clip:{url:t}}}if(typeof t.clip=="string"){t.clip={url:t.clip}}t.clip=t.clip||{};if(q.getAttribute("href",2)&&!t.clip.url){t.clip.url=q.getAttribute("href",2)}s=new h(t.clip,-1,w);t.playlist=t.playlist||[t.clip];var I=0;m(t.playlist,function(){var K=this;if(typeof K=="object"&&K.length){K={url:""+K}}m(t.clip,function(L,M){if(M!==undefined&&K[L]===undefined&&typeof M!="function"){K[L]=M}});t.playlist[I]=K;K=new h(K,I,w);F.push(K);I++});m(t,function(K,L){if(typeof L=="function"){if(s[K]){s[K](L)}else{j(x,K,L)}delete t[K]}});m(t.plugins,function(K,L){if(L){y[K]=new l(K,L,w)}});if(!t.plugins||t.plugins.controls===undefined){y.controls=new l("controls",null,w)}y.canvas=new l("canvas",null,w);u=q.innerHTML;function J(L){var K=w.hasiPadSupport&&w.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(F[0].url)&&!K){return true}if(!w.isLoaded()&&w._fireEvent("onBeforeClick")!==false){w.load()}return f(L)}function H(){if(u.replace(/\s/g,"")!==""){if(q.addEventListener){q.addEventListener("click",J,false)}else{if(q.attachEvent){q.attachEvent("onclick",J)}}}else{if(q.addEventListener){q.addEventListener("click",f,false)}w.load()}}setTimeout(H,0)}if(typeof q=="string"){var z=c(q);if(!z){throw"Flowplayer cannot access element: "+q}q=z;B()}else{B()}}var a=[];function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:o,t,q)}}else{if(o){return new b(o,t,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var e=typeof jQuery=="function";var i={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(e){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:i}}function j(){if(c.done){return false}var l=document;if(l&&l.getElementsByTagName&&l.getElementById&&l.body){clearInterval(c.timer);c.timer=null;for(var k=0;k<c.ready.length;k++){c.ready[k].call()}c.ready=null;c.done=true}}var c=e?jQuery:function(k){if(c.done){return k()}if(c.timer){c.ready.push(k)}else{c.ready=[k];c.timer=setInterval(j,13)}};function f(l,k){if(k){for(key in k){if(k.hasOwnProperty(key)){l[key]=k[key]}}}return l}function g(k){switch(h(k)){case"string":k=k.replace(new RegExp('(["\\\\])',"g"),"\\$1");k=k.replace(/^\s?(\d+)%/,"$1pct");return'"'+k+'"';case"array":return"["+b(k,function(n){return g(n)}).join(",")+"]";case"function":return'"function()"';case"object":var l=[];for(var m in k){if(k.hasOwnProperty(m)){l.push('"'+m+'":'+g(k[m]))}}return"{"+l.join(",")+"}"}return String(k).replace(/\s/g," ").replace(/\'/g,'"')}function h(l){if(l===null||l===undefined){return false}var k=typeof l;return(k=="object"&&l.push)?"array":k}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function b(k,n){var m=[];for(var l in k){if(k.hasOwnProperty(l)){m[l]=n(k[l])}}return m}function a(r,t){var q=f({},r);var s=document.all;var n='<object width="'+q.width+'" height="'+q.height+'"';if(s&&!q.id){q.id="_"+(""+Math.random()).substring(9)}if(q.id){n+=' id="'+q.id+'"'}if(q.cachebusting){q.src+=((q.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(q.w3c||!s){n+=' data="'+q.src+'" type="application/x-shockwave-flash"'}else{n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}n+=">";if(q.w3c||s){n+='<param name="movie" value="'+q.src+'" />'}q.width=q.height=q.id=q.w3c=q.src=null;for(var l in q){if(q[l]!==null){n+='<param name="'+l+'" value="'+q[l]+'" />'}}var o="";if(t){for(var m in t){if(t[m]!==null){o+=m+"="+(typeof t[m]=="object"?g(t[m]):t[m])+"&"}}o=o.substring(0,o.length-1);n+='<param name="flashvars" value=\''+o+"' />"}n+="</object>";return n}function d(m,p,l){var k=flashembed.getVersion();f(this,{getContainer:function(){return m},getConf:function(){return p},getVersion:function(){return k},getFlashvars:function(){return l},getApi:function(){return m.firstChild},getHTML:function(){return a(p,l)}});var q=p.version;var r=p.expressInstall;var o=!q||flashembed.isSupported(q);if(o){p.onFail=p.version=p.expressInstall=null;m.innerHTML=a(p,l)}else{if(q&&r&&flashembed.isSupported([6,65])){f(p,{src:r});l={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};m.innerHTML=a(p,l)}else{if(m.innerHTML.replace(/\s/g,"")!==""){}else{m.innerHTML="<h2>Flash version "+q+" or greater is required</h2><h3>"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"</h3>"+(m.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(m.tagName=="A"){m.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!o&&p.onFail){var n=p.onFail.call(this);if(typeof n=="string"){m.innerHTML=n}}if(document.all){window[p.id]=document.getElementById(p.id)}}window.flashembed=function(l,m,k){if(typeof l=="string"){var n=document.getElementById(l);if(n){l=n}else{c(function(){flashembed(l,m,k)});return}}if(!l){return}if(typeof m=="string"){m={src:m}}var o=f({},i);f(o,m);return new d(l,o,k)};f(window.flashembed,{getVersion:function(){var m=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var l=navigator.plugins["Shockwave Flash"].description;if(typeof l!="undefined"){l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var n=parseInt(l.replace(/^(.*)\..*$/,"$1"),10);var r=/r/.test(l)?parseInt(l.replace(/^.*r(.*)$/,"$1"),10):0;m=[n,r]}}else{if(window.ActiveXObject){try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(q){try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");m=[6,0];p.AllowScriptAccess="always"}catch(k){if(m[0]==6){return m}}try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(o){}}if(typeof p=="object"){l=p.GetVariable("$version");if(typeof l!="undefined"){l=l.replace(/^\S+\s+(.*)$/,"$1").split(",");m=[parseInt(l[0],10),parseInt(l[2],10)]}}}}return m},isSupported:function(k){var m=flashembed.getVersion();var l=(m[0]>k[0])||(m[0]==k[0]&&m[1]>=k[1]);return l},domReady:c,asString:g,getHTML:a});if(e){jQuery.fn.flashembed=function(l,k){var m=null;this.each(function(){m=flashembed(this,l,k)});return l.api===false?this:m}}})();
