///home/lzdem/domains/lzskelbimai.com/public_html/languages.js 

var txt=new Array();load_lt();switch(lang){case'en':load_en();case'ru':load_ru();case'pl':load_pl();}
function load_en(){txt['L_CLOSE']="Close";txt['L_FAILED_RETRIEVE_USER']="Failed to retrieve user information.\nTry to use Firefox!";txt['L_LOADING']="Loading...";txt['L_TOO_OLD']="Your web browser is too old.\nYou need to update your browser.";}
function load_lt(){txt['L_CLOSE']="Uždaryti";txt['L_FAILED_RETRIEVE_USER']="Nepavyko užkrauti vartotojo informacijos.\nPamėginkite veiksmą pakartoti su Firefox!";txt['L_LOADING']="Kraunasi...";txt['L_TOO_OLD']="Jūs naudojatės per sena naršyklės versija.\nJums reiktų atsinaujinti naršykle.";}
function load_ru(){}
function load_pl(){}
///home/lzdem/domains/lzskelbimai.com/public_html/functions.js 

function ask(theLink,askmsg){var is_confirmed=confirm(askmsg);if(is_confirmed){theLink.href;}
return is_confirmed;}
function get_http_request(){var http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!http_request){alert(txt['L_TOO_OLD']);}
return http_request;}
function submitfrm(id){var el=document.getElementById(id);if(el!=null){el.submit();}}
function lz_open_s(url)
{newwindow=window.open(url,'skelbimas','width=995,height=550,resizeable=false,scrollbars=yes');if(window.focus){newwindow.focus()}
return false;}
if(typeof array_key_exists!='function')
{function array_key_exists(key,search){if(!search||(search.constructor!==Array&&search.constructor!==Object)){return false;}
return key in search;}}
if(typeof str_replace!='function')
{function str_replace(search,replace,subject,count){var i=0,j=0,temp='',repl='',sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=subject,ra=r instanceof Array,sa=s instanceof Array;s=[].concat(s);if(count){this.window[count]=0;}
for(i=0,sl=s.length;i<sl;i++){if(s[i]===''){continue;}
for(j=0,fl=f.length;j<fl;j++){temp=s[i]+'';repl=ra?(r[j]!==undefined?r[j]:''):r[0];s[i]=(temp).split(f[j]).join(repl);if(count&&s[i]!==temp){this.window[count]+=(temp.length-s[i].length)/f[j].length;}}}
return sa?s:s[0];}}
var texts_on_start=new Array();function empty_on_focus(id,value,obj)
{if(!array_key_exists(id,texts_on_start))
{texts_on_start[id]=value;}
if(value==texts_on_start[id])
{obj.value='';}}
function fill_on_blur(id,value,obj)
{value=str_replace(' ','',value);if(value=='')
{obj.value=texts_on_start[id];}}
///home/lzdem/domains/lzskelbimai.com/public_html/ibox/ibox.js 

var indicator_img_path="ibox/indicator.gif";var indicator_img_html="<img name=\"ibox_indicator\" src=\""+indicator_img_path+"\" alt=\"Kraunasi...\" style=\"width:128px;height:128px;\"/>";var opacity_level=4;var ibAttr="rel";var imgPreloader=new Image();function init_ibox(){var elem_wrapper="ibox";createIbox(document.getElementsByTagName("body")[0]);var docRoot=document.getElementsByTagName("a");var e;for(var i=0;i<docRoot.length-1;i++){e=docRoot[i];if(e.getAttribute(ibAttr)){var t=e.getAttribute(ibAttr);if((t.indexOf("ibox")!=-1)||t.toLowerCase()=="ibox"){e.onclick=function(){var t=this.getAttribute(ibAttr);var params=parseQuery(t.substr(5,999));var url=this.href;var title=this.title;if(showIbox(url,title,params)){showBG();window.onscroll=maintPos;window.onresize=maintPos;}
return false;};}}}}
showBG=function(){var box_w=getElem('ibox_w');box_w.style.opacity=0;box_w.style.filter='alpha(opacity=0)';setBGOpacity=setOpacity;for(var i=0;i<=opacity_level;i++){setTimeout("setIboxOpacity('ibox_w',"+i+")",70*i);}
box_w.style.display="";var pagesize=new getPageSize();var scrollPos=new getScrollPos();var ua=navigator.userAgent;if(ua.indexOf("MSIE ")!=-1){box_w.style.width=pagesize.width+'px';}
box_w.style.height=pagesize.height+scrollPos.scrollY+'px';}
hideBG=function(){var box_w=getElem('ibox_w');box_w.style.display="none";}
var loadCancelled=false;showIndicator=function(){var ibox_p=getElem('ibox_progress');ibox_p.style.display="";posToCenter(ibox_p);ibox_p.onclick=function(){hideIbox();hideIndicator();loadCancelled=true;}}
hideIndicator=function(){var ibox_p=getElem('ibox_progress');ibox_p.style.display="none";ibox_p.onclick=null;}
createIbox=function(elem){var strHTML="<div id=\"ibox_w\" style=\"display:none;\"></div>";strHTML+="<div id=\"ibox_progress\" style=\"display:none;\">";strHTML+=indicator_img_html;strHTML+="</div>";strHTML+="<div id=\"ibox_wrapper\" style=\"display:none\">";strHTML+="<div id=\"ibox_content\"></div>";strHTML+="<div id=\"ibox_footer_wrapper\"><div id=\"ibox_close\" style=\"float:right;\">";strHTML+="<a id=\"ibox_close_a\" href=\"javascript:void(null);\" style=\"font-family:Arial, Verdana; font-size:12px;\">Uždaryti</a></div>";strHTML+="<div id=\"ibox_footer\">&nbsp;</div></div></div></div>";var docBody=document.getElementsByTagName("body")[0];var ibox=document.createElement("div");ibox.setAttribute("id","ibox");ibox.style.display='';ibox.innerHTML=strHTML;elem.appendChild(ibox);}
var ibox_w_height=0;showIbox=function(url,title,params){var ibox=getElem('ibox_wrapper');var ibox_type=0;var ibox_footer=getElem('ibox_footer');if(title!=""){ibox_footer.innerHTML=title;}else{ibox_footer.innerHTML="&nbsp;";}
var urlString=/\.jpg|\.jpeg|\.png|\.gif|\.bmp|\.html|\.htm|\.php|\.cfm|\.asp|\.aspx|\.jsp|\.jst|\.rb|\.rhtml|\.txt/gi;var urlType=url.match(urlString);urlType=(""+urlType).toLowerCase();if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){ibox_type=1;}else if(url.indexOf("#")!=-1){ibox_type=2;}else if(urlType=='.htm'||urlType=='.html'||urlType=='.php'||urlType=='.asp'||urlType=='.aspx'||urlType=='.jsp'||urlType=='.jst'||urlType=='.rb'||urlType=='.txt'||urlType=='.rhtml'||urlType=='.cfm'){ibox_type=3;}else{if(params['type']){ibox_type=parseInt(params['type']);}
else{hideIbox();return false;}}
ibox_type=parseInt(ibox_type);switch(ibox_type){case 1:showIndicator();imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader=resizeImageToScreen(imgPreloader);hideIndicator();var ua=navigator.userAgent;if(ua.indexOf("MSIE ")!=-1){wid=imgPreloader.width-28;hei=imgPreloader.height-49;}else{wid=imgPreloader.width;hei=imgPreloader.height;}
var strHTML="<img name=\"ibox_img\" src=\""+url+"\" style=\"width:"+wid+"px;height:"+hei+"px;border:0;cursor:hand;margin:0;padding:0;position:absolute;\"/>";if(loadCancelled==false){ibox.style.height=imgPreloader.height+'px';ibox.style.width=imgPreloader.width+'px';ibox.style.display="";ibox.style.visibility="hidden";posToCenter(ibox);ibox.style.visibility="visible";setIBoxContent(strHTML);}}
loadCancelled=false;imgPreloader.src=url;break;case 2:var strHTML="";if(params['height']){ibox.style.height=params['height']+'px';}
else{ibox.style.height='280px';}
if(params['width']){ibox.style.width=params['width']+'px';}
else{ibox.style.width='450px';}
ibox.style.display="";ibox.style.visibility="hidden";posToCenter(ibox);ibox.style.visibility="visible";var elemSrcId=url.substr(url.indexOf("#")+1,1000);var elemSrc=getElem(elemSrcId);if(elemSrc){strHTML=elemSrc.innerHTML;}
setIBoxContent(strHTML);break;case 3:showIndicator();http.open('get',url,true);http.onreadystatechange=function(){if(http.readyState==4){hideIndicator();if(params['height']){ibox.style.height=params['height']+'px';}
else{ibox.style.height='280px';}
if(params['width']){ibox.style.width=params['width']+'px';}
else{ibox.style.width='450px';}
ibox.style.display="";ibox.style.visibility="hidden";posToCenter(ibox);ibox.style.visibility="visible";var response=http.responseText;setIBoxContent(response);}}
http.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");http.send(null);break;default:}
ibox.style.opacity=0;ibox.style.filter='alpha(opacity=0)';var ibox_op_level=10;setIboxOpacity=setOpacity;for(var i=0;i<=ibox_op_level;i++){setTimeout("setIboxOpacity('ibox_wrapper',"+i+")",30*i);}
if(ibox_type==2||ibox_type==3){ibox.onclick=null;getElem("ibox_close_a").onclick=function(){hideIbox();}}else{ibox.onclick=hideIbox;getElem("ibox_close_a").onclick=null;}
return true;}
setOpacity=function(elemid,value){var e=getElem(elemid);e.style.opacity=value/10;e.style.filter='alpha(opacity='+value*10+')';}
resizeImageToScreen=function(objImg){var pagesize=new getPageSize();var x=pagesize.width-100;var y=pagesize.height-100;if(objImg.width>x){objImg.height=objImg.height*(x/objImg.width);objImg.width=x;if(objImg.height>y){objImg.width=objImg.width*(y/objImg.height);objImg.height=y;}}
else if(objImg.height>y){objImg.width=objImg.width*(y/objImg.height);objImg.height=y;if(objImg.width>x){objImg.height=objImg.height*(x/objImg.width);objImg.width=x;}}
return objImg;}
maintPos=function(){var ibox=getElem('ibox_wrapper');var box_w=getElem('ibox_w');var pagesize=new getPageSize();var scrollPos=new getScrollPos();var ua=navigator.userAgent;if(ua.indexOf("MSIE ")!=-1){box_w.style.width=pagesize.width+'px';}
if(ua.indexOf("Opera/9")!=-1){box_w.style.height=document.body.scrollHeight+'px';}
else{box_w.style.height=pagesize.height+scrollPos.scrollY+'px';}
posToCenter(ibox);}
hideIbox=function(){hideBG();var ibox=getElem('ibox_wrapper');ibox.style.display="none";clearIboxContent();window.onscroll=null;}
posToCenter=function(elem){var scrollPos=new getScrollPos();var pageSize=new getPageSize();var emSize=new getElementSize(elem);var x=Math.round(pageSize.width/2)-(emSize.width/2)+scrollPos.scrollX;var y=Math.round(pageSize.height/2)-(emSize.height/2)+scrollPos.scrollY;elem.style.left=x+'px';elem.style.top=y+'px';}
getScrollPos=function(){var docElem=document.documentElement;this.scrollX=self.pageXOffset||(docElem&&docElem.scrollLeft)||document.body.scrollLeft;this.scrollY=self.pageYOffset||(docElem&&docElem.scrollTop)||document.body.scrollTop;}
getPageSize=function(){var docElem=document.documentElement
this.width=self.innerWidth||(docElem&&docElem.clientWidth)||document.body.clientWidth;this.height=self.innerHeight||(docElem&&docElem.clientHeight)||document.body.clientHeight;}
getElementSize=function(elem){this.width=elem.offsetWidth||elem.style.pixelWidth;this.height=elem.offsetHeight||elem.style.pixelHeight;}
setIBoxContent=function(str){clearIboxContent();var e=getElem('ibox_content');e.innerHTML=str;}
clearIboxContent=function(){var e=getElem('ibox_content');e.innerHTML="";}
getElem=function(elemId){return document.getElementById(elemId);}
parseQuery=function(query){var Params=new Object();if(!query)return Params;var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2)continue;var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}
createRequestObject=function(){var xmlhttp;if(!xmlhttp&&typeof XMLHttpRequest!="undefined"){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
return xmlhttp;}
var http=createRequestObject();function addEvent(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true;}else if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r;}else{return false;}}
addEvent(window,'load',init_ibox);
///home/lzdem/domains/lzskelbimai.com/public_html/media/main/jquery/jquery-1.3.2.js 

(function(){var
window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;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&&elem.id!=match[3])
return jQuery().find(selector);var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))
return jQuery(document).ready(selector);if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;}
return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find")
ret.selector=this.selector+(this.selector?" ":"")+selector;else if(name)
ret.selector=this.selector+"."+name+"("+selector+")";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){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(typeof name==="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]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode)
wrap.insertBefore(this[0]);wrap.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,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret;}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem);})),"find",selector);}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}
return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else
return this.cloneNode(true);});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName)
return;var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}
i++;});}
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,jQuery.grep(this,function(elem){return elem.nodeType===1;})),"filter",selector);},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur;}
cur=cur.parentNode;closer++;}});},not:function(selector){if(typeof selector==="string")
if(isSimple.test(selector))
return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector);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!!selector&&this.is("."+selector);},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,'option'))
return(elem.attributes.value||{}).specified?elem.value:elem.text;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(option).val();if(one)
return value;values.push(value);}}
return values;}
return(elem.value||"").replace(/\r/g,"");}
return undefined;}
if(typeof value==="number")
value+='';return this.each(function(){if(this.nodeType!=1)
return;if(jQuery.isArray(value)&&/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.replace(/ jQuery\d+="(?:\d+|null)"/g,""):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),"slice",Array.prototype.slice.call(arguments).join(","));},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);},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first)
for(var i=0,l=this.length;i<l;i++)
callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment);if(scripts)
jQuery.each(scripts,evalScript);}
return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}};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(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!=="object"&&!jQuery.isFunction(target))
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 exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)
window.jQuery=_jQuery;return jQuery;},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument);},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval)
script.appendChild(document.createTextNode(data));else
script.text=data;head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},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 typeof value==="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 elem&&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,extra){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;if(extra==="border")
return;jQuery.each(which,function(){if(!extra)
val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;if(extra==="margin")
val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;else
val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});}
if(elem.offsetWidth!==0)
getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,Math.round(val));}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}
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)
ret=computedStyle.getPropertyValue(name);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,fragment){context=context||document;if(typeof context.createElement==="undefined")
context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match)
return[context.createElement(match[1])];}
var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number")
elem+='';if(!elem)
return;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=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();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.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
div=div.lastChild;if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?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(!jQuery.support.leadingWhitespace&&/^\s/.test(elem))
div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);elem=jQuery.makeArray(div.childNodes);}
if(elem.nodeType)
ret.push(elem);else
ret=jQuery.merge(ret,elem);});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1)
ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));fragment.appendChild(ret[i]);}}
return scripts;}
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;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode)
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;if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined;}
return elem[name];}
if(!jQuery.support.style&&notxml&&name=="style")
return jQuery.attr(elem.style,"cssText",value);if(set)
elem.setAttribute(name,""+value);var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
if(!jQuery.support.opacity&&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||typeof array==="string"||jQuery.isFunction(array)||array.setInterval)
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.support.getAll){while((elem=second[i++])!=null)
if(elem.nodeType!=8)
first[pos++]=elem;}else
while((elem=second[i++])!=null)
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.]+)/)||[0,'0'])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};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),name,selector);};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}
return this.pushStack(ret,name,selector);};});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,state){if(typeof state!=="boolean")
state=!jQuery.className.has(this,classNames);jQuery.className[state?"add":"remove"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).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).children().remove();while(this.firstChild)
this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}
var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({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];}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data))
q=jQuery.data(elem,type,jQuery.makeArray(data));else if(data)
q.push(data);}
return q;},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx")
fn=queue[0];if(fn!==undefined)
fn.call(elem);}});jQuery.fn.extend({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);});},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}
if(data===undefined)
return jQuery.queue(this[0],type);return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1)
queue[0].call(this);});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});}});(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9)
return[];if(!selector||typeof selector!=="string"){return results;}
var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break;}}
if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])
selector+=parts.shift();set=posProcess(selector,set);}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
if(pop==null){pop=context;}
Expr.relative[cur](checkSet,pop,isXML(context));}}
if(!checkSet){checkSet=set;}
if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}
if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}}
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
if(!set){set=context.getElementsByTagName("*");}
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
if(found!==undefined){if(!inplace){curLoop=result;}
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
break;}}}
if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr;}else{break;}}
old=expr;}
return curLoop;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace)
result.push(elem);}else if(inplace){curLoop[i]=false;}}}
return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}
return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
if(match[2]==="~="){match[4]=" "+match[4]+" ";}
return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}
return true;}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while(node=node.previousSibling){if(node.nodeType===1)return false;}
if(type=='first')return true;node=elem;case'last':while(node=node.nextSibling){if(node.nodeType===1)return false;}
return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true;}
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
parent.sizcache=doneName;}
var diff=elem.nodeIndex-last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);}
var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results;}
return array;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
return ret;};}
var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}
return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}
return ret;};}else if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
return ret;};}
(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
root.removeChild(form);})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
results=tmp;}
return results;};}
div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
return oldSizzle(query,context,extra,seed);};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0)
return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)
return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(elem.nodeName===cur){match=elem;break;}
elem=elem[dir];}
checkSet[i]=match;}}}
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
elem=elem[dir];}
checkSet[i]=match;}}}
var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument);};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0;};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0;};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")";}
return Sizzle.matches(expr,elems);};jQuery.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;};jQuery.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;};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)
r.push(n);}
return r;};return;window.Sizzle=Sizzle;})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)
return;if(elem.setInterval&&elem!=window)
elem=window;if(!handler.guid)
handler.guid=this.guid++;if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data;}
var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type])
jQuery.event.specialAll[type].setup.call(elem,data,namespaces);if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===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 namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler)
delete events[type][handler.guid];else
for(var handle in events[type])
if(namespace.test(events[type][handle].type))
delete events[type][handle];if(jQuery.event.specialAll[type])
jQuery.event.specialAll[type].teardown.call(elem,namespaces);for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===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(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}
if(!elem){event.stopPropagation();if(this.global[type])
jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type])
jQuery.event.trigger(event,data,this.handle.elem);});}
if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}
event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle)
handle.apply(elem,data);if((!elem[type]||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)
event.result=false;if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}
this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent)
jQuery.event.trigger(event,data,parent,true);}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}
if(event.isImmediatePropagationStopped())
break;}}},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 toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando])
return event;var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}
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=proxy||function(){return fn.apply(this,arguments);};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler);},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type))
remove++;});if(remove<1)
jQuery.event.remove(this,namespaces[0],liveHandler);}}}}};jQuery.Event=function(src){if(!this.preventDefault)
return new jQuery.Event(src);if(src&&src.type){this.originalEvent=src;this.type=src.type;}else
this.type=src;this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}
function returnTrue(){return true;}
jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e)
return;if(e.preventDefault)
e.preventDefault();e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e)
return;if(e.stopPropagation)
e.stopPropagation();e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this)
try{parent=parent.parentNode;}
catch(e){parent=this;}
if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}};jQuery.each({mouseover:'mouseenter',mouseout:'mouseleave'},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix);},teardown:function(){jQuery.event.remove(this,orig,withinElement);}};});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){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},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.mouseenter(fnOver).mouseleave(fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)
fn.call(document,jQuery);else
jQuery.readyList.push(fn);return this;},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this;},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this;}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem)
elems.push({elem:elem,fn:fn});}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest");});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false)
return(stop=false);});return stop;}
function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".");}
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);});jQuery.readyList=null;}
jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready();},false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready();}});if(document.documentElement.doScroll&&window==window.top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){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,mouseenter,mouseleave,"+"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);};});jQuery(window).bind('unload',function(){for(var id in jQuery.cache)
if(id!=1&&jQuery.cache[id].handle)
jQuery.event.remove(jQuery.cache[id].handle.elem);});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}
jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}
root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}
root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee);});div.cloneNode(true).fireEvent("onclick");}
jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display='none';});})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};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);}
var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){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);if(callback)
self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?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",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();},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 parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=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();script.onload=script.onreadystatechange=null;head.removeChild(script);}};}
head.appendChild(script);return undefined;}
var requestDone=false;var xhr=s.xhr();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){if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");xhr.abort();return false;}
if(s.global)
jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}}else 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);}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(isTimeout)
xhr.abort();if(s.async)
xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xhr&&!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;}catch(e){}
return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url];}catch(e){}
return false;},httpData:function(xhr,type,s){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(s&&s.dataFilter)
data=s.dataFilter(data,type);if(typeof data==="string"){if(type=="script")
jQuery.globalEval(data);if(type=="json")
data=window["eval"]("("+data+")");}
return data;},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+'='+encodeURIComponent(value);};if(jQuery.isArray(a)||a.jquery)
jQuery.each(a,function(){add(this.name,this.value);});else
for(var j in a)
if(jQuery.isArray(a[j]))
jQuery.each(a[j],function(){add(j,this);});else
add(j,jQuery.isFunction(a[j])?a[j]():a[j]);return s.join("&").replace(/%20/g,"+");}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}
jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName];}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none")
display="block";elem.remove();elemdisplay[tagName]=display;}
jQuery.data(this[i],"olddisplay",display);}}
for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||"";}
return this;}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none")
jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}
for(var i=0,l=this.length;i<l;i++){this[i].style.display="none";}
return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();}):this.animate(genFx("toggle",3),fn,fn2);},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(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&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")&&this.style){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;});},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;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;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:[],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)
this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||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;var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){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(timerId);timerId=undefined;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());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)
jQuery(this.elem).hide();if(this.options.hide||this.options.show)
for(var p in this.options.curAnim)
jQuery.attr(this.elem.style,p,this.options.orig[p]);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,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null)
fx.elem.style[fx.prop]=fx.now+fx.unit;else
fx.elem[fx.prop]=fx.now;}}});if(document.documentElement["getBoundingClientRect"])
jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};else
jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName)))
top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}
if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible")
top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevComputedStyle=computedStyle;}
if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static")
top+=body.offsetTop,left+=body.offsetLeft;if(prevComputedStyle.position==="fixed")
top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft);return{top:top,left:left};};jQuery.offset={initialize:function(){if(this.initialized)return;var body=document.body,container=document.createElement('div'),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:'absolute',top:0,left:0,margin:0,border:0,width:'1px',height:'1px',visibility:'hidden'};for(prop in rules)container.style[prop]=rules[prop];container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow='hidden',innerDiv.style.position='relative';this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop='1px';this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true;},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset)
top+=parseInt(jQuery.curCSS(body,'marginTop',true),10)||0,left+=parseInt(jQuery.curCSS(body,'marginLeft',true),10)||0;return{top:top,left:left};}};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||document.body;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 null;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",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null;};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px");};});})();(function($){$.toJSON=function(o)
{if(typeof(JSON)=='object'&&JSON.stringify)
return JSON.stringify(o);var type=typeof(o);if(o===null)
return"null";if(type=="undefined")
return undefined;if(type=="number"||type=="boolean")
return o+"";if(type=="string")
return $.quoteString(o);if(type=='object')
{if(typeof o.toJSON=="function")
return $.toJSON(o.toJSON());if(o.constructor===Date)
{var month=o.getUTCMonth()+1;if(month<10)month='0'+month;var day=o.getUTCDate();if(day<10)day='0'+day;var year=o.getUTCFullYear();var hours=o.getUTCHours();if(hours<10)hours='0'+hours;var minutes=o.getUTCMinutes();if(minutes<10)minutes='0'+minutes;var seconds=o.getUTCSeconds();if(seconds<10)seconds='0'+seconds;var milli=o.getUTCMilliseconds();if(milli<100)milli='0'+milli;if(milli<10)milli='0'+milli;return'"'+year+'-'+month+'-'+day+'T'+
hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
if(o.constructor===Array)
{var ret=[];for(var i=0;i<o.length;i++)
ret.push($.toJSON(o[i])||"null");return"["+ret.join(",")+"]";}
var pairs=[];for(var k in o){var name;var type=typeof k;if(type=="number")
name='"'+k+'"';else if(type=="string")
name=$.quoteString(k);else
continue;if(typeof o[k]=="function")
continue;var val=$.toJSON(o[k]);pairs.push(name+":"+val);}
return"{"+pairs.join(", ")+"}";}};$.evalJSON=function(src)
{if(typeof(JSON)=='object'&&JSON.parse)
return JSON.parse(src);return eval("("+src+")");};$.secureEvalJSON=function(src)
{if(typeof(JSON)=='object'&&JSON.parse)
return JSON.parse(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.");};$.quoteString=function(string)
{if(string.match(_escapeable))
{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+'"';};var _escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var _meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};})(jQuery);(function($){$.isJSON=function(json){json=json.replace(/\\["\\\/bfnrtu]/g,'@');json=json.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');json=json.replace(/(?:^|:|,)(?:\s*\[)+/g,'');return(/^[\],:{}\s]*$/.test(json))}
$.fn.isJSON=function(){var json=this;if(jQuery(json).is(":input")){json=jQuery(json).val();json=new String(json);return jQuery.isJSON(json)}else{throw new SyntaxError("$(object).isJSON only accepts fields!");}}
String.prototype.isJSON=function(){var y=this;return jQuery.isJSON(y);}})(jQuery);(function($){$.fn.ellipsis=function(enableUpdating){var s=document.documentElement.style;if(!('textOverflow'in s||'OTextOverflow'in s)){return this.each(function(){var el=$(this);if(el.css("overflow")=="hidden"){var originalText=el.html();var w=el.width();var t=$(this.cloneNode(true)).hide().css({'position':'absolute','width':'auto','overflow':'visible','max-width':'inherit'});el.after(t);var text=originalText;while(text.length>0&&t.width()>el.width()){text=text.substr(0,text.length-1);t.html(text+"...");}
el.html(t.html());t.remove();if(enableUpdating==true){var oldW=el.width();setInterval(function(){if(el.width()!=oldW){oldW=el.width();el.html(originalText);el.ellipsis();}},200);}}});}else return this;};})(jQuery);$(document).ready(function(){$("#center .big_box .content .skelbimas .tekstas").ellipsis();});(function($){$.fn.urgent_prev=function(){$('#urgent_scroller').animate({scrollLeft:$('#urgent_scroller').scrollLeft()-500},500,'swing');};$.fn.urgent_next=function(){$('#urgent_scroller').animate({scrollLeft:$('#urgent_scroller').scrollLeft()+500},500,'swing');};})(jQuery);(function($)
{$.fn.qtip=function(options,blanket)
{var i,id,interfaces,opts,obj,command,config,api;if(typeof options=='string')
{if(typeof $(this).data('qtip')!=='object')
$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.NO_TOOLTIP_PRESENT,false);if(options=='api')
return $(this).data('qtip').interfaces[$(this).data('qtip').current];else if(options=='interfaces')
return $(this).data('qtip').interfaces;}
else
{if(!options)options={};if(typeof options.content!=='object'||(options.content.jquery&&options.content.length>0))options.content={text:options.content};if(typeof options.content.title!=='object')options.content.title={text:options.content.title};if(typeof options.position!=='object')options.position={corner:options.position};if(typeof options.position.corner!=='object')options.position.corner={target:options.position.corner,tooltip:options.position.corner};if(typeof options.show!=='object')options.show={when:options.show};if(typeof options.show.when!=='object')options.show.when={event:options.show.when};if(typeof options.show.effect!=='object')options.show.effect={type:options.show.effect};if(typeof options.hide!=='object')options.hide={when:options.hide};if(typeof options.hide.when!=='object')options.hide.when={event:options.hide.when};if(typeof options.hide.effect!=='object')options.hide.effect={type:options.hide.effect};if(typeof options.style!=='object')options.style={name:options.style};options.style=sanitizeStyle(options.style);opts=$.extend(true,{},$.fn.qtip.defaults,options);opts.style=buildStyle.call({options:opts},opts.style);opts.user=$.extend(true,{},options);};return $(this).each(function()
{if(typeof options=='string')
{command=options.toLowerCase();interfaces=$(this).qtip('interfaces');if(typeof interfaces=='object')
{if(blanket===true&&command=='destroy')
while(interfaces.length>0)interfaces[interfaces.length-1].destroy();else
{if(blanket!==true)interfaces=[$(this).qtip('api')];for(i=0;i<interfaces.length;i++)
{if(command=='destroy')interfaces[i].destroy();else if(interfaces[i].status.rendered===true)
{if(command=='show')interfaces[i].show();else if(command=='hide')interfaces[i].hide();else if(command=='focus')interfaces[i].focus();else if(command=='disable')interfaces[i].disable(true);else if(command=='enable')interfaces[i].disable(false);};};};};}
else
{config=$.extend(true,{},opts);config.hide.effect.length=opts.hide.effect.length;config.show.effect.length=opts.show.effect.length;if(config.position.container===false)config.position.container=$(document.body);if(config.position.target===false)config.position.target=$(this);if(config.show.when.target===false)config.show.when.target=$(this);if(config.hide.when.target===false)config.hide.when.target=$(this);id=$.fn.qtip.interfaces.length;for(i=0;i<id;i++)
{if(typeof $.fn.qtip.interfaces[i]=='undefined'){id=i;break;};};obj=new qTip($(this),config,id);$.fn.qtip.interfaces[id]=obj;if(typeof $(this).data('qtip')=='object')
{if(typeof $(this).attr('qtip')==='undefined')
$(this).data('qtip').current=$(this).data('qtip').interfaces.length;$(this).data('qtip').interfaces.push(obj);}
else $(this).data('qtip',{current:0,interfaces:[obj]});if(config.content.prerender===false&&config.show.when.event!==false&&config.show.ready!==true)
{config.show.when.target.bind(config.show.when.event+'.qtip-'+id+'-create',{qtip:id},function(event)
{api=$.fn.qtip.interfaces[event.data.qtip];api.options.show.when.target.unbind(api.options.show.when.event+'.qtip-'+event.data.qtip+'-create');api.cache.mouse={x:event.pageX,y:event.pageY};construct.call(api);api.options.show.when.target.trigger(api.options.show.when.event);});}
else
{obj.cache.mouse={x:config.show.when.target.offset().left,y:config.show.when.target.offset().top};construct.call(obj);}};});};function qTip(target,options,id)
{var self=this;self.id=id;self.options=options;self.status={animated:false,rendered:false,disabled:false,focused:false};self.elements={target:target.addClass(self.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};self.cache={mouse:{},position:{},toggle:0};self.timers={};$.extend(self,self.options.api,{show:function(event)
{var returned,solo;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'show');if(self.elements.tooltip.css('display')!=='none')return self;self.elements.tooltip.stop(true,false);returned=self.beforeShow.call(self,event);if(returned===false)return self;function afterShow()
{if(self.options.position.type!=='static')self.focus();self.onShow.call(self,event);if($.browser.msie)self.elements.tooltip.get(0).style.removeAttribute('filter');};self.cache.toggle=1;if(self.options.position.type!=='static')
self.updatePosition(event,(self.options.show.effect.length>0));if(typeof self.options.show.solo=='object')solo=$(self.options.show.solo);else if(self.options.show.solo===true)solo=$('div.qtip').not(self.elements.tooltip);if(solo)solo.each(function(){if($(this).qtip('api').status.rendered===true)$(this).qtip('api').hide();});if(typeof self.options.show.effect.type=='function')
{self.options.show.effect.type.call(self.elements.tooltip,self.options.show.effect.length);self.elements.tooltip.queue(function(){afterShow();$(this).dequeue();});}
else
{switch(self.options.show.effect.type.toLowerCase())
{case'fade':self.elements.tooltip.fadeIn(self.options.show.effect.length,afterShow);break;case'slide':self.elements.tooltip.slideDown(self.options.show.effect.length,function()
{afterShow();if(self.options.position.type!=='static')self.updatePosition(event,true);});break;case'grow':self.elements.tooltip.show(self.options.show.effect.length,afterShow);break;default:self.elements.tooltip.show(null,afterShow);break;};self.elements.tooltip.addClass(self.options.style.classes.active);};return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_SHOWN,'show');},hide:function(event)
{var returned;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'hide');else if(self.elements.tooltip.css('display')==='none')return self;clearTimeout(self.timers.show);self.elements.tooltip.stop(true,false);returned=self.beforeHide.call(self,event);if(returned===false)return self;function afterHide(){self.onHide.call(self,event);};self.cache.toggle=0;if(typeof self.options.hide.effect.type=='function')
{self.options.hide.effect.type.call(self.elements.tooltip,self.options.hide.effect.length);self.elements.tooltip.queue(function(){afterHide();$(this).dequeue();});}
else
{switch(self.options.hide.effect.type.toLowerCase())
{case'fade':self.elements.tooltip.fadeOut(self.options.hide.effect.length,afterHide);break;case'slide':self.elements.tooltip.slideUp(self.options.hide.effect.length,afterHide);break;case'grow':self.elements.tooltip.hide(self.options.hide.effect.length,afterHide);break;default:self.elements.tooltip.hide(null,afterHide);break;};self.elements.tooltip.removeClass(self.options.style.classes.active);};return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_HIDDEN,'hide');},updatePosition:function(event,animate)
{var i,target,tooltip,coords,mapName,imagePos,newPosition,ieAdjust,ie6Adjust,borderAdjust,mouseAdjust,offset,curPosition,returned
if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updatePosition');else if(self.options.position.type=='static')
return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.CANNOT_POSITION_STATIC,'updatePosition');target={position:{left:0,top:0},dimensions:{height:0,width:0},corner:self.options.position.corner.target};tooltip={position:self.getPosition(),dimensions:self.getDimensions(),corner:self.options.position.corner.tooltip};if(self.options.position.target!=='mouse')
{if(self.options.position.target.get(0).nodeName.toLowerCase()=='area')
{coords=self.options.position.target.attr('coords').split(',');for(i=0;i<coords.length;i++)coords[i]=parseInt(coords[i]);mapName=self.options.position.target.parent('map').attr('name');imagePos=$('img[usemap="#'+mapName+'"]:first').offset();target.position={left:Math.floor(imagePos.left+coords[0]),top:Math.floor(imagePos.top+coords[1])};switch(self.options.position.target.attr('shape').toLowerCase())
{case'rect':target.dimensions={width:Math.ceil(Math.abs(coords[2]-coords[0])),height:Math.ceil(Math.abs(coords[3]-coords[1]))};break;case'circle':target.dimensions={width:coords[2]+1,height:coords[2]+1};break;case'poly':target.dimensions={width:coords[0],height:coords[1]};for(i=0;i<coords.length;i++)
{if(i%2==0)
{if(coords[i]>target.dimensions.width)
target.dimensions.width=coords[i];if(coords[i]<coords[0])
target.position.left=Math.floor(imagePos.left+coords[i]);}
else
{if(coords[i]>target.dimensions.height)
target.dimensions.height=coords[i];if(coords[i]<coords[1])
target.position.top=Math.floor(imagePos.top+coords[i]);};};target.dimensions.width=target.dimensions.width-(target.position.left-imagePos.left);target.dimensions.height=target.dimensions.height-(target.position.top-imagePos.top);break;default:return $.fn.qtip.log.error.call(self,4,$.fn.qtip.constants.INVALID_AREA_SHAPE,'updatePosition');break;};target.dimensions.width-=2;target.dimensions.height-=2;}
else if(self.options.position.target.add(document.body).length===1)
{target.position={left:$(document).scrollLeft(),top:$(document).scrollTop()};target.dimensions={height:$(window).height(),width:$(window).width()};}
else
{if(typeof self.options.position.target.attr('qtip')!=='undefined')
target.position=self.options.position.target.qtip('api').cache.position;else
target.position=self.options.position.target.offset();target.dimensions={height:self.options.position.target.outerHeight(),width:self.options.position.target.outerWidth()};};newPosition=$.extend({},target.position);if(target.corner.search(/right/i)!==-1)
newPosition.left+=target.dimensions.width;if(target.corner.search(/bottom/i)!==-1)
newPosition.top+=target.dimensions.height;if(target.corner.search(/((top|bottom)Middle)|center/)!==-1)
newPosition.left+=(target.dimensions.width/2);if(target.corner.search(/((left|right)Middle)|center/)!==-1)
newPosition.top+=(target.dimensions.height/2);}
else
{target.position=newPosition={left:self.cache.mouse.x,top:self.cache.mouse.y};target.dimensions={height:1,width:1};};if(tooltip.corner.search(/right/i)!==-1)
newPosition.left-=tooltip.dimensions.width;if(tooltip.corner.search(/bottom/i)!==-1)
newPosition.top-=tooltip.dimensions.height;if(tooltip.corner.search(/((top|bottom)Middle)|center/)!==-1)
newPosition.left-=(tooltip.dimensions.width/2);if(tooltip.corner.search(/((left|right)Middle)|center/)!==-1)
newPosition.top-=(tooltip.dimensions.height/2);ieAdjust=($.browser.msie)?1:0;ie6Adjust=($.browser.msie&&parseInt($.browser.version.charAt(0))===6)?1:0;if(self.options.style.border.radius>0)
{if(tooltip.corner.search(/Left/)!==-1)
newPosition.left-=self.options.style.border.radius;else if(tooltip.corner.search(/Right/)!==-1)
newPosition.left+=self.options.style.border.radius;if(tooltip.corner.search(/Top/)!==-1)
newPosition.top-=self.options.style.border.radius;else if(tooltip.corner.search(/Bottom/)!==-1)
newPosition.top+=self.options.style.border.radius;};if(ieAdjust)
{if(tooltip.corner.search(/top/)!==-1)
newPosition.top-=ieAdjust
else if(tooltip.corner.search(/bottom/)!==-1)
newPosition.top+=ieAdjust
if(tooltip.corner.search(/left/)!==-1)
newPosition.left-=ieAdjust
else if(tooltip.corner.search(/right/)!==-1)
newPosition.left+=ieAdjust
if(tooltip.corner.search(/leftMiddle|rightMiddle/)!==-1)
newPosition.top-=1};if(self.options.position.adjust.screen===true)
newPosition=screenAdjust.call(self,newPosition,target,tooltip);if(self.options.position.target==='mouse'&&self.options.position.adjust.mouse===true)
{if(self.options.position.adjust.screen===true&&self.elements.tip)
mouseAdjust=self.elements.tip.attr('rel');else
mouseAdjust=self.options.position.corner.tooltip;newPosition.left+=(mouseAdjust.search(/right/i)!==-1)?-6:6;newPosition.top+=(mouseAdjust.search(/bottom/i)!==-1)?-6:6;}
if(!self.elements.bgiframe&&$.browser.msie&&parseInt($.browser.version.charAt(0))==6)
{$('select, object').each(function()
{offset=$(this).offset();offset.bottom=offset.top+$(this).height();offset.right=offset.left+$(this).width();if(newPosition.top+tooltip.dimensions.height>=offset.top&&newPosition.left+tooltip.dimensions.width>=offset.left)
bgiframe.call(self);});};newPosition.left+=self.options.position.adjust.x;newPosition.top+=self.options.position.adjust.y;curPosition=self.getPosition();if(newPosition.left!=curPosition.left||newPosition.top!=curPosition.top)
{returned=self.beforePositionUpdate.call(self,event);if(returned===false)return self;self.cache.position=newPosition;if(animate===true)
{self.status.animated=true;self.elements.tooltip.animate(newPosition,200,'swing',function(){self.status.animated=false});}
else self.elements.tooltip.css(newPosition);self.onPositionUpdate.call(self,event);if(typeof event!=='undefined'&&event.type&&event.type!=='mousemove')
$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_POSITION_UPDATED,'updatePosition');};return self;},updateWidth:function(newWidth)
{var hidden;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateWidth');else if(newWidth&&typeof newWidth!=='number')
return $.fn.qtip.log.error.call(self,2,'newWidth must be of type number','updateWidth');hidden=self.elements.contentWrapper.siblings().add(self.elements.tip).add(self.elements.button);if(!newWidth)
{if(typeof self.options.style.width.value=='number')
newWidth=self.options.style.width.value;else
{self.elements.tooltip.css({width:'auto'});hidden.hide();if($.browser.msie)
self.elements.wrapper.add(self.elements.contentWrapper.children()).css({zoom:'normal'});newWidth=self.getDimensions().width+1;if(!self.options.style.width.value)
{if(newWidth>self.options.style.width.max)newWidth=self.options.style.width.max
if(newWidth<self.options.style.width.min)newWidth=self.options.style.width.min};};};if(newWidth%2!==0)newWidth-=1;self.elements.tooltip.width(newWidth);hidden.show();if(self.options.style.border.radius)
{self.elements.tooltip.find('.qtip-betweenCorners').each(function(i)
{$(this).width(newWidth-(self.options.style.border.radius*2));})};if($.browser.msie)
{self.elements.wrapper.add(self.elements.contentWrapper.children()).css({zoom:'1'});self.elements.wrapper.width(newWidth);if(self.elements.bgiframe)self.elements.bgiframe.width(newWidth).height(self.getDimensions.height);};return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_WIDTH_UPDATED,'updateWidth');},updateStyle:function(name)
{var tip,borders,context,corner,coordinates;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateStyle');else if(typeof name!=='string'||!$.fn.qtip.styles[name])
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.STYLE_NOT_DEFINED,'updateStyle');self.options.style=buildStyle.call(self,$.fn.qtip.styles[name],self.options.user.style);self.elements.content.css(jQueryStyle(self.options.style));if(self.options.content.title.text!==false)
self.elements.title.css(jQueryStyle(self.options.style.title,true));self.elements.contentWrapper.css({borderColor:self.options.style.border.color});if(self.options.style.tip.corner!==false)
{if($('<canvas>').get(0).getContext)
{tip=self.elements.tooltip.find('.qtip-tip canvas:first');context=tip.get(0).getContext('2d');context.clearRect(0,0,300,300);corner=tip.parent('div[rel]:first').attr('rel');coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);drawTip.call(self,tip,coordinates,self.options.style.tip.color||self.options.style.border.color);}
else if($.browser.msie)
{tip=self.elements.tooltip.find('.qtip-tip [nodeName="shape"]');tip.attr('fillcolor',self.options.style.tip.color||self.options.style.border.color);};};if(self.options.style.border.radius>0)
{self.elements.tooltip.find('.qtip-betweenCorners').css({backgroundColor:self.options.style.border.color});if($('<canvas>').get(0).getContext)
{borders=calculateBorders(self.options.style.border.radius)
self.elements.tooltip.find('.qtip-wrapper canvas').each(function()
{context=$(this).get(0).getContext('2d');context.clearRect(0,0,300,300);corner=$(this).parent('div[rel]:first').attr('rel')
drawBorder.call(self,$(this),borders[corner],self.options.style.border.radius,self.options.style.border.color);});}
else if($.browser.msie)
{self.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function()
{$(this).attr('fillcolor',self.options.style.border.color)});};};return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_STYLE_UPDATED,'updateStyle');},updateContent:function(content,reposition)
{var parsedContent,images,loadedImages;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateContent');else if(!content)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.NO_CONTENT_PROVIDED,'updateContent');parsedContent=self.beforeContentUpdate.call(self,content);if(typeof parsedContent=='string')content=parsedContent;else if(parsedContent===false)return;if($.browser.msie)self.elements.contentWrapper.children().css({zoom:'normal'});if(content.jquery&&content.length>0)
content.clone(true).appendTo(self.elements.content).show();else self.elements.content.html(content);images=self.elements.content.find('img[complete=false]');if(images.length>0)
{loadedImages=0;images.each(function(i)
{$('<img src="'+$(this).attr('src')+'" />').load(function(){if(++loadedImages==images.length)afterLoad();});});}
else afterLoad();function afterLoad()
{self.updateWidth();if(reposition!==false)
{if(self.options.position.type!=='static')
self.updatePosition(self.elements.tooltip.is(':visible'),true);if(self.options.style.tip.corner!==false)
positionTip.call(self);};};self.onContentUpdate.call(self);return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_CONTENT_UPDATED,'loadContent');},loadContent:function(url,data,method)
{var returned;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'loadContent');returned=self.beforeContentLoad.call(self);if(returned===false)return self;if(method=='post')
$.post(url,data,setupContent);else
$.get(url,data,setupContent);function setupContent(content)
{self.onContentLoad.call(self);$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_CONTENT_LOADED,'loadContent');self.updateContent(content);};return self;},updateTitle:function(content)
{if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateTitle');else if(!content)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.NO_CONTENT_PROVIDED,'updateTitle');returned=self.beforeTitleUpdate.call(self);if(returned===false)return self;if(self.elements.button)self.elements.button=self.elements.button.clone(true);self.elements.title.html(content)
if(self.elements.button)self.elements.title.prepend(self.elements.button);self.onTitleUpdate.call(self);return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_TITLE_UPDATED,'updateTitle');},focus:function(event)
{var curIndex,newIndex,elemIndex,returned;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'focus');else if(self.options.position.type=='static')
return $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.CANNOT_FOCUS_STATIC,'focus');curIndex=parseInt(self.elements.tooltip.css('z-index'));newIndex=6000+$('div.qtip[qtip]').length-1;if(!self.status.focused&&curIndex!==newIndex)
{returned=self.beforeFocus.call(self,event);if(returned===false)return self;$('div.qtip[qtip]').not(self.elements.tooltip).each(function()
{if($(this).qtip('api').status.rendered===true)
{elemIndex=parseInt($(this).css('z-index'));if(typeof elemIndex=='number'&&elemIndex>-1)
$(this).css({zIndex:parseInt($(this).css('z-index'))-1});$(this).qtip('api').status.focused=false;}})
self.elements.tooltip.css({zIndex:newIndex});self.status.focused=true;self.onFocus.call(self,event);$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_FOCUSED,'focus');};return self;},disable:function(state)
{if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'disable');if(state)
{if(!self.status.disabled)
{self.status.disabled=true;$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_DISABLED,'disable');}
else $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,'disable');}
else
{if(self.status.disabled)
{self.status.disabled=false;$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_ENABLED,'disable');}
else $.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,'disable');};return self;},destroy:function()
{var i,returned,interfaces;returned=self.beforeDestroy.call(self);if(returned===false)return self;if(self.status.rendered)
{self.options.show.when.target.unbind('mousemove.qtip',self.updatePosition);self.options.show.when.target.unbind('mouseout.qtip',self.hide);self.options.show.when.target.unbind(self.options.show.when.event+'.qtip');self.options.hide.when.target.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind('mouseover.qtip',self.focus);self.elements.tooltip.remove();}
else self.options.show.when.target.unbind(self.options.show.when.event+'.qtip-create');if(typeof self.elements.target.data('qtip')=='object')
{interfaces=self.elements.target.data('qtip').interfaces;if(typeof interfaces=='object'&&interfaces.length>0)
{for(i=0;i<interfaces.length-1;i++)
if(interfaces[i].id==self.id)interfaces.splice(i,1)}}
delete $.fn.qtip.interfaces[self.id];if(typeof interfaces=='object'&&interfaces.length>0)
self.elements.target.data('qtip').current=interfaces.length-1;else
self.elements.target.removeData('qtip');self.onDestroy.call(self);$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_DESTROYED,'destroy');return self.elements.target},getPosition:function()
{var show,offset;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'getPosition');show=(self.elements.tooltip.css('display')!=='none')?false:true;if(show)self.elements.tooltip.css({visiblity:'hidden'}).show();offset=self.elements.tooltip.offset();if(show)self.elements.tooltip.css({visiblity:'visible'}).hide();return offset;},getDimensions:function()
{var show,dimensions;if(!self.status.rendered)
return $.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'getDimensions');show=(!self.elements.tooltip.is(':visible'))?true:false;if(show)self.elements.tooltip.css({visiblity:'hidden'}).show();dimensions={height:self.elements.tooltip.outerHeight(),width:self.elements.tooltip.outerWidth()};if(show)self.elements.tooltip.css({visiblity:'visible'}).hide();return dimensions;}});};function construct()
{var self,adjust,content,url,data,method,tempLength;self=this;self.beforeRender.call(self);self.status.rendered=true;self.elements.tooltip='<div qtip="'+self.id+'" '+'class="qtip '+(self.options.style.classes.tooltip||self.options.style)+'"'+'style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;'+'position:'+self.options.position.type+';">'+'  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">'+'    <div class="qtip-contentWrapper" style="overflow:hidden;">'+'       <div class="qtip-content '+self.options.style.classes.content+'"></div>'+'</div></div></div>';self.elements.tooltip=$(self.elements.tooltip);self.elements.tooltip.appendTo(self.options.position.container)
self.elements.tooltip.data('qtip',{current:0,interfaces:[self]});self.elements.wrapper=self.elements.tooltip.children('div:first');self.elements.contentWrapper=self.elements.wrapper.children('div:first').css({background:self.options.style.background});self.elements.content=self.elements.contentWrapper.children('div:first').css(jQueryStyle(self.options.style));if($.browser.msie)self.elements.wrapper.add(self.elements.content).css({zoom:1});if(self.options.hide.when.event=='unfocus')self.elements.tooltip.attr('unfocus',true);if(typeof self.options.style.width.value=='number')self.updateWidth();if($('<canvas>').get(0).getContext||$.browser.msie)
{if(self.options.style.border.radius>0)
createBorder.call(self);else
self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});if(self.options.style.tip.corner!==false)
createTip.call(self);}
else
{self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});self.options.style.border.radius=0;self.options.style.tip.corner=false;$.fn.qtip.log.error.call(self,2,$.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,'render');};if((typeof self.options.content.text=='string'&&self.options.content.text.length>0)||(self.options.content.text.jquery&&self.options.content.text.length>0))
content=self.options.content.text;else if(typeof self.elements.target.attr('title')=='string'&&self.elements.target.attr('title').length>0)
{content=self.elements.target.attr('title').replace("\\n",'<br />');self.elements.target.attr('title','');}
else if(typeof self.elements.target.attr('alt')=='string'&&self.elements.target.attr('alt').length>0)
{content=self.elements.target.attr('alt').replace("\\n",'<br />');self.elements.target.attr('alt','');}
else
{content=' ';$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.NO_VALID_CONTENT,'render');};if(self.options.content.title.text!==false)createTitle.call(self);self.updateContent(content);assignEvents.call(self);if(self.options.show.ready===true)self.show();if(self.options.content.url!==false)
{url=self.options.content.url;data=self.options.content.data;method=self.options.content.method||'get';self.loadContent(url,data,method);};self.onRender.call(self);$.fn.qtip.log.error.call(self,1,$.fn.qtip.constants.EVENT_RENDERED,'render');};function createBorder()
{var self,i,width,radius,color,coordinates,containers,size,betweenWidth,betweenCorners,borderTop,borderBottom,borderCoord,sideWidth,vertWidth;self=this;self.elements.wrapper.find('.qtip-borderBottom, .qtip-borderTop').remove();width=self.options.style.border.width;radius=self.options.style.border.radius;color=self.options.style.border.color||self.options.style.tip.color;coordinates=calculateBorders(radius);containers={};for(i in coordinates)
{containers[i]='<div rel="'+i+'" style="'+((i.search(/Left/)!==-1)?'left':'right')+':0; '+'position:absolute; height:'+radius+'px; width:'+radius+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if($('<canvas>').get(0).getContext)
containers[i]+='<canvas height="'+radius+'" width="'+radius+'" style="vertical-align: top"></canvas>';else if($.browser.msie)
{size=radius*2+3;containers[i]+='<v:arc stroked="false" fillcolor="'+color+'" startangle="'+coordinates[i][0]+'" endangle="'+coordinates[i][1]+'" '+'style="width:'+size+'px; height:'+size+'px; margin-top:'+((i.search(/bottom/)!==-1)?-2:-1)+'px; '+'margin-left:'+((i.search(/Right/)!==-1)?coordinates[i][2]-3.5:-1)+'px; '+'vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>';};containers[i]+='</div>';};betweenWidth=self.getDimensions().width-(Math.max(width,radius)*2);betweenCorners='<div class="qtip-betweenCorners" style="height:'+radius+'px; width:'+betweenWidth+'px; '+'overflow:hidden; background-color:'+color+'; line-height:0.1px; font-size:1px;">';borderTop='<div class="qtip-borderTop" dir="ltr" style="height:'+radius+'px; '+'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+
containers['topLeft']+containers['topRight']+betweenCorners;self.elements.wrapper.prepend(borderTop);borderBottom='<div class="qtip-borderBottom" dir="ltr" style="height:'+radius+'px; '+'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+
containers['bottomLeft']+containers['bottomRight']+betweenCorners;self.elements.wrapper.append(borderBottom);if($('<canvas>').get(0).getContext)
{self.elements.wrapper.find('canvas').each(function()
{borderCoord=coordinates[$(this).parent('[rel]:first').attr('rel')];drawBorder.call(self,$(this),borderCoord,radius,color);})}
else if($.browser.msie)self.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>');sideWidth=Math.max(radius,(radius+(width-radius)))
vertWidth=Math.max(width-radius,0);self.elements.contentWrapper.css({border:'0px solid '+color,borderWidth:vertWidth+'px '+sideWidth+'px'})};function drawBorder(canvas,coordinates,radius,color)
{var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.arc(coordinates[0],coordinates[1],radius,0,Math.PI*2,false);context.fill();};function createTip(corner)
{var self,color,coordinates,coordsize,path;self=this;if(self.elements.tip!==null)self.elements.tip.remove();color=self.options.style.tip.color||self.options.style.border.color;if(self.options.style.tip.corner===false)return;else if(!corner)corner=self.options.style.tip.corner;coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);self.elements.tip='<div class="'+self.options.style.classes.tip+'" dir="ltr" rel="'+corner+'" style="position:absolute; '+'height:'+self.options.style.tip.size.height+'px; width:'+self.options.style.tip.size.width+'px; '+'margin:0 auto; line-height:0.1px; font-size:1px;">';if($('<canvas>').get(0).getContext)
self.elements.tip+='<canvas height="'+self.options.style.tip.size.height+'" width="'+self.options.style.tip.size.width+'"></canvas>';else if($.browser.msie)
{coordsize=self.options.style.tip.size.width+','+self.options.style.tip.size.height;path='m'+coordinates[0][0]+','+coordinates[0][1];path+=' l'+coordinates[1][0]+','+coordinates[1][1];path+=' '+coordinates[2][0]+','+coordinates[2][1];path+=' xe';self.elements.tip+='<v:shape fillcolor="'+color+'" stroked="false" filled="true" path="'+path+'" coordsize="'+coordsize+'" '+'style="width:'+self.options.style.tip.size.width+'px; height:'+self.options.style.tip.size.height+'px; '+'line-height:0.1px; display:inline-block; behavior:url(#default#VML); '+'vertical-align:'+((corner.search(/top/)!==-1)?'bottom':'top')+'"></v:shape>';self.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';self.elements.contentWrapper.css('position','relative');};self.elements.tooltip.prepend(self.elements.tip+'</div>');self.elements.tip=self.elements.tooltip.find('.'+self.options.style.classes.tip).eq(0);if($('<canvas>').get(0).getContext)
drawTip.call(self,self.elements.tip.find('canvas:first'),coordinates,color);if(corner.search(/top/)!==-1&&$.browser.msie&&parseInt($.browser.version.charAt(0))===6)
self.elements.tip.css({marginTop:-4});positionTip.call(self,corner);};function drawTip(canvas,coordinates,color)
{var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.moveTo(coordinates[0][0],coordinates[0][1]);context.lineTo(coordinates[1][0],coordinates[1][1]);context.lineTo(coordinates[2][0],coordinates[2][1]);context.fill();};function positionTip(corner)
{var self,ieAdjust,paddingCorner,paddingSize,newMargin;self=this;if(self.options.style.tip.corner===false||!self.elements.tip)return;if(!corner)corner=self.elements.tip.attr('rel');ieAdjust=positionAdjust=($.browser.msie)?1:0;self.elements.tip.css(corner.match(/left|right|top|bottom/)[0],0);if(corner.search(/top|bottom/)!==-1)
{if($.browser.msie)
{if(parseInt($.browser.version.charAt(0))===6)
positionAdjust=(corner.search(/top/)!==-1)?-3:1;else
positionAdjust=(corner.search(/top/)!==-1)?1:2;};if(corner.search(/Middle/)!==-1)
self.elements.tip.css({left:'50%',marginLeft:-(self.options.style.tip.size.width/2)});else if(corner.search(/Left/)!==-1)
self.elements.tip.css({left:self.options.style.border.radius-ieAdjust});else if(corner.search(/Right/)!==-1)
self.elements.tip.css({right:self.options.style.border.radius+ieAdjust});if(corner.search(/top/)!==-1)
self.elements.tip.css({top:-positionAdjust});else
self.elements.tip.css({bottom:positionAdjust});}
else if(corner.search(/left|right/)!==-1)
{if($.browser.msie)
positionAdjust=(parseInt($.browser.version.charAt(0))===6)?1:((corner.search(/left/)!==-1)?1:2);if(corner.search(/Middle/)!==-1)
self.elements.tip.css({top:'50%',marginTop:-(self.options.style.tip.size.height/2)});else if(corner.search(/Top/)!==-1)
self.elements.tip.css({top:self.options.style.border.radius-ieAdjust});else if(corner.search(/Bottom/)!==-1)
self.elements.tip.css({bottom:self.options.style.border.radius+ieAdjust});if(corner.search(/left/)!==-1)
self.elements.tip.css({left:-positionAdjust});else
self.elements.tip.css({right:positionAdjust});};paddingCorner='padding-'+corner.match(/left|right|top|bottom/)[0];paddingSize=self.options.style.tip.size[(paddingCorner.search(/left|right/)!==-1)?'width':'height'];self.elements.tooltip.css('padding',0);self.elements.tooltip.css(paddingCorner,paddingSize);if($.browser.msie&&parseInt($.browser.version.charAt(0))==6)
{newMargin=parseInt(self.elements.tip.css('margin-top'))||0;newMargin+=parseInt(self.elements.content.css('margin-top'))||0;self.elements.tip.css({marginTop:newMargin});};};function createTitle()
{var self=this;if(self.elements.title!==null)self.elements.title.remove();self.elements.title=$('<div class="'+self.options.style.classes.title+'">').css(jQueryStyle(self.options.style.title,true)).css({zoom:($.browser.msie)?1:0}).prependTo(self.elements.contentWrapper);if(self.options.content.title.text)self.updateTitle.call(self,self.options.content.title.text);if(self.options.content.title.button!==false&&typeof self.options.content.title.button=='string')
{self.elements.button=$('<a class="'+self.options.style.classes.button+'" style="float:right; position: relative"></a>').css(jQueryStyle(self.options.style.button,true)).html(self.options.content.title.button).prependTo(self.elements.title).click(function(event){if(!self.status.disabled)self.hide(event)});};};function assignEvents()
{var self,showTarget,hideTarget,inactiveEvents;self=this;showTarget=self.options.show.when.target;hideTarget=self.options.hide.when.target;if(self.options.hide.fixed)hideTarget=hideTarget.add(self.elements.tooltip);if(self.options.hide.when.event=='inactive')
{inactiveEvents=['click','dblclick','mousedown','mouseup','mousemove','mouseout','mouseenter','mouseleave','mouseover'];function inactiveMethod(event)
{if(self.status.disabled===true)return;clearTimeout(self.timers.inactive);self.timers.inactive=setTimeout(function()
{$(inactiveEvents).each(function()
{hideTarget.unbind(this+'.qtip-inactive');self.elements.content.unbind(this+'.qtip-inactive');});self.hide(event);},self.options.hide.delay);};}
else if(self.options.hide.fixed===true)
{self.elements.tooltip.bind('mouseover.qtip',function()
{if(self.status.disabled===true)return;clearTimeout(self.timers.hide);});};function showMethod(event)
{if(self.status.disabled===true)return;if(self.options.hide.when.event=='inactive')
{$(inactiveEvents).each(function()
{hideTarget.bind(this+'.qtip-inactive',inactiveMethod);self.elements.content.bind(this+'.qtip-inactive',inactiveMethod);});inactiveMethod();};clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.timers.show=setTimeout(function(){self.show(event);},self.options.show.delay);};function hideMethod(event)
{if(self.status.disabled===true)return;if(self.options.hide.fixed===true&&self.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&$(event.relatedTarget).parents('div.qtip[qtip]').length>0)
{event.stopPropagation();event.preventDefault();clearTimeout(self.timers.hide);return false;};clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.elements.tooltip.stop(true,true);self.timers.hide=setTimeout(function(){self.hide(event);},self.options.hide.delay);};if((self.options.show.when.target.add(self.options.hide.when.target).length===1&&self.options.show.when.event==self.options.hide.when.event&&self.options.hide.when.event!=='inactive')||self.options.hide.when.event=='unfocus')
{self.cache.toggle=0;showTarget.bind(self.options.show.when.event+'.qtip',function(event)
{if(self.cache.toggle==0)showMethod(event);else hideMethod(event);});}
else
{showTarget.bind(self.options.show.when.event+'.qtip',showMethod);if(self.options.hide.when.event!=='inactive')
hideTarget.bind(self.options.hide.when.event+'.qtip',hideMethod);};if(self.options.position.type.search(/(fixed|absolute)/)!==-1)
self.elements.tooltip.bind('mouseover.qtip',self.focus);if(self.options.position.target==='mouse'&&self.options.position.type!=='static')
{showTarget.bind('mousemove.qtip',function(event)
{self.cache.mouse={x:event.pageX,y:event.pageY};if(self.status.disabled===false&&self.options.position.adjust.mouse===true&&self.options.position.type!=='static'&&self.elements.tooltip.css('display')!=='none')
self.updatePosition(event);});};};function screenAdjust(position,target,tooltip)
{var self,adjustedPosition,adjust,newCorner,overflow,corner;self=this;if(tooltip.corner=='center')return target.position
adjustedPosition=$.extend({},position);newCorner={x:false,y:false};overflow={left:(adjustedPosition.left<$.fn.qtip.cache.screen.scroll.left),right:(adjustedPosition.left+tooltip.dimensions.width+2>=$.fn.qtip.cache.screen.width+$.fn.qtip.cache.screen.scroll.left),top:(adjustedPosition.top<$.fn.qtip.cache.screen.scroll.top),bottom:(adjustedPosition.top+tooltip.dimensions.height+2>=$.fn.qtip.cache.screen.height+$.fn.qtip.cache.screen.scroll.top)};adjust={left:(overflow.left&&(tooltip.corner.search(/right/i)!=-1||(tooltip.corner.search(/right/i)==-1&&!overflow.right))),right:(overflow.right&&(tooltip.corner.search(/left/i)!=-1||(tooltip.corner.search(/left/i)==-1&&!overflow.left))),top:(overflow.top&&tooltip.corner.search(/top/i)==-1),bottom:(overflow.bottom&&tooltip.corner.search(/bottom/i)==-1)};if(adjust.left)
{if(self.options.position.target!=='mouse')
adjustedPosition.left=target.position.left+target.dimensions.width;else
adjustedPosition.left=self.cache.mouse.x
newCorner.x='Left';}
else if(adjust.right)
{if(self.options.position.target!=='mouse')
adjustedPosition.left=target.position.left-tooltip.dimensions.width;else
adjustedPosition.left=self.cache.mouse.x-tooltip.dimensions.width;newCorner.x='Right';};if(adjust.top)
{if(self.options.position.target!=='mouse')
adjustedPosition.top=target.position.top+target.dimensions.height;else
adjustedPosition.top=self.cache.mouse.y
newCorner.y='top';}
else if(adjust.bottom)
{if(self.options.position.target!=='mouse')
adjustedPosition.top=target.position.top-tooltip.dimensions.height;else
adjustedPosition.top=self.cache.mouse.y-tooltip.dimensions.height;newCorner.y='bottom';};if(adjustedPosition.left<0)
{adjustedPosition.left=position.left;newCorner.x=false;};if(adjustedPosition.top<0)
{adjustedPosition.top=position.top;newCorner.y=false;};if(self.options.style.tip.corner!==false)
{adjustedPosition.corner=new String(tooltip.corner);if(newCorner.x!==false)adjustedPosition.corner=adjustedPosition.corner.replace(/Left|Right|Middle/,newCorner.x);if(newCorner.y!==false)adjustedPosition.corner=adjustedPosition.corner.replace(/top|bottom/,newCorner.y);if(adjustedPosition.corner!==self.elements.tip.attr('rel'))
createTip.call(self,adjustedPosition.corner);};return adjustedPosition;};function jQueryStyle(style,sub)
{var styleObj,i;styleObj=$.extend(true,{},style);for(i in styleObj)
{if(sub===true&&i.search(/(tip|classes)/i)!==-1)
delete styleObj[i];else if(!sub&&i.search(/(width|border|tip|title|classes|user)/i)!==-1)
delete styleObj[i];};return styleObj;};function sanitizeStyle(style)
{if(typeof style.tip!=='object')style.tip={corner:style.tip};if(typeof style.tip.size!=='object')style.tip.size={width:style.tip.size,height:style.tip.size};if(typeof style.border!=='object')style.border={width:style.border};if(typeof style.width!=='object')style.width={value:style.width};if(typeof style.width.max=='string')style.width.max=parseInt(style.width.max.replace(/([0-9]+)/i,"$1"));if(typeof style.width.min=='string')style.width.min=parseInt(style.width.min.replace(/([0-9]+)/i,"$1"));if(typeof style.tip.size.x=='number')
{style.tip.size.width=style.tip.size.x;delete style.tip.size.x;};if(typeof style.tip.size.y=='number')
{style.tip.size.height=style.tip.size.y;delete style.tip.size.y;};return style;};function buildStyle()
{var self,i,styleArray,styleExtend,finalStyle,ieAdjust;self=this;styleArray=[true,{}];for(i=0;i<arguments.length;i++)
styleArray.push(arguments[i]);styleExtend=[$.extend.apply($,styleArray)];while(typeof styleExtend[0].name=='string')
{styleExtend.unshift(sanitizeStyle($.fn.qtip.styles[styleExtend[0].name]));};styleExtend.unshift(true,{classes:{tooltip:'qtip-'+(arguments[0].name||'defaults')}},$.fn.qtip.styles.defaults);finalStyle=$.extend.apply($,styleExtend);ieAdjust=($.browser.msie)?1:0;finalStyle.tip.size.width+=ieAdjust;finalStyle.tip.size.height+=ieAdjust;if(finalStyle.tip.size.width%2>0)finalStyle.tip.size.width+=1;if(finalStyle.tip.size.height%2>0)finalStyle.tip.size.height+=1;if(finalStyle.tip.corner===true)
finalStyle.tip.corner=(self.options.position.corner.tooltip==='center')?false:self.options.position.corner.tooltip;return finalStyle;};function calculateTip(corner,width,height)
{var tips={bottomRight:[[0,0],[width,height],[width,0]],bottomLeft:[[0,0],[width,0],[0,height]],topRight:[[0,height],[width,0],[width,height]],topLeft:[[0,0],[0,height],[width,height]],topMiddle:[[0,height],[width/2,0],[width,height]],bottomMiddle:[[0,0],[width,0],[width/2,height]],rightMiddle:[[0,0],[width,height/2],[0,height]],leftMiddle:[[width,0],[width,height],[0,height/2]]};tips.leftTop=tips.bottomRight;tips.rightTop=tips.bottomLeft;tips.leftBottom=tips.topRight;tips.rightBottom=tips.topLeft;return tips[corner];};function calculateBorders(radius)
{var borders;if($('<canvas>').get(0).getContext)
{borders={topLeft:[radius,radius],topRight:[0,radius],bottomLeft:[radius,0],bottomRight:[0,0]};}
else if($.browser.msie)
{borders={topLeft:[-90,90,0],topRight:[-90,90,-radius],bottomLeft:[90,270,0],bottomRight:[90,270,-radius]};};return borders;};function bgiframe()
{var self,html,dimensions;self=this;dimensions=self.getDimensions();html='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" '+'style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; '+'height:'+dimensions.height+'px; width:'+dimensions.width+'px" />';self.elements.bgiframe=self.elements.wrapper.prepend(html).children('.qtip-bgiframe:first');};$(document).ready(function()
{$.fn.qtip.cache={screen:{scroll:{left:$(window).scrollLeft(),top:$(window).scrollTop()},width:$(window).width(),height:$(window).height()}};var adjustTimer;$(window).bind('resize scroll',function(event)
{clearTimeout(adjustTimer);adjustTimer=setTimeout(function()
{if(event.type==='scroll')
$.fn.qtip.cache.screen.scroll={left:$(window).scrollLeft(),top:$(window).scrollTop()};else
{$.fn.qtip.cache.screen.width=$(window).width();$.fn.qtip.cache.screen.height=$(window).height();};for(i=0;i<$.fn.qtip.interfaces.length;i++)
{var api=$.fn.qtip.interfaces[i];if(api.status.rendered===true&&(api.options.position.type!=='static'||api.options.position.adjust.scroll&&event.type==='scroll'||api.options.position.adjust.resize&&event.type==='resize'))
{api.updatePosition(event,true);}};},100);})
$(document).bind('mousedown.qtip',function(event)
{if($(event.target).parents('div.qtip').length===0)
{$('.qtip[unfocus]').each(function()
{var api=$(this).qtip("api");if($(this).is(':visible')&&!api.status.disabled&&$(event.target).add(api.elements.target).length>1)
api.hide(event);})};})});$.fn.qtip.interfaces=[]
$.fn.qtip.log={error:function(){return this;}};$.fn.qtip.constants={};$.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:'bottomRight',tooltip:'topLeft'},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:'absolute',container:false},show:{when:{target:false,event:'mouseover'},effect:{type:'fade',length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:'mouseout'},effect:{type:'fade',length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};$.fn.qtip.styles={defaults:{background:'white',color:'#111',overflow:'hidden',textAlign:'left',width:{min:0,max:250},padding:'5px 9px',border:{width:1,radius:0,color:'#d3d3d3'},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:'#e1e1e1',fontWeight:'bold',padding:'7px 12px'},button:{cursor:'pointer'},classes:{target:'',tip:'qtip-tip',title:'qtip-title',button:'qtip-button',content:'qtip-content',active:'qtip-active'}},cream:{border:{width:3,radius:0,color:'#F9E98E'},title:{background:'#F0DE7D',color:'#A27D35'},background:'#FBF7AA',color:'#A27D35',classes:{tooltip:'qtip-cream'}},light:{border:{width:3,radius:0,color:'#E2E2E2'},title:{background:'#f1f1f1',color:'#454545'},background:'white',color:'#454545',classes:{tooltip:'qtip-light'}},dark:{border:{width:3,radius:0,color:'#303030'},title:{background:'#404040',color:'#f3f3f3'},background:'#505050',color:'#f3f3f3',classes:{tooltip:'qtip-dark'}},red:{border:{width:3,radius:0,color:'#CE6F6F'},title:{background:'#f28279',color:'#9C2F2F'},background:'#F79992',color:'#9C2F2F',classes:{tooltip:'qtip-red'}},green:{border:{width:3,radius:0,color:'#A9DB66'},title:{background:'#b9db8c',color:'#58792E'},background:'#CDE6AC',color:'#58792E',classes:{tooltip:'qtip-green'}},blue:{border:{width:3,radius:0,color:'#ADD9ED'},title:{background:'#D0E9F5',color:'#5E99BD'},background:'#E5F6FE',color:'#4D9FBF',classes:{tooltip:'qtip-blue'}}};})(jQuery);jQuery.fn.selectbox=function(options){var settings={className:'jquery-selectbox',animationSpeed:"normal",listboxMaxSize:10,replaceInvisible:false};var commonClass='jquery-custom-selectboxes-replaced';var listOpen=false;var showList=function(listObj){var selectbox=listObj.parents('.'+settings.className+'');listObj.slideDown(settings.animationSpeed,function(){listOpen=true;});selectbox.addClass('selecthover');jQuery(document).bind('click',onBlurList);return listObj;}
var hideList=function(listObj){var selectbox=listObj.parents('.'+settings.className+'');listObj.slideUp(settings.animationSpeed,function(){listOpen=false;jQuery(this).parents('.'+settings.className+'').removeClass('selecthover');});jQuery(document).unbind('click',onBlurList);return listObj;}
var onBlurList=function(e){var trgt=e.target;var currentListElements=jQuery('.'+settings.className+'-list:visible').parent().find('*').andSelf();if(jQuery.inArray(trgt,currentListElements)<0&&listOpen){hideList(jQuery('.'+commonClass+'-list'));}
return false;}
settings=jQuery.extend(settings,options||{});return this.each(function(){var _this=jQuery(this);if(_this.filter(':visible').length==0&&!settings.replaceInvisible)
return;var replacement=jQuery('<div class="'+settings.className+' '+commonClass+'">'+'<div class="'+settings.className+'-moreButton" />'+'<div class="'+settings.className+'-list '+commonClass+'-list" />'+'<span class="'+settings.className+'-currentItem" />'+'</div>');jQuery('option',_this).each(function(k,v){var v=jQuery(v);var listElement=jQuery('<span class="'+settings.className+'-item value-'+v.val()+' item-'+k+'">'+v.text()+'</span>');listElement.click(function(){var thisListElement=jQuery(this);var thisReplacment=thisListElement.parents('.'+settings.className);var thisIndex=thisListElement[0].className.split(' ');for(k1 in thisIndex){if(/^item-[0-9]+$/.test(thisIndex[k1])){thisIndex=parseInt(thisIndex[k1].replace('item-',''),10);break;}};var thisValue=thisListElement[0].className.split(' ');for(k1 in thisValue){if(/^value-.+$/.test(thisValue[k1])){thisValue=thisValue[k1].replace('value-','');break;}};thisReplacment.find('.'+settings.className+'-currentItem').text(thisListElement.text());thisReplacment.find('select').val(thisValue).triggerHandler('change');var thisSublist=thisReplacment.find('.'+settings.className+'-list');if(thisSublist.filter(":visible").length>0){hideList(thisSublist);}else{showList(thisSublist);}}).bind('mouseenter',function(){jQuery(this).addClass('listelementhover');}).bind('mouseleave',function(){jQuery(this).removeClass('listelementhover');});jQuery('.'+settings.className+'-list',replacement).append(listElement);if(v.filter(':selected').length>0){jQuery('.'+settings.className+'-currentItem',replacement).text(v.text());}});replacement.find('.'+settings.className+'-moreButton').click(function(){var thisMoreButton=jQuery(this);var otherLists=jQuery('.'+settings.className+'-list').not(thisMoreButton.siblings('.'+settings.className+'-list'));hideList(otherLists);var thisList=thisMoreButton.siblings('.'+settings.className+'-list');if(thisList.filter(":visible").length>0){hideList(thisList);}else{showList(thisList);}}).bind('mouseenter',function(){jQuery(this).addClass('morebuttonhover');}).bind('mouseleave',function(){jQuery(this).removeClass('morebuttonhover');});_this.hide().replaceWith(replacement).appendTo(replacement);var thisListBox=replacement.find('.'+settings.className+'-list');var thisListBoxSize=thisListBox.find('.'+settings.className+'-item').length;if(thisListBoxSize>settings.listboxMaxSize)
thisListBoxSize=settings.listboxMaxSize;if(thisListBoxSize==0)
thisListBoxSize=1;var thisListBoxWidth=Math.round(_this.width()+5);if(jQuery.browser.safari)
thisListBoxWidth=thisListBoxWidth*0.94;replacement.css('width',thisListBoxWidth+'px');thisListBox.css({width:Math.round(thisListBoxWidth-5)+'px',height:thisListBoxSize+'em'});});};jQuery.fn.unselectbox=function(){var commonClass='jquery-custom-selectboxes-replaced';return this.each(function(){var selectToRemove=jQuery(this).filter('.'+commonClass);selectToRemove.replaceWith(selectToRemove.find('select').show());});};(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}
this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}
function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}
var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}
if(!p){p=detectParserForColumn(table,cells[i]);}
if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}
list.push(p);}}
if(table.config.debug){log(parsersDebug);}
return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}
return parsers[0];}
function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}
return false;}
function buildCache(table){if(table.config.debug){var cacheTime=new Date();}
var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}
cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}
return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}
return t;}
function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}
var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}
if(table.config.appender){table.config.appender(table,rows);}
rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}
applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}
var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}
table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}
return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}
return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}
function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}
function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}
function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}
return i;}
function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}
return false;}
function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}
function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}
function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}
function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}
var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}
var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}
dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}
return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}
config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}
if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}
applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}
if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}
empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}
return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}
return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}
$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);﻿
(function($){function Datepicker(){this._defaults={pickerClass:'',showOnFocus:true,showTrigger:null,showAnim:'show',showOptions:{},showSpeed:'normal',popupContainer:null,alignment:'bottom',fixedWeeks:false,firstDay:0,calculateWeek:this.iso8601Week,monthsToShow:1,monthsOffset:0,monthsToStep:1,monthsToJump:12,useMouseWheel:true,changeMonth:true,yearRange:'c-10:c+10',shortYearCutoff:'+10',showOtherMonths:false,selectOtherMonths:false,defaultDate:null,selectDefaultDate:false,minDate:null,maxDate:null,dateFormat:'yyyy-mm-dd',autoSize:false,rangeSelect:false,rangeSeparator:' - ',multiSelect:0,multiSeparator:',',onDate:null,onShow:null,onChangeMonthYear:null,onSelect:null,onClose:null,altField:null,altFormat:'yyyy-mm-dd',constrainInput:true,commandsAsDateFormat:false,commands:this.commands};this.regional={'':{monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],dateFormat:'mm/dd/yyyy',firstDay:0,renderer:this.defaultRenderer,prevText:'&lt;Prev',prevStatus:'Show the previous month',prevJumpText:'&lt;&lt;',prevJumpStatus:'Show the previous year',nextText:'Next&gt;',nextStatus:'Show the next month',nextJumpText:'&gt;&gt;',nextJumpStatus:'Show the next year',currentText:'Current',currentStatus:'Show the current month',todayText:'Today',todayStatus:'Show today\'s month',clearText:'Clear',clearStatus:'Clear all the dates',closeText:'Close',closeStatus:'Close the datepicker',yearStatus:'Change the year',monthStatus:'Change the month',weekText:'Wk',weekStatus:'Week of the year',dayStatus:'Select DD, M d, yyyy',defaultStatus:'Select a date',isRTL:false}};$.extend(this._defaults,this.regional['']);this._disabled=[];}
$.extend(Datepicker.prototype,{dataName:'datepick',markerClass:'hasDatepick',_popupClass:'datepick-popup',_triggerClass:'datepick-trigger',_disableClass:'datepick-disable',_coverClass:'datepick-cover',_monthYearClass:'datepick-month-year',_curMonthClass:'datepick-month-',_anyYearClass:'datepick-any-year',_curDoWClass:'datepick-dow-',commands:{prev:{text:'prevText',status:'prevStatus',keystroke:{keyCode:33},enabled:function(inst){var minDate=inst.curMinDate();return(!minDate||$.datepick.add($.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate),1-inst.get('monthsToStep')-inst.get('monthsOffset'),'m'),1),-1,'d').getTime()>=minDate.getTime());},date:function(inst){return $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate),-inst.get('monthsToStep')-inst.get('monthsOffset'),'m'),1);},action:function(inst){$.datepick.changeMonth(this,-inst.get('monthsToStep'));}},prevJump:{text:'prevJumpText',status:'prevJumpStatus',keystroke:{keyCode:33,ctrlKey:true},enabled:function(inst){var minDate=inst.curMinDate();return(!minDate||$.datepick.add($.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate),1-inst.get('monthsToJump')-inst.get('monthsOffset'),'m'),1),-1,'d').getTime()>=minDate.getTime());},date:function(inst){return $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate),-inst.get('monthsToJump')-inst.get('monthsOffset'),'m'),1);},action:function(inst){$.datepick.changeMonth(this,-inst.get('monthsToJump'));}},next:{text:'nextText',status:'nextStatus',keystroke:{keyCode:34},enabled:function(inst){var maxDate=inst.get('maxDate');return(!maxDate||$.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate),inst.get('monthsToStep')-inst.get('monthsOffset'),'m'),1).getTime()<=maxDate.getTime());},date:function(inst){return $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate),inst.get('monthsToStep')-inst.get('monthsOffset'),'m'),1);},action:function(inst){$.datepick.changeMonth(this,inst.get('monthsToStep'));}},nextJump:{text:'nextJumpText',status:'nextJumpStatus',keystroke:{keyCode:34,ctrlKey:true},enabled:function(inst){var maxDate=inst.get('maxDate');return(!maxDate||$.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate),inst.get('monthsToJump')-inst.get('monthsOffset'),'m'),1).getTime()<=maxDate.getTime());},date:function(inst){return $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate),inst.get('monthsToJump')-inst.get('monthsOffset'),'m'),1);},action:function(inst){$.datepick.changeMonth(this,inst.get('monthsToJump'));}},current:{text:'currentText',status:'currentStatus',keystroke:{keyCode:36,ctrlKey:true},enabled:function(inst){var minDate=inst.curMinDate();var maxDate=inst.get('maxDate');var curDate=inst.selectedDates[0]||$.datepick.today();return(!minDate||curDate.getTime()>=minDate.getTime())&&(!maxDate||curDate.getTime()<=maxDate.getTime());},date:function(inst){return inst.selectedDates[0]||$.datepick.today();},action:function(inst){var curDate=inst.selectedDates[0]||$.datepick.today();$.datepick.showMonth(this,curDate.getFullYear(),curDate.getMonth()+1);}},today:{text:'todayText',status:'todayStatus',keystroke:{keyCode:36,ctrlKey:true},enabled:function(inst){var minDate=inst.curMinDate();var maxDate=inst.get('maxDate');return(!minDate||$.datepick.today().getTime()>=minDate.getTime())&&(!maxDate||$.datepick.today().getTime()<=maxDate.getTime());},date:function(inst){return $.datepick.today();},action:function(inst){$.datepick.showMonth(this);}},clear:{text:'clearText',status:'clearStatus',keystroke:{keyCode:35,ctrlKey:true},enabled:function(inst){return true;},date:function(inst){return null;},action:function(inst){$.datepick.clear(this);}},close:{text:'closeText',status:'closeStatus',keystroke:{keyCode:27},enabled:function(inst){return true;},date:function(inst){return null;},action:function(inst){$.datepick.hide(this);}},prevWeek:{text:'prevWeekText',status:'prevWeekStatus',keystroke:{keyCode:38,ctrlKey:true},enabled:function(inst){var minDate=inst.curMinDate();return(!minDate||$.datepick.add($.datepick.newDate(inst.drawDate),-7,'d').getTime()>=minDate.getTime());},date:function(inst){return $.datepick.add($.datepick.newDate(inst.drawDate),-7,'d');},action:function(inst){$.datepick.changeDay(this,-7);}},prevDay:{text:'prevDayText',status:'prevDayStatus',keystroke:{keyCode:37,ctrlKey:true},enabled:function(inst){var minDate=inst.curMinDate();return(!minDate||$.datepick.add($.datepick.newDate(inst.drawDate),-1,'d').getTime()>=minDate.getTime());},date:function(inst){return $.datepick.add($.datepick.newDate(inst.drawDate),-1,'d');},action:function(inst){$.datepick.changeDay(this,-1);}},nextDay:{text:'nextDayText',status:'nextDayStatus',keystroke:{keyCode:39,ctrlKey:true},enabled:function(inst){var maxDate=inst.get('maxDate');return(!maxDate||$.datepick.add($.datepick.newDate(inst.drawDate),1,'d').getTime()<=maxDate.getTime());},date:function(inst){return $.datepick.add($.datepick.newDate(inst.drawDate),1,'d');},action:function(inst){$.datepick.changeDay(this,1);}},nextWeek:{text:'nextWeekText',status:'nextWeekStatus',keystroke:{keyCode:40,ctrlKey:true},enabled:function(inst){var maxDate=inst.get('maxDate');return(!maxDate||$.datepick.add($.datepick.newDate(inst.drawDate),7,'d').getTime()<=maxDate.getTime());},date:function(inst){return $.datepick.add($.datepick.newDate(inst.drawDate),7,'d');},action:function(inst){$.datepick.changeDay(this,7);}}},defaultRenderer:{picker:'<div class="datepick">'+'<div class="datepick-nav">{link:prev}{link:today}{link:next}</div>{months}'+'{popup:start}<div class="datepick-ctrl">{link:clear}{link:close}</div>{popup:end}'+'<div class="datepick-clear-fix"></div></div>',monthRow:'<div class="datepick-month-row">{months}</div>',month:'<div class="datepick-month"><div class="datepick-month-header">{monthHeader}</div>'+'<table><thead>{weekHeader}</thead><tbody>{weeks}</tbody></table></div>',weekHeader:'<tr>{days}</tr>',dayHeader:'<th>{day}</th>',week:'<tr>{days}</tr>',day:'<td>{day}</td>',monthSelector:'.datepick-month',daySelector:'td',rtlClass:'datepick-rtl',multiClass:'datepick-multi',defaultClass:'',selectedClass:'datepick-selected',highlightedClass:'datepick-highlight',todayClass:'datepick-today',otherMonthClass:'datepick-other-month',weekendClass:'datepick-weekend',commandClass:'datepick-cmd',commandButtonClass:'',commandLinkClass:'',disabledClass:'datepick-disabled'},setDefaults:function(settings){$.extend(this._defaults,settings||{});return this;},_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+
Math.floor(1970/400))*24*60*60*10000000),_msPerDay:24*60*60*1000,ATOM:'yyyy-mm-dd',COOKIE:'D, dd M yyyy',FULL:'DD, MM d, yyyy',ISO_8601:'yyyy-mm-dd',JULIAN:'J',RFC_822:'D, d M yy',RFC_850:'DD, dd-M-yy',RFC_1036:'D, d M yy',RFC_1123:'D, d M yyyy',RFC_2822:'D, d M yyyy',RSS:'D, d M yy',TICKS:'!',TIMESTAMP:'@',W3C:'yyyy-mm-dd',formatDate:function(format,date,settings){if(typeof format!='string'){settings=date;date=format;format='';}
if(!date){return'';}
format=format||this._defaults.dateFormat;settings=settings||{};var dayNamesShort=settings.dayNamesShort||this._defaults.dayNamesShort;var dayNames=settings.dayNames||this._defaults.dayNames;var monthNamesShort=settings.monthNamesShort||this._defaults.monthNamesShort;var monthNames=settings.monthNames||this._defaults.monthNames;var calculateWeek=settings.calculateWeek||this._defaults.calculateWeek;var doubled=function(match,step){var matches=1;while(iFormat+matches<format.length&&format.charAt(iFormat+matches)==match){matches++;}
iFormat+=matches-1;return Math.floor(matches/(step||1))>1;};var formatNumber=function(match,value,len,step){var num=''+value;if(doubled(match,step)){while(num.length<len){num='0'+num;}}
return num;};var formatName=function(match,value,shortNames,longNames){return(doubled(match)?longNames[value]:shortNames[value]);};var output='';var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!doubled("'")){literal=false;}
else{output+=format.charAt(iFormat);}}
else{switch(format.charAt(iFormat)){case'd':output+=formatNumber('d',date.getDate(),2);break;case'D':output+=formatName('D',date.getDay(),dayNamesShort,dayNames);break;case'o':output+=formatNumber('o',this.dayOfYear(date),3);break;case'w':output+=formatNumber('w',calculateWeek(date),2);break;case'm':output+=formatNumber('m',date.getMonth()+1,2);break;case'M':output+=formatName('M',date.getMonth(),monthNamesShort,monthNames);break;case'y':output+=(doubled('y',2)?date.getFullYear():(date.getFullYear()%100<10?'0':'')+date.getFullYear()%100);break;case'@':output+=Math.floor(date.getTime()/1000);break;case'!':output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(doubled("'")){output+="'";}
else{literal=true;}
break;default:output+=format.charAt(iFormat);}}}
return output;},parseDate:function(format,value,settings){if(value==null){throw'Invalid arguments';}
value=(typeof value=='object'?value.toString():value+'');if(value==''){return null;}
format=format||this._defaults.dateFormat;settings=settings||{};var shortYearCutoff=settings.shortYearCutoff||this._defaults.shortYearCutoff;shortYearCutoff=(typeof shortYearCutoff!='string'?shortYearCutoff:this.today().getFullYear()%100+parseInt(shortYearCutoff,10));var dayNamesShort=settings.dayNamesShort||this._defaults.dayNamesShort;var dayNames=settings.dayNames||this._defaults.dayNames;var monthNamesShort=settings.monthNamesShort||this._defaults.monthNamesShort;var monthNames=settings.monthNames||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var shortYear=false;var literal=false;var doubled=function(match,step){var matches=1;while(iFormat+matches<format.length&&format.charAt(iFormat+matches)==match){matches++;}
iFormat+=matches-1;return Math.floor(matches/(step||1))>1;};var getNumber=function(match,step){doubled(match,step);var size=[2,3,4,11,20]['oy@!'.indexOf(match)+1];var digits=new RegExp('^-?\\d{1,'+size+'}');var num=value.substring(iValue).match(digits);if(!num){throw'Missing number at position {0}'.replace(/\{0\}/,iValue);}
iValue+=num[0].length;return parseInt(num[0],10);};var getName=function(match,shortNames,longNames,step){var names=(doubled(match,step)?longNames:shortNames);for(var i=0;i<names.length;i++){if(value.substr(iValue,names[i].length)==names[i]){iValue+=names[i].length;return i+1;}}
throw'Unknown name at position {0}'.replace(/\{0\}/,iValue);};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw'Unexpected literal at position {0}'.replace(/\{0\}/,iValue);}
iValue++;};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!doubled("'")){literal=false;}
else{checkLiteral();}}
else{switch(format.charAt(iFormat)){case'd':day=getNumber('d');break;case'D':getName('D',dayNamesShort,dayNames);break;case'o':doy=getNumber('o');break;case'w':getNumber('w');break;case'm':month=getNumber('m');break;case'M':month=getName('M',monthNamesShort,monthNames);break;case'y':var iSave=iFormat;shortYear=!doubled('y',2);iFormat=iSave;year=getNumber('y',2);break;case'@':var date=this._normaliseDate(new Date(getNumber('@')*1000));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case'!':var date=this._normaliseDate(new Date((getNumber('!')-this._ticksTo1970)/10000));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case'*':iValue=value.length;break;case"'":if(doubled("'")){checkLiteral();}
else{literal=true;}
break;default:checkLiteral();}}}
if(iValue<value.length){throw'Additional text found at end';}
if(year==-1){year=this.today().getFullYear();}
else if(year<100&&shortYear){year+=(shortYearCutoff==-1?1900:this.today().getFullYear()-
this.today().getFullYear()%100-(year<=shortYearCutoff?0:100));}
if(doy>-1){month=1;day=doy;for(var dim=this.daysInMonth(year,month);day>dim;dim=this.daysInMonth(year,month)){month++;day-=dim;}}
var date=this.newDate(year,month,day);if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw'Invalid date';}
return date;},determineDate:function(dateSpec,defaultDate,currentDate,dateFormat,settings){if(currentDate&&typeof currentDate!='object'){settings=dateFormat;dateFormat=currentDate;currentDate=null;}
if(typeof dateFormat!='string'){settings=dateFormat;dateFormat='';}
var offsetString=function(offset){try{return $.datepick.parseDate(dateFormat,offset,settings);}
catch(e){}
offset=offset.toLowerCase();var date=(offset.match(/^c/)&&currentDate?$.datepick.newDate(currentDate):null)||$.datepick.today();var pattern=/([+-]?[0-9]+)\s*(d|w|m|y)?/g;var matches=pattern.exec(offset);while(matches){date=$.datepick.add(date,parseInt(matches[1],10),matches[2]||'d');matches=pattern.exec(offset);}
return date;};defaultDate=(defaultDate?$.datepick.newDate(defaultDate):null);dateSpec=(dateSpec==null?defaultDate:(typeof dateSpec=='string'?offsetString(dateSpec):(typeof dateSpec=='number'?(isNaN(dateSpec)||dateSpec==Infinity||dateSpec==-Infinity?defaultDate:$.datepick.add($.datepick.today(),dateSpec,'d')):$.datepick._normaliseDate(dateSpec))));return dateSpec;},daysInMonth:function(year,month){month=(year.getFullYear?year.getMonth()+1:month);year=(year.getFullYear?year.getFullYear():year);return this.newDate(year,month+1,0).getDate();},dayOfYear:function(year,month,day){var date=(year.getFullYear?year:this.newDate(year,month,day));var newYear=this.newDate(date.getFullYear(),1,1);return Math.floor((date.getTime()-newYear.getTime())/this._msPerDay)+1;},iso8601Week:function(year,month,day){var checkDate=(year.getFullYear?new Date(year.getTime()):this.newDate(year,month,day));checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));var time=checkDate.getTime();checkDate.setMonth(0,1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1;},today:function(){return this._normaliseDate(new Date());},newDate:function(year,month,day){return(!year?null:(year.getFullYear?this._normaliseDate(new Date(year.getTime())):new Date(year,month-1,day,12)));},_normaliseDate:function(date){if(date){date.setHours(12,0,0,0);}
return date;},year:function(date,year){date.setFullYear(year);return this._normaliseDate(date);},month:function(date,month){date.setMonth(month-1);return this._normaliseDate(date);},day:function(date,day){date.setDate(day);return this._normaliseDate(date);},add:function(date,amount,period){if(period=='d'||period=='w'){this._normaliseDate(date);date.setDate(date.getDate()+amount*(period=='w'?7:1));}
else{var year=date.getFullYear()+(period=='y'?amount:0);var month=date.getMonth()+(period=='m'?amount:0);date.setTime($.datepick.newDate(year,month+1,Math.min(date.getDate(),this.daysInMonth(year,month+1))).getTime());}
return date;},_attachPicker:function(target,settings){target=$(target);if(target.hasClass(this.markerClass)){return;}
target.addClass(this.markerClass);var inst={target:target,selectedDates:[],drawDate:null,pickingRange:false,inline:($.inArray(target[0].nodeName.toLowerCase(),['div','span'])>-1),get:function(name){var value=this.settings[name]!==undefined?this.settings[name]:$.datepick._defaults[name];if($.inArray(name,['defaultDate','minDate','maxDate'])>-1){value=$.datepick.determineDate(value,null,this.selectedDates[0],this.get('dateFormat'),inst.getConfig());}
return value;},curMinDate:function(){return(this.pickingRange?this.selectedDates[0]:this.get('minDate'));},getConfig:function(){return{dayNamesShort:this.get('dayNamesShort'),dayNames:this.get('dayNames'),monthNamesShort:this.get('monthNamesShort'),monthNames:this.get('monthNames'),calculateWeek:this.get('calculateWeek'),shortYearCutoff:this.get('shortYearCutoff')};}};$.data(target[0],this.dataName,inst);var inlineSettings=($.fn.metadata?target.metadata():{});inst.settings=$.extend({},settings||{},inlineSettings||{});if(inst.inline){this._update(target[0]);if($.fn.mousewheel){target.mousewheel(this._doMouseWheel);}}
else{this._attachments(target,inst);target.bind('keydown.'+this.dataName,this._keyDown).bind('keypress.'+this.dataName,this._keyPress).bind('keyup.'+this.dataName,this._keyUp);if(target.attr('disabled')){this.disable(target[0]);}}},options:function(target,name){var inst=$.data(target,this.dataName);return(inst?(name?(name=='all'?inst.settings:inst.settings[name]):$.datepick._defaults):{});},option:function(target,settings,value){target=$(target);if(!target.hasClass(this.markerClass)){return;}
settings=settings||{};if(typeof settings=='string'){var name=settings;settings={};settings[name]=value;}
var inst=$.data(target[0],this.dataName);var dates=inst.selectedDates;extendRemove(inst.settings,settings);this.setDate(target[0],dates,null,false,true);inst.pickingRange=false;inst.drawDate=$.datepick.newDate(this._checkMinMax((settings.defaultDate?inst.get('defaultDate'):inst.drawDate)||inst.get('defaultDate')||$.datepick.today(),inst));if(!inst.inline){this._attachments(target,inst);}
if(inst.inline||inst.div){this._update(target[0]);}},_attachments:function(target,inst){target.unbind('focus.'+this.dataName);if(inst.get('showOnFocus')){target.bind('focus.'+this.dataName,this.show);}
if(inst.trigger){inst.trigger.remove();}
var trigger=inst.get('showTrigger');inst.trigger=(!trigger?$([]):$(trigger).clone().removeAttr('id').addClass(this._triggerClass)
[inst.get('isRTL')?'insertBefore':'insertAfter'](target).live('click',function(){if(!$.datepick.isDisabled(target[0])){$.datepick[$.datepick.curInst==inst?'hide':'show'](target[0]);}}));this._autoSize(target,inst);var dates=this._extractDates(inst,target.val());if(dates){this.setDate(target[0],dates,null,true);}
if(inst.get('selectDefaultDate')&&inst.get('defaultDate')&&inst.selectedDates.length==0){this.setDate(target[0],$.datepick.newDate(inst.get('defaultDate')||$.datepick.today()));}},_autoSize:function(target,inst){if(inst.get('autoSize')&&!inst.inline){var date=$.datepick.newDate(2009,10,20);var dateFormat=inst.get('dateFormat');if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;for(var i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i;}}
return maxI;};date.setMonth(findMax(inst.get(dateFormat.match(/MM/)?'monthNames':'monthNamesShort')));date.setDate(findMax(inst.get(dateFormat.match(/DD/)?'dayNames':'dayNamesShort'))+20-date.getDay());}
inst.target.attr('size',$.datepick.formatDate(dateFormat,date,inst.getConfig()).length);}},destroy:function(target){target=$(target);if(!target.hasClass(this.markerClass)){return;}
var inst=$.data(target[0],this.dataName);if(inst.trigger){inst.trigger.remove();}
target.removeClass(this.markerClass).empty().unbind('.'+this.dataName);if(inst.inline&&$.fn.mousewheel){target.unmousewheel();}
if(!inst.inline&&inst.get('autoSize')){target.removeAttr('size');}
$.removeData(target[0],this.dataName);},multipleEvents:function(fns){var funcs=arguments;return function(args){for(var i=0;i<funcs.length;i++){funcs[i].apply(this,arguments);}};},enable:function(target){var $target=$(target);if(!$target.hasClass(this.markerClass)){return;}
var inst=$.data(target,this.dataName);if(inst.inline)
$target.children('.'+this._disableClass).remove().end().find('button,select').attr('disabled','').end().find('a').attr('href','javascript:void(0)');else{target.disabled=false;inst.trigger.filter('button.'+this._triggerClass).attr('disabled','').end().filter('img.'+this._triggerClass).css({opacity:'1.0',cursor:''});}
this._disabled=$.map(this._disabled,function(value){return(value==target?null:value);});},disable:function(target){var $target=$(target);if(!$target.hasClass(this.markerClass))
return;var inst=$.data(target,this.dataName);if(inst.inline){var inline=$target.children(':last');var offset=inline.offset();var relOffset={left:0,top:0};inline.parents().each(function(){if($(this).css('position')=='relative'){relOffset=$(this).offset();return false;}});var zIndex=$target.css('zIndex');zIndex=(zIndex=='auto'?0:parseInt(zIndex,10))+1;$target.prepend('<div class="'+this._disableClass+'" style="'+'width: '+inline.outerWidth()+'px; height: '+inline.outerHeight()+'px; left: '+(offset.left-relOffset.left)+'px; top: '+
(offset.top-relOffset.top)+'px; z-index: '+zIndex+'"></div>').find('button,select').attr('disabled','disabled').end().find('a').removeAttr('href');}
else{target.disabled=true;inst.trigger.filter('button.'+this._triggerClass).attr('disabled','disabled').end().filter('img.'+this._triggerClass).css({opacity:'0.5',cursor:'default'});}
this._disabled=$.map(this._disabled,function(value){return(value==target?null:value);});this._disabled.push(target);},isDisabled:function(target){return(target&&$.inArray(target,this._disabled)>-1);},show:function(target){target=target.target||target;var inst=$.data(target,$.datepick.dataName);if($.datepick.curInst==inst){return;}
if($.datepick.curInst){$.datepick.hide($.datepick.curInst,true);}
if(inst){inst.lastVal=null;inst.selectedDates=$.datepick._extractDates(inst,$(target).val());inst.pickingRange=false;inst.drawDate=$.datepick._checkMinMax($.datepick.newDate(inst.selectedDates[0]||inst.get('defaultDate')||$.datepick.today()),inst);inst.prevDate=$.datepick.newDate(inst.drawDate);$.datepick.curInst=inst;$.datepick._update(target,true);var offset=$.datepick._checkOffset(inst);inst.div.css({left:offset.left,top:offset.top});var showAnim=inst.get('showAnim');var showSpeed=inst.get('showSpeed');showSpeed=(showSpeed=='normal'&&$.ui&&$.ui.version>='1.8'?'_default':showSpeed);var postProcess=function(){var borders=$.datepick._getBorders(inst.div);inst.div.find('.'+$.datepick._coverClass).css({left:-borders[0],top:-borders[1],width:inst.div.outerWidth()+borders[0],height:inst.div.outerHeight()+borders[1]});};if($.effects&&$.effects[showAnim]){var data=inst.div.data();for(var key in data){if(key.match(/^ec\.storage\./)){data[key]=inst._mainDiv.css(key.replace(/ec\.storage\./,''));}}
inst.div.data(data).show(showAnim,inst.get('showOptions'),showSpeed,postProcess);}
else{inst.div[showAnim||'show']((showAnim?showSpeed:''),postProcess);}
if(!showAnim){postProcess();}}},_extractDates:function(inst,datesText){if(datesText==inst.lastVal){return;}
inst.lastVal=datesText;var dateFormat=inst.get('dateFormat');var multiSelect=inst.get('multiSelect');var rangeSelect=inst.get('rangeSelect');datesText=datesText.split(multiSelect?inst.get('multiSeparator'):(rangeSelect?inst.get('rangeSeparator'):'\x00'));var dates=[];for(var i=0;i<datesText.length;i++){try{var date=$.datepick.parseDate(dateFormat,datesText[i],inst.getConfig());if(date){var found=false;for(var j=0;j<dates.length;j++){if(dates[j].getTime()==date.getTime()){found=true;break;}}
if(!found){dates.push(date);}}}
catch(e){}}
dates.splice(multiSelect||(rangeSelect?2:1),dates.length);if(rangeSelect&&dates.length==1){dates[1]=dates[0];}
return dates;},_update:function(target,hidden){target=$(target.target||target);var inst=$.data(target[0],$.datepick.dataName);if(inst){if(inst.inline){target.html(this._generateContent(target[0],inst));}
else if($.datepick.curInst==inst){if(!inst.div){inst.div=$('<div></div>').addClass(this._popupClass).css({display:(hidden?'none':'static'),position:'absolute',left:target.offset().left,top:target.offset().top+target.outerHeight()}).appendTo($(inst.get('popupContainer')||'body'));if($.fn.mousewheel){inst.div.mousewheel(this._doMouseWheel);}}
inst.div.html(this._generateContent(target[0],inst));target.focus();}
if(inst.inline||$.datepick.curInst==inst){var onChange=inst.get('onChangeMonthYear');if(onChange&&(!inst.prevDate||inst.prevDate.getFullYear()!=inst.drawDate.getFullYear()||inst.prevDate.getMonth()!=inst.drawDate.getMonth())){onChange.apply(target[0],[inst.drawDate.getFullYear(),inst.drawDate.getMonth()+1]);}}}},_updateInput:function(target,keyUp){var inst=$.data(target,this.dataName);if(inst){var value='';var altValue='';var sep=(inst.get('multiSelect')?inst.get('multiSeparator'):inst.get('rangeSeparator'));var dateFormat=inst.get('dateFormat');var altFormat=inst.get('altFormat')||dateFormat;for(var i=0;i<inst.selectedDates.length;i++){value+=(keyUp?'':(i>0?sep:'')+$.datepick.formatDate(dateFormat,inst.selectedDates[i],inst.getConfig()));altValue+=(i>0?sep:'')+$.datepick.formatDate(altFormat,inst.selectedDates[i],inst.getConfig());}
if(!inst.inline&&!keyUp){$(target).val(value);}
$(inst.get('altField')).val(altValue);var onSelect=inst.get('onSelect');if(onSelect&&!keyUp&&!inst.inSelect){inst.inSelect=true;onSelect.apply(target,[inst.selectedDates]);inst.inSelect=false;}}},_getBorders:function(elem){var convert=function(value){var extra=($.browser.msie?1:0);return{thin:1+extra,medium:3+extra,thick:5+extra}[value]||value;};return[parseFloat(convert(elem.css('border-left-width'))),parseFloat(convert(elem.css('border-top-width')))];},_checkOffset:function(inst){var base=(inst.target.is(':hidden')&&inst.trigger?inst.trigger:inst.target);var offset=base.offset();var isFixed=false;$(inst.target).parents().each(function(){isFixed|=$(this).css('position')=='fixed';return!isFixed;});if(isFixed&&$.browser.opera){offset.left-=document.documentElement.scrollLeft;offset.top-=document.documentElement.scrollTop;}
var browserWidth=(!$.browser.mozilla||document.doctype?document.documentElement.clientWidth:0)||document.body.clientWidth;var browserHeight=(!$.browser.mozilla||document.doctype?document.documentElement.clientHeight:0)||document.body.clientHeight;if(browserWidth==0){return offset;}
var alignment=inst.get('alignment');var isRTL=inst.get('isRTL');var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var above=offset.top-inst.div.outerHeight()-
(isFixed&&$.browser.opera?document.documentElement.scrollTop:0);var below=offset.top+base.outerHeight();var alignL=offset.left;var alignR=offset.left+base.outerWidth()-inst.div.outerWidth()-
(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0);var tooWide=(offset.left+inst.div.outerWidth()-scrollX)>browserWidth;var tooHigh=(offset.top+inst.target.outerHeight()+inst.div.outerHeight()-
scrollY)>browserHeight;if(alignment=='topLeft'){offset={left:alignL,top:above};}
else if(alignment=='topRight'){offset={left:alignR,top:above};}
else if(alignment=='bottomLeft'){offset={left:alignL,top:below};}
else if(alignment=='bottomRight'){offset={left:alignR,top:below};}
else if(alignment=='top'){offset={left:(isRTL||tooWide?alignR:alignL),top:above};}
else{offset={left:(isRTL||tooWide?alignR:alignL),top:(tooHigh?above:below)};}
offset.left=Math.max((isFixed?0:scrollX),offset.left-(isFixed?scrollX:0));offset.top=Math.max((isFixed?0:scrollY),offset.top-(isFixed?scrollY:0));return offset;},_checkExternalClick:function(event){if(!$.datepick.curInst){return;}
var target=$(event.target);if(!target.parents().andSelf().hasClass($.datepick._popupClass)&&!target.hasClass($.datepick.markerClass)&&!target.parents().andSelf().hasClass($.datepick._triggerClass)){$.datepick.hide($.datepick.curInst);}},hide:function(target,immediate){var inst=$.data(target,this.dataName)||target;if(inst&&inst==$.datepick.curInst){var showAnim=(immediate?'':inst.get('showAnim'));var showSpeed=inst.get('showSpeed');showSpeed=(showSpeed=='normal'&&$.ui&&$.ui.version>='1.8'?'_default':showSpeed);var postProcess=function(){inst.div.remove();inst.div=null;$.datepick.curInst=null;var onClose=inst.get('onClose');if(onClose){onClose.apply(target,[inst.selectedDates]);}};inst.div.stop();if($.effects&&$.effects[showAnim]){inst.div.hide(showAnim,inst.get('showOptions'),showSpeed,postProcess);}
else{var hideAnim=(showAnim=='slideDown'?'slideUp':(showAnim=='fadeIn'?'fadeOut':'hide'));inst.div[hideAnim]((showAnim?showSpeed:''),postProcess);}
if(!showAnim){postProcess();}}},_keyDown:function(event){var target=event.target;var inst=$.data(target,$.datepick.dataName);var handled=false;if(inst.div){if(event.keyCode==9){$.datepick.hide(target);}
else if(event.keyCode==13){$.datepick.selectDate(target,$('a.'+inst.get('renderer').highlightedClass,inst.div)[0]);handled=true;}
else{var commands=inst.get('commands');for(var name in commands){var command=commands[name];if(command.keystroke.keyCode==event.keyCode&&!!command.keystroke.ctrlKey==!!(event.ctrlKey||event.metaKey)&&!!command.keystroke.altKey==event.altKey&&!!command.keystroke.shiftKey==event.shiftKey){$.datepick.performAction(target,name);handled=true;break;}}}}
else{var command=inst.get('commands').current;if(command.keystroke.keyCode==event.keyCode&&!!command.keystroke.ctrlKey==!!(event.ctrlKey||event.metaKey)&&!!command.keystroke.altKey==event.altKey&&!!command.keystroke.shiftKey==event.shiftKey){$.datepick.show(target);handled=true;}}
inst.ctrlKey=((event.keyCode<48&&event.keyCode!=32)||event.ctrlKey||event.metaKey);if(handled){event.preventDefault();event.stopPropagation();}
return!handled;},_keyPress:function(event){var target=event.target;var inst=$.data(target,$.datepick.dataName);if(inst&&inst.get('constrainInput')){var ch=String.fromCharCode(event.keyCode||event.charCode);var allowedChars=$.datepick._allowedChars(inst);return(event.metaKey||inst.ctrlKey||ch<' '||!allowedChars||allowedChars.indexOf(ch)>-1);}
return true;},_allowedChars:function(inst){var dateFormat=inst.get('dateFormat');var allowedChars=(inst.get('multiSelect')?inst.get('multiSeparator'):(inst.get('rangeSelect')?inst.get('rangeSeparator'):''));var literal=false;var hasNum=false;for(var i=0;i<dateFormat.length;i++){var ch=dateFormat.charAt(i);if(literal){if(ch=="'"&&dateFormat.charAt(i+1)!="'"){literal=false;}
else{allowedChars+=ch;}}
else{switch(ch){case'd':case'm':case'o':case'w':allowedChars+=(hasNum?'':'0123456789');hasNum=true;break;case'y':case'@':case'!':allowedChars+=(hasNum?'':'0123456789')+'-';hasNum=true;break;case'J':allowedChars+=(hasNum?'':'0123456789')+'-.';hasNum=true;break;case'D':case'M':case'Y':return null;case"'":if(dateFormat.charAt(i+1)=="'"){allowedChars+="'";}
else{literal=true;}
break;default:allowedChars+=ch;}}}
return allowedChars;},_keyUp:function(event){var target=event.target;var inst=$.data(target,$.datepick.dataName);if(inst&&!inst.ctrlKey&&inst.lastVal!=inst.target.val()){try{var dates=$.datepick._extractDates(inst,inst.target.val());if(dates.length>0){$.datepick.setDate(target,dates,null,true);}}
catch(event){}}
return true;},_doMouseWheel:function(event,delta){var target=($.datepick.curInst&&$.datepick.curInst.target[0])||$(event.target).closest('.'+$.datepick.markerClass)[0];if($.datepick.isDisabled(target)){return;}
var inst=$.data(target,$.datepick.dataName);if(inst.get('useMouseWheel')){delta=($.browser.opera?-delta:delta);delta=(delta<0?-1:+1);$.datepick.changeMonth(target,-inst.get(event.ctrlKey?'monthsToJump':'monthsToStep')*delta);}
event.preventDefault();},clear:function(target){var inst=$.data(target,this.dataName);if(inst){inst.selectedDates=[];this.hide(target);if(inst.get('selectDefaultDate')&&inst.get('defaultDate')){this.setDate(target,$.datepick.newDate(inst.get('defaultDate')||$.datepick.today()));}
else{this._updateInput(target);}}},getDate:function(target){var inst=$.data(target,this.dataName);return(inst?inst.selectedDates:[]);},setDate:function(target,dates,endDate,keyUp,setOpt){var inst=$.data(target,this.dataName);if(inst){if(!$.isArray(dates)){dates=[dates];if(endDate){dates.push(endDate);}}
var dateFormat=inst.get('dateFormat');var minDate=inst.get('minDate');var maxDate=inst.get('maxDate');var curDate=inst.selectedDates[0];inst.selectedDates=[];for(var i=0;i<dates.length;i++){var date=$.datepick.determineDate(dates[i],null,curDate,dateFormat,inst.getConfig());if(date){if((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())){var found=false;for(var j=0;j<inst.selectedDates.length;j++){if(inst.selectedDates[j].getTime()==date.getTime()){found=true;break;}}
if(!found){inst.selectedDates.push(date);}}}}
var rangeSelect=inst.get('rangeSelect');inst.selectedDates.splice(inst.get('multiSelect')||(rangeSelect?2:1),inst.selectedDates.length);if(rangeSelect){switch(inst.selectedDates.length){case 1:inst.selectedDates[1]=inst.selectedDates[0];break;case 2:inst.selectedDates[1]=(inst.selectedDates[0].getTime()>inst.selectedDates[1].getTime()?inst.selectedDates[0]:inst.selectedDates[1]);break;}
inst.pickingRange=false;}
inst.prevDate=(inst.drawDate?$.datepick.newDate(inst.drawDate):null);inst.drawDate=this._checkMinMax($.datepick.newDate(inst.selectedDates[0]||inst.get('defaultDate')||$.datepick.today()),inst);if(!setOpt){this._update(target);this._updateInput(target,keyUp);}}},isSelectable:function(target,date){var inst=$.data(target,this.dataName);if(!inst){return false;}
date=$.datepick.determineDate(date,inst.selectedDates[0]||this.today(),null,inst.get('dateFormat'),inst.getConfig());return this._isSelectable(target,date,inst.get('onDate'),inst.get('minDate'),inst.get('maxDate'));},_isSelectable:function(target,date,onDate,minDate,maxDate){var dateInfo=(typeof onDate=='boolean'?{selectable:onDate}:(!onDate?{}:onDate.apply(target,[date,true])));return(dateInfo.selectable!=false)&&(!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime());},performAction:function(target,action){var inst=$.data(target,this.dataName);if(inst&&!this.isDisabled(target)){var commands=inst.get('commands');if(commands[action]&&commands[action].enabled.apply(target,[inst])){commands[action].action.apply(target,[inst]);}}},showMonth:function(target,year,month,day){var inst=$.data(target,this.dataName);if(inst&&(day!=null||(inst.drawDate.getFullYear()!=year||inst.drawDate.getMonth()+1!=month))){inst.prevDate=$.datepick.newDate(inst.drawDate);var show=this._checkMinMax((year!=null?$.datepick.newDate(year,month,1):$.datepick.today()),inst);inst.drawDate=$.datepick.newDate(show.getFullYear(),show.getMonth()+1,(day!=null?day:Math.min(inst.drawDate.getDate(),$.datepick.daysInMonth(show.getFullYear(),show.getMonth()+1))));this._update(target);}},changeMonth:function(target,offset){var inst=$.data(target,this.dataName);if(inst){var date=$.datepick.add($.datepick.newDate(inst.drawDate),offset,'m');this.showMonth(target,date.getFullYear(),date.getMonth()+1);}},changeDay:function(target,offset){var inst=$.data(target,this.dataName);if(inst){var date=$.datepick.add($.datepick.newDate(inst.drawDate),offset,'d');this.showMonth(target,date.getFullYear(),date.getMonth()+1,date.getDate());}},_checkMinMax:function(date,inst){var minDate=inst.get('minDate');var maxDate=inst.get('maxDate');date=(minDate&&date.getTime()<minDate.getTime()?$.datepick.newDate(minDate):date);date=(maxDate&&date.getTime()>maxDate.getTime()?$.datepick.newDate(maxDate):date);return date;},retrieveDate:function(target,elem){var inst=$.data(target,this.dataName);return(!inst?null:this._normaliseDate(new Date(parseInt(elem.className.replace(/^.*dp(-?\d+).*$/,'$1'),10))));},selectDate:function(target,elem){var inst=$.data(target,this.dataName);if(inst&&!this.isDisabled(target)){var date=this.retrieveDate(target,elem);var multiSelect=inst.get('multiSelect');var rangeSelect=inst.get('rangeSelect');if(multiSelect){var found=false;for(var i=0;i<inst.selectedDates.length;i++){if(date.getTime()==inst.selectedDates[i].getTime()){inst.selectedDates.splice(i,1);found=true;break;}}
if(!found&&inst.selectedDates.length<multiSelect){inst.selectedDates.push(date);}}
else if(rangeSelect){if(inst.pickingRange){inst.selectedDates[1]=date;}
else{inst.selectedDates=[date,date];}
inst.pickingRange=!inst.pickingRange;}
else{inst.selectedDates=[date];}
inst.prevDate=$.datepick.newDate(date);this._updateInput(target);if(inst.inline||inst.pickingRange||inst.selectedDates.length<(multiSelect||(rangeSelect?2:1))){this._update(target);}
else{this.hide(target);}}},_generateContent:function(target,inst){var renderer=inst.get('renderer');var monthsToShow=inst.get('monthsToShow');monthsToShow=($.isArray(monthsToShow)?monthsToShow:[1,monthsToShow]);inst.drawDate=this._checkMinMax(inst.drawDate||inst.get('defaultDate')||$.datepick.today(),inst);var drawDate=$.datepick.add($.datepick.newDate(inst.drawDate),-inst.get('monthsOffset'),'m');var monthRows='';for(var row=0;row<monthsToShow[0];row++){var months='';for(var col=0;col<monthsToShow[1];col++){months+=this._generateMonth(target,inst,drawDate.getFullYear(),drawDate.getMonth()+1,renderer,(row==0&&col==0));$.datepick.add(drawDate,1,'m');}
monthRows+=this._prepare(renderer.monthRow,inst).replace(/\{months\}/,months);}
var picker=this._prepare(renderer.picker,inst).replace(/\{months\}/,monthRows).replace(/\{weekHeader\}/g,this._generateDayHeaders(inst,renderer))+
($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:void(0);" class="'+this._coverClass+'"></iframe>':'');var commands=inst.get('commands');var asDateFormat=inst.get('commandsAsDateFormat');var addCommand=function(type,open,close,name,classes){if(picker.indexOf('{'+type+':'+name+'}')==-1){return;}
var command=commands[name];var date=(asDateFormat?command.date.apply(target,[inst]):null);picker=picker.replace(new RegExp('\\{'+type+':'+name+'\\}','g'),'<'+open+
(command.status?' title="'+inst.get(command.status)+'"':'')+' class="'+renderer.commandClass+' '+
renderer.commandClass+'-'+name+' '+classes+
(command.enabled(inst)?'':' '+renderer.disabledClass)+'">'+
(date?$.datepick.formatDate(inst.get(command.text),date,inst.getConfig()):inst.get(command.text))+'</'+close+'>');};for(var name in commands){addCommand('button','button type="button"','button',name,renderer.commandButtonClass);addCommand('link','a href="javascript:void(0)"','a',name,renderer.commandLinkClass);}
picker=$(picker);if(monthsToShow[1]>1){var count=0;$(renderer.monthSelector,picker).each(function(){var nth=++count%monthsToShow[1];$(this).addClass(nth==1?'first':(nth==0?'last':''));});}
var self=this;picker.find(renderer.daySelector+' a').hover(function(){$(this).addClass(renderer.highlightedClass);},function(){(inst.inline?$(this).parents('.'+self.markerClass):inst.div).find(renderer.daySelector+' a').removeClass(renderer.highlightedClass);}).click(function(){self.selectDate(target,this);}).end().find('select.'+this._monthYearClass+':not(.'+this._anyYearClass+')').change(function(){var monthYear=$(this).val().split('/');self.showMonth(target,parseInt(monthYear[1],10),parseInt(monthYear[0],10));}).end().find('select.'+this._anyYearClass).click(function(){$(this).css('visibility','hidden').next('input').css({left:this.offsetLeft,top:this.offsetTop,width:this.offsetWidth,height:this.offsetHeight}).show().focus();}).end().find('input.'+self._monthYearClass).change(function(){try{var year=parseInt($(this).val(),10);year=(isNaN(year)?inst.drawDate.getFullYear():year);self.showMonth(target,year,inst.drawDate.getMonth()+1,inst.drawDate.getDate());}
catch(e){alert(e);}}).keydown(function(event){if(event.keyCode==13){$(event.target).change();}
else if(event.keyCode==27){$(event.target).hide().prev('select').css('visibility','visible');inst.target.focus();}});picker.find('.'+renderer.commandClass).live('click',function(){if(!$(this).hasClass(renderer.disabledClass)){var action=this.className.replace(new RegExp('^.*'+renderer.commandClass+'-([^ ]+).*$'),'$1');$.datepick.performAction(target,action);}});if(inst.get('isRTL')){picker.addClass(renderer.rtlClass);}
if(monthsToShow[0]*monthsToShow[1]>1){picker.addClass(renderer.multiClass);}
var pickerClass=inst.get('pickerClass');if(pickerClass){picker.addClass(pickerClass);}
$('body').append(picker);var width=0;picker.find(renderer.monthSelector).each(function(){width+=$(this).outerWidth();});picker.width(width/monthsToShow[0]);var onShow=inst.get('onShow');if(onShow){onShow.apply(target,[picker,inst]);}
return picker;},_generateMonth:function(target,inst,year,month,renderer,first){var daysInMonth=$.datepick.daysInMonth(year,month);var monthsToShow=inst.get('monthsToShow');monthsToShow=($.isArray(monthsToShow)?monthsToShow:[1,monthsToShow]);var fixedWeeks=inst.get('fixedWeeks')||(monthsToShow[0]*monthsToShow[1]>1);var firstDay=inst.get('firstDay');var leadDays=($.datepick.newDate(year,month,1).getDay()-firstDay+7)%7;var numWeeks=(fixedWeeks?6:Math.ceil((leadDays+daysInMonth)/7));var showOtherMonths=inst.get('showOtherMonths');var selectOtherMonths=inst.get('selectOtherMonths')&&showOtherMonths;var dayStatus=inst.get('dayStatus');var minDate=(inst.pickingRange?inst.selectedDates[0]:inst.get('minDate'));var maxDate=inst.get('maxDate');var rangeSelect=inst.get('rangeSelect');var onDate=inst.get('onDate');var showWeeks=renderer.week.indexOf('{weekOfYear}')>-1;var calculateWeek=inst.get('calculateWeek');var today=$.datepick.today();var drawDate=$.datepick.newDate(year,month,1);$.datepick.add(drawDate,-leadDays-(fixedWeeks&&(drawDate.getDay()==firstDay)?7:0),'d');var ts=drawDate.getTime();var weeks='';for(var week=0;week<numWeeks;week++){var weekOfYear=(!showWeeks?'':'<span class="dp'+ts+'">'+
(calculateWeek?calculateWeek(drawDate):0)+'</span>');var days='';for(var day=0;day<7;day++){var selected=false;if(rangeSelect&&inst.selectedDates.length>0){selected=(drawDate.getTime()>=inst.selectedDates[0]&&drawDate.getTime()<=inst.selectedDates[1]);}
else{for(var i=0;i<inst.selectedDates.length;i++){if(inst.selectedDates[i].getTime()==drawDate.getTime()){selected=true;break;}}}
var dateInfo=(!onDate?{}:onDate.apply(target,[drawDate,drawDate.getMonth()+1==month]));var selectable=(selectOtherMonths||drawDate.getMonth()+1==month)&&this._isSelectable(target,drawDate,dateInfo.selectable,minDate,maxDate);days+=this._prepare(renderer.day,inst).replace(/\{day\}/g,(selectable?'<a href="javascript:void(0)"':'<span')+' class="dp'+ts+' '+(dateInfo.dateClass||'')+
(selected&&(selectOtherMonths||drawDate.getMonth()+1==month)?' '+renderer.selectedClass:'')+
(selectable?' '+renderer.defaultClass:'')+
((drawDate.getDay()||7)<6?'':' '+renderer.weekendClass)+
(drawDate.getMonth()+1==month?'':' '+renderer.otherMonthClass)+
(drawDate.getTime()==today.getTime()&&(drawDate.getMonth()+1)==month?' '+renderer.todayClass:'')+
(drawDate.getTime()==inst.drawDate.getTime()&&(drawDate.getMonth()+1)==month?' '+renderer.highlightedClass:'')+'"'+
(dateInfo.title||(dayStatus&&selectable)?' title="'+
(dateInfo.title||$.datepick.formatDate(dayStatus,drawDate,inst.getConfig()))+'"':'')+'>'+
(showOtherMonths||(drawDate.getMonth()+1)==month?dateInfo.content||drawDate.getDate():'&nbsp;')+
(selectable?'</a>':'</span>'));$.datepick.add(drawDate,1,'d');ts=drawDate.getTime();}
weeks+=this._prepare(renderer.week,inst).replace(/\{days\}/g,days).replace(/\{weekOfYear\}/g,weekOfYear);}
var monthHeader=this._prepare(renderer.month,inst).match(/\{monthHeader(:[^\}]+)?\}/);monthHeader=(monthHeader[0].length<=13?'MM yyyy':monthHeader[0].substring(13,monthHeader[0].length-1));monthHeader=(first?this._generateMonthSelection(inst,year,month,minDate,maxDate,monthHeader,renderer):$.datepick.formatDate(monthHeader,$.datepick.newDate(year,month,1),inst.getConfig()));var weekHeader=this._prepare(renderer.weekHeader,inst).replace(/\{days\}/g,this._generateDayHeaders(inst,renderer));return this._prepare(renderer.month,inst).replace(/\{monthHeader(:[^\}]+)?\}/g,monthHeader).replace(/\{weekHeader\}/g,weekHeader).replace(/\{weeks\}/g,weeks);},_generateDayHeaders:function(inst,renderer){var firstDay=inst.get('firstDay');var dayNames=inst.get('dayNames');var dayNamesMin=inst.get('dayNamesMin');var header='';for(var day=0;day<7;day++){var dow=(day+firstDay)%7;header+=this._prepare(renderer.dayHeader,inst).replace(/\{day\}/g,'<span class="'+this._curDoWClass+dow+'" title="'+
dayNames[dow]+'">'+dayNamesMin[dow]+'</span>');}
return header;},_generateMonthSelection:function(inst,year,month,minDate,maxDate,monthHeader){if(!inst.get('changeMonth')){return $.datepick.formatDate(monthHeader,$.datepick.newDate(year,month,1),inst.getConfig());}
var monthNames=inst.get('monthNames'+(monthHeader.match(/mm/i)?'':'Short'));var html=monthHeader.replace(/m+/i,'\\x2E').replace(/y+/i,'\\x2F');var selector='<select class="'+this._monthYearClass+'" title="'+inst.get('monthStatus')+'">';for(var m=1;m<=12;m++){if((!minDate||$.datepick.newDate(year,m,$.datepick.daysInMonth(year,m)).getTime()>=minDate.getTime())&&(!maxDate||$.datepick.newDate(year,m,1).getTime()<=maxDate.getTime())){selector+='<option value="'+m+'/'+year+'"'+
(month==m?' selected="selected"':'')+'>'+
monthNames[m-1]+'</option>';}}
selector+='</select>';html=html.replace(/\\x2E/,selector);var yearRange=inst.get('yearRange');if(yearRange=='any'){selector='<select class="'+this._monthYearClass+' '+this._anyYearClass+'" title="'+inst.get('yearStatus')+'">'+'<option>'+year+'</option></select>'+'<input class="'+this._monthYearClass+' '+this._curMonthClass+
month+'" value="'+year+'">';}
else{yearRange=yearRange.split(':');var todayYear=$.datepick.today().getFullYear();var start=(yearRange[0].match('c[+-].*')?year+parseInt(yearRange[0].substring(1),10):((yearRange[0].match('[+-].*')?todayYear:0)+parseInt(yearRange[0],10)));var end=(yearRange[1].match('c[+-].*')?year+parseInt(yearRange[1].substring(1),10):((yearRange[1].match('[+-].*')?todayYear:0)+parseInt(yearRange[1],10)));selector='<select class="'+this._monthYearClass+'" title="'+inst.get('yearStatus')+'">';start=$.datepick.add($.datepick.newDate(start+1,1,1),-1,'d');end=$.datepick.newDate(end,1,1);var addYear=function(y){if(y!=0){selector+='<option value="'+month+'/'+y+'"'+
(year==y?' selected="selected"':'')+'>'+y+'</option>';}};if(start.getTime()<end.getTime()){start=(minDate&&minDate.getTime()>start.getTime()?minDate:start).getFullYear();end=(maxDate&&maxDate.getTime()<end.getTime()?maxDate:end).getFullYear();for(var y=start;y<=end;y++){addYear(y);}}
else{start=(maxDate&&maxDate.getTime()<start.getTime()?maxDate:start).getFullYear();end=(minDate&&minDate.getTime()>end.getTime()?minDate:end).getFullYear();for(var y=start;y>=end;y--){addYear(y);}}
selector+='</select>';}
html=html.replace(/\\x2F/,selector);return html;},_prepare:function(text,inst){var replaceSection=function(type,retain){while(true){var start=text.indexOf('{'+type+':start}');if(start==-1){return;}
var end=text.substring(start).indexOf('{'+type+':end}');if(end>-1){text=text.substring(0,start)+
(retain?text.substr(start+type.length+8,end-type.length-8):'')+
text.substring(start+end+type.length+6);}}};replaceSection('inline',inst.inline);replaceSection('popup',!inst.inline);var pattern=/\{l10n:([^\}]+)\}/;var matches=null;while(matches=pattern.exec(text)){text=text.replace(matches[0],inst.get(matches[1]));}
return text;}});function extendRemove(target,props){$.extend(target,props);for(var name in props)
if(props[name]==null||props[name]==undefined)
target[name]=props[name];return target;};$.fn.datepick=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if($.inArray(options,['getDate','isDisabled','isSelectable','options','retrieveDate'])>-1){return $.datepick[options].apply($.datepick,[this[0]].concat(otherArgs));}
return this.each(function(){if(typeof options=='string'){$.datepick[options].apply($.datepick,[this].concat(otherArgs));}
else{$.datepick._attachPicker(this,options||{});}});};$.datepick=new Datepicker();$(function(){$(document).mousedown($.datepick._checkExternalClick).resize(function(){$.datepick.hide($.datepick.curInst);});});})(jQuery);String.prototype.score=function(abbreviation,offset){offset=offset||0
if(abbreviation.length==0)return 0.9
if(abbreviation.length>this.length)return 0.0
for(var i=abbreviation.length;i>0;i--){var sub_abbreviation=abbreviation.substring(0,i)
var index=this.indexOf(sub_abbreviation)
if(index<0)continue;if(index+abbreviation.length>this.length+offset)continue;var next_string=this.substring(index+sub_abbreviation.length)
var next_abbreviation=null
if(i>=abbreviation.length)
next_abbreviation=''
else
next_abbreviation=abbreviation.substring(i)
var remaining_score=next_string.score(next_abbreviation,offset+index)
if(remaining_score>0){var score=this.length-next_string.length;if(index!=0){var j=0;var c=this.charCodeAt(index-1)
if(c==32||c==9){for(var j=(index-2);j>=0;j--){c=this.charCodeAt(j)
score-=((c==32||c==9)?1:0.15)}}else{score-=index}}
score+=remaining_score*next_string.length
score/=this.length;return score}}
return 0.0};(function($){var self=null;$.fn.liveUpdate=function(list){return $(this).each(function(){new $.liveUpdate(this,list);});};$.liveUpdate=function(e,list){this.field=$(e);this.list=$('#'+list);if(this.list.length>0){this.init();}};$.liveUpdate.prototype={init:function(){var self=this;this.setupCache();this.field.parents('form').submit(function(){return false;});this.field.keyup(function(){self.filter();});self.filter();},filter:function(){if($.trim(this.field.val())==''){this.list.children('li').show();return;}
this.displayResults(this.getScores(this.field.val().toLowerCase()));},setupCache:function(){var self=this;this.cache=[];this.rows=[];this.list.children('li').each(function(){self.cache.push($(this).children().text().toLowerCase());self.rows.push($(this));});this.cache_length=this.cache.length;},displayResults:function(scores){var self=this;this.list.children('li').hide();$.each(scores,function(i,score){self.rows[score[1]].show();});},getScores:function(term){var scores=[];for(var i=0;i<this.cache_length;i++){var score=this.cache[i].score(term);if(score>0){scores.push([score,i]);}}
return scores.sort(function(a,b){return b[0]-a[0];});}}})(jQuery);
///home/lzdem/domains/lzskelbimai.com/public_html/media/main/blackscreen.js 

var blackscreen={disable_close:false,opened:false,dom_used:'',dom_html:'',close:function()
{$("#blackscreen_bg").fadeOut('slow');$("#blackscreen_msg").fadeOut('slow');$("#blackscreen_close").slideUp();$(".lzske_ad").css("display","inline");this.disable_close=false;this.opened=false;if(this.dom_used!='')
{$('#'+this.dom_used).html(this.dom_html);}
this.dom_used='';this.dom_html='';},close_click:function()
{if(!this.disable_close)
{this.close();}},open:function()
{if(!this.opened)
{if($.browser.safari||$.browser.chrome)bodyelem=$("body");else bodyelem=$("html,body");$("#blackscreen_msg").css('top',bodyelem.scrollTop());$("#blackscreen_bg").css('opacity',0).show().fadeTo('slow',0.5);$("#blackscreen_close").slideDown();$("#blackscreen_msg").css('opacity',0).show().fadeTo('slow',1);$(".lzske_ad").css("display","none");this.opened=true;}},dom_open:function(dom)
{if(this.dom_used!=dom)
{this.dom_used=dom;this.dom_html=$('#'+dom).html();$('#'+dom).html('');this.msg_open(this.dom_html);}
else
{location.href=$('.email_link:first').attr('href');}},msg_open:function(html)
{this.msg(html);this.open();},msg:function(html)
{$("#blackscreen_msg_inner").html(html);}}
///home/lzdem/domains/lzskelbimai.com/public_html/media/common/gorivo_zebra.js 

function gorivo_zebra()
{var x=0;$('.gorivo_zebra tr').each(function(key){if((x%2)==0)
{$(this).addClass('odd');}
else
{$(this).removeClass('odd');}
x++;});}
$(document).ready(gorivo_zebra);function gorivo_to(e)
{var hash=$(e);var t=hash.position().top-100;if(t<0)
{t=0;}
if(t!=$('body').scrollTop)
{$('html, body').animate({scrollTop:t},'slow');}}
function gorivo_to_zero(e)
{var hash=$(e);var t=hash.position().top;if(t<0)
{t=0;}
if(t!=$('body').scrollTop)
{$('html, body').animate({scrollTop:t},'slow');}}
///home/lzdem/domains/lzskelbimai.com/public_html/media/main/footer_viewer_fav_ads.js 

(function($,flash,Plugin){var OBJECT='object',ENCODE=true;function _compareArrayIntegers(a,b){var x=(a[0]||0)-(b[0]||0);return x>0||(!x&&a.length>0&&_compareArrayIntegers(a.slice(1),b.slice(1)));}
function _objectToArguments(obj){if(typeof obj!=OBJECT){return obj;}
var arr=[],str='';for(var i in obj){if(typeof obj[i]==OBJECT){str=_objectToArguments(obj[i]);}
else{str=[i,(ENCODE)?encodeURI(obj[i]):obj[i]].join('=');}
arr.push(str);}
return arr.join('&');}
function _objectFromObject(obj){var arr=[];for(var i in obj){if(obj[i]){arr.push([i,'="',obj[i],'"'].join(''));}}
return arr.join(' ');}
function _paramsFromObject(obj){var arr=[];for(var i in obj){arr.push(['<param name="',i,'" value="',_objectToArguments(obj[i]),'" />'].join(''));}
return arr.join('');}
try{var flashVersion=Plugin.description||(function(){return(new Plugin('ShockwaveFlash.ShockwaveFlash')).GetVariable('$version');}())}
catch(e){flashVersion='Unavailable';}
var flashVersionMatchVersionNumbers=flashVersion.match(/\d+/g)||[0];$[flash]={available:flashVersionMatchVersionNumbers[0]>0,activeX:Plugin&&!Plugin.name,version:{original:flashVersion,array:flashVersionMatchVersionNumbers,string:flashVersionMatchVersionNumbers.join('.'),major:parseInt(flashVersionMatchVersionNumbers[0],10)||0,minor:parseInt(flashVersionMatchVersionNumbers[1],10)||0,release:parseInt(flashVersionMatchVersionNumbers[2],10)||0},hasVersion:function(version){var versionArray=(/string|number/.test(typeof version))?version.toString().split('.'):(/object/.test(typeof version))?[version.major,version.minor]:version||[0,0];return _compareArrayIntegers(flashVersionMatchVersionNumbers,versionArray);},encodeParams:true,expressInstall:'expressInstall.swf',expressInstallIsActive:false,create:function(obj){var instance=this;if(!obj.swf||instance.expressInstallIsActive||(!instance.available&&!obj.hasVersionFail)){return false;}
if(!instance.hasVersion(obj.hasVersion||1)){instance.expressInstallIsActive=true;if(typeof obj.hasVersionFail=='function'){if(!obj.hasVersionFail.apply(obj)){return false;}}
obj={swf:obj.expressInstall||instance.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:(instance.activeX)?'ActiveX':'PlugIn',MMdoctitle:document.title.slice(0,47)+' - Flash Player Installation'}};}
attrs={data:obj.swf,type:'application/x-shockwave-flash',id:obj.id||'flash_'+Math.floor(Math.random()*999999999),width:obj.width||320,height:obj.height||180,style:obj.style||''};ENCODE=typeof obj.useEncode!=='undefined'?obj.useEncode:instance.encodeParams;obj.movie=obj.swf;obj.wmode=obj.wmode||'opaque';delete obj.fallback;delete obj.hasVersion;delete obj.hasVersionFail;delete obj.height;delete obj.id;delete obj.swf;delete obj.useEncode;delete obj.width;var flashContainer=document.createElement('div');flashContainer.innerHTML=['<object ',_objectFromObject(attrs),'>',_paramsFromObject(obj),'</object>'].join('');return flashContainer.firstChild;}};$.fn[flash]=function(options){var $this=this.find(OBJECT).andSelf().filter(OBJECT);if(/string|object/.test(typeof options)){this.each(function(){var $this=$(this),flashObject;options=(typeof options==OBJECT)?options:{swf:options};options.fallback=this;flashObject=$[flash].create(options);if(flashObject){$this.children().remove();$this.html(flashObject);}});}
if(typeof options=='function'){$this.each(function(){var instance=this,jsInteractionTimeoutMs='jsInteractionTimeoutMs';instance[jsInteractionTimeoutMs]=instance[jsInteractionTimeoutMs]||0;if(instance[jsInteractionTimeoutMs]<660){if(instance.clientWidth||instance.clientHeight){options.call(instance);}
else{setTimeout(function(){$(instance)[flash](options);},instance[jsInteractionTimeoutMs]+66);}}});}
return $this;};}(jQuery,'flash',navigator.plugins['Shockwave Flash']||window.ActiveXObject));jQuery.cookie=function(name,value,options){if(typeof value!='undefined'||(name&&typeof name!='string')){if(typeof name=='string'){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;}else{for(var n in name){jQuery.cookie(n,name[n],value||options);}}}else{var returnValue={};if(document.cookie){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(!name){var nameLength=cookie.indexOf('=');returnValue[cookie.substr(0,nameLength)]=decodeURIComponent(cookie.substr(nameLength+1));}else if(cookie.substr(0,name.length+1)==(name+'=')){returnValue=decodeURIComponent(cookie.substr(name.length+1));break;}}}
return returnValue;}};jQuery(function(){if($("#vip_tipai_table").length){$('#vip_tipai_table').tablesorter({widgets:['zebra'],sortList:[[0,0]]});}
if($("#vip_tipai_table_no_sort").length){$('#vip_tipai_table_no_sort').tablesorter({widgets:['zebra']});}
if($(".tablesorter_no_sort").length){$('.tablesorter_no_sort').tablesorter({widgets:['zebra']});}
$('.del_vip_link').click(function(){var answer=confirm("Ar tikrai norite ištrinti?");if(answer){return true;}else{return false;}});$('.active_user_link').click(function(){var answer=confirm("Ar tikrai norite aktyvuoti vartotoją?");if(answer){return true;}else{return false;}});$('.deactive_user_link').click(function(){var answer=confirm("Ar tikrai norite deaktyvuoti vartotoją?");if(answer){return true;}else{return false;}});$('.add_fav').live("click",function(){var login_status=$('#login_status').val();var id=$(this).attr('rel');var skl_domain_path='./ajax.fav_ads.php';var star_div=$(this).parent();if(login_status=='1'){$.get(skl_domain_path,{"id":id},function(data){if(opener){$('#star_on_off').html('<img title="'+GRV_POPUP_REM_FAV+'" alt="'+GRV_POPUP_REM_FAV+'" id="remove_fav" rel="'+id+'" src="img/star_on.png" align="middle" />');opener.update_viewed_fav_ads();}else{star_div.html('<img title="'+GRV_POPUP_REM_FAV+'" alt="'+GRV_POPUP_REM_FAV+'" id="remove_fav" rel="'+id+'" src="img/star_on.png" align="middle" />');update_viewed_fav_ads();}
alert(data);});}else{alert(FAV_NO_PERMISION);}});$('#remove_fav').live("click",function(){var login_status=$('#login_status').val();var id=$(this).attr('rel');var skl_domain_path='./ajax.fav_ads.php';var star_div=$(this).parent();if(login_status=='1'){$.get(skl_domain_path,{"id":id,"action":"del_fav_ad"},function(data){if(opener){$('#star_on_off').html('<img title="'+GRV_POPUP_ADD_FAV+'" alt="'+GRV_POPUP_ADD_FAV+'" class="add_fav" rel="'+id+'" src="img/star.png" align="middle" />');opener.update_viewed_fav_ads();}else{star_div.html('<img title="'+GRV_POPUP_ADD_FAV+'" alt="'+GRV_POPUP_ADD_FAV+'" class="add_fav" rel="'+id+'" src="img/star.png" align="middle" />');update_viewed_fav_ads();}
alert(data);});}else{alert(FAV_NO_PERMISION);}});$('#delete_fav_history').live("click",function(){var url=$("base").attr("href")+'ajax.fav_ads.php';$.get(url,{"action":"del_fav"});$('#fav_tabs_fav_contents').html('<br/><br/>'+FAV_NO_FAV_ADS);return false;});$('#delete_cookie').live("click",function(){$.cookie('viewed_ads',null,{path:'/'});$('#fav_tabs_viewed_contents').html('<br/><br/>'+FAV_NO_VIEWED_ADS);return false;});$('#fav_tabs_my_ads').live("click",function(){$('#fav_tabs_my_ads').addClass('active');$('#fav_tabs_fav').removeClass('active');$('#fav_tabs_viewed').removeClass('active');$('#fav_tabs_my_ads_contents').removeClass('fav_tabs_h');$('#fav_tabs_my_ads_contents').addClass('fav_tabs_v');$('#fav_tabs_fav_contents').removeClass('fav_tabs_v');$('#fav_tabs_fav_contents').addClass('fav_tabs_h');$('#fav_tabs_viewed_contents').removeClass('fav_tabs_v');$('#fav_tabs_viewed_contents').addClass('fav_tabs_h');});$('#fav_tabs_viewed').live("click",function(){$('#fav_tabs_viewed').addClass('active');$('#fav_tabs_fav').removeClass('active');$('#fav_tabs_my_ads').removeClass('active');$('#fav_tabs_viewed_contents').removeClass('fav_tabs_h');$('#fav_tabs_viewed_contents').addClass('fav_tabs_v');$('#fav_tabs_fav_contents').removeClass('fav_tabs_v');$('#fav_tabs_fav_contents').addClass('fav_tabs_h');$('#fav_tabs_my_ads_contents').removeClass('fav_tabs_v');$('#fav_tabs_my_ads_contents').addClass('fav_tabs_h');});$('#fav_tabs_fav').live("click",function(){$('#fav_tabs_fav').addClass('active');$('#fav_tabs_viewed').removeClass('active');$('#fav_tabs_my_ads').removeClass('active');$('#fav_tabs_viewed_contents').removeClass('fav_tabs_v');$('#fav_tabs_viewed_contents').addClass('fav_tabs_h');$('#fav_tabs_fav_contents').removeClass('fav_tabs_h');$('#fav_tabs_fav_contents').addClass('fav_tabs_v');$('#fav_tabs_my_ads_contents').removeClass('fav_tabs_v');$('#fav_tabs_my_ads_contents').addClass('fav_tabs_h');});$('#banner_type_select').change(function(){var value=$("#banner_type_select option:selected").val();if((value=='flash')||(value=='image')){$("#upload_field").css({'display':'table-row'});$("#html_code").css({'display':'none'});}else if(value=='html'){$("#html_code").css({'display':'table-row'});$("#upload_field").css({'display':'none'});}});$('.my_ads_chb').click(function(){if($('.my_ads_chb').filter(':checked').length>0){$('.mano_skelbimai_buttons').css("display","inline");$(".my_ads_chb").filter(':checked').each(function(){$(this).parent().parent().css('background-color','#FFFF99');});$(".my_ads_chb").filter(':not(:checked)').each(function(){$(this).parent().parent().css('background-color','#EDEDED');});}else{$('.mano_skelbimai_buttons').css("display","none");$(".my_ads_chb").filter(':not(:checked)').each(function(){$(this).parent().parent().css('background-color','#EDEDED');});}});$('.del_sel_ads').click(function(){var answer=confirm(L_DEL_CONFIRM);if(answer){var ads_ids='';$(".my_ads_chb").filter(':checked').each(function(){ads_ids=ads_ids+$(this).val()+',';});window.location='mano-skelbimai?del_sel='+ads_ids;}});$('.mark_sel_ads').click(function(){var ads_ids='';$(".my_ads_chb").filter(':checked').each(function(){ads_ids=ads_ids+$(this).val()+',';});window.location='skelbimu-paryskinimai?ids='+ads_ids;});$('.myads_sel_all').click(function(){var answer=confirm($(this).attr('rel'));if(answer){$(".my_ads_chb").each(function(){this.checked=true;});$('.mano_skelbimai_buttons').css("display","inline");$(".my_ads_chb").filter(':checked').each(function(){$(this).parent().parent().css('background-color','#FFFF99');});$(".my_ads_chb").filter(':not(:checked)').each(function(){$(this).parent().parent().css('background-color','#EDEDED');});}
return false;});$('.myads_unsel_all').click(function(){var answer=confirm($(this).attr('rel'));if(answer){$(".my_ads_chb").each(function(){this.checked=false;});$('.mano_skelbimai_buttons').css("display","none");$(".my_ads_chb").filter(':checked').each(function(){$(this).parent().parent().css('background-color','#FFFF99');});$(".my_ads_chb").filter(':not(:checked)').each(function(){$(this).parent().parent().css('background-color','#EDEDED');});}
return false;});$(".change_expire").click(function(){blackscreen.dom_open('change_expire');});$("#extent_expire_button").live('click',function(){blackscreen.close();$.post('./?mod=skelbimai&act=extend_expire_ajax&to='+$("#expire_till").val(),$(".my_ads_chb").filter(':checked').serialize(),function(data){alert(data);});});$('.selected_users_chb').click(function(){if($('.selected_users_chb').filter(':checked').length>0){$('.action_buttons').css("display","inline");$(".selected_users_chb").filter(':checked').each(function(){$(this).parent().parent().css('background-color','#FFFF99');});$(".selected_users_chb").filter(':not(:checked)').each(function(){$(this).parent().parent().css('background-color','#EDEDED');});}else{$('.action_buttons').css("display","none");$(".selected_users_chb").filter(':not(:checked)').each(function(){$(this).parent().parent().css('background-color','#EDEDED');});}});$('.selected_fusers_chb').click(function(){if($('.selected_fusers_chb').filter(':checked').length>0){$('.user_attach_buttons').css("display","inline");}else{$('.user_attach_buttons').css("display","none");}});$('.vip_extend_form_button').live('click',function(){var id=$(this).val();var date='';data=$("div#blackscreen_msg_inner #vip_extend_form_data_"+id).serialize();$.post('./?mod=skelbimai&act=extend_vip_adm_ajax',data,function(res){blackscreen.close();$(this).attr('disabled','disabled');var json=$.evalJSON(res);if(json.ok==true){alert(json.msg);$('#vip_extend_date_'+id).html(json.time);}else{alert(json.error);}});});$('.block_ad').live('click',function(){var info=$(this).attr('rel');info=info.split('_');if(info[0]=='popup'){action=info[1];id=info[2];in_popup=true;}else{action=info[0];id=info[1];in_popup=false;}
if(action=='block'){var answer=confirm(L_CONFIRM_BLOCK+' #'+id+' '+L_CONFIRM_AD2);if(answer){$.get('?mod=skelbimai&act=blocked_list&block='+id+'&return=0',function(data){alert(GRV_AD_TEXT+' #'+id+' '+ADM_AD_BLOCKED);if(in_popup){window.location.reload();}else{$(this).html('<a rel="block_'+id+'" class="unblock_ad" title="'+L_UNBLOCK_AD+'" href=""><img alt="'+L_UNBLOCK_AD+'" title="'+L_UNBLOCK_AD+'" src="./img/stop.gif"/></a>');}});}}else{var answer=confirm(L_CONFIRM_UNBLOCK+' #'+id+' '+L_CONFIRM_AD2);if(answer){$.get('?mod=skelbimai&act=blocked_list&unblock='+id+'&return=0',function(data){alert(GRV_AD_TEXT+' #'+id+' '+ADM_AD_UNBLOCKED);if(in_popup){window.location.reload();}else{$(this).html('<a rel="block_'+id+'" class="unblock_ad" title="'+L_BLOCK_AD+'" href=""><img alt="'+L_BLOCK_AD+'" title="'+L_BLOCK_AD+'" src="./img/check.gif"/></a>');}});}}
return false;});$(".pay_from_admin_credit").live('click',function(){var vp_id=$(this).attr('rel');var answer=confirm(ADM_REALLY_PAY);if(answer){$.post('./?mod=skelbimai&act=pay_from_admin_credit_ajax',{'vp_id':vp_id},function(data){var json=$.evalJSON(data);if(json.ok==true){alert(json.msg);window.location.reload();}else{alert(json.error);}});}
return false;});$(".do_block").live('click',function(){var answer=confirm(L_CONFIRM_BLOCK+' '+L_CONFIRM_AD2);if(answer){return true;}else{return false;}});$(".do_unblock").live('click',function(){var answer=confirm(L_CONFIRM_UNBLOCK+' '+L_CONFIRM_AD2);if(answer){return true;}else{return false;}});$('.del_ad').live('click',function(){var answer=confirm(L_DEL_CONFIRM);if(answer){id=$(this).attr('rel');$.get('./?mod=skelbimai&act=deladv&id='+id,function(data){alert(L_AD_DELETED);window.close();});}
return false;});reload_comments=function(){gorivo_to('#comm');$('#capthra_img').attr("src","./securitycode.php?timestamp="+new Date().getTime());$.post(window.location.href,{'do':'reload_comments'},function(data){$('#news_comments_div').html(data);});$('#fcula_news_comment_fcula_status').fadeOut('slow');}
update_viewed_fav_ads=function(){console.log('atnaujinsiu widgeta');$.post(window.location.href,{'do':'update_viewed_fav_ads_widget'},function(data){$('#viewed_fav_ads_widget_div').html(data);});}
$('#parysk_on_btn').click(function(){var id=$(this).attr('rel');$.ajax({url:document.location.href,type:'POST',data:{'do':'turn_on_vip','id':id},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');}}}
if(json.ok==true){$('#parysk_off').fadeOut('slow',function(){$('#parysk_on').fadeIn('slow');});}else{alert(json.errors);}}});});$('#parysk_off_btn').click(function(){var id=$(this).attr('rel');$.ajax({url:document.location.href,type:'POST',data:{'do':'turn_off_vip','id':id},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');}}}
if(json.ok==true){$('#parysk_on').fadeOut('slow',function(){$('#parysk_off').fadeIn('slow');});}else{alert(json.errors);}}});});$('.show_stats_diff').click(function(){$(this).css('text-decoration','underline');$('.show_stats_all').css('text-decoration','none');$('#stats_diff').css('display','block');$('#stats_all').css('display','none');return false;});$('.show_stats_all').click(function(){$(this).css('text-decoration','underline');$('.show_stats_diff').css('text-decoration','none');$('#stats_diff').css('display','none');$('#stats_all').css('display','block');return false;});$('#send_stats').click(function(){if($(this).is(':checked')){$('#send_stats_options').slideDown();}else{$('#send_stats_options').slideUp();}});ad_stats=function(id,from,to){$.ajax({url:'./?mod=skelbimai&act=myadv',type:'POST',data:{'do':'get_ad_stats','id':id,'from':from,'to':to},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){var html='';blackscreen.msg_open($('#ad_stats_bc').html());$('.stats_from').val(json.from);$('.stats_to').val(json.to);$('.stats_link').html(json.link);$.each(json.stats,function(k,i){html+='<tr>';html+='<td>'+i.date+'</td>';html+='<td>'+i.views+'</td>';html+='</tr>';});$('#blackscreen_msg .stats_chart').flash({swf:'media/common/open-flash-chart.swf',width:'100%',height:200,flashvars:{'data-file':escape('./?mod=skelbimai&act=myadv&do=chart_json&id='+id+'&from='+from+'&to='+to)}});$('#stats_table tbody tr').remove();$('#stats_table tbody').append(html);if($('.tablesorter_no_sort').length){$('.tablesorter_no_sort').trigger('update');$('.tablesorter_no_sort').trigger('appendCache');$('.tablesorter_no_sort').trigger('applyWidgets');}
$(".datepick").live('click',function(){console.log('veikia');$(this).datepick({dateFormat:'yyyy-mm-dd'});});}else{alert(json.errors);}}});}
$('.ad_stats').live('click',function(){var id=$(this).attr('rel');ad_stats(id,0,0);$('#stats_ad_id').val(id);return false;});$('.stats_filter_date').live('click',function(){var id=$('#stats_ad_id').val(id);var from=$('#blackscreen_msg_inner .stats_from').val();var to=$('#blackscreen_msg_inner .stats_to').val();ad_stats(id,from,to);});$('#show_stats_button').click(function(){blackscreen.msg_open('<b>'+GRV_WAIT+'</b>');});$('#paid_cat').click(function(){if($(this).is(':checked')){$('#paid_cat_opt').slideDown();$('#time').val(7);}else{$('#paid_cat_opt').slideUp();}});$('#blackscreen_msg_inner .paid_cat').live('click',function(){if($(this).is(':checked')){$('#blackscreen_msg_inner .paid_cat_opt').slideDown();}else{$('#blackscreen_msg_inner .paid_cat_opt').slideUp();}});$('.switch_charts').live('click',function(){var rel=$(this).attr('rel');var opts=rel.split(',');var show=opts[0];var hide=opts[1];$('.'+hide).css('display','none');$('.'+show).css('display','block');$('.show_'+hide).css('text-decoration','none');$('.show_'+show).css('text-decoration','underline');return false;});$('#login_button').click(function(){var form=$('#login_form').serialize();$.ajax({url:'./?mod=user&act=log_in&ajax=1',type:'POST',data:form,beforeSend:function(){$('#login_ok').css("display","none");$('#login_error').css("display","none");$('#login_form').attr('disabled','disabled');$("#login_form_loading").css("display","block");},complete:function(){$('#login_form').removeAttr('disabled');$("#login_form_loading").css("display","none");},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('#login_ok').css("display","block");window.location.reload();}else{$('#login_error').html(json.error);$('#login_error').css("display","block");}}});return false;});$('#forgot_pass').live('click',function(){blackscreen.msg_open($('#remember_pass_bc').html());return false;});$('.rem_pswd_button').live('click',function(){$.ajax({url:'./?mod=user&act=forgot',type:'POST',data:{'login':$('#blackscreen_msg .ident').val(),'ajax':'1','submitted':'yep'},beforeSend:function(){$("#blackscreen_msg .bs_ok").css("display","none");$("#blackscreen_msg .bs_error").css("display","none");$("#blackscreen_msg .bs_loading").css("display","block");},complete:function(){$("#blackscreen_msg .bs_loading").css("display","none");},error:function(){$("#blackscreen_msg .bs_ok").css("display","none");$("#blackscreen_msg .bs_loading").css("display","none");$("#blackscreen_msg .bs_error").css("display","block");$("#blackscreen_msg .bs_error").html('Error while trying to connect to server');},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){$("#blackscreen_msg .bs_ok").css("display","none");$("#blackscreen_msg .bs_loading").css("display","none");$("#blackscreen_msg .bs_error").css("display","block");$("#blackscreen_msg .bs_error").html('JSON Parse Error');return;}}}
if(json.ok==true){$("#blackscreen_msg .bs_loading").css("display","none");$("#blackscreen_msg .bs_error").css("display","none");$("#blackscreen_msg .bs_ok").css("display","block");$("#blackscreen_msg .bs_ok").html(json.msg);}else{$("#blackscreen_msg .bs_ok").css("display","none");$("#blackscreen_msg .bs_loading").css("display","none");$("#blackscreen_msg .bs_error").css("display","block");$("#blackscreen_msg .bs_error").html(json.error);}}});});$('.resent_activation').live('click',function(){blackscreen.msg_open($('#activation_mail_bc').html());return false;});$('.re_snd_ac_button').live('click',function(){$.ajax({url:'./?mod=user&act=active_retry',type:'POST',data:{'login':$('#blackscreen_msg .ident').val(),'ajax':'1','forma':'yep'},beforeSend:function(){$("#blackscreen_msg .bs_ok").css("display","none");$("#blackscreen_msg .bs_error").css("display","none");$("#blackscreen_msg .bs_loading").css("display","block");},complete:function(){$("#blackscreen_msg .bs_loading").css("display","none");},error:function(){$("#blackscreen_msg .bs_ok").css("display","none");$("#blackscreen_msg .bs_loading").css("display","none");$("#blackscreen_msg .bs_error").css("display","block");$("#blackscreen_msg .bs_error").html('Error while trying to connect to server');},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){$("#blackscreen_msg .bs_ok").css("display","none");$("#blackscreen_msg .bs_loading").css("display","none");$("#blackscreen_msg .bs_error").css("display","block");$("#blackscreen_msg .bs_error").html('JSON Parse Error');return;}}}
if(json.ok==true){$("#blackscreen_msg .bs_loading").css("display","none");$("#blackscreen_msg .bs_error").css("display","none");$("#blackscreen_msg .bs_ok").css("display","block");$("#blackscreen_msg .bs_ok").html(json.msg);}else{$("#blackscreen_msg .bs_ok").css("display","none");$("#blackscreen_msg .bs_loading").css("display","none");$("#blackscreen_msg .bs_error").css("display","block");$("#blackscreen_msg .bs_error").html(json.error);}}});});$('.ui_datepicker').live('click',function(){$(this).datepicker({showOn:'focus',dateFormat:'yy-mm-dd'}).focus();});$('.list_filters').click(function(){var q=$('.list_filter_form').serialize();$.ajax({url:document.location.href,type:'POST',data:q+'&ajax=1&list_filters=1',beforeSend:function(){$('.list_filter_loader').css('display','inline');},complete:function(){$('.list_filter_loader').css('display','none');},error:function(){alert('Error while trying to connect to server');$('.list_filter_loader').css('display','none');},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('#list_div').html(json.html);}else{alert(json.errors);}}});return false;});$('.ajax_list_pager').live('click',function(){var page=$(this).attr('rel');$.ajax({url:document.location.href+'&p='+page,type:'POST',data:'&ajax=1',beforeSend:function(){$('.list_filter_loader').css('display','inline');},complete:function(){$('.list_filter_loader').css('display','none');},error:function(){alert('Error while trying to connect to server');$('.list_filter_loader').css('display','none');},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('#list_div').html(json.html);gorivo_to('.list_filter_form');}else{alert(json.errors);}}});return false;});$('.search_cat_add').live('click',function(){var select_html=$('#search_filter_cat').html();cat='<tr><th></th><td colspan="2" class="search_cat_filter_td">';cat+='<select class="search_cat_select" style="font-size:11px">'+select_html+'</select>';cat+='<img class="search_cat_minus" src="./media/common/remove_icon.png" />';cat+='</td></tr>';$('#search_table > tbody:last').prev().append(cat);return false;});$('.search_cat_minus').live('click',function(){$(this).parent().parent().remove();});$('.ajax_search_pager').live('click',function(){if($('#search_only_photos').is(':checked')){photos=1;}else{photos=0;}
if($('#search_only_video').is(':checked')){videos=1;}else{videos=0;}
var q='q='+$('#search_q').val()+'&sort='+$('#search_sort_sel').val()+'&pager='+$('#pager').val()+'&photos='+photos+'&videos='+videos+'&ajax=1&p='+$(this).attr('rel');$('.search_cat_select').each(function(index){q+='&cat[]='+$(this).val();});$.ajax({url:"./?mod=skelbimai&act=search_ajax",data:q,beforeSend:function(){$("#ajax_indicator").css("display","inline");},error:function(){alert('Ivyko klaida')},complete:function(){$("#ajax_indicator").css("display","none");},success:function(data){$("#search_results").html(data);gorivo_to('#search_filter_cat');}});return false;});$('#search_form_submit').click(function(){if($('#search_only_photos').is(':checked')){photos=1;}else{photos=0;}
if($('#search_only_video').is(':checked')){videos=1;}else{videos=0;}
var q='q='+$('#search_q').val()+'&sort='+$('#search_sort_sel').val()+'&pager='+$('#pager').val()+'&photos='+photos+'&videos='+videos+'&ajax=1';$('.search_cat_select').each(function(index){q+='&cat[]='+$(this).val();});$.ajax({url:"./?mod=skelbimai&act=search_ajax",data:q,beforeSend:function(){$("#ajax_indicator").css("display","inline");},error:function(){alert('Ivyko klaida')},complete:function(){$("#ajax_indicator").css("display","none");},success:function(data){$("#search_results").html(data);}});});$('#save_search_link').click(function(){blackscreen.dom_open('save_search_bs');return false;});saved_search_created=function(guest){blackscreen.close();if(guest==false||guest=='false'){if($('#saved_search_block').is(":visible")==false){$('#saved_search_block').fadeIn();}
$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'renew'},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('#ss_searches_list').html(json.html);}else{alert(json.errors);}}});}}
$('.del_ss').live('click',function(){var ok=confirm(SS_DEL_CONFIRM);var el=$(this);if(ok){$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'del_ss','ss_id':el.attr('rel')},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){if($('.ss_div').length==1){$('#saved_search_block').fadeOut(function(){$('.ss_div').remove();alert(SS_DEL_OK);});}else{el.parent().fadeOut(function(){el.parent().remove();alert(SS_DEL_OK);});}}else{alert(json.errors);}}});}
return false;});$('.del_all_ss').live('click',function(){var ok=confirm(SS_DEL_ALL_CONFIRM);if(ok){$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'del_all_ss'},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('#saved_search_block').fadeOut(function(){$('.ss_div').remove();alert(SS_DEL_ALL_OK);});}else{alert(json.errors);}}});}
return false;});$('.stop_send_ss').live('click',function(){var ok=confirm(SS_STOP_SEND_CONFIRM);if(ok){$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'stop_send_all'},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(SS_STOP_SEND_OK);}else{alert(json.errors);}}});}
return false;});$('.start_send_ss').live('click',function(){var ok=confirm(SS_START_SEND_CONFIRM);if(ok){$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'start_send_all'},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(SS_START_SEND_OK);}else{alert(json.errors);}}});}
return false;});$('#ss_tbl_send_period').change(function(){var id=$(this).attr('rel');var interval=$(this).val();$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'ch_send_interval','ss_id':id,'interval':interval},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(json.msg);}else{alert(json.errors);}}});});ss_ch_email=function(new_email){blackscreen.close();$('#ss_email').html(new_email);}
$('#ss_tbl_ch_email').click(function(){blackscreen.dom_open('ss_ch_email_bs');$('#fcula_ss_ch_email_email').val($('#ss_email').html());return false;});ss_ch_title=function(new_title,guest){blackscreen.close();$('#ss_title').html(new_title);saved_search_created(guest);}
$('#ss_tbl_ch_title').click(function(){blackscreen.dom_open('ss_ch_title_bs');$('#fcula_ss_ch_title_title').val($('#ss_title').html());return false;});$('#ss_tbl_del_ss').click(function(){var ok=confirm(SS_DEL_CONFIRM);if(ok){$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'del_one_ss'},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(SS_DEL_OK);window.location='./';}else{alert(json.errors);}}});}
return false;});$('#ss_tbl_start_send_ss').live('click',function(){var id=$(this).attr('rel');$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'start_send_ss','ss_id':id},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('#ss_tbl_start_send_ss').fadeOut(function(){$('#ss_tbl_stop_send_ss').fadeIn();});}else{alert(json.errors);}}});return false;});$('#ss_tbl_stop_send_ss').live('click',function(){var id=$(this).attr('rel');$.ajax({url:document.location.href,type:'POST',data:{'ss_ajax':'stop_send_ss','ss_id':id},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('#ss_tbl_stop_send_ss').fadeOut(function(){$('#ss_tbl_start_send_ss').fadeIn();});}else{alert(json.errors);}}});return false;});ss_params_changed=function(){$('#ss_params_save_link').css('display','inline');}
$('#search_sort_sel').change(ss_params_changed);$('#search_only_photos').click(ss_params_changed);$('#search_only_video').click(ss_params_changed);$('.search_cat_select').live('change',ss_params_changed);$('.search_cat_add').click(ss_params_changed);$('.search_cat_minus').live('click',ss_params_changed);$('#ss_params_save_link').click(function(){var q='ss_ajax=update_ss_params';if($('#search_only_photos').is(':checked')){q+='&photos=1';}else{q+='&photos=0';}
if($('#search_only_video').is(':checked')){q+='&videos=1';}else{q+='&videos=0';}
q+='&sort='+$('#search_sort_sel').val();$('.search_cat_select').each(function(index){q+='&cat[]='+$(this).val();});$.ajax({url:document.location.href,type:'POST',data:q,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('#search_form_submit').click();saved_search_created(json.guest);$('#ss_params_save_link').css('display','none');alert(json.msg);}else{alert(json.errors);}}});return false;});$('.check_all_toggle').live('click',function(){if($(this).is(':checked')){$('.checked_el').attr('checked','checked');}else{$('.checked_el').removeAttr('checked');}});$('#filter_users').click(function(){var q=$('#user_filter_form').serialize()+'&ajax=filter';$.ajax({url:document.location.href,type:'POST',data:q,beforeSend:function(){$('#filter_users').attr('disabled','disabled')},complete:function(){$('#filter_users').removeAttr('disabled')},error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$.post(document.location.href,{'ajax':'get_contents'},function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok){$('.table_container').html(json.html);gorivo_to('.table_container');}});}else{alert(json.errors);}}});});$('.f_next_pg').live('click',function(){$.post($(this).attr('href'),{'ajax':'get_contents'},function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok){$('.table_container').html(json.html);gorivo_to('.table_container');}});return false;});$('.check_all_toggle, .checked_el').live('click',function(){if($('.checked_el:checked').length>0){$('.mass_actions :input').removeAttr('disabled');}else{$('.mass_actions :input').attr('disabled','disabled');}});$('.mass_action_btn').click(function(){var action=$(this).attr('rel');var ids='';$('.checked_el:checked').each(function(id){ids+='&ids[]='+$(this).val();});switch(action){case'active':ok=confirm(CONTROL_ACTIVE_CONF);if(ok){$.ajax({url:document.location.href,type:'POST',data:'ajax=mass_action&action=active'+ids,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('.checked_el:checked').each(function(){$(this).parent().parent().find('.activate').css('display','none');$(this).parent().parent().find('.deactivate').css('display','inline');});alert(json.msg);}else{alert(json.errors);}}});}
break;case'deactive':ok=confirm(CONTROL_DEACTIVE_CONF);if(ok){$.ajax({url:document.location.href,type:'POST',data:'ajax=mass_action&action=deactive'+ids,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('.checked_el:checked').each(function(){$(this).parent().parent().find('.activate').css('display','inline');$(this).parent().parent().find('.deactivate').css('display','none');});alert(json.msg);}else{alert(json.errors);}}});}
break;case'block':ok=confirm(CONTROL_BLOCK_CONF);if(ok){$.ajax({url:document.location.href,type:'POST',data:'ajax=mass_action&action=block'+ids,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('.checked_el:checked').each(function(){$(this).parent().parent().find('.block').css('display','none');$(this).parent().parent().find('.unblock').css('display','inline');});alert(json.msg);}else{alert(json.errors);}}});}
break;case'unblock':ok=confirm(CONTROL_UNBLOCK_CONF);if(ok){$.ajax({url:document.location.href,type:'POST',data:'ajax=mass_action&action=unblock'+ids,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('.checked_el:checked').each(function(){$(this).parent().parent().find('.block').css('display','inline');$(this).parent().parent().find('.unblock').css('display','none');});alert(json.msg);}else{alert(json.errors);}}});}
break;case'block_ip':ok=confirm(CONTROL_BLOCK_IP_CONF);if(ok){$.ajax({url:document.location.href,type:'POST',data:'ajax=mass_action&action=block_ips'+ids,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert('ip baninti');}else{alert(json.errors);}}});}
break;case'delete':ok=confirm(CONTROL_DELETE_CONF);if(ok){$.ajax({url:document.location.href,type:'POST',data:'ajax=mass_action&action=delete'+ids,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){$('.checked_el:checked').each(function(){var main=$(this).parent().parent();$(main).fadeOut(function(){$(main).remove();if($('.checked_el').length==0){$('#filter_users').click();}});});alert(json.msg);}else{alert(json.errors);}}});}
break;}});$('.action_btn').live('click',function(){var info=$(this).attr('rel').split(':');var action=info[0];var id=info[1];var el=$(this);switch(action){case'user_info':popup=window.open('./?mod=user&act=info_popup&id='+id,'name','height=469,width=800');if(window.focus){popup.focus()}
break;case'activate':$.ajax({url:document.location.href,type:'POST',data:'ajax=action&action=activate&id='+id,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(json.msg);$(el).parent().children('.activate').css('display','none');$(el).parent().children('.deactivate').css('display','inline');}else{alert(json.errors);}}});break;case'deactivate':$.ajax({url:document.location.href,type:'POST',data:'ajax=action&action=deactivate&id='+id,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(json.msg);$(el).parent().children('.activate').css('display','inline');$(el).parent().children('.deactivate').css('display','none');}else{alert(json.errors);}}});break;case'delete':ok=confirm(CONTROL_DELETE_USER_CONF);if(ok){$.ajax({url:document.location.href,type:'POST',data:'ajax=action&action=delete&id='+id,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){el.parent().parent().fadeOut(function(){alert(json.msg);});}else{alert(json.errors);}}});}
break;case'block':$.ajax({url:document.location.href,type:'POST',data:'ajax=action&action=block&id='+id,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(json.msg);$(el).parent().children('.block').css('display','none');$(el).parent().children('.unblock').css('display','inline');}else{alert(json.errors);}}});break;case'unblock':$.ajax({url:document.location.href,type:'POST',data:'ajax=action&action=unblock&id='+id,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(json.msg);$(el).parent().children('.block').css('display','inline');$(el).parent().children('.unblock').css('display','none');}else{alert(json.errors);}}});break;case'block_ip':$.ajax({url:document.location.href,type:'POST',data:'ajax=action&action=block_ip&id='+id,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(json.msg);$(el).parent().children('.block_ip').css('display','none');$(el).parent().children('.unblock_ip').css('display','inline');}else{alert(json.errors);}}});break;case'unblock_ip':$.ajax({url:document.location.href,type:'POST',data:'ajax=action&action=unblock_ip&id='+id,error:function(){alert('Error while trying to connect to server')},success:function(data){if(typeof data=='object'){json=data;}else{try{json=$.parseJSON(data);}catch(e){try{json=eval("("+data+")");}catch(e){alert('JSON Parse Error');return;}}}
if(json.ok==true){alert(json.msg);$(el).parent().children('.block_ip').css('display','inline');$(el).parent().children('.unblock_ip').css('display','none');}else{alert(json.errors);}}});break;}
return false;});$('.sortby').live('click',function(){var el=$(this).attr('rel');var param=$('#sort_field').val();var order=$('#sort_order').val();switch(el){case'id':if((param=='user_id')&&(order=='asc')){$('#sort_field').val('user_id');$('#sort_order').val('desc');}else{$('#sort_field').val('user_id');$('#sort_order').val('asc');}
break;case'username':if((param=='username')&&(order=='asc')){$('#sort_field').val('username');$('#sort_order').val('desc');}else{$('#sort_field').val('username');$('#sort_order').val('asc');}
break;case'email':if((param=='email')&&(order=='asc')){$('#sort_field').val('email');$('#sort_order').val('desc');}else{$('#sort_field').val('email');$('#sort_order').val('asc');}
break;case'vip_spent':if((param=='vip_spent')&&(order=='asc')){$('#sort_field').val('vip_spent');$('#sort_order').val('desc');}else{$('#sort_field').val('vip_spent');$('#sort_order').val('asc');}
break;case'ads_cnt':if((param=='ads_cnt')&&(order=='asc')){$('#sort_field').val('ads_cnt');$('#sort_order').val('desc');}else{$('#sort_field').val('ads_cnt');$('#sort_order').val('asc');}
break;case'last_login':if((param=='login')&&(order=='asc')){$('#sort_field').val('login');$('#sort_order').val('desc');}else{$('#sort_field').val('login');$('#sort_order').val('asc');}
break;case'ip':if((param=='ip')&&(order=='asc')){$('#sort_field').val('ip');$('#sort_order').val('desc');}else{$('#sort_field').val('ip');$('#sort_order').val('asc');}
break;}
$('#filter_users').click();return false;});});
///home/lzdem/domains/lzskelbimai.com/public_html/media/main/jquery.datepick/jquery.datepick-lt.js 

(function($){$.datepick.regional['lt']={monthNames:['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis','Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],monthNamesShort:['Sau','Vas','Kov','Bal','Geg','Bir','Lie','Rugp','Rugs','Spa','Lap','Gru'],dayNames:['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],dayNamesShort:['sek','pir','ant','tre','ket','pen','šeš'],dayNamesMin:['Se','Pr','An','Tr','Ke','Pe','Še'],dateFormat:'yyyy-mm-dd',firstDay:1,renderer:$.datepick.defaultRenderer,prevText:'&#x3c;Atgal',prevStatus:'',prevJumpText:'&#x3c;&#x3c;',prevJumpStatus:'',nextText:'Pirmyn&#x3e;',nextStatus:'',nextJumpText:'&#x3e;&#x3e;',nextJumpStatus:'',currentText:'Šiandien',currentStatus:'',todayText:'Šiandien',todayStatus:'',clearText:'Išvalyti',clearStatus:'',closeText:'Uždaryti',closeStatus:'',yearStatus:'',monthStatus:'',weekText:'Wk',weekStatus:'',dayStatus:'D, M d',defaultStatus:'',isRTL:false};$.datepick.setDefaults($.datepick.regional['lt']);})(jQuery);
///home/lzdem/domains/lzskelbimai.com/public_html/media/common/polls/polls.js 

$(document).ready(function(){$('#do_vote').click(function(){var val=$('.poll_answer:checked').val();if(val!=undefined){$.ajax({url:"/?mod=polls&act=ajax_vote",type:"GET",data:{'answer':val},error:function(xhr,status,error){alert(status)},success:function(data){var res=$.evalJSON(data);if(res.ok==true){var html='';$.each(res.data,function(key,value){html=html+value['answer']+'<span class="poll_percents">'+value['percents']+'%</span><span class="poll_votes">('+value['votes']+')</span><br/>';html=html+'<div class="poll_len_total"><div class="poll_len" title="'+value['percents']+'"></div></div>';});$('#poll_res_div').html(html);$('.poll_len').each(function(index){var in_pix=($(this).attr('title')*196)/100;$(this).animate({width:in_pix+'px'});});}else{alert(res.error);}}});}});$('#poll_show_rez').click(function(){$.ajax({url:"/?mod=polls&act=ajax_vote",type:"GET",data:{'answer':$('.poll_answer').val()+'_n'},error:function(){alert('Ivyko klaida')},success:function(data){var res=$.evalJSON(data);if(res.ok==true){var html='';$.each(res.data,function(key,value){html=html+value['answer']+'<span class="poll_percents">'+value['percents']+'%</span><span class="poll_votes">('+value['votes']+')</span><br/>';html=html+'<div class="poll_len_total"><div class="poll_len" title="'+value['percents']+'"></div></div>';});$('#poll_res_div').html(html);$('.poll_len').each(function(index){var in_pix=($(this).attr('title')*196)/100;$(this).animate({width:in_pix+'px'});});}else{alert(res.error);}}});return false;});});
///home/lzdem/domains/lzskelbimai.com/public_html/media/common/jquery.scrollTo-1.4.2.js 
;(function($){var $scrollTo=$.scrollTo=function(target,duration,settings){$(window).scrollTo(target,duration,settings);};$scrollTo.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};$scrollTo.window=function(scope){return $(window)._scrollable();};$.fn._scrollable=function(){return this.map(function(){var elem=this,isWin=!elem.nodeName||$.inArray(elem.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)
return elem;var doc=(elem.contentWindow||elem).document||elem.ownerDocument||elem;return $.browser.safari||doc.compatMode=='BackCompat'?doc.body:doc.documentElement;});};$.fn.scrollTo=function(target,duration,settings){if(typeof duration=='object'){settings=duration;duration=0;}
if(typeof settings=='function')
settings={onAfter:settings};if(target=='max')
target=9e9;settings=$.extend({},$scrollTo.defaults,settings);duration=duration||settings.speed||settings.duration;settings.queue=settings.queue&&settings.axis.length>1;if(settings.queue)
duration/=2;settings.offset=both(settings.offset);settings.over=both(settings.over);return this._scrollable().each(function(){var elem=this,$elem=$(elem),targ=target,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break;}
targ=$(targ,this);case'object':if(targ.is||targ.style)
toff=(targ=$(targ)).offset();}
$.each(settings.axis.split(''),function(i,axis){var Pos=axis=='x'?'Left':'Top',pos=Pos.toLowerCase(),key='scroll'+Pos,old=elem[key],max=$scrollTo.max(elem,axis);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(targ.css('margin'+Pos))||0;attr[key]-=parseInt(targ.css('border'+Pos+'Width'))||0;}
attr[key]+=settings.offset[pos]||0;if(settings.over[pos])
attr[key]+=targ[axis=='x'?'width':'height']()*settings.over[pos];}else{var val=targ[pos];attr[key]=val.slice&&val.slice(-1)=='%'?parseFloat(val)/100*max:val;}
if(/^\d+$/.test(attr[key]))
attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&settings.queue){if(old!=attr[key])
animate(settings.onAfterFirst);delete attr[key];}});animate(settings.onAfter);function animate(callback){$elem.animate(attr,duration,settings.easing,callback&&function(){callback.call(this,target,settings);});};}).end();};$scrollTo.max=function(elem,axis){var Dim=axis=='x'?'Width':'Height',scroll='scroll'+Dim;if(!$(elem).is('html,body'))
return elem[scroll]-$(elem)[Dim.toLowerCase()]();var size='client'+Dim,html=elem.ownerDocument.documentElement,body=elem.ownerDocument.body;return Math.max(html[scroll],body[scroll])
-Math.min(html[size],body[size]);};function both(val){return typeof val=='object'?val:{top:val,left:val};};})(jQuery);
