(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}
if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])
selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])
return jQuery().find(selector);return jQuery(elem);}
selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))
return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)
if(value===undefined)
return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}
return this.each(function(i){for(name in options)
jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)
value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)
return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])
jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)
elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)
this[expando]=null;});if(events===true)
this.find("*").andSelf().each(function(i){if(this.nodeType==3)
return;var events=jQuery.data(this,"events");for(var type in events)
for(var handler in events[type])
jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)
if(isSimple.test(selector))
return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)
return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)
return value;values.push(value);}}
return values;}else
return(this[0].value||"").replace(/\r/g,"");}
return undefined;}
if(value.constructor==Number)
value+='';return this.each(function(){if(this.nodeType!=1)
return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))
this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)
this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)
data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)
elems.reverse();}
var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))
obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))
scripts=scripts.add(elem);else{if(elem.nodeType==1)
scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)
jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)
elem.parentNode.removeChild(elem);}
function now(){return+new Date;}
jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!="object"&&typeof target!="function")
target={};if(length==i){target=this;--i;}
for(;i<length;i++)
if((options=arguments[i])!=null)
for(var name in options){var src=target[name],copy=options[name];if(target===copy)
continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)
target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)
target[name]=copy;}
return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)
window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)
script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)
id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])
jQuery.cache[id]={};if(data!==undefined)
jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])
break;if(!name)
jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)
elem.removeAttribute(expando);}
delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)
if(callback.apply(object[name],args)===false)
break;}else
for(;i<length;)
if(callback.apply(object[i++],args)===false)
break;}else{if(length==undefined){for(name in object)
if(callback.call(object[name],name,object[name])===false)
break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}
return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))
value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))
elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)
elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
callback.call(elem);for(var name in options)
elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}
if(jQuery(elem).is(":visible"))
getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)
return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}
if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}
if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}
if(name.match(/float/i))
name=styleFloat;if(!force&&style&&style[name])
ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))
name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))
ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)
stack.unshift(a);for(;i<stack.length;i++)
if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}
ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)
if(swap[i]!=null)
stack[i].style.display=swap[i];}
if(name=="opacity"&&ret=="")
ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')
context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)
return;if(elem.constructor==Number)
elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)
if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)
tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))
div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}
elem=jQuery.makeArray(div.childNodes);}
if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))
return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)
ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)
elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)
throw"type property can't be changed";elem[name]=value;}
if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))
return elem.getAttributeNode(name).nodeValue;return elem[name];}
if(msie&&notxml&&name=="style")
return jQuery.attr(elem.style,"cssText",value);if(set)
elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+
(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}
return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}
name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)
elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)
ret[0]=array;else
while(i)
ret[--i]=array[i];}
return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)
if(array[i]===elem)
return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])
if(elem.nodeType!=8)
first[pos++]=elem;}else
while(elem=second[i++])
first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}
return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)
if(!inv!=!callback(elems[i],i))
ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)
ret[ret.length]=value;}
return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")
ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)
jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)
this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)
this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)
this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}
return cur;},find:function(t,context){if(typeof t!="string")
return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)
return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)
for(var c=ret[i].firstChild;c;c=c.nextSibling)
if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))
r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)
if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}
if(m=="+")break;}}
ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}
if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}
m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])
oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")
tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}
if(m[1]==".")
r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)
if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}
r=tmp;}
ret=r;}
t=t.replace(re2,"");}}
if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}
if(t)
ret=[];if(ret&&context==ret[0])
ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)
tmp.push(r[i]);}
return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}
if(!m)
break;if(m[1]==":"&&m[2]=="not")
r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")
r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))
z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)
tmp.push(a);}
r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)
if(n.nodeType==1)
n.nodeIndex=c++;merge[id]=true;}
var add=false;if(first==0){if(node.nodeIndex==last)
add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)
add=true;if(add^not)
tmp.push(node);}
r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")
fn=fn[m[2]];if(typeof fn=="string")
fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}
return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)
matched.push(cur);cur=cur[dir];}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])
if(cur.nodeType==1&&++num==result)
break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)
r.push(n);}
return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)
return;if(jQuery.browser.msie&&elem.setInterval)
elem=window;if(!handler.guid)
handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}
var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)
return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)
elem.addEventListener(type,handle,false);else if(elem.attachEvent)
elem.attachEvent("on"+type,handle);}}
handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)
return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))
for(var type in events)
this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}
jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)
delete events[type][handler.guid];else
for(handler in events[type])
if(!parts[1]||events[type][handler].type==parts[1])
delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)
elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)
elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}
ret=null;delete events[type];}}});}
for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}
if(!elem){if(this.global[type])
jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)
return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}
data[0].type=type;if(exclusive)
data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)
val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)
val=false;if(event)
data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)
val=ret;}
if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}
this.triggered=false;}
return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)
val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}
return val;},fix:function(event){if(event[expando]==true)
return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)
event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)
originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)
originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)
event.target=event.srcElement||document;if(event.target.nodeType==3)
event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)
event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}
if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))
event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)
event.metaKey=event.ctrlKey;if(!event.which&&event.button)
event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)
jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)
fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}
jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();if(jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)
if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}
jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}
if(numStyles===undefined)
numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();}
jQuery.event.add(window,"load",jQuery.ready);}
jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}
return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')
return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
callback=callback||function(){};var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}
var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")
self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")
s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))
s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))
s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}
if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)
s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}
if(head)
head.removeChild(script);};}
if(s.dataType=="script"&&s.cache==null)
s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}
if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}
if(s.global&&!jQuery.active++)
jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)
script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}
head.appendChild(script);return undefined;}
var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)
xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)
xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}
if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}
if(s.global)
jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}
status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}
if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
jQuery.lastModified[s.url]=modRes;if(!jsonp)
success();}else
jQuery.handleError(s,xhr,status);complete();if(s.async)
xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)
onreadystatechange("timeout");}},s.timeout);}
try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}
if(!s.async)
onreadystatechange();function success(){if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xhr,s]);}
function complete(){if(s.complete)
s.complete(xhr,status);if(s.global)
jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}
return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)
jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}
return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}
return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")
throw"parsererror";if(filter)
data=filter(data,type);if(type=="script")
jQuery.globalEval(data);if(type=="json")
data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)
jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)
if(a[j]&&a[j].constructor==Array)
jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")
this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)
return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)
return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}
if(opt.overflow!=null)
this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))
e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1])
end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}
if(!type||(typeof type=="string"&&!fn))
return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)
queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)
fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)
this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)
if(timers[i].elem==this){if(gotoEnd)
timers[i](true);timers.splice(i,1);}});if(!gotoEnd)
this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)
q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}
return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)
q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)
jQuery(this).dequeue();if(jQuery.isFunction(opt.old))
opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)
options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)
this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")
this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)
return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")
this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)
if(this.options.curAnim[i]!==true)
done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")
this.elem.style.display="block";}
if(this.options.hide)
this.elem.style.display="none";if(this.options.hide||this.options.show)
for(var p in this.options.curAnim)
jQuery.attr(this.elem.style,p,this.options.orig[p]);}
if(done)
this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)
border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")
fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}
while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))
add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")
border(parent);parent=parent.parentNode;}
if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))
add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)
add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}
results={top:top,left:left};}
function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}
function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}
return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+
num(this,"padding"+tl)+
num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+
num(this,"border"+tl+"Width")+
num(this,"border"+br+"Width")+
(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();;(function($){$.skyscraper=function(corner,color){if(typeof corner=='undefined'||corner!==true){corner=false;}
var onDocumentReady=function(){if(corner){$('div.topRightBanner').addClass('topRightBannerPair');}
if(typeof color!='undefined'){var bg=$('<div id="skyscraper">&nbsp;</div>');bg.css({position:'fixed',top:'0px',right:'0px',width:bgWidth(),background:color,height:'100%'});if($.browser.msie&&parseInt($.browser.version)){bg.css({position:'absolute',height:$(document).height()+'px'});}
$('body').prepend(bg);$(window).bind('resize',function(){bg.css('width',bgWidth());});}};var bgWidth=function(){return($('body').width()-$('div.topRightBanner').offset().left-($.browser.mozilla&&parseFloat($.browser.version)>1.8?1:0))+'px';};$(document).bind('ready',onDocumentReady);};})(jQuery);;(function($){var hd=$('head');if(hd.length>0){hd.append('<style type="text/css">body {padding-top:0 !important;}</style>');}})(jQuery);;(function($){switch(window.location.pathname){case'/premiumsms':case'/hotline':case'/tpay':case'/paypal':case'/banktransfer':var hd=$('head');if(hd.length>0){hd.append('<style type="text/css">.frm-payment {display:block !important;}</style>');}
break;}})(jQuery);;(function($){function toIntegersAtLease(n)
{return n<10?'0'+n:n;}
Date.prototype.toJSON=function(date)
{return this.getUTCFullYear()+'-'+
toIntegersAtLease(this.getUTCMonth())+'-'+
toIntegersAtLease(this.getUTCDate());};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};$.quoteString=function(string)
{if(escapeable.test(string))
{return'"'+string.replace(escapeable,function(a)
{var c=meta[a];if(typeof c==='string'){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
return'"'+string+'"';};$.toJSON=function(o,compact)
{var type=typeof(o);if(type=="undefined")
return"undefined";else if(type=="number"||type=="boolean")
return o+"";else if(o===null)
return"null";if(type=="string")
{return $.quoteString(o);}
if(type=="object"&&typeof o.toJSON=="function")
return o.toJSON(compact);if(type!="function"&&typeof(o.length)=="number")
{var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i],compact));}
if(compact)
return"["+ret.join(",")+"]";else
return"["+ret.join(", ")+"]";}
if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.");}
var ret=[];for(var k in o){var name;type=typeof(k);if(type=="number")
name='"'+k+'"';else if(type=="string")
name=$.quoteString(k);else
continue;var val=$.toJSON(o[k],compact);if(typeof(val)!="string"){continue;}
if(compact)
ret.push(name+":"+val);else
ret.push(name+": "+val);}
return"{"+ret.join(", ")+"}";};$.compactJSON=function(o)
{return $.toJSON(o,true);};$.evalJSON=function(src)
{return eval("("+src+")");};$.secureEvalJSON=function(src)
{var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,'@');filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered))
return eval("("+src+")");else
throw new SyntaxError("Error parsing JSON, source is not valid.");};})(jQuery);;(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;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);;jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};;jQuery.timer=function(interval,callback)
{var interval=interval||100;if(!callback)
return false;_timer=function(interval,callback){this.stop=function(){clearInterval(self.id);};this.internalCallback=function(){callback(self);};this.reset=function(val){if(self.id)
clearInterval(self.id);var val=val||100;this.id=setInterval(this.internalCallback,val);};this.interval=interval;this.id=setInterval(this.internalCallback,this.interval);var self=this;};return new _timer(interval,callback);};;(function($){$.escapeHtml=function(s){$([[/&/igm,'&amp;'],[/"/igm,'&quot;'],[/</igm,'&lt;'],[/>/igm,'&gt;']]).each(function(){s=s.replace(this[0],this[1]);});return s;};})(jQuery);;(function($){$.unescapeHtml=function(s){$([[/&amp;/igm,'&'],[/&quot;/igm,'"'],[/&lt;/igm,'<'],[/&gt;/igm,'>']]).each(function(){s=s.replace(this[0],this[1]);});return s;};})(jQuery);;(function($){$.translate=function(s,r){if(typeof Translation!='undefined'&&typeof Translation[s]!='undefined'){s=Translation[s];if(typeof r!='undefined'){$.each(r,function(k,v){var re=new RegExp('%'+k+'%','gm');s=s.replace(re,v);});}}
return s;};})(jQuery);;(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())
+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')
+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);;(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+
(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)
this.insertBefore(document.createElement(html),this.firstChild);});}
return this;};})(jQuery);;(function($){$(function(e){var b=$('.periodicalChanger');if(b.length>0){var t=b.metadata().timeout;if(typeof t!='undefined'){var oth=function(timer){var foh=function(){if(!$.browser.opera){bv.css('opacity',0).hide();bh.css('opacity',0).show();bh.fadeTo('normal',1,fih);}
else{bv.hide();bh.show();fih();}};var bv=b.find('p:visible');var bh=b.find('p:hidden');if(!$.browser.opera){bv.css('opacity',1).fadeTo('normal',0,foh);}
else{foh();}
timer.stop();};var fih=function(){$.timer(t,oth);};$.timer(t,oth);}}});})(jQuery);;(function($){$.fn.popupError=function(form){return this.each(function(){var popup=$(this),config=flashSMS.conf,inputs=typeof form!='undefined'?form.find(':input:visible:enabled'):$('form :input:visible:enabled'),close=popup.find('a.close'),onCloseClick=function(event){popup.fadeOut('fast',function(){$(this).remove();});inputs.unbind('focus.popuperror');},onPopupTimeout=function(timer){close.trigger('click');timer.stop();inputs.unbind('focus.popuperror');},onFormChange=function(event){close.trigger('click');inputs.unbind('focus.popuperror');};close.one('click',onCloseClick);inputs.unbind('focus.popuperror').bind('focus.popuperror',onFormChange);$.timer(config.ERROR_DIALOG_CLOSE_TIMEOUT,onPopupTimeout);});};var onDocumentReady=function(event){$('#popup-error').popupError();};$(document).bind('ready',onDocumentReady);})(jQuery);;(function($){$.errorDialog=function(form,errors){var config=flashSMS.conf;form.find(':input.error-field').removeClass('error-field');if(typeof errors!='undefined'&&errors instanceof Array&&errors.length>0){var html='<div id="popup-error"><div id="popup-error-i">'+'<a class="close" href="javascript:void(0)">'+$.translate('ERROR_DIALOG_CLOSE')+'</a>'+'<p><strong>'+$.translate('ERROR_DIALOG_HEADER')+'</strong></p>';$(errors).each(function(){if(this.m instanceof Array&&this.m.length==2){html+='<p>'+$.translate(this.m[0],this.m[1])+'</p>';}
else{html+='<p>'+$.translate(this.m)+'</p>';}
var onFieldFocus=function(event){$(this).removeClass('error-field');};if(typeof this.f!='undefined'){this.f.addClass('error-field').one('focus',onFieldFocus);}});html+='</div></div>';html=$(html);html.popupError(form);var p=$('#popup-error');if(p.length>0){p.find('a.close').unbind();p.replaceWith(html);}
else{$('body').append(html);}
html.bgIframe();try{window.scrollTo(0,0);}
catch(e){}
return true;}
else{return false;}};})(jQuery);;(function($){$.fn.errorField=function(){return this.each(function(){var t=$(this);t.one('focus',function(){t.removeClass('error-field');});});};$(function(e){$(':input.error-field').errorField();});})(jQuery);;(function($){$.fn.defaultValue=function(){return this.each(function(){var t=$(this);if(t.is(':input')&&typeof t.metadata().defaultValue!='undefined'){var tt=t.metadata().defaultValue;var clr=t.metadata().clearOnSubmit;var h1=function(e){var v=$.trim(t.val());var el=$(this);switch(e.type){case'blur':if(v.length==0){if(!el.is('input[type=text],textarea')){el.data('originalType',el.attr('type'));try{el[0].type='text';}
catch(e){}}
el.addClass('grey').val(tt);}
break;case'focus':if(v==tt){if(el.data('originalType')){try{el[0].type=el.data('originalType');}
catch(e){}}
el.removeClass('grey').val('');}
break;}};var h2=function(e){var v=$.trim(t.val());if(v==tt){t.removeClass('grey').val('');}};$(['focus','blur']).each(function(){t.bind(this,h1);});t.trigger('blur');if(typeof clr=='undefined'||clr===true){t.parents('form').bind('submit',h2);}}});};$(function(e){$('.defaultValue').defaultValue();});})(jQuery);;(function($){$.fn.baloon=function(){return this.each(function(){var t=$(this);var d=t.metadata();d.content=d.content.replace(/%20/ig,' ');var b=$('<div class="baloon-container" style="display:none;">'+
(d.handler=='click'?'<a href="javascript:void(0)" class="baloon-x" style="margin-left:'+(d.width-8-d.cornerSize)+'px;margin-top:'+d.cornerSize+'px;"><img src="/img/baloon/x.gif" alt="" width="8" height="8" /></a>':'')+'<table cellpadding="0" cellspacing="0">'+'<tr>'+'<td class="baloon-lta" width="'+d.cornerSize+'" height="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+d.cornerSize+'" height="'+d.cornerSize+'" />'+'</td>'+'<td colspan="3" class="baloon-t" width="'+(d.width-d.cornerSize*2)+'" height="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+(d.width-d.cornerSize*2)+'" height="'+d.cornerSize+'" />'+'</td>'+'<td class="baloon-rta" width="'+d.cornerSize+'" height="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+d.cornerSize+'" height="'+d.cornerSize+'" />'+'</td>'+'</tr>'+'<tr>'+'<td class="baloon-l" width="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+d.cornerSize+'" height="1" />'+'</td>'+'<td class="baloon-c" colspan="3" width="'+(d.width-d.cornerSize*2)+'">'+
(d.handler=='click'?'<img src="/img/b.gif" alt="" width="10" height="10" style="float:right;" />':'')+
$.unescapeHtml(d.content)+'<img src="/img/b.gif" alt="" width="'+(d.width-d.cornerSize*2)+'" height="1" />'+'</td>'+'<td class="baloon-r" width="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+d.cornerSize+'" height="1" />'+'</td>'+'</tr>'+'<tr>'+'<td class="baloon-lba" width="'+d.cornerSize+'" height="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+d.cornerSize+'" height="'+d.cornerSize+'" />'+'</td>'+'<td class="baloon-b-l" width="'+(d.width-d.cornerSize-d.tailOffset)+'" height="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+(d.width-d.cornerSize-d.tailOffset)+'" height="'+d.cornerSize+'" />'+'</td>'+'<td class="baloon-tail-t" width="'+(d.tailWidth)+'" height="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+(d.tailWidth)+'" height="'+d.cornerSize+'" />'+'</td>'+'<td class="baloon-b-r" width="'+(d.tailOffset-d.tailWidth-d.cornerSize)+'" height="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+(d.tailOffset-d.tailWidth-d.cornerSize)+'" height="'+d.cornerSize+'" />'+'</td>'+'<td class="baloon-rba" width="'+d.cornerSize+'" height="'+d.cornerSize+'">'+'<img src="/img/b.gif" alt="" width="'+d.cornerSize+'" height="'+d.cornerSize+'" />'+'</td>'+'</tr>'+'<tr>'+'<td colspan="2" class="baloon-tail-l" width="'+(d.width-d.tailOffset)+'" height="'+(d.tailHeight-d.cornerSize)+'">'+'<img src="/img/b.gif" alt="" width="'+(d.width-d.tailOffset)+'" height="'+(d.tailHeight-d.cornerSize)+'" />'+'</td>'+'<td class="baloon-tail-b" width="'+d.tailWidth+'" height="'+(d.tailHeight-d.cornerSize)+'">'+'<img src="/img/b.gif" alt="" width="'+d.tailWidth+'" height="'+(d.tailHeight-d.cornerSize)+'" />'+'</td>'+'<td colspan="2" class="baloon-tail-r" width="'+(d.tailOffset-d.tailWidth)+'" height="'+(d.tailHeight-d.cornerSize)+'">'+'<img src="/img/b.gif" alt="" width="'+(d.tailOffset-d.tailWidth)+'" height="'+(d.tailHeight-d.cornerSize)+'" />'+'</td>'+'</tr>'+'</table>'+'</div>');t.after(b);b.css('opacity',0).show();var sp=t.position();var bp=b.position();var so=t.offset();var bo=b.offset();if($.browser.opera&&parseFloat($.browser.version,10)<9){b.css('margin-top','-'+(b.height()+(bp.top-sp.top))+'px');b.css('margin-left',(so.left-bo.left-(d.width-d.tailOffset))+'px');}
else if(!$.browser.msie){b.css('margin-top','-'+(b.height()+(bp.top-sp.top))+'px');b.css('margin-left',(sp.left-bp.left-(d.width-d.tailOffset))+'px');}
else if(/6.0/.test(navigator.userAgent)){b.css('margin-top','-'+(b.height())+'px');b.css('margin-left',(sp.left+(bp.left-sp.left)-so.left+d.tailOffset+d.tailWidth/2-Math.floor(d.cornerSize/3.5))+'px');}
else{b.css('margin-top','-'+(b.height()-Math.floor(d.cornerSize/2))+'px');b.css('margin-left',(sp.left+(bp.left-sp.left)-so.left+d.tailOffset+d.tailWidth/2-Math.floor(d.cornerSize/2))+'px');}
b.bgIframe();b.hide();switch(d.handler){case'click':var bch=function(e){b.css('opacity',0).show();b.fadeTo('fast',1);};var xch=function(e){b.fadeTo('fast',0,function(){$(this).hide();});};b.find('a.baloon-x').click(xch);t.click(bch);break;case'mouseover':var timer=false;var bhh=function(){$(this).hide();tmrs();};var tmrs=function(){if(timer!==false){timer.stop();timer=false;}};var tmr=function(){b.fadeTo('fast',0,bhh);};var mov=function(e){if(b.is(':hidden')){b.css('opacity',0).show();b.fadeTo('fast',1);}
tmrs();};var mou=function(e){tmrs();timer=$.timer(d.timeout,tmr);};t.add(b).hover(mov,mou);break;}});};$(function(e){$('form:visible .baloon').baloon();});var imgs=[];$(['b.png','c.png','l.png','lba.png','lta.png','r.png','rba.png','rta.png','t.png','tail-b.png','tail-t.png','tail.png','x.gif']).each(function(){var i=new Image();i.src='/img/baloon/'+this;imgs.push(i);});})(jQuery);;(function($){$.fn.phoneNumber=function(){return this.each(function(){var _this=$(this);var ov=_this.val();var kuh=function(e){var nv=_this.val();if(nv.length>0&&nv!=ov){nv=nv.replace(/^(.+)(\+*)(.*)$/ig,'$1$3');nv=nv.replace(/^\s+/ig,'');nv=nv.replace(/\s{2,}/ig,' ');nv=nv.replace(/[^0-9\s\(\)\+-]/ig,'');nv=nv.replace(/^\+?0+/ig,'+49');_this.val(nv);ov=nv;}};_this.keyup(kuh);});};})(jQuery);;(function($){$.fn.SMSSender=function(){return this.each(function(){var _this=$(this);var ov=_this.val();var kuh=function(e){var nv=_this.val();if(nv.length>0&&nv!=ov){nv=nv.replace(/[^a-z0-9]*/ig,'');_this.val(nv);ov=nv;}};_this.keyup(kuh);});};})(jQuery);;(function($){$.fn.contactName=function(){return this.each(function(){var _this=$(this);var ov=_this.val();var kuh=function(e){var nv=_this.val();if(nv.length>0&&nv!=ov){nv=nv.replace(/^[^a-zA-ZäöüÄÖÜß]/g,'');nv=nv.replace(/[^a-zA-Z0-9äöüÄÖÜß_'\., -]/g,'');nv=nv.replace(/\s{2,}/ig,' ');_this.val(nv);ov=nv;}};_this.keyup(kuh);});};$.fn.groupName=$.fn.contactName;})(jQuery);;(function($){$.fn.textareaCounter=function(){return this.each(function(){var t=$(this);var c=t.nextAll('.counter').slice(0,1);if(c.length>0){var ttl=c.find('.total');var max=c.find('.max');if(ttl.length>0&&max.length>0){var kuh=function(e){var v=$.trim($(this).val());var m=parseInt(max.text(),10);if(!isNaN(m)){if(v.length>m){$(this).val(v.substr(0,m));ttl.text(m);}
else{ttl.text(v.length>0?v.length:'0');}}};t.keyup(kuh).trigger('keypress');}}});};$(function(e){$('textarea.textareaCounter').textareaCounter();});})(jQuery);;(function($){$.fn.passwordStrength=function(){var onPasswordKeyUp=function(event){var val=$(this).val();var bar=event.data.bar;bar.attr('class','');if(val.length!=0){var passIsLongEnough=val.length>=6;var passContainsLetters=val.search(/[a-z]+/)>-1;var passContainsDigits=val.search(/[0-9]+/)>-1;if(passIsLongEnough&&(passContainsLetters&&passContainsDigits)){bar.addClass('good').html($.translate('PASSWORD_STRENGTH_GOOD'));}
else if(passIsLongEnough&&(passContainsLetters||passContainsDigits)){bar.addClass('simple').html($.translate('PASSWORD_STRENGTH_SIMPLE'));}
else{bar.addClass('short').html($.translate('PASSWORD_STRENGTH_SHORT'));}}
else{bar.html($.translate('PASSWORD_STRENGTH_EMPTY'));}}
return this.each(function(){var $this=$(this);var password=$this.find('#id_password');var passwordConfirm=$this.find('#id_password_confirm');var strengthMeter=$this.find('#id_password_strength').children('span');if(password.length>0&&passwordConfirm.length>0&&strengthMeter.length>0){password.bind('keyup',{bar:strengthMeter},onPasswordKeyUp);}});};switch(window.location.pathname){case'/signup':$(function(event){$('form#frm-signup').passwordStrength();});break;case'/changepassword':$(function(event){$('form#frm-change-pass').passwordStrength();});break;}
if(window.location.pathname.search(/^\/(reset|invitation)(\/[^\/]+\/[^\/]+)?/)>-1){$(function(event){$('form#frm-pass-reset,form#frm-signup').passwordStrength();});}})(jQuery);;(function($){$.fn.jqm=function(o){var _o={overlay:50,overlayClass:'jqmOverlay',closeClass:'jqmClose',trigger:'.jqModal',ajax:false,ajaxText:'',target:false,modal:false,toTop:false,onShow:false,onHide:false,onLoad:false};return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;H[s]={c:$.extend(_o,o),a:false,w:$(this).addClass('jqmID'+s),s:s};if(_o.trigger)$(this).jqmAddTrigger(_o.trigger);});};$.fn.jqmAddClose=function(e){hs(this,e,'jqmHide');return this;};$.fn.jqmAddTrigger=function(e){hs(this,e,'jqmShow');return this;};$.fn.jqmShow=function(t){return this.each(function(){if(!H[this._jqm].a)$.jqm.open(this._jqm,t)});};$.fn.jqmHide=function(t){return this.each(function(){if(H[this._jqm].a)$.jqm.close(this._jqm,t)});};$.jqm={hash:{},open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal){if(!A[0])F('bind');A.push(s);o.css('cursor','wait');}
else if(c.overlay>0)h.w.jqmAddClose(o);else o=false;h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):false;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}
if(c.ajax){var r=c.target||h.w,u=c.ajax,r=(typeof r=='string')?$(r,h.w):$(r),u=(u.substr(0,1)=='@')?$(t).attr(u.substring(1)):u;r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
else if(cc)h.w.jqmAddClose($(cc,h.w));if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);(c.onShow)?c.onShow(h):h.w.show();e(h);return false;},close:function(s){var h=H[s];h.a=false;if(A[0]){A.pop();if(!A[0])F('unbind');}
if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();}return false;}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version=="6.0"),i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h);},f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(e){}},F=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r;},hs=function(w,e,y){var s=[];w.each(function(){s.push(this._jqm)});$(e).each(function(){if(this[y])$.extend(this[y],s);else{this[y]=s;$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return false;});}});};})(jQuery);;(function($){$.Jcrop=function(obj,opt)
{var obj=obj,opt=opt;if(typeof(obj)!=='object')obj=$(obj)[0];if(typeof(opt)!=='object')opt={};if(!('trackDocument'in opt))
opt.trackDocument=$.browser.msie?false:true;if(!('keySupport'in opt))
opt.keySupport=$.browser.msie?false:true;var defaults={trackDocument:false,baseClass:'jcrop',addClass:null,bgColor:'black',bgOpacity:.6,borderOpacity:.4,handleOpacity:.5,handlePad:5,handleSize:9,handleOffset:5,edgeMargin:14,aspectRatio:0,keySupport:true,cornerHandles:true,sideHandles:true,drawBorders:true,dragEdges:true,boxWidth:0,boxHeight:0,boundary:8,animationDelay:20,swingSpeed:3,watchShift:false,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){}};var options=defaults;setOptions(opt);var $img=$(obj).css({position:'absolute'});presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$('<div />').width(boundx).height(boundy).addClass(cssClass('holder')).css({position:'relative',backgroundColor:options.bgColor});if(options.addClass)$div.addClass(options.addClass);$img.wrap($div);var $img2=$('<img />').attr('src',$img.attr('src')).css('position','absolute').width(boundx).height(boundy);var $img_holder=$('<div />').width(pct(100)).height(pct(100)).css({zIndex:310,position:'absolute',overflow:'hidden'}).append($img2);var $hdl_holder=$('<div />').width(pct(100)).height(pct(100)).css({zIndex:320});var $sel=$('<div />').css({position:'absolute',zIndex:300}).insertBefore($img).append($img_holder,$hdl_holder);var bound=options.boundary;var $trk=$('<div />').addClass(cssClass('tracker')).width(boundx+(bound*2)).height(boundy+(bound*2)).css({position:'absolute',top:px(-bound),left:px(-bound),zIndex:290,opacity:0}).mousedown(newSelection);var xscale,yscale;var docOffset=getPos(obj),btndown,aspectLock,lastcurs,dimmed,animating,shift_down;if('trueSize'in options)
{xscale=options.trueSize[0]/boundx;yscale=options.trueSize[1]/boundy;}
var Coords=function()
{var x1=0,y1=0,x2=0,y2=0,ox,oy;function setPressed(pos)
{var pos=rebound(pos);x2=x1=pos[0];y2=y1=pos[1];};function setCurrent(pos)
{var pos=rebound(pos);ox=pos[0]-x2;oy=pos[1]-y2;x2=pos[0];y2=pos[1];};function getOffset()
{return[ox,oy];};function moveOffset(offset)
{var ox=offset[0],oy=offset[1];if(0>x1+ox)ox-=ox+x1;if(0>y1+oy)oy-=oy+y1;if(boundy<y2+oy)oy+=boundy-(y2+oy);if(boundx<x2+ox)ox+=boundx-(x2+ox);x1+=ox;x2+=ox;y1+=oy;y2+=oy;};function getCorner(ord)
{var c=getFixed();switch(ord)
{case'ne':return[c.x2,c.y];case'nw':return[c.x,c.y];case'se':return[c.x2,c.y2];case'sw':return[c.x,c.y2];}};function getFixed()
{if(!options.aspectRatio&&!aspectLock)return getRect();var aspect=options.aspectRatio?options.aspectRatio:aspectLock,min=options.minSize,max=options.maxSize,rw=x2-x1,rh=y2-y1,rwa=Math.abs(rw),rha=Math.abs(rh),real_ratio=rwa/rha,xx,yy;if(real_ratio<aspect)
{yy=y2;w=rha*aspect;xx=rw<0?x1-w:w+x1;if(xx<0)
{xx=0;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}
else if(xx>boundx)
{xx=boundx;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}}
else
{xx=x2;h=rwa/aspect;yy=rh<0?y1-h:y1+h;if(yy<0)
{yy=0;w=Math.abs((yy-y1)*aspect);xx=rw<0?x1-w:w+x1;}
else if(yy>boundy)
{yy=boundy;w=Math.abs(yy-y1)*aspect;xx=rw<0?x1-w:w+x1;}}
return last=makeObj(flipCoords(x1,y1,xx,yy));};function rebound(p)
{if(p[0]<0)p[0]=0;if(p[1]<0)p[1]=0;if(p[0]>boundx)p[0]=boundx;if(p[1]>boundy)p[1]=boundy;return[p[0],p[1]];};function flipCoords(x1,y1,x2,y2)
{var xa=x1,xb=x2,ya=y1,yb=y2;if(x2<x1)
{xa=x2;xb=x1;}
if(y2<y1)
{ya=y2;yb=y1;}
return[Math.round(xa),Math.round(ya),Math.round(xb),Math.round(yb)];};function getRect()
{var xsize=x2-x1;var ysize=y2-y1;if(xlimit&&(Math.abs(xsize)>xlimit))
x2=(xsize>0)?(x1+xlimit):(x1-xlimit);if(ylimit&&(Math.abs(ysize)>ylimit))
y2=(ysize>0)?(y1+ylimit):(y1-ylimit);if(ymin&&(Math.abs(ysize)<ymin))
y2=(ysize>0)?(y1+ymin):(y1-ymin);if(xmin&&(Math.abs(xsize)<xmin))
x2=(xsize>0)?(x1+xmin):(x1-xmin);if(x1<0){x2-=x1;x1-=x1;}
if(y1<0){y2-=y1;y1-=y1;}
if(x2<0){x1-=x2;x2-=x2;}
if(y2<0){y1-=y2;y2-=y2;}
if(x2>boundx){var delta=x2-boundx;x1-=delta;x2-=delta;}
if(y2>boundy){var delta=y2-boundy;y1-=delta;y2-=delta;}
if(x1>boundx){var delta=x1-boundy;y2-=delta;y1-=delta;}
if(y1>boundy){var delta=y1-boundy;y2-=delta;y1-=delta;}
return makeObj(flipCoords(x1,y1,x2,y2));};function makeObj(a)
{return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]};};return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed};}();var Selection=function()
{var start,end,dragmode,awake,hdep=370;var borders={};var handle={};var seehandles=false;var hhs=options.handleOffset;if(options.drawBorders){borders={top:insertBorder('hline').css('top',$.browser.msie?px(-1):px(0)),bottom:insertBorder('hline'),left:insertBorder('vline'),right:insertBorder('vline')};}
if(options.dragEdges){handle.t=insertDragbar('n');handle.b=insertDragbar('s');handle.r=insertDragbar('e');handle.l=insertDragbar('w');}
options.sideHandles&&createHandles(['n','s','e','w']);options.cornerHandles&&createHandles(['sw','nw','ne','se']);function insertBorder(type)
{var jq=$('<div />').css({position:'absolute',opacity:options.borderOpacity}).addClass(cssClass(type));$img_holder.append(jq);return jq;};function dragDiv(ord,zi)
{var jq=$('<div />').mousedown(createDragger(ord)).css({cursor:ord+'-resize',position:'absolute',zIndex:zi});$hdl_holder.append(jq);return jq;};function insertHandle(ord)
{return dragDiv(ord,hdep++).css({top:px(-hhs+1),left:px(-hhs+1),opacity:options.handleOpacity}).addClass(cssClass('handle'));};function insertDragbar(ord)
{var s=options.handleSize,o=hhs,h=s,w=s,t=o,l=o;switch(ord)
{case'n':case's':w=pct(100);break;case'e':case'w':h=pct(100);break;}
return dragDiv(ord,hdep++).width(w).height(h).css({top:px(-t+1),left:px(-l+1)});};function createHandles(li)
{for(i in li)handle[li[i]]=insertHandle(li[i]);};function moveHandles(c)
{var midvert=Math.round((c.h/2)-hhs),midhoriz=Math.round((c.w/2)-hhs),north=west=-hhs+1,east=c.w-hhs,south=c.h-hhs,x,y;'e'in handle&&handle.e.css({top:px(midvert),left:px(east)})&&handle.w.css({top:px(midvert)})&&handle.s.css({top:px(south),left:px(midhoriz)})&&handle.n.css({left:px(midhoriz)});'ne'in handle&&handle.ne.css({left:px(east)})&&handle.se.css({top:px(south),left:px(east)})&&handle.sw.css({top:px(south)});'b'in handle&&handle.b.css({top:px(south)})&&handle.r.css({left:px(east)});};function moveto(x,y)
{$img2.css({top:px(-y),left:px(-x)});$sel.css({top:px(y),left:px(x)});};function resize(w,h)
{$sel.width(w).height(h);};function refresh()
{var p=Coords.getFixed();Coords.setPressed([p.x,p.y]);Coords.setCurrent([p.x2,p.y2]);};function updateVisible()
{if(awake)return update();};function update()
{var c=Coords.getFixed();resize(c.w,c.h);moveto(c.x,c.y);options.drawBorders&&borders['right'].css({left:px(c.w-1)})&&borders['bottom'].css({top:px(c.h-1)});seehandles&&moveHandles(c);awake||show();options.onChange(unscale(c));};function show()
{$sel.show();$img.css('opacity',options.bgOpacity);awake=true;};function release()
{disableHandles();$sel.hide();$img.css('opacity',1);awake=false;};function hide()
{release();$img.css('opacity',1);awake=false;};function enableHandles()
{seehandles=true;moveHandles(Coords.getFixed());$hdl_holder.show();};function disableHandles()
{seehandles=false;$hdl_holder.hide();};function animMode(v)
{(animating=v)?disableHandles():enableHandles();};function done()
{var c=Coords.getFixed();animMode(false);refresh();};disableHandles();$img_holder.append
($('<div />').addClass(cssClass('tracker')).mousedown(createDragger('move')).css({cursor:'move',position:'absolute',zIndex:360,opacity:0}));return{updateVisible:updateVisible,update:update,release:release,show:show,hide:hide,enableHandles:enableHandles,disableHandles:disableHandles,animMode:animMode,done:done};}();var Tracker=function()
{var onMove=function(){},onDone=function(){},trackDoc=options.trackDocument;if(!trackDoc)
{$trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp);}
function toFront()
{if(trackDoc)
{$(document).mousemove(trackMove).mouseup(trackUp);}
$trk.css({zIndex:450});}
function toBack()
{if(trackDoc)
{$(document).unbind('mousemove',trackMove).unbind('mouseup',trackUp);}
$trk.css({zIndex:290});}
function trackMove(e)
{onMove(mouseAbs(e));};function trackUp(e)
{e.preventDefault();e.stopPropagation();if(btndown)
{btndown=false;onDone(mouseAbs(e));options.onSelect(unscale(Coords.getFixed()));toBack();onMove=function(){};onDone=function(){};}
return false;};function activateHandlers(move,done)
{btndown=true;onMove=move;onDone=done;toFront();return false;};function setCursor(t){$trk.css('cursor',t);};$img.before($trk);return{activateHandlers:activateHandlers,setCursor:setCursor};}();var KeyManager=function()
{var $keymgr=$('<input type="radio" />').css({position:'absolute',left:'-30px'}).keydown(parseKey).keyup(watchShift).blur(onBlur),$keywrap=$('<div />').css({position:'absolute',overflow:'hidden'}).append($keymgr);function watchKeys()
{if(options.keySupport)
{$keymgr.show();$keymgr.focus();}};function onBlur(e)
{$keymgr.hide();};function watchShift(e)
{if(!options.watchShift)return;var init_shift=shift_down,fc;shift_down=e.shiftKey?true:false;if(init_shift!=shift_down){if(shift_down&&btndown){fc=Coords.getFixed();aspectLock=fc.w/fc.h;}else aspectLock=0;Selection.update();}
e.stopPropagation();e.preventDefault();return false;};function doNudge(e,x,y)
{Coords.moveOffset([x,y]);Selection.updateVisible();e.preventDefault();e.stopPropagation();};function parseKey(e)
{if(e.ctrlKey)return true;watchShift(e);var nudge=shift_down?10:1;switch(e.keyCode)
{case 37:doNudge(e,-nudge,0);break;case 39:doNudge(e,nudge,0);break;case 38:doNudge(e,0,-nudge);break;case 40:doNudge(e,0,nudge);break;case 27:Selection.release();break;case 9:return true;}
return false;};if(options.keySupport)$keywrap.insertBefore($img);return{watchKeys:watchKeys};}();function px(n){return''+parseInt(n)+'px';};function pct(n){return''+parseInt(n)+'%';};function cssClass(cl){return options.baseClass+'-'+cl;};function getPos(obj)
{var pos=$(obj).offset();return[pos.left,pos.top];};function mouseAbs(e)
{return[(e.pageX-docOffset[0]),(e.pageY-docOffset[1])];};function myCursor(type)
{if(type!=lastcurs)
{Tracker.setCursor(type);lastcurs=type;}};function startDragMode(mode,pos)
{docOffset=getPos(obj);Tracker.setCursor(mode=='move'?mode:mode+'-resize');if(mode=='move')
return Tracker.activateHandlers(createMover(pos),doneSelect);var fc=Coords.getFixed();Coords.setPressed(Coords.getCorner(oppLockCorner(mode)));Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect);};function dragmodeHandler(mode,f)
{return function(pos){if(!options.aspectRatio&&!aspectLock)switch(mode)
{case'e':pos[1]=f.y2;break;case'w':pos[1]=f.y2;break;case'n':pos[0]=f.x2;break;case's':pos[0]=f.x2;break;}
else switch(mode)
{case'e':pos[1]=f.y+1;break;case'w':pos[1]=f.y+1;break;case'n':pos[0]=f.x+1;break;case's':pos[0]=f.x+1;break;}
Coords.setCurrent(pos);Selection.update();};};function createMover(pos)
{var lloc=pos;KeyManager.watchKeys();return function(pos)
{Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]);lloc=pos;Selection.update();};};function oppLockCorner(ord)
{switch(ord)
{case'n':return'sw';case's':return'nw';case'e':return'nw';case'w':return'ne';case'ne':return'sw';case'nw':return'se';case'se':return'nw';case'sw':return'ne';};};function createDragger(ord)
{return function(e){btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false;};};function presize($obj,w,h)
{var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0)
{nw=w;nh=(w/$obj.width())*$obj.height();}
if((nh>h)&&h>0)
{nh=h;nw=(h/$obj.height())*$obj.width();}
xscale=$obj.width()/nw;yscale=$obj.height()/nh;$obj.width(nw).height(nh);};function unscale(c)
{return{x:parseInt(c.x*xscale),y:parseInt(c.y*yscale),x2:parseInt(c.x2*xscale),y2:parseInt(c.y2*yscale),w:parseInt(c.w*xscale),h:parseInt(c.h*yscale)};};function doneSelect(pos)
{var c=Coords.getFixed();if(c.w>options.minSelect[0]&&c.h>options.minSelect[1])
{Selection.enableHandles();Selection.done();}
else
{Selection.release();}
Tracker.setCursor('crosshair');};function newSelection(e)
{btndown=true;docOffset=getPos(obj);Selection.release();Selection.disableHandles();myCursor('crosshair');Coords.setPressed(mouseAbs(e));Tracker.activateHandlers(selectDrag,doneSelect);KeyManager.watchKeys();e.stopPropagation();e.preventDefault();return false;};function selectDrag(pos)
{Coords.setCurrent(pos);Selection.update();};function animateTo(a)
{var x1=a[0],y1=a[1],x2=a[2],y2=a[3];if(animating)return;var animto=Coords.flipCoords(x1,y1,x2,y2);var c=Coords.getFixed();var animat=initcr=[c.x,c.y,c.x2,c.y2];var interv=options.animationDelay;var x=animat[0];var y=animat[1];var x2=animat[2];var y2=animat[3];var ix1=animto[0]-initcr[0];var iy1=animto[1]-initcr[1];var ix2=animto[2]-initcr[2];var iy2=animto[3]-initcr[3];var pcent=0;var velocity=options.swingSpeed;Selection.animMode(true);var animator=function()
{return function()
{pcent+=(100-pcent)/velocity;animat[0]=x+((pcent/100)*ix1);animat[1]=y+((pcent/100)*iy1);animat[2]=x2+((pcent/100)*ix2);animat[3]=y2+((pcent/100)*iy2);if(pcent<100)animateStart();else Selection.done();if(pcent>=99.8)pcent=100;setSelect(animat);};}();function animateStart()
{window.setTimeout(animator,interv);};animateStart();};function setSelect(l)
{Coords.setPressed([l[0],l[1]]);Coords.setCurrent([l[2],l[3]]);Selection.update();};function setOptions(opt)
{if(typeof(opt)!='object')opt={};options=$.extend(options,opt);if(typeof(options.onChange)!=='function')
options.onChange=function(){};if(typeof(options.onSelect)!=='function')
options.onSelect=function(){};};function tellSelect()
{return unscale(Coords.getFixed());};function tellScaled()
{return Coords.getFixed();};function setOptionsNew(opt)
{setOptions(opt);if('setSelect'in opt){setSelect(opt.setSelect);Selection.done();}};if(typeof(opt)!='object')opt={};if('setSelect'in opt){setSelect(opt.setSelect);Selection.done();}
var xlimit=options.maxSize[0]||0;var ylimit=options.maxSize[1]||0;var xmin=options.minSize[0]||0;var ymin=options.minSize[1]||0;Tracker.setCursor('crosshair');return{animateTo:animateTo,setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled};};$.fn.Jcrop=function(options)
{function attachWhenDone(from)
{var loadsrc=options.useImg||from.src;var img=new Image();var from=from;img.onload=function(){$(from).hide().after(img);from.Jcrop=$.Jcrop(img,options);};img.src=loadsrc;};if(typeof(options)!=='object')options={};this.each(function()
{if('Jcrop'in this)
{if(options=='api')return this.Jcrop;else this.Jcrop.setOptions(options);}
else attachWhenDone(this);});return this;};})(jQuery);;(function($){if(window.location.pathname=='/faq'){var onDocmentReady=function(event){var questions=$('ul.faq-questions>li');var onQuestionClick=function(){var link=$(this);var question=link.parent('li');var answer=link.next('p');if(!answer.is(':visible')){questions.filter('li.active').children('p').hide('fast',onAnswerHide);question.children('p').show('fast',onAnswerShow);}};var onAnswerHide=function(){$(this).parent('li').removeClass('active');};var onAnswerShow=function(){$(this).parent('li').addClass('active');};questions.children('a:first-child').bind('click',onQuestionClick);};$(document).bind('ready',onDocmentReady);var hd=$('head');if(hd.length>0){hd.append('<style type="text/css">.faq-questions li p {display:none;background:#FFFFFF;} .faq-questions li.active p {display:block;}</style>');}}})(jQuery);;var Translation={ERROR_DIALOG_CLOSE:'Close',ERROR_DIALOG_HEADER:'Folgende Fehler sind aufgetreten:',PASSWORD_STRENGTH_EMPTY:'&nbsp;',PASSWORD_STRENGTH_GOOD:'sicher',PASSWORD_STRENGTH_SIMPLE:'unsicher',PASSWORD_STRENGTH_SHORT:'zu kurz',SIGNUP_USER_EMPTY:'Bitte tragen Sie einen Benutzernamen ein.',SIGNUP_USER_INVALID:'Ihr Benutzername enthält leider ungültige Zeichen. Zugelassen sind alle Zeichen von a-z, A-Z, 0-9 sowie .-_',SIGNUP_PASSWORD_EMPTY:'Bitte tragen Sie Ihr Passwort ein.',SIGNUP_PASSWORD_CONFIRM_EMPTY:'Bitte wiederholen Sie Ihr Passwort.',SIGNUP_PASSWORD_NOT_MATCH:'Das Passwort stimmt nicht mit der Wiederholung überein.',SIGNUP_PASSWORD_TOO_SHORT:'Das Passwort ist zu kurz. Bitte tragen Sie ein Passwort mit mindestens %min% Zeichen ein',SIGNUP_PASSWORD_TOO_SIMPLE:'Das Passwort ist zu einfach. Bitte verwenden Sie eine Kombination aus Buchstaben und Zahlen.',SIGNUP_SEX_EMPTY:'Bitte wählen Sie eine Anrede. ',SIGNUP_FIRSTNAME_EMPTY:'Bitte tragen Sie Ihren Vornamen ein.',SIGNUP_LASTNAME_EMPTY:'Bitte tragen Sie Ihren Nachnamen ein.',SIGNUP_BIRTHDATE_DAY_EMPTY:'Bitte wählen Sie Ihren Geburtstag aus.',SIGNUP_BIRTHDATE_MONTH_EMPTY:'Bitte wählen Sie Ihren Geburtsmonat aus.',SIGNUP_BIRTHDATE_YEAR_EMPTY:'Bitte wählen Sie Ihr Geburtsjahr aus.',SIGNUP_STREET_EMPTY:'Bitte tragen Sie Ihre Straße ein.',SIGNUP_NUMBER_EMPTY:'Bitte tragen Sie Ihre Hausnummer ein.',SIGNUP_NUMBER_INVALID:'Sie haben keine gültige Hausnummer eingetragen.',SIGNUP_ZIP_EMPTY:'Bitte tragen Sie Ihre Postleitzahl ein.',SIGNUP_ZIP_INVALID:'Sie haben keine gültige Postleitzahl eingetragen.',SIGNUP_CITY_EMPTY:'Bitte tragen Sie Ihre Stadt ein.',SIGNUP_COUNTRY_EMPTY:'Bitte wählen Sie Ihr Land aus.',SIGNUP_EMAIL_EMPTY:'Bitte tragen Sie Ihre E-Mail-Adresse ein.',SIGNUP_EMAIL_INVALID:'Sie haben eine ungültige oder falsche E-Mail-Adresse eingetragen.',SIGNUP_AGB_NOT_ACCEPTED:'Damit Sie sms-kostenlos.de nutzen können, stimmen Sie bitte unseren AGB zu.',SIGNUP_PRIVACY_NOT_ACCEPTED:'Damit Sie sms-kostenlos.de nutzen können, stimmen Sie bitte unserer Datenschutzerklärung zu.',SIGNUP_CAPTCHA_EMPTY:'Bitte geben Sie den Sicherheitscode ein.',PW_RESET_PASSWORD_EMPTY:'Bitte tragen Sie Ihr Passwort ein.',PW_RESET_PASSWORD_CONFIRM_EMPTY:'Bitte wiederholen Sie Ihr Passwort.',PW_RESET_PASSWORD_NOT_MATCH:'Das Passwort stimmt nicht mit der Wiederholung überein.',PW_RESET_PASSWORD_TOO_SHORT:'Das Passwort ist zu kurz. Bitte tragen Sie ein Passwort mit mindestens %min% Zeichen ein',PW_RESET_PASSWORD_TOO_SIMPLE:'Das Passwort ist zu einfach. Bitte verwenden Sie eine Kombination aus Buchstaben und Zahlen.',SETTINGS_FIRSTNAME_EMPTY:'Bitte tragen Sie Ihren Vornamen ein.',SETTINGS_LASTNAME_EMPTY:'Bitte tragen Sie Ihren Nachnamen ein.',SETTINGS_STREET_EMPTY:'Bitte tragen Sie Ihre Straße ein.',SETTINGS_NUMBER_EMPTY:'Bitte tragen Sie Ihre Hausnummer ein.',SETTINGS_NUMBER_INVALID:'Sie haben keine gültige Hausnummer eingetragen.',SETTINGS_ZIP_EMPTY:'Bitte tragen Sie Ihre Postleitzahl ein.',SETTINGS_ZIP_INVALID:'Sie haben keine gültige Postleitzahl eingetragen.',SETTINGS_CITY_EMPTY:'Bitte tragen Sie Ihre Stadt ein.',PREMIUMSMS_CODE_EMPTY:'Bitte tragen Sie Ihren Code ein.',HOTLINE_CODE_EMPTY:'Bitte tragen Sie Ihren Code ein.',SEND_SMS_RECIPIENTS_LIST_HEADER:'Empfängerliste',SEND_SMS_ADD_GROUP_EXISTS:'Diese Gruppe ist bereits in der Empfängerliste.',SEND_SMS_ADD_RECIPIENT_NUMBER_EMPTY:'Bitte tragen Sie die Empfängernummer ein.',SEND_SMS_ADD_RECIPIENT_PHONEBOOK_EMPTY:'Bitte wählen Sie einen Empfänger aus Ihrem Telefonbuch aus. ',SEND_SMS_ADD_RECIPIENT_NUMBER_INVALID:'Die Empfängernummer ist ungültig. Bitte achten Sie darauf, dass die Nummer im internationalen Format (+49…) angegeben ist.',SEND_SMS_ADD_RECIPIENT_NUMBER_TOO_SHORT:'Die Empfängernummer ist zu kurz. Die Nummer muss mindestens %min% Zeichen lang sein.',SEND_SMS_ADD_RECIPIENT_NUMBER_TOO_LONG:'Die Empfängernummer ist zu lang. Die Nummer darf höchstens %max% Zeichen lang sein.',SEND_SMS_ADD_RECIPIENT_NUMBER_EXISTS:'Diese Empfängernummer ist bereits in der Empfängerliste. ',SEND_SMS_TEXT_EMPTY:'Bitte tragen Sie den Text Ihrer SMS ein.',SEND_SMS_RECIPIENTS_EMPTY:'Bitte tragen Sie mindestens einen Empfänger ein, oder wählen Sie einen Kontakt aus dem Telefonbuch aus. ',SEND_SMS_SENDER_EMPTY:'Bitte wählen Sie die Absenderkennung.',SEND_SMS_SENDER_INVALID:'Bitte geben Sie einen Absender an. Maximal 11 Zeichen (a-z, A-Z, 0-9), mindestens 1 Buchstabe.',CONTACT_NAME_EMPTY:'Bitte tragen Sie den Namen des Empfängers ein.',CONTACT_NAME_INVALID:'Dieser Name ist ungültig.',CONTACT_NAME_EXISTS:'Mit diesem Namen ist bereits ein Empfänger eingetragen.',CONTACT_NUMBER_EMPTY:'Bitte tragen Sie die Empfängernummer ein.',CONTACT_NUMBER_INVALID:'Die Empfängernummer ist ungültig. Bitte achten Sie darauf, dass die Nummer im internationalen Format (+49…) angegeben ist.',CONTACT_NUMBER_TOO_SHORT:'Die Empfängernummer ist zu kurz. Die Nummer muss mindestens %min% Zeichen lang sein.',CONTACT_NUMBER_TOO_LONG:'Die Empfängernummer ist zu lang. Die Nummer darf höchstens %max% Zeichen lang sein.',CONTACT_NUMBER_EXISTS:'Diese Nummer ist bereits bei einem Empfänger eingetragen.',GROUP_NAME_EMPTY:'Bitte tragen Sie den Namen der Gruppe ein.',GROUP_NAME_INVALID:'Dieser Gruppenname ist ungültig. ',GROUP_NAME_EXISTS:'Mit diesem Namen ist bereits eine Gruppe angelegt. Bitte wählen Sie einen anderen Gruppennamen.',CHECK_NUMBER_EMPTY:'Bitte tragen Sie die Nummer ein, die Sie prüfen möchten.',CHECK_NUMBER_INVALID:'Die Nummer ist ungültig. Bitte achten Sie darauf, dass die Nummer im internationalen Format (+49…) angegeben ist.',CHECK_NUMBER_TOO_SHORT:'Die Nummer ist zu kurz. Die Nummer muss mindestens %min% Zeichen lang sein.',CHECK_NUMBER_TOO_LONG:'Die Nummer ist zu lang. Die Nummer darf höchstens %max% Zeichen lang sein.',DEFINE_NUMBER_EMPTY:'Bitte tragen Sie Ihre Handynummer ein.',DEFINE_NUMBER_INVALID:'Diese Handynummer ist ungültig. Bitte achten Sie darauf, dass die Nummer im internationalen Format (+49…) angegeben ist.',DEFINE_NUMBER_TOO_SHORT:'Die Handynummer ist zu kurz. Die Nummer muss mindestens %min% Zeichen lang sein.',DEFINE_NUMBER_TOO_LONG:'Die Handynummer ist zu lang. Die Nummer darf höchstens %max% Zeichen lang sein.',VERIFY_NUMBER_CODE_EMPTY:'Bitte tragen Sie Ihren Code ein.',INVITE_EMPTY:'Bitte tragen Sie mindestens eine E-Mail-Adresse ein.',INVITE_EMAIL_INVALID:'Die E-Mail-Adresse %number% isr ungültig.',INVITE_MESSAGE_EMPTY:'Bitte tragen Sie eine persönliche Nachricht ein. ',PASS_REMINDER_FIELD_EMPTY:'Bitte tragen Sie Ihre E-Mail-Adresse oder Ihren Benutzernamen ein.',PASS_REMINDER_FIELD_INVALID:'Der Benutzername oder die E-Mail-Adresse ist ungültig.',SEND_MMS_DELETE_ERROR:'Folgende Fehler sind aufgetreten: ',SEND_MMS_DELETE_CONFIRMATION:'Sind Sie sicher, dass Sie das Bild "%name%" löschen möchten?',SEND_MMS_IMAGE_UPLOAD_IN_PROGRESS:'Das Bild wird hochgeladen. Bitte haben Sie ein wenig Geduld.',SEND_MMS_RECIPIENT_NUMBER_EMPTY:'Bitte tragen Sie die Empfängernummer ein.',SEND_MMS_RECIPIENT_NUMBER_INVALID:'Die Empfängernummer ist ungültig. Bitte achten Sie darauf, dass die Nummer im internationalen Format (+49…) angegeben ist.',SEND_MMS_RECIPIENT_NUMBER_TOO_SHORT:'Die Empfängernummer ist zu kurz. Die Nummer muss mindestens %min% Zeichen lang sein.',SEND_MMS_RECIPIENT_NUMBER_TOO_LONG:'Die Empfängernummer ist zu lang. Die Nummer darf höchstens %max% Zeichen lang sein.',SEND_MMS_ATTACHMENT_REQUIRED:'Bitte wählen Sie mindestens ein Motiv aus.',SEND_MMS_ATTACHMENT_IMAGE_REQUIRED:'Bitte wählen Sie mindestens ein Bild aus für "%name%".',SEND_MMS_ATTACHMENT_DESCRIPTION_REQUIRED:'Bitte tragen Sie den Text ein, den Sie mit dem Bild versenden möchten für "%name%".'};;flashSMS={conf:{'MIN_NUM_LENGTH':6,'MAX_NUM_LENGTH':24,'EMAIL_RE':/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/,'NUM_RE':[/^(\+|00)?([0-9\s-\(\)])*[0-9]+$/i,/^(\+|00)/i,/[^0-9]+/ig],'ZIP_RE':/^[a-z0-9]+$/,'HOUSE_NUMBER_RE':/^[a-z0-9,\.\+\(\)\/ -]+$/,'MINIMAL_PASSWORD_LENGTH':1,'PASSWORD_RE':/^[a-z]{1,6}$/,'USER_NAME_RE':/^[a-zA-Z0-9][a-zA-Z0-9_\-\.]{2,31}$/,'CONTACT_NAME_RE':/^[a-zA-ZäöüÄÖÜß][a-zA-Z0-9äöüÄÖÜß_'\., -]{0,63}$/,'GROUP_NAME_RE':/^[a-zA-ZäöüÄÖÜß][a-zA-Z0-9äöüÄÖÜß_'\., -]{0,63}$/,'ERROR_DIALOG_CLOSE_TIMEOUT':3000}};(function($){var onDocumentReady=function(event){var b=$('#free-sms-program');if(b.length>0){var dlg=$('#free-sms-program-dialog');if(dlg.length>0){var yeslnks=b.find("a[href='/freesms/yes']");var onJqModalHide=function(hash){hash.w.hide();hash.o.remove();$('iframe:hidden').css('visibility','visible');$(window).unbind('resize.freesmsprogram');window.clearInterval(windowTimer);};var onJqModalShow=function(hash){$('iframe:visible').css('visibility','hidden');hash.w.show();$(window).bind('resize.freesmsprogram',{p:hash.w},onWindowResize).trigger('resize.freesmsprogram');windowTimer=window.setInterval(windowTimerHandler,500);};var onWindowResize=function(event){var topOffset=Math.round(event.data.p.outerHeight()/2);event.data.p.css('margin-top','-'+topOffset+'px');};var windowTimer=false;var windowTimerHandler=function(){var checked=0;chk.each(function(){if($(this).is(':checked')){checked++;}});if(checked==chk.length){window.clearInterval(windowTimer);window.location.href="/freesms/yes";}};var jqModalParams={toTop:true,trigger:yeslnks,onShow:onJqModalShow,onHide:onJqModalHide};dlg.jqm(jqModalParams);var chk=dlg.find('input[type=checkbox]');}
else if($.browser.msie){b.find("a.base-button").bind('click',function(){window.location.href=$(this).attr('href');return false;});}}};$(document).bind('ready',onDocumentReady);})(jQuery);;(function($){if(window.location.pathname=='/signup'){$(function(e){var f=$('#frm-signup');if(f.length>0){var cf=flashSMS.conf;$.fn.captchaReload=function(){return this.each(function(){$(this).bind('click',function(e){var c=$('img.img-captcha');if(c.length>0){c.attr('src','/img/b.gif');window.setTimeout(function(){var c=$('img.img-captcha');if(c.length>1){var c1=c.slice(1);var c=$(c[0]);}
c.attr('src','/image/captcha/'+(new Date()).getTime());if(typeof c1!='undefined'){c1.each(function(){var $this=$(this);var ni=c.clone();if(typeof $this.attr('id')!='undefined'){ni.attr('id',$this.attr('id'));}
else if(typeof ni.attr('id')!='undefined'){ni.removeAttr('id');}
$(this).replaceWith(ni);});}},200);}});})};$('a.img-captcha-link').captchaReload();$('a.img-captcha-link').show();var user=f.find('#id_nickname');var pass1=f.find('#id_password');var pass2=f.find('#id_password_confirm');var sex=f.find('#id_sex');var fn=f.find('#id_firstname');var ln=f.find('#id_lastname');var birthdateDay=f.find('#id_birthdate_day');var birthdateMonth=f.find('#id_birthdate_month');var birthdateYear=f.find('#id_birthdate_year');var street=f.find('#id_street');var house=f.find('#id_house');var zip=f.find('#id_zipcode');var city=f.find('#id_city');var country=f.find('#id_country_code');var email=f.find('#id_email');var agb=f.find('#chck-AGB');var privacy=f.find('#chck-privacy');var captcha=f.find('#id_captcha');var fsbmth=function(e){var err=[];var userv=$.trim(user.val());var pass1v=$.trim(pass1.val());var pass2v=$.trim(pass2.val());var sexValue=$.trim(sex.val());var fnv=$.trim(fn.val());var lnv=$.trim(ln.val());var birthdateDayValue=$.trim(birthdateDay.val());var birthdateMonthValue=$.trim(birthdateMonth.val());var birthdateYearValue=$.trim(birthdateYear.val());var streetv=$.trim(street.val());var housev=$.trim(house.val());var zipv=$.trim(zip.val());var cityv=$.trim(city.val());var countryv=$.trim(country.val());var emailv=$.trim(email.val());var agbv=agb.is(':checked');var privacyv=privacy.is(':checked');var captchav=$.trim(captcha.val());if(userv.length==0){err.push({m:'SIGNUP_USER_EMPTY',f:user});}
else if(!cf.USER_NAME_RE.test(userv)){err.push({m:'SIGNUP_USER_INVALID',f:user});}
if(pass1v.length==0){err.push({m:'SIGNUP_PASSWORD_EMPTY',f:pass1.add(pass2)});}
else if(pass2v.length==0){err.push({m:'SIGNUP_PASSWORD_CONFIRM_EMPTY',f:pass1.add(pass2)});}
else if(pass1v!=pass2v){err.push({m:'SIGNUP_PASSWORD_NOT_MATCH',f:pass1.add(pass2)});}
if(sexValue.length==0){err.push({m:'SIGNUP_SEX_EMPTY',f:sex});}
if(fnv.length==0){err.push({m:'SIGNUP_FIRSTNAME_EMPTY',f:fn});}
if(lnv.length==0){err.push({m:'SIGNUP_LASTNAME_EMPTY',f:ln});}
if(birthdateDayValue.length==0){err.push({m:'SIGNUP_BIRTHDATE_DAY_EMPTY',f:birthdateDay});}
if(birthdateMonthValue.length==0){err.push({m:'SIGNUP_BIRTHDATE_MONTH_EMPTY',f:birthdateMonth});}
if(birthdateYearValue.length==0){err.push({m:'SIGNUP_BIRTHDATE_YEAR_EMPTY',f:birthdateYear});}
if(streetv.length==0){err.push({m:'SIGNUP_STREET_EMPTY',f:street});}
if(housev.length==0){err.push({m:'SIGNUP_NUMBER_EMPTY',f:house});}
else if(!cf.HOUSE_NUMBER_RE.test(housev)){err.push({m:'SIGNUP_NUMBER_INVALID',f:house});}
if(zipv.length==0){err.push({m:'SIGNUP_ZIP_EMPTY',f:zip});}
else if(!cf.ZIP_RE.test(zipv)){err.push({m:'SIGNUP_ZIP_INVALID',f:zip});}
if(cityv.length==0){err.push({m:'SIGNUP_CITY_EMPTY',f:city});}
if(countryv.length==0){err.push({m:'SIGNUP_COUNTRY_EMPTY',f:country});}
if(emailv.length==0){err.push({m:'SIGNUP_EMAIL_EMPTY',f:email});}
else if(!cf.EMAIL_RE.test(emailv)){err.push({m:'SIGNUP_EMAIL_INVALID',f:email});}
if(!agbv){err.push({m:'SIGNUP_AGB_NOT_ACCEPTED',f:agb});}
if(!privacyv){err.push({m:'SIGNUP_PRIVACY_NOT_ACCEPTED',f:privacy});}
if(captchav.length==0){err.push({m:'SIGNUP_CAPTCHA_EMPTY',f:captcha});}
return!$.errorDialog(f,err);};f.submit(fsbmth);}
$('div.partners-choose').find('div.text a[href]').attr('target','_blank');});}})(jQuery);;(function($){$(function(e){var f=$('#frmTextSMS');if(f.length>0){var nu=f.find('#frmTextSMSNumber');var li=f.find('#frmTextSMSList');$.data(li[0],'counter',li.find('input[name="sms[number][]"]').length);var ph=f.find('#frmTextSMSPhonebook');var from=f.find('#frmTextSMSFrom');var st=f.find('#frmTextSMSType1,#frmTextSMSType2');var pr1=parseInt(f.find('#frmTextSMSType1Price').text(),10);var pr2=parseInt(f.find('#frmTextSMSType2Price').text(),10);var pr=f.find('#frmTextSMSPrice');var txt=f.find('#frmTextSMSText');var cf=flashSMS.conf;var selectSMSFrom=from.find('select');var customSMSFrom=$('#frmTextSMSFromCustom').defaultValue().SMSSender();var calc=function(){var txtl=$.trim(txt.val()).length;var price=0;var rprice=0;var nanu=nu.val().length>0&&nu.val()!=nu.metadata().defaultValue&&li.find('input[name="sms[number][]"][value="'+nu.val()+'"]').length==0?1:0;var phc=ph.find('option:selected:not("option:first-child,option[value=\'\']")');if(phc.length>0&&phc.is('.group')){var temp=phc.metadata().contacts;phc=0;$(temp).each(function(){var length=li.find('input[name="sms[number][]"][value="'+this.number+'"]').length;phc+=length==0&&(nanu==0||(nanu==1&&nu.val()!=this.number))?1:0;});}
else{phc=phc.length;}
if(nanu==1&&phc==1&&ph.val()==nu.val()){phc=0;}
if(txtl>0){var tp=st.filter(':checked').val();switch(tp){case'hspeed':rprice=pr1;break;case'wreply':rprice=pr2;break;}
if(txtl<=160){price=($.data(li[0],'counter')+nanu+phc)*rprice;}
else{price=($.data(li[0],'counter')+nanu+phc)*rprice*Math.ceil(txtl/152);}}
pr.text(''+price);};var rm=function(e){e.preventDefault();$(this).parent().hide('fast',function(e){var phc=ph.find('option[value="'+$(this).find('input[name="sms[number][]"]').val()+'"]:hidden');if(phc.length>0){phc.show();}
$(this).remove();if(li.find('li:not("li.header")').length==0){li.prev('div.row').addClass('last').end().removeClass('last').hide('normal');}
$.data(li[0],'counter',$.data(li[0],'counter')-1);calc();});};var add=function(val){if(typeof val.name!='undefined'&&typeof val.value!='undefined'){var i=$('<li style="display:none;">'+'<span class="text">'+$.escapeHtml(val.name)+'</span>'+'<a href="javascript:void(0)" class="remove">'+'<img src="/img/icons/minus.gif" width="9" height="9" alt="-" />'+'</a>'+'<input type="hidden" name="sms[number][]" value="'+$.escapeHtml(val.value)+'" />'+'</li>');var ul=li.find('ul');if(ul.length==0){ul=$('<ul class="menu tel-numbers">'+'<li class="header">'+
$.translate('SEND_SMS_RECIPIENTS_LIST_HEADER',{test1:'Test#1',test2:'Test#2'})+'</li>'+'</ul>');li.append(ul).show('fast');}
i.find('a.remove').one('click',rm);ul.append(i);i.show('fast');li.prev('div.row').removeClass('last').end().addClass('last').show();$.data(li[0],'counter',$.data(li[0],'counter')+1);calc();}};var onSenderChange=function(event){var $this=$(this);switch($(this).val()){case'custom':$new=$('<input id="frmTextSMSFromCustom" type="text" class="field defaultValue grey" name="sms[from]" maxlength="11" />');var dv=$this.find('option:first-child').attr('value');$new.data('metadata',{defaultValue:dv,cleanOnSubmit:false}).val(dv);$this.replaceWith($new);$new.defaultValue().SMSSender().trigger('focus');customSMSFrom=$new;break;}};selectSMSFrom.bind('change',onSenderChange);var num=function(s){return li.find('input[name="sms[number][]"][value="'+$.unescapeHtml(s)+'"]').length>0;};var nuah=function(e){e.preventDefault();var w=window;var t=$(this);var v=$.trim(nu.val());var d=nu.metadata().defaultValue;if(v.length>0&&v!=d){var vv=v.replace(cf.NUM_RE[1],'').replace(cf.NUM_RE[2],'');if(!cf.NUM_RE[0].test(v)){$.errorDialog(f,[{m:'SEND_SMS_ADD_RECIPIENT_NUMBER_INVALID',f:nu}]);return;}
if(vv.length<cf.MIN_NUM_LENGTH){$.errorDialog(f,[{m:['SEND_SMS_ADD_RECIPIENT_NUMBER_TOO_SHORT',{min:cf.MIN_NUM_LENGTH}],f:nu}]);return;}
if(vv.length>cf.MAX_NUM_LENGTH){$.errorDialog(f,[{m:['SEND_SMS_ADD_RECIPIENT_NUMBER_TOO_LONG',{max:cf.MAX_NUM_LENGTH}],f:nu}]);return;}
vv='+'+vv;if(num(vv)){$.errorDialog(f,[{m:'SEND_SMS_ADD_RECIPIENT_NUMBER_EXISTS',f:nu}]);return;}
var su=ph.find('option[value="'+vv+'"]'),params;if(su.length>0){params={value:vv};params.name=su.text();su.hide();}
else{params={name:v,value:vv};}
nu.val('').trigger('blur').trigger('focus');add(params);}
else{$.errorDialog(f,[{m:'SEND_SMS_ADD_RECIPIENT_NUMBER_EMPTY',f:nu}]);}};var phah=function(e){e.preventDefault();var w=window;var t=$(this);var op=ph.find('option:selected:not("option:first-child,option[value=\'\']")');if(op.length>0){var params;if(op.is('.group')){ph.find('option:first-child').attr('selected','selected');$(op.metadata().contacts).each(function(){var contact=this;if(!num(contact.number)){add({name:contact.contact_name,value:contact.number});ph.find('option[value="'+$.unescapeHtml(contact.number)+'"]').hide();}});}
else{var v=$.trim(ph.val());var vv='+'+v.replace(cf.NUM_RE[1],'').replace(cf.NUM_RE[2],'');if(num(vv)){$.errorDialog(f,[{m:'SEND_SMS_ADD_RECIPIENT_NUMBER_EXISTS',f:ph}]);return;}
var sc=ph.find('option:selected');var nm=$.trim(sc.text());params={name:nm,value:vv};ph.find('option:first-child').attr('selected','selected');add(params);sc.hide();}}
else{$.errorDialog(f,[{m:'SEND_SMS_ADD_RECIPIENT_PHONEBOOK_EMPTY',f:ph}]);}};ph.change(calc);var stch=function(e){var t=$(this);txt.nextAll('.counter').slice(0,1).find('.max').text(''+t.metadata().maxTextLength+'').keyup();txt.keyup();if(!from.find(':input').is('.unverified')){var sel=from.find(':input');if(sel.length>0){switch(t.val()){case'hspeed':var opt=$.data(sel[0],'prevOption');sel.removeAttr('disabled');if(typeof opt!='undefined'){opt.attr('selected','selected');}
break;case'wreply':$.data(sel[0],'prevOption',sel.find('option:selected'));sel.find('option:first-child').attr('selected','selected').end().attr('disabled','disabled');break;}}}
calc();};var sbh=function(e){if(f.is('.in-progress')){return false;}
var err=[];var fs=$('#frmTextSMSFromSelect');var customSMSFrom=$('#frmTextSMSFromCustom');var nuv=$.trim(nu.val());var nud=nu.metadata().defaultValue;var numa=false;var phbv=ph.find('option:selected:visible:not("option:first-child")').val();if(nuv.length>0&&nuv!=nud){var nuvv=nuv.replace(cf.NUM_RE[1],'').replace(cf.NUM_RE[2],'');if(!cf.NUM_RE[0].test(nuv)){err.push({m:'SEND_SMS_ADD_RECIPIENT_NUMBER_INVALID',f:nu});}
else if(nuvv.length<cf.MIN_NUM_LENGTH){err.push({m:['SEND_SMS_ADD_RECIPIENT_NUMBER_TOO_SHORT',{min:cf.MIN_NUM_LENGTH}],f:nu});}
else if(nuvv.length>cf.MAX_NUM_LENGTH){err.push({m:['SEND_SMS_ADD_RECIPIENT_NUMBER_TOO_LONG',{max:cf.MAX_NUM_LENGTH}],f:nu});}
else if(typeof phbv!='undefined'&&('+'+nuvv)==phbv){err.push({m:'SEND_SMS_ADD_RECIPIENT_NUMBER_EXISTS',f:nu});}
else{numa=true;}}
else if(typeof phbv!='undefined'){numa=true;}
if(li.find('input[name="sms[number][]"]').length<1&&numa==false&&err.length==0){err.push({m:'SEND_SMS_RECIPIENTS_EMPTY'});}
if(st.filter(':checked').val()=='hspeed'&&fs.length>0&&fs.val().length==0){err.push({m:'SEND_SMS_SENDER_EMPTY',f:fs});}
if(st.filter(':checked').val()=='hspeed'&&customSMSFrom.length>0){var senderVal=customSMSFrom.val(),re1=/^[a-z0-9]{1,11}$/i,re2=/[a-z]/i;if(!re1.test(senderVal)||!re2.test(senderVal)){err.push({m:'SEND_SMS_SENDER_INVALID',f:customSMSFrom});}}
if($.trim(txt.val()).length==0){err.push({m:'SEND_SMS_TEXT_EMPTY',f:txt});}
if($.errorDialog(f,err)){nu.blur();return false;}
f.addClass('in-progress');f.find('input.button-submit').attr('disabled','disabled').css({opacity:0.5,cursor:'wait'});return true;};f.submit(sbh);nu.phoneNumber().keyup(calc);li.find('a.remove').one('click',rm);nu.nextAll('a.add').click(nuah);if(ph.children('option').length==1){ph.parent('div.row').hide();}
txt.keyup(calc);ph.nextAll('a.add').click(phah);if($.browser.msie){st.click(stch);st.filter(':checked').trigger('click');}
else{st.change(stch);st.filter(':checked').trigger('change');}
calc();}});})(jQuery);;(function($){$(function(e){var f=$('#frm-free-sms');if(f.length>0){var cf=flashSMS.conf;var i=f.find('#frm-free-sms-number');var s=f.find('#frm-free-sms-phonebook');var t=f.find('#frm-free-sms-text');var b=$('#frm-free-submit');if(i.length>0&&t.length>0){var sch=function(e){var _this=$(this);var v=$.trim(_this.find('option:selected:not("option:first-child")').val());if(typeof v!='undefined'&&v.length>0){i.removeClass('grey error-field').val(v);}
t.find('option:first-child').attr('selected','selected');};var fsh=function(e){if(f.is('.in-progress')){return false;}
var err=[];var iv=$.trim(i.val());if(iv.length==0||iv==i.metadata().defaultValue){err.push({m:'SEND_SMS_ADD_RECIPIENT_NUMBER_EMPTY',f:i});}
else{var ivf=iv.replace(cf.NUM_RE[1],'').replace(cf.NUM_RE[2],'');if(!cf.NUM_RE[0].test(iv)){err.push({m:'SEND_SMS_ADD_RECIPIENT_NUMBER_INVALID',f:i});}
if(ivf.length<cf.MIN_NUM_LENGTH){err.push({m:['SEND_SMS_ADD_RECIPIENT_NUMBER_TOO_SHORT',{min:cf.MIN_NUM_LENGTH}],f:i});}
if(ivf.length>cf.MAX_NUM_LENGTH){err.push({m:['SEND_SMS_ADD_RECIPIENT_NUMBER_TOO_LONG',{max:cf.MAX_NUM_LENGTH}],f:i});}}
var tv=$.trim(t.val());if(tv.length==0){err.push({m:'SEND_SMS_TEXT_EMPTY',f:t});}
if($.errorDialog(f,err)){i.blur();return false;}
f.addClass('in-progress');return true;};i.phoneNumber();if(s.length>0){s.change(sch);}
f.submit(fsh);var bbch=function(e){if(fsh()){f.unbind('submit').trigger('submit').bind('sunmit',fsh);return true;}
return false;};$('#frm-free-submit').find('a').each(function(){$(this).click(bbch);});}}});})(jQuery);;(function($){$(function(e){var f=$('#frm-sms-history-inbox,#frm-sms-history-outbox');if(f.length>0){var chk=f.find('table td.first input.chck');var sch=function(e){f.find('input[name="action"]').remove();f.submit();};var asch=function(e){e.stopPropagation();if($(this).is(':checked')){if($.browser.msie&&$.browser.version=='6.0'){chk.removeAttr('checked');}
else{chk.attr('checked','checked');}}
else{if($.browser.msie&&$.browser.version=='6.0'){chk.attr('checked','checked');}
else{chk.removeAttr('checked');}}};var trcg=function(e){var chck=$(this).find('input[type=checkbox]');if(chck.is(':checked')){chck.removeAttr('checked');}
else{chck.attr('checked','checked');}};var chch=function(e){e.stopPropagation();};var achk=f.find('div.sms-come-bottom input.chck');f.find('select[name="last_date"]').change(sch);if($.browser.msie){achk.click(asch);if($.browser.msie&&$.browser.version=='6.0'){achk.parent('label').click(function(e){e.preventDefault();e.stopPropagation();$(this).find('input[type=checkbox]').click();});}}
else{achk.change(asch);}
f.find('table tr:not("tr:first-child")').click(trcg).find('input[type=checkbox]').click(chch);}});})(jQuery);;(function($){$(function(e){var f=$('#frm-credits-history');if(f.length>0){var ss=f.find('select.month,select.year');var sch=function(e){var _this=$(this);if(_this.find('option:selected:not("option:first-child")').length>0){f.submit();}};ss.change(sch);}});})(jQuery);;(function($){$(function(e){var f=$('#frm-phonebook');if(f.length>0){var cf=flashSMS.conf;var cadd=$('#frm-add-contact');var cset=$('#frm-set-contact');var act=$('#frm-phonebook-action');var gadd=$('#frm-add-group');var gset=$('#frm-set-group');var cs=$.cookie('contacts_filter');if(cs==null||typeof cs=='undefined'){$.cookie('contacts_filter','all',{expires:7});cs='all';}
var cll=f.find('ul.letters.contacts li a').not('a.inactive');var cl=f.find('#contact-list');var clfch=function(e){var t=$(this);var l=t.attr('class').replace(/^(.*letter_)([a-z]+)(.*)$/,'$2');$.cookie('contacts_filter',l,{expires:7});cl.find('div[id^=contact_]').hide().filter('div#contact_'+l).show();cll.removeClass('active');t.addClass('active');};if(cll.length>0){cll.each(function(){$(this).click(clfch);});}
var gs=$.cookie('groups_filter');if(gs==null||typeof gs=='undefined'){$.cookie('groups_filter','all',{expires:7});gs='all';}
var gll=f.find('ul.letters.groups li a').not('a.inactive');var gl=f.find('#group-list');var glfch=function(e){var t=$(this);var l=t.attr('class').replace(/^(.*letter_)([a-z]+)(.*)$/,'$2');$.cookie('groups_filter',l,{expires:7});gl.find('div[id^=group_]').hide().filter('div#group_'+l).show();gll.removeClass('active');t.addClass('active');};if(gll.length>0){gll.each(function(){$(this).click(glfch);});}
var cle=cl.find('a.edit');var clech=function(e){var t=$(this);var d=t.metadata();cset.find('input[name="id"]').val(d.id);cset.find('input[name="contact[name]"]').val(t.parent().prev().prev().attr('title'));cset.find('input[name="contact[number]"]').val(t.parent().prev().text());cadd.hide();cset.show();var b=cset.find('a.baloon + div.baloon-container');if(b.length==0){cset.find('a.baloon').baloon();}};cle.click(clech);var cld=cl.find('a.delete');var cldch=function(e){var t=$(this);var d=t.metadata();act.find('input[name="id"]').val(d.id);act.find('input[name="action"]').val('delcontact')
act.submit();};cld.click(cldch);var csbh=function(e){var t=$(this);var nam=t.find('input[name="contact[name]"]');var num=t.find('input[name="contact[number]"]');var err=[];var namv=$.trim(nam.val());var numv=$.trim(num.val());var namd=nam.metadata();var numd=num.metadata();var contactExists=function(name,elm){return elm.find('tbody tr td:first-child[title="'+$.escapeHtml(name)+'"]').length>0;};var type=t.find('input[name="action"][value="setcontact"]').length==0?'add':'edit';if(namv.length==0||(typeof namd.defaultValue!='undefined'&&namv==namd.defaultValue)){err.push({m:'CONTACT_NAME_EMPTY',f:nam});}
else if(!cf.CONTACT_NAME_RE.test(namv)){err.push({m:'CONTACT_NAME_INVALID',f:nam});}
else if(type=='add'&&contactExists(namv,cl)){err.push({m:'CONTACT_NAME_EXISTS',f:nam});}
if(numv.length==0||(typeof numd.defaultValue!='undefined'&&numv==numd.defaultValue)){err.push({m:'CONTACT_NUMBER_EMPTY',f:num});}
else{var numvf=numv.replace(cf.NUM_RE[1],'').replace(cf.NUM_RE[2],'');if(!cf.NUM_RE[0].test(numv)){err.push({m:'CONTACT_NUMBER_INVALID',f:num});}
else if(numvf.length<cf.MIN_NUM_LENGTH){err.push({m:['CONTACT_NUMBER_TOO_SHORT',{min:cf.MIN_NUM_LENGTH}],f:num});}
else if(numvf.length>cf.MAX_NUM_LENGTH){err.push({m:['CONTACT_NUMBER_TOO_LONG',{max:cf.MAX_NUM_LENGTH}],f:num});}
else if(type=='add'&&cl.find('tbody tr td:nth-child(2):contains("+'+numvf+'")').length>0){err.push({m:'CONTACT_NUMBER_EXISTS',f:num});}}
if($.errorDialog(t,err)){nam.add(num).blur();return false;}
return true;};cadd.add(cset).submit(csbh).find('input[name="contact[number]"]').phoneNumber().keyup().end().find('input[name="contact[name]"]').contactName().keyup();var gaph=gadd.find('select[name="group_contact[]"]');var geph=gset.find('select[name="group_contact[]"]');var gab=gadd.find('a.add').add(gset.find('a.add'));var gabch=function(e){var type=$(this).parents('form').attr('id')=='frm-add-group'?'add':'edit';var selc=(type=='add'?gaph:geph).find('option:not("option:first-child"):selected');if(selc.length>0){var gcl=(type=='add'?gadd:gset).find('div.list');var gclc=gcl.find('ul');if(gclc.length==0){gclc=$('<ul></ul>');gcl.append(gclc);}
else if(gclc.find('input[name="group_contact[]"][value="'+selc.attr('value')+'"]').length>0){$.errorDialog(f,[{m:'GROUP_CONTACT_EXISTS',f:(type=='add'?gaph:geph)}]);return false;}
var item=$('<li class="clr" style="display:none;">'+'<span class="name">'+
selc.text()+'</span>'+'<a href="javascript:void(0)" class="delete">'+'<img src="/img/icons/minus.gif" width="9" height="9" alt="delete" title="" />'+'</a>'+'<input type="hidden" name="group_contact[]" value="'+selc.attr('value')+'" />'+'</li>');gclc.append(item);item.find('a.delete').one('click',gdbch);if(gcl.is(':hidden')){gcl.show();}
item.show();selc.prevAll('option:first-child').attr('selected','selected');selc.hide();}
else{$.errorDialog(f,[{m:'GROUP_CONTACT_EMPTY',f:(type=='add'?gaph:geph)}]);return false;}};var gdbch=function(e){var t=$(this);var item=t.parent();var select=item.parent().parent().prevAll('select[name="group_contact[]"]');select.find('option[value="'+item.find('input[name="group_contact[]"]').val()+'"]').show();item.hide();var sbl=item.siblings('li');var p=item.parent();item.remove();if(sbl.length==0){p.parent().hide();p.remove();}};gadd.find('a.delete').one('click',gdbch);gab.click(gabch);var gle=gl.find('a.edit');var glech=function(e){var t=$(this);var d=t.metadata();gadd.hide();gset.show();gset.find('input[name="id"]').val(d.id);gset.find('input[name="group_name"]').val(d.nameFull).removeClass('grey').focus();var sel=gset.find('select[name="group_contact[]"]');var list=sel.nextAll('div.list');var add=gset.find('a.add');sel.find('option').show();list.find('a.delete').unbind().end().hide();list.find('ul').remove();$.each(d.contacts,function(){var opt=sel.find('option[value="'+this+'"]');if(opt.length>0){opt.attr('selected','selected');add.trigger('click');opt.hide();}});};gle.click(glech);var gld=gl.find('a.delete');var gldch=function(e){var t=$(this);var d=t.metadata();act.find('input[name="id"]').val(d.id);act.find('input[name="action"]').val('delcontactgroup')
act.submit();};gld.click(gldch);var gsbh=function(e){var t=$(this);var nam=t.find('input[name="group_name"]');var err=[];var namv=$.trim(nam.val());var namd=nam.metadata();var groupExists=function(name,elm){return elm.find('tbody tr td:first-child[title="'+$.escapeHtml(name)+'"]')>0;};var type=t.find('input[name="action"][value="addcontactgroup"]').length==0?'add':'edit';if(namv.length==0||(typeof namd.defaultValue!='undefined'&&namv==namd.defaultValue)){err.push({m:'GROUP_NAME_EMPTY',f:nam});}
else if(!cf.GROUP_NAME_RE.test(namv)){err.push({m:'GROUP_NAME_INVALID',f:nam});}
else if(type=='add'&&groupExists(namv,gl)){err.push({m:'GROUP_NAME_EXISTS',f:nam});}
if($.errorDialog(t,err)){nam.blur();return false;}
return true;};gadd.add(gset).submit(gsbh).find('input[name="group_name"]').groupName().keyup();}});})(jQuery);;;(function($){$(function(e){var f=$('#frm-bank-transfer');if(f.length>0){var select=$('#id_credit_price');var priceHolder=$('#frm-bank-transfer-price');var selectChange=function(e){priceHolder.text(select.val());};select.change(selectChange);}});})(jQuery);;(function($){$(function(e){var form=$('#frm-check-number');if(form.length>0){var number=$('#id_mobilenumber');var config=flashSMS.conf;var onFormSubmit=function(e){var numberValue=$.trim(number.val()),errors=[];if(numberValue.length==0||numberValue==number.metadata().defaultValue){errors.push({m:'CHECK_NUMBER_EMPTY',f:number});}
else{var numberValueFormatted=numberValue.replace(config.NUM_RE[1],'').replace(config.NUM_RE[2],'');if(!config.NUM_RE[0].test(numberValue)){errors.push({m:'CHECK_NUMBER_INVALID',f:number});}
else if(numberValueFormatted.length<config.MIN_NUM_LENGTH){errors.push({m:['CHECK_NUMBER_TOO_SHORT',{min:config.MIN_NUM_LENGTH}],f:number});}
else if(numberValueFormatted.length>config.MAX_NUM_LENGTH){errors.push({m:['CHECK_NUMBER_TOO_LONG',{max:config.MAX_NUM_LENGTH}],f:number});}}
if($.errorDialog(form,errors)){number.blur();return false;}
return true;};number.phoneNumber();form.bind('submit',onFormSubmit);}});})(jQuery);;(function($){$(function(event){var form=$('#frm-mms');if(form.length>0){form.removeClass('frm-mms-nojavascript');var maxImages=6,minImages=1;var interfaceBlocked=false;var phoneNumber=$('#mms_tel_number'),phoneBook=$('#mms_tel_buh'),attachedImages=form.find('a.choose-image'),popup=$('#mms-popup');var onPhoneNumberKeyUp=function(event){var $this=$(this);var value=$.trim($this.val());if(value.length>0){var contact=phoneBook.find('option[value="'+value+'"]');if(contact.length>0){contact.attr('selected','selected');}
else{phoneBook.find('option:first-child').attr('selected','selected');}}};var onPhoneBookChange=function(event){var $this=$(this);var option=$this.find('option:selected:not("option:first-child")');if(option.length>0){phoneNumber.val($this.val()).removeClass('grey error-field');}};var onJqModalShow=function(hash){$('iframe:visible').css('visibility','hidden');hash.w.show();popupTrigger=$(hash.t);$(window).bind('resize.mmspopup',{p:hash.w},onWindowResize).trigger('resize.mmspopup');var img=hash.w.find('#imgcrop');if(img.length>0){var meta=popupTrigger.metadata();var items=popup.find('ul.previews>li');if(typeof meta!='undefined'&&typeof meta.id!='undefined'&&$('#user-uploaded-image-'+meta.id).length>0){var item=$('#user-uploaded-image-'+meta.id);chooseImage(item);}
else{var imageWidth=img.width(),imageHeight=img.height(),fullImageSelect=[0,0,imageWidth,imageHeight],defaultPartImageSelect=getDefaultCropSelection(imageWidth,imageHeight),JcropParams=$.extend(defaultJcropParams,{setSelect:fullImageSelect});if(jcropapi==null){jcropapi=$.Jcrop(img,JcropParams);}
else{jcropapi.setSelect(fullImageSelect);}
jcropapi.animateTo(defaultPartImageSelect);}};};var onWindowResize=function(event){var topOffset=Math.round(event.data.p.outerHeight()/2);event.data.p.css('margin-top','-'+topOffset+'px');};var onJqModalHide=function(hash){hash.w.hide();hash.o.remove();$('iframe:hidden').css('visibility','visible');$(window).unbind('resize.mmspopup');}
var jcropapi=null;var popupTrigger=null;var defaultJcropParams={aspectRatio:160/120,bgColor:'#000000',bgOpacity:0.5,addClass:'custom',sideHandles:false};var jqModalParams={toTop:true,trigger:attachedImages,onShow:onJqModalShow,onHide:onJqModalHide};phoneNumber.phoneNumber();phoneNumber.bind('keyup',onPhoneNumberKeyUp);phoneBook.bind('change',onPhoneBookChange);popup.jqm(jqModalParams);if($.browser.msie&&/6.0/.test(navigator.userAgent)){popup.find('ul.previews>li').hover(function(){$(this).children('ul,div.supershit').css('visibility','visible');},function(){$(this).children('ul,div.supershit').css('visibility','hidden');});}
var onIframeLoad=function(){uploadForm.removeClass('processing');var response=this.contentWindow.document.getElementById('response');if(response!=null&&typeof response!='undefined'){if(response.innerHTML.length>0){var res;eval('res = '+response.innerHTML);$(response).remove();if(res.result==1){try{delete res.result;}
catch(e){}
var form=$('#frm-mms-upload');var items=$('#mms-popup').find('ul.previews>li');var item='<li class="processing" id="user-uploaded-image-'+res.id+'">'+
(($.browser.msie&&parseFloat($.browser.version)<=6)?'<div class="supershit">&nbsp;</div>':'')+'<img src="/uimg/'+res.id+'/thumb/80x60" width="80" height="60" alt="'+res.name+'" title="" onload="jQuery(this).parent(\'li\').removeClass(\'processing\');" />'+'<ul>'+'<li class="select"><a href="javascript:void(0)">auswählen</a></li>'+'<li class="delete"><a href="javascript:void(0)">löschen</a></li>'+'</ul>'+'</li>';item=$(item);item.data('metadata',res);var itemIndex=items.length+1;if((itemIndex-1)%3==0){item.addClass('row-begin');}
if(itemIndex%3==0){item.addClass('row-end');}
if($.browser.msie&&parseFloat($.browser.version)<=6){item.hover(function(){$(this).children('ul,div.supershit').css('visibility','visible');},function(){$(this).children('ul,div.supershit').css('visibility','hidden');});}
item.find('li.delete').bind('click',onImageDeleteClick);item.find('li.select').bind('click',onImageChooseClick);$('#mms-popup').find('ul.previews').append(item);form[0].reset();if(itemIndex==18){form.find('input').attr('disabled','disabled');}
chooseImage(item);}}}};var onImageDeleteClick=function(event){var item=$(this).parent().parent();var meta=item.metadata();if(confirm($.translate('SEND_MMS_DELETE_CONFIRMATION',{name:meta.name}))){item.addClass('processing');var ajaxParams={data:{id:meta.id},cache:false,dataType:'json',type:'POST',url:'/deleteimage',timeout:30000,sourceItem:item[0],error:onImageDeleteError,success:onImageDeleteSuccess};$.ajax(ajaxParams);}};var onImageDeleteError=function(request,status,error){alert(error);};var onImageDeleteSuccess=function(data,status){var item=$(this.sourceItem);var meta=item.metadata();var selectedItem=null;item.find('*').unbind();var prevSibling=item.prev('li');var nextSibling=item.next('li');var siblings=item.siblings('li');if(item.hasClass('selected')){if(nextSibling.length>0){selectedItem=nextSibling;}
else if(prevSibling.length>0){selectedItem=prevSibling;}
else{selectedItem=false;}}
item.remove();siblings.removeClass('row-begin row-end');siblings.filter('li:nth-child(3n-2)').addClass('row-begin');siblings.filter('li:nth-child(3n)').addClass('row-end');$('#frm-mms-upload').find('input').removeAttr('disabled');if(selectedItem!=null){if(selectedItem!==false){chooseImage(selectedItem);}
else{clearImageCrop();}}
var choosenImages=attachments.find('input.image_id[value="'+meta.id+'"]');if(choosenImages.length>0){choosenImages.add(choosenImages.siblings('input')).val('');choosenImages.parent().addClass('processing').data('metadata',{});choosenImages.siblings('img').attr('src','/img/dummy/text.gif');onFormChange();}};var onImageChooseClick=function(event){var item=$(this).parent().parent();if(!item.hasClass('selected')){chooseImage(item);}};var clearImageCrop=function(place){if(typeof place=='undefined'){place=popup.find('div.image-view-inner');}
return place.find('*').unbind().end().html('');};var chooseImage=function(item){var items=popup.find('ul.previews>li');var selectedItem=items.filter('li.selected');items.removeClass('selected');if(typeof item=='undefined'){item=items.eq(0);}
item.addClass('selected');if($.browser.msie&&parseFloat($.browser.version)<=7&&selectedItem.length>0&&item.length>0){selectedItem.css('margin',('0px 0px 15px '+(selectedItem.hasClass('row-begin')?'0px':'15px')));item.css('margin',('-3px -3px 12px '+(item.hasClass('row-begin')?'-3px':'12px')));}
var meta=item.metadata();$(['height','width','size','id']).each(function(){meta[this]=parseInt(meta[this],10);});var place=clearImageCrop();place.css({'padding-top':(Math.floor((500-meta.height)/2)+'px'),'padding-left':(Math.floor((500-meta.width)/2)+'px')});place.append('<div class="processing" style="width:'+meta.width+'px;height:'+meta.height+'px;margin-top:-'+meta.height+'px;">&nbsp;</div>');jcropapi=null;var img=$('<img src="/uimg/'+meta.id+'" alt="'+meta.name+'" title="" id="imgcrop" onload="chooseImageCallback.call(this);" />');img.data('metadata',meta);img.css({'width':(meta.width+'px'),'height':(meta.height+'px'),'opacity':0});place.prepend(img);};var getDefaultCropSelection=function(width,height){var imageWidth=width,imageHeight=height,imageAspectRatio=imageWidth/imageHeight,aspectRatio=4/3;return[imageAspectRatio<aspectRatio?0:Math.round((imageWidth-imageHeight*aspectRatio)/2),imageAspectRatio<aspectRatio?Math.round((imageHeight-imageWidth/aspectRatio)/2):0,imageAspectRatio<aspectRatio?imageWidth:Math.round(imageWidth-(imageWidth-imageHeight*aspectRatio)/2),imageAspectRatio<aspectRatio?Math.round(imageHeight-(imageHeight-imageWidth/aspectRatio)/2):imageHeight];};var chooseImageCallback=function(){var img=$(this);var meta=img.metadata();img.css('opacity',1);img.nextAll('div.processing').remove();var fullImageSelect=[0,0,meta.width,meta.height];var defaultPartImageSelect;if(popupTrigger!=null&&popupTrigger.metadata().id==meta.id&&typeof popupTrigger.metadata().crop!='undefined'){var triggerMeta=popupTrigger.metadata();defaultPartImageSelect=[triggerMeta.crop.x,triggerMeta.crop.y,triggerMeta.crop.x2,triggerMeta.crop.y2];}
else{defaultPartImageSelect=getDefaultCropSelection(meta.width,meta.height);}
var JcropParams=$.extend(defaultJcropParams,{setSelect:fullImageSelect});if(jcropapi==null){jcropapi=$.Jcrop(img,JcropParams);}
else{jcropapi.setSelect(fullImageSelect);}
jcropapi.animateTo(defaultPartImageSelect);};window.chooseImageCallback=chooseImageCallback;var onUploadImageChange=function(event){if(!uploadForm.hasClass('processing')){uploadForm.addClass('processing').trigger('submit');}
else{alert($.translate('SEND_MMS_IMAGE_UPLOAD_IN_PROGRESS'));return false;}};var onUploadFormSubmit=function(event){$(this).addClass('processing');};var onChooseImageCropButton=function(){var crop=jcropapi.tellSelect();var selectedItem=popup.find('ul.previews>li.selected');var meta=selectedItem.metadata();var triggerImage=popupTrigger.find('img');var cropString=crop.x+'x'+crop.y+'x'+crop.w+'x'+crop.h;triggerImage.parent('a').addClass('processing').end().attr('src','/uimg/'+meta.id+'/'+cropString+'/'+triggerImage.attr('width')+'x'+triggerImage.attr('height'));popupTrigger.data('metadata',$.extend(meta,{crop:crop}));triggerImage.siblings('input.image_id').val(meta.id);triggerImage.siblings('input.image_crop').val(cropString);triggerImage.parent('a').trigger('imagechange');popup.jqmHide();};var initAttachments=function(){attachments.each(function(index){var $this=$(this);$this.data('metadata',{attachmentId:index});var image=$this.find('a.choose-image');var text=$this.find('textarea');var imageId=$this.find('input.image_id');var imageCrop=$this.find('input.image_crop');if(imageId.val().length>0&&imageCrop.val().length>0){var item=$('#user-uploaded-image-'+imageId.val());if(item.length>0){var crop=imageCrop.val().split('x');for(var i=0;i<crop.length;i++){crop[i]=parseInt(crop[i],10);}
var meta=$.extend(item.metadata(),{crop:{x:crop[0],y:crop[1],x2:crop[0]+crop[2],y2:crop[1]+crop[3],w:crop[2],h:crop[3]}});image.data('metadata',meta);}}
image.bind('imagechange',onFormChange);text.bind('keyup',onFormChange);});onFormChange();addAttachmentButton.children('a').bind('click',onAddAttachmentClick);deleteAttachmentButtons.children('a').bind('click',onDeleteAttachmentClick);};var onAddAttachmentClick=function(event){var index=attachments.length;var indexv=index+1;var attachment=attachments.eq(attachments.length-1).clone();attachment.data('metadata',{attachmentId:index});var hdr=attachment.children('h4');var img=attachment.find('a.choose-image');var input=attachment.find(':input');var text=input.filter('textarea');var select=input.filter('select');hdr.text(hdr.text().replace(/[0-9]+$/,indexv));img.add(input).unbind();img.addClass('processing').find('img').attr('src','/img/dummy/text.gif');input.each(function(){var $this=$(this);$this.attr('name',$this.attr('name').replace(/\[\d+\]/,'['+index+']')).val('');});popup.jqmAddTrigger(img);text.defaultValue();attachments.eq(index-1).after(attachment);attachments=attachments.add(attachment);attachment.find('div.hide_this>a').bind('click',onDeleteAttachmentClick);attachments.find('div.hide_this').show('fast');if(indexv>=maxImages){addAttachmentButton.hide('fast');}
img.bind('imagechange',onFormChange);input.filter('textarea').bind('keyup',onFormChange);};var onDeleteAttachmentClick=function(event){var attachment=$(this).parents('div.attachment'),meta=attachment.metadata(),nextAttachments=attachments.filter(':gt('+meta.attachmentId+')');attachment.find(':input,div.hide_this>a,a.choose-image').unbind().end().hide();nextAttachments.each(function(){updateAttachmentId($(this),-1);});attachments=attachments.not(attachment);attachment.remove();addAttachmentButton.show('fast');if(attachments.length==1){attachments.find('div.hide_this').hide('fast');}
onFormChange();};var updateAttachmentId=function(attachment,step){var index=attachment.metadata().attachmentId+step,indexv=index+1,hdr=attachment.children('h4'),input=attachment.find(':input');attachment.data('metadata',{attachmentId:index});hdr.text(hdr.text().replace(/[0-9]+$/,indexv));input.each(function(){var $this=$(this);$this.attr('name',$this.attr('name').replace(/\[\d+\]/,'['+index+']'));});}
var onFormChange=function(){if(formChangeTimer!=null){formChangeTimer.stop();}
formChangeTimer=$.timer(2000,onFormChangeTimer);};var onFormChangeTimer=function(timer){var ajaxParams={data:{},cache:false,dataType:'json',type:'POST',url:'/getmmssize',timeout:30000,error:onFormChangeError,success:onFormChangeSuccess};form.find(':input[name^="mms[motive]"]').each(function(){var $this=$(this);var name=$this.attr('name');if(name.length>0){var v=$this.val();ajaxParams.data[name]=!$this.is('.defaultValue')||v!=$this.metadata().defaultValue?v:'';}});$.ajax(ajaxParams);timer.stop();formChangeTimer=null;};var onFormChangeError=function(request,status,error){if(typeof console!='undefined'&&typeof console.log!='undefined'){console.log('getmmssize error: '+error);}};var onFormChangeSuccess=function(data,status){if(typeof data.result!='undefined'){messageSizeIndicator.data('size',data.result);var sizeKilobytes=data.result/1024;var width=Math.round(sizeKilobytes*100/300);width=width>100?100:width;messageSizeIndicator.attr('title',Math.round(sizeKilobytes)+'KB')
messageSizeIndicator.children('div').css('width',width+'%');}};var onFormSubmit=function(event){if(form.is('.in-progress')){return false;}
var errors=[];var config=flashSMS.conf;var phone=$.trim(phoneNumber.val());if(phone.length==0||phone==phoneNumber.metadata().defaultValue){errors.push({m:'SEND_MMS_RECIPIENT_NUMBER_EMPTY',f:phoneNumber});}
else{var phoneFormatted=phone.replace(config.NUM_RE[1],'').replace(config.NUM_RE[2],'');if(!config.NUM_RE[0].test(phone)){errors.push({m:'SEND_MMS_RECIPIENT_NUMBER_INVALID',f:phoneNumber});}
if(phoneFormatted.length<config.MIN_NUM_LENGTH){errors.push({m:['SEND_MMS_RECIPIENT_NUMBER_TOO_SHORT',{min:config.MIN_NUM_LENGTH}],f:phoneNumber});}
if(phoneFormatted.length>config.MAX_NUM_LENGTH){errors.push({m:['SEND_MMS_RECIPIENT_NUMBER_TOO_LONG',{max:config.MAX_NUM_LENGTH}],f:phoneNumber});}}
var firstAttachment=attachments.eq(0);var firstAttachmentImage=firstAttachment.find('a.choose-image');var firstAttachmentText=firstAttachment.find('textarea');if(typeof firstAttachmentImage.metadata().id=='undefined'&&($.trim(firstAttachmentText.val())==''||firstAttachmentText.val()==firstAttachmentText.metadata().defaultValue)){errors.push({m:'SEND_MMS_ATTACHMENT_REQUIRED',f:firstAttachmentText});}
else{attachments.each(function(){var attachment=$(this);var header=attachment.find('h4').text();var image=attachment.find('a.choose-image');var text=attachment.find('textarea');if(typeof image.metadata().id=='undefined'){errors.push({m:['SEND_MMS_ATTACHMENT_IMAGE_REQUIRED',{name:header}]});}
if($.trim(text.val())==''||text.val()==text.metadata().defaultValue){errors.push({m:['SEND_MMS_ATTACHMENT_DESCRIPTION_REQUIRED',{name:header}],f:text});}});}
if($.errorDialog(form,errors)){phoneNumber.add(attachments.find('textarea')).trigger('blur');return false;}
form.addClass('in-progress');form.find('input.button-submit').attr('disabled','disabled').css({opacity:0.5,cursor:'wait'});return true;};var formChangeTimer=null;var uploadForm=$('#frm-mms-upload');var popup=$('#mms-popup');var attachments=form.children('div.attachment');var addAttachmentButton=form.children('div.add_motiv');var deleteAttachmentButtons=attachments.find('div.hide_this');var messageSizeIndicator=form.find('div.mes_size_indicator');var chooseImageCropButton=$('#mms-popup-select');initAttachments();chooseImageCropButton.bind('click',onChooseImageCropButton);popup.find('ul.previews ul>li').filter('li.delete').bind('click',onImageDeleteClick).end().filter('li.select').bind('click',onImageChooseClick);uploadForm.bind('submit',onUploadFormSubmit)
uploadForm.find('input.file').bind('change',onUploadImageChange);$('#upload_frame').bind('load',onIframeLoad);form.bind('submit',onFormSubmit);}});})(jQuery);;(function($){if(window.location.pathname=='/definenumber'||window.location.pathname=='/verifynumber'){var onDocumentReady=function(){var form=$('#frm-definenumber');if(form.length>0){$.fn.captchaReload=function(){return this.each(function(){$(this).bind('click',function(e){var c=$('img.img-captcha');if(c.length>0){c.attr('src','/img/b.gif');window.setTimeout(function(){var c=$('img.img-captcha');if(c.length>1){var c1=c.slice(1);var c=$(c[0]);}
c.attr('src','/image/captcha/'+(new Date()).getTime());if(typeof c1!='undefined'){c1.each(function(){var $this=$(this);var ni=c.clone();if(typeof $this.attr('id')!='undefined'){ni.attr('id',$this.attr('id'));}
else if(typeof ni.attr('id')!='undefined'){ni.removeAttr('id');}
$(this).replaceWith(ni);});}},200);}});})};$('a.img-captcha-link').captchaReload();$('a.img-captcha-link').show();var number=$('#id_mobilenumber');var onDefineNumberFormSubmit=function(event){var errors=[],numberValue=$.trim(number.val()),config=flashSMS.conf;if(numberValue.length==0||numberValue==number.metadata().defaultValue){errors.push({m:'DEFINE_NUMBER_EMPTY',f:number});}
else{var numberValueFormatted=numberValue.replace(config.NUM_RE[1],'').replace(config.NUM_RE[2],'');if(!config.NUM_RE[0].test(numberValue)){errors.push({m:'DEFINE_NUMBER_INVALID',f:number});}
else if(numberValueFormatted.length<config.MIN_NUM_LENGTH){errors.push({m:['DEFINE_NUMBER_TOO_SHORT',{min:config.MIN_NUM_LENGTH}],f:number});}
else if(numberValueFormatted.length>config.MAX_NUM_LENGTH){errors.push({m:['DEFINE_NUMBER_TOO_LONG',{max:config.MAX_NUM_LENGTH}],f:number});}}
if($.errorDialog(form,errors)){number.blur();return false;}
return true;};form.bind('submit',onDefineNumberFormSubmit);}
var form=$('#frm-verifynumber');if(form.length>0){var code=$('#id_verifynumber');var onVerifyNumberFormSubmit=function(event){var errors=[],codeValue=$.trim(code.val());if(codeValue.length==0){errors.push({m:'VERIFY_NUMBER_CODE_EMPTY',f:code});}
if($.errorDialog(form,errors)){code.blur();return false;}
return true;};form.bind('submit',onVerifyNumberFormSubmit);}};$(document).bind('ready',onDocumentReady);}})(jQuery);;(function($){if(window.location.pathname=='/settings'){var onDocumentReady=function(event){var form=$('#frm-accountsettings');if(form.length>0){var config=flashSMS.conf,firstName=form.find('#id_firstname'),lastName=form.find('#id_lastname'),street=form.find('#id_street'),house=form.find('#id_house'),zip=form.find('#id_zipcode'),city=form.find('#id_city');var onFormSubmit=function(event){var errors=[],firstNameValue=$.trim(firstName.val()),lastNameValue=$.trim(lastName.val()),streetValue=$.trim(street.val()),houseValue=$.trim(house.val()),zipValue=$.trim(zip.val()),cityValue=$.trim(city.val());if(firstNameValue.length==0){errors.push({m:'SETTINGS_FIRSTNAME_EMPTY',f:firstName});}
if(lastNameValue.length==0){errors.push({m:'SETTINGS_LASTNAME_EMPTY',f:lastName});}
if(streetValue.length==0){errors.push({m:'SETTINGS_STREET_EMPTY',f:street});}
if(houseValue.length==0){errors.push({m:'SETTINGS_NUMBER_EMPTY',f:house});}
else if(!config.HOUSE_NUMBER_RE.test(houseValue)){errors.push({m:'SETTINGS_NUMBER_INVALID',f:house});}
if(zipValue.length==0){errors.push({m:'SETTINGS_ZIP_EMPTY',f:zip});}
else if(!config.ZIP_RE.test(zipValue)){errors.push({m:'SETTINGS_ZIP_INVALID',f:zip});}
if(cityValue.length==0){errors.push({m:'SETTINGS_CITY_EMPTY',f:city});}
if($.errorDialog(form,errors)){try{window.scrollTo(0,0);}
catch(e){}
return false;}
return true;};form.bind('submit',onFormSubmit);}};$(document).bind('ready',onDocumentReady);}})(jQuery);;(function($){if(window.location.pathname=='/account/forgotpwd'||window.location.pathname=='/forgot'){var onDocumentReady=function(event){var form=$('#frm-forgotpassword'),config=flashSMS.conf;if(form.length>0){var account=form.find('#id_account');var onFormSubmit=function(event){var errors=[],accountValue=$.trim(account.val());if(accountValue.length==0){errors.push({m:'PASS_REMINDER_FIELD_EMPTY',f:account});}
else if(!config.USER_NAME_RE.test(accountValue)&&!config.EMAIL_RE.test(accountValue)){errors.push({m:'PASS_REMINDER_FIELD_INVALID',f:account});}
return!$.errorDialog(form,errors);};form.bind('submit',onFormSubmit);}};$(document).bind('ready',onDocumentReady);}})(jQuery);;(function($){if(window.location.pathname=='/premiumsms'){var onDocumentReady=function(event){var form=$('#frm-premiumsms');if(form.length>0){var price=form.find('#id_credit_price'),number=form.find('#id_credit_number'),code=form.find('#id_pincode'),onPackageChange=function(event){number.html('&laquo;'+price.val()+'&raquo;');},onFormSubmit=function(event){var errors=[],codeValue=$.trim(code.val()),config=flashSMS.conf;if(codeValue.length==0){errors.push({m:'PREMIUMSMS_CODE_EMPTY',f:code});}
return!$.errorDialog(form,errors);};price.bind('change',onPackageChange);form.bind('submit',onFormSubmit);}};$(document).bind('ready',onDocumentReady);}})(jQuery);;(function($){if(window.location.pathname=='/hotline'){var onDocumentReady=function(event){var form=$('#frm-hotline');if(form.length>0){var price=form.find('#id_credit_price'),number=form.find('#id_credit_number'),provider=form.find('#id_credit_provider'),description=form.find('#id_credit_description'),code=form.find('#id_pincode'),onPackageChange=function(event){var data=price.find('option:selected').metadata();number.html(data.number);provider.html('('+data.provider+')');description.html(data.desc);},onFormSubmit=function(event){var errors=[],codeValue=$.trim(code.val()),config=flashSMS.conf;if(codeValue.length==0){errors.push({m:'HOTLINE_CODE_EMPTY',f:code});}
return!$.errorDialog(form,errors);};price.bind('change',onPackageChange);form.bind('submit',onFormSubmit);}};$(document).bind('ready',onDocumentReady);}})(jQuery);;(function($){if(window.location.pathname=='/tpay'){var onDocumentReady=function(event){var form=$('#frm-tpay');var formTpay=$('#formTPay')
if(form.length>0&&formTpay.length>0){var price=form.find('#id_credit_price'),onPackageChange=function(event){var meta=price.find('option:selected').metadata();$.each(meta,function(key,value){formTpay.find('input[name="'+key+'"]').val(value);});};price.bind('change',onPackageChange);}};$(document).bind('ready',onDocumentReady);}})(jQuery);;(function($){if(window.location.pathname=='/paypal'){var onDocumentReady=function(event){var form=$('#frm-paypal');var formPaypal=$('#frmPaypal')
if(form.length>0&&formPaypal.length>0){var price=form.find('#id_credit_price'),onPackageChange=function(event){var meta=price.find('option:selected').metadata();$.each(meta,function(key,value){formPaypal.find('input[name="'+key+'"]').val(value);});};price.bind('change',onPackageChange);}};$(document).bind('ready',onDocumentReady);}})(jQuery);;(function($){if(window.location.pathname=='/invite'){var onDocumentReady=function(event){var form=$('#frm-invitations');if(form.length>0){var emails=form.find('input[name="invite[email][]"]'),message=form.find('textarea'),onFormSubmit=function(event){var errors=[],counter=0,config=flashSMS.conf,messageValue=$.trim(message.val());emails.each(function(index,value){var email=$(this);var emailValue=$.trim(email.val());if(emailValue.length>0){counter++;if(!config.EMAIL_RE.test(emailValue)){errors.push({m:['INVITE_EMAIL_INVALID',{number:index+1}],f:email});}}});if(errors.length==0&&counter==0){errors.push({m:'INVITE_EMPTY',f:emails.eq(0)});}
return!$.errorDialog(form,errors);};form.bind('submit',onFormSubmit);}};$(document).bind('ready',onDocumentReady);}})(jQuery);;(function($){if(window.location.pathname.search(/^\/reset(\/[^\/]+\/[^\/]+)?/)>-1){var onDocumentReady=function(event){var form=$('form#frm-pass-reset');if(form.length>0){var config=flashSMS.conf,password=form.find('#id_password'),passwordConfirm=form.find('#id_password_confirm'),onFormSubmit=function(event){var errors=[],passwordValue=password.val(),passwordConfirmValue=passwordConfirm.val();if(passwordValue.length==0){errors.push({m:'PW_RESET_PASSWORD_EMPTY',f:password.add(passwordConfirm)});}
else if(passwordConfirmValue.length==0){errors.push({m:'PW_RESET_PASSWORD_CONFIRM_EMPTY',f:password.add(passwordConfirm)});}
else if(passwordValue!=passwordConfirmValue){errors.push({m:'PW_RESET_PASSWORD_NOT_MATCH',f:password.add(passwordConfirm)});}
return!$.errorDialog(form,errors);};form.bind('submit',onFormSubmit);}};$(document).bind('ready',onDocumentReady);}})(jQuery);