/*JQuery*/
(function(){if(typeof v!="undefined")var u=v;var v=window.jQuery=function(a,b){return this instanceof v?this.init(a,b):new v(a,b)};if(typeof $!="undefined")var w=$;window.$=v;var x=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;v.fn=v.prototype={init:function(a,b){a=a||document;if(typeof a=="string"){var m=x.exec(a);if(m&&(m[1]||!b)){if(m[1])a=v.clean([m[1]],b);else{var c=document.getElementById(m[3]);if(c)if(c.id!=m[3])return v().find(a);else{this[0]=c;this.length=1;return this}else a=[]}}else return new v(b).find(a)}else if(v.isFunction(a))return new v(document)[v.fn.ready?"ready":"load"](a);return this.setArray(a.constructor==Array&&a||(a.jquery||a.length&&a!=window&&!a.nodeType&&a[0]!=undefined&&a[0].nodeType)&&v.makeArray(a)||[a])},jquery:"1.2.1",size:function(){return this.length},length:0,get:function(a){return a==undefined?v.makeArray(this):this[a]},pushStack:function(a){var b=v(a);b.prevObject=this;return b},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return v.each(this,a,b)},index:function(a){var b=-1;this.each(function(i){if(this==a)b=i});return b},attr:function(c,d,e){var f=c;if(c.constructor==String)if(d==undefined)return this.length&&v[e||"attr"](this[0],c)||undefined;else{f={};f[c]=d}return this.each(function(a){for(var b in f)v.attr(e?this.style:this,b,v.prop(this,f[b],e,a,b))})},css:function(a,b){return this.attr(a,b,"curCSS")},text:function(e){if(typeof e!="object"&&e!=null)return this.empty().append(document.createTextNode(e));var t="";v.each(e||this,function(){v.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:v.fn.text([this])})});return t},wrapAll:function(b){if(this[0])v(b,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var a=this;while(a.firstChild)a=a.firstChild;return a}).append(this);return this},wrapInner:function(a){return this.each(function(){v(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){v(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||v([])},find:function(t){var b=v.map(this,function(a){return v.find(t,a)});return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?v.unique(b):b)},clone:function(d){var e=this.map(function(){return this.outerHTML?v(this.outerHTML)[0]:this.cloneNode(true)});var f=e.find("*").andSelf().each(function(){if(this[y]!=undefined)this[y]=null});if(d===true)this.find("*").andSelf().each(function(i){var a=v.data(this,"events");for(var b in a)for(var c in a[b])v.event.add(f[i],b,a[b][c],a[b][c].data)});return e},filter:function(t){return this.pushStack(v.isFunction(t)&&v.grep(this,function(a,b){return t.apply(a,[b])})||v.multiFilter(t,this))},not:function(t){return this.pushStack(t.constructor==String&&v.multiFilter(t,this,true)||v.grep(this,function(a){return(t.constructor==Array||t.jquery)?v.inArray(a,t)<0:a!=t}))},add:function(t){return this.pushStack(v.merge(this.get(),t.constructor==String?v(t).get():t.length!=undefined&&(!t.nodeName||v.nodeName(t,"form"))?t:[t]))},is:function(a){return a?v.multiFilter(a,this).length>0:false},hasClass:function(a){return this.is("."+a)},val:function(b){if(b==undefined){if(this.length){var c=this[0];if(v.nodeName(c,"select")){var d=c.selectedIndex,a=[],options=c.options,one=c.type=="select-one";if(d<0)return null;for(var i=one?d:0,max=one?d+1:options.length;i<max;i++){var e=options[i];if(e.selected){var b=v.browser.msie&&!e.attributes["value"].specified?e.text:e.value;if(one)return b;a.push(b)}}return a}else return this[0].value.replace(/\r/g,"")}}else return this.each(function(){if(b.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(v.inArray(this.value,b)>=0||v.inArray(this.name,b)>=0);else if(v.nodeName(this,"select")){var a=b.constructor==Array?b:[b];v("option",this).each(function(){this.selected=(v.inArray(this.value,a)>=0||v.inArray(this.text,a)>=0)});if(!a.length)this.selectedIndex=-1}else this.value=b})},html:function(a){return a==undefined?(this.length?this[0].innerHTML:null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(i){return this.slice(i,i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments))},map:function(b){return this.pushStack(v.map(this,function(a,i){return b.call(a,i,a)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(c,d,e,f){var g=this.length>1,a;return this.each(function(){if(!a){a=v.clean(c,this.ownerDocument);if(e<0)a.reverse()}var b=this;if(d&&v.nodeName(this,"table")&&v.nodeName(a[0],"tr"))b=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));v.each(a,function(){var a=g?this.cloneNode(true):this;if(!evalScript(0,a))f.call(b,a)})})}};function evalScript(i,a){var b=v.nodeName(a,"script");if(b){if(a.src)v.ajax({url:a.src,async:false,dataType:"script"});else v.globalEval(a.text||a.textContent||a.innerHTML||"");if(a.parentNode)a.parentNode.removeChild(a)}else if(a.nodeType==1)v("script",a).each(evalScript);return b}v.extend=v.fn.extend=function(){var b=arguments[0]||{},a=1,al=arguments.length,deep=false;if(b.constructor==Boolean){deep=b;b=arguments[1]||{}}if(al==1){b=this;a=0}var c;for(;a<al;a++)if((c=arguments[a])!=null)for(var i in c){if(b==c[i])continue;if(deep&&typeof c[i]=='object'&&b[i])v.extend(b[i],c[i]);else if(c[i]!=undefined)b[i]=c[i]}return b};var y="jQuery"+(new Date()).getTime(),uuid=0,win={};v.extend({noConflict:function(a){window.$=w;if(a)window.jQuery=u;return v},isFunction:function(a){return!!a&&typeof a!="string"&&!a.nodeName&&a.constructor!=Array&&/function/i.test(a+"")},isXMLDoc:function(a){return a.documentElement&&!a.body||a.tagName&&a.ownerDocument&&!a.ownerDocument.body},globalEval:function(a){a=v.trim(a);if(a){if(window.execScript)window.execScript(a);else if(v.browser.safari)window.setTimeout(a,0);else eval.call(window,a)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()},cache:{},data:function(a,b,c){a=a==window?win:a;var d=a[y];if(!d)d=a[y]=++uuid;if(b&&!v.cache[d])v.cache[d]={};if(c!=undefined)v.cache[d][b]=c;return b?v.cache[d][b]:d},removeData:function(a,b){a=a==window?win:a;var c=a[y];if(b){if(v.cache[c]){delete v.cache[c][b];b="";for(b in v.cache[c])break;if(!b)v.removeData(a)}}else{try{delete a[y]}catch(e){if(a.removeAttribute)a.removeAttribute(y)}delete v.cache[c]}},each:function(a,b,c){if(c){if(a.length==undefined)for(var i in a)b.apply(a[i],c);else for(var i=0,ol=a.length;i<ol;i++)if(b.apply(a[i],c)===false)break}else{if(a.length==undefined)for(var i in a)b.call(a[i],i,a[i]);else for(var i=0,ol=a.length,val=a[0];i<ol&&b.call(val,i,val)!==false;val=a[++i]){}}return a},prop:function(a,b,c,d,e){if(v.isFunction(b))b=b.call(a,[d]);var f=/z-?index|font-?weight|opacity|zoom|line-?height/i;return b&&b.constructor==Number&&c=="curCSS"&&!f.test(e)?b+"px":b},className:{add:function(b,c){v.each((c||"").split(/\s+/),function(i,a){if(!v.className.has(b.className,a))b.className+=(b.className?" ":"")+a})},remove:function(b,c){b.className=c!=undefined?v.grep(b.className.split(/\s+/),function(a){return!v.className.has(c,a)}).join(" "):""},has:function(t,c){return v.inArray(c,(t.className||t).toString().split(/\s+/))>-1}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i]}f.apply(e,[]);for(var i in o)e.style[i]=e.style["old"+i]},css:function(e,p){if(p=="height"||p=="width"){var b={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];v.each(d,function(){b["padding"+this]=0;b["border"+this+"Width"]=0});v.swap(e,b,function(){if(v(e).is(':visible')){oHeight=e.offsetHeight;oWidth=e.offsetWidth}else{e=v(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var a=v.css(e.parentNode,"position")||"static";if(a=="static")e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(a=="static")e.parentNode.style.position="static";e.parentNode.removeChild(e)}});return p=="height"?oHeight:oWidth}return v.curCSS(e,p)},curCSS:function(d,e,f){var g,stack=[],swap=[];function color(a){if(!v.browser.safari)return false;var b=document.defaultView.getComputedStyle(a,null);return!b||b.getPropertyValue("color")==""}if(e=="opacity"&&v.browser.msie){g=v.attr(d.style,"opacity");return g==""?"1":g}if(e.match(/float/i))e=B;if(!f&&d.style[e])g=d.style[e];else if(document.defaultView&&document.defaultView.getComputedStyle){if(e.match(/float/i))e="float";e=e.replace(/([A-Z])/g,"-$1").toLowerCase();var h=document.defaultView.getComputedStyle(d,null);if(h&&!color(d))g=h.getPropertyValue(e);else{for(var a=d;a&&color(a);a=a.parentNode)stack.unshift(a);for(a=0;a<stack.length;a++)if(color(stack[a])){swap[a]=stack[a].style.display;stack[a].style.display="block"}g=e=="display"&&swap[stack.length-1]!=null?"none":document.defaultView.getComputedStyle(d,null).getPropertyValue(e)||"";for(a=0;a<swap.length;a++)if(swap[a]!=null)stack[a].style.display=swap[a]}if(e=="opacity"&&g=="")g="1"}else if(d.currentStyle){var i=e.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});g=d.currentStyle[e]||d.currentStyle[i];if(!/^\d+(px)?$/i.test(g)&&/^\d/.test(g)){var j=d.style.left;var k=d.runtimeStyle.left;d.runtimeStyle.left=d.currentStyle.left;d.style.left=g||0;g=d.style.pixelLeft+"px";d.style.left=j;d.runtimeStyle.left=k}}return g},clean:function(a,e){var r=[];e=e||document;v.each(a,function(i,c){if(!c)return;if(c.constructor==Number)c=c.toString();if(typeof c=="string"){c=c.replace(/(<(\w+)[^>]*?)\/>/g,function(m,a,b){return b.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)?m:a+"></"+b+">"});var s=v.trim(c).toLowerCase(),div=e.createElement("div"),tb=[];var d=!s.indexOf("<opt")&&[1,"<select>","</select>"]||!s.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||s.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!s.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||v.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=d[1]+c+d[2];while(d[0]--)div=div.lastChild;if(v.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)tb=div.firstChild&&div.firstChild.childNodes;else if(d[1]=="<table>"&&s.indexOf("<tbody")<0)tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)if(v.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n]);if(/^\s/.test(c))div.insertBefore(e.createTextNode(c.match(/^\s*/)[0]),div.firstChild)}c=v.makeArray(div.childNodes)}if(0===c.length&&(!v.nodeName(c,"form")&&!v.nodeName(c,"select")))return;if(c[0]==undefined||v.nodeName(c,"form")||c.options)r.push(c);else r=v.merge(r,c)});return r},attr:function(a,c,d){var e=v.isXMLDoc(a)?{}:v.props;if(c=="selected"&&v.browser.safari)a.parentNode.selectedIndex;if(e[c]){if(d!=undefined)a[e[c]]=d;return a[e[c]]}else if(v.browser.msie&&c=="style")return v.attr(a.style,"cssText",d);else if(d==undefined&&v.browser.msie&&v.nodeName(a,"form")&&(c=="action"||c=="method"))return a.getAttributeNode(c).nodeValue;else if(a.tagName){if(d!=undefined){if(c=="type"&&v.nodeName(a,"input")&&a.parentNode)throw"type property can't be changed";a.setAttribute(c,d)}if(v.browser.msie&&/href|src/.test(c)&&!v.isXMLDoc(a))return a.getAttribute(c,2);return a.getAttribute(c)}else{if(c=="opacity"&&v.browser.msie){if(d!=undefined){a.zoom=1;a.filter=(a.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(d).toString()=="NaN"?"":"alpha(opacity="+d*100+")")}return a.filter?(parseFloat(a.filter.match(/opacity=([^)]*)/)[1])/100).toString():""}c=c.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase()});if(d!=undefined)a[c]=d;return a[c]}},trim:function(t){return(t||"").replace(/^\s+|\s+$/g,"")},makeArray:function(a){var r=[];if(typeof a!="array")for(var i=0,al=a.length;i<al;i++)r.push(a[i]);else r=a.slice(0);return r},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)if(a[i]==b)return i;return-1},merge:function(a,b){if(v.browser.msie){for(var i=0;b[i];i++)if(b[i].nodeType!=8)a.push(b[i])}else for(var i=0;b[i];i++)a.push(b[i]);return a},unique:function(a){var r=[],done={};try{for(var i=0,fl=a.length;i<fl;i++){var b=v.data(a[i]);if(!done[b]){done[b]=true;r.push(a[i])}}}catch(e){r=a}return r},grep:function(a,b,c){if(typeof b=="string")b=eval("false||function(a,i){return "+b+"}");var d=[];for(var i=0,el=a.length;i<el;i++)if(!c&&b(a[i],i)||c&&!b(a[i],i))d.push(a[i]);return d},map:function(a,b){if(typeof b=="string")b=eval("false||function(a){return "+b+"}");var c=[];for(var i=0,el=a.length;i<el;i++){var d=b(a[i],i);if(d!==null&&d!=undefined){if(d.constructor!=Array)d=[d];c=c.concat(d)}}return c}});var A=navigator.userAgent.toLowerCase();v.browser={version:(A.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(A),opera:/opera/.test(A),msie:/msie/.test(A)&&!/opera/.test(A),mozilla:/mozilla/.test(A)&&!/(compatible|webkit)/.test(A)};var B=v.browser.msie?"styleFloat":"cssFloat";v.extend({boxModel:!v.browser.msie||document.compatMode=="CSS1Compat",styleFloat:v.browser.msie?"styleFloat":"cssFloat",props:{"for":"htmlFor","class":"className","float":B,cssFloat:B,styleFloat:B,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength"}});v.each({parent:"a.parentNode",parents:"jQuery.dir(a,'parentNode')",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",nextAll:"jQuery.dir(a,'nextSibling')",prevAll:"jQuery.dir(a,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)",contents:"jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"},function(i,n){v.fn[i]=function(a){var b=v.map(this,n);if(a&&typeof a=="string")b=v.multiFilter(a,b);return this.pushStack(v.unique(b))}});v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(i,n){v.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)v(a[j])[n](this)})}});v.each({removeAttr:function(a){v.attr(this,a,"");this.removeAttribute(a)},addClass:function(c){v.className.add(this,c)},removeClass:function(c){v.className.remove(this,c)},toggleClass:function(c){v.className[v.className.has(this,c)?"remove":"add"](this,c)},remove:function(a){if(!a||v.filter(a,[this]).r.length){v.removeData(this);this.parentNode.removeChild(this)}},empty:function(){v("*",this).each(function(){v.removeData(this)});while(this.firstChild)this.removeChild(this.firstChild)}},function(i,n){v.fn[i]=function(){return this.each(n,arguments)}});v.each(["Height","Width"],function(i,a){var n=a.toLowerCase();v.fn[n]=function(h){return this[0]==window?v.browser.safari&&self["inner"+a]||v.boxModel&&Math.max(document.documentElement["client"+a],document.body["client"+a])||document.body["client"+a]:this[0]==document?Math.max(document.body["scroll"+a],document.body["offset"+a]):h==undefined?(this.length?v.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px")}});var C=v.browser.safari&&parseInt(v.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+C+"+)"),quickID=new RegExp("^("+C+"+)(#)("+C+"+)"),quickClass=new RegExp("^([#.]?)("+C+"*)");v.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+C+"+)")],multiFilter:function(a,b,c){var d,cur=[];while(a&&a!=d){d=a;var f=v.filter(a,b,c);a=f.t.replace(/^\s*,\s*/,"");cur=c?b=f.r:v.merge(cur,f.r)}return cur},find:function(t,a){if(typeof t!="string")return[t];if(a&&!a.nodeType)a=null;a=a||document;var b=[a],done=[],last;while(t&&last!=t){var r=[];last=t;t=v.trim(t);var d=false;var e=quickChild;var m=e.exec(t);if(m){var f=m[1].toUpperCase();for(var i=0;b[i];i++)for(var c=b[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(f=="*"||c.nodeName.toUpperCase()==f.toUpperCase()))r.push(c);b=r;t=t.replace(e,"");if(t.indexOf(" ")==0)continue;d=true}else{e=/^([>+~])\s*(\w*)/i;if((m=e.exec(t))!=null){r=[];var f=m[2],merge={};m=m[1];for(var j=0,rl=b.length;j<rl;j++){var n=m=="~"||m=="+"?b[j].nextSibling:b[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var g=v.data(n);if(m=="~"&&merge[g])break;if(!f||n.nodeName.toUpperCase()==f.toUpperCase()){if(m=="~")merge[g]=true;r.push(n)}if(m=="+")break}}b=r;t=v.trim(t.replace(e,""));d=true}}if(t&&!d){if(!t.indexOf(",")){if(a==b[0])b.shift();done=v.merge(done,b);r=b=[a];t=" "+t.substr(1,t.length)}else{var h=quickID;var m=h.exec(t);if(m){m=[0,m[2],m[3],m[1]]}else{h=quickClass;m=h.exec(t)}m[2]=m[2].replace(/\\/g,"");var k=b[b.length-1];if(m[1]=="#"&&k&&k.getElementById&&!v.isXMLDoc(k)){var l=k.getElementById(m[2]);if((v.browser.msie||v.browser.opera)&&l&&typeof l.id=="string"&&l.id!=m[2])l=v('[@id="'+m[2]+'"]',k)[0];b=r=l&&(!m[3]||v.nodeName(l,m[3]))?[l]:[]}else{for(var i=0;b[i];i++){var o=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(o=="*"&&b[i].nodeName.toLowerCase()=="object")o="param";r=v.merge(r,b[i].getElementsByTagName(o))}if(m[1]==".")r=v.classFilter(r,m[2]);if(m[1]=="#"){var p=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){p=[r[i]];break}r=p}b=r}t=t.replace(h,"")}}if(t){var q=v.filter(t,r);b=r=q.r;t=v.trim(q.t)}}if(t)b=[];if(b&&a==b[0])b.shift();done=v.merge(done,b);return done},classFilter:function(r,m,a){m=" "+m+" ";var b=[];for(var i=0;r[i];i++){var c=(" "+r[i].className+" ").indexOf(m)>=0;if(!a&&c||a&&!c)b.push(r[i])}return b},filter:function(t,r,b){var d;while(t&&t!=d){d=t;var p=v.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=v.filter(m[3],r,true).r;else if(m[1]==".")r=v.classFilter(r,m[2],b);else if(m[1]=="["){var e=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[v.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=v.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^b)e.push(a)}r=e}else if(m[1]==":"&&m[2]=="nth-child"){var g={},e=[],test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]),first=(test[1]||1)-0,d=test[2]-0;for(var i=0,rl=r.length;i<rl;i++){var h=r[i],parentNode=h.parentNode,id=v.data(parentNode);if(!g[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;g[id]=true}var j=false;if(first==1){if(d==0||h.nodeIndex==d)j=true}else if((h.nodeIndex+d)%first==0)j=true;if(j^b)e.push(h)}r=e}else{var f=v.expr[m[1]];if(typeof f!="string")f=v.expr[m[1]][m[2]];f=eval("false||function(a,i){return "+f+"}");r=v.grep(r,f,b)}}return{r:r,t:t}},dir:function(a,b){var c=[];var d=a[b];while(d&&d!=document){if(d.nodeType==1)c.push(d);d=d[b]}return c},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType==1&&++e==b)break;return a},sibling:function(n,a){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!a||n!=a))r.push(n)}return r}});v.event={add:function(b,c,d,e){if(v.browser.msie&&b.setInterval!=undefined)b=window;if(!d.guid)d.guid=this.guid++;if(e!=undefined){var f=d;d=function(){return f.apply(this,arguments)};d.data=e;d.guid=f.guid}var g=c.split(".");c=g[0];d.type=g[1];var h=v.data(b,"events")||v.data(b,"events",{});var i=v.data(b,"handle",function(){var a;if(typeof v=="undefined"||v.event.triggered)return a;a=v.event.handle.apply(b,arguments);return a});var j=h[c];if(!j){j=h[c]={};if(b.addEventListener)b.addEventListener(c,i,false);else b.attachEvent("on"+c,i)}j[d.guid]=d;this.global[c]=true},guid:1,global:{},remove:function(a,b,c){var d=v.data(a,"events"),ret,index;if(typeof b=="string"){var e=b.split(".");b=e[0]}if(d){if(b&&b.type){c=b.handler;b=b.type}if(!b){for(b in d)this.remove(a,b)}else if(d[b]){if(c)delete d[b][c.guid];else for(c in d[b])if(!e[1]||d[b][c].type==e[1])delete d[b][c];for(ret in d[b])break;if(!ret){if(a.removeEventListener)a.removeEventListener(b,v.data(a,"handle"),false);else a.detachEvent("on"+b,v.data(a,"handle"));ret=null;delete d[b]}}for(ret in d)break;if(!ret){v.removeData(a,"events");v.removeData(a,"handle")}}},trigger:function(a,b,c,d,e){b=v.makeArray(b||[]);if(!c){if(this.global[a])v("*").add([window,document]).trigger(a,b)}else{var f,ret,fn=v.isFunction(c[a]||null),evt=!b[0]||!b[0].preventDefault;if(evt)b.unshift(this.fix({type:a,target:c}));b[0].type=a;if(v.isFunction(v.data(c,"handle")))f=v.data(c,"handle").apply(c,b);if(!fn&&c["on"+a]&&c["on"+a].apply(c,b)===false)f=false;if(evt)b.shift();if(e&&e.apply(c,b)===false)f=false;if(fn&&d!==false&&f!==false&&!(v.nodeName(c,'a')&&a=="click")){this.triggered=true;c[a]()}this.triggered=false}return f},handle:function(a){var b;a=v.event.fix(a||window.event||{});var d=a.type.split(".");a.type=d[0];var c=v.data(this,"events")&&v.data(this,"events")[a.type],args=Array.prototype.slice.call(arguments,1);args.unshift(a);for(var j in c){args[0].handler=c[j];args[0].data=c[j].data;if(!d[1]||c[j].type==d[1]){var e=c[j].apply(this,args);if(b!==false)b=e;if(e===false){a.preventDefault();a.stopPropagation()}}}if(v.browser.msie)a.target=a.preventDefault=a.stopPropagation=a.handler=a.data=null;return b},fix:function(a){var c=a;a=v.extend({},c);a.preventDefault=function(){if(c.preventDefault)c.preventDefault();c.returnValue=false};a.stopPropagation=function(){if(c.stopPropagation)c.stopPropagation();c.cancelBubble=true};if(!a.target&&a.srcElement)a.target=a.srcElement;if(v.browser.safari&&a.target.nodeType==3)a.target=c.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement==a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){var e=document.documentElement,b=document.body;a.pageX=a.clientX+(e&&e.scrollLeft||b.scrollLeft||0);a.pageY=a.clientY+(e&&e.scrollTop||b.scrollTop||0)}if(!a.which&&(a.charCode||a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button)a.which=(a.button&1?1:(a.button&2?3:(a.button&4?2:0)));return a}};v.fn.extend({bind:function(a,b,c){return a=="unload"?this.one(a,b,c):this.each(function(){v.event.add(this,a,c||b,c&&b)})},one:function(b,c,d){return this.each(function(){v.event.add(this,b,function(a){v(this).unbind(a);return(d||c).apply(this,arguments)},d&&c)})},unbind:function(a,b){return this.each(function(){v.event.remove(this,a,b)})},trigger:function(a,b,c){return this.each(function(){v.event.trigger(a,b,this,true,c)})},triggerHandler:function(a,b,c){if(this[0])return v.event.trigger(a,b,this[0],false,c)},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=0==this.lastToggle?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false})},hover:function(f,g){function handleHover(e){var p=e.relatedTarget;while(p&&p!=this)try{p=p.parentNode}catch(e){p=this};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e])}return this.mouseover(handleHover).mouseout(handleHover)},ready:function(f){bindReady();if(v.isReady)f.apply(document,[v]);else v.readyList.push(function(){return f.apply(this,[v])});return this}});v.extend({isReady:false,readyList:[],ready:function(){if(!v.isReady){v.isReady=true;if(v.readyList){v.each(v.readyList,function(){this.apply(document)});v.readyList=null}if(v.browser.mozilla||v.browser.opera)document.removeEventListener("DOMContentLoaded",v.ready,false);if(!window.frames.length)v(window).load(function(){v("#__ie_init").remove()})}}});v.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){v.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o)}});var D=false;function bindReady(){if(D)return;D=true;if(v.browser.mozilla||v.browser.opera)document.addEventListener("DOMContentLoaded",v.ready,false);else if(v.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var a=document.getElementById("__ie_init");if(a)a.onreadystatechange=function(){if(this.readyState!="complete")return;v.ready()};a=null}else if(v.browser.safari)v.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(v.safariTimer);v.safariTimer=null;v.ready()}},10);v.event.add(window,"load",v.ready)}v.fn.extend({load:function(c,d,e){if(v.isFunction(c))return this.bind("load",c);var f=c.indexOf(" ");if(f>=0){var g=c.slice(f,c.length);c=c.slice(0,f)}e=e||function(){};var h="GET";if(d)if(v.isFunction(d)){e=d;d=null}else{d=v.param(d);h="POST"}var i=this;v.ajax({url:c,type:h,data:d,complete:function(a,b){if(b=="success"||b=="notmodified")i.html(g?v("<div/>").append(a.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(g):a.responseText);setTimeout(function(){i.each(e,[a.responseText,b,a])},13)}});return this},serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return v.nodeName(this,"form")?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(i,b){var c=v(this).val();return c==null?null:c.constructor==Array?v.map(c,function(a,i){return{name:b.name,value:a}}):{name:b.name,value:c}}).get()}});v.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){v.fn[o]=function(f){return this.bind(o,f)}});var E=(new Date).getTime();v.extend({get:function(a,b,c,d){if(v.isFunction(b)){c=b;b=null}return v.ajax({type:"GET",url:a,data:b,success:c,dataType:d})},getScript:function(a,b){return v.get(a,null,b,"script")},getJSON:function(a,b,c){return v.get(a,b,c,"json")},post:function(a,b,c,d){if(v.isFunction(b)){c=b;b={}}return v.ajax({type:"POST",url:a,data:b,success:c,dataType:d})},ajaxSetup:function(a){v.extend(v.ajaxSettings,a)},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){var c,jsre=/=(\?|%3F)/g,status,data;s=v.extend(true,s,v.extend(true,{},v.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=v.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="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))){c="jsonp"+E++;if(s.data)s.data=s.data.replace(jsre,"="+c);s.url=s.url.replace(jsre,"="+c);s.dataType="script";window[c]=function(a){data=a;success();complete();window[c]=undefined;try{delete window[c]}catch(e){}}}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get")s.url+=(s.url.match(/\?/)?"&":"?")+"_="+(new Date()).getTime();if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!v.active++)v.event.trigger("ajaxStart");if(!s.url.indexOf("http")&&s.dataType=="script"){var d=document.getElementsByTagName("head")[0];var f=document.createElement("script");f.src=s.url;if(!c&&(s.success||s.complete)){var g=false;f.onload=f.onreadystatechange=function(){if(!g&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){g=true;success();complete();d.removeChild(f)}}}d.appendChild(f);return}var h=false;var i=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();i.open(s.type,s.url,s.async);if(s.data)i.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)i.setRequestHeader("If-Modified-Since",v.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");i.setRequestHeader("X-Requested-With","XMLHttpRequest");if(s.beforeSend)s.beforeSend(i);if(s.global)v.event.trigger("ajaxSend",[i,s]);var j=function(a){if(!h&&i&&(i.readyState==4||a=="timeout")){h=true;if(k){clearInterval(k);k=null}status=a=="timeout"&&"timeout"||!v.httpSuccess(i)&&"error"||s.ifModified&&v.httpNotModified(i,s.url)&&"notmodified"||"success";if(status=="success"){try{data=v.httpData(i,s.dataType)}catch(e){status="parsererror"}}if(status=="success"){var b;try{b=i.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&b)v.lastModified[s.url]=b;if(!c)success()}else v.handleError(s,i,status);complete();if(s.async)i=null}};if(s.async){var k=setInterval(j,13);if(s.timeout>0)setTimeout(function(){if(i){i.abort();if(!h)j("timeout")}},s.timeout)}try{i.send(s.data)}catch(e){v.handleError(s,i,null,e)}if(!s.async)j();return i;function success(){if(s.success)s.success(data,status);if(s.global)v.event.trigger("ajaxSuccess",[i,s])}function complete(){if(s.complete)s.complete(i,status);if(s.global)v.event.trigger("ajaxComplete",[i,s]);if(s.global&&!--v.active)v.event.trigger("ajaxStop")}},handleError:function(s,a,b,e){if(s.error)s.error(a,b,e);if(s.global)v.event.trigger("ajaxError",[a,s,e])},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||v.browser.safari&&r.status==undefined}catch(e){}return false},httpNotModified:function(a,b){try{var c=a.getResponseHeader("Last-Modified");return a.status==304||c==v.lastModified[b]||v.browser.safari&&a.status==undefined}catch(e){}return false},httpData:function(r,a){var b=r.getResponseHeader("content-type");var c=a=="xml"||!a&&b&&b.indexOf("xml")>=0;var d=c?r.responseXML:r.responseText;if(c&&d.documentElement.tagName=="parsererror")throw"parsererror";if(a=="script")v.globalEval(d);if(a=="json")d=eval("("+d+")");return d},param:function(a){var s=[];if(a.constructor==Array||a.jquery)v.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value))});else for(var j in a)if(a[j]&&a[j].constructor==Array)v.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this))});else s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+")}});v.fn.extend({show:function(a,b){return a?this.animate({height:"show",width:"show",opacity:"show"},a,b):this.filter(":hidden").each(function(){this.style.display=this.oldblock?this.oldblock:"";if(v.css(this,"display")=="none")this.style.display="block"}).end()},hide:function(a,b){return a?this.animate({height:"hide",width:"hide",opacity:"hide"},a,b):this.filter(":visible").each(function(){this.oldblock=this.oldblock||v.css(this,"display");if(this.oldblock=="none")this.oldblock="block";this.style.display="none"}).end()},_toggle:v.fn.toggle,toggle:function(a,b){return v.isFunction(a)&&v.isFunction(b)?this._toggle(a,b):a?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},a,b):this.each(function(){v(this)[v(this).is(":hidden")?"show":"hide"]()})},slideDown:function(a,b){return this.animate({height:"show"},a,b)},slideUp:function(a,b){return this.animate({height:"hide"},a,b)},slideToggle:function(a,b){return this.animate({height:"toggle"},a,b)},fadeIn:function(a,b){return this.animate({opacity:"show"},a,b)},fadeOut:function(a,b){return this.animate({opacity:"hide"},a,b)},fadeTo:function(a,b,c){return this.animate({opacity:b},a,c)},animate:function(g,h,i,j){var k=v.speed(h,i,j);return this[k.queue===false?"each":"queue"](function(){k=v.extend({},k);var f=v(this).is(":hidden"),self=this;for(var p in g){if(g[p]=="hide"&&f||g[p]=="show"&&!f)return v.isFunction(k.complete)&&k.complete.apply(this);if(p=="height"||p=="width"){k.display=v.css(this,"display");k.overflow=this.style.overflow}}if(k.overflow!=null)this.style.overflow="hidden";k.curAnim=v.extend({},g);v.each(g,function(a,b){var e=new v.fx(self,k,a);if(/toggle|show|hide/.test(b))e[b=="toggle"?f?"show":"hide":b](g);else{var c=b.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(c){var d=parseFloat(c[2]),unit=c[3]||"px";if(unit!="px"){self.style[a]=(d||1)+unit;start=((d||1)/e.cur(true))*start;self.style[a]=start+unit}if(c[1])d=((c[1]=="-="?-1:1)*d)+start;e.custom(start,d,unit)}else e.custom(start,b,"")}});return true})},queue:function(a,b){if(v.isFunction(a)){b=a;a="fx"}if(!a||(typeof a=="string"&&!b))return F(this[0],a);return this.each(function(){if(b.constructor==Array)F(this,a,b);else{F(this,a).push(b);if(F(this,a).length==1)b.apply(this)}})},stop:function(){var a=v.timers;return this.each(function(){for(var i=0;i<a.length;i++)if(a[i].elem==this)a.splice(i--,1)}).dequeue()}});var F=function(a,b,c){if(!a)return;var q=v.data(a,b+"queue");if(!q||c)q=v.data(a,b+"queue",c?v.makeArray(c):[]);return q};v.fn.dequeue=function(a){a=a||"fx";return this.each(function(){var q=F(this,a);q.shift();if(q.length)q[0].apply(this)})};v.extend({speed:function(a,b,c){var d=a&&a.constructor==Object?a:{complete:c||!c&&b||v.isFunction(a)&&a,duration:a,easing:c&&b||b&&b.constructor!=Function&&b};d.duration=(d.duration&&d.duration.constructor==Number?d.duration:{slow:600,fast:200}[d.duration])||400;d.old=d.complete;d.complete=function(){v(this).dequeue();if(v.isFunction(d.old))d.old.apply(this)};return d},easing:{linear:function(p,n,a,b){return a+b*p},swing:function(p,n,a,b){return((-Math.cos(p*Math.PI)/2)+0.5)*b+a}},timers:[],fx:function(a,b,c){this.options=b;this.elem=a;this.prop=c;if(!b.orig)b.orig={}}});v.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(v.fx.step[this.prop]||v.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(v.curCSS(this.elem,this.prop,a));return r&&r>-10000?r:parseFloat(v.css(this.elem,this.prop))||0},custom:function(b,c,d){this.startTime=(new Date()).getTime();this.start=b;this.end=c;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var e=this;function t(){return e.step()}t.elem=this.elem;v.timers.push(t);if(v.timers.length==1){var f=setInterval(function(){var a=v.timers;for(var i=0;i<a.length;i++)if(!a[i]())a.splice(i--,1);if(!a.length)clearInterval(f)},13)}},show:function(){this.options.orig[this.prop]=v.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";v(this.elem).show()},hide:function(){this.options.orig[this.prop]=v.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(){var t=(new Date()).getTime();if(t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var a=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)a=false;if(a){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(v.css(this.elem,"display")=="none")this.elem.style.display="block"}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)v.attr(this.elem.style,p,this.options.orig[p])}if(a&&v.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=v.easing[this.options.easing||(v.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}};v.fx.step={scrollLeft:function(a){a.elem.scrollLeft=a.now},scrollTop:function(a){a.elem.scrollTop=a.now},opacity:function(a){v.attr(a.elem.style,"opacity",a.now)},_default:function(a){a.elem.style[a.prop]=a.now+a.unit}};v.fn.offset=function(){var b=0,top=0,elem=this[0],results;if(elem)with(v.browser){var c=v.css(elem,"position")=="absolute",parent=elem.parentNode,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522;if(elem.getBoundingClientRect){box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));if(msie){var d=v("html").css("borderWidth");d=(d=="medium"||v.boxModel&&parseInt(version)>=7)&&2||d;add(-d,-d)}}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&/^t[d|h]$/i.test(parent.tagName)||!safari2)d(offsetParent);if(safari2&&!c&&v.css(offsetParent,"position")=="absolute")c=true;offsetParent=offsetParent.offsetParent}while(parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table-row.*$/i.test(v.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&v.css(parent,"overflow")!="visible")d(parent);parent=parent.parentNode}if(safari2&&c)add(-doc.body.offsetLeft,-doc.body.offsetTop)}results={top:top,left:b}}return results;function d(a){add(v.css(a,"borderLeftWidth"),v.css(a,"borderTopWidth"))}function add(l,t){b+=parseInt(l)||0;top+=parseInt(t)||0}}})();(function($){function runTicker(a){if(a.firstRun==1){currentLength=a.currentLength;currentItem=a.currentItem;a.firstRun=0}if(currentItem==a.newsItemCounter+1){currentItem=0}if(currentLength==0){$(a.newsList).empty().append('<li><a href="'+a.newsLinks[currentItem]+'"></a></li>')}if(currentLength%2==0){placeHolder=a.placeHolder1}else{placeHolder=a.placeHolder2}if(currentLength<=a.newsItems[currentItem].length+1){var b=a.newsItems[currentItem].substring(0,currentLength);$(a.newsList+' li a').text(b+placeHolder);currentLength++;setTimeout(function(){runTicker(a);a=null},a.tickerRate)}else{$(a.newsList+' li a').text(a.newsItems[currentItem]);currentLength=0;currentItem++;setTimeout(function(){runTicker(a);a=null},a.loopDelay)}}$.fn.extend({newsTicker:function(a){a=jQuery.extend({newsList:"#news",tickerRate:80,startDelay:100,loopDelay:3000,placeHolder1:" |",placeHolder2:"_"},a);var b=new Array();var c=new Array();var d=0;$(a.newsList+' li a').each(function(){b[d]=$(this).text();c[d]=$(this).attr('href');d++});a=jQuery.extend(a,{newsItems:b,newsLinks:c,newsItemCounter:d-1,currentItem:0,currentLength:0,firstRun:1});setTimeout(function(){runTicker(a);a=null},a.startDelay)}})})(jQuery);
/*LiveQuery*/
(function($){$.extend($.fn,{livequery:function(a,b,c){if($.isFunction(a))c=b,b=a,a=undefined;$.livequery.run(new $.livequery(this.selector,this.context,a,b,c).id);return this},expire:function(b,c,d){var e=this;if($.isFunction(b))d=c,c=b,b=undefined;$.each($.livequery.queries,function(i,a){if(e.selector==a.selector&&e.context==a.context&&(!b||b==a.type)&&(!c||c.$lqguid==a.fn.$lqguid)&&(!d||d.$lqguid==a.fn2.$lqguid)&&!this.stopped)$.livequery.stop(a.id)});return this}});$.livequery=function(a,b,c,d,e){this.selector=a;this.context=b||document;this.type=c;this.fn=d;this.fn2=e;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;d.$lqguid=d.$lqguid||$.livequery.guid++;if(e)e.$lqguid=e.$lqguid||$.livequery.guid++;return this};$.extend($.livequery.prototype,{stop:function(){var b=this;if(this.type)this.elements.unbind(this.type,this.fn);else if(this.fn2)this.elements.each(function(i,a){b.fn2.apply(a)});this.elements=[];this.stopped=true},run:function(){if(this.stopped)return;var b=this;var c=this.elements,els=$(this.selector,this.context),nEls=els.not(c);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(c.length>0)$.each(c,function(i,a){if($.inArray(a,els)<0)$.event.remove(a,b.type,b.fn)})}else{nEls.each(function(){b.fn.apply(this)});if(this.fn2&&c.length>0)$.each(c,function(i,a){if($.inArray(a,els)<0)b.fn2.apply(a)})}}});$.extend($.livequery,{queries:[],running:false,queue:[],interval:null,guid:0,checkQueue:function(){if($.livequery.queue.length&&!$.livequery.running){$.livequery.running=true;var a=$.livequery.queue.length;while(a--)$.livequery.get($.livequery.queue.shift()).run();$.livequery.running=false}},pause:function(){clearInterval($.livequery.interval)},play:function(){$.livequery.checkQueue();$.livequery.interval=setInterval($.livequery.checkQueue,20)},get:function(a){return $.livequery.queries[a]},registerPlugin:function(){$.each(arguments,function(i,n){var a=$.fn[n];$.fn[n]=function(){var r=a.apply(this,arguments);$.livequery.run();return r}})},run:function(b){if(b!=undefined){if($.inArray(b,$.livequery.queue)<0)$.livequery.queue.push(b)}else $.each($.livequery.queries,function(a){if($.inArray(a,$.livequery.queue)<0)$.livequery.queue.push(a)})},stop:function(b){if(b!=undefined)$.livequery.get(b).stop();else $.each($.livequery.queries,function(a){$.livequery.get(a).stop()})}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','addClass','removeClass');$(function(){$.livequery.play()});var f=$.prototype.init;$.prototype.init=function(a,c){var r=f.apply(this,arguments);if(a&&a.selector)r.context=a.context,r.selector=a.selector;if(typeof a=='string')r.context=c||document,r.selector=a;return r}})(jQuery);
/*Dimensions*/
(function($){var e=$.fn.height,width=$.fn.width;$.fn.extend({height:function(){if(!this[0])f();if(this[0]==window)if($.browser.opera||($.browser.safari&&parseInt($.browser.version)>520))return self.innerHeight-(($(document).height()>self.innerHeight)?j():0);else if($.browser.safari)return self.innerHeight;else return $.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;if(this[0]==document)return Math.max(($.boxModel&&document.documentElement.scrollHeight||document.body.scrollHeight),document.body.offsetHeight);return e.apply(this,arguments)},width:function(){if(!this[0])f();if(this[0]==window)if($.browser.opera||($.browser.safari&&parseInt($.browser.version)>520))return self.innerWidth-(($(document).width()>self.innerWidth)?j():0);else if($.browser.safari)return self.innerWidth;else return $.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;if(this[0]==document)if($.browser.mozilla){var a=self.pageXOffset;self.scrollTo(99999999,self.pageYOffset);var b=self.pageXOffset;self.scrollTo(a,self.pageYOffset);return document.body.offsetWidth+b}else return Math.max((($.boxModel&&!$.browser.safari)&&document.documentElement.scrollWidth||document.body.scrollWidth),document.body.offsetWidth);return width.apply(this,arguments)},innerHeight:function(){if(!this[0])f();return this[0]==window||this[0]==document?this.height():this.is(':visible')?this[0].offsetHeight-g(this,'borderTopWidth')-g(this,'borderBottomWidth'):this.height()+g(this,'paddingTop')+g(this,'paddingBottom')},innerWidth:function(){if(!this[0])f();return this[0]==window||this[0]==document?this.width():this.is(':visible')?this[0].offsetWidth-g(this,'borderLeftWidth')-g(this,'borderRightWidth'):this.width()+g(this,'paddingLeft')+g(this,'paddingRight')},outerHeight:function(a){if(!this[0])f();a=$.extend({margin:false},a||{});return this[0]==window||this[0]==document?this.height():this.is(':visible')?this[0].offsetHeight+(a.margin?(g(this,'marginTop')+g(this,'marginBottom')):0):this.height()+g(this,'borderTopWidth')+g(this,'borderBottomWidth')+g(this,'paddingTop')+g(this,'paddingBottom')+(a.margin?(g(this,'marginTop')+g(this,'marginBottom')):0)},outerWidth:function(a){if(!this[0])f();a=$.extend({margin:false},a||{});return this[0]==window||this[0]==document?this.width():this.is(':visible')?this[0].offsetWidth+(a.margin?(g(this,'marginLeft')+g(this,'marginRight')):0):this.width()+g(this,'borderLeftWidth')+g(this,'borderRightWidth')+g(this,'paddingLeft')+g(this,'paddingRight')+(a.margin?(g(this,'marginLeft')+g(this,'marginRight')):0)},scrollLeft:function(a){if(!this[0])f();if(a!=undefined)return this.each(function(){if(this==window||this==document)window.scrollTo(a,$(window).scrollTop());else this.scrollLeft=a});if(this[0]==window||this[0]==document)return self.pageXOffset||$.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;return this[0].scrollLeft},scrollTop:function(a){if(!this[0])f();if(a!=undefined)return this.each(function(){if(this==window||this==document)window.scrollTo($(window).scrollLeft(),a);else this.scrollTop=a});if(this[0]==window||this[0]==document)return self.pageYOffset||$.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;return this[0].scrollTop},position:function(a){return this.offset({margin:false,scroll:false,relativeTo:this.offsetParent()},a)},offset:function(a,b){if(!this[0])f();var x=0,y=0,sl=0,st=0,elem=this[0],parent=this[0],op,parPos,elemPos=$.css(elem,'position'),mo=$.browser.mozilla,ie=$.browser.msie,oa=$.browser.opera,sf=$.browser.safari,sf3=$.browser.safari&&parseInt($.browser.version)>520,absparent=false,relparent=false,a=$.extend({margin:true,border:false,padding:false,scroll:true,lite:false,relativeTo:document.body},a||{});if(a.lite)return this.offsetLite(a,b);if(a.relativeTo.jquery)a.relativeTo=a.relativeTo[0];if(elem.tagName=='BODY'){x=elem.offsetLeft;y=elem.offsetTop;if(mo){x+=g(elem,'marginLeft')+(g(elem,'borderLeftWidth')*2);y+=g(elem,'marginTop')+(g(elem,'borderTopWidth')*2)}else if(oa){x+=g(elem,'marginLeft');y+=g(elem,'marginTop')}else if((ie&&jQuery.boxModel)){x+=g(elem,'borderLeftWidth');y+=g(elem,'borderTopWidth')}else if(sf3){x+=g(elem,'marginLeft')+g(elem,'borderLeftWidth');y+=g(elem,'marginTop')+g(elem,'borderTopWidth')}}else{do{parPos=$.css(parent,'position');x+=parent.offsetLeft;y+=parent.offsetTop;if((mo&&!parent.tagName.match(/^t[d|h]$/i))||ie||sf3){x+=g(parent,'borderLeftWidth');y+=g(parent,'borderTopWidth');if(mo&&parPos=='absolute')absparent=true;if(ie&&parPos=='relative')relparent=true}op=parent.offsetParent||document.body;if(a.scroll||mo){do{if(a.scroll){sl+=parent.scrollLeft;st+=parent.scrollTop}if(oa&&($.css(parent,'display')||'').match(/table-row|inline/)){sl=sl-((parent.scrollLeft==parent.offsetLeft)?parent.scrollLeft:0);st=st-((parent.scrollTop==parent.offsetTop)?parent.scrollTop:0)}if(mo&&parent!=elem&&$.css(parent,'overflow')!='visible'){x+=g(parent,'borderLeftWidth');y+=g(parent,'borderTopWidth')}parent=parent.parentNode}while(parent!=op)}parent=op;if(parent==a.relativeTo&&!(parent.tagName=='BODY'||parent.tagName=='HTML')){if(mo&&parent!=elem&&$.css(parent,'overflow')!='visible'){x+=g(parent,'borderLeftWidth');y+=g(parent,'borderTopWidth')}if(((sf&&!sf3)||oa)&&parPos!='static'){x-=g(op,'borderLeftWidth');y-=g(op,'borderTopWidth')}break}if(parent.tagName=='BODY'||parent.tagName=='HTML'){if(((sf&&!sf3)||(ie&&$.boxModel))&&elemPos!='absolute'&&elemPos!='fixed'){x+=g(parent,'marginLeft');y+=g(parent,'marginTop')}if(sf3||(mo&&!absparent&&elemPos!='fixed')||(ie&&elemPos=='static'&&!relparent)){x+=g(parent,'borderLeftWidth');y+=g(parent,'borderTopWidth')}break}}while(parent)}var c=h(elem,a,x,y,sl,st);if(b){$.extend(b,c);return this}else{return c}},offsetLite:function(a,b){if(!this[0])f();var x=0,y=0,sl=0,st=0,parent=this[0],offsetParent,a=$.extend({margin:true,border:false,padding:false,scroll:true,relativeTo:document.body},a||{});if(a.relativeTo.jquery)a.relativeTo=a.relativeTo[0];do{x+=parent.offsetLeft;y+=parent.offsetTop;offsetParent=parent.offsetParent||document.body;if(a.scroll){do{sl+=parent.scrollLeft;st+=parent.scrollTop;parent=parent.parentNode}while(parent!=offsetParent)}parent=offsetParent}while(parent&&parent.tagName!='BODY'&&parent.tagName!='HTML'&&parent!=a.relativeTo);var c=h(this[0],a,x,y,sl,st);if(b){$.extend(b,c);return this}else{return c}},offsetParent:function(){if(!this[0])f();var a=this[0].offsetParent;while(a&&(a.tagName!='BODY'&&$.css(a,'position')=='static'))a=a.offsetParent;return $(a)}});var f=function(){throw"Dimensions: jQuery collection is empty";};var g=function(a,b){return parseInt($.css(a.jquery?a[0]:a,b))||0};var h=function(a,b,x,y,c,d){if(!b.margin){x-=g(a,'marginLeft');y-=g(a,'marginTop')}if(b.border&&(($.browser.safari&&parseInt($.browser.version)<520)||$.browser.opera)){x+=g(a,'borderLeftWidth');y+=g(a,'borderTopWidth')}else if(!b.border&&!(($.browser.safari&&parseInt($.browser.version)<520)||$.browser.opera)){x-=g(a,'borderLeftWidth');y-=g(a,'borderTopWidth')}if(b.padding){x+=g(a,'paddingLeft');y+=g(a,'paddingTop')}if(b.scroll&&(!$.browser.opera||a.offsetLeft!=a.scrollLeft&&a.offsetTop!=a.scrollLeft)){c-=a.scrollLeft;d-=a.scrollTop}return b.scroll?{top:y-d,left:x-c,scrollTop:d,scrollLeft:c}:{top:y,left:x}};var i=0;var j=function(){if(!i){var a=$('<div>').css({width:100,height:100,overflow:'auto',position:'absolute',top:-1000,left:-1000}).appendTo('body');i=100-a.append('<div>').find('div').css({width:'100%',height:200}).width();a.remove()}return i}})(jQuery);
/*Form*/
(function($){$.fn.ajaxSubmit=function(o){if(typeof o=='function')o={success:o};o=$.extend({url:this.attr('action')||window.location,type:this.attr('method')||'GET'},o||{});var p={};$.event.trigger('form.pre.serialize',[this,o,p]);if(p.veto)return this;var a=this.formToArray(o.semantic);if(o.data){for(var n in o.data)a.push({name:n,value:o.data[n]})}if(o.beforeSubmit&&o.beforeSubmit(a,this,o)===false)return this;$.event.trigger('form.submit.validate',[a,this,o,p]);if(p.veto)return this;var q=$.param(a);if(o.type.toUpperCase()=='GET'){o.url+=(o.url.indexOf('?')>=0?'&':'?')+q;o.data=null}else o.data=q;var r=this,callbacks=[];if(o.resetForm)callbacks.push(function(){r.resetForm()});if(o.clearForm)callbacks.push(function(){r.clearForm()});if(!o.dataType&&o.target){var u=o.success||function(){};callbacks.push(function(a){if(this.evalScripts)$(o.target).attr("innerHTML",a).evalScripts().each(u,arguments);else $(o.target).html(a).each(u,arguments)})}else if(o.success)callbacks.push(o.success);o.success=function(a,b){for(var i=0,max=callbacks.length;i<max;i++)callbacks[i](a,b,r)};var v=$('input:file',this).fieldValue();var w=false;for(var j=0;j<v.length;j++)if(v[j])w=true;if(o.iframe||w)fileUpload();else $.ajax(o);$.event.trigger('form.submit.notify',[this,o]);return this;function fileUpload(){var d=r[0];var f=$.extend({},$.ajaxSettings,o);var h='jqFormIO'+$.fn.ajaxSubmit.counter++;var i=$('<iframe id="'+h+'" name="'+h+'" />');var j=i[0];var k=$.browser.opera&&window.opera.version()<9;if($.browser.msie||k)j.src='javascript:false;document.write("");';i.css({position:'absolute',top:'-1000px',left:'-1000px'});var l={responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=f.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[l,f]);var m=0;var n=0;setTimeout(function(){i.appendTo('body');j.attachEvent?j.attachEvent('onload',cb):j.addEventListener('load',cb,false);var a=d.encoding?'encoding':'enctype';var t=r.attr('target');r.attr({target:h,method:'POST',action:f.url});d[a]='multipart/form-data';if(f.timeout)setTimeout(function(){n=true;cb()},f.timeout);d.submit();r.attr('target',t)},10);function cb(){if(m++)return;j.detachEvent?j.detachEvent('onload',cb):j.removeEventListener('load',cb,false);var a=true;try{if(n)throw'timeout';var b,doc;doc=j.contentWindow?j.contentWindow.document:j.contentDocument?j.contentDocument:j.document;l.responseText=doc.body?doc.body.innerHTML:null;l.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(f.dataType=='json'||f.dataType=='script'){var c=doc.getElementsByTagName('textarea')[0];b=c?c.value:l.responseText;if(f.dataType=='json')eval("data = "+b);else $.globalEval(b)}else if(f.dataType=='xml'){b=l.responseXML;if(!b&&l.responseText!=null)b=toXml(l.responseText)}else{b=l.responseText}}catch(e){a=false;$.handleError(f,l,'error',e)}if(a){f.success(b,'success');if(g)$.event.trigger("ajaxSuccess",[l,f])}if(g)$.event.trigger("ajaxComplete",[l,f]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(f.complete)f.complete(l,a?'success':'error');setTimeout(function(){i.remove();l.responseXML=null},100)};function toXml(s,a){if(window.ActiveXObject){a=new ActiveXObject('Microsoft.XMLDOM');a.async='false';a.loadXML(s)}else a=(new DOMParser()).parseFromString(s,'text/xml');return(a&&a.documentElement&&a.documentElement.tagName!='parsererror')?a:null}}};$.fn.ajaxSubmit.counter=0;$.fn.ajaxForm=function(a){return this.ajaxFormUnbind().submit(submitHandler).each(function(){this.formPluginId=$.fn.ajaxForm.counter++;$.fn.ajaxForm.optionHash[this.formPluginId]=a;$(":submit,input:image",this).click(clickHandler)})};$.fn.ajaxForm.counter=1;$.fn.ajaxForm.optionHash={};function clickHandler(e){var a=this.form;a.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){a.clk_x=e.offsetX;a.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var b=$(this).offset();a.clk_x=e.pageX-b.left;a.clk_y=e.pageY-b.top}else{a.clk_x=e.pageX-this.offsetLeft;a.clk_y=e.pageY-this.offsetTop}}setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},10)};function submitHandler(){var a=this.formPluginId;var b=$.fn.ajaxForm.optionHash[a];$(this).ajaxSubmit(b);return false};$.fn.ajaxFormUnbind=function(){this.unbind('submit',submitHandler);return this.each(function(){$(":submit,input:image",this).unbind('click',clickHandler)})};$.fn.formToArray=function(b){var a=[];if(this.length==0)return a;var c=this[0];var d=b?c.getElementsByTagName('*'):c.elements;if(!d)return a;for(var i=0,max=d.length;i<max;i++){var e=d[i];var n=e.name;if(!n)continue;if(b&&c.clk&&e.type=="image"){if(!e.disabled&&c.clk==e)a.push({name:n+'.x',value:c.clk_x},{name:n+'.y',value:c.clk_y});continue}var v=$.fieldValue(e,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]})}else if(v!==null&&typeof v!='undefined')a.push({name:n,value:v})}if(!b&&c.clk){var f=c.getElementsByTagName("input");for(var i=0,max=f.length;i<max;i++){var g=f[i];var n=g.name;if(n&&!g.disabled&&g.type=="image"&&c.clk==g)a.push({name:n+'.x',value:c.clk_x},{name:n+'.y',value:c.clk_y})}}return a};$.fn.formSerialize=function(a){return $.param(this.formToArray(a))};$.fn.fieldSerialize=function(b){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,b);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)a.push({name:n,value:v[i]})}else if(v!==null&&typeof v!='undefined')a.push({name:this.name,value:v})});return $.param(a)};$.fn.fieldValue=function(a){for(var b=[],i=0,max=this.length;i<max;i++){var c=this[i];var v=$.fieldValue(c,a);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))continue;v.constructor==Array?$.merge(b,v):b.push(v)}return b};$.fieldValue=function(b,c){var n=b.name,t=b.type,tag=b.tagName.toLowerCase();if(typeof c=='undefined')c=true;if(c&&(!n||b.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!b.checked||(t=='submit'||t=='image')&&b.form&&b.form.clk!=b||tag=='select'&&b.selectedIndex==-1))return null;if(tag=='select'){var d=b.selectedIndex;if(d<0)return null;var a=[],ops=b.options;var e=(t=='select-one');var f=(e?d+1:ops.length);for(var i=(e?d:0);i<f;i++){var g=ops[i];if(g.selected){var v=$.browser.msie&&!(g.attributes['value'].specified)?g.text:g.value;if(e)return v;a.push(v)}}return a}return b.value};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields()})};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')this.value='';else if(t=='checkbox'||t=='radio')this.checked=false;else if(tag=='select')this.selectedIndex=-1})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))this.reset()})}})(jQuery);

var timeoutid=0;function HideTabDropdoun(){if($('#tabs_tool').html()){clearTimeout(timeoutid);timeoutid=setTimeout("$('#tabs_tool').hide();$('.tabs_hover').attr('style','');$('.tabs_hover a').attr('style','')",400)}}function ShowTabDropdown(a){if($('#tabs_tool').html()){$('#tabs_tool').show();clearTimeout(timeoutid);var b=this;$(a).css({"background":"transparent url("+this_domain+"/images/common/tt_left.gif) no-repeat scroll left top"});$(a).children(":first").css({"background":"transparent url("+this_domain+"/images/common/tt_right.gif) no-repeat scroll right top","color":"#666666"})}}function I(a){return document.getElementById(a)}
$("#frm_tabs_search").livequery("submit",function(a)
{
		sel_val=$("#txt_tabs_search").val();
		sel_val=$.trim(sel_val);
		error_txt="Invalid ID";
		if(isNaN(sel_val)||sel_val=="")
		{
			$("#txt_tabs_search").val(error_txt)
		}
		else
		{
			$("#txt_tabs_search").attr("maxlength",15);
			$("#txt_tabs_search").val("Checking ID....");
			link_redirect=this_domain+"/body/glb_redirect_search.php?selector="+sel_val;
			str=$.ajax({url:link_redirect,async:false}).responseText;
			if(str=="error")
			{
				$("#txt_tabs_search").val(error_txt);
				$("#txt_tabs_search").attr("maxlength",10)
			}
			else
			{
				window.location=str
			}
		}return false
});
$("#txt_tabs_search").livequery("click",function(a)
{
	$("#txt_tabs_search").val("")
});
	$(window).resize(function(){adjust_window();adjust_featured()});function adjust_window(){var a=$(window).width();if(a<1000){$('#content').css({'width':'975px'});adjust_featured()}else{$('#content').css({'width':'100%'})}var b=($(window).width()*0.40);b=Math.ceil(b);$("#topBannerCls").css({"left":b,"display":"block"})}function adjust_featured(){if($('#dev_center').html()){width=Math.ceil($('#dev_center').width()*0.88);$('#dev_ftproperty').width(width);li_width=width/4;$('#dev_ftproperty ul li').width(li_width)}if($('#main_center').html()){width=Math.ceil($('#main_center').width()*0.90);$('#ftproperty').width(width);li_width=width/3;$('#ftproperty ul li').width(li_width)}}
				
function showHeaderSettings()
{
	$.get(this_domain+"/includes/header_settings_div.php",{},function(str)
	{
		$("body").append(str);
		if (document.all) 
		{
			var topp = I("header_settings").offsetTop + I("header_settings").parentNode.offsetTop;
			var heightp = I("header_settings").offsetHeight;
			var positionp = parseInt(topp) + parseInt(heightp)-2;
			var leftp = I("header_settings").offsetWidth;
			//alert("top:"+topp+" height:"+heightp+" position:"+positionp+" left:"+leftp);
		}
		else
		{
			var topp = I("header_settings").offsetTop;
			var heightp = I("header_settings").offsetHeight;
			var positionp = parseInt(topp) + parseInt(heightp)-2;
			var leftp = I("header_settings").offsetWidth;
		}
		leftp = leftp - 350;
		I("headerChangeSetttings").style.top = positionp + "px";
		I("headerChangeSetttings").style.left = leftp + "px";
		I("headerChangeSetttings").style.display = "block";
		I("headerChangeSetttings").focus();
	});
}



function submitSettings()
{
	$('#frm_headerSettings').ajaxSubmit(function(str)
	 { 
		window.location.reload();
	}); 	
}

function fill_email_signature(signature,ta_id)
{
	if(typeof signature === "undefined" || signature == "")	
	{
		redirect_msg = "You have not set your message signature. Please click <a href=\""+this_domain_mybayut+"/index.php?tabs=4&section=userSettings\" class=\"active_txt\">here</a> to set signature.";
		return overlib(redirect_msg,STICKY,CAPTION,'Message Signature',CLOSECLICK,WIDTH,300);
	}
	else if(signature.indexOf("ag_bayut") > -1)
	{
		this_userid = signature.replace("ag_bayut:",""); 
		redirect_msg = "This user has not set his message signature. Please click <a href=\""+this_domain_mybayut+"/index.php?tabs=7&section=agedit_user&userid="+this_userid+"&setting=1\" class=\"active_txt\">here</a> to set his signature.";
		return overlib(redirect_msg,STICKY,CAPTION,'Message Signature',CLOSECLICK,WIDTH,300);
	}
	else
	{
		org_msg = I(ta_id).value;
		if(org_msg != "")
			org_msg += "\n\n";
		org_msg += "--\n" + signature;
		I(ta_id).value = org_msg;
	}
	
}


function height(el) {
    return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
};


function width(el) {
    return  el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight');
};

function function_exists(function_name) 
{
    if (typeof function_name == 'string')
		return (typeof this.window[function_name] == 'function');
    else
        return (function_name instanceof Function);
}

function price_convert(price_text)
{
	if(function_exists("overlib"))
		return overlib(price_text,CAPTION,"Price Information",WIDTH,220);
}

function land_convert(area_sqft)
{
	//area_sqft = this.id;
	area_text = area_sqft+ " Square Feet<br/>";
	sq_mt = number_format(parseInt(area_sqft) * 0.09290304,0,".",","); ////Sq Meter
	area_text += sq_mt+" Square Meter<br/>" ;
	sq_yd = number_format(parseInt(area_sqft) * 0.111111111,0,".",","); ////Sq Yard   
	area_text += sq_yd+" Square Yard<br/>" ;
	if(function_exists("overlib"))
		return overlib(area_text,CAPTION,"Land Information",WIDTH,130);
}

function fontsize_custom()
{
	I("content").style.fontSize = "18px";
}
