/*>general.js:2010-01-24-17-41-35>hdc.js:2010-01-24-17-41-26>_panel.js:2010-01-24-17-41-39>_logo_and_menu.js:2010-01-24-17-41-40>_footer.js:2010-01-24-17-41-35>_account_panel.js:2010-01-24-17-41-40*/
/*
 * jQuery 1.2.3 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $
 * $Rev: 4663 $
 */
(function(){if(window.jQuery)var _jQuery=window.jQuery;var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context);};if(window.$)var _$=window.$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem)if(elem.id!=match[3])return jQuery().find(selector);else{this[0]=elem;this.length=1;return this;}else
selector=[];}}else
return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.3",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;this.each(function(i){if(this==elem)ret=i;});return ret;},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],name)||undefined;else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return!selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]));},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
return(this[0].value||"").replace(/\r/g,"");}return undefined;}return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=value.constructor==Array?value:[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.length?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value==null){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data==undefined&&this.length)data=jQuery.data(this[0],key);return data==null&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem);}else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.prototype.init.prototype=jQuery.prototype;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);}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==1){target=this;i=0;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){if(target===options[name])continue;if(deep&&options[name]&&typeof options[name]=="object"&&target[name]&&!options[name].nodeType)target[name]=jQuery.extend(target[name],options[name]);else if(options[name]!=undefined)target[name]=options[name];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,windowData={};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
script.appendChild(document.createTextNode(data));head.appendChild(script);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){if(args){if(object.length==undefined){for(var name in object)if(callback.apply(object[name],args)===false)break;}else
for(var i=0,length=object.length;i<length;i++)if(callback.apply(object[i],args)===false)break;}else{if(object.length==undefined){for(var name in object)if(callback.call(object[name],name,object[name])===false)break;}else
for(var i=0,length=object.length,value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret;function color(elem){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=elem.style.outline;elem.style.outline="0 solid black";elem.style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&elem.style&&elem.style[name])ret=elem.style[name];else if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem))ret=getComputedStyle.getPropertyValue(name);else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(var i=0;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(getComputedStyle&&getComputedStyle.getPropertyValue(name))||"";for(var i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left,runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem=elem.toString();if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,""+value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(typeof array!="array")for(var i=0,length=array.length;i<length;i++)ret.push(array[i]);else
ret=array.slice(0);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){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
for(var i=0;second[i];i++)first.push(second[i]);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)||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&&value!=undefined){if(value.constructor!=Array)value=[value];ret=ret.concat(value);}}return ret;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval!=undefined)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data||[]);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event)data.unshift(this.fix({type:type,target:elem}));data[0].type=type;if(exclusive)data[0].exclusive=true;if(jQuery.isFunction(jQuery.data(elem,"handle")))val=jQuery.data(elem,"handle").apply(elem,data);if(!fn&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]&&!event.exclusive||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=originalEvent.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;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);return undefined;},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;event.preventDefault();return args[this.lastToggle].apply(this,arguments)||false;});},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();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:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.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))){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&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&s.dataType=="script"&&s.type.toLowerCase()=="get"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xml;},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(!elem)return undefined;type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=(new Date()).getTime();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.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=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.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),fixed=jQuery.css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&jQuery.css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}return results;};})();

/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007 M. Alsup
 * Version: 2.12
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3($){7 m=\'2.12\';7 n=$.2z.2p&&/3z 6.0/.31(2P.2G);3 1t(){4(26.20&&26.20.1t)26.20.1t(\'[y] \'+3v.3p.3j.3b(36,\'\'))};$.B.y=3(l){K 9.1c(3(){l=l||{};4(l.2c==2y){3F(l){28\'3E\':4(9.U)22(9.U);9.U=0;K;28\'29\':9.17=1;K;28\'3w\':9.17=0;K;3u:l={1e:l}}}7 c=$(9);7 d=l.1R?$(l.1R,9):c.3g();7 e=d.38();4(e.C<2){1t(\'33; 30 2X 2V: \'+e.C);K}7 f=$.2O({},$.B.y.2q,l||{},$.2d?c.2d():$.2H?c.2F():{});4(f.1P)f.1O=f.1N||e.C;f.G=f.G?[f.G]:[];f.14=f.14?[f.14]:[];f.14.2x(3(){f.2a=0});4(f.1k)f.14.H(3(){1d(e,f,0,!f.1b)});4(n&&f.1I&&!f.2t)27(d);7 g=9.3D;f.r=1p((g.1G(/w:(\\d+)/)||[])[1])||f.r;f.8=1p((g.1G(/h:(\\d+)/)||[])[1])||f.8;f.N=1p((g.1G(/t:(\\d+)/)||[])[1])||f.N;4(c.A(\'1A\')==\'3s\')c.A(\'1A\',\'3o\');4(f.r)c.r(f.r);4(f.8&&f.8!=\'1D\')c.8(f.8);4(f.1a){f.1i=[];1n(7 i=0;i<e.C;i++)f.1i.H(i);f.1i.3f(3(a,b){K 39.1a()-0.5});f.18=0;f.W=f.1i[0]}13 4(f.W>=e.C)f.W=0;7 h=f.W||0;d.A(\'1A\',\'2f\').1y().1c(3(i){7 z=h?i>=h?e.C-(i-h):h-i:e.C-i;$(9).A(\'z-1B\',z)});$(e[h]).M();4(f.Z&&f.r)d.r(f.r);4(f.Z&&f.8&&f.8!=\'1D\')d.8(f.8);4(f.29)c.2U(3(){9.17=1},3(){9.17=0});7 j=$.B.y.L[f.1e];4($.2k(j))j(c,d,f);13 1t(\'2N 2L: \'+f.1e);d.1c(3(){7 a=$(9);9.V=(f.Z&&f.8)?f.8:a.8();9.S=(f.Z&&f.r)?f.r:a.r()});f.F=f.F||{};f.E=f.E||{};f.I=f.I||{};d.1w(\':1v(\'+h+\')\').A(f.F);4(f.T)$(d[h]).A(f.T);4(f.N){4(f.Q.2c==2y)f.Q={2E:2D,2C:2B}[f.Q]||2A;4(!f.1M)f.Q=f.Q/2;3I((f.N-f.Q)<3H)f.N+=f.Q}4(f.2b)f.1L=f.1K=f.2b;4(!f.1s)f.1s=f.Q;4(!f.1o)f.1o=f.Q;f.2v=e.C;f.11=h;4(f.1a){f.D=f.11;4(++f.18==e.C)f.18=0;f.D=f.1i[f.18]}13 f.D=f.W>=(e.C-1)?0:f.W+1;7 k=d[h];4(f.G.C)f.G[0].1J(k,[k,k,f,2u]);4(f.14.C>1)f.14[1].1J(k,[k,k,f,2u]);4(f.1r&&!f.P)f.P=f.1r;4(f.P)$(f.P).25(\'1r\',3(){K 21(e,f,f.1b?-1:1)});4(f.24)$(f.24).25(\'1r\',3(){K 21(e,f,f.1b?1:-1)});4(f.1q)2s(e,f);4(f.N||f.1k)9.U=23(3(){1d(e,f,0,!f.1b)},f.1k?10:f.N+(f.2r||0));f.3A=3(a){7 b=$(a),s=b[0];4(!f.1N)f.1O++;e.H(s);4(f.R)f.R.H(s);f.2v=e.C;b.A(\'1A\',\'2f\').A(f.F).2o(c);4(n&&f.1I&&!f.2t)27(b);4(f.Z&&f.r)b.r(f.r);4(f.Z&&f.8&&f.8!=\'1D\')d.8(f.8);s.V=(f.Z&&f.8)?f.8:b.8();s.S=(f.Z&&f.r)?f.r:b.r()}})};3 1d(a,b,c,d){4(b.2a)K;7 p=a[0].1H,1j=a[b.11],P=a[b.D];4(p.U===0&&!c)K;4(!c&&!p.17&&((b.1P&&(--b.1O<=0))||(b.1u&&!b.1a&&b.D<b.11))){4(b.1Z)b.1Z(b);K}4(c||!p.17){4(b.G.C)$.1c(b.G,3(i,o){o.1J(P,[1j,P,b,d])});7 e=3(){4($.2z.2p&&b.1I)9.3y.3x(\'1Y\');$.1c(b.14,3(i,o){o.1J(P,[1j,P,b,d])})};4(b.D!=b.11){b.2a=1;4(b.1F)b.1F(1j,P,b,e,d);13 4($.2k($.B.y[b.1e]))$.B.y[b.1e](1j,P,b,e);13 $.B.y.2m(1j,P,b,e)}4(b.1a){b.11=b.D;4(++b.18==a.C)b.18=0;b.D=b.1i[b.18]}13{7 f=(b.D+1)==a.C;b.D=f?0:b.D+1;b.11=f?a.C-1:b.D-1}4(b.1q)$(b.1q).2l(\'a\').3t(\'1W\').1Y(\'a:1v(\'+b.11+\')\').2j(\'1W\')}4(b.N&&!b.1k)p.U=23(3(){1d(a,b,0,!b.1b)},b.N);13 4(b.1k&&p.17)p.U=23(3(){1d(a,b,0,!b.1b)},10)};3 21(a,b,c){7 p=a[0].1H,N=p.U;4(N){22(N);p.U=0}b.D=b.11+c;4(b.D<0){4(b.1u)K 1E;b.D=a.C-1}13 4(b.D>=a.C){4(b.1u)K 1E;b.D=0}4(b.1x&&1U b.1x==\'3\')b.1x(c>0,b.D,a[b.D]);1d(a,b,1,c>=0);K 1E};3 2s(b,c){7 d=$(c.1q);$.1c(b,3(i,o){7 a=(1U c.1T==\'3\')?$(c.1T(i,o)):$(\'<a 3q="#">\'+(i+1)+\'</a>\');4(a.3n(\'3m\').C==0)a.2o(d);a.25(\'1r\',3(){c.D=i;7 p=b[0].1H,N=p.U;4(N){22(N);p.U=0}4(1U c.1S==\'3\')c.1S(c.D,b[c.D]);1d(b,c,1,!c.1b);K 1E})});d.2l(\'a\').1Y(\'a:1v(\'+c.W+\')\').2j(\'1W\')};3 27(b){3 1C(s){7 s=1p(s).3l(16);K s.C<2?\'0\'+s:s};3 2i(e){1n(;e&&e.3k.3i()!=\'3h\';e=e.1H){7 v=$.A(e,\'2h-2g\');4(v.3e(\'3d\')>=0){7 a=v.1G(/\\d+/g);K\'#\'+1C(a[0])+1C(a[1])+1C(a[2])}4(v&&v!=\'3c\')K v}K\'#3a\'};b.1c(3(){$(9).A(\'2h-2g\',2i(9))})};$.B.y.2m=3(a,b,c,d){7 e=$(a),$n=$(b);$n.A(c.F);7 f=3(){$n.1z(c.E,c.1s,c.1L,d)};e.1z(c.I,c.1o,c.1K,3(){4(c.O)e.A(c.O);4(!c.1M)f()});4(c.1M)f()};$.B.y.L={2e:3(a,b,c){b.1w(\':1v(\'+c.W+\')\').A(\'1m\',0);c.G.H(3(){$(9).M()});c.E={1m:1};c.I={1m:0};c.O={Y:\'X\'}}};$.B.y.37=3(){K m};$.B.y.2q={1e:\'2e\',N:35,1k:0,Q:34,1s:J,1o:J,P:J,24:J,1x:J,1q:J,1S:J,1T:J,G:J,14:J,1Z:J,2b:J,1L:J,1K:J,1l:J,E:J,I:J,F:J,O:J,1F:J,8:\'1D\',W:0,1M:1,1a:0,Z:0,29:0,1P:0,1N:0,2r:0,1R:J,1I:0,1u:0}})(q);q.B.y.L.32=3(d,e,f){d.A(\'19\',\'1h\');f.G.H(3(a,b,c){q(9).M();c.F.u=b.1g;c.I.u=0-a.1g});f.T={u:0};f.E={u:0};f.O={Y:\'X\'}};q.B.y.L.2Z=3(d,e,f){d.A(\'19\',\'1h\');f.G.H(3(a,b,c){q(9).M();c.F.u=0-b.1g;c.I.u=a.1g});f.T={u:0};f.E={u:0};f.O={Y:\'X\'}};q.B.y.L.2Y=3(d,e,f){d.A(\'19\',\'1h\');f.G.H(3(a,b,c){q(9).M();c.F.x=b.1f;c.I.x=0-a.1f});f.T={x:0};f.E={x:0}};q.B.y.L.2W=3(d,e,f){d.A(\'19\',\'1h\');f.G.H(3(a,b,c){q(9).M();c.F.x=0-b.1f;c.I.x=a.1f});f.T={x:0};f.E={x:0}};q.B.y.L.3r=3(f,g,h){f.A(\'19\',\'1h\').r();h.G.H(3(a,b,c,d){q(9).M();7 e=a.1f,1X=b.1f;c.F=d?{x:1X}:{x:-1X};c.E.x=0;c.I.x=d?-e:e;g.1w(a).A(c.F)});h.T={x:0};h.O={Y:\'X\'}};q.B.y.L.2T=3(f,g,h){f.A(\'19\',\'1h\');h.G.H(3(a,b,c,d){q(9).M();7 e=a.1g,1V=b.1g;c.F=d?{u:-1V}:{u:1V};c.E.u=0;c.I.u=d?e:-e;g.1w(a).A(c.F)});h.T={u:0};h.O={Y:\'X\'}};q.B.y.L.2S=3(a,b,c){c.E={r:\'M\'};c.I={r:\'1y\'}};q.B.y.L.2R=3(a,b,c){c.E={8:\'M\'};c.I={8:\'1y\'}};q.B.y.L.1l=3(g,h,j){7 w=g.A(\'19\',\'2Q\').r();h.A({x:0,u:0});j.G.H(3(){q(9).M()});j.Q=j.Q/2;j.1a=0;j.1l=j.1l||{x:-w,u:15};j.R=[];1n(7 i=0;i<h.C;i++)j.R.H(h[i]);1n(7 i=0;i<j.W;i++)j.R.H(j.R.2n());j.1F=3(a,b,c,d,e){7 f=e?q(a):q(b);f.1z(c.1l,c.1s,c.1L,3(){e?c.R.H(c.R.2n()):c.R.2x(c.R.2M());4(e)1n(7 i=0,1Q=c.R.C;i<1Q;i++)q(c.R[i]).A(\'z-1B\',1Q-i);13{7 z=q(a).A(\'z-1B\');f.A(\'z-1B\',1p(z)+1)}f.1z({x:0,u:0},c.1o,c.1K,3(){q(e?9:a).1y();4(d)d()})})}};q.B.y.L.3B=3(d,e,f){f.G.H(3(a,b,c){q(9).M();c.F.u=b.V;c.E.8=b.V});f.T={u:0};f.F={8:0};f.E={u:0};f.I={8:0};f.O={Y:\'X\'}};q.B.y.L.3C=3(d,e,f){f.G.H(3(a,b,c){q(9).M();c.E.8=b.V;c.I.u=a.V});f.T={u:0};f.F={u:0,8:0};f.I={8:0};f.O={Y:\'X\'}};q.B.y.L.2K=3(d,e,f){f.G.H(3(a,b,c){q(9).M();c.F.x=b.S;c.E.r=b.S});f.F={r:0};f.E={x:0};f.I={r:0};f.O={Y:\'X\'}};q.B.y.L.2J=3(d,e,f){f.G.H(3(a,b,c){q(9).M();c.E.r=b.S;c.I.x=a.S});f.F={x:0,r:0};f.E={x:0};f.I={r:0};f.O={Y:\'X\'}};q.B.y.L.2I=3(d,e,f){f.T={u:0,x:0};f.O={Y:\'X\'};f.G.H(3(a,b,c){q(9).M();c.F={r:0,8:0,u:b.V/2,x:b.S/2};c.E={u:0,x:0,r:b.S,8:b.V};c.I={r:0,8:0,u:a.V/2,x:a.S/2}})};q.B.y.L.3G=3(d,e,f){f.G.H(3(a,b,c){c.F={r:0,8:0,1m:1,x:b.S/2,u:b.V/2,2w:1};c.E={u:0,x:0,r:b.S,8:b.V}});f.I={1m:0};f.O={2w:0}};',62,231,'|||function|if|||var|height|this|||||||||||||||||jQuery|width|||top|||left|cycle||css|fn|length|nextSlide|animIn|cssBefore|before|push|animOut|null|return|transitions|show|timeout|cssAfter|next|speed|els|cycleW|cssFirst|cycleTimeout|cycleH|startingSlide|none|display|fit||currSlide||else|after|||cyclePause|randomIndex|overflow|random|rev|each|go|fx|offsetWidth|offsetHeight|hidden|randomMap|curr|continuous|shuffle|opacity|for|speedOut|parseInt|pager|click|speedIn|log|nowrap|eq|not|prevNextClick|hide|animate|position|index|hex|auto|false|fxFn|match|parentNode|cleartype|apply|easeOut|easeIn|sync|autostopCount|countdown|autostop|len|slideExpr|pagerClick|pagerAnchorBuilder|typeof|nextH|activeSlide|nextW|filter|end|console|advance|clearTimeout|setTimeout|prev|bind|window|clearTypeFix|case|pause|busy|easing|constructor|metadata|fade|absolute|color|background|getBg|addClass|isFunction|find|custom|shift|appendTo|msie|defaults|delay|buildPager|cleartypeNoBg|true|slideCount|zIndex|unshift|String|browser|400|200|fast|600|slow|data|userAgent|meta|zoom|turnRight|turnLeft|transition|pop|unknown|extend|navigator|visible|slideY|slideX|scrollVert|hover|slides|scrollRight|few|scrollLeft|scrollDown|too|test|scrollUp|terminating|1000|4000|arguments|ver|get|Math|ffffff|call|transparent|rgb|indexOf|sort|children|html|toLowerCase|join|nodeName|toString|body|parents|relative|prototype|href|scrollHorz|static|removeClass|default|Array|resume|removeAttribute|style|MSIE|addSlide|turnUp|turnDown|className|stop|switch|fadeZoom|250|while'.split('|'),0,{}));


/*
 * jQuery Corners 0.3
 * Copyright (c) 2008 David Turnbull, Steven Wittens
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 */
jQuery.fn.corners=function(C){var N="rounded_by_jQuery_corners";var V=B(C);var F=false;try{F=(document.body.style.WebkitBorderRadius!==undefined);var Y=navigator.userAgent.indexOf("Chrome");if(Y>=0){F=false}}catch(E){}var W=false;try{W=(document.body.style.MozBorderRadius!==undefined);var Y=navigator.userAgent.indexOf("Firefox");if(Y>=0&&parseInt(navigator.userAgent.substring(Y+8))<3){W=false}}catch(E){}return this.each(function(b,h){$e=jQuery(h);if($e.hasClass(N)){return }$e.addClass(N);var a=/{(.*)}/.exec(h.className);var c=a?B(a[1],V):V;var j=h.nodeName.toLowerCase();if(j=="input"){h=O(h)}if(F&&c.webkit){K(h,c)}else{if(W&&c.mozilla&&(c.sizex==c.sizey)){M(h,c)}else{var d=D(h.parentNode);var f=D(h);switch(j){case"a":case"input":Z(h,c,d,f);break;default:R(h,c,d,f);break}}}});function K(d,c){var a=""+c.sizex+"px "+c.sizey+"px";var b=jQuery(d);if(c.tl){b.css("WebkitBorderTopLeftRadius",a)}if(c.tr){b.css("WebkitBorderTopRightRadius",a)}if(c.bl){b.css("WebkitBorderBottomLeftRadius",a)}if(c.br){b.css("WebkitBorderBottomRightRadius",a)}}function M(d,c){var a=""+c.sizex+"px";var b=jQuery(d);if(c.tl){b.css("-moz-border-radius-topleft",a)}if(c.tr){b.css("-moz-border-radius-topright",a)}if(c.bl){b.css("-moz-border-radius-bottomleft",a)}if(c.br){b.css("-moz-border-radius-bottomright",a)}}function Z(k,n,l,a){var m=S("table");var i=S("tbody");m.appendChild(i);var j=S("tr");var d=S("td","top");j.appendChild(d);var h=S("tr");var c=T(k,n,S("td"));h.appendChild(c);var f=S("tr");var b=S("td","bottom");f.appendChild(b);if(n.tl||n.tr){i.appendChild(j);X(d,n,l,a,true)}i.appendChild(h);if(n.bl||n.br){i.appendChild(f);X(b,n,l,a,false)}k.appendChild(m);if(jQuery.browser.msie){m.onclick=Q}k.style.overflow="hidden"}function Q(){if(!this.parentNode.onclick){this.parentNode.click()}}function O(c){var b=document.createElement("a");b.id=c.id;b.className=c.className;if(c.onclick){b.href="javascript:";b.onclick=c.onclick}else{jQuery(c).parent("form").each(function(){b.href=this.action});b.onclick=I}var a=document.createTextNode(c.value);b.appendChild(a);c.parentNode.replaceChild(b,c);return b}function I(){jQuery(this).parent("form").each(function(){this.submit()});return false}function R(d,a,b,c){var f=T(d,a,document.createElement("div"));d.appendChild(f);if(a.tl||a.tr){X(d,a,b,c,true)}if(a.bl||a.br){X(d,a,b,c,false)}}function T(j,i,k){var b=jQuery(j);var l;while(l=j.firstChild){k.appendChild(l)}if(j.style.height){var f=parseInt(b.css("height"));k.style.height=f+"px";f+=parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom"));j.style.height=f+"px"}if(j.style.width){var a=parseInt(b.css("width"));k.style.width=a+"px";a+=parseInt(b.css("padding-left"))+parseInt(b.css("padding-right"));j.style.width=a+"px"}k.style.paddingLeft=b.css("padding-left");k.style.paddingRight=b.css("padding-right");if(i.tl||i.tr){k.style.paddingTop=U(j,i,b.css("padding-top"),true)}else{k.style.paddingTop=b.css("padding-top")}if(i.bl||i.br){k.style.paddingBottom=U(j,i,b.css("padding-bottom"),false)}else{k.style.paddingBottom=b.css("padding-bottom")}j.style.padding=0;return k}function U(f,a,d,c){if(d.indexOf("px")<0){try{console.error("%s padding not in pixels",(c?"top":"bottom"),f)}catch(b){}d=a.sizey+"px"}d=parseInt(d);if(d-a.sizey<0){try{console.error("%s padding is %ipx for %ipx corner:",(c?"top":"bottom"),d,a.sizey,f)}catch(b){}d=a.sizey}return d-a.sizey+"px"}function S(b,a){var c=document.createElement(b);c.style.border="none";c.style.borderCollapse="collapse";c.style.borderSpacing=0;c.style.padding=0;c.style.margin=0;if(a){c.style.verticalAlign=a}return c}function D(b){try{var d=jQuery.css(b,"background-color");if(d.match(/^(transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i)&&b.parentNode){return D(b.parentNode)}if(d==null){return"#ffffff"}if(d.indexOf("rgb")>-1){d=A(d)}if(d.length==4){d=L(d)}return d}catch(a){return"#ffffff"}}function L(a){return"#"+a.substring(1,2)+a.substring(1,2)+a.substring(2,3)+a.substring(2,3)+a.substring(3,4)+a.substring(3,4)}function A(h){var a=255;var d="";var b;var e=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var f=e.exec(h);for(b=1;b<4;b++){d+=("0"+parseInt(f[b]).toString(16)).slice(-2)}return"#"+d}function B(b,d){var b=b||"";var c={sizex:5,sizey:5,tl:false,tr:false,bl:false,br:false,webkit:true,mozilla:true,transparent:false};if(d){c.sizex=d.sizex;c.sizey=d.sizey;c.webkit=d.webkit;c.transparent=d.transparent;c.mozilla=d.mozilla}var a=false;var e=false;jQuery.each(b.split(" "),function(f,j){j=j.toLowerCase();var h=parseInt(j);if(h>0&&j==h+"px"){c.sizey=h;if(!a){c.sizex=h}a=true}else{switch(j){case"no-native":c.webkit=c.mozilla=false;break;case"webkit":c.webkit=true;break;case"no-webkit":c.webkit=false;break;case"mozilla":c.mozilla=true;break;case"no-mozilla":c.mozilla=false;break;case"anti-alias":c.transparent=false;break;case"transparent":c.transparent=true;break;case"top":e=c.tl=c.tr=true;break;case"right":e=c.tr=c.br=true;break;case"bottom":e=c.bl=c.br=true;break;case"left":e=c.tl=c.bl=true;break;case"top-left":e=c.tl=true;break;case"top-right":e=c.tr=true;break;case"bottom-left":e=c.bl=true;break;case"bottom-right":e=c.br=true;break}}});if(!e){if(!d){c.tl=c.tr=c.bl=c.br=true}else{c.tl=d.tl;c.tr=d.tr;c.bl=d.bl;c.br=d.br}}return c}function P(f,d,h){var e=Array(parseInt("0x"+f.substring(1,3)),parseInt("0x"+f.substring(3,5)),parseInt("0x"+f.substring(5,7)));var c=Array(parseInt("0x"+d.substring(1,3)),parseInt("0x"+d.substring(3,5)),parseInt("0x"+d.substring(5,7)));r="0"+Math.round(e[0]+(c[0]-e[0])*h).toString(16);g="0"+Math.round(e[1]+(c[1]-e[1])*h).toString(16);d="0"+Math.round(e[2]+(c[2]-e[2])*h).toString(16);return"#"+r.substring(r.length-2)+g.substring(g.length-2)+d.substring(d.length-2)}function X(f,a,b,d,c){if(a.transparent){G(f,a,b,c)}else{J(f,a,b,d,c)}}function J(k,z,p,a,n){var h,f;var l=document.createElement("div");l.style.fontSize="1px";l.style.backgroundColor=p;var b=0;for(h=1;h<=z.sizey;h++){var u,t,q;arc=Math.sqrt(1-Math.pow(1-h/z.sizey,2))*z.sizex;var c=z.sizex-Math.ceil(arc);var w=Math.floor(b);var v=z.sizex-c-w;var o=document.createElement("div");var m=l;o.style.margin="0px "+c+"px";o.style.height="1px";o.style.overflow="hidden";for(f=1;f<=v;f++){if(f==1){if(f==v){u=((arc+b)*0.5)-w}else{t=Math.sqrt(1-Math.pow(1-(c+1)/z.sizex,2))*z.sizey;u=(t-(z.sizey-h))*(arc-w-v+1)*0.5}}else{if(f==v){t=Math.sqrt(1-Math.pow((z.sizex-c-f+1)/z.sizex,2))*z.sizey;u=1-(1-(t-(z.sizey-h)))*(1-(b-w))*0.5}else{q=Math.sqrt(1-Math.pow((z.sizex-c-f)/z.sizex,2))*z.sizey;t=Math.sqrt(1-Math.pow((z.sizex-c-f+1)/z.sizex,2))*z.sizey;u=((t+q)*0.5)-(z.sizey-h)}}H(z,o,m,n,P(p,a,u));m=o;var o=m.cloneNode(false);o.style.margin="0px 1px"}H(z,o,m,n,a);b=arc}if(n){k.insertBefore(l,k.firstChild)}else{k.appendChild(l)}}function H(c,a,e,d,b){if(d&&!c.tl){a.style.marginLeft=0}if(d&&!c.tr){a.style.marginRight=0}if(!d&&!c.bl){a.style.marginLeft=0}if(!d&&!c.br){a.style.marginRight=0}a.style.backgroundColor=b;if(d){e.appendChild(a)}else{e.insertBefore(a,e.firstChild)}}function G(c,o,l,h){var f=document.createElement("div");f.style.fontSize="1px";var a=document.createElement("div");a.style.overflow="hidden";a.style.height="1px";a.style.borderColor=l;a.style.borderStyle="none solid";var m=o.sizex-1;var j=o.sizey-1;if(!j){j=1}for(var b=0;b<o.sizey;b++){var n=m-Math.floor(Math.sqrt(1-Math.pow(1-b/j,2))*m);if(b==2&&o.sizex==6&&o.sizey==6){n=2}var k=a.cloneNode(false);k.style.borderWidth="0 "+n+"px";if(h){k.style.borderWidth="0 "+(o.tr?n:0)+"px 0 "+(o.tl?n:0)+"px"}else{k.style.borderWidth="0 "+(o.br?n:0)+"px 0 "+(o.bl?n:0)+"px"}h?f.appendChild(k):f.insertBefore(k,f.firstChild)}if(h){c.insertBefore(f,c.firstChild)}else{c.appendChild(f)}}};


/*
 * Dialog
 */
(function(A){A.dialog=function(C,B){A.dialog.init();A.dialog.loading();A.isFunction(C)?C.call(A):A.dialog.reveal(C,B)};A.dialog.settings={loading_image:base_url+"scripts/dialog/loading.gif",close_image:base_url+"scripts/dialog/closelabel.gif",image_types:["png","jpg","jpeg","gif"],dialog_html:'  <div id="dialog" style="display:none;">     <div class="popup">       <table>         <tbody>           <tr>             <td class="tl"/><td class="b"/><td class="tr"/>           </tr>           <tr>             <td class="b"/>             <td class="body">               <div class="content">               </div>    <div class="clear"></div>           <div class="footer">                 <a href="#" class="close">                   <img src="/dialog/closelabel.gif" title="close" class="close_image" />                 </a>               </div>             </td>             <td class="b"/>           </tr>           <tr>             <td class="bl"/><td class="b"/><td class="br"/>           </tr>         </tbody>       </table>     </div>   </div>'};A.dialog.loading=function(){if(A("#dialog .loading").length==1){return true}A("#dialog .content").empty();A("#dialog .body").children().hide().end().append('<div class="loading"><img src="'+A.dialog.settings.loading_image+'"/></div>');var B=A.dialog.getPageScroll();A("#dialog").css({top:B[1]+(A.dialog.getPageHeight()/10),left:B[0]}).show();A(document).bind("keydown.dialog",function(C){if(C.keyCode==27){A.dialog.close()}})};A.dialog.reveal=function(C,B){if(B){A("#dialog .content").addClass(B)}A("#dialog .content").append(C);A("#dialog .loading").remove();A("#dialog .body").children().fadeIn("normal")};A.dialog.close=function(){A(document).trigger("close.dialog");return false};A(document).bind("close.dialog",function(){A(document).unbind("keydown.dialog");A("#dialog").fadeOut(function(){A("#dialog .content").removeClass().addClass("content")})});A.fn.dialog=function(C){A.dialog.init(C);var B=A.dialog.settings.image_types.join("|");B=new RegExp("."+B+"$","i");function D(){A.dialog.loading(true);var E=this.rel.match(/dialog\[\.(\w+)\]/);if(E){E=E[1]}if(this.href.match(/#/)){var F=window.location.href.split("#")[0];var H=this.href.replace(F,"");A.dialog.reveal(A(H).clone().show(),E)}else{if(this.href.match(B)){var G=new Image();G.onload=function(){A.dialog.reveal('<div class="image"><img src="'+G.src+'" /></div>',E)};G.src=this.href}else{A.get(this.href,function(I){A.dialog.reveal(I,E)})}}return false}this.click(D);return this};A.dialog.init=function(C){if(A.dialog.settings.inited){return true}else{A.dialog.settings.inited=true}if(C){A.extend(A.dialog.settings,C)}A("body").append(A.dialog.settings.dialog_html);var B=[new Image(),new Image()];B[0].src=A.dialog.settings.close_image;B[1].src=A.dialog.settings.loading_image;A("#dialog").find(".b:first, .bl, .br, .tl, .tr").each(function(){B.push(new Image());B.slice(-1).src=A(this).css("background-image").replace(/url\((.+)\)/,"$1")});A("#dialog .close").click(A.dialog.close);A("#dialog .close_image").attr("src",A.dialog.settings.close_image)};A.dialog.getPageScroll=function(){var C,B;if(self.pageYOffset){B=self.pageYOffset;C=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){B=document.documentElement.scrollTop;C=document.documentElement.scrollLeft}else{if(document.body){B=document.body.scrollTop;C=document.body.scrollLeft}}}return new Array(C,B)};A.dialog.getPageHeight=function(){var B;if(self.innerHeight){B=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientHeight}}}return B}})(jQuery);
jQuery(document).ready(function(){jQuery('a[rel*=dialog]').dialog(); jQuery('a[class*=lightwindow]').dialog();});

/*
 * Watermark
 */
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(2($){6 e=o p();$.g={q:2(){h(6 i=0;i<e.8;i++){7(e[i].3.1()==""){e[i].3.1(e[i].f);e[i].3.4("5",e[i].j)}k{e[i].3.4("5",e[i].l)}}},r:2(){h(6 i=0;i<e.8;i++){7(e[i].3.1()==e[i].f)e[i].3.1("")}}};$.s.g=2(c,d){7(!d)d="#t";u m.v(2(){6 a=$(m);6 b=a.4("5");e[e.8]={f:c,3:a,l:b,j:d};2 n(){7(a.1()==c)a.1("");a.4("5",b)}2 9(){7(a.1().8==0||a.1()==c){a.1(c);a.4("5",d)}k a.4("5",b)}a.w(n);a.x(9);a.y(9);9()})}})(z);',36,36,'|val|function|obj|css|color|var|if|length|insertMessage||||||text|Watermark|for||WatermarkColor|else|DefaultColor|this|clearMessage|new|Array|ShowAll|HideAll|fn|cccccc|return|each|focus|blur|change|jQuery'.split('|'),0,{}))

/*
 * Cookies
 */
jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+(L.path):"";var G=L.domain?"; domain="+(L.domain):"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};

/*
 * Browser Detection
 */

var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)return data[i].identity;}else if(dataProp)return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();
var browser = BrowserDetect.browser + " " + BrowserDetect.version;
var os = BrowserDetect.OS;

/*
 *  Own Scripts
 */
$(document).ready(function(){
    if((browser!="Explorer 6")&&(browser!="Explorer 7")&&(browser!="Explorer 8"))
	{
	    $(".promoBox").corners();
	    $(".promoBoxShadow").corners();
	    $("#main_crum").corners();
	}
	$(".helpBox").corners();
	
	$(".rb").corners();
});
    //jQuery.noConflict();

    /*
    jQuery(function($) { 
        $("#navigation_list").lavaLamp({ fx: "backout", speed: 700 })
    });
    */
        
    function show_submenu(file,section_id,how_many)
    {
        		var ajax = new Ajax.Request(file,{
					method:'get',

					onComplete:	function(){	Element.hide(loader) },

					onLoading: 	function(){	Element.show(loader) },

					onFailure:	function(){	alert("Hubo errores en la conexion al abrir el archivo, por favor de intentar de nuevo.")},

					onSuccess:	function(request){	
					        var response = request.responseText || "1000"; 
					        $('submenu_dialog').innerHTML = response;
					        toggle_submenu(section_id,how_many);
					    }
                });
    }

    function toggle_submenu(section_id, how_many)
    {

            if($('submenu_dialog').style.display=="none"){
    	        $('submenu_dialog').style.marginLeft = '0px';
		         
                var pos_elemento = jQuery("#item_"+section_id).position();
                pos_elemento.width = jQuery("#item_"+section_id).width();
		        
		        var tamano_promedio_boton = 87;
		        var nuevo_width = how_many * tamano_promedio_boton;
		        var tamano_logo = 298;
		        var offset = 20;
		        if(navigator.appName == "Microsoft Internet Explorer"){ var pointer_offset = 80;}else{var pointer_offset = 0;}
                
                var numero_a_sumar = pos_elemento.left + pos_elemento.width - nuevo_width + offset + tamano_logo;
                if(numero_a_sumar < 0 ) {numero_a_sumar = 0;}
                if((numero_a_sumar < 300 ) && ( nuevo_width < 580 ) && (navigator.appName != "Microsoft Internet Explorer")) {numero_a_sumar = 300;}
                
                var numero_a_sumar_pointer = (pos_elemento.width - 28) / 2 + pointer_offset;
                //var numero_a_sumar_pointer = pointer_offset;
                
    	        $('submenu_dialog').style.marginLeft = numero_a_sumar + "px";
    	        $('item_'+section_id+'_pointer').style.marginLeft = numero_a_sumar_pointer + "px";
    	        
    	        // For Fade in effect
    	        jQuery('#item_'+section_id+'_pointer').fadeIn("fast");
    	        jQuery('#submenu_dialog').fadeIn("fast");
    	        
            }else{
    	        // For Fade out effect
    	        jQuery('#item_'+section_id+'_pointer').fadeOut("fast");
    	        jQuery('#submenu_dialog').fadeOut("fast");
		   }
    }

	function highlight_tab (tab_id,tab_group)
	{
			jQuery("."+tab_group).each(function(){jQuery(this).removeClass(tab_group);	jQuery(this).addClass(tab_group +"-unselected");});
			document.getElementById(tab_id).className=tab_group;
	}
		
	function open_tabcontent (file, tab_contentid, tab_id,tab_group)
	{
			/*jQuery("#"+tab_contentid).load(file, {limit: 25}, function(){
				highlight_tab (tab_id,tab_group);
			 });*/
			
			jQuery.get(file,"",function(response){
				jQuery("#"+tab_contentid).html(response);
		        highlight_tab(tab_id,tab_group);
			});
			
			/*
			
    		var ajax = new Ajax.Request(file,{
				method:'get',

				onComplete:	function(){	Element.hide(loader) },

				onLoading: 	function(){	Element.show(loader) },

				onFailure:	function(){	alert("Hubo errores en la conexion al abrir el archivo, por favor de intentar de nuevo.")},

				onSuccess:	function(request){	
				        var response = request.responseText || "1000"; 
				        $(tab_contentid).innerHTML = response;
				        highlight_tab (tab_id,tab_group);
				    }
            });
			
			*/

	}

    function business_opentab(hash)
    {
        if(hash==null){hash='#general';}
       
        jQuery("#b_content").html('cargando...');
        // PageLoad function
        // This function is called when:
        // 1. after calling $.historyInit();
        // 2. after calling $.historyLoad();
        // 3. after pushing "Go Back" button of a browser
            
        // hash doesn't contain the first # character.
        if(hash) {
            // restore ajax loaded state
            jQuery("#b_content").load("http://localhost/hdcguide/businesses/show_partial/13/"+hash);
        } else {
            // start page
            //jQuery("#b_content").empty();
        }
        
        //alert(hash);
        var tab_group = "tab";
        var tablink = hash.replace('#', '');
       
    	jQuery("."+tab_group).each(function(){jQuery(this).removeClass(tab_group);	jQuery(this).addClass("un"+tab_group);});
    	document.getElementById(tablink+'_tab').className=tab_group;
        
    }

	function new_business_phone_lada(num)
	{
	    var next = parseInt(num)+1
	
		jQuery.get(base_url+'contact_forms/new_business_phone_lada/'+next,"",function(response){
		
			jQuery('#phones').append(response);
			jQuery('#np').html("<a href=\"javascript:new_business_phone_lada("+next+");\">Agregar otro </a>");
	
		});
		/*
	    new Ajax.Request(base_url+'contact_forms/new_business_phone/'+next,{
		    method: 'get',
			onSuccess: function(phone){
			$('phones').insert({bottom: phone.responseText});
			$('np').replace("<a href=\"javascript:new_business_phone("+next+");\">Agregar otro </a>");
	
			    }
	    });
		*/
	}

	function new_business_phone(num)
	{
	    var next = parseInt(num)+1
	
		jQuery.get(base_url+'contact_forms/new_business_phone/'+next,"",function(response){
		
			jQuery('#phones').append(response);
			jQuery('#np').html("<a href=\"javascript:new_business_phone("+next+");\">Agregar otro </a>");
	
		});
		/*
	    new Ajax.Request(base_url+'contact_forms/new_business_phone/'+next,{
		    method: 'get',
			onSuccess: function(phone){
			$('phones').insert({bottom: phone.responseText});
			$('np').replace("<a href=\"javascript:new_business_phone("+next+");\">Agregar otro </a>");
	
			    }
	    });
		*/
	}

	function new_personal_phone(num)
	{
	    var next = parseInt(num)+1
		
		jQuery.get(base_url+'contact_forms/new_personal_phone/'+next,"",function(response){
		
			jQuery('#phones').append(response);
			jQuery('#np').html("<a href=\"javascript:new_personal_phone("+next+");\">Agregar otro </a>");
		
	
	    /*new Ajax.Request(base_url+'contact_forms/new_personal_phone/'+next,{
		    method: 'get',
			onSuccess: function(phone){
			$('phones').insert({bottom: phone.responseText});
			$('np').replace("<span id=\"np\"><a href=\"javascript:new_personal_phone("+next+");\">Agregar otro </a></span>");
	
			    }
			*/
	    });
	}

	function new_address(num)
	{
	    var next = parseInt(num)+1
		
		jQuery.get(base_url+'addresses/new_address/'+next,"",function(response){
		
			jQuery('#addresses').append(response);
			jQuery('#np').html("<a href=\"javascript:new_address("+next+");\">Agregar otro</a>");

	    });
	}
	
	function delete_contact_form(num,ajax)
	{
		if(ajax==null){ajax=true;}
		
		jQuery('#phoneid_'+num).slideUp('fast',function(){jQuery('#phoneid_'+num).remove();});	
		
		if(ajax==true){
			jQuery.get(base_url+'contact_forms/delete_contact_form/'+num,"",function(response){});
			//new Ajax.Request(base_url+'contact_forms/delete_contact_form/'+num);			
		}
	}
	
	function charging_vendors_checkboxes(aux)
	{
		if(aux=="all"){
			jQuery(".card_checkbox").each(function(){
				this.checked = true;
			});
		}
		if(aux=="none"){
			jQuery(".card_checkbox").each(function(){
				this.checked = false;
			});
		}

		charging_vendors_calculate_total();

	}

	function charging_vendors_calculate_total()
	{
		var subtotal = parseFloat(0);
		var num_cards = 0;
		var comision = 0;
		var total = 0;
		
		jQuery(".card_checkbox").each(function(){
			if(this.checked == true){
				var id = jQuery(this).val();
				var x = jQuery("#amount_"+id).val();
				if(x==''){x=0;}
				subtotal = parseFloat(subtotal) + parseFloat(x);
				num_cards++;
			}
		});

		comision = parseFloat(jQuery('#vendor_commission_per_card').val()) * parseFloat(num_cards);
		total = subtotal - comision;

		jQuery('#subtotal').val(subtotal);
		jQuery('#subtotal_txt').html(subtotal+".00");
		jQuery('#commission').val(comision);
		jQuery('#commission_txt').html(comision+".00");
		jQuery('#total').val(total);
		jQuery('#total_txt').html(total+".00");

	}
	
	function sell_card(card_id,vendor_id)
	{
		if(vendor_id == ''){vendor_id = jQuery('#vendor_id').val(); }
		if(vendor_id == null){vendor_id = jQuery('#vendor_id').val(); }
		var distributor_id = jQuery('#hdccard_'+card_id+'_distributor_id').val();
		var customer_name = jQuery('#hdccard_'+card_id+'_bought_by_name').val();
		var customer_email = jQuery('#hdccard_'+card_id+'_bought_by_email').val();
		var sold = jQuery('#hdccard_'+card_id+'_price').val();
		var data="vendor[id]="+vendor_id+"&distributor[id]="+distributor_id+"&hdccard[id]="+card_id+"&hdccard[sold]="+sold+"&hdccard[bought_by_name]="+customer_name+"&hdccard[bought_by_email]="+customer_email;
		
		if(confirm("Estas seguro de querer cambiar el estatus a VENDIDA? No podras deshacer esta accion.")==true){
		
			jQuery.post(base_url+'distributors/save_sell_cards/'+distributor_id,data,function(response){
	
				alert(response);
	
				if(response=="Vendida Satisfactoriamente!"){
	
					jQuery('#hdccard_'+card_id+'_row').fadeOut("fast");
				}
	
			});
		
		}
	}

	function change_privilege(url,business_id,user_id,privilege)
	{

		var data="u="+user_id+"&b="+business_id+"&p="+privilege;

		if(confirm("Estas seguro de querer cambiar el privilegio al usuario?")==true){

			jQuery.post(base_url+url,data,function(response){

				alert(response);

			});

		}		
	}

	function populate_dropdown(type,value)
	{
		if(value!=""){
			if(type == "locations")
			{
				url = "addresses/locations_by_zipcode/"+value+"/";
			}
			if(type == "states")
			{
				url = "addresses/districts_by_country/"+value+"/";
			}
			if(type == "cities")
			{
				url = "addresses/cities_by_district/"+value+"/";
			}
			
			jQuery.get(base_url+url,"",function(response){

				jQuery('#'+type+"_dropdown").html(response);

			});
		}
		
	}

	function check_email(email)
	{
		var bool;
		var url = "users/check_email/"+email+"/";
	
		jQuery.get(base_url+url,"",function(response){

			bool = response;
			
			if(response == "1"){
				jQuery('#password_field').val("");
				jQuery('#new_user_password').slideUp('slow');
				jQuery('#password').slideDown('slow');
			}else{
				jQuery('#password_field').val("");
				jQuery('#password').slideUp('slow');
				jQuery('#new_user_password').slideDown('slow');
			}

		});
		
		return bool;
	}

	function save_location(base_url)
	{
		var point = jQuery("#location").val();
		var business_id = jQuery("#business_id").val();
		var user_id = jQuery("#user_id").val();
		var url = "businesses/save_map/"+business_id+"/"+point+"/"+user_id+"/";
		
		jQuery.get(base_url+url,"",function(response)
		{
			jQuery("#save_status").html(response);
		});
	}

	function save_delivery_coverage(coverage)
	{
		
		var business_id = jQuery("#business_id").val();
		var url = "businesses/save_delivery_coverage/"+business_id+"/"+coverage+"/";

		jQuery.get(base_url+url,"",function(response){

			jQuery("#save_status").html(response);

		});
		
		setTimeout("jQuery('#save_status').html('');",5000);
	}
		
	function check_chars(char_id,chargroup_id,condition,level)
	{	
		//se agrego a esta funcion un if para verificar si es super administrador si lo es podra escojer todas las charts que desee
		if (level==200) { var is_selected=0; };
		
		if (level!=200) { var is_selected = jQuery("#"+char_id+"_chars:checked").length; };
		
		//si el seleccionar es igual a 0 entonces se le permite entrar a grabar el cambio
		if(is_selected==0) { var valid = true; }
		else
		{
			var how_many_selected = jQuery(".chargroup"+chargroup_id+":checked").length;
			var valid = eval(how_many_selected+condition);
			if(condition=="") {valid=true;}
		}
		
		if(valid==true)
		{
			var business_id = jQuery("#business_id").val();
			var url = "businesses/save_chars/"+business_id+"/"+char_id+"/";
			
			jQuery.get(base_url+url,"",function(response) { /* jQuery('#'+type+"_dropdown").html(response); */ });
		}
		else
		{	
			jQuery("#"+char_id+"_chars").each(function(){ this.checked = false; });
			
			alert("Ya se llego al numero maximo de opciones seleccionadas de este grupo.");
			
			//jQuery("#"+char_id+"_chars").checked=false;
		}
	}
	
	function removeElement(div)
	{
		jQuery("#"+div).remove();
	}
	
	function hdccard_promo_type(id)
	{
		jQuery("#hdccard_promo_type").slideUp("fast",function(){
			jQuery("#hdccard_promo_type").html("");
		});
		
		jQuery.get(base_url + "card/draw_form_by_promotion_type/" + id,"",function(response){
			jQuery("#hdccard_promo_type").html(response);
			jQuery("#hdccard_promo_type").slideDown();
		});
	}
	
	function fontresize(numero)
  	{
    	var elementos = Array('title','subtitle','bullet','body');
    	var sizes = Array('25px','21px','14px','11px');
    	for(var i=0; i<elementos.length; i++)
    	{
    		if(document.getElementById(elementos[i])){
    			var x = document.getElementById(elementos[i]).style.fontSize;
    			if(x==''){x=sizes[i];}
    			var actual_size = Number(x.split("px")[0]);
    			var new_size = actual_size + numero;
    			document.getElementById(elementos[i]).style.fontSize=new_size+'px';
    		}
    	}
 	}

    function formatCurrency(num) {
    	num = num.toString().replace(/\$|\,/g,'');
    	if(isNaN(num)){
    		num = "0";
    	}
    	sign = (num == (num = Math.abs(num)));
    	num = Math.floor(num*100+0.50000000001);
    	cents = num%100;
    	num = Math.floor(num/100).toString();
    	if(cents<10){
    		cents = "0" + cents;
    	}
    	for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++){
    		num = num.substring(0,num.length-(4*i+3))+','+
    	num.substring(num.length-(4*i+3));
    	}
    	return (((sign)?'':'-') + '$' + num + '.' + cents);
    }
    
    function formatNumber(myNum, numOfDec)
    {
        var decimal = 1;
        for(i=1; i<=numOfDec;i++){
            decimal = decimal *10;
        }
        var myFormattedNum = (Math.round(myNum * decimal)/decimal).toFixed(numOfDec);
        return myFormattedNum;
    }
    
    function newsScroll(){

        jQuery.post(base_url+'mini_feeds/home_feeds/',function(response){
            jQuery('#news_list').html(response);
        });

         
    }
    

	jQuery(document).ready(function(){
		
		if(jQuery('.search_bar #name')){
		    jQuery('.search_bar #name').keypress(function (e) { if (e.which == 13) { search(); } });
		}
		
		jQuery("#input_mainsearch").focus();
		
//		jQuery('#user_email_field').keypress(function (e) { if (e.which == 13) { jQuery('#user_login_big').submit();} });
		
		jQuery('#user_password_field').keypress(function (e) { if (e.which == 13) { jQuery('#user_login_big').submit();} });
		
		/*
		jQuery("#loginin").click(function(){
		
			jQuery("#float_login_box").fadeOut("slow", function() {
				jQuery(".overlay").fadeIn();
			    var pos_left = (jQuery("#my_account_panel").offset().left) - 130;
			    jQuery("#float_login_box").css("position","absolute");
			    jQuery("#float_login_box").css("top", "40px");
			    jQuery("#float_login_box").css("left", pos_left+"px");
			    jQuery("#float_login_box").fadeIn("slow");
	
			});
			
			return false;
		});
		
		
		jQuery(".close").click(function(){
			jQuery(this).parent().fadeOut("slow", function() {
				jQuery(".overlay").fadeOut();
			});
		});
		
		*/
		
	});
	
	function reload_orders(id)
	{
	    jQuery.post(base_url+"deliveries/ajax_load_orders/"+id+"/","",function(response){ jQuery("#orders_refresh").html(response);});
	}
	
	//funcion para el buscador de usuarios en el dashboard 
	function users_search_dashboard()
	{
		//obtenemos el valor del input
		var name = jQuery("#name").val();
		//le quitamos acentos
		nuevo=name.split("'")
		//mandamos la informacion opr url 
		window.location.href=base_url+"users/list_of_users/"+nuevo[0]+'/';
	}
	
	
	function search()
	{
	    // obtener todas las variables
	    var name = jQuery("#name").val();
	    var zone_id = jQuery("#zone_id").val();
		var ocasion = jQuery("#ocasion").val();
		var tipo_comida = jQuery("#tipo_comida").val();
		var hdccard_promotion = jQuery("#hdccard_promotion:checkbox:checked").val();
		var delivery = jQuery("#delivery:checkbox:checked").val();
		var char_string = "";
		
		
		if(ocasion!="")
		{
		    if(char_string!=""){ char_string += ","+ocasion;}
		    else{ char_string += ocasion;}
		}
		
		if(tipo_comida!="")
		{
		    if(char_string!=""){ char_string += ","+tipo_comida;}
		    else{ char_string += tipo_comida;}
		}
		
		if((delivery!="")&&(delivery!=undefined))
		{
		    if(char_string!=""){ char_string += ","+delivery;}
		    else{ char_string += delivery;}
		}
		
		if(hdccard_promotion==undefined){
		    hdccard_promotion = "";
		}
	    	    
	    // dependiendo de que variables tenemos es a donde enviamos la busqueda
	    
	    if((char_string != "")||(zone_id!="")){
	        
	        if(name == ""){ name = "--"; }
	        if((char_string == "")||(char_string == undefined)){ char_string = "--"; }
	        if(zone_id == ""){ zone_id = "--"; }
	        if(hdccard_promotion == ""){ hdccard_promotion = "--"; }
	        
	        var url = base_url+"businesses/basic_search/"+name+"/"+char_string+"/"+zone_id+"/"+hdccard_promotion+"/";
	    }else{
	        if(name == ""){ return false; }
	        var url = base_url+"hdcsearch/global_search/--/"+name+"/"+null;
	    }
	    
	    window.location.href=url;
	    
	}
	
	

	//funcion para el buscardor basico en horadecomer
	function basic_search()
	{
			//se obtienen los valores de los campos del buscador
			var word = '';
			var name = jQuery("#name").val();
			var zone_id = jQuery("#zone_id").val();
			var ocasion = jQuery("#ocasion").val();
			var tipo_comida = jQuery("#tipo_comida").val();
			var hdccard_promotion = jQuery("#hdccard_promotion:checkbox:checked").val();
			var internet_delivery = jQuery("#internet_delivery:checkbox:checked").val();
					
										
			//primero limpiamos de comas el nombre si es que exite
			nuevo=name.split("'")
			//pasamos toda la variable  sin comas
			for (var i=0; i < nuevo.length; i++) {
				word=word+nuevo[i];
			};
			//quitamos los undefined si es que exiten
			aux=word.split("undefined");
			
			//en caso de que la variable este vacia le asignamos --
			if (aux=='') {aux='--';};
		
			//verificamos si la variable de zona contiene algo si no es asi le asignamos --
			if (zone_id=='') {zone_id='--'};
			
			//formamos el arreglo a mandar
			var chars = new String(ocasion+','+tipo_comida);
			
			//verificamos si contiene algun valor y se forma de diferente modo el arreglo
			if((ocasion!="")&&(tipo_comida=="")){
			    var chars = new String(ocasion);
			}
			if((ocasion=="")&&(tipo_comida!="")){
			    var chars = new String(tipo_comida);
			}
			//en caso de que el arreglo contenga solo un , se le asigna --
			if (chars==',') {chars='--'};	
			
			//se manda la inforamcion por url a la siguiente link					
			window.location.href=base_url+"businesses/basic_search/"+aux+"/"+chars+"/"+zone_id+"/"+hdccard_promotion+"/"+internet_delivery;
		
		
	}
	

 	//Aqui realize dos funciones para esta vista

    //en esta funcion se toma el valor caracter por caracter y se pasa de un input a otro 
    function cambio()
    {
        /*
		// obtenemos el caracter de la varaible 
		var word = jQuery("#business_name").val();

		//se quitan las mayusculas
		word=word.toLowerCase();

		//le agregamos el valor al input siguiente
		jQuery("#business_hc_link").attr("value",word);
		*/

    }

    //funcion especialmente hecha para poder verificar caracteres en el hdclink recibimos como parametro el nombre del id del input
    function verify(name)
    {
        //obtenemos el valor que tiene este campo    
        var word =jQuery("#"+name).val();
        //inicializamos la varible para despues poderla usar
        var output = '';

        /*
        //aqui en este for estamos verificando la palabra word que no  contenga caracteres especiales    
        for (var i=0; i < word.length; i++) {
            //si la palabra contiene caracteres que no estan permitidos los eliminamos asi como la ñ la sustituimos por la n
            if (word[i]!='.' && word[i]!=',' && word[i]!="'" && word[i]!='"' && word[i]!='(' && word[i]!=')' && word[i]!=';' && word[i]!='/' && word[i]!='*' && word[i]!='_') 
            {

                if (word[i]=='ñ')
                {
                    output+='n';
                };

                if (word[i]!='ñ')
                {
                    output+=word[i];
                };

            };

        };
        */
        // aqui en esta parte se pasa toda la palabra a minusculas
        aux=output.toLowerCase();

		/*
        //ahora hacemos una llamada a una funcion en un controlador para poder verificar que la palabra que se obtubo no este ya en la base de datos
        jQuery.post(base_url+"businesses/verify_hdlink_business/"+aux+"/","",function(response){ response;
        		//inicializamos nuestra variable random        
		        var randomnumber=Math.floor(Math.random()*10000)

		        //si la respuesta de la funcion es un true en este caso un 1, en este caso se manda un mensaje de que esa palabra ya esta siendo utilizada y se sugiere la misma palabra con un numero random
		        if (response==1){                
		            alert('Hc_link ya esta siendo utilizado te sugerimos utilizar el siguiente');
		            jQuery("#"+name).attr("value",aux+randomnumber);  
		        };
		        //si la respuesta es 2 quiere decir que la palabra no est en la base de datos y no hay problema en usarla
		        if (response==2){
		            jQuery("#"+name).attr("value",aux);   
		        };        
        });
    */

    }
	

	/**
	* NAME: string_to_slug
	* OBJECTIVE: reemplazo de caracteres raros
	*/
	function string_to_slug(str) 
	{
		str = str.replace(/^\s+|\s+$/g, ''); // trim

		// remove accents, swap ñ for n, etc
		var from = "ÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛàáäâèéëêìíïîòóöôùúüûÑñÇç·/_,:;#@'";
		var to   = "aaaaeeeeiiiioooouuuuaaaaeeeeiiiioooouuuunncc---------";
		for (var i=0, l=from.length ; i<l ; i++) {
		  str = str.replace(new RegExp(from[i], "g"), to[i]);
		}

		str = str.replace(/[^a-zA-Z0-9 -]/g, '') // remove invalid chars
		  .replace(/\s+/g, '-') // collapse whitespace and replace by -
		  .toLowerCase();
		      // document.getElementById('some_name').value = str;
		return str;
	}

    function openFile(file,div,param,loader)
    {
    	if(loader == null){loader = 'loader';}
    	if(div==null){

    		jQuery.post(file,param,function(server_response){});

    	}else{

    		jQuery.post(file,param,function(server_response){ jQuery("#"+div).html(server_response); });

    	}
    }

    function openFileAndReload(file,reloadFile,div,loader)
    {
    	if(loader == null){loader = 'loader';}
    	jQuery.post(file,param,function(server_response){ 
    		openFile(reloadFile,div,'',''); 
    	});
    }$(document).ready(function()
{
	if((browser != "Explorer 6")&&(browser != "Explorer 7"))
	{
		$("div#site").corners('top');
		$("div.top_panel").corners('top');
	}
	
	$(".panel_button").corners();
	$(".tabs_microsite").corners('top');
});
// typewatch
(function(A){A.fn.typeWatch=function(D){var B=A.extend({wait:750,callback:function(){},highlight:true,captureLength:2},D);function C(H,G){var F=A(H.el).val();if((F.length>B.captureLength&&F.toUpperCase()!=H.text)||(G&&F.length>B.captureLength)){H.text=F.toUpperCase();H.cb(F)}}function E(G){if(G.type.toUpperCase()=="TEXT"||G.nodeName.toUpperCase()=="TEXTAREA"){var H={timer:null,text:A(G).val().toUpperCase(),cb:B.callback,el:G,wait:B.wait};if(B.highlight){A(G).focus(function(){this.select()})}var F=function(I){var L=H.wait;var K=false;if(I.keyCode==13&&this.type.toUpperCase()=="TEXT"){L=1;K=false}var J=function(){C(H,K)};clearTimeout(H.timer);H.timer=setTimeout(J,L)};A(G).keydown(F)}}return this.each(function(F){E(this)})}})(jQuery);

// autosuggest
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([2-8j-mp-tvwzA-Z]|1\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3 8="W";3 q="input_mainsearch";3 X="mini_search";String.prototype.Y=6(){l Q};6 s(){2("#"+8).html("");2("#"+8).slideUp("Z")}6 10(b){11(b){m 38:12();p;m 40:14();p;m 9:J();m 13:J();p;m 27:s();2("#"+q).15("");p}}6 K(){3 b=2("#"+8+" .j").16("r");(b==17)?b=0:b=b;l b}6 12(){3 b=K();k(b==0){2("#"+8).R(":last").18().E("j")}t{2(".j").L("j");2("#"+b).18().E("j")}}6 J(){3 b=K();k(b!=0){3 a=2("#"+b).R("a").16("19");k(a!=17){1a.location=a}}t{S.1b(X).1c()}}6 14(){3 b=K();k(b==0){2("#"+8).R(":1d").E("j")}t{2(".j").L("j");2("#"+b).next().E("j")}}6 1e(){3 h=M();s();2.getJSON(1f+"feeds/json/"+h,6(i){s();2.1g(i,6(d,c){3 f=c.1h.N();2("#"+8).T("<v r=\'O"+d+"\' F=\'1d\'>"+c.1h+"</v>");2.1g(c.results,6(b,a){1i(a)})});2("#"+8).T("<v r=\'close\' onclick=\'s();\'><w>Cerrar</w></v>");3 e=S.1b(q);3 g=1j(e);2("#"+8).G("left",g.x+"px");2("#"+8).G("top",(g.y+e.offsetHeight+0)+"px");2("#"+8).G("width",e.offsetWidth+100);2("#"+8).slideDown("Z")})}6 1i(b){3 a=b.1l;a=1m(a);a=a.split("|");(a[1]==null)?a[1]="&nbps;":a[1]=a[1];3 d=b.1n.N();3 c="";k(b.H!=""){}t{b.H=1o(b.1n)}(b.H!="")?c=\'<z F="H"><img src="\'+b.H+\'" /></z>\':c="";3 f="<v r=\'O"+b.r+"\'><a 19=\'"+b.link+"\'>"+c+"<z><w F=\'title\'>"+a[0]+"</w> <w F=\'1l\'> "+a[1]+"</w> </z> <z F=\'clear\'></z</v>";2("#"+8).T(f);2("#O"+b.r).1p(6(){2(".j").L("j");2(Q).E("j")});2("#O"+b.r).1q(6(){2(Q).L("j")})}6 1o(b){3 a="";11(b){m"Zonas":a="A/B/autosuggest_zone.C";p;m"Eventos":a="A/B/autosuggest_event.C";p;m"Caracteristicas":a="A/B/1r.C";p;m"Promociones":a="A/B/1r.C";p;m"Negocios":a="A/B/autosuggest_restaurant.C";p;default:a="A/B/autosuggest_general.C"}a=1f+a;l a}6 1m(b){3 a=M();a=a.N();b=b.N();3 d=b.5(""+a+"","<em>"+a+"</em>");l d.Y()}6 M(){3 b=2("#"+q).15();b=1t(b);l b}6 1t(b){3 a=I;3 d="";x=b;4(x.7("\'")>-1)x=x.5("\'","");4(x.7(\'"\')>-1)x=x.5(\'"\',"");4(x.7(".")>-1)x=x.5(".","");4(x.7("&")>-1)x=x.5("&","");4(x.7("`")>-1)x=x.5("`","");4(x.7("&")>-1)x=x.5("&","");4(x.7("#")>-1)x=x.5("#","");4(x.7("%")>-1)x=x.5("%","");4(x.7("$")>-1)x=x.5("$","");4(x.7("*")>-1)x=x.5("*","");4(x.7("á")>-1)x=x.5("á","a");4(x.7("é")>-1)x=x.5("é","e");4(x.7("í")>-1)x=x.5("í","i");4(x.7("ó")>-1)x=x.5("ó","o");4(x.7("ú")>-1)x=x.5("ú","u");4(x.7("ü")>-1)x=x.5("ü","u");4(x.7("ñ")>-1)x=x.5("ñ","n");4(x.7("<")>-1)x=x.5("<","");4(x.7(">")>-1)x=x.5(">","");4(x.7("{")>-1)x=x.5("{","");4(x.7("}")>-1)x=x.5("}","");4(x.7("~")>-1)x=x.5("~","");4(x.7("/")>-1)x=x.5("/","");4(x.7(":")>-1)x=x.5(":","");4(x.7(";")>-1)x=x.5(";","");4(x.7("?")>-1)x=x.5("?","");4(x.7(",")>-1)x=x.5(",","");l x}3 P=U;6 1u(){k(P==I){2(\'#W\').hide()}}6 1v(){P=I;setTimeout(\'1u()\',2000)}3 1w={callback:6(){1e()},wait:220,highlight:I,enterkey:I,captureLength:1};2(S).ready(6(){2("#"+8).1q(6(){1v()});2("#"+8).1p(6(){P=U});2("#"+8).G("display","none");2("#"+8).G("position","absolute");2("#"+q).typeWatch(1w);2("#"+q).parents("form").1c(6(){l U});2("#"+q).keyup(6(b){k(b.V!=0){3 a=b.V||1a.event.V;3 d=M();10(a);k(a==27){s();l}k(a==13){J();l}}})});1j=6(b){3 a=b;3 d=0;k(a.D){4(a.D){d+=a.offsetLeft;a=a.D}}t k(a.x){d+=a.x}3 a=b;3 c=0;k(a.D){4(a.D){c+=a.offsetTop;a=a.D}}t k(a.y){c+=a.y}l{x:d,y:c}};',[],95,'||jQuery|var|while|replace|function|indexOf|results_ul_id|||||||||||current|if|return|case|||break|field_id|id|clearAutoComplete|else||li|span|||div|images|color_default|png|offsetParent|addClass|class|css|image|true|selectCurrentResult|getCurrentResult|removeClass|findSearchValue|toLowerCase|item_|do_close|this|children|document|append|false|keyCode|autosuggest_results|form_id|toProperCase|fast|updownArrow|switch|prevResult||nextResult|val|attr|undefined|prev|href|window|getElementById|submit|first|autoComplete|base_url|each|value|addItemTo|getPos||description|getWordHighlight|section|imageSetup|mouseover|mouseout|autosuggest_foodtype||cleanSearch|hide_autosuggest|hide_delay|options'.split('|'),0,{}))

$(document).ready(function(){
	
	if((browser!="Explorer 6")&&(browser!="Explorer 7")&&(browser!="Explorer 8"))
	{
    	$(".mainmenu").corners();
    	$(".subordinates").corners();
	    $(".mainmenu ul li:first").corners("left");
    	$(".mainmenu ul li:last").corners("right");
	}
	
	$(".mainmenu ul li").mouseover(function(){$("#"+this.id).addClass("hover");});
	$(".mainmenu ul li").mouseout(function(){$("#"+this.id).removeClass("hover");});
	$(".mainmenu ul li#search_menu_button").click(function(){ window.location.href= base_url + "search/"; });
	$(".mainmenu ul li#delivery_menu_button").click(function(){ window.location.href= base_url + "deliveries/"; });
	$(".mainmenu ul li#hdccard_menu_button").click(function(){ window.location.href= base_url + "card/"; });
    $(".mainmenu ul li#account_menu_button").click(function(){ window.location.href= base_url + "users/"; });
});
/*
$(document).ready(function(){
    $(".mainmenu").corners();
    $(".subordinates").corners();
    $(".mainmenu ul li:first").corners("left");
    $(".mainmenu ul li:last").corners("right");
    $(".mainmenu ul li").mouseover(function(){$("#"+this.id).addClass("hover");});
    $(".mainmenu ul li").mouseout(function(){$("#"+this.id).removeClass("hover");});
    $(".mainmenu ul li#search_menu_button").click(function(){ window.location.href= base_url + "search/"; });
    $(".mainmenu ul li#delivery_menu_button").click(function(){ window.location.href= base_url + "deliveries/"; });
    $(".mainmenu ul li#hdccard_menu_button").click(function(){ window.location.href= base_url + "card/"; });
    $(".mainmenu ul li#account_menu_button").click(function(){ window.location.href= base_url + "users/"; });
});
/**/jQuery(document).ready(function() {

	/*
    // PNG fix for ie6
    jQuery(function($) {
         $("img").pngfix();
         $("img[@src$=png], #show_add, #hide_add, #tip div").pngfix();

    });
	/**/

    //Show and Hide Large Advert
    jQuery('#displayed').hide();

    jQuery('#show_add').click(function() {
    jQuery('#hidden').slideUp('fast');
    jQuery('#displayed').slideDown();

    return false;
    });

    jQuery('#hide_add').click(function() {
      jQuery('#displayed').slideUp('fast');
      jQuery('#hidden').slideDown();

    return false;
    });

});$(document).ready(function(){

    var keep_favorites_open = false;
    
    function openFavorites()
    {
        $('#user_options #favorites').slideDown();
    }
    
    function closeFavorites()
    {
        setTimeout(function(){ closeFavoritesAction(); },2000);
    }
    
    function closeFavoritesAction()
    {
        if(keep_favorites_open==false)
        {
            $('#user_options #favorites').slideUp();
        }
    }
    
	jQuery("#favorites").mouseover(function()
    {
        keep_favorites_open = true;
    });
	
	jQuery("#favorites").mouseout(function()
    {
        keep_favorites_open = false;
        closeFavorites();
    });
	
	jQuery("#favorites_trigger").mouseover(function()
    {
        openFavorites();
    });

	jQuery("#favorites_trigger").mouseover(function()
    {
        closeFavorites();
    });

	/*
    $("#favorites").mouseover(function()
    {
        keep_favorites_open = true;
    });
	
    $("#favorites").mouseout(function()
    {
        keep_favorites_open = false;
        closeFavorites();
    });
	    
    $("#favorites_trigger").mouseover(function()
    {
        openFavorites();
    });

    $("#favorites_trigger").mouseover(function()
    {
        closeFavorites();
    });
	/**/
	
});