
var MAX_output=new Array();var MAX_p=location.protocol=='https:'?'https:':'http:';var MAX_r=Math.floor(Math.random()*99999999);if(typeof(MAX_zones)!='undefined'){var MAX_zoneids='';for(var zonename in MAX_zones){MAX_zoneids+=escape(zonename+'='+MAX_zones[zonename]+"|");}
MAX_zoneids+='&nz=1';}else{var MAX_zoneids='';}
if(typeof(MAX_source)=='undefined'){MAX_source='';}
var MAX_spc="<"+"script type='text/javascript' ";MAX_spc+="src='"+MAX_p+"//ads2.weblogssl.com/www/delivery/spc.php?zones="
+MAX_zoneids;MAX_spc+="&source="+MAX_source+"&r="+MAX_r;if(window.location){MAX_spc+="&loc="+escape(window.location);}
if(document.referrer){MAX_spc+="&referer="+escape(document.referrer);}
MAX_spc+="'><"+"/script>";if(typeof(MAX_country)!='undefined'&&MAX_country=='ES'){tags='';if(typeof(MAX_tags)!='undefined'){tags=MAX_tags;}
cats='';if(typeof(MAX_cats)!='undefined'){cats=MAX_cats;}
index='';if(typeof(MAX_index)!='undefined'){index=MAX_index;}
origin='';if(typeof(MAX_Origin)!='undefined'){origin=MAX_Origin;}
adheader="<"+"script type='text/javascript' ";adheader+="src='"+"http://ad.es.doubleclick.net/adj/"+MAX_mnemonic+"/"+MAX_source;adheader+=";dcopt=ist;kw=;";adheader+=cats;adheader+=tags;adheader+=index;adheader+="origin=";adheader+=origin;adheader+=";";adheader+="screen="+screen.width+";"
adfooter="ord="+ord+"?";adfooter+="'><"+"/script>";MAX_output['CAB']=adheader+"tile=1;sz=300x250;"+adfooter;MAX_output['LAT']=adheader+"tile=2;sz=200x600;"+adfooter;MAX_output['CP']=adheader+"tile=3;sz=790x250;version=1;"+adfooter;MAX_output['CP2']=adheader+"tile=3;sz=790x250;version=2;"+adfooter;MAX_output['CP3']=adheader+"tile=4;sz=790x300;"+adfooter;MAX_output['B1']="<"+"script type='text/javascript' ";MAX_output['B1']+="src='"+"http://ads2.weblogssl.com/www/delivery/ajs.php"+"?";MAX_output['B1']+="zoneid="+MAX_zones['B1']+"&source="+MAX_source+"&cb="+ord+"&loc="+escape(window.location);if(document.referrer){MAX_output['B1']+="&referer="+escape(document.referrer);}
MAX_output['B1']+="'><"+"/script>";}else{document.write(MAX_spc);}
function MAX_show(name){if(typeof(MAX_country)=='undefined'||MAX_country!='ES'){if(name=='CP2'){name='CP';}
if(name=='CP3'){name='CP';}}
if(typeof(MAX_output[name])=='undefined'){if(name=='CP2'){document.write(Max_output['CP']);}else{return;}}else{document.write(MAX_output[name]);}}
if(typeof net=="undefined"){var net=new Object();}if(typeof net.m3=="undefined"){net.m3=new Object();}if(typeof net.m3.util=="undefined"){net.m3.util=new Object();}if(typeof net.m3.FlashObjectUtil=="undefined"){net.m3.FlashObjectUtil=new Object();}net.m3.FlashObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.createElement||!document.getElementById){return;}this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=net.m3.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();this.useExpressInstall=_7;if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new net.m3.PlayerVersion(_5.toString().split(".")));}this.installedVer=net.m3.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);if(c){this.addParam("bgcolor",c);}var q=_8?_8:"high";this.addParam("quality",q);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};net.m3.FlashObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},createParamTag:function(n,v){var p=document.createElement("param");p.setAttribute("name",n);p.setAttribute("value",v);return p;},getVariablePairs:function(){var _19=new Array();var key;var _1b=this.getVariables();for(key in _1b){_19.push(key+"="+_1b[key]);}return _19;},getFlashHTML:function(){var _1c="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}_1c="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_1c+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1d=this.getParams();for(var key in _1d){_1c+=[key]+"=\""+_1d[key]+"\" ";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_1c+="flashvars=\""+_1f+"\"";}_1c+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}_1c="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_1c+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _20=this.getParams();for(var key in _20){_1c+="<param name=\""+key+"\" value=\""+_20[key]+"\" />";}var _22=this.getVariablePairs().join("&");if(_22.length>0){_1c+="<param name=\"flashvars\" value=\""+_22+"\" />";}_1c+="</object>";}return _1c;},write:function(_23){if(this.useExpressInstall){var _24=new net.m3.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_24)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}else{this.setAttribute("doExpressInstall",false);}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _23=="string")?document.getElementById(_23):_23;n.innerHTML=this.getFlashHTML();}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}}};net.m3.FlashObjectUtil.getPlayerVersion=function(_26,_27){var _28=new net.m3.PlayerVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_28=new net.m3.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var i=3;axo!=null;i++){axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_28=new net.m3.PlayerVersion([i,0,0]);}}catch(e){}if(_26&&_28.major>_26.major){return _28;}if(!_26||((_26.minor!=0||_26.rev!=0)&&_28.major==_26.major)||_28.major!=6||_27){try{_28=new net.m3.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}catch(e){}}}return _28;};net.m3.PlayerVersion=function(_2c){this.major=parseInt(_2c[0])||0;this.minor=parseInt(_2c[1])||0;this.rev=parseInt(_2c[2])||0;};net.m3.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};net.m3.util={getRequestParameter:function(_2e){var q=document.location.search||document.location.href.hash;if(q){var _30=q.indexOf(_2e+"=");var _31=(q.indexOf("&",_30)>-1)?q.indexOf("&",_30):q.length;if(q.length>1&&_30>-1){return q.substring(q.indexOf("=",_30)+1,_31);}}return"";},removeChildren:function(n){while(n.hasChildNodes()){n.removeChild(n.firstChild);}}};if(Array.prototype.push==null){Array.prototype.push=function(_33){this[this.length]=_33;return this.length;};}var getQueryParamValue=net.m3.util.getRequestParameter;var FlashObject=net.m3.FlashObject;document.mmm_fo=1;function SC_Easyroll(){if(SC_Easyroll.singleton==null){SC_Easyroll.singleton=new SC_EasyrollClass;}return SC_Easyroll.singleton;}function SC_EasyrollClass(){this.debugLayer=null;this.playerId="";this.browser="UNKNOWN";this.playerType="UNKNOWN";this.opacity=0.01;this.mediaPlayerClassId="6BF52A52-394A-11D3-B153-00C04F79FAA6";this.flashClassId="D27CDB6E-AE6D-11CF-96B8-444553540000";this.baseUrl="http://cdn.smartclip.net/easyroll";this.silverlightElementName="";this.videoAdUrl="";this.backgroundColor="000000";this.layerLeftOffset=0;this.layerTopOffset=0;this.layerWidth=0;this.layerHeight=0;this.audioVolume=100;this.layer=null;this.clickLayer=null;this.autostart=false;this.countDown=null;this.loaded=false;this.startCall=null;this.startCallParams=null;this.stopCall=null;this.stopCallParams=null;this.skipBtn=null;this.skipBtnLayer=null;this.skipBtnOptions=new Object();this.playingContenVideo=false;this.init=function(){this.debug(2,"init()");if(typeof this.playerId=="undefined"||this.playerId==null||this.playerId==""){this.debug(1,"Player identification not set!");return;}else if(typeof this.videoAdUrl=="undefined"||this.videoAdUrl==null||this.videoAdUrl==""||!this.videoAdUrl.match(/^https?:\/\//)){this.debug(1,"Preroll url not set!");return;}
var onLoad=this.addEvent(window,"load",SC_onLoad);var onResize=this.addEvent(window,"resize",SC_onResize);var onScroll=this.addEvent(window,"scroll",SC_onResize);var flashVer=this.getFlashVersion();if(!onLoad||!onResize||!onScroll||flashVer<9||!this.detectBrowser()){this.removeEvent(window,"load",SC_onLoad);this.removeEvent(window,"resize",SC_onResize);this.removeEvent(window,"scroll",SC_onResize);this.endAd();}else{this.findPlayer();}};this.setStartCall=function(_call,_params){this.startCall=_call;this.startCallParams=_params;return this;};this.setStopCall=function(_call,_params){this.stopCall=_call;this.stopCallParams=_params;return this;};this.setSkipButton=function(btn,time,w,h,top,left){if((typeof(btn)!="undefined")){this.skipBtn=btn;}
if((typeof(time)!="undefined")&&(Number(time)>7)){this.skipBtnOptions.timeDisplaySkip=time;}else{this.skipBtnOptions.timeDisplaySkip=7;}
if((typeof(w)!="undefined")&&(Number(w)>0)){this.skipBtnOptions.w=w+"px";}else{this.skipBtnOptions.w="100px";}
if((typeof(h)!="undefined")&&(Number(h)>0)){this.skipBtnOptions.h=h+"px";}else{this.skipBtnOptions.h="20px";}
if(typeof(top)!="undefined"){this.skipBtnOptions.top=top+"px";}else{this.skipBtnOptions.top="10px";}
if(typeof(left)!="undefined"){this.skipBtnOptions.left=left+"px";}else{this.skipBtnOptions.left="10px";}}
this.setBaseUrl=function(_url){this.baseUrl=_url;return this;};this.setVideoAdUrl=function(_url){this.videoAdUrl=_url;return this;};this.setPlayerId=function(_id){this.playerId=_id;return this;};this.setSilverlightElementName=function(_name){this.silverlightElementName=_name;return this;};this.getSilverlightElementName=function(){return this.silverlightElementName;};this.setLayerLeftOffset=function(_left){this.layerLeftOffset=parseInt(_left);if(isNaN(this.layerLeftOffset)){this.layerLeftOffset=0;this.debug(1,"Redefining invalid left offset "+_left+" with "+this.layerLeftOffset+".");}return this;};this.setLayerTopOffset=function(_top){this.layerTopOffset=parseInt(_top);if(isNaN(this.layerTopOffset)){this.layerTopOffset=0;this.debug(1,"Redefining invalid top offset "+_top+" with "+this.layerTopOffset+".");}return this;};this.setLayerWidth=function(_width){this.layerWidth=parseInt(_width);if(isNaN(this.layerWidth)){this.layerWidth=320;this.debug(2,"Redefining invalid width "+_width+" with "+this.layerWidth+".");}return this;};this.setLayerHeight=function(_height){this.layerHeight=parseInt(_height);if(isNaN(this.layerHeight)){this.layerHeight=250;this.debug(2,"Redefining invalid height "+_height+" with "+this.layerHeight+".");}return this;};this.setBackgroundColor=function(_color){this.backgroundColor=_color;if(this.backgroundColor==null||typeof this.backgroundColor.match=="undefined"||!this.backgroundColor.match(/^[A-Fa-f0-9]{6}$/)){this.backgroundColor="000000";this.debug(2,"Redefining invalid color "+_color+" with "+this.backgroundColor+".");}return this;};this.setAudioVolume=function(_volume){this.audioVolume=_volume;if(isNaN(this.audioVolume)){this.audioVolume=100;this.debug(2,"Redefining invalid volume "+_volume+" with "+this.audioVolume);}return this;};this.setAutostart=function(_autostart){this.autostart=_autostart;return this;};this.addCountDown=function(_position,_text,_textColor,_color,_opacity){this.countDown=[_position,_text,_textColor,_color,_opacity];return this;};this.setCountDown=function(_position,_text,_textColor,_color,_opacity){return this.addCountDown(_position,_text,_textColor,_color,_opacity);};this.findPlayer=function(){this.debug(2,"findPlayer()");this.debugLayer=document.getElementById("SC_DEBUGLAYER");this.player=this.find(this.playerId,document);if(this.player==null&&!this.loaded){window.setTimeout(function(){SC_Easyroll().findPlayer();},100);}else if(this.loaded!=null){this.player=this.find(this.playerId,document);}
if(this.player!=null){this.prepare();}};this.onLoad=function(){this.debug(2,"onLoad()");};this.prepare=function(){this.debug(2,"prepare()");if(this.player!=null){this.checkPlayer(0);}else{this.debug(1,"Player object not found!");}};this.getPlayer=function(){return this.player;};this.detectBrowser=function(){var agent=navigator.userAgent;if(agent.match(/Firefox.(\d.\d)/i)!=null){this.browser="FIREFOX";return true;}else if(agent.match(/MSIE.(\d.\d)/i)!=null){this.browser="IE";return true;}else if(agent.match(/Opera.(\d.\d)/i)!=null){this.browser="OPERA";return true;}else if(agent.match(/Safari.(\d)/i)!=null){this.browser="SAFARI";return true;}return false;};this.addEvent=function(_obj,_event,_func){if(_obj.addEventListener){_obj.addEventListener(_event,_func,false);return true;}else if(_obj.attachEvent){return _obj.attachEvent("on"+_event,_func);}return false;};this.removeEvent=function(_obj,_event,_func){if(typeof _obj.removeEventListener!="undefined"){_obj.removeEventListener(_event,_func,false);return true;}else if(typeof _obj.detachEvent!="undefined"){return _obj.detachEvent("on"+_event,_func);}return false;};this.getLeft=function(_obj){var left=0;if(_obj){if(_obj.offsetParent){left=_obj.offsetLeft+this.getLeft(_obj.offsetParent);}else if(_obj.x){left=_obj.x;}}return left;};this.setLeft=function(_obj,_left){_obj.style.left=_left+"px";};this.getTop=function(_obj){var top=0;if(_obj){if(_obj.offsetParent){top=_obj.offsetTop+this.getTop(_obj.offsetParent);}else if(_obj.y){top=_obj.y;}}return top;};this.setTop=function(_obj,_top){_obj.style.top=_top+"px";};this.getWidth=function(_obj){var width=0;var attr=null;if(_obj){width=parseInt(_obj.width);if(isNaN(width)){width=parseInt(_obj.offsetWidth);if(isNaN(width)){width=parseInt(_obj.style.width);}}}return width;};this.getHeight=function(_obj){var height=0;var attr=null;if(_obj){height=parseInt(_obj.height);if(isNaN(height)){height=parseInt(_obj.offsetHeight);if(isNaN(height)){height=parseInt(_obj.style.height);}}}return height;};this.hideOrShow=function(_obj,_show){if(_show){_obj.style.visibility="visible";}else{_obj.style.visibility="hidden";}};this.setOpacity=function(_obj,_value){if(this.browser=="IE"){_obj.style.filter="alpha(opacity="+_value*100+")";}else{_obj.style.opacity=_value;}};this.getDocument=function(_frame){if(_frame.contentDocument!=null){return _frame.contentDocument;}else if(_frame.contentWindow){return _frame.contentWindow.document;}else if(_frame.document){return _frame.document;}return null;};this.find=function(_id,_document){var object=_document.getElementById(_id);if(object==null){var iframes=_document.getElementsByTagName("iframe");for(var i=0;object==null&&i<iframes.length;i++){var doc=this.getDocument(iframes[i]);if(false){object=this.find(_id,doc);}}}return object;};this.getPositionAndDimension=function(){var left,top,width,height;if(this.player!=null){left=this.getLeft(this.player)+this.layerLeftOffset;top=this.getTop(this.player)+this.layerTopOffset;width=this.layerWidth>0?this.layerWidth:this.getWidth(this.player);height=this.layerHeight>0?this.layerHeight:this.getHeight(this.player);return[left,top,width,height];}return null;};this.addLayerToPage=function(){var data=this.getPositionAndDimension(this.player);if(this.browser=="IE"){this.layer=document.createElement("<div id='smartclip' style=\"filter:alpha(opacity="+this.opacity*100+"); z-index:100; background-color:#"+this.backgroundColor+"; left:"+data[0]+"px; top:"+data[1]+"px; width:"+data[2]+"px; height:"+data[3]+"px; position:absolute; visibility:hidden;\">");}else{this.layer=document.createElement("div");this.layer.setAttribute("id","smartclip");this.layer.setAttribute("style","opacity:"+this.opacity+"; z-index:100; background-color:#"+this.backgroundColor+"; left:"+data[0]+"px; top:"+data[1]+"px; width:"+data[2]+"px; height:"+data[3]+"px; position:absolute; visibility:hidden;");}if(this.browser=="IE"){this.internalPlayer=document.createElement("<object id=\"SC_INTERNAL_PLAYER\" classid=\"clsid:"+this.flashClassId+"\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\" width=\"100%\" height=\"100%\" type=\"application/x-shockwave-flash\">");}else{this.internalPlayer=document.createElement("object");this.internalPlayer.setAttribute("id","SC_INTERNAL_PLAYER");this.internalPlayer.setAttribute("width","100%");this.internalPlayer.setAttribute("height","100%");this.internalPlayer.setAttribute("type","application/x-shockwave-flash");this.internalPlayer.setAttribute("data",this.getMiniPlayerUrl());}this.internalPlayer.appendChild(this.createParam("movie",this.getMiniPlayerUrl()));this.internalPlayer.appendChild(this.createParam("menu","false"));this.internalPlayer.appendChild(this.createParam("scale","noscale"));this.internalPlayer.appendChild(this.createParam("wmode","transparent"));this.internalPlayer.appendChild(this.createParam("bgcolor","#"+this.backgroundColor));this.internalPlayer.appendChild(this.createParam("allowScriptAccess","always"));if(this.countDown!=null){this.internalPlayer.appendChild(this.createParam("flashvars","ad_countdown=true&ad_countdown_position="+this.countDown[0]+"&ad_countdown_text="+escape(this.countDown[1])+"&ad_countdown_text_color="+this.countDown[2]+"&ad_countdown_color="+this.countDown[3]+"&ad_countdown_opacity="+this.countDown[4]));}
if(this.browser=="IE"){this.clickLayer=document.createElement("<div style=\"filter:alpha(opacity=0.0); z-index:101; background-color:#"+this.backgroundColor+"; left:0px; top:0px; width:"+data[2]+"px; height:"+data[3]+"px; position:absolute;\" onclick=\"SC_run()\">");if(this.skipBtn!=null){var posLeft=this.layerWidth-100;var posTop=this.layerHeight-30;this.skipBtnLayer=document.createElement("<div style=\"visibility:hidden; z-index:111; background-image:url(http://img.weblogssl.com/saltarpubli-tv.gif); background-repeat:no-repeat; left:"+this.skipBtnOptions.left+"; top:"+this.skipBtnOptions.top+"; width:"+this.skipBtnOptions.w+"; height:"+this.skipBtnOptions.h+";position:absolute;\" onclick=\"SC_endVideoAd()\">");this.skipBtnLayer.setAttribute("id","skipBtn");}}else{this.clickLayer=document.createElement("div");this.clickLayer.setAttribute("style","opacity:0.0; z-index:101; background-color:#"+this.backgroundColor+"; left:0px; top:0px; width:"+data[2]+"px; height:"+data[3]+"px; position:absolute;");this.clickLayer.addEventListener("click",SC_run,false);if(this.skipBtn!=null){var posLeft=this.layerWidth-100;var posTop=this.layerHeight-30;this.skipBtnLayer=document.createElement("div");this.skipBtnLayer.setAttribute("style","visibility:hidden; background-image:url(http://img.weblogssl.com/saltarpubli-tv.gif); background-repeat:no-repeat;left:"+this.skipBtnOptions.left+"; top:"+this.skipBtnOptions.top+"; width:"+this.skipBtnOptions.w+"; height:"+this.skipBtnOptions.h+"; position:absolute;");this.skipBtnLayer.setAttribute("id","skipBtn");this.skipBtnLayer.addEventListener("click",SC_endVideoAd,false);}}
this.layer.appendChild(this.internalPlayer);this.layer.appendChild(this.clickLayer);if(this.skipBtnLayer)this.layer.appendChild(this.skipBtnLayer);document.body.appendChild(this.layer);};this.getMiniPlayerUrl=function(){return this.baseUrl+"/player.swf";};this.createParam=function(_name,_value){var param=null;if(this.browser=="IE"){param=document.createElement("<param name=\""+_name+"\" value=\""+_value+"\">");}else{param=document.createElement("param");param.setAttribute("name",_name);param.setAttribute("value",_value);}return param;};this.showSkipButton=function(){var skpLayer=document.getElementById("skipBtn");if(skpLayer!=null){skpLayer.style.visibility="visible";}}
this.checkPlayer=function(_try){var type=this.player.getAttribute("type");var data=this.player.getAttribute("data");var classid=this.player.getAttribute("classid");var result=false;var error=false;var name=null;var value=null;var params=null;this.debug(2,"checkPlayer("+_try+")");if(type!=null){type=type.toLowerCase();}
if(data!=null){data=data.toLowerCase();}
if(classid!=null){classid=classid.toUpperCase();}
if(this.browser=="IE"&&classid!=null&&classid.indexOf(this.mediaPlayerClassId)!=-1){this.playerType="WMV";}else if(type!=null&&type.indexOf("x-silverlight")!=-1||data!=null&&data.indexOf("x-silverlight")!=-1){this.playerType="SILVERLIGHT";}else if(type!=null&&type.indexOf("x-shockwave-flash")!=-1||classid!=null&&classid.indexOf(this.flashClassId)!=-1){this.playerType="FLASH";}
this.debug(2,"- player type = "+this.playerType);if(this.playerType=="SILVERLIGHT"){var background=false;var windowless=false;var opera=this.browser=="OPERA";var element=typeof this.player.Content!="undefined"?this.player.Content.FindName(this.silverlightElementName):null;var playing=element!=null&&element.CurrentState=="Playing"&&element.BufferingProgress==1;this.debug(2,"- playing = "+playing+" ("+(element!=null?element.CurrentState:"-")+", "+(element!=null?element.BufferingProgress:"-")+")");params=this.player.getElementsByTagName("param");for(var i=0;params!=null&&i<params.length;i++){name=params[i].name.toLowerCase();value=params[i].value.toLowerCase();if(name=="background"&&value=="transparent"){background=true;}
if(name=="windowless"&&value=="true"){windowless=true;}}
if(!background){this.debug(1,"Silverlight parameter \"background\" is not set or not set to \"transparent\"");}if(!windowless){this.debug(1,"Silverlight parameter \"windowless\" is not set or not set to \"true\"");}if(opera){this.debug(1,"Silverlight is not fully supported in Opera yet as the \"windowless\" parameter does not work.");}error=!background||!windowless||opera;result=!error&&(!this.autostart||playing);}else if(this.playerType=="FLASH"){var wmode=false;var script=false;var node=this.player.nodeName.toLowerCase();var custom=eval("this.player."+this.startCall);var start=typeof custom!="undefined"||typeof this.player.sendEvent!="undefined"||typeof this.player.Pause!="undefined"||typeof this.player.pauseVideo!="undefined";this.debug(2,"- SendEvent()  = "+(typeof this.player.sendEvent!="undefined"));this.debug(2,"- Pause()      = "+(typeof this.player.Pause!="undefined"));this.debug(2,"- PauseVideo() = "+(typeof this.player.pauseVideo!="undefined"));this.debug(2,"- "+this.startCall+"() = "+(typeof custom!="undefined"));if(node=="object"){params=this.player.getElementsByTagName("param");}else{params=this.player.attributes;}for(var j=0;params!=null&&j<params.length;j++){name=params[j].name.toLowerCase();value=params[j].value.toLowerCase();if(name=="wmode"&&value=="transparent"){wmode=true;}if(name=="allowscriptaccess"&&value=="always"){script=true;}}if(!wmode){this.debug(1,"- Flash parameter \"wmode\" is not set or not set to \"transparent\"");}if(!script){this.debug(1,"- Flash parameter \"allowscriptaccess\" is not set or not set to \"always\"");}if(!start){this.debug(1,"- Could not determine start method for the player");}error=!wmode||!script;result=!error&&start;}else if(this.playerType=="WMV"){error=false;result=!error;}this.debug(2,"- result = "+result);if(!error&&!result&&_try<20){window.setTimeout(function(){SC_Easyroll().checkPlayer(++_try);},500);}else if(result){this.show();}};this.onResize=function(){this.debug(2,"onResize()");var data=this.getPositionAndDimension(this.player);if(data!=null&&this.layer!=null){this.setLeft(this.layer,data[0]);this.setTop(this.layer,data[1]);}};this.show=function(){this.debug(2,"show()");this.addLayerToPage();this.hideOrShow(this.layer,true);};this.initDone=function(){this.debug(2,"initDone("+this.autostart+")");if(this.autostart){this.stopExternalPlayer(0);}};this.run=function(){this.debug(2,"run("+this.videoAdUrl+")");try{var data=this.getPositionAndDimension(this.player);if(data!=null){this.internalPlayer.loadVideoAd(this.videoAdUrl,data[2],data[3],this.audioVolume);}else{this.endVideoAd();}}catch(exc){this.debug(1,exc);}};this.startingVideoAd=function(){this.debug(2,"startingVideoAd()");this.setOpacity(this.layer,1);this.hideOrShow(this.clickLayer,false);};this.endVideoAd=function(){this.layer.appendChild(this.skipBtnLayer);this.debug(2,"endVideoAd");this.hideOrShow(this.layer,false);this.startExternalPlayer();};this.buildCustomCall=function(_call,_params){var custom=_call+"(";for(var i=0;_params!=null&&i<_params.length;i++){custom+="'"+_params[i]+"'";if(i<_params.length-1){custom+=",";}}custom+=")";return custom;};this.runCustomCall=function(){var custom="this.player."+this.buildCustomCall(this.startCall,this.startCallParams);this.debug(2,"runCustomCall("+custom+")");eval(custom);};this.getCustomCallFunc=function(){var custom="runFunc = function() { SC_Easyroll().getPlayer()."+this.buildCustomCall(this.stopCall,this.stopCallParams)+"; SC_Easyroll().run(); }";this.debug(2,"getCustomCallFunc("+custom+")");return custom;};this.startExternalPlayer=function(){this.debug(2,"startExternalPlayer");if(this.playerType=="FLASH"){if(!this.playingContenVideo){var custom=eval("this.player."+this.startCall);if(typeof custom!="undefined"){try{this.runCustomCall();}catch(exc){alert(exc);}}else if(typeof this.player.sendEvent!="undefined"){try{this.player.sendEvent("PLAY","true");}catch(exc){}}else if(typeof this.player.DoPlay!="undefined"){try{this.player.DoPlay();}catch(exc){}}else if(typeof this.player.playVideo!="undefined"){try{this.player.playVideo();}catch(exc){}}
this.playingContenVideo=true;}}else if(this.playerType=="SILVERLIGHT"){try{this.player.Content.FindName(this.silverlightElementName).Play();}catch(exc){}}else if(this.playerType=="WMV"){try{player.controls.play();}catch(exc){alert(exc);}}};this.stopExternalPlayer=function(_try){this.debug(2,"stopExternalPlayer("+_try+", "+this.playerType+")");var stopped=false;var runFunc=null;if(this.playerType=="FLASH"){var custom=eval("this.player."+this.stopCall);if(typeof custom!="undefined"){try{custom=this.getCustomCallFunc();eval(custom);stopped=true;}catch(exc){alert(exc);}}else if(typeof this.player.sendEvent!="undefined"){try{runFunc=function(){SC_Easyroll().getPlayer().sendEvent("PLAY","false");SC_Easyroll().run();};stopped=true;}catch(exc){}}else if(typeof this.player.Pause!="undefined"){try{runFunc=function(){SC_Easyroll().getPlayer().Pause();SC_Easyroll().run();};stopped=true;}catch(exc){}}else if(typeof this.player.pauseVideo!="undefined"){try{runFunc=function(){SC_Easyroll().getPlayer().pauseVideo();SC_Easyroll().run();};stopped=true;}catch(exc){}}}else if(this.playerType=="SILVERLIGHT"){try{runFunc=function(){SC_Easyroll().getPlayer().Content.FindName(SC_Easyroll().getSilverlightElementName()).Pause();SC_Easyroll().run();};stopped=true;}catch(exc){}}else if(this.playerType=="WMV"){try{runFunc=function(){SC_Easyroll().getPlayer().controls.pause();SC_Easyroll().run();};stopped=true;}catch(exc){alert(exc);}}if(!stopped&&_try<10){window.setTimeout(function(){SC_Easyroll().stopExternalPlayer(++_try);},500);}else if(stopped){runFunc();}};this.getFlashVersion=function(){var isIE=navigator.appVersion.indexOf("MSIE")!=-1?true:false;var isWin=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false;var isOpera=navigator.userAgent.indexOf("Opera")!=-1?true:false;var descr=null;var versions=null;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins['Shockwave Flash 2.0']||navigator.plugins['Shockwave Flash']){descr=navigator.plugins["Shockwave Flash"+(navigator.plugins['Shockwave Flash 2.0']?" 2.0":"")].description.split(" ");versions=descr[2].split(".");return versions[0];}}else if(isIE&&isWin&&!isOpera){try{versions=(new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")).GetVariable("$version").split(",");return versions[0].substr(4);}catch(exception){}}
return 7;};this.debug=function(_level,_message){if(this.debugLayer!=null){if(this.debugLayer.innerHTML==""){this.debugLayer.innerHTML=_message;}else{this.debugLayer.innerHTML=this.debugLayer.innerHTML+"<br>"+_message;}}};}function SC_onLoad(){SC_Easyroll().onLoad();}function SC_initDone(){SC_Easyroll().initDone();}function SC_onResize(){SC_Easyroll().onResize();}function SC_run(){var skpLayer=document.getElementById("skipBtn");if(skpLayer!=null){window.setTimeout(function(){SC_Easyroll().showSkipButton();},SC_Easyroll().skipBtnOptions.timeDisplaySkip*1000);}
SC_Easyroll().run();}function SC_startingVideoAd(){SC_Easyroll().startingVideoAd();}function SC_endVideoAd(){SC_Easyroll().endVideoAd();var adLayer=document.getElementById("smartclip");adLayer.innerHTML="";}
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();function random()
{random.seed=(random.seed*random.a+random.c)%random.m;return random.seed/random.m;}
random.m=714025;random.a=4096;random.c=150889;random.seed=(new Date()).getTime()%random.m;function _rsEH(){}
window.onerror=_rsEH;var _rsLP=location.protocol.indexOf('https')>-1?'https:':'http:';var _rsND=_rsLP+_rsDN;var _rsRD=(new Date()).getTime();if(typeof(_rsCC)=="undefined"){var _rsCC=1;}
if(typeof(_rsDT)=="undefined"){var _rsDT=0;}
if(typeof(_rsSE)=="undefined"){var _rsSE=0;}
if(typeof(_rsSV)=="undefined"){var _rsSV="";}
if(typeof(_rsSM)=="undefined"){var _rsSM=0;}
if(typeof(_rsSS)=="undefined"){var _rsSS=1;}
if(typeof(_rsUT)=="undefined"){var _rsUT=0;}
if(typeof(_rsMP)=="undefined"){var _rsMP=1;}
if(typeof(_rsIP)=="undefined"){var _rsIP=0;}
if(typeof(_rsCG)=="undefined"){var _rsCG=0;}
if(typeof(_rsTC)=="undefined"){var _rsTC=500;}
if(typeof(_rsSI)=="undefined"){var _rsSI=escape(window.location);}
if(typeof(_rsCL)=="undefined"){var _rsCL=0;}
if(typeof(_rsCU)=="undefined"){var _rsCU=window.location;}
if(typeof(_rsPLfl)=="undefined"){var _rsPLfl=1;}
if(typeof(_rsPLqt)=="undefined"){var _rsPLqt=0;}
if(typeof(_rsPLre)=="undefined"){var _rsPLre=0;}
if(typeof(_rsPLwm)=="undefined"){var _rsPLwm=0;}
if(typeof(_rsPLjj)=="undefined"){var _rsPLjj=0;}
if(typeof(_rsPLac)=="undefined"){var _rsPLac=0;}
if(typeof(_rsC0)=="undefined"){var _rsC0;}
if(typeof(_rsC1)=="undefined"){var _rsC1;}
if(typeof(_rsC2)=="undefined"){var _rsC2;}
if(typeof(_rsC3)=="undefined"){var _rsC3;}
if(typeof(_rsC4)=="undefined"){var _rsC4;}
if(typeof(_rsC5)=="undefined"){var _rsC5;}
if(typeof(_rsC6)=="undefined"){var _rsC6;}
if(typeof(_rsC7)=="undefined"){var _rsC7;}
if(typeof(_rsC8)=="undefined"){var _rsC8;}
if(typeof(_rsC9)=="undefined"){var _rsC9;}
function _rsPause(_rsMillis){var _rsDate=new Date();var _rsCurrDate;do{_rsCurrDate=new Date();}while(_rsCurrDate-_rsDate<_rsMillis);}
function _rsRecordFactory(_rsClickUrl,_rsNewCG){var _rsSrc=_rsND+'cgi-bin/m?rnd='+(new Date()).getTime();_rsSrc+='&ci='+_rsCI;_rsSrc+='&cg='+escape(_rsNewCG);_rsSrc+='&cc=0';_rsSrc+='&si='+_rsCI+'-ctgw-'+escape(_rsClickUrl);_rsSrc+='&rp='+escape(window.location);if(_rsSrc.length>2048){_rsSrc=_rsSrc.substring(0,2048);}
return _rsSrc;}
function _rsEvent(_rsClickUrl){var _rsNewCG=_rsEvent.arguments.length>1?_rsEvent.arguments[1]:_rsCG;(new Image(1,1)).src=_rsRecordFactory(_rsClickUrl,_rsNewCG);}
function _rsLinkTrack(_rsClickUrl){var _rsNewCG=_rsLinkTrack.arguments.length>1?_rsLinkTrack.arguments[1]:_rsCG;var _rsClickImg=new Image(1,1);_rsClickImg.src=_rsRecordFactory(_rsClickUrl,_rsNewCG);_rsPause(_rsTC);}
var _rsClickDst;function _rsClick(_rsClickUrl){var _rsNewCG=_rsClick.arguments.length>1?_rsClick.arguments[1]:_rsCG;var _rsClickImg=new Image(1,1);_rsClickImg.src=_rsRecordFactory(_rsClickUrl,_rsNewCG);_rsClickDst=_rsClickUrl;setTimeout("window.location = _rsClickDst",_rsTC);}
function _rsVerInfo(str,ct){var p=0;var sp=0;for(var i=0;i<ct&&p>=0;i++){sp=p+1;p=str.indexOf('.',sp);}
if(p>0){var v=str.substring(sp,p).match(/\d+$/);return v?v:0;}else{return 0;}}
function _rsPluginDetect(){var _rsPlugins=[];var _rsMT=navigator.mimeTypes;if(_rsMT&&_rsMT.length>0){var k;if(_rsPLfl==1){_rsPlugins['FL']=-1;k='application/x-shockwave-flash';if(_rsMT[k]&&_rsMT[k].enabledPlugin){_rsPlugins['FL']=_rsVerInfo(_rsMT[k].enabledPlugin.description,1);}}
if(_rsPLqt==1){_rsPlugins['QT']=-1;k='video/quicktime';if(_rsMT[k]&&_rsMT[k].enabledPlugin){_rsPlugins['QT']=_rsVerInfo(_rsMT[k].enabledPlugin.name,1);}}
if(_rsPLre==1){_rsPlugins['RE']=-1;k='audio/x-pn-realaudio-plugin';if(_rsMT[k]&&_rsMT[k].enabledPlugin){_rsPlugins['RE']=0;}}
if(_rsPLwm==1){_rsPlugins['QT']=-1;var rt=true;if(window.GeckoActiveXObject){try{var p=new GeckoActiveXObject("WMPlayer.OCX.7");_rsPlugins['WM']=_rsVerInfo(p.versionInfo,1);rt=false;}catch(e){}}
if(rt){k='application/x-mplayer2';if(_rsMT[k]&&_rsMT[k].enabledPlugin){_rsPlugins['WM']=0;}}}
if(_rsPLjj==1){_rsPlugins['JJ']=-1;k='application/x-java-applet';if(_rsMT[k]&&_rsMT[k].enabledPlugin){var v=_rsVerInfo(_rsMT[k].enabledPlugin.description,2);_rsPlugins['JJ']=(v==0?v:'1.'+v);}}
if(_rsPLac==1){_rsPlugins['AC']=-1;k='application/pdf';if(_rsMT[k]&&_rsMT[k].enabledPlugin){_rsPlugins['AC']=0;}}}else if(window.ActiveXObject){var _rsP;if(_rsPLfl==1){_rsPlugins['FL']=-1;for(var i=14;i>0;i--){try{_rsP=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+i);if(_rsP!=null){_rsPlugins['FL']=i;break;}}catch(e){}}}
if(_rsPLqt==1){_rsPlugins['QT']=-1;try{_rsP=new ActiveXObject('QuickTimeCheckObject.QuickTimeCheck.1');if(_rsP!=null){_rsPlugins['QT']=parseInt(_rsP.QuickTimeVersion.toString(16).substring(0,1));}}catch(e){}}
if(_rsPLre==1){_rsPlugins['RE']=-1;try{_rsP=new ActiveXObject('rmocx.RealPlayer G2 Control.1');if(_rsP!=null){_rsPlugins['RE']=0;}}catch(e){}}
if(_rsPLwm==1){_rsPlugins['WM']=-1;try{_rsP=new ActiveXObject('WMPlayer.OCX.7');if(_rsP!=null){_rsPlugins['WM']=_rsVerInfo(_rsP.versionInfo,1);}}catch(e){}}
if(_rsPLjj==1){_rsPlugins['JJ']=-1;try{_rsP=new ActiveXObject('JavaPlugin');if(_rsP!=null){_rsPlugins['JJ']=0;}}catch(e){}}
if(_rsPLac==1){_rsPlugins['AC']=-1;var rt=true;try{_rsP=new ActiveXObject('AcroPDF.PDF.1');if(_rsP!=null){_rsPlugins['AC']=_rsVerInfo(_rsP.GetVersions(),1);rt=false;}}catch(e){}
if(rt){for(var i=6;i>2;i--){try{_rsP=new ActiveXObject('PDF.PdfCtrl.'+i);if(_rsP!=null){_rsPlugins['AC']=i;break;}}catch(e){}}}}}
return _rsPlugins;}
function rsCi()
{var _rsUA=navigator.appName+" "+navigator.appVersion;var _rsRUA=navigator.userAgent;var _rsWS=window.screen;var _rsBV=navigator.appVersion.substring(0,1);var _rsNN=(_rsUA.indexOf('Netscape'));var _rsMC=(_rsUA.indexOf('Mac'));var _rsIE=(_rsUA.indexOf('MSIE'));var _rsOP=(_rsRUA.indexOf('Opera'));var _rsIEV=(parseInt(_rsUA.substr(_rsIE+5)));var _rsRP=escape(document.referrer);var _rsSR;var _rsCD;var _rsLG;var _rsJE;var _rsCK;var _rsTZ;var _rsCT;var _rsHP;var _rsTL;var _rsSW;var _rsSH;var _rsFL;var _rsQT;var _rsRE;var _rsWM;var _rsJJ;var _rsAC;if(_rsMP==0){return;}
_rsJE=(navigator.javaEnabled()==true)?"y":"n";if(_rsDT==1){_rsTL=escape(document.title);}
if((_rsIE>0)||((_rsNN!=-1)&&(_rsBV>=5))){_rsCK=(navigator.cookieEnabled==true)?"y":"n";}
if((_rsIE>=0)&&(_rsIEV>=5)&&(_rsMC==-1)&&(_rsOP==-1)){document.body.addBehavior("#default#clientCaps");_rsCT=document.body.connectionType;document.body.addBehavior("#default#homePage");_rsHP=(document.body.isHomePage(location.href))?"y":"n";}
var _rsD=new Date();_rsTZ=_rsD.getTimezoneOffset()/-60;if((typeof(_rsWS)!="undefined")&&(_rsWS!=null)){_rsSW=_rsWS.width;_rsSH=_rsWS.height;_rsCD=_rsWS.colorDepth;_rsSR=_rsSW+'x'+_rsSH;if((_rsNN!=-1)&&(_rsBV>=4)){_rsCD=_rsWS.pixelDepth;}}
if((_rsNN!=-1)&&(_rsBV>=4)||(_rsOP>=0)){_rsLG=navigator.language;}
if((_rsIE!=-1)&&(_rsBV>=4)&&(_rsOP==-1)){_rsLG=navigator.userLanguage;}
var _rsPlugins=_rsPluginDetect();var _rsPR="";_rsPR='<img class="inielsen" src="';_rsPR=_rsPR+_rsND+'cgi-bin/m?rnd='+(new Date()).getTime();_rsPR=_rsPR+'&ci='+_rsCI;_rsPR=_rsPR+'&cg='+escape(_rsCG);_rsPR=_rsPR+'&cc='+_rsCC;if(_rsSR!=null){_rsPR=_rsPR+'&sr='+_rsSR;}
if(_rsCD!=null){_rsPR=_rsPR+'&cd='+_rsCD;}
if(_rsLG!=null){_rsPR=_rsPR+'&lg='+_rsLG;}
if(_rsJE!=null){_rsPR=_rsPR+'&je='+_rsJE;}
if(_rsCK!=null){_rsPR=_rsPR+'&ck='+_rsCK;}
if(_rsTZ!=null){_rsPR=_rsPR+'&tz='+_rsTZ;}
if(_rsCT!=null){_rsPR=_rsPR+'&ct='+_rsCT;}
if(_rsHP!=null){_rsPR=_rsPR+'&hp='+_rsHP;}
if(_rsTL!=null){_rsPR=_rsPR+'&tl='+_rsTL;}
if(_rsUT==1){if(_rsC0!=null){_rsPR=_rsPR+'&c0='+escape(_rsC0);}
if(_rsC1!=null){_rsPR=_rsPR+'&c1='+escape(_rsC1);}
if(_rsC2!=null){_rsPR=_rsPR+'&c2='+escape(_rsC2);}
if(_rsC3!=null){_rsPR=_rsPR+'&c3='+escape(_rsC3);}
if(_rsC4!=null){_rsPR=_rsPR+'&c4='+escape(_rsC4);}
if(_rsC5!=null){_rsPR=_rsPR+'&c5='+escape(_rsC5);}
if(_rsC6!=null){_rsPR=_rsPR+'&c6='+escape(_rsC6);}
if(_rsC7!=null){_rsPR=_rsPR+'&c7='+escape(_rsC7);}
if(_rsC8!=null){_rsPR=_rsPR+'&c8='+escape(_rsC8);}
if(_rsC9!=null){_rsPR=_rsPR+'&c9='+escape(_rsC9);}}
if(_rsPlugins['FL']!=null){_rsPR=_rsPR+'&fl='+_rsPlugins['FL'];}
if(_rsPlugins['QT']!=null){_rsPR=_rsPR+'&qt='+_rsPlugins['QT'];}
if(_rsPlugins['RE']!=null){_rsPR=_rsPR+'&re='+_rsPlugins['RE'];}
if(_rsPlugins['WM']!=null){_rsPR=_rsPR+'&wm='+_rsPlugins['WM'];}
if(_rsPlugins['JJ']!=null){_rsPR=_rsPR+'&jj='+_rsPlugins['JJ'];}
if(_rsPlugins['AC']!=null){_rsPR=_rsPR+'&ac='+_rsPlugins['AC'];}
_rsPR=_rsPR+'&si='+_rsSI;_rsPR=_rsPR+'&rp='+_rsRP;if(_rsIP==1){_rsPR=_rsPR+'" style="visibility:hidden;position:absolute;left:0px;top:0px;z-index:-1';}
_rsPR=_rsPR+'" width="1" height="1" alt=""/>';document.write(_rsPR);}
function _rsCLSendIt(_rsSrc,_rsDest,_rsTargetType,_rsClickName,_rsClickValue){var _rsCLData=_rsND+'cgi-bin/m?rnd='+(new Date()).getTime();_rsCLData=_rsCLData+'&ci='+_rsCI;_rsCLData=_rsCLData+'&cg='+escape(_rsCG);_rsCLData=_rsCLData+'&cc=0';_rsCLData=_rsCLData+'&si='+_rsCI+'-ctpo-'+escape(_rsDest);_rsCLData=_rsCLData+'&rp='+escape(_rsSrc);_rsCLData=_rsCLData+'&tt='+escape(_rsTargetType);_rsCLData=_rsCLData+'&cn='+escape(_rsClickName);_rsCLData=_rsCLData+'&cv='+escape(_rsClickValue);if(_rsCLData.length>2048){_rsCLData=_rsCLData.substring(0,2048);}
var _rsPx=new Image(1,1);_rsPx.src=_rsCLData;_rsPause(_rsTC);}
function _rsCLSendALink(_rsALink){var _rsName=_rsALink.innerHTML.toLowerCase().indexOf('img')>-1?'image':'text';_rsCLSendIt(_rsCU,_rsALink.href,_rsALink.tagName.toLowerCase(),_rsName,_rsALink.innerHTML);}
function _rsCLSendForm(_rsInput){if(_rsInput.form==undefined||_rsInput.form.action==undefined){return;}
if(_rsInput.type=='image'){var _rsValue=_rsInput.src;}
else if(_rsInput.tagName=='BUTTON'){var _rsValue=_rsInput.innerHTML.replace(/^\s+|\s+$/g,'').replace(/\s+/g,' ');if(_rsValue=="")_rsValue=_rsInput.value;}
else{var _rsValue=_rsInput.value;}
_rsCLSendIt(_rsCU,_rsInput.form.action,_rsInput.form.tagName.toLowerCase(),_rsInput.type.toLowerCase(),_rsValue);}
function _rsCLCatchIt(e){var _rsCurr=e?e.target:window.event.srcElement;if((_rsCurr.tagName=='INPUT'||_rsCurr.tagName=='BUTTON')&&(_rsCurr.type=='image'||_rsCurr.type=='submit'||_rsCurr.type=='button')){_rsCLSendForm(_rsCurr);}
else
{do{if((_rsCurr.tagName=='A')&&(_rsCurr.href.length>0)){_rsCLSendALink(_rsCurr);break;}
_rsCurr=_rsCurr.parentNode;}while(_rsCurr!=null&&_rsCurr.tagName!='BODY')}}
function _rsCLRegisterIt(){if(!document.getElementById){return;}
var _rsOld=document.body.onclick;if(_rsOld){document.body.onclick=function(e){_rsCLCatchIt(e);_rsOld(e);}}
else{document.body.onclick=_rsCLCatchIt;}}
if((_rsSE)&&(random()<=_rsSM)){var _rsIM='<scr'+'ipt language="JavaScript" type="text/javascript" src="'+_rsND+'cgi-bin/j?ci='+_rsCI+'&ss='+_rsSS+'&cc='+_rsCC+'&rd='+_rsRD+'&se='+_rsSE+'&sv='+_rsSV+'"><\/scr'+'ipt>';document.write(_rsIM);}
else{rsCi();}
if(_rsCL==1){_rsCLRegisterIt();}
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b==="find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" "," ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case"only":case"first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case"last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case"nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m==="="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j={},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);(function($){$.fn.jcarousel=function(o){return this.each(function(){new $jc(this,o);});};var defaults={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:'normal',easing:'swing',auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:'<div></div>',buttonPrevHTML:'<div></div>',buttonNextEvent:'click',buttonPrevEvent:'click',buttonNextCallback:null,buttonPrevCallback:null};$.jcarousel=function(e,o){this.options=$.extend({},defaults,o||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?'width':'height';this.lt=!this.options.vertical?'left':'top';var skin='',split=e.className.split(' ');for(var i=0;i<split.length;i++){if(split[i].indexOf('jcarousel-skin')!=-1){$(e).removeClass(split[i]);var skin=split[i];break;}}
if(e.nodeName=='UL'||e.nodeName=='OL'){this.list=$(e);this.container=this.list.parent();if(this.container.hasClass('jcarousel-clip')){if(!this.container.parent().hasClass('jcarousel-container'))
this.container=this.container.wrap('<div></div>');this.container=this.container.parent();}else if(!this.container.hasClass('jcarousel-container'))
this.container=this.list.wrap('<div></div>').parent();}else{this.container=$(e);this.list=$(e).find('>ul,>ol,div>ul,div>ol');}
if(skin!=''&&this.container.parent()[0].className.indexOf('jcarousel-skin')==-1)
this.container.wrap('<div class=" '+skin+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass('jcarousel-clip'))
this.clip=this.list.wrap('<div></div>').parent();this.buttonPrev=$('.jcarousel-prev',this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null)
this.buttonPrev=this.clip.before(this.options.buttonPrevHTML).prev();this.buttonPrev.addClass(this.className('jcarousel-prev'));this.buttonNext=$('.jcarousel-next',this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null)
this.buttonNext=this.clip.before(this.options.buttonNextHTML).prev();this.buttonNext.addClass(this.className('jcarousel-next'));this.clip.addClass(this.className('jcarousel-clip'));this.list.addClass(this.className('jcarousel-list'));this.container.addClass(this.className('jcarousel-container'));var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var li=this.list.children('li');var self=this;if(li.size()>0){var wh=0,i=this.options.offset;li.each(function(){self.format(this,i++);wh+=self.dimension(this,di);});this.list.css(this.wh,wh+'px');if(!o||o.size===undefined)
this.options.size=li.size();}
this.container.css('display','block');this.buttonNext.css('display','block');this.buttonPrev.css('display','block');this.funcNext=function(){self.next();};this.funcPrev=function(){self.prev();};this.funcResize=function(){self.reload();};if(this.options.initCallback!=null)
this.options.initCallback(this,'init');if($.browser.safari){this.buttons(false,false);$(window).bind('load',function(){self.setup();});}else
this.setup();};var $jc=$.jcarousel;$jc.fn=$jc.prototype={jcarousel:'0.2.3'};$jc.fn.extend=$jc.extend=$.extend;$jc.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked)
return;this.list.css(this.lt,this.pos(this.options.offset)+'px');var p=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(p,false);$(window).unbind('resize',this.funcResize).bind('resize',this.funcResize);},reset:function(){this.list.empty();this.list.css(this.lt,'0px');this.list.css(this.wh,'10px');if(this.options.initCallback!=null)
this.options.initCallback(this,'reset');this.setup();},reload:function(){if(this.tail!=null&&this.inTail)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null)
this.options.reloadCallback(this);if(this.options.visible!=null){var self=this;var di=Math.ceil(this.clipping()/this.options.visible),wh=0,lt=0;$('li',this.list).each(function(i){wh+=self.dimension(this,di);if(i+1<self.first)
lt=wh;});this.list.css(this.wh,wh+'px');this.list.css(this.lt,-lt+'px');}
this.scroll(this.first,false);},lock:function(){this.locked=true;this.buttons();},unlock:function(){this.locked=false;this.buttons();},size:function(s){if(s!=undefined){this.options.size=s;if(!this.locked)
this.buttons();}
return this.options.size;},has:function(i,i2){if(i2==undefined||!i2)
i2=i;if(this.options.size!==null&&i2>this.options.size)
i2=this.options.size;for(var j=i;j<=i2;j++){var e=this.get(j);if(!e.length||e.hasClass('jcarousel-item-placeholder'))
return false;}
return true;},get:function(i){return $('.jcarousel-item-'+i,this.list);},add:function(i,s){var e=this.get(i),old=0,add=0;if(e.length==0){var c,e=this.create(i),j=$jc.intval(i);while(c=this.get(--j)){if(j<=0||c.length){j<=0?this.list.prepend(e):c.after(e);break;}}}else
old=this.dimension(e);e.removeClass(this.className('jcarousel-item-placeholder'));typeof s=='string'?e.html(s):e.empty().append(s);var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var wh=this.dimension(e,di)-old;if(i>0&&i<this.first)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-wh+'px');this.list.css(this.wh,$jc.intval(this.list.css(this.wh))+wh+'px');return e;},remove:function(i){var e=this.get(i);if(!e.length||(i>=this.first&&i<=this.last))
return;var d=this.dimension(e);if(i<this.first)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+d+'px');e.remove();this.list.css(this.wh,$jc.intval(this.list.css(this.wh))-d+'px');},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail)
this.scrollTail(false);else
this.scroll(((this.options.wrap=='both'||this.options.wrap=='last')&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll);},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail)
this.scrollTail(true);else
this.scroll(((this.options.wrap=='both'||this.options.wrap=='first')&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll);},scrollTail:function(b){if(this.locked||this.animating||!this.tail)
return;var pos=$jc.intval(this.list.css(this.lt));!b?pos-=this.tail:pos+=this.tail;this.inTail=!b;this.prevFirst=this.first;this.prevLast=this.last;this.animate(pos);},scroll:function(i,a){if(this.locked||this.animating)
return;this.animate(this.pos(i),a);},pos:function(i){if(this.locked||this.animating)
return;if(this.options.wrap!='circular')
i=i<1?1:(this.options.size&&i>this.options.size?this.options.size:i);var back=this.first>i;var pos=$jc.intval(this.list.css(this.lt));var f=this.options.wrap!='circular'&&this.first<=1?1:this.first;var c=back?this.get(f):this.get(this.last);var j=back?f:f-1;var e=null,l=0,p=false,d=0;while(back?--j>=i:++j<i){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c[back?'before':'after'](e);}
c=e;d=this.dimension(e);if(p)
l+=d;if(this.first!=null&&(this.options.wrap=='circular'||(j>=1&&(this.options.size==null||j<=this.options.size))))
pos=back?pos+d:pos-d;}
var clipping=this.clipping();var cache=[];var visible=0,j=i,v=0;var c=this.get(i-1);while(++visible){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c.length==0?this.list.prepend(e):c[back?'before':'after'](e);}
c=e;var d=this.dimension(e);if(d==0){alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');return 0;}
if(this.options.wrap!='circular'&&this.options.size!==null&&j>this.options.size)
cache.push(e);else if(p)
l+=d;v+=d;if(v>=clipping)
break;j++;}
for(var x=0;x<cache.length;x++)
cache[x].remove();if(l>0){this.list.css(this.wh,this.dimension(this.list)+l+'px');if(back){pos-=l;this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-l+'px');}}
var last=i+visible-1;if(this.options.wrap!='circular'&&this.options.size&&last>this.options.size)
last=this.options.size;if(j>last){visible=0,j=last,v=0;while(++visible){var e=this.get(j--);if(!e.length)
break;v+=this.dimension(e);if(v>=clipping)
break;}}
var first=last-visible+1;if(this.options.wrap!='circular'&&first<1)
first=1;if(this.inTail&&back){pos+=this.tail;this.inTail=false;}
this.tail=null;if(this.options.wrap!='circular'&&last==this.options.size&&(last-visible+1)>=1){var m=$jc.margin(this.get(last),!this.options.vertical?'marginRight':'marginBottom');if((v-m)>clipping)
this.tail=v-clipping-m;}
while(i-->first)
pos+=this.dimension(this.get(i));this.prevFirst=this.first;this.prevLast=this.last;this.first=first;this.last=last;return pos;},animate:function(p,a){if(this.locked||this.animating)
return;this.animating=true;var self=this;var scrolled=function(){self.animating=false;if(p==0)
self.list.css(self.lt,0);if(self.options.wrap=='both'||self.options.wrap=='last'||self.options.size==null||self.last<self.options.size)
self.startAuto();self.buttons();self.notify('onAfterAnimation');};this.notify('onBeforeAnimation');if(!this.options.animation||a==false){this.list.css(this.lt,p+'px');scrolled();}else{var o=!this.options.vertical?{'left':p}:{'top':p};this.list.animate(o,this.options.animation,this.options.easing,scrolled);}},startAuto:function(s){if(s!=undefined)
this.options.auto=s;if(this.options.auto==0)
return this.stopAuto();if(this.timer!=null)
return;var self=this;this.timer=setTimeout(function(){self.next();},this.options.auto*1000);},stopAuto:function(){if(this.timer==null)
return;clearTimeout(this.timer);this.timer=null;},buttons:function(n,p){if(n==undefined||n==null){var n=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='first')||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=='first')&&this.options.size!=null&&this.last>=this.options.size)
n=this.tail!=null&&!this.inTail;}
if(p==undefined||p==null){var p=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='last')||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=='last')&&this.options.size!=null&&this.first==1)
p=this.tail!=null&&this.inTail;}
var self=this;this.buttonNext[n?'bind':'unbind'](this.options.buttonNextEvent,this.funcNext)[n?'removeClass':'addClass'](this.className('jcarousel-next-disabled')).attr('disabled',n?false:true);this.buttonPrev[p?'bind':'unbind'](this.options.buttonPrevEvent,this.funcPrev)[p?'removeClass':'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled',p?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=n)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){self.options.buttonNextCallback(self,this,n);});this.buttonNext[0].jcarouselstate=n;}
if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=p)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){self.options.buttonPrevCallback(self,this,p);});this.buttonPrev[0].jcarouselstate=p;}},notify:function(evt){var state=this.prevFirst==null?'init':(this.prevFirst<this.first?'next':'prev');this.callback('itemLoadCallback',evt,state);if(this.prevFirst!==this.first){this.callback('itemFirstInCallback',evt,state,this.first);this.callback('itemFirstOutCallback',evt,state,this.prevFirst);}
if(this.prevLast!==this.last){this.callback('itemLastInCallback',evt,state,this.last);this.callback('itemLastOutCallback',evt,state,this.prevLast);}
this.callback('itemVisibleInCallback',evt,state,this.first,this.last,this.prevFirst,this.prevLast);this.callback('itemVisibleOutCallback',evt,state,this.prevFirst,this.prevLast,this.first,this.last);},callback:function(cb,evt,state,i1,i2,i3,i4){if(this.options[cb]==undefined||(typeof this.options[cb]!='object'&&evt!='onAfterAnimation'))
return;var callback=typeof this.options[cb]=='object'?this.options[cb][evt]:this.options[cb];if(!$.isFunction(callback))
return;var self=this;if(i1===undefined)
callback(self,state,evt);else if(i2===undefined)
this.get(i1).each(function(){callback(self,this,i1,state,evt);});else{for(var i=i1;i<=i2;i++)
if(i!==null&&!(i>=i3&&i<=i4))
this.get(i).each(function(){callback(self,this,i,state,evt);});}},create:function(i){return this.format('<li></li>',i);},format:function(e,i){var $e=$(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-'+i));$e.attr('jcarouselindex',i);return $e;},className:function(c){return c+' '+c+(!this.options.vertical?'-horizontal':'-vertical');},dimension:function(e,d){var el=e.jquery!=undefined?e[0]:e;var old=!this.options.vertical?el.offsetWidth+$jc.margin(el,'marginLeft')+$jc.margin(el,'marginRight'):el.offsetHeight+$jc.margin(el,'marginTop')+$jc.margin(el,'marginBottom');if(d==undefined||old==d)
return old;var w=!this.options.vertical?d-$jc.margin(el,'marginLeft')-$jc.margin(el,'marginRight'):d-$jc.margin(el,'marginTop')-$jc.margin(el,'marginBottom');$(el).css(this.wh,w+'px');return this.dimension(el);},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-$jc.intval(this.clip.css('borderLeftWidth'))-$jc.intval(this.clip.css('borderRightWidth')):this.clip[0].offsetHeight-$jc.intval(this.clip.css('borderTopWidth'))-$jc.intval(this.clip.css('borderBottomWidth'));},index:function(i,s){if(s==undefined)
s=this.options.size;return Math.round((((i-1)/s)-Math.floor((i-1)/s))*s)+1;}});$jc.extend({defaults:function(d){return $.extend(defaults,d||{});},margin:function(e,p){if(!e)
return 0;var el=e.jquery!=undefined?e[0]:e;if(p=='marginRight'&&$.browser.safari){var old={'display':'block','float':'none','width':'auto'},oWidth,oWidth2;$.swap(el,old,function(){oWidth=el.offsetWidth;});old['marginRight']=0;$.swap(el,old,function(){oWidth2=el.offsetWidth;});return oWidth2-oWidth;}
return $jc.intval($.css(el,p));},intval:function(v){v=parseInt(v);return isNaN(v)?0:v;}});})(jQuery);(function($){$.timeago=function(timestamp){if(timestamp instanceof Date)return inWords(timestamp);else if(typeof timestamp=="string")return inWords($.timeago.parse(timestamp));else return inWords($.timeago.datetime(timestamp));};var $t=$.timeago;$.extend($.timeago,{settings:{refreshMillis:60000,allowFuture:true,strings:{prefixAgo:"hace",prefixFromNow:"dentro de",suffixAgo:"",suffixFromNow:"",seconds:"menos de un minuto",minute:"un minuto",minutes:"unos %d minutos",hour:"una hora",hours:"%d horas",day:"un día",days:"%d días",week:"una semana",weeks:"%d semanas",month:"un mes",months:"%d meses",year:"un año",years:"%d años",numbers:[]}},inWords:function(distanceMillis){var $l=this.settings.strings;var prefix=$l.prefixAgo;var suffix=$l.suffixAgo;if(this.settings.allowFuture){if(distanceMillis<0){prefix=$l.prefixFromNow;suffix=$l.suffixFromNow;}
distanceMillis=Math.abs(distanceMillis);}
var seconds=distanceMillis/1000;var minutes=seconds/60;var hours=minutes/60;var days=hours/24;var years=days/365;function substitute(stringOrFunction,number){var string=$.isFunction(stringOrFunction)?stringOrFunction(number):stringOrFunction;var value=($l.numbers&&$l.numbers[number])||number;return string.replace(/%d/i,value);}
var words=seconds<45&&substitute($l.seconds,Math.round(seconds))||seconds<90&&substitute($l.minute,1)||minutes<45&&substitute($l.minutes,Math.round(minutes))||minutes<90&&substitute($l.hour,1)||hours<24&&substitute($l.hours,Math.round(hours))||hours<48&&substitute($l.day,1)||days<7&&substitute($l.days,Math.floor(days))||days<14&&substitute($l.week,1)||days<30&&substitute($l.weeks,Math.floor(days/7))||days<60&&substitute($l.month,1)||days<365&&substitute($l.months,Math.floor(days/30))||years<2&&substitute($l.year,1)||substitute($l.years,Math.floor(years));return $.trim([prefix,words,suffix].join(" "));},parse:function(iso8601){var s=$.trim(iso8601);s=s.replace(/-/,"/").replace(/-/,"/");s=s.replace(/T/," ").replace(/Z/," UTC");s=s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2");return new Date(s);},datetime:function(elem){var isTime=$(elem).get(0).tagName.toLowerCase()=="time";var iso8601=isTime?$(elem).attr("datetime"):$(elem).attr("title");return $t.parse(iso8601);}});$.fn.timeago=function(){var self=this;self.each(refresh);var $s=$t.settings;if($s.refreshMillis>0){setInterval(function(){self.each(refresh);},$s.refreshMillis);}
return self;};function refresh(){var data=prepareData(this);if(!isNaN(data.datetime)){$(this).text(inWords(data.datetime));}
return this;}
function prepareData(element){element=$(element);if(!element.data("timeago")){element.data("timeago",{datetime:$t.datetime(element)});var text=$.trim(element.text());if(text.length>0)element.attr("title",text);}
return element.data("timeago");}
function inWords(date){return $t.inWords(distance(date));}
function distance(date){return(new Date().getTime()-date.getTime());}
document.createElement("abbr");document.createElement("time");})(jQuery);(function(c){c.tools=c.tools||{version:{}};c.tools.version.tabs="1.0.1";c.tools.addTabEffect=function(d,e){b[d]=e};var b={"default":function(d){this.getPanes().hide().eq(d).show()},fade:function(d){this.getPanes().hide().eq(d).fadeIn(this.getConf().fadeInSpeed)},slide:function(d){this.getCurrentPane().slideUp("fast");this.getPanes().eq(d).slideDown()},horizontal:function(d){if(!c._hW){c._hW=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){c(this).hide()});this.getPanes().eq(d).animate({width:c._hW},function(){c(this).show()})}};function a(e,f,g){var d=this;var h;function i(j,k){c(d).bind(j,function(m,l){if(k&&k.call(this,l.index)===false&&l){l.proceed=false}});return d}c.each(g,function(j,k){if(c.isFunction(k)){i(j,k)}});c.extend(this,{click:function(k){if(k===h){return d}var m=d.getCurrentPane();var l=e.eq(k);if(typeof k=="string"){l=e.filter("[href="+k+"]");k=e.index(l)}if(!l.length){if(h>=0){return d}k=g.initialIndex;l=e.eq(k)}var j={index:k,proceed:true};c(d).triggerHandler("onBeforeClick",j);if(!j.proceed){return d}l.addClass(g.current);b[g.effect].call(d,k);c(d).triggerHandler("onClick",j);e.removeClass(g.current);l.addClass(g.current);h=k;return d},getConf:function(){return g},getTabs:function(){return e},getPanes:function(){return f},getCurrentPane:function(){return f.eq(h)},getCurrentTab:function(){return e.eq(h)},getIndex:function(){return h},next:function(){return d.click(h+1)},prev:function(){return d.click(h-1)},onBeforeClick:function(j){return i("onBeforeClick",j)},onClick:function(j){return i("onClick",j)}});e.each(function(j){c(this).bind(g.event,function(k){d.click(j);if(!g.history){return k.preventDefault()}})});if(g.history){e.history(function(j,k){d.click(k||0)})}if(location.hash){d.click(location.hash)}else{d.click(g.initialIndex)}f.find("a[href^=#]").click(function(){d.click(c(this).attr("href"))})}c.fn.tabs=function(g,d){var e=this.eq(typeof conf=="number"?conf:0).data("tabs");if(e){return e}var f={tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",history:false,initialIndex:0,event:"click",api:false};if(c.isFunction(d)){d={onBeforeClick:d}}c.extend(f,d);this.each(function(){var h=c(this).find(f.tabs);if(!h.length){h=c(this).children()}var i=g.jquery?g:c(g);e=new a(h,i,f);c(this).data("tabs",e)});return f.api?e:this}})(jQuery);(function(b){var c,a;b.prototype.history=function(e){var d=this;if(b.browser.msie){if(!a){a=b("<iframe />").hide().get(0);b("body").append(a);setInterval(function(){var f=a.contentWindow.document;var g=f.location.hash;if(c!==g){b.event.trigger("hash",g);c=g}},100)}d.bind("click.hash",function(g){var f=a.contentWindow.document;f.open().close();f.location.hash=b(this).attr("href")});d.eq(0).triggerHandler("click.hash")}else{setInterval(function(){var f=location.hash;if(d.filter("[href*="+f+"]").length&&f!==c){c=f;b.event.trigger("hash",f)}},100)}b(window).bind("hash",e);return this}})(jQuery);var WSL_Tools={removeListener:function(obj,msg)
{obj.unbind('click');obj.click(function()
{if(msg!=''){alert(msg);}
return false;});},validateEmail:function(email)
{success=false;pattern='/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/';validEmail=new String(email.match(pattern));if(validEmail.length==email.length&&validEmail.length>1){success=true;}
return success;}};var WSL_Controller_Carousel={initProductPage:function()
{WSL_Controller_Carousel.tagImagesCount();WSL_Controller_Carousel.flickrImagesCount();WSL_Controller_Carousel.blogVideosCount();WSL_Controller_Carousel.youtubeVideosCount();$('#carousel1').jcarousel({itemLoadCallback:WSL_Controller_Carousel.tagCarousel,size:this.tagImagesCount});$('#carousel2').jcarousel({itemLoadCallback:WSL_Controller_Carousel.flickrCarousel,size:this.flickrImagesCount});$('#carousel3').jcarousel({itemLoadCallback:WSL_Controller_Carousel.blogCarousel,size:this.blogVideosCount});$('#carousel4').jcarousel({itemLoadCallback:WSL_Controller_Carousel.youtubeCarousel,size:this.youtubeVideosCount});$('#carousel7').jcarousel({itemLoadCallback:WSL_Controller_Carousel.galleryScrollToIndex,scroll:5});$('#carousel8').jcarousel({itemLoadCallback:WSL_Controller_Carousel.bigGalleryScrollToIndex,scroll:8});WSL_Controller_Carousel.initTagGallery();WSL_Controller_Carousel.initFlickrGallery();WSL_Controller_Carousel.initBlogGallery();WSL_Controller_Carousel.initYoutubeGallery();WSL_Controller_Carousel.initGalleryImages();$("#gallery ul.tabs").tabs("#gallery div.panes > div.gallery");flickrCarouselLoaded=false;videoCarouselLoaded=false;tagCarouselLoaded=false;youtubeCarouselLoaded=false;},tagImagesCount:function()
{if($(".tagImagesCount").attr("id")>$("#tag-gallery > li").size()){this.tagImagesCount=10;}else{this.tagImagesCount=$("#tag-gallery > li").size();}},flickrImagesCount:function()
{if($(".flickrImagesCount").attr("id")>$("#flickr-gallery > li").size()){this.flickrImagesCount=10;}else{this.flickrImagesCount=$("#flickr-gallery > li").size();}},blogVideosCount:function()
{if($(".tagVideosCount").attr("id")>$("#blog-videos > li").size()){this.blogVideosCount=10;}else{this.blogVideosCount=$("#blog-videos > li").size();}},youtubeVideosCount:function()
{if($(".youtubeVideosCount").attr("id")>$("#youtube-videos > li").size()){this.youtubeVideosCount=10;}else{this.youtubeVideosCount=$("#youtube-videos > li").size();}},galleryScrollToIndex:function(carousel,state)
{if(state=='init')
{index=parseInt($('#images-gallery .act').attr('jcarouselindex'));loop=index>5?Math.ceil(index/5):0;if(loop>0){for(i=0;i<loop;i++){carousel.next();}}
WSL_Controller_Carousel.initGalleryImages();}},bigGalleryScrollToIndex:function(carousel,state)
{if(state=='init')
{index=parseInt($('#tag-gallery .act').attr('jcarouselindex'));loop=index>8?Math.ceil(index/8):0;if(loop>0){for(i=0;i<loop;i++){carousel.next();}}
WSL_Controller_Carousel.initGalleryImages();}},tagCarousel:function(carousel,state)
{if(state=='next'&&!tagCarouselLoaded)
{tagid=$(".productid").attr("id");url='/json/tagimagemore/'+tagid;$.getJSON(url,function(data)
{WSL_Controller_Carousel.carouselItems(carousel,carousel.first,carousel.last,data,"tag");$(function()
{WSL_Controller_Carousel.initTagGallery();});});tagCarouselLoaded=true;}},flickrCarousel:function(carousel,state)
{if(state=='next'&&!flickrCarouselLoaded)
{tagid=$(".productid").attr("id");url='/json/flickrmore/'+tagid;$.getJSON(url,function(data)
{WSL_Controller_Carousel.carouselItems(carousel,carousel.first,carousel.last,data,"flickr");$(function()
{WSL_Controller_Carousel.initFlickrGallery();});});flickrCarouselLoaded=true;}},blogCarousel:function(carousel,state)
{if(state=='next'&&!videoCarouselLoaded)
{tagid=$(".productid").attr("id");url='/json/morepostvideos/'+tagid;$.getJSON(url,function(data)
{WSL_Controller_Carousel.carouselItems(carousel,carousel.first,carousel.last,data,"blog");$(function()
{WSL_Controller_Carousel.initBlogGallery();});});videoCarouselLoaded=true;}},youtubeCarousel:function(carousel,state)
{if(state=='next'&&!youtubeCarouselLoaded)
{tagid=$(".productid").attr("id");url='/json/moreyoutubevideos/'+tagid;$.getJSON(url,function(data)
{WSL_Controller_Carousel.carouselItems(carousel,carousel.first,carousel.last,data,"youtube");$(function()
{WSL_Controller_Carousel.initYoutubeGallery();});});youtubeCarouselLoaded=true;}},initTagGallery:function()
{$('#tag-gallery .thumbnail').parent().click(function()
{var taghref=$(this).children().attr('href');var tagimg=$(this).children().attr('rel');var tagtitle=$(this).children().attr('title');$('#tagtitle a').attr('href',taghref);$('#tagtitle a').attr('title',tagtitle);$('#tagtitle q').text(tagtitle);$("#tag-actual").empty();$('#tag-actual').append('<a href="'+taghref+'" title="'+tagtitle+'"><img src="'+tagimg+'" /></a>');$('#tag-gallery .thumbnail').parent().removeClass('act');$(this).addClass('act');return false;});},initFlickrGallery:function()
{$('#flickr-gallery .thumbnail').parent().click(function()
{var flkhref=$(this).children().attr('href');var flkimg=$(this).children().attr('rel');var flkowner=$(this).children().attr('alt');var flktitle=$(this).children().attr('title');$('#flickrtitle a').attr('href',flkhref);$('#flickrtitle a').attr('title',flktitle);$('#flickrtitle q').text(flkowner);$("#flickr-actual").empty();$('#flickr-actual').append('<a href="'+flkhref+'" title="'+flktitle+'"><img src="'+flkimg+'" /></a>');$('#flickr-gallery .thumbnail').parent().removeClass('act');$(this).addClass('act');return false;});},initBlogGallery:function()
{$('#blog-videos .thumbnail').click(function()
{var pvhref=$(this).attr("href");var pvtitle=$(this).attr('title');$('#postvideotitle a').attr('href',pvhref);$('#postvideotitle q').text(pvtitle);$("#blogvideos-actual").empty();$("#blogvideos-actual").append('<object type="application/x-shockwave-flash" width="480" height="385" data="'+pvhref+'"><param name="movie" value="'+pvhref+'" /></object>');$('#blog-videos .thumbnail').parent().removeClass('act');$(this).parent().addClass('act');return false;});},initYoutubeGallery:function()
{$('#youtube-videos .thumbnail').click(function()
{var ythref=$(this).attr('href');var yttitle=$(this).attr('title');$('#youtubevideotitle a').attr('href',ythref);$('#youtubevideotitle a').text(yttitle);$("#youtubevideos-actual").empty();$("#youtubevideos-actual").append('<object type="application/x-shockwave-flash" width="480" height="385" data="'+ythref+'"><param name="movie" value="'+ythref+'" /></object>');$('#youtube-videos .thumbnail').parent().removeClass('act');$(this).parent().addClass('act');return false;});},initGalleryImages:function()
{$('#images-gallery .thumbnail').parent().click(function()
{$('#gallery-actual a').attr('href',$(this).children().attr('href'));$('#gallery-actual a img').attr('src',$(this).children().attr('rel'));$('#gallerytitle a').attr('href',$(this).children().attr('href'));$('#images-gallery .thumbnail').parent().removeClass('act');$(this).addClass('act');return false;});$('#bigimages-gallery .thumbnail').parent().click(function()
{$('#gallery-actual img').attr('src',$(this).children().attr('rel'));$('#bigimages-gallery .thumbnail').parent().removeClass('act');$(this).addClass('act');return false;});},carouselItems:function(carousel,first,last,data,tab)
{if(data.length>0){if(tab=="tag")
{for(i=0;i<data.length;i++){var arel=data[i].original_url;var aref=data[i].postUrl;;var atitle=data[i].post_title;var imgsrc=data[i].thumb_url;carousel.add(i+6,WSL_Controller_Carousel.carousel_ImgHTML(arel,aref,atitle,imgsrc));}}
else if(tab=="flickr")
{for(i=0;i<data.length;i++){var arel="http://farm"+data[i].farm_id+".static.flickr.com/"+data[i].server_id+"/"+data[i].flickr_id+"_"+data[i].secret_id+".jpg";var aref="http://www.flickr.com/photos/"+data[i].owner_id+"/"+data[i].flickr_id;var atitle=data[i].title;var imgsrc="http://farm"+data[i].farm_id+".static.flickr.com/"+data[i].server_id+"/"+data[i].flickr_id+"_"+data[i].secret_id+"_s.jpg";carousel.add(i+6,WSL_Controller_Carousel.carousel_ImgHTML(arel,aref,atitle,imgsrc));}}
else if(tab=="blog")
{for(i=0;i<data.length;i++){var aid=data[i].youtubeid;var atitle=data[i].post_title;var imgsrc="http://i.ytimg.com/vi/"+data[i].youtubeid+"/default.jpg";carousel.add(i+6,WSL_Controller_Carousel.carousel_VideoHTML(aid,atitle,imgsrc));}}
else if(tab=="youtube")
{for(i=0;i<data.length;i++){var aid=data[i].youtube_id;var atitle=data[i].title;var imgsrc="http://i.ytimg.com/vi/"+data[i].youtube_id+"/default.jpg";carousel.add(i+6,WSL_Controller_Carousel.carousel_VideoHTML(aid,atitle,imgsrc));}}
carousel.size(data.length+5);}},carousel_ImgHTML:function(arel,aref,atitle,imgsrc)
{return'<a class="thumbnail" rel="'+arel+'" href="'+aref+'" title="'+atitle+'"><img src="'+imgsrc+'" alt="'+atitle+'" /></a>';},carousel_VideoHTML:function(aid,atitle,imgsrc)
{return'<a class="thumbnail" title="'+atitle+'" href="http://www.youtube.com/v/'+aid+'&amp;hl=es&amp;fs=1&amp;color1=0x234900&amp;color2=0x4e9e00"><img src="'+imgsrc+'" alt="'+atitle+'" width="75" height="75" /><span>"'+atitle+'"</span></a>';},galleryCarouselItems:function(carousel,first,last,data)
{if(data.length>0)
{var path=$('#images-gallery .thumbnail').attr('name');var j=5;for(i=0;i<data.length;i++)
{j++;var arel=path+"/galleries/"+data[i].gallery+"/"+data[i].filename;var aref="/galeria/big/"+data[i].gallery+"/"+j;var atitle=data[i].gallery;var imgsrc=path+"/resize/75/galleries/"+data[i].gallery+"/"+data[i].thumbnail;carousel.add(i+6,WSL_Controller_Carousel.carousel_ImgHTML(arel,aref,atitle,imgsrc));}
carousel.size(data.length+5);}}};var WSL_Controller_Product={init:function()
{if($('#lasttagsmore').is(':hidden')){$("#lastpostlinks").show();}
if($("#lastpost_links ul li").html()!=null){$("#lastpost_links").show();}
if($('#deliciousmore').is(':hidden')){$("#deliciouslinks").show();}
if($("#delicious_links ul li").html()!=null){$("#delicious_links").show();}
if($('#bitacorasmore').is(':hidden')){$("#bitacoraslinks").show();}
if($("#bitacoras_links ul li").html()!=null){$("#bitacoras_links").show();}
if($("#related-products ul li").html()!=null){$("#related-products").show();}
$(":input[id='solo-expertos']").click(function(){WSL_Controller_Product.iwishihavelist(this);});$("#product-comment #comentario").focus(function(){if(!commentFormFocus){$(this).val('');commentFormFocus=true;}});WSL_Controller_Product.initProductJson();WSL_Controller_Product.initProductLess();WSL_Controller_Product.initProductVoteClass();WSL_Controller_Product.initProductVoteSelect();WSL_Controller_Product.initProductVote();WSL_Controller_Product.initProductWishHave();WSL_Controller_Product.initProductComment();WSL_Controller_Product.initProductCommentActions();WSL_Controller_Product.initiwishihavepagination();WSL_Controller_Product.initstreamwallpagination();showniwishihavemore=false;currentiwishihavepage=0;iwishcount=0;ihavecount=0;iwishihavelimit=0;iwishihaveplimit=0;listcount=0;iwishihavepagecount=0;shownmore=false;$wishaviso='';$haveaviso='';commentFormFocus=false;},ProductJson:function(jsonmod,tagid,postid)
{if(jsonmod=="productdesc")
{$.getJSON('/json/productdesc/'+tagid+'/'+postid,function(data)
{return WSL_View_Product.ProductDescJson(data);});}
else if(jsonmod=="latestposts")
{$.get('/json/recentposts/'+tagid,function(data)
{return WSL_View_Product.LatestPostsJson(data);});}
else if(jsonmod=="delicious")
{$.get('/json/moredelicious/'+tagid,function(data)
{return WSL_View_Product.DeliciousJson(data);});}
else if(jsonmod=="bitacoras")
{$.get('/json/bitamore/'+tagid,function(data)
{return WSL_View_Product.BitacorasJson(data);});}
else if(jsonmod=="relatedproducts")
{$.get('/json/morerelatedproducts/'+postid+'/'+tagid,function(data)
{return WSL_View_Product.RelatedProductsJson(data);});}},ProductVoteJson:function(url,previousvalue)
{$.getJSON(url,{},function(data)
{if(data.res==1)
{return WSL_View_Product.ProductVoteJsonMsg(data);}
else if(data.res==0)
{return WSL_View_Product.ProductVoteJsonEvent(data);}
else
{return $("#voteselected").val(previousvalue);}});},ProductVoteEventJson:function(url)
{$.get(url,{},function(data)
{shownmore=false;$("#streamwall").html(data);WSL_Controller_Product.enableListeners();WSL.getTimeAgo();});},ProductWishHave:function(url)
{var url=url;$.getJSON(url,{},function(data)
{$("#iwishihavemessage").hide();$("#iwishihavesubscribe").hide();if(data.res==1)
{$("#iwishihavemessage").attr('class','aviso');$("#iwishihavemessage").html(data.messsages.login);$("#iwishihavemessage").show();}
else if(data.res==0)
{if(data.type=='unclick'){$("li.have-disabled,li.have").attr('class','have');$("li.wish-disabled,li.wish").attr('class','wish');}else{if(data.preference==0){$("li.have-disabled,li.have").attr('class','have-disabled');$("li.wish-disabled,li.wish").attr('class','wish');WSL_Controller_GoogleAnalytics.registerAction('modulo-valorar-productos','me-gusta',url);}else{$("li.have-disabled,li.have").attr('class','have');$("li.wish-disabled,li.wish").attr('class','wish-disabled');WSL_Controller_GoogleAnalytics.registerAction('modulo-valorar-productos','lo-tengo',url);}}
if(data.type=='click'){var message=data.messsages.click;$("#iwishihavemessage").attr('class','exito');}
if(data.type=='click'&&data.subscribed=='0'){var subscribemessage='<input type="checkbox" name="subscribe" class="iwishihavesub" onclick="WSL_Controller_Product.iwishihavesubs(this)" value="'+parts[1]+'" name="subscribe" />'+data.messsages.subscribe;$("#iwishihavesubscribe").html(subscribemessage);$("#iwishihavesubscribe").attr('class','mform');$("#iwishihavesubscribe").show();}
if(data.type=='unclick'){var message=data.messsages.unclick;$("#iwishihavemessage").attr('class','aviso');}
if(data.type=='unclick'&&data.subscribed=='1'){var subscribemessage=data.messsages.unsubscribe;$("#iwishihavesubscribe").html(subscribemessage);$("#iwishihavesubscribe").attr('class','mform');$("#iwishihavesubscribe").show();}
$("#iwishihavemessage").html(message);$("#iwishihavemessage").show();$(":input[id='solo-expertos']").attr('checked',false);WSL_Controller_Product.iwishihavelist($(":input[id='solo-expertos']"));var streamurl='/json/productstream/'+parts[1];$.get(streamurl,{},function(data)
{shownmore=false;$("#streamwall").html(data);WSL_Controller_Product.enableListeners();WSL.getTimeAgo();});}});},initProductJson:function()
{$('a.moredesc').click(function()
{WSL_Controller_Product.ProductJson("productdesc",$(".productid").attr("id"),$(".postid").attr("id"));return false;});$('#lasttagsmore').click(function()
{WSL_Controller_Product.ProductJson("latestposts",$(".productid").attr("id"),$(".postid").attr("id"));return false;});$('#deliciousmore').click(function()
{WSL_Controller_Product.ProductJson("delicious",$(".productid").attr("id"),$(".postid").attr("id"));return false;});$('#bitamore').click(function()
{WSL_Controller_Product.ProductJson("bitacoras",$(".productid").attr("id"),$(".postid").attr("id"));return false;});$('#productsmore').click(function()
{var tags=$(".productid").attr("id");for(i=0;i<$("#related-products ul > li a").size();i++){tags=tags+","+$("#related-products ul li a")[i]["id"];}
WSL_Controller_Product.ProductJson("relatedproducts",tags,$(".categoryid").attr("id"));return false;});},initProductLess:function()
{$('a.proddescfirst').click(function()
{$(".proddescfirst").hide(0);$(".extraproddesc").html('');$(".moredesc").show(0);return false;});$('#lasttagsless').click(function()
{$(".extralastposts").hide(0);$("#lasttagsmore").show();$("#lasttagsless").hide();$.scrollTo('#lastpost_links',300,{axis:'y'});return false;});$('#deliciousless').click(function()
{$(".extradelicious").hide(0);$("#deliciousmore").show();$("#deliciousless").hide();$.scrollTo('#delicious_links',300,{axis:'y'});return false;});$('#bitaless').click(function()
{$("#bitaless").hide(0);$(".extrabitalinks").html('');$("#bitacorasmore").show(0);$("#bitamore").show(0);$.scrollTo('#bitacoras_links',300,{axis:'y'});return false;});$('#productsless').click(function()
{$("#productsless").hide(0);$(".morerelatedproducts").html('');$("#relatedproductsmore").show(0);$("#productsmore").show(0);$.scrollTo('#related-products',300,{axis:'y'});return false;});},initProductVoteClass:function()
{$(".product-votes li").hover(function()
{$(this).nextAll().attr('class','off');$(this).prevAll().attr('class','over');$(this).attr('class','over');});},initProductVoteSelect:function()
{$(".product-votes ul").hover(function(){},function()
{parts=$(".product-votes a").attr("id").split("_");$voteselected=$("#voteselected").val();if($voteselected>0)
{selected='#'+parts[0]+'_'+parts[1]+'_'+$voteselected;$(selected).parent().nextAll().attr('class','off');$(selected).parent().prevAll().attr('class','');$(selected).parent().attr('class','');}
else
{$(".product-votes li").attr('class','off');}});},initProductVote:function()
{$(".product-votes li a").click(function()
{currentObject=$(this);parts=$(this).attr("id").split("_");url='/json/productvote/'+parts[1]+'/'+parts[2];$("#voteselected").val(parts[2]);WSL_Controller_Product.ProductVoteJson(url,$("#voteselected").val());return false;});},initProductWishHave:function()
{$("li.have-disabled>a,li.have>a,li.wish-disabled>a,li.wish>a").click(function()
{parts=$(this).attr("id").split("_");url='/json/iwishihave/'+parts[1]+'/'+parts[2];WSL_Controller_Product.ProductWishHave(url);return false;});},initProductWishHaveList:function()
{$(":input[id='solo-expertos']").click(function(){WSL_Controller_Product.iwishihavelist(this);});},initiwishihavepagination:function()
{$("#users-activity").prevAll('a.button.prev').click(function(){return WSL_Controller_Product.iwishihaveprev();});$("#users-activity").prevAll('p.nav').children('a.button.next').click(function(){return WSL_Controller_Product.showNextiwishihavelist();});$("#users-activity").prevAll('a.button.next').click(function(){return WSL_Controller_Product.showNextiwishihavelist();});},initstreamwallpagination:function()
{$("#users-activity a.button.prev ").click(function(){return WSL_Controller_Product.showPreviousStream(this);});$("#users-activity a.button.next").click(function(){return WSL_Controller_Product.showNextStream(this);});},initProductCommentActions:function()
{$('.comment-vote-up').click(WSL_Controller_Post.commentVoteUp);$('.comment-vote-down').click(WSL_Controller_Post.commentVoteDown);$('.abuse').click(WSL_Controller_Post.commentAbuse);},initProductComment:function()
{$("#product-comment .button").click(function()
{commentContent=$("#product-comment #comentario").val();commentContent=commentContent.replace(/^\s+|\s+$/g,'');commentContent=commentContent.replace(/Escribe algo sobre (.)+.../g,'');parts=$(this).attr("id").split("_");url='/json/productcomment';$.post(url,{product_id:parts[1],comment:commentContent},function(data){if(data==1){$("#productcommetnlogin").show();}else if(data==7){alert('introducir comentario');}else{shownmore=false;$("#streamwall").html(data);$("#product-comment #comentario").val('');WSL_Controller_Product.enableListeners();WSL.getTimeAgo();}});return false;});},iwishihavelist:function(link){tagid=$(".productid").attr("id");if($(link).attr('checked')){url='/json/iwishihavelist/'+tagid+'/1';}
else{url='/json/iwishihavelist/'+tagid+'/0';}
$.get(url,{},function(data){if(data==1){$("#iwishihavelistlogin").show();}else{showniwishihavemore=false;currentiwishihavepage=0;$("#users-activity").prevAll().remove();$("#users-activity").before(data);}
WSL_Controller_Product.initProductWishHaveList();WSL_Controller_Product.initiwishihavepagination();$("#iwishihavelist_vermas").hide();$("#iwishihavelist_vermenos").hide();$("#iwishihavelist_volver").hide();WSL.initFacebook();});},iwishihavesubs:function(sub){link=sub;prouduct_id=sub.value;url='/json/iwishihave/subscribe/'+prouduct_id;$.getJSON(url,{},function(data){$("#iwishihavemessage").hide();$("#iwishihavesubscribe").hide();});},showNextiwishihavelist:function(){if(showniwishihavemore==true){WSL_Controller_Product.iwishihavenext();}else{tagid=$(".productid").attr("id");if($(":input[id='solo-expertos']").attr('checked')){url='/json/iwishihavemore/'+tagid+'/1';}
else{url='/json/iwishihavemore/'+tagid+'/0';}
$.get(url,{},function(data){showniwishihavemore=true;$("#users-activity").prevAll().remove();$("#users-activity").before(data);WSL_Controller_Product.iwishihagepaginit();WSL_Controller_Product.iwishihavenext();WSL_Controller_Product.initiwishihavepagination();WSL_Controller_Product.initProductWishHaveList();WSL.initFacebook();});}
return false;},iwishihagepaginit:function(){iwishcount=eval($("#iwishcount").val());ihavecount=eval($("#ihavecount").val());iwishihavelimit=eval($("#iwishihavelimit").val());iwishihaveplimit=eval($("#iwishihaveplimit").val());listcount=iwishcount>ihavecount?iwishcount:ihavecount;iwishihavepagecount=parseInt((listcount)/(iwishihaveplimit));iwishihavepagecount+=(iwishihavepagecount*iwishihaveplimit<listcount)?1:0;iwishihavepagecount+=1;},iwishihavenext:function(){currentiwishihavepage++;WSL_Controller_Product.iwishihavepaginate();},iwishihaveprev:function(){currentiwishihavepage--;WSL_Controller_Product.iwishihavepaginate();return false;},iwishihavepaginate:function(){donotshowihave=false;donotshowiwish=false;if($wishaviso==''){$wishaviso=$("#wish .aviso").text();}
if($haveaviso==''){$haveaviso=$("#have .aviso").text();}
iwishitems=$("li","#wish");ihaveitems=$("li","#have");start=(currentiwishihavepage==1)?0:((currentiwishihavepage-1)*iwishihaveplimit);end=(currentiwishihavepage*iwishihaveplimit<listcount)?currentiwishihavepage*iwishihaveplimit-1:listcount-1;if(currentiwishihavepage==0){start=0;end=iwishihavelimit-1;}
$(iwishitems).hide();$(ihaveitems).hide();$("#iwishihavenav").hide();$("#iwishihavelist_vermas").hide();$("#iwishihavelist_vermenos").hide();$("#iwishihavelist_volver").hide();$("#wish .aviso").hide();$("#have .aviso").hide();userlog=WSL_Controller_Product.userLoggedin();if(userlog==false){$("#sub-just-experts").hide();}
if(iwishcount<=start)
{if(iwishcount==0){$("#wish .aviso").show();$("#wish .aviso").text($wishaviso);}
donotshowiwish=true;}
if(ihavecount<=start)
{if(ihavecount==0){$("#have .aviso").show();$("#have .aviso").text($haveaviso);}
donotshowihave=true;}
for(i=start;i<=end;i++){if(!donotshowihave&&ihavecount-1>=i){$(ihaveitems[i]).show();}
if(!donotshowiwish&&iwishcount-1>=i){$(iwishitems[i]).show();}
if(listcount-1>end){$("#iwishihavenav").show();$("#iwishihavelist_vermas").css('display','');}}
if(currentiwishihavepage>1){$("#iwishihavelist_volver").css('display','');}
if(currentiwishihavepage==1){$("#iwishihavelist_vermenos").css('display','');}},userLoggedin:function(){return($(".logged").length!=0);},showNextStream:function(link){if(shownmore==true){if($(link).parent().attr("id")=="productstream1"){$(link).hide();}else{$(link).parent().prev().hide();$(link).parent().hide();}
$(link).parent().next().show();}else{tag_id=$(".productid").attr("id");shownmore=true;url="/json/productstreamall/"+tag_id;$.post(url,{},function(data){$("#streamwall").html(data);WSL_Controller_Product.enableListeners();WSL.getTimeAgo();});}
return false;},enableListeners:function(){WSL_Controller_Product.initProductCommentActions();WSL_Controller_Product.initstreamwallpagination();WSL.initFacebook();},showPreviousStream:function(link){previous=$(link).parent().prev();if($(link).parent().attr("id")=="productstream3"){$(previous).prev().show();}
if($(link).parent().attr("id")=="productstream2"){if($("#productstream1 a.button.next").html()==null){$(link).parent().prev().append('<a href="#" class="button next"><span>ver mas</span></a>');WSL_Controller_Product.initstreamwallpagination();}else{$("#productstream1 a.button.next").show();}}
$(link).parent().prev().show();$(link).parent().hide();return false;},initUserPage:function(){$('#carousel5').jcarousel({itemLoadCallback:WSL_Controller_Product.itemUserIhaveLoadCallbackFunction,size:$('.userihavecount').attr("id")});userihaveCarouselLoaded=false;$('#carousel6').jcarousel({itemLoadCallback:WSL_Controller_Product.itemUserIwishLoadCallbackFunction,size:$('.useriwishcount').attr("id")});useriwishCarouselLoaded=false;if($("#user-have ul li").html()==null&&$("#user-wish ul li").html()==null){$("#user-products").hide(0);}else if($("#user-have ul li").html()==null&&$("#user-wish ul li").html()!=null){$("#user-products ul.tabs").tabs("#user-products div.panes > div.related-products",{initialIndex:1});}else{$("#user-products ul.tabs").tabs("#user-products div.panes > div.related-products");}},itemUserIhaveLoadCallbackFunction:function(carousel,state)
{if(state=='next'&&!userihaveCarouselLoaded){userid=$(".userid").attr("id");url='/json/moreuserihave/'+userid;$.getJSON(url,function(data){WSL_Controller_Product.mycarousel_itemUserIhaveAddCallback(carousel,carousel.first,carousel.last,data);});userihaveCarouselLoaded=true;}},mycarousel_itemUserIhaveAddCallback:function(carousel,first,last,data)
{if(data.length>0){var limage_path=$('#userihave-gallery').find('img:first').attr('src');var nimage_path=limage_path.substring(0,limage_path.lastIndexOf('/'))+'/';for(i=0;i<data.length;i++){var tag_name=data[i].tag_name;var image_name=data[i].product_post_id;var product_url=data[i].product_url;if(image_name==null){image_name=data[i].photo_post_id;}
thumb_url=nimage_path+image_name+'.jpg'
carousel.add(i+5,WSL_Controller_Product.mycarousel_getUserIhaveItemHTML(tag_name,thumb_url,product_url));}
carousel.size(data.length+4);}},mycarousel_getUserIhaveItemHTML:function(tag_name,thumb_url,product_url)
{return'<a href="'+product_url+'"><img src="'+thumb_url+'" alt="'+tag_name+'" /><span>"'+tag_name+'"</span></a>';},itemUserIwishLoadCallbackFunction:function(carousel,state)
{if(state=='next'&&!useriwishCarouselLoaded){userid=$(".userid").attr("id");url='/json/moreuseriwish/'+userid;$.getJSON(url,function(data){WSL_Controller_Product.mycarousel_itemUserIwishAddCallback(carousel,carousel.first,carousel.last,data);});useriwishCarouselLoaded=true;}},mycarousel_itemUserIwishAddCallback:function(carousel,first,last,data)
{if(data.length>0){var limage_path=$('#useriwish-gallery').find('img:first').attr('src');var nimage_path=limage_path.substring(0,limage_path.lastIndexOf('/'))+'/';for(i=0;i<data.length;i++){var tag_name=data[i].tag_name;var image_name=data[i].product_post_id;var product_url=data[i].product_url;if(image_name==null){image_name=data[i].photo_post_id;}
thumb_url=nimage_path+image_name+'.gif'
carousel.add(i+5,WSL_Controller_Product.mycarousel_getUserIwishItemHTML(tag_name,thumb_url,product_url));}
carousel.size(data.length+4);}},mycarousel_getUserIwishItemHTML:function(tag_name,thumb_url,product_url)
{return'<a href="'+product_url+'"><img src="'+thumb_url+'" alt="'+tag_name+'" /><span>"'+tag_name+'"</span></a>';}};function getWidgetfavourites(){username=$('#username_fav').val();url='/igooglewidget/getfavourites/'+username;$.post(url,{},function(data){$('#favoritos').html(data);favConEvents();});url='/igooglewidget/getconversations/'+username;$.post(url,{},function(data){$('#conversations').html(data);favConEvents();});return false;}
$('document').ready(function(){$("#next").click(function(){next=(3+parseInt($("#recent_hd").val()));url='/igooglewidget_recent_posts/'+next;$.post(url,{},function(data){$('#recent_posts').html(data);if($("#size_rec_hd").val()==0){$("#next").hide();}
$('a.showdesc').click(showdesc);});$("#recent_hd").val(next);$("#pre").show();return false;});$("#pre").click(function(){next=(next-3);url='/igooglewidget_recent_posts/'+next;$.post(url,{},function(data){$('#recent_posts').html(data);if($("#size_rec_hd").val()!=0){$("#next").show();}
$('a.showdesc').click(showdesc);});$("#recent_hd").val(next);if(next==0)
{$("#pre").hide();}
return false;});$("#top_next").click(function(){top_offset=(3+parseInt($("#top_hd").val()));url='/igooglewidget_topread_posts/'+top_offset;$.post(url,{},function(data){$('#top_read').html(data);if($("#size_top_hd").val()==0){$("#top_next").hide();}
$('a.showdesc').click(showdesc);});$("#top_hd").val(top_offset);$("#top_pre").show();return false;});$("#top_pre").click(function(){top_offset=(top_offset-3);url='/igooglewidget_topread_posts/'+top_offset;$.post(url,{},function(data){$('#top_read').html(data);if($("#size_top_hd").val()!=0){$("#top_next").show();}
$('a.showdesc').click(showdesc);});$("#top_hd").val(top_offset);if(top_offset==0){$("#top_pre").hide();}
return false;});$("#fav_pre").click(fav_pre);$("#fav_next").click(fav_next);$("#con_pre").click(con_pre);$("#con_next").click(con_next);if($("#size_rec_hd").val()==0){$("#next").hide();}
if($("#size_top_hd").val()==0){$("#top_next").hide();}
if($("#size_con_hd").val()==0){$("#con_next").hide();};if($("#size_fav_hd").val()==0){$("#fav_next").hide();};$("#pre").hide();$("#top_pre").hide();fav_offset=parseInt($("#fav_hd").val());$("#fav_pre").hide();con_offset=parseInt($("#con_hd").val());$("#con_pre").hide();$('a.showdesc').click(showdesc);$('#target_fav').submit(function(){getWidgetfavourites();return false;});$('#target_con').submit(function(){getWidgetconversations();return false;});});function showdesc(){var str=$(this).text();if(str=="+"){$(this).text("-");}else{$(this).text("+");}
$(this).nextAll(".desc").toggle();return false;};function fav_next(){fav_offset=(3+parseInt($("#fav_hd").val()));url='/igooglewidget/'+fav_offset;$.post(url,{},function(data){$('#favorites').html(data);$('a.showdesc').click(showdesc);if($("#size_fav_hd").val()==0){$("#fav_next").hide();};});$("#fav_hd").val(fav_offset);$("#fav_pre").show();return false;}
function fav_pre(){fav_offset=(parseInt($("#fav_hd").val())-3);url='/igooglewidget/'+fav_offset;$.post(url,{},function(data){$('#favorites').html(data);$('a.showdesc').click(showdesc);$("#fav_next").show();});$("#fav_hd").val(fav_offset);if(fav_offset==0){$("#fav_pre").hide();}
return false;}
function con_next(){con_offset=(3+parseInt($("#con_hd").val()));url='/igooglewidgetcon/'+con_offset;$.post(url,{},function(data){$('#conversations1').html(data);$('a.showdesc').click(showdesc);if($("#size_con_hd").val()==0){$("#con_next").hide();};});$("#con_hd").val(con_offset);$("#con_pre").show();return false;}
function con_pre(){con_offset=(parseInt($("#con_hd").val())-3);url='/igooglewidgetcon/'+con_offset;$.post(url,{},function(data){$('#conversations1').html(data);$('a.showdesc').click(showdesc);$("#con_next").show();});$("#con_hd").val(con_offset);if(con_offset==0){$("#con_pre").hide();}
return false;}
function favConEvents(){if($("#size_con_hd").val()==0){$("#con_next").hide();};if($("#size_fav_hd").val()==0){$("#fav_next").hide();};$("#fav_pre").click(fav_pre);$("#fav_next").click(fav_next);$("#con_pre").click(con_pre);$("#con_next").click(con_next);$('a.showdesc').click(showdesc);$("#fav_pre").hide();$("#con_pre").hide();}
function getWidgetconversations(){username=$('#username_con').val();url='/igooglewidget/getconversations/'+username;$.post(url,{},function(data){$('#conversations').html(data);favConEvents();});url='/igooglewidget/getfavourites/'+username;$.post(url,{},function(data){$('#favoritos').html(data);favConEvents();});return false;}
function enterkey(evt){var evt=(evt)?evt:event;var charCode=(evt.which)?evt.which:evt.keyCode;if(charCode==13){return false;}}
function showlogin(){$('#favoritos').html('Por favor, pon aqui tu nombre en Xataka <input type="text" maxlength="15" name="new_username" id="username_fav"/><input type="button" onclick="return getWidgetfavourites();" value="envia"/>');$('#conversations').html('Por favor, pon aqui tu nombre en Xataka <input type="text" maxlength="15" name="new_username" id="username_con"/><input type="button" onclick="return getWidgetconversations();" value="envia"/>');return false;}var WSL_Controller_SocialShare={initSocialShare:function()
{this.recaptchaflag=$('.recaptchaflag').attr("id");if(this.recaptchaflag){$('#recaptcha').hide(0);}
WSL_Controller_SocialShare.initShareList();WSL_Controller_SocialShare.initSendMailToggle();WSL_Controller_SocialShare.initShareMail();},initShareList:function()
{var blog_url=$(".blogurl").attr("id");var itemid=$(".itemid").attr("id");var item=$(".itemname").attr("id");$('#share-fb').click(function()
{if(item=='post'){var shorturl='http://www.facebook.com/share.php?u='+encodeURIComponent(blog_url+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id"))+'&t='+encodeURIComponent($("#post-title").val());}else if(item=='product'){var shorturl='http://www.facebook.com/share.php?u='+encodeURIComponent(blog_url+'/'+$(".productlabel").attr("id")+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id"))+'&t='+encodeURIComponent($("#post-title").val());}
WSL_Controller_SocialShare.ShareList(shorturl);return false;});$('#share-tt').click(function()
{if(item=='post'){var shorturl='http://www.facebook.com/share.php?u='+blog_url+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}else if(item=='product'){var shorturl='http://www.facebook.com/share.php?u='+blog_url+'/'+$(".productlabel").attr("id")+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}
WSL_Controller_SocialShare.ShareList(shorturl);return false;});$('#share-mn').click(function()
{if(item=='post'){var shorturl='http://meneame.net/submit.php?url='+blog_url+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}else if(item=='product'){var shorturl='http://meneame.net/submit.php?url='+blog_url+'/'+$(".productlabel").attr("id")+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}
WSL_Controller_SocialShare.ShareList(shorturl);return false;});$('#share-bt').click(function()
{if(item=='post'){var shorturl='http://bitacoras.com/anotaciones/'+blog_url+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}else if(item=='product'){var shorturl='http://bitacoras.com/anotaciones/'+blog_url+'/'+$(".productlabel").attr("id")+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}
WSL_Controller_SocialShare.ShareList(shorturl);return false;});$('#share-tw').click(function()
{if(item=='post'){var shorturl='http://twitter.com/home?status='+$("#post-title").val()+'+'+blog_url+'/p/'+itemid;}else if(item=='product'){var shorturl='http://twitter.com/home?status='+$("#post-title").val()+'+'+blog_url+'/t/'+itemid;}
WSL_Controller_SocialShare.ShareList(shorturl);return false;});$('#share-diu').click(function()
{if(item=='post'){var shorturl='http://del.icio.us/post?url='+blog_url+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id")+'&title='+$("#post-title").val();}else if(item=='product'){var shorturl='http://del.icio.us/post?url='+blog_url+'/'+$(".productlabel").attr("id")+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id")+'&title='+$("#post-title").val();}
WSL_Controller_SocialShare.ShareList(shorturl);return false;});$('#share-li').click(function()
{if(item=='post'){var shorturl='http://www.linkedin.com/shareArticle?mini=true&url='+blog_url+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}else if(item=='product'){var shorturl='http://www.linkedin.com/shareArticle?mini=true&url='+blog_url+'/'+$(".productlabel").attr("id")+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}
WSL_Controller_SocialShare.ShareList(shorturl);return false;});$('#share-act').click(function()
{if(item=='post'){var shorturl='http://www.actibva.com/enlared/add?url='+blog_url+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}else if(item=='product'){var shorturl='http://www.actibva.com/enlared/add?url='+blog_url+'/'+$(".productlabel").attr("id")+'/'+$('.categoryname').attr("id")+'/'+$(".urlname").attr("id");}
WSL_Controller_SocialShare.ShareList(shorturl);return false;});},initSendMailToggle:function()
{$('#send-toggle').click(function()
{var toggleurl='/json/islogin';WSL_Controller_SocialShare.SendMailToggle(toggleurl);return false;});},initShareMail:function()
{$('#sharemail').click(function()
{var shareurl="/json/sharemail";WSL_Controller_SocialShare.ShareMail(shareurl);return false;});},ShareList:function(shorturl)
{window.open(shorturl,'Share');},SendMailToggle:function(toggleurl)
{var now=new Date();$.getJSON(toggleurl,{ctc:now.getMilliseconds()},function(data)
{return WSL_Controller_SocialShare.SendMailToggleJson(data);});},ShareMail:function(shareurl)
{var title=$('#post-title').val();var desc=$('#post-excerpt').val();var useremail=$('#useremail').val();var destemail=$('#destemail').val();if($('#send-copy').attr("checked")===true){var userchk=1;}else{var userchk=0;}
var usermsg=$('#message').val();var category=$(".categoryname").attr("id");var item=$(".itemname").attr("id");var urltitle=$(".urlname").attr("id");var response=$("input[name='recaptcha_response_field']").val();var challenge=$("input[name='recaptcha_challenge_field']").val();$.post(shareurl,{title:title,desc:desc,useremail:useremail,destemail:destemail,userchk:userchk,usermsg:usermsg,item:item,category:category,urltitle:urltitle,response:response,challenge:challenge},function(data){return WSL_Controller_SocialShare.ShareMailJson(data);},'json');},SendMailToggleJson:function(data)
{if($('#send-form').is(':visible')){$('#send-form').hide(0);}else{if(data!=1&&this.recaptchaflag){$('#recaptcha').show(0);$('#captcha_error').hide(0);}
$('#send-form').show(0);$('#destemail').val('');$('#useremail_error').hide(0);$('#destemail_error').hide(0);$('#send-copy').attr('checked',false);$('#message').val('');$('#send-form-success').hide(0);}},ShareMailJson:function(data)
{if(data.result==0){$('#send-form').hide(0);$('#send-form-success').show(0);}else if(data.result==3){$('#send-form-success').hide(0);$('#useremail_error').show(0);$('#destemail_error').hide(0);$('#captcha_error').hide(0);}else if(data.result==4){$('#send-form-success').hide(0);$('#useremail_error').hide(0);$('#destemail_error').show(0);$('#captcha_error').hide(0);}else if(data.result==5){$('#send-form-success').hide(0);$('#useremail_error').show(0);$('#destemail_error').show(0);$('#captcha_error').hide(0);}else if(data.result==8){$('#send-form-success').hide(0);$('#useremail_error').hide(0);$('#destemail_error').hide(0);$('#captcha_error').show(0);}else if(data.result==9){$('#send-form-success').hide(0);$('#useremail_error').show(0);$('#destemail_error').show(0);$('#captcha_error').show(0);}
if(this.recaptchaflag&&data.user==0&&data.result>0){Recaptcha.reload();}}};var WSL_Controller_ProductIndex={initProductIndex:function()
{WSL_Controller_ProductIndex.initProductIndexWishHave();},initProductIndexWishHave:function()
{$("li.have-disabled>a,li.have>a,li.wish-disabled>a,li.wish>a").click(function()
{var parts=$(this).attr("id").split("_");var url='/json/iwishihave/'+parts[1]+'/'+parts[2];WSL_Controller_ProductIndex.ProductIndexWishHave(url);return false;});},ProductIndexWishHave:function(url)
{$.getJSON(url,{},function(data)
{var explode=url.split("/");var pitem=$("#pwidget_"+explode[3]).prev('p.aviso');pitem.hide();if(data.res==1)
{pitem.attr('class','aviso');pitem.html(data.messsages.login);pitem.show();}
else if(data.res==0)
{WSL_Controller_ProductIndex.ChangeWishHaveStaus(data,explode[3]);WSL_Controller_ProductIndex.UpdateWishHaveCounter(data,explode[3]);}});},initUserProducts:function(havelist,wishlist)
{for(i in havelist){button='#buttonradio_'+havelist[i];$(button+" li.have").attr('class','have-disabled');};for(i in wishlist){button='#buttonradio_'+wishlist[i];$(button+" li.wish").attr('class','wish-disabled');};},ChangeWishHaveStaus:function(data,product_id)
{button='#buttonradio_'+product_id;havebutton=$(button+" li.have-disabled,"+button+" li.have");wishbutton=$(button+" li.wish-disabled,"+button+" li.wish");if(data.type=='unclick'){havebutton.attr('class','have');wishbutton.attr('class','wish');}else{if(data.preference==0){havebutton.attr('class','have-disabled');wishbutton.attr('class','wish');}else{havebutton.attr('class','have');wishbutton.attr('class','wish-disabled');}}},UpdateWishHaveCounter:function(data,product_id)
{counter='#havewish_'+product_id;havecounter=$(counter+" li.have strong");wishcounter=$(counter+" li.wish strong");havecounter.html(data.productIhaveCount);wishcounter.html(data.productIwishCount);$('#popular_'+product_id).html(parseInt(data.productIhaveCount)+parseInt(data.productIwishCount));}};function WSL_Controller_PublishFacebook(){var Self=this;this.postid=null;this.askFbPermission=false;this.init=function(obj,data){this.postid=$(obj).attr('id').substr(1);if(data.showFbShareWarning){Self.showWSLWarning();}
if(data.askFbPermission){this.permission='yesperms';this.askFbPermission=true;}
return false;},this.showWSLWarning=function(){$('#p'+this.postid).parent().prepend($("#warn-post-vote").clone());$('#p'+this.postid).parent().find("#warn-post-vote").show();$('#p'+this.postid).parent().find("#warn-post-vote #onlynow").click(function(){Self.HandleDeferYesPermission();return false;});$('#p'+this.postid).parent().find("#warn-post-vote #notnow").click(function(){Self.hideWSL();return false;});$('#p'+this.postid).parent().find("#warn-post-vote #always").click(function(){Self.HandleYesPermission();return false;});$('#p'+this.postid).parent().find("#warn-post-vote #never").click(function(){Self.HandleNoPermission();return false;});},this.hideWSL=function(){$('#p'+this.postid).parent().find("#warn-post-vote").hide();},this.HandleYesPermission=function(){this.permission='yesperms';Self.checkFBPermission();},this.HandleNoPermission=function(){this.permission='noperms';Self.postData();},this.HandleDeferYesPermission=function(){this.permission='defer';Self.checkFBPermission();},this.checkFBPermission=function(){if(this.askFbPermission){this.showFBPermissionDialog();}else{Self.postData();}},this.showFBPermissionDialog=function(){FB.Connect.showPermissionDialog("publish_stream",Self.permissionHandler,true);},this.permissionHandler=function(fbresponse){if(fbresponse){Self.postData();}},this.postData=function(){var url='/json/'+this.permission+'/'+this.postid;$.post(url,{},function(data){if(data){if(this.permission!=='noperms'){}}},'json');Self.hideWSL();return false;}};function WSL_Comments(){var Self=this;this.comments=new Array();this.votesIndex=new Array();this.pageNum=1;this.JSONrequest=false;this.perpageComments=40;this.timeOutIds=new Array();this.timedOutIds=new Array();this.hash="to-comments";this.timeOutMins=15;this.skipToComment=0;this.newComment=false;this.listenersEnabled=false;this.initfacebook=true;this.init=function(){this.tab=$("#sub-tabs .current").attr('href').substr(1);this.pageCount=parseInt($("#pageCount").text());this.servertime=parseInt($("#lp2currenttime").text());if(this.userLoggedin()){this.user_name=$("#login_user_id").text();}
this.showPagination();this.buildComments();this.createIndexes();$("#sub-tabs a").click(Self.tabclick);$('#ud_text_edit').keyup(Self.commentEditPreview);this.permalink();this.tabPermalink();Self.hideIrrelevanteComments();Self.disableOtherListeners();this.initfacebook=false;this.enableListeners();this.initfacebook=true;};this.enableListeners=function(){$(".comment-nav li a").click(Self.pageClick);$("#commentform .button").click(Self.commentSubmit);this.commentDeleteButton();this.setCommentEditTimeouts();$("a.edit-comment").click(Self.commentEdit);$('.comment-vote-up, .comment-vote-up-disabled').click(Self.commentVoteUp);$('.comment-vote-down, .comment-vote-down-disabled').click(Self.commentVoteDown);$('.abuse').click(Self.commentAbuse);$('.deletecomment').click(Self.commentDelete);$('.comment-reply a').click(Self.showCommentReplyForm);$('li.reply-notify a').click(Self.skipCommentParent);$('.comment-display.aviso a').click(Self.statusIrrelevanteComment);if(Self.initfacebook){WSL.initFacebook();}};this.hideIrrelevanteComments=function(){$("li.irrelevante").each(function(i){Self.hideIrrelevanteComment($(this).attr('id').substr('1'));});};this.statusIrrelevanteComment=function(){var commentId=$(this).parents("li").attr('id').substr('1');Self.hideIrrelevanteComment(commentId);return false;};this.hideIrrelevanteComment=function(commentId){var i=Self.findCommentIndex(commentId);Self.hideIrrelevanteResponses(i);};this.findCommentIndex=function(commentId){for(i=0;i<this.comments.length;i++){if(this.comments[i].id==commentId){return i;}}};this.hideIrrelevanteResponses=function(i){var comment=this.comments[i];Self.statusIrrelevanteBody(this.comments[i].id);if(Self.tab=='cronologico'){Self.irrelevanteResponses(comment);}};this.irrelevanteResponses=function(comment){for(j=i+1;j<this.comments.length;j++){if(comment.level<this.comments[j].level){Self.irrelevanteResponse(this.comments[i].id,this.comments[j].id);}else{break;}}};this.irrelevanteResponse=function(commentId,responseId){if($("#c"+commentId).find('.comment-body, .comment-reply, .comment-footer, .commentvote_error').is(':visible')){$("#c"+responseId).prev('li.reply-notify').show();$("#c"+responseId).show();}else{$("#c"+responseId).prev('li.reply-notify').hide();$("#c"+responseId).hide();}};this.statusIrrelevanteBody=function(commentId){if($("#c"+commentId).find('.comment-body, .comment-reply, .comment-footer, .commentvote_error').is(':visible')){$("#c"+commentId).find('.comment-body, .comment-reply, .comment-footer, .commentvote_error').hide();$("#c"+commentId+" .comment-display").html('Comentario votado como irrelevante. <a href="#">Pulsa para leerlo</a>');}else{$("#c"+commentId).find('.comment-body, .comment-reply, .comment-footer, .commentvote_error').show();$("#c"+commentId+" .comment-display").html('Comentario votado como irrelevante. <a href="#">Pulsa para cerrar la conversación</a>');}};this.setCommentEditTimeouts=function(){if(Self.userLoggedin()){$("li.comment").each(function(i){Self.commentEditTimeOut($(this).attr('id').substr('1'));});}};this.commentDeleteButton=function(){if($("#editorlogin").length>0){$(".deletecomment").show();}};this.TimedOut=function(id){for(var i=0,l=Self.timedOutIds.length;i<l;i++){if(Self.timedOutIds[i]==id){return true;}}
return false;};this.hasTimeOut=function(id){for(var i=0,l=Self.timeOutIds.length;i<l;i++){if(Self.timeOutIds[i].id==id){return true;}}
return false;};this.buildComments=function(){$("li.comment").each(function(i){html=jQuery("<p>").append($(this).clone()).html();level=0;if($(this).attr('class').search('reply')!=-1){level=parseInt($(this).find(".comment-level").text());html=jQuery("<p>").append($(this).prev().clone()).html()+html;}
Self.add(parseInt($(this).attr('id').substr(1)),$(this).find(".comment_karma").text(),level,html,1);});};this.add=function(id,votes,level,html,page){i=this.comments.length;this.comments[i]={};this.comments[i].page=page;this.comments[i].id=id;this.comments[i].votes=votes;this.comments[i].level=level;this.comments[i].html=html;};this.createIndexes=function(){this.votesIndex=new Array();this.idIndex=new Array();for(i=0;i<this.comments.length;i++){this.votesIndex[i]={index:i,value:this.comments[i].votes.replace(',','.')};this.idIndex[i]={index:i,value:this.comments[i].id};}};this.pageClick=function(){Self.pageNum=Self.getPageNumber($(this));Self.fetchRenderComments();Self.hideIrrelevanteComments();return false;};this.cronologicoTab=function(){commentsList='';for(i in this.comments){if(this.comments[i].page==this.pageNum){commentsList+=this.comments[i].html;}}
$(".comments").html(commentsList);};this.mostVotedTab=function(){commentsList='';this.votesIndex.sort(function(a,b){return parseFloat(b.value)-parseFloat(a.value)});start=(this.pageNum-1)*this.perpageComments;for(i=start;i-start<this.perpageComments&&i<this.votesIndex.length;i++){commentsList+=this.comments[this.votesIndex[i].index].html;}
$(".comments").html(commentsList);this.removeThreading();Self.removeReplyLink();};this.LatestTab=function(){commentsList='';this.idIndex.sort(function(a,b){return parseInt(b.value)-parseInt(a.value)});start=(this.pageNum-1)*this.perpageComments;for(i=start;i-start<this.perpageComments&&i<this.idIndex.length;i++){commentsList+=this.comments[this.idIndex[i].index].html;}
$(".comments").html(commentsList);this.removeThreading();Self.removeReplyLink();};this.removeReplyLink=function(){$(".comment-reply").remove();}
this.fetchRenderComments=function(){if(parseInt($("#pageCount").text())>1&&!this.JSONrequest){this.JSONrequest=true;Self.moreComments();}else{this.renderComments();}};this.moreComments=function(){$.getJSON('/morepostcomments/'+$('.post-likes').attr('id'),{},function(data){$.each(data,function(){Self.add(this.id,this.votes,this.level,this.html,this.page);});Self.createIndexes();Self.SkipToComment();Self.renderComments();Self.hash="to-comments";});};this.SkipToComment=function(){if(Self.skipToComment!=0){for(i in Self.comments){if(Self.comments[i].id==Self.skipToComment){Self.pageNum=Self.comments[i].page;this.hash="#c"+Self.skipToComment;break;}}}
Self.skipToComment=0;};this.getPageNumber=function(page){switch(page.attr('class')){case'last':if(!this.JSONrequest){pageNum=parseInt($(".commentpagecount:first").text());}else{pageNum=this.getLastPageNum();}
break;case'next':link=$(".comment-nav li strong");pageNum=parseInt($(link[0]).text())+1;break;case'prev':link=$(".comment-nav li strong");pageNum=parseInt($(link[0]).text())-1;break;case'first':pageNum=1;break;default:pageNum=parseInt(page.text());break;}
return pageNum;};this.renderComments=function(){Self.processNewComment();this.renderTab();this.pageCount=Self.getLastPageNum();Self.showPagination();WSL.initPostPage();Self.disableOtherListeners();if(!Self.listenersEnabled){Self.enableListeners();}
window.location.hash=Self.hash;};this.processNewComment=function(){if(Self.newComment){Self.pageNum=Self.getLastPageNum();Self.newComment=false;Self.highlightChronologicoTab();}};this.renderTab=function(){switch(this.tab){case'cronologico':this.cronologicoTab();break;case'valorado':this.mostVotedTab();break;case'ultimos':this.LatestTab();break;}};this.removeThreading=function(){$("li.comment").removeClass("reply-1 reply-2 reply-3");$("li.reply-notify").removeClass("reply-notify-1 reply-notify-2 reply-notify-3");};this.prevNextLinks=function(){if(this.pageNum==1){$("li a.first,li a.prev").hide();}else{$("li a.first,li a.prev").show();}
if(this.pageNum==this.pageCount){$("li a.next,li a.last").hide();}else{$("li a.next,li a.last").show();}};this.pageLinks=function(){for(i=-2;i<=2;i++){num=this.pageNum+i;id=".comment-nav .nav"+(i+3)
if((num>0&&i<0)||(num<=this.pageCount&&i>0)){$(id).show();$(id+" a").text(num);}else{$(id).hide();}}};this.showPagination=function(){if(this.pageCount>1){Self.prevNextLinks();Self.pageLinks();$(".comment-nav .commentpagecount").text(this.pageCount);$(".comment-nav strong").text(this.pageNum);$(".comment-nav .nav3").show();$(".comment-nav").show();}else{$(".comment-nav").hide();}};this.getLastPageNum=function(){switch(this.tab){case'cronologico':page=(this.comments.length!=0)?this.comments[this.comments.length-1].page:1;break;case'valorado':case'ultimos':page=Math.ceil(this.comments.length/this.perpageComments)
break;}
return page;};this.tabclick=function(){if(Self.tab!=$(this).attr('href').substr(1)){Self.skipToTab(this);}
Self.hideIrrelevanteComments();};this.skipToTab=function(tab){$("#sub-tabs a").removeClass('current');$(tab).addClass('current');Self.tab=$(tab).attr('href').substr(1);Self.pageNum=1;Self.hash="to-comments";Self.fetchRenderComments();};this.permalink=function(){commentId=window.location.hash;if(/c(\d)+/.test(commentId)){if(commentId.search("#")==-1){commentId="#"+commentId;}
if($(commentId).length==0){this.skipToComment=commentId.replace('#c','');this.fetchRenderComments();}}};this.tabPermalink=function(){tabs=$("#sub-tabs li a");tabOne=$(tabs[0]).attr("href").replace("#",'');tabTwo=$(tabs[1]).attr("href").replace("#",'');tabThree=$(tabs[2]).attr("href").replace("#",'');tabPermalink=window.location.hash.replace("#",'');if(tabPermalink==tabTwo||tabPermalink==tabThree){Self.skipToTab((tabPermalink==tabTwo?tabs[1]:tabs[2]));}else if(tabPermalink==tabOne){window.location.hash="to-comments";}};this.commentSubmit=function(){$("#duplicatecommentnotice").hide();$("#duplicatecommentreplynotice").hide();params=Self.getCommentSubmitParams();if(params.text.length!=0&&!Self.isEditCommentExpired()){Self.commentSubmitRequest(params);}
return false;};this.isEditCommentExpired=function(){res=false;if(Self.isEditComment()){commentId=$("#commentedit").val();if(!Self.hasTimeOut(commentId)||Self.TimedOut(commentId)){res=true;Self.commentExpired(commentId);}}
return res;};this.commentExpired=function(commentId){Self.showCommentExpiredMessage(commentId);Self.activateCommentAddMode();Self.emptyCommentFormFields();window.location.hash="c"+commentId;};this.showCommentExpiredMessage=function(){$("#c"+commentId).find('.comment-body').after(jQuery("<p>").append($("#commenteditnotice").clone()).html());$("#c"+commentId).find('#commenteditnotice').show();};this.getCommentSubmitParams=function(){subscription_status=$("#commentform input[name=subscription_status]").val();subscribe=$("#commentform input[name=subscribe]:checked").val();params={subscribe:subscribe,subscription_status:subscription_status,text:$("#commentform #ud_text").val().replace(/^\s+|\s+$/g,''),postId:$('.post-likes').attr('id').substr(1)};if(Self.isEditComment()){params.commentId=$("#commentedit").val();params.text=WSL.inittextalter($("#commentform #ud_text_edit").html()).replace(/^\s+|\s+$/g,'');}
return params;};this.commentSubmitRequest=function(params){Self.disableCommentSubmit();$.post(Self.commentSubmitURL(),params,function(data){Self.listenersEnabled=true;if(data.res==1){window.location.href='/signup?referrer='+window.location.href;}else if(data.res==-2){$("#userantitrollnotice").show();}else if(data.res==0){Self.commentSubmitResponseRender(data,params)}else if(data.res==3){$("#duplicatecommentnotice").show();}
Self.listenersEnabled=false;Self.enableCommentSubmit();},"json");};this.commentSubmitURL=function(){if(Self.isEditComment()){postURL="/json/postCommentEdit";}else{postURL="/json/postComment";}
return postURL;};this.commentSubmitResponseRender=function(data,params){Self.servertime=parseInt(data.time);if(Self.isEditComment()){Self.editCommentRender(data);window.location.hash='c'+data.id;}else{Self.newCommentRender(data);}
Self.emptyCommentFormFields();$("#commentform input[name=subscription_status]").val(params.subscribe);};this.commentEdit=function(){commentId=$(this).parent().attr('id').substr(1);if(Self.hasTimeOut(commentId)){$("#ud_text_edit").html($(this).parent().find('span.comment-content').html());$("#ud_text_edit").show();$("#ud_text_edit").attr('contentEditable',true);$("#ud_text").hide();Self.commentEditPreview();Self.storeEditComment(commentId);window.location.hash="#ud_text_edit";$("#comment-write h2").text("Edita tu comentario");}
return false;};this.storeEditComment=function(commentId){if($("#commentedit").length==0){$("#commentform").append($("<input />").attr({type:"hidden",name:"commentedit",id:"commentedit"}));}
$("#commentedit").val(commentId);};this.commentVoteUp=function(){Self.disableOtherListeners();$('.commentvote_error').hide();var commentID=$(this).parents("li").attr('id');var obj=this;$.post('/json/commentvoteup/'+commentID,{},function(data)
{return Self.commentVote(obj,data);},'json');return false;};this.commentVoteDown=function(){Self.disableOtherListeners();$('.commentvote_error').hide();var commentID=$(this).parents("li").attr('id');var obj=this;$.post('/json/commentvotedown/'+commentID,{},function(data)
{return Self.commentVote(obj,data);},'json');return false;};this.commentAbuse=function(){Self.disableOtherListeners();$('.commentvote_error').hide();var commentID=$(this).parents("li").attr('id');var obj=this;$.post('/json/abuse/'+commentID,{},function(data)
{return Self.commentVote(obj,data);},'json');return false;};this.commentDelete=function(){$('.commentvote_error').hide();var commentID=$(this).parents("li").attr('id');var answer=confirm('Se suprime el comentario \n OK para borrar, Cancel para detener el proceso');if(answer){$.post('/json/delete_comment/'+commentID,{},function(data)
{return Self.commentRemove(data);},'json');}
return false;};this.commentRemove=function(data){if(data.res==1){alert('Por favor ingrese en wp-admin');}else{Self.updateDeletedCommentInPage(data);Self.updateCommentInCommentsArray(data.id);}};this.updateDeletedCommentInPage=function(data){commentId="#c"+data.id;var replyClass=Self.getCommentReplyClass(data.id);$(commentId).after(data.html);nextId=$(commentId).next();$(nextId).find('strong').text("#"+$(commentId).find("span.number").text());$(nextId).attr('class',"comment "+replyClass);$(commentId).remove();};this.getCommentReplyClass=function(id){var replyClass=parseInt(Self.getCommentNestingLevel("c"+id))-1;if(replyClass>0){replyClass="reply-"+replyClass;}else{replyClass='';}
return replyClass;};this.deleteCommentFromArray=function(commentID){for(i=0;i<Self.comments.length;i++){if(Self.comments[i].id==commentID){Self.comments.splice(i,1);}}
Self.createIndexes();};this.commentVote=function(obj,data)
{$('.commentvote_error').html('');$('#c'+data.cid+' .commentvote_error').show();if(data.res==1){$('#c'+data.cid+' .commentvote_error').html('<p class="aviso">Para votar un comentario es necesario identificarse. Puede hacerlo <strong><a href="/signup">aqui</a></strong></p>');}else if(data.res==2){$('#c'+data.cid+' .commentvote_error').html('<p class="aviso">Ya has votado este comentario</p>');}else if(data.res==4){$('#c'+data.cid+' .commentvote_error').html('<p class="aviso">No puedes votar tus propios comentarios</p>');}else if(data.res==5){$('#c'+data.cid+' .commentvote_error').html('<p class="aviso">Has excedido el máximo de votos negativos permitido por día</p>');}else if(data.res==6){var msg='<p class="aviso">No tienes suficiente karma para asignar votos negativos al comentario. Para hacerlo es necesario tener al menos 3 estrellas. Completa tu perfil y participa m&aacute;s en la comunidad. Ver&aacute;s como pronto subes de nivel</p>';var conveted_msg=WSL.inittextalter(msg);$('#c'+data.cid+' .commentvote_error').html(conveted_msg);}else if(data.res==7){$('#c'+data.cid+' .commentvote_error').html('<p class="aviso">Has excedido el máximo de votos positivos permitido por día</p>');}else if(data.res==8){$('#c'+data.cid+' .commentvote_error').html('<p class="aviso">Este comentario ya ha sido votado desde esta misma dirección IP</p>');}else if(data.res==0){Self.updateCommentVotes(data.cid,data.karma,data.votes,data.commentkarma);Self.commentWithNewvotesData(data.cid,data.karma);Self.fadeOut(obj,data.cid);}
Self.enableListeners();};this.updateCommentVotes=function(commentID,karma,votes,karmaLevel){if(votes==1){$('#karmavotes'+commentID).html('Karma '+karma+' (<span class="votes">'+votes+'</span> voto) | '+karmaLevel);}else{$('#karmavotes'+commentID).html('Karma '+karma+' (<span class="votes">'+votes+'</span> votos) | '+karmaLevel);}
this.statusBadgeUpdate(commentID,karmaLevel);var commentclass=$('#c'+commentID).attr('class').split(' ');var newclass='';for(i=0;i<(commentclass.length)-1;i++){newclass=newclass+commentclass[i]+' ';}
$('#c'+commentID).removeClass($('#c'+commentID).attr('class'));$('#c'+commentID).addClass(newclass+karmaLevel);};this.commentWithNewvotesData=function(commentID,commentKarma){for(i=0;i<Self.comments.length;i++){if(Self.comments[i].id==commentID){Self.comments[i].html=jQuery("<p>").append($("#c"+commentID).clone()).html();Self.comments[i].votes=commentKarma;}}
Self.createIndexes();};this.fadeOut=function(obj,commentID){var voteUp=$(obj).parent().children('.comment-vote-up');var voteDown=$(obj).parent().children('.comment-vote-down');var abuse=$('#c'+commentID+' .abuse');Self.voteUp_fadeOut(voteUp);Self.voteDown_fadeOut(voteDown);Self.abuse_fadeOut(abuse);}
this.voteUp_fadeOut=function(voteUp){$(voteUp).addClass('comment-vote-up-disabled');$(voteUp).removeClass('comment-vote-up');$(voteUp).fadeIn('slow');};this.voteDown_fadeOut=function(voteDown){$(voteDown).addClass('comment-vote-down-disabled');$(voteDown).removeClass('comment-vote-down');$(voteDown).fadeIn('slow');};this.abuse_fadeOut=function(abuse){$(abuse).addClass('abuse-disabled');$(abuse).removeClass('abuse');$(abuse).fadeIn('slow');};this.disableOtherListeners=function(){$("#commentform .button").unbind("click");$('.comment-vote-up, .comment-vote-up-disabled').unbind("click");$('.comment-vote-down, .comment-vote-down-disabled').unbind("click");$('.abuse').unbind("click");$('.deletecomment').unbind("click");$(".comment-nav li a").unbind("click");$("a.edit-comment").unbind("click");$(".comment-reply a").unbind("click");$("li.reply-notify a").unbind("click");$('.comment-display.aviso a').unbind("click");};this.newCommentRender=function(data){WSL_Controller_GoogleAnalytics.registerClick('modulo-escribir-comentarios','comentario-ok');Self.increasePostCommentCount();Self.addNewCommentToCommentsArray(data);tabs=$("#sub-tabs li a");Self.tab=$(tabs[0]).attr("href").replace("#",'');Self.newComment=true;Self.hash="#c"+data.id;Self.fetchRenderComments();};this.addNewCommentToCommentsArray=function(data){if(Self.getPageCount()==1&&Self.firstPageCommentCountWithoutReplies()<Self.perpageComments){Self.addToCommentsAndCreateIndexs(data);}else if(Self.getPageCount()==1&&Self.firstPageCommentCountWithoutReplies()==Self.perpageComments){$("#pageCount").text(2);}else if(Self.getPageCount()>1&&Self.JSONrequest){lastpage=Self.comments[Self.comments.length-1].page;data.page=Self.lastPageCommentCountWithoutReplies()==Self.perpageComments?lastpage+1:lastpage;Self.addToCommentsAndCreateIndexs(data);}};this.editCommentRender=function(data){Self.updateCommentInPage(data);Self.updateCommentInCommentsArray(data.id);Self.activateCommentAddMode();if(Self.tab!='cronologico'){Self.removeReplyLink();}};this.activateCommentAddMode=function(){$("#comment-write h2").text("Escribir un comentario");$("#commentedit").remove();$("#ud_text").show();$("#ud_text_edit").attr('contentEditable',false);$("#ud_text_edit").hide();}
this.updateCommentInPage=function(data){commentId="#c"+data.id;$(commentId).after(data.html);nextId=$(commentId).next();$(nextId).find("span.number").text($(commentId).find("span.number").text());$(nextId).attr('class',$(commentId).attr('class'));$(commentId).remove();};this.clearCommentTimeOut=function(id){if(Self.hasTimeOut(id)){for(i in Self.timeOutIds){if(Self.timeOutIds[i].id==id){clearTimeout(Self.timeOutIds[i].timeOutId);Self.timeOutIds.splice(i,1);}}}};this.userLoggedin=function(){return($(".logged").length!=0);};this.getCommentTime=function(id){return parseInt($("#c"+id).find('.commentTime').text());};this.removeCommentEditLink=function(){commentId="#c"+Self.timeOutIds[0].id;Self.timedOutIds[Self.timedOutIds.length]=Self.timeOutIds[0].id;Self.timeOutIds.splice(0,1);$(commentId).find("a.edit-comment").remove();};this.commentEditTimeOut=function(id){if(Self.user_name==Self.getCommentUserName(id)){Self.hideCommentAbuseLink(id);timeout=Self.getCommentRemainEditTime(id);if(timeout>0&&!Self.hasTimeOut(id)&&!Self.TimedOut(id)){Self.setcommentEditTimeOut(id,timeout);}}
if(Self.hasTimeOut(id)){Self.showCommentEditLink(id);}};this.setcommentEditTimeOut=function(id,timeout){index=Self.timeOutIds.length;Self.timeOutIds[index]={id:id,value:timeout};Self.timeOutIds[index].timeOutId=setTimeout(this.removeCommentEditLink,timeout);Self.timeOutIds.sort(function(a,b){return a.value-b.value});};this.getCommentUserName=function(id){return $("#c"+id).find('.comment-user-id').text();};this.hideCommentAbuseLink=function(id){$("#c"+id).find('a.abuse').hide();};this.showCommentEditLink=function(id){$("#c"+id).find(".edit-comment").show();};this.getCommentRemainEditTime=function(id){return(Self.timeOutMins*60-(Self.servertime-Self.getCommentTime(id)))*1000;};this.isEditComment=function(){return($("#commentedit").length!=0);};this.enableCommentSubmit=function(){$("#commentform .button").attr("disabled",false);Self.enableListeners();};this.disableCommentSubmit=function(){Self.disableOtherListeners();$("#commentform .button").attr("disabled",true);};this.emptyCommentFormFields=function(){$("#commentform #ud_text").val('');$("#commentform #ud_preview").text('');$("#commentform #ud_text_edit").text('');};this.increasePostCommentCount=function(){$(".post-comments").find('span').text(parseInt($(".post-comments").find('span').text())+1);};this.decreasePostCommentCount=function(){$(".post-comments").find('span').text(parseInt($(".post-comments").find('span').text())-1);};this.firstPageCommentCountWithoutReplies=function(){firstPagecount=0;for(i=0;i<Self.comments.length;i++){if(Self.comments[i].page==1&&Self.comments[i].level==0){firstPagecount++;}}
return firstPagecount;};this.lastPageCommentCountWithoutReplies=function(){lastPagecount=0;for(i=0;i<Self.comments.length;i++){if(Self.comments[i].page==Self.comments[Self.comments.length-1].page&&Self.comments[i].level==0){lastPagecount++;}}
return lastPagecount;};this.getPageCount=function(){return parseInt($("#pageCount").text());};this.addToCommentsAndCreateIndexs=function(data){Self.add(data.id,data.votes,data.level,data.html,data.page);Self.createIndexes();};this.updateCommentInCommentsArray=function(id){commentId="#c"+id;html=jQuery("<p>").append($(commentId).clone()).html();if($(commentId).prev().length>0&&$(commentId).prev().attr('class').search('reply-notify')!=-1){html=jQuery("<p>").append($(commentId).prev().clone()).html()+html;}
for(i in Self.comments){if(Self.comments[i].id==id){Self.comments[i].html=html;}}};this.showCommentReplyForm=function(){var commentID=$(this).parents("li").attr('id');if(!Self.userLoggedin()){window.location.href='/signup?referrer='+window.location.href;return false;}
if($('#'+commentID+' .comment_replyform').is(':visible')){$('#'+commentID+' .comment_replyform').hide(0);}else{Self.commentReplyForm(commentID)}
return false;};this.commentReplyForm=function(commentID){$('.comment_replyform').hide(0);$('.comment_replyform').html('');$('#'+commentID+' .comment_replyform').show(0);$('#'+commentID+' .comment_replyform').html($('#replyform').html());$('#'+commentID+' .comment_replyform #comment_reply_author').html($('#'+commentID+' .comment-info a').text());if($("#commentform input[name=subscribe]").val()==undefined){$('#'+commentID+' .comment_replyform .submit-area p').each(function(){$(this).hide();})}else{$('#'+commentID+' .comment_replyform input[name=subscribe]').each(function(){if($("#commentform input[name=subscribe]:checked").val()==$(this).val()){$(this).attr('checked',1);}})}
$('#comment_text').keyup(Self.commentPreview);$(".comment_replyform #cancel").click(Self.showCommentReplyForm);$(".comment_replyform #responder").click(Self.commentReplySubmit);};this.commentPreview=function(){var currentValue=$(this).val();currentValue=currentValue.replace(/\n/g,'<br />').replace(/\n\n+/g,'<br /><br />').replace(/(&lt;\/?)script/g,'$1noscript');$('#comment_preview').html(currentValue);};this.commentEditPreview=function(e){var currentValue=WSL.inittextalter($("#ud_text_edit").html());currentValue=currentValue.replace(/(&lt;\/?)script/g,'$1noscript');$('#ud_preview').html(currentValue);};this.commentReplySubmit=function(){var url='/json/commentreply';var commentID=$(this).parents("li").attr('id');params=Self.getCommentReplyParams(commentID);if(params.text.length!=0){Self.commentReplyRequest(url,params);}
return false;};this.getCommentReplyParams=function(commentID){subscription_status=$("#commentform input[name=subscription_status]").val();subscribe=$(".comment_replyform input[name=subscribe]:checked").val();params={subscribe:subscribe,subscription_status:subscription_status,text:$(".comment_replyform #comment_text").val().replace(/^\s+|\s+$/g,''),commentClass:Self.getCommentNestingLevel(commentID),parentNum:$("#"+commentID).find("span.number").text(),postId:$('.post-likes').attr('id').substr(1),commentID:commentID};return params;};this.getCommentNestingLevel=function(commentID){cmtClass=$("#"+commentID).attr('class').split(' ');if(cmtClass[1]=="reply-1"){var commentClass=2;}else if(cmtClass[1]=="reply-2"){var commentClass=3;}else if(cmtClass[1]=="reply-3"){var commentClass=4;}else{var commentClass=1;}
return commentClass;}
this.commentReplyRequest=function(url,params){$("#commentform input[name=subscribe]").each(function(){if($('#'+params.commentID+' .comment_replyform input[name=subscribe]:checked').val()==$(this).val()){$(this).attr('checked',1);}})
Self.showCommentReplyForm();$('.comment-reply a').click(Self.showCommentReplyForm);$("#replyform").hide();$(".comment_replyform").hide();$.post(url,params,function(data){Self.disableOtherListeners();if(data.res==1){window.location.href='/signup?referrer='+window.location.href;}else if(data.res==-2){Self.commentReplyForm(params.commentID);$('#'+params.commentID+' .comment_replyform #comment_text').val(params.text);$('#userreplyantitrollnotice').html($("#userantitrollnotice").html());$("#userreplyantitrollnotice").show();Self.enableListeners();}else if(data.res==3){Self.commentReplyForm(params.commentID);$('#'+params.commentID+' .comment_replyform #comment_text').val(params.text);$("#duplicatecommentreplynotice").show();Self.enableListeners();}else if(data.res==0){Self.commentReplyResponseRender(data,params);}},'json');};this.commentReplyResponseRender=function(data,params){Self.servertime=parseInt(data.time);var commentID=Self.getLastComment(params.commentID);Self.addAfterComment(commentID.substr(1),{votes:data.votes,id:data.id,level:data.level,html:data.html});$("#"+commentID).after(data.html);Self.createIndexes();Self.enableListeners();window.location.hash='c'+data.id;};this.getLastComment=function(commentID){var parentNumber=$("#"+commentID+" .number").text();var lastElement=Self.getLastReply(parentNumber);if(lastElement.length>0){var level=lastElement.find(".comment-level").text();commentID="c"+Self.getCommentBeforeReply($(lastElement).attr("id"),level);}
return commentID;};this.getCommentBeforeReply=function(ID,level){var i=0;for(;i<Self.comments.length;i++){if(Self.comments[i].id==ID.substr(1)){break;}}
i=Self.getLastCommentIndex(i,level);i--;return Self.comments[i].id;};this.getLastCommentIndex=function(i,level){for(;i<Self.comments.length;i++){if(Self.comments[i].level<level){break;}}
return i;};this.getLastReply=function(parentNumber){res=$([]);$.fn.reverse=[].reverse;$("li a:contains('#"+parentNumber+"')").reverse().each(function(){if($(this).html()=='#'+parentNumber&&res.length==0){res=$(this).parent().next();}});return res;};this.addAfterComment=function(commentID,commentReply){for(i=0;i<Self.comments.length;i++){if(Self.comments[i].id==commentID){commentReply.page=Self.comments[i].page;Self.comments.splice(i+1,0,commentReply);}}};this.restrictLevels=function(){$("li.reply-3").find("div.comment-reply").remove();};this.skipCommentParent=function(){if(Self.tab!='cronologico'){Self.tab='cronologico';commentId=$(this).attr('href').substr(2);Self.pageNum=Self.getCommentPage(commentId);Self.hash="#c"+commentId;Self.renderComments();Self.highlightChronologicoTab();}
return true;};this.getCommentPage=function(commentId){page=1;for(i in Self.comments){if(Self.comments[i].id==commentId){page=Self.comments[i].page;}}
return page;};this.highlightChronologicoTab=function(){$("#sub-tabs ul li a").removeClass();$("#sub-tabs ul li a:first").addClass('current');}
this.statusBadgeUpdate=function(commentID,karmaLevel){if(karmaLevel=='normal'||karmaLevel=='flojo'||karmaLevel=='irrelevante'){$('#status'+commentID).html('');$('#status'+commentID).parent('.status-badge').hide();$('#status'+commentID).parent().removeClass('status-badge');}else{$('#status'+commentID).html(karmaLevel);$('#status'+commentID).parent().addClass('status-badge');$('#status'+commentID).parent('.status-badge').show();}}};if(!window.FB)FB={_apiKey:null,_session:null,_userStatus:'unknown',_logging:true,_domain:{api:'https://api.facebook.com/',cdn:(window.location.protocol=='https:'?'https://s-static.ak.fbcdn.net/':'http://static.ak.fbcdn.net/'),graph:'https://graph.facebook.com/',www:window.location.protocol+'//www.facebook.com/'},_locale:null,_localeIsRtl:false,copy:function(d,c,b,e){for(var a in c)if(b||typeof d[a]==='undefined')d[a]=e?e(c[a]):c[a];return d;},create:function(c,h){var e=window.FB,d=c?c.split('.'):[],a=d.length;for(var b=0;b<a;b++){var g=d[b];var f=e[g];if(!f){f=(h&&b+1==a)?h:{};e[g]=f;}e=f;}return e;},provide:function(c,b,a){return FB.copy(typeof c=='string'?FB.create(c):c,b,a);},guid:function(){return'f'+(Math.random()*(1<<30)).toString(16).replace('.','');},log:function(a){if(FB._logging)if(window.Debug&&window.Debug.writeln){window.Debug.writeln(a);}else if(window.console)window.console.log(a);if(FB.Event)FB.Event.fire('fb.log',a);},$:function(a){return document.getElementById(a);}};FB.provide('Array',{indexOf:function(a,c){if(a.indexOf)return a.indexOf(c);var d=a.length;if(d)for(var b=0;b<d;b++)if(a[b]===c)return b;return-1;},merge:function(c,b){for(var a=0;a<b.length;a++)if(FB.Array.indexOf(c,b[a])<0)c.push(b[a]);return c;},filter:function(a,c){var b=[];for(var d=0;d<a.length;d++)if(c(a[d]))b.push(a[d]);return b;},keys:function(c,d){var a=[];for(var b in c)if(d||c.hasOwnProperty(b))a.push(b);return a;},map:function(a,d){var c=[];for(var b=0;b<a.length;b++)c.push(d(a[b]));return c;},forEach:function(c,a,f){if(!c)return;if(Object.prototype.toString.apply(c)==='[object Array]'||(!(c instanceof Function)&&typeof c.length=='number')){if(c.forEach){c.forEach(a);}else for(var b=0,e=c.length;b<e;b++)a(c[b],b,c);}else for(var d in c)if(f||c.hasOwnProperty(d))a(c[d],d,c);}});FB.provide('QS',{encode:function(c,d,a){d=d===undefined?'&':d;a=a===false?function(e){return e;}:encodeURIComponent;var b=[];FB.Array.forEach(c,function(f,e){if(f!==null&&typeof f!='undefined')b.push(a(e)+'='+a(f));});b.sort();return b.join(d);},decode:function(f){var a=decodeURIComponent,d={},e=f.split('&'),b,c;for(b=0;b<e.length;b++){c=e[b].split('=',2);if(c&&c[0])d[a(c[0])]=a(c[1]);}return d;}});FB.provide('Content',{_root:null,_hiddenRoot:null,_callbacks:{},append:function(a,c){if(!c)if(!FB.Content._root){FB.Content._root=c=FB.$('fb-root');if(!c){FB.log('The "fb-root" div has not been created.');return;}else c.className+=' fb_reset';}else c=FB.Content._root;if(typeof a=='string'){var b=document.createElement('div');c.appendChild(b).innerHTML=a;return b;}else return c.appendChild(a);},appendHidden:function(a){if(!FB.Content._hiddenRoot){var b=document.createElement('div'),c=b.style;c.position='absolute';c.top='-10000px';c.width=c.height=0;FB.Content._hiddenRoot=FB.Content.append(b);}return FB.Content.append(a,FB.Content._hiddenRoot);},insertIframe:function(e){e.id=e.id||FB.guid();e.name=e.name||FB.guid();var a=FB.guid(),f=false,d=false;FB.Content._callbacks[a]=function(){if(f&&!d){d=true;e.onload&&e.onload(e.root.firstChild);}};if(document.attachEvent){var b=('<iframe'+' id="'+e.id+'"'+' name="'+e.name+'"'+(e.className?' class="'+e.className+'"':'')+' style="border:none;'+(e.width?'width:'+e.width+'px;':'')+(e.height?'height:'+e.height+'px;':'')+'"'+' src="'+e.url+'"'+' frameborder="0"'+' scrolling="no"'+' allowtransparency="true"'+' onload="FB.Content._callbacks.'+a+'()"'+'></iframe>');e.root.innerHTML='<iframe src="javascript:false"'+' frameborder="0"'+' scrolling="no"'+' style="height:1px"></iframe>';f=true;window.setTimeout(function(){e.root.innerHTML=b;},0);}else{var c=document.createElement('iframe');c.id=e.id;c.name=e.name;c.onload=FB.Content._callbacks[a];c.style.border='none';c.style.overflow='hidden';if(e.className)c.className=e.className;if(e.height)c.style.height=e.height+'px';if(e.width)c.style.width=e.width+'px';e.root.appendChild(c);f=true;c.src=e.url;}},postTarget:function(b){var a=document.createElement('form');a.action=b.url;a.target=b.target;a.method='POST';FB.Content.appendHidden(a);FB.Array.forEach(b.params,function(e,d){if(e!==null&&e!==undefined){var c=document.createElement('input');c.name=d;c.value=e;a.appendChild(c);}});a.submit();a.parentNode.removeChild(a);}});FB.provide('Flash',{_minVersions:[[9,0,159,0],[10,0,22,87]],_swfPath:'swf/XdComm.swf',_callbacks:[],init:function(){if(FB.Flash._init)return;FB.Flash._init=true;window.FB_OnFlashXdCommReady=function(){FB.Flash._ready=true;for(var d=0,e=FB.Flash._callbacks.length;d<e;d++)FB.Flash._callbacks[d]();FB.Flash._callbacks=[];};var a=!!document.attachEvent,c=FB._domain.cdn+FB.Flash._swfPath,b=('<object '+'type="application/x-shockwave-flash" '+'id="XdComm" '+(a?'name="XdComm" ':'')+(a?'':'data="'+c+'" ')+(a?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ':'')+'allowscriptaccess="always">'+'<param name="movie" value="'+c+'"></param>'+'<param name="allowscriptaccess" value="always"></param>'+'</object>');FB.Content.appendHidden(b);},hasMinVersion:function(){if(typeof FB.Flash._hasMinVersion==='undefined'){var k,a,b,j=[];try{k=new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');}catch(x){if(navigator.mimeTypes.length>0){var d='application/x-shockwave-flash';if(navigator.mimeTypes[d].enabledPlugin){var f='Shockwave Flash';k=(navigator.plugins[f+' 2.0']||navigator.plugins[f]).description;}}}if(k){var h=k.replace(/\D+/g,',').match(/^,?(.+),?$/)[1].split(',');for(a=0,b=h.length;a<b;a++)j.push(parseInt(h[a],10));}FB.Flash._hasMinVersion=false;majorVersion:for(a=0,b=FB.Flash._minVersions.length;a<b;a++){var i=FB.Flash._minVersions[a];if(i[0]!=j[0])continue;for(var c=1,e=i.length,g=j.length;(c<e&&c<g);c++)if(j[c]<i[c]){FB.Flash._hasMinVersion=false;continue majorVersion;}else{FB.Flash._hasMinVersion=true;if(j[c]>i[c])break majorVersion;}};}return FB.Flash._hasMinVersion;},onReady:function(a){FB.Flash.init();if(FB.Flash._ready){window.setTimeout(a,0);}else FB.Flash._callbacks.push(a);}});if(!this.JSON)this.JSON={};(function(){function f(n){return n<10?'0'+n:n;}if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function')value=value.toJSON(key);if(typeof rep==='function')value=rep.call(holder,key,value);switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value)return'null';gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1)partial[i]=str(i,value)||'null';v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v)partial.push(quote(k)+(gap?': ':':')+v);}}}else for(k in value)if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v)partial.push(quote(k)+(gap?': ':':')+v);}v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}if(typeof JSON.stringify!=='function')JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1)indent+=' ';}else if(typeof space==='string')indent=space;rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number'))throw new Error('JSON.stringify');return str('',{'':value});};if(typeof JSON.parse!=='function')JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object')for(k in value)if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else delete value[k];}return reviver.call(holder,key,value);}cx.lastIndex=0;if(cx.test(text))text=text.replace(cx,function(a){return'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}throw new SyntaxError('JSON.parse');};}());FB.provide('JSON',{stringify:function(a){if(window.Prototype&&Object.toJSON){return Object.toJSON(a);}else return JSON.stringify(a);},parse:function(a){return JSON.parse(a);},flatten:function(c){var a={};for(var b in c)if(c.hasOwnProperty(b)){var d=c[b];if(null===d||undefined===d){continue;}else if(typeof d=='string'){a[b]=d;}else a[b]=FB.JSON.stringify(d);}return a;}});FB.provide('',{api:function(){if(typeof arguments[0]==='string'){FB.ApiServer.graph.apply(FB.ApiServer,arguments);}else FB.ApiServer.rest.apply(FB.ApiServer,arguments);}});FB.provide('ApiServer',{METHODS:['get','post','delete','put'],_callbacks:{},graph:function(){var a=Array.prototype.slice.call(arguments),f=a.shift(),d=a.shift(),c,e,b;while(d){var g=typeof d;if(g==='string'&&!c){c=d.toLowerCase();}else if(g==='function'&&!b){b=d;}else if(g==='object'&&!e){e=d;}else{FB.log('Invalid argument passed to FB.api(): '+d);return;}d=a.shift();}c=c||'get';e=e||{};if(f[0]==='/')f=f.substr(1);if(FB.Array.indexOf(FB.ApiServer.METHODS,c)<0){FB.log('Invalid method passed to FB.api(): '+c);return;}FB.ApiServer.oauthRequest('graph',f,c,e,b);},rest:function(c,a){if(FB.Auth&&c.method.toLowerCase()==='auth.revokeauthorization'){var b=a;a=function(d){if(d===true)FB.Auth.setSession(null,'notConnected');b&&b(d);};}c.format='json';c.api_key=FB._apiKey;FB.ApiServer.oauthRequest('api','restserver.php','get',c,a);},oauthRequest:function(b,e,c,d,a){if(FB._session&&FB._session.access_token&&!d.access_token)d.access_token=FB._session.access_token;d.sdk='joey';try{FB.ApiServer.jsonp(b,e,c,FB.JSON.flatten(d),a);}catch(x){if(FB.Flash.hasMinVersion()){FB.ApiServer.flash(b,e,c,FB.JSON.flatten(d),a);}else throw new Error('Flash is required for this API call.');}},jsonp:function(b,f,d,e,a){var c=FB.guid(),g=document.createElement('script');if(b==='graph'&&d!=='get')e.method=d;e.callback='FB.ApiServer._callbacks.'+c;var h=FB._domain[b]+f+'?'+FB.QS.encode(e);if(h.length>2000)throw new Error('JSONP only support a maximum of 2000 bytes of input.');FB.ApiServer._callbacks[c]=function(i){a&&a(i);delete FB.ApiServer._callbacks[c];g.parentNode.removeChild(g);};g.src=h;document.getElementsByTagName('head')[0].appendChild(g);},flash:function(b,e,c,d,a){if(!window.FB_OnXdHttpResult)window.FB_OnXdHttpResult=function(g,f){FB.ApiServer._callbacks[g](decodeURIComponent(f));};FB.Flash.onReady(function(){var h=FB._domain[b]+e,f=FB.QS.encode(d);if(c==='get'){if(h.length+f.length>2000){if(b==='graph')d.method='get';c='post';f=FB.QS.encode(d);}else{h+='?'+f;f='';}}else if(c!=='post'){if(b==='graph')d.method=c;c='post';f=FB.QS.encode(d);}var g=document.XdComm.sendXdHttpRequest(c.toUpperCase(),h,f,null);FB.ApiServer._callbacks[g]=function(i){a&&a(FB.JSON.parse(i));delete FB.ApiServer._callbacks[g];};});}});FB.provide('EventProvider',{subscribers:function(){if(!this._subscribersMap)this._subscribersMap={};return this._subscribersMap;},subscribe:function(b,a){var c=this.subscribers();if(!c[b]){c[b]=[a];}else c[b].push(a);},unsubscribe:function(b,a){var c=this.subscribers()[b];FB.Array.forEach(c,function(e,d){if(e==a)c[d]=null;});},monitor:function(d,a){if(!a()){var b=this,c=function(){if(a.apply(a,arguments))b.unsubscribe(d,c);};this.subscribe(d,c);}},clear:function(a){delete this.subscribers()[a];},fire:function(){var a=Array.prototype.slice.call(arguments),b=a.shift();FB.Array.forEach(this.subscribers()[b],function(c){if(c)c.apply(this,a);});}});FB.provide('Event',FB.EventProvider);FB.provide('Intl',{_punctCharClass:('['+'.!?'+'\u3002'+'\uFF01'+'\uFF1F'+'\u0964'+'\u2026'+'\u0EAF'+'\u1801'+'\u0E2F'+'\uFF0E'+']'),_endsInPunct:function(a){if(typeof a!='string')return false;return a.match(new RegExp(FB.Intl._punctCharClass+'['+')"'+"'"+'\u00BB'+'\u0F3B'+'\u0F3D'+'\u2019'+'\u201D'+'\u203A'+'\u3009'+'\u300B'+'\u300D'+'\u300F'+'\u3011'+'\u3015'+'\u3017'+'\u3019'+'\u301B'+'\u301E'+'\u301F'+'\uFD3F'+'\uFF07'+'\uFF09'+'\uFF3D'+'\s'+']*$'));},_tx:function(d,a){if(a!==undefined)if(typeof a!='object'){FB.log('The second arg to FB.Intl._tx() must be an Object for '+'tx('+d+', ...)');}else{var c;for(var b in a)if(a.hasOwnProperty(b)){if(FB.Intl._endsInPunct(a[b])){c=new RegExp('\{'+b+'\}'+FB.Intl._punctCharClass+'*','g');}else c=new RegExp('\{'+b+'\}','g');d=d.replace(c,a[b]);}}return d;},tx:function(b,a){function c(e,d){void(0);}if(!FB.Intl._stringTable)return null;return FBIntern.Intl._tx(FB.Intl._stringTable[b],a);}});FB.provide('String',{trim:function(a){return a.replace(/^\s*|\s*$/g,'');},format:function(a){if(!FB.String.format._formatRE)FB.String.format._formatRE=/(\{[^\}^\{]+\})/g;var b=arguments;return a.replace(FB.String.format._formatRE,function(e,d){var c=parseInt(d.substr(1),10),f=b[c+1];if(f===null||f===undefined)return'';return f.toString();});},quote:function(c){var a=/["\\\x00-\x1f\x7f-\x9f]/g,b={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};return a.test(c)?'"'+c.replace(a,function(d){var e=b[d];if(e)return e;e=d.charCodeAt();return'\\u00'+Math.floor(e/16).toString(16)+(e%16).toString(16);})+'"':'"'+c+'"';}});FB.provide('Dom',{containsCss:function(c,a){var b=' '+c.className+' ';return b.indexOf(' '+a+' ')>=0;},addCss:function(b,a){if(!FB.Dom.containsCss(b,a))b.className=b.className+' '+a;},removeCss:function(b,a){if(FB.Dom.containsCss(b,a)){b.className=b.className.replace(a,'');FB.Dom.removeCss(b,a);}},getStyle:function(a,c){var d=false,b=a.style;if(c=='opacity'){if(b.opacity)return b.opacity*100;if(b.MozOpacity)return b.MozOpacity*100;if(b.KhtmlOpacity)return b.KhtmlOpacity*100;if(b.filters)return b.filters.alpha.opacity;return 0;}else if(a.currentStyle){FB.Array.forEach(/\-([a-z])/.exec(c),function(e){c=c.replace('-'+e,e.toUpperCase());});d=a.currentStyle[c];}else{FB.Array.forEach(/([A-Z])/.exec(c),function(e){c=c.replace(e,'-'+e.toLowerCase());});if(window.getComputedStyle){d=document.defaultView.getComputedStyle(a,null).getPropertyValue(c);if(c=='background-position-y'||c=='background-position-x')if(d=='top'||d=='left')d='0px';}}return d;},setStyle:function(a,c,d){var b=a.style;if(c=='opacity'){if(d>=100)d=99.999;if(d<0)d=0;b.opacity=d/100;b.MozOpacity=d/100;b.KhtmlOpacity=d/100;if(b.filters)b.filters.alpha.opacity=d;}else b[c]=d;},addScript:function(b){var a=document.createElement('script');a.type="text/javascript";a.src=b;return document.getElementsByTagName('HEAD')[0].appendChild(a);},addCssRules:function(d,b){if(!FB.Dom._cssRules)FB.Dom._cssRules={};var a=true;FB.Array.forEach(b,function(e){if(!(e in FB.Dom._cssRules)){a=false;FB.Dom._cssRules[e]=true;}});if(a)return;if(FB.Dom.getBrowserType()!='ie'){var c=document.createElement('style');c.type='text/css';c.textContent=d;document.getElementsByTagName('HEAD')[0].appendChild(c);}else try{document.createStyleSheet().cssText=d;}catch(exc){if(document.styleSheets[0])document.styleSheets[0].cssText+=d;}},getBrowserType:function(){if(!FB.Dom._browserType){var d=window.navigator.userAgent.toLowerCase(),b=['msie','firefox','safari','gecko'],c=['ie','mozilla','safari','mozilla'];for(var a=0;a<b.length;a++)if(d.indexOf(b[a])>=0){FB.Dom._browserType=c[a];break;}}return FB.Dom._browserType;},getViewportInfo:function(){var a=(document.documentElement&&document.compatMode=='CSS1Compat')?document.documentElement:document.body;return{scrollTop:a.scrollTop,scrollLeft:a.scrollLeft,width:self.innerWidth?self.innerWidth:a.clientWidth,height:self.innerHeight?self.innerHeight:a.clientHeight};},ready:function(a){if(FB.Dom._isReady){a();}else FB.Event.subscribe('dom.ready',a);}});(function(){function domReady(){FB.Dom._isReady=true;FB.Event.fire('dom.ready');FB.Event.clear('dom.ready');}if(FB.Dom._isReady||document.readyState=='complete')return domReady();if(document.addEventListener){document.addEventListener('DOMContentLoaded',domReady,false);}else if(document.attachEvent)document.attachEvent('onreadystatechange',domReady);if(FB.Dom.getBrowserType()=='ie'&&window===top)(function(){try{document.documentElement.doScroll('left');}catch(error){setTimeout(arguments.callee,0);return;}domReady();})();var oldonload=window.onload;window.onload=function(){domReady();if(oldonload)if(typeof oldonload=='string'){eval(oldonload);}else oldonload();};})();FB.provide('Dialog',{_loaderEl:null,_stack:[],_active:null,_findRoot:function(a){while(a){if(FB.Dom.containsCss(a,'fb_dialog'))return a;a=a.parentNode;}},_showLoader:function(a){if(!FB.Dialog._loaderEl)FB.Dialog._loaderEl=FB.Dialog._findRoot(FB.Dialog.create({content:('<div class="fb_dialog_loader">'+FB.Intl._tx("Cargando...")+'<a id="fb_dialog_loader_close"></a>'+'</div>')}));var b=FB.$('fb_dialog_loader_close');if(a){FB.Dom.removeCss(b,'fb_hidden');b.onclick=function(){FB.Dialog._hideLoader();a();};}else{FB.Dom.addCss(b,'fb_hidden');b.onclick=null;}FB.Dialog._makeActive(FB.Dialog._loaderEl);},_hideLoader:function(){if(FB.Dialog._loaderEl&&FB.Dialog._loaderEl==FB.Dialog._active)FB.Dialog._loaderEl.style.top='-10000px';},_makeActive:function(b){FB.Dialog._lowerActive();var a={width:parseInt(b.offsetWidth,10),height:parseInt(b.offsetHeight,10)},e=FB.Dom.getViewportInfo(),c=(e.scrollLeft+(e.width-a.width)/2),d=(e.scrollTop+(e.height-a.height)/2.5);b.style.left=(c>0?c:0)+'px';b.style.top=(d>0?d:0)+'px';FB.Dialog._active=b;},_lowerActive:function(){if(!FB.Dialog._active)return;FB.Dialog._active.style.top='-10000px';FB.Dialog._active=null;},_removeStacked:function(a){FB.Dialog._stack=FB.Array.filter(FB.Dialog._stack,function(b){return b!=a;});},create:function(e){e=e||{};if(e.loader)FB.Dialog._showLoader(e.onClose);var d=document.createElement('div'),c=document.createElement('div'),a='fb_dialog';if(e.closeIcon&&e.onClose){var b=document.createElement('a');b.className='fb_dialog_close_icon';b.onclick=e.onClose;d.appendChild(b);}if(FB.Dom.getBrowserType()=='ie'){a+=' fb_dialog_legacy';FB.Array.forEach(['vert_left','vert_right','horiz_top','horiz_bottom','top_left','top_right','bottom_left','bottom_right'],function(f){var g=document.createElement('span');g.className='fb_dialog_'+f;d.appendChild(g);});}else a+=' fb_dialog_advanced';if(e.content)FB.Content.append(e.content,c);d.className=a;c.className='fb_dialog_content';d.appendChild(c);FB.Content.append(d);if(e.visible)FB.Dialog.show(d);return c;},show:function(a){a=FB.Dialog._findRoot(a);if(a){FB.Dialog._removeStacked(a);FB.Dialog._hideLoader();FB.Dialog._makeActive(a);FB.Dialog._stack.push(a);}},remove:function(a){a=FB.Dialog._findRoot(a);if(a){var b=FB.Dialog._active==a;FB.Dialog._removeStacked(a);if(b)if(FB.Dialog._stack.length>0){FB.Dialog.show(FB.Dialog._stack.pop());}else FB.Dialog._lowerActive();window.setTimeout(function(){a.parentNode.removeChild(a);},3000);}}});FB.provide('XD',{_origin:null,_transport:null,_callbacks:{},_forever:{},init:function(){if(FB.XD._origin)return;if(window.addEventListener&&window.postMessage){FB.XD._origin=(window.location.protocol+'//'+window.location.host+'/'+FB.guid());FB.XD.PostMessage.init();FB.XD._transport='postmessage';}else if(FB.Flash.hasMinVersion()){FB.XD._origin=(window.location.protocol+'//'+document.domain+'/'+FB.guid());FB.XD.Flash.init();FB.XD._transport='flash';}else FB.XD._transport='fragment';},resolveRelation:function(b){var g,d,f=b.split('.'),e=window;for(var a=0,c=f.length;a<c;a++){g=f[a];if(g==='opener'||g==='parent'||g==='top'){e=e[g];}else if(d=/^frames\[['"]?([a-zA-Z0-9-_]+)['"]?\]$/.exec(g)){e=e.frames[d[1]];}else throw new SyntaxError('Malformed id to resolve: '+b+', pt: '+g);}return e;},handler:function(a,e,b){FB.XD.init();var f=FB._domain.cdn+'connect/xd_proxy.php#?=&',c=FB.guid();if(FB.XD._transport=='fragment'){f=window.location.toString();var d=f.indexOf('#');if(d>0)f=f.substr(0,d);f+=f.indexOf('?')<0?'?':'&';f+='fb_xd_bust#?=&'+FB.XD.Fragment._magic+'&';}if(b)FB.XD._forever[c]=true;FB.XD._callbacks[c]=a;return f+FB.QS.encode({cb:c,origin:FB.XD._origin,relation:e||'opener',transport:FB.XD._transport});},recv:function(b){if(typeof b=='string')b=FB.QS.decode(b);var a=FB.XD._callbacks[b.cb];if(!FB.XD._forever[b.cb])delete FB.XD._callbacks[b.cb];a&&a(b);},PostMessage:{init:function(){var a=FB.XD.PostMessage.onMessage;window.addEventListener?window.addEventListener('message',a,false):window.attachEvent('onmessage',a);},onMessage:function(event){FB.XD.recv(event.data);}},Flash:{init:function(){FB.Flash.onReady(function(){document.XdComm.postMessage_init('FB.XD.Flash.onMessage',FB.XD._origin);});},onMessage:function(a){FB.XD.recv(decodeURIComponent(a));}},Fragment:{_magic:'fb_xd_fragment',checkAndDispatch:function(){var b=window.location.toString(),a=b.substr(b.indexOf('#')+1),c=a.indexOf(FB.XD.Fragment._magic);if(c>0){FB.init=FB.getLoginStatus=FB.api=function(){};document.body.style.display='none';a=a.substr(c+FB.XD.Fragment._magic.length);var d=FB.QS.decode(a);var e=FB.XD.resolveRelation(d.relation);e.FB.XD.recv(a);}}}});FB.XD.Fragment.checkAndDispatch();FB.provide('',{ui:function(e,b){if(!e.method){FB.log('"method" is a required parameter for FB.ui().');return;}var a=FB.UIServer.prepareCall(e,b);if(!a)return;var d=a.params.display;if(d=='dialog')d='iframe';var c=FB.UIServer[d];if(!c){FB.log('"display" must be one of "popup", "iframe" or "hidden".');return;}c(a);}});FB.provide('UIServer',{Methods:{},_active:{},_defaultCb:{},_resultToken:'"xxRESULTTOKENxx"',genericTransform:function(a){if(a.params.display=='dialog'){a.params.display='iframe';a.params.channel=FB.UIServer._xdChannelHandler(a.id,'parent.parent');}return a;},prepareCall:function(f,b){var e=FB.UIServer.Methods[f.method.toLowerCase()],d=FB.guid();if(!e){FB.log('"'+f.method+'" is an unknown method.');return;}FB.copy(f,{api_key:FB._apiKey,display:FB._session?'dialog':'popup',locale:FB._locale,sdk:'joey',session_key:FB._session&&FB._session.session_key});if(!FB._session&&f.display=='dialog'&&!e.loggedOutIframe){FB.log('"dialog" mode can only be used when the user is connected.');f.display='popup';}var a={cb:b,id:d,size:e.size||{},url:FB._domain.www+e.url,params:f};if(e.transform){a=e.transform(a);if(!a)return;}var g=a.params.display=='popup'?'opener':'parent';if(!(a.id in FB.UIServer._defaultCb)&&!('next'in a.params))a.params.next=FB.UIServer._xdResult(a.cb,a.id,g,true);if(g==='parent')a.params.channel_url=FB.UIServer._xdChannelHandler(d,'parent.parent');var c=FB.QS.encode(FB.JSON.flatten(a.params));if((a.url+c).length>2000){a.post=true;}else if(c)a.url+='?'+c;return a;},popup:function(a){var g=typeof window.screenX!='undefined'?window.screenX:window.screenLeft,h=typeof window.screenY!='undefined'?window.screenY:window.screenTop,f=typeof window.outerWidth!='undefined'?window.outerWidth:document.body.clientWidth,e=typeof window.outerHeight!='undefined'?window.outerHeight:(document.body.clientHeight-22),j=a.size.width,c=a.size.height,d=parseInt(g+((f-j)/2),10),i=parseInt(h+((e-c)/2.5),10),b=('width='+j+',height='+c+',left='+d+',top='+i);if(a.post){FB.UIServer._active[a.id]=window.open('about:blank',a.id,b);FB.Content.postTarget({url:a.url,target:a.id,params:a.params});}else FB.UIServer._active[a.id]=window.open(a.url,a.id,b);if(a.id in FB.UIServer._defaultCb)FB.UIServer._popupMonitor();},hidden:function(a){a.className='FB_UI_Hidden';a.root=FB.Content.appendHidden('');FB.UIServer._insertIframe(a);},iframe:function(a){a.className='FB_UI_Dialog';a.root=FB.Dialog.create({onClose:function(){FB.UIServer._triggerDefault(a.id);},loader:true,closeIcon:true});FB.Dom.addCss(a.root,'fb_dialog_iframe');FB.UIServer._insertIframe(a);},_insertIframe:function(a){if(a.post){FB.Content.insertIframe({url:'about:blank',root:a.root,className:a.className,width:a.size.width,height:a.size.height,onload:function(b){FB.UIServer._active[a.id]=b;FB.Content.postTarget({url:a.url,target:b.name,params:a.params});}});}else FB.Content.insertIframe({url:a.url,root:a.root,className:a.className,width:a.size.width,height:a.size.height,onload:function(b){FB.UIServer._active[a.id]=b;}});},_triggerDefault:function(a){FB.UIServer._xdRecv({frame:a},FB.UIServer._defaultCb[a]||function(){});},_popupMonitor:function(){var a;for(var b in FB.UIServer._active)if(FB.UIServer._active.hasOwnProperty(b)&&b in FB.UIServer._defaultCb){var c=FB.UIServer._active[b];try{if(c.tagName)continue;}catch(x){}try{if(c.closed){FB.UIServer._triggerDefault(b);}else a=true;}catch(y){}}if(a&&!FB.UIServer._popupInterval){FB.UIServer._popupInterval=window.setInterval(FB.UIServer._popupMonitor,100);}else if(!a&&FB.UIServer._popupInterval){window.clearInterval(FB.UIServer._popupInterval);FB.UIServer._popupInterval=null;}},_xdChannelHandler:function(a,b){return FB.XD.handler(function(c){var d=FB.UIServer._active[a];if(!d)return;if(c.type=='resize'){if(c.height)d.style.height=c.height+'px';if(c.width)d.style.width=c.width+'px';FB.Dialog.show(d);}},b,true);},_xdNextHandler:function(a,b,d,c){if(c)FB.UIServer._defaultCb[b]=a;return FB.XD.handler(function(e){FB.UIServer._xdRecv(e,a);},d)+'&frame='+b;},_xdRecv:function(b,a){var c=FB.UIServer._active[b.frame];try{if(FB.Dom.containsCss(c,'FB_UI_Hidden')){window.setTimeout(function(){c.parentNode.parentNode.removeChild(c.parentNode);},3000);}else if(FB.Dom.containsCss(c,'FB_UI_Dialog'))FB.Dialog.remove(c);}catch(x){}try{if(c.close){c.close();FB.UIServer._popupCount--;}}catch(y){}delete FB.UIServer._active[b.frame];delete FB.UIServer._defaultCb[b.frame];a(b);},_xdResult:function(a,b,d,c){return(FB.UIServer._xdNextHandler(function(e){a&&a(e.result&&e.result!=FB.UIServer._resultToken&&JSON.parse(e.result));},b,d,c)+'&result='+encodeURIComponent(FB.UIServer._resultToken));}});FB.provide('',{getLoginStatus:function(a,b){if(!FB._apiKey){FB.log('FB.getLoginStatus() called before calling FB.init().');return;}if(a)if(!b&&FB.Auth._loadState=='loaded'){a({status:FB._userStatus,session:FB._session});return;}else FB.Event.subscribe('FB.loginStatus',a);if(!b&&FB.Auth._loadState=='loading')return;FB.Auth._loadState='loading';var c=function(d){FB.Auth._loadState='loaded';FB.Event.fire('FB.loginStatus',d);FB.Event.clear('FB.loginStatus');};FB.ui({method:'auth.status',display:'hidden'},c);},getSession:function(){return FB._session;},login:function(a,b){b=FB.copy({method:'auth.login',display:'popup'},b||{});FB.ui(b,a);},logout:function(a){FB.ui({method:'auth.logout',display:'hidden'},a);}});FB.provide('Auth',{_callbacks:[],setSession:function(e,g){var b=!FB._session&&e,c=FB._session&&!e,a=FB._session&&e&&FB._session.uid!=e.uid,f=b||c||(FB._session&&e&&FB._session.session_key!=e.session_key),h=g!=FB._userStatus;var d={session:e,status:g};FB._session=e;FB._userStatus=g;if(f&&FB.Cookie&&FB.Cookie.getEnabled())FB.Cookie.set(e);if(h)FB.Event.fire('auth.statusChange',d);if(c||a)FB.Event.fire('auth.logout',d);if(b||a)FB.Event.fire('auth.login',d);if(f)FB.Event.fire('auth.sessionChange',d);return d;},xdHandler:function(a,b,f,c,e,d){return FB.UIServer._xdNextHandler(function(g){try{d=FB.JSON.parse(g.session);}catch(x){}var h=FB.Auth.setSession(d||null,e);h.perms=(g.result!='xxRESULTTOKENxx'&&g.result||'');a&&a(h);},b,f,c)+'&result=xxRESULTTOKENxx';}});FB.provide('UIServer.Methods',{'auth.login':{size:{width:627,height:326},url:'login.php',transform:function(a){if(!FB._apiKey){FB.log('FB.login() called before calling FB.init().');return;}if(FB._session&&!a.params.perms){FB.log('FB.login() called when user is already connected.');a.cb&&a.cb({status:FB._userStatus,session:FB._session});return;}var g=FB.Auth.xdHandler,c=a.cb,d=a.id,f=FB._session,b=g(c,d,'opener',true,FB._userStatus,f),e=g(c,d,'opener',false,'connected',f);FB.copy(a.params,{cancel_url:b,channel_url:window.location.toString(),next:e,fbconnect:1,req_perms:a.params.perms,enable_profile_selector:a.params.enable_profile_selector,profile_selector_ids:a.params.profile_selector_ids,return_session:1,session_version:3,v:'1.0'});delete a.cb;delete a.params.perms;return a;}},'auth.logout':{url:'logout.php',transform:function(a){if(!FB._apiKey){FB.log('FB.logout() called before calling FB.init().');}else if(!FB._session){FB.log('FB.logout() called without a session.');}else{a.params.next=FB.Auth.xdHandler(a.cb,a.id,'parent',false,'unknown');return a;}}},'auth.status':{url:'extern/login_status.php',transform:function(a){var b=a.cb,c=a.id,d=FB.Auth.xdHandler;delete a.cb;FB.copy(a.params,{no_session:d(b,c,'parent',false,'notConnected'),no_user:d(b,c,'parent',false,'unknown'),ok_session:d(b,c,'parent',false,'connected'),session_version:3});return a;}}});FB.provide('',{bind:function(){var a=Array.prototype.slice.call(arguments),c=a.shift(),b=a.shift();return function(){return c.apply(b,a.concat(Array.prototype.slice.call(arguments)));};},Class:function(b,a,d){if(FB.CLASSES[b])return FB.CLASSES[b];var c=a||function(){};c.prototype=d;c.prototype.bind=function(e){return FB.bind(e,this);};c.prototype.constructor=c;FB.create(b,c);FB.CLASSES[b]=c;return c;},subclass:function(d,b,c,e){if(FB.CLASSES[d])return FB.CLASSES[d];var a=FB.create(b);FB.copy(e,a.prototype);e._base=a;e._callBase=function(g){var f=Array.prototype.slice.call(arguments,1);return a.prototype[g].apply(this,f);};return FB.Class(d,c?c:function(){if(a.apply)a.apply(this,arguments);},e);},CLASSES:{}});FB.provide('Type',{isType:function(a,b){while(a)if(a.constructor===b||a===b){return true;}else a=a._base;return false;}});FB.Class('Obj',null,FB.copy({setProperty:function(a,b){if(FB.JSON.stringify(b)!=FB.JSON.stringify(this[a])){this[a]=b;this.fire(a,b);}}},FB.EventProvider));FB.subclass('Waitable','Obj',function(){},{set:function(a){this.setProperty('value',a);},error:function(a){this.fire("error",a);},wait:function(a,b){if(b)this.subscribe('error',b);this.monitor('value',this.bind(function(){if(this.value!==undefined){a(this.value);return true;}}));}});FB.subclass('Data.Query','Waitable',function(){if(!FB.Data.Query._c)FB.Data.Query._c=1;this.name='v_'+FB.Data.Query._c++;},{parse:function(a){var b=FB.String.format.apply(null,a),d=(/^select (.*?) from (\w+)\s+where (.*)$/i).exec(b);this.fields=this._toFields(d[1]);this.table=d[2];this.where=this._parseWhere(d[3]);for(var c=1;c<a.length;c++)if(FB.Type.isType(a[c],FB.Data.Query))a[c].hasDependency=true;return this;},toFql:function(){var a='select '+this.fields.join(',')+' from '+this.table+' where ';switch(this.where.type){case'unknown':a+=this.where.value;break;case'index':a+=this.where.key+'='+this._encode(this.where.value);break;case'in':if(this.where.value.length==1){a+=this.where.key+'='+this._encode(this.where.value[0]);}else a+=this.where.key+' in ('+FB.Array.map(this.where.value,this._encode).join(',')+')';break;}return a;},_encode:function(a){return typeof(a)=='string'?FB.String.quote(a):a;},toString:function(){return'#'+this.name;},_toFields:function(a){return FB.Array.map(a.split(','),FB.String.trim);},_parseWhere:function(s){var re=(/^\s*(\w+)\s*=\s*(.*)\s*$/i).exec(s),result,value,type='unknown';if(re){value=re[2];if(/^(["'])(?:\\?.)*?\1$/.test(value)){value=eval(value);type='index';}else if(/^\d+\.?\d*$/.test(value))type='index';}if(type=='index'){result={type:'index',key:re[1],value:value};}else result={type:'unknown',value:s};return result;}});FB.provide('Data',{query:function(c,a){var b=new FB.Data.Query().parse(arguments);FB.Data.queue.push(b);FB.Data._waitToProcess();return b;},waitOn:function(dependencies,callback){var result=new FB.Waitable(),count=dependencies.length;if(typeof(callback)=='string'){var s=callback;callback=function(args){return eval(s);};}FB.Array.forEach(dependencies,function(item){item.monitor('value',function(){var done=false;if(FB.Data._getValue(item)!==undefined){count--;done=true;}if(count===0){var value=callback(FB.Array.map(dependencies,FB.Data._getValue));result.set(value!==undefined?value:true);}return done;});});return result;},_getValue:function(a){return FB.Type.isType(a,FB.Waitable)?a.value:a;},_selectByIndex:function(a,d,b,e){var c=new FB.Data.Query();c.fields=a;c.table=d;c.where={type:'index',key:b,value:e};FB.Data.queue.push(c);FB.Data._waitToProcess();return c;},_waitToProcess:function(){if(FB.Data.timer<0)FB.Data.timer=setTimeout(FB.Data._process,10);},_process:function(){FB.Data.timer=-1;var c={},e=FB.Data.queue;FB.Data.queue=[];for(var a=0;a<e.length;a++){var b=e[a];if(b.where.type=='index'&&!b.hasDependency){FB.Data._mergeIndexQuery(b,c);}else c[b.name]=b;}var d={method:'fql.multiquery',queries:{}};FB.copy(d.queries,c,true,function(f){return f.toFql();});d.queries=FB.JSON.stringify(d.queries);FB.api(d,function(f){if(f.error_msg){FB.Array.forEach(c,function(g){g.error(Error(f.error_msg));});}else FB.Array.forEach(f,function(g){c[g.name].set(g.fql_result_set);});});},_mergeIndexQuery:function(a,d){var b=a.where.key,f=a.where.value;var e='index_'+a.table+'_'+b;var c=d[e];if(!c){c=d[e]=new FB.Data.Query();c.fields=[b];c.table=a.table;c.where={type:'in',key:b,value:[]};}FB.Array.merge(c.fields,a.fields);FB.Array.merge(c.where.value,[f]);c.wait(function(g){a.set(FB.Array.filter(g,function(h){return h[b]==f;}));});},timer:-1,queue:[]});FB.provide('Cookie',{_domain:null,_enabled:false,setEnabled:function(a){FB.Cookie._enabled=a;},getEnabled:function(){return FB.Cookie._enabled;},load:function(){var a=document.cookie.match('\\bfbs_'+FB._apiKey+'="([^;]*)\\b'),b;if(a){b=FB.QS.decode(a[1]);b.expires=parseInt(b.expires,10);FB.Cookie._domain=b.base_domain;}return b;},setRaw:function(c,b,a){document.cookie='fbs_'+FB._apiKey+'="'+c+'"'+(c&&b==0?'':'; expires='+new Date(b*1000).toGMTString())+'; path=/'+(a?'; domain=.'+a:'');FB.Cookie._domain=a;},set:function(a){a?FB.Cookie.setRaw(FB.QS.encode(a),a.expires,a.base_domain):FB.Cookie.clear();},clear:function(){FB.Cookie.setRaw('',0,FB.Cookie._domain);}});FB.provide('',{init:function(a){FB.copy(a,{logging:true});FB._apiKey=a.appId||a.apiKey;if(!a.logging&&window.location.toString().indexOf('fb_debug=1')<0)FB._logging=false;if(FB._apiKey){FB.Cookie.setEnabled(a.cookie);a.session=a.session||FB.Cookie.load();FB.Auth.setSession(a.session,a.session?'connected':'unknown');if(a.status)FB.getLoginStatus();}if(a.xfbml)window.setTimeout(function(){if(FB.XFBML)FB.Dom.ready(FB.XFBML.parse);},0);}});window.setTimeout(function(){if(window.fbAsyncInit)fbAsyncInit();},0);FB.provide('UIServer.Methods',{'friends.add':{size:{width:575,height:240},url:'connect/uiserver.php',transform:FB.UIServer.genericTransform},'stream.publish':{size:{width:575,height:240},url:'connect/prompt_feed.php',transform:function(a){var b=a.cb;a.cb=function(c){if(c)if(c.postId){c={post_id:c.postId};}else c=null;b&&b(c);};a.params.callback=FB.UIServer._xdResult(a.cb,a.id,a.params.display=='popup'?'opener':'parent',true);return a;}},'stream.share':{size:{width:575,height:380},url:'sharer.php',transform:function(a){if(!a.params.u)a.params.u=window.location.toString();return a;}},'fbml.dialog':{size:{width:575,height:300},url:'render_fbml.php',loggedOutIframe:true},'bookmark.add':{size:{width:460,height:226},url:'connect/uiserver.php',transform:FB.UIServer.genericTransform},'profile.addtab':{size:{width:460,height:226},url:'connect/uiserver.php',transform:FB.UIServer.genericTransform}});FB.provide('',{share:function(a){FB.log('FB.share() has been deprecated. Please use FB.ui() instead.');FB.ui({display:'popup',method:'stream.share',u:a});},publish:function(b,a){FB.log('FB.publish() has been deprecated. Please use FB.ui() instead.');b=b||{};FB.ui(FB.copy({display:'popup',method:'stream.publish',preview:1},b||{}),a);},addFriend:function(b,a){FB.log('FB.addFriend() has been deprecated. Please use FB.ui() instead.');FB.ui({display:'popup',id:b,method:'friend.add'},a);}});FB.provide('Component',{loaded:{},loadedCss:{},onScriptLoaded:function(b){var a=b.length;for(var c=0;c<a;c++)FB.Component.loaded[b[c]]=true;if(FB.Loader._onCompLoaded)FB.Loader._onCompLoaded(b);}});FB.provide('Loader',{use:function(b,a){var c={comp:b,cb:a};if(FB.Loader._check(b)){a();return;}FB.Loader._reqs.push(c);FB.Loader._comps[b]=true;if(!FB.Loader._timer)FB.Loader._timer=setTimeout(function(){FB.Loader._timer=0;FB.Dom.addScript(FB.Loader._resourceUrl(FB.Array.keys(FB.Loader._comps),FB.Array.keys(FB.Component.loaded)));},0);},_resourceUrl:function(b,a){return FB._domain.cdn+'dynamic_loader/'+'?comps='+b.join(',')+'&exclude='+a.join(',');},_onCompLoaded:function(){var a=[];FB.Array.forEach(FB.Loader._reqs,function(c,b){if(c&&FB.Loader._check(c.comp))a.push([b,c.cb]);});FB.Array.forEach(a,function(b){delete FB.Loader._reqs[b[0]];});FB.Array.forEach(a,function(b){b[1]();});},_check:function(a){return FB.Component.loaded[a];},_reqs:[],_comps:{}});FB.provide('XFBML',{_renderTimeout:30000,parse:function(c,a){c=c||document.body;var b=1,d=function(){b--;if(b===0){a&&a();FB.Event.fire('xfbml.render');}};FB.Array.forEach(FB.XFBML._tagInfos,function(f){if(!f.xmlns)f.xmlns='fb';var g=FB.XFBML._getDomElements(c,f.xmlns,f.localName);for(var e=0;e<g.length;e++){b++;FB.XFBML._processElement(g[e],f,d);}});window.setTimeout(function(){if(b>0)FB.log(b+' XFBML tags failed to render in '+FB.XFBML._renderTimeout+'ms.');},FB.XFBML._renderTimeout);d();},registerTag:function(a){FB.XFBML._tagInfos.push(a);},_processElement:function(dom,tagInfo,cb){var element=dom._element;if(element){element.subscribe('render',cb);element.process();}else{var processor=function(){var fn=eval(tagInfo.className);if(tagInfo.className==='FB.XFBML.LoginButton'){var attr=dom.getAttribute('show-faces');if(attr&&FB.Array.indexOf(['true','1','yes','on'],attr.toLowerCase())>-1)fn=FB.XFBML.Login;}element=dom._element=new fn(dom);element.subscribe('render',cb);element.process();};if(FB.CLASSES[tagInfo.className.substr(3)]){processor();}else{var component=tagInfo.className.toLowerCase();FB.Loader.use(component,processor);}}},_getDomElements:function(b,e,d){var c=e+':'+d;switch(FB.Dom.getBrowserType()){case'mozilla':return b.getElementsByTagNameNS(document.body.namespaceURI,c);case'ie':try{var a=document.namespaces;if(a&&a[e])return b.getElementsByTagName(d);}catch(e){}return b.getElementsByTagName(c);default:return b.getElementsByTagName(c);}},_tagInfos:[{localName:'activity',className:'FB.XFBML.Activity'},{localName:'add-profile-tab',className:'FB.XFBML.AddProfileTab'},{localName:'bookmark',className:'FB.XFBML.Bookmark'},{localName:'comments',className:'FB.XFBML.Comments'},{localName:'connect-bar',className:'FB.XFBML.ConnectBar'},{localName:'fan',className:'FB.XFBML.Fan'},{localName:'like',className:'FB.XFBML.Like'},{localName:'like-box',className:'FB.XFBML.LikeBox'},{localName:'live-stream',className:'FB.XFBML.LiveStream'},{localName:'login',className:'FB.XFBML.Login'},{localName:'login-button',className:'FB.XFBML.LoginButton'},{localName:'facepile',className:'FB.XFBML.Facepile'},{localName:'name',className:'FB.XFBML.Name'},{localName:'profile-pic',className:'FB.XFBML.ProfilePic'},{localName:'recommendations',className:'FB.XFBML.Recommendations'},{localName:'serverfbml',className:'FB.XFBML.ServerFbml'},{localName:'share-button',className:'FB.XFBML.ShareButton'},{localName:'social-bar',className:'FB.XFBML.SocialBar'}]});(function(){try{if(document.namespaces&&!document.namespaces.item.fb)document.namespaces.add('fb');}catch(e){}}());FB.provide('XFBML',{set:function(b,c,a){FB.log('FB.XFBML.set() has been deprecated.');b.innerHTML=c;FB.XFBML.parse(b,a);}});FB.Class('XFBML.Element',function(a){this.dom=a;},FB.copy({getAttribute:function(b,a,c){var d=(this.dom.getAttribute(b)||this.dom.getAttribute(b.replace(/-/g,'_'))||this.dom.getAttribute(b.replace(/-/g,'')));return d?(c?c(d):d):a;},_getBoolAttribute:function(b,a){return this.getAttribute(b,a,function(c){c=c.toLowerCase();return c=='true'||c=='1'||c=='yes'||c=='on';});},_getPxAttribute:function(b,a){return this.getAttribute(b,a,function(c){var d=parseInt(c.replace('px',''),10);if(isNaN(d)){return a;}else return d;});},_getAttributeFromList:function(c,b,a){return this.getAttribute(c,b,function(d){d=d.toLowerCase();if(FB.Array.indexOf(a,d)>-1){return d;}else return b;});},isValid:function(){for(var a=this.dom;a;a=a.parentNode)if(a==document.body)return true;},clear:function(){this.dom.innerHTML='';}},FB.EventProvider));FB.subclass('XFBML.IframeWidget','XFBML.Element',null,{_showLoader:true,_refreshOnAuthChange:false,_allowReProcess:false,_visibleAfter:'load',getUrlBits:function(){throw new Error('Inheriting class needs to implement getUrlBits().');},setupAndValidate:function(){return true;},oneTimeSetup:function(){},getSize:function(){},getIframeName:function(){},getChannelUrl:function(){if(!this._channelUrl){var a=this;this._channelUrl=FB.XD.handler(function(b){a.fire('xd.'+b.type,b);},'parent.parent',true);}return this._channelUrl;},getIframeNode:function(){return this.dom.getElementsByTagName('iframe')[0];},process:function(a){if(this._done){if(!this._allowReProcess&&!a)return;this.clear();}else this._oneTimeSetup();this._done=true;if(!this.setupAndValidate()){this.fire('render');return;}if(this._showLoader)this._addLoader();FB.Dom.addCss(this.dom,'fb_iframe_widget');if(this._visibleAfter!='immediate'){FB.Dom.addCss(this.dom,'fb_hide_iframes');}else this.subscribe('iframe.onload',FB.bind(this.fire,this,'render'));var c=this.getSize()||{};var d=this._getURL()+'?'+FB.QS.encode(this._getQS());if(d.length>2000){d='about:blank';var b=FB.bind(function(){this._postRequest();this.unsubscribe('iframe.onload',b);},this);this.subscribe('iframe.onload',b);}FB.Content.insertIframe({url:d,root:this.dom.appendChild(document.createElement('span')),name:this.getIframeName(),height:c.height,width:c.width,onload:FB.bind(this.fire,this,'iframe.onload')});},_oneTimeSetup:function(){this.subscribe('xd.resize',FB.bind(this._handleResizeMsg,this));if(FB.getLoginStatus){this.subscribe('xd.refreshLoginStatus',FB.bind(FB.getLoginStatus,FB,function(){},true));this.subscribe('xd.logout',FB.bind(FB.logout,FB,function(){}));}if(this._refreshOnAuthChange)this._setupAuthRefresh();if(this._visibleAfter=='load')this.subscribe('iframe.onload',FB.bind(this._makeVisible,this));this.oneTimeSetup();},_makeVisible:function(){this._removeLoader();FB.Dom.removeCss(this.dom,'fb_hide_iframes');this.fire('render');},_setupAuthRefresh:function(){FB.getLoginStatus(FB.bind(function(b){var a=b.status;FB.Event.subscribe('auth.statusChange',FB.bind(function(c){if(!this.isValid())return;if(a=='unknown'||c.status=='unknown')this.process(true);a=c.status;},this));},this));},_handleResizeMsg:function(b){if(!this.isValid())return;var a=this.getIframeNode();a.style.height=b.height+'px';if(b.width)a.style.width=b.width+'px';a.style.border='none';this._makeVisible();},_addLoader:function(){if(!this._loaderDiv){FB.Dom.addCss(this.dom,'fb_iframe_widget_loader');this._loaderDiv=document.createElement('div');this._loaderDiv.className='FB_Loader';this.dom.appendChild(this._loaderDiv);}},_removeLoader:function(){if(this._loaderDiv){FB.Dom.removeCss(this.dom,'fb_iframe_widget_loader');if(this._loaderDiv.parentNode)this._loaderDiv.parentNode.removeChild(this._loaderDiv);this._loaderDiv=null;}},_getQS:function(){return FB.copy({api_key:FB._apiKey,locale:FB._locale,sdk:'joey',session_key:FB._session&&FB._session.session_key},this.getUrlBits().params);},_getURL:function(){return FB._domain.www+'plugins/'+this.getUrlBits().name+'.php';},_postRequest:function(){FB.Content.postTarget({url:this._getURL(),target:this.getIframeNode().name,params:this._getQS()});}});FB.subclass('XFBML.Activity','XFBML.IframeWidget',null,{_visibleAfter:'load',_refreshOnAuthChange:true,setupAndValidate:function(){this._attr={border_color:this.getAttribute('border-color'),colorscheme:this.getAttribute('color-scheme'),font:this.getAttribute('font'),header:this._getBoolAttribute('header'),height:this._getPxAttribute('height',300),recommendations:this._getBoolAttribute('recommendations'),site:this.getAttribute('site',location.hostname),width:this._getPxAttribute('width',300)};return true;},getSize:function(){return{width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return{name:'activity',params:this._attr};}});FB.subclass('XFBML.ButtonElement','XFBML.Element',null,{_allowedSizes:['icon','small','medium','large','xlarge'],onClick:function(){throw new Error('Inheriting class needs to implement onClick().');},setupAndValidate:function(){return true;},getButtonMarkup:function(){return this.getOriginalHTML();},getOriginalHTML:function(){return this._originalHTML;},process:function(){if(!('_originalHTML'in this))this._originalHTML=FB.String.trim(this.dom.innerHTML);if(!this.setupAndValidate()){this.fire('render');return;}var d=this._getAttributeFromList('size','medium',this._allowedSizes),a='',b='';if(d=='icon'){a='fb_button_simple';}else{var c=FB._localeIsRtl?'_rtl':'';b=this.getButtonMarkup();a='fb_button'+c+' fb_button_'+d+c;}this.dom.innerHTML=('<a class="'+a+'">'+'<span class="fb_button_text">'+b+'</span>'+'</a>');this.dom.firstChild.onclick=FB.bind(this.onClick,this);this.fire('render');}});FB.provide('Helper',{isUser:function(a){return a<2.2e+09||(a>=1e+14&&a<=100099999989999);},getLoggedInUser:function(){return FB._session?FB._session.uid:null;},upperCaseFirstChar:function(a){if(a.length>0){return a.substr(0,1).toUpperCase()+a.substr(1);}else return a;},getProfileLink:function(c,b,a){a=a||(c?FB._domain.www+'profile.php?id='+c.uid:null);if(a)b='<a class="fb_link" href="'+a+'">'+b+'</a>';return b;},invokeHandler:function(handler,scope,args){if(handler)if(typeof handler==='string'){eval(handler);}else if(handler.apply)handler.apply(scope,args||[]);}});FB.subclass('XFBML.AddProfileTab','XFBML.ButtonElement',null,{getButtonMarkup:function(){return FB.Intl._tx("agrega tabla al perfil de facebook");},onClick:function(){FB.ui({method:'profile.addtab'},this.bind(function(a){if(a.tab_added)FB.Helper.invokeHandler(this.getAttribute('on-add'),this);}));}});FB.subclass('XFBML.Bookmark','XFBML.ButtonElement',null,{getButtonMarkup:function(){return FB.Intl._tx("A\u00f1adir marcador en Facebook");},onClick:function(){FB.ui({method:'bookmark.add'},this.bind(function(a){if(a.bookmarked)FB.Helper.invokeHandler(this.getAttribute('on-add'),this);}));}});FB.subclass('XFBML.Comments','XFBML.IframeWidget',null,{_visibleAfter:'resize',_refreshOnAuthChange:true,setupAndValidate:function(){var a={channel_url:this.getChannelUrl(),css:this.getAttribute('css'),notify:this.getAttribute('notify'),numposts:this.getAttribute('num-posts',10),quiet:this.getAttribute('quiet'),reverse:this.getAttribute('reverse'),simple:this.getAttribute('simple'),title:this.getAttribute('title',document.title),url:this.getAttribute('url',document.URL),width:this._getPxAttribute('width',550),xid:this.getAttribute('xid')};if(!a.xid){var b=document.URL.indexOf('#');if(b>0){a.xid=encodeURIComponent(document.URL.substring(0,b));}else a.xid=encodeURIComponent(document.URL);}this._attr=a;return true;},oneTimeSetup:function(){this.subscribe('xd.addComment',FB.bind(this._handleCommentMsg,this));},getSize:function(){return{width:this._attr.width,height:200};},getUrlBits:function(){return{name:'comments',params:this._attr};},_handleCommentMsg:function(a){if(!this.isValid())return;FB.Event.fire('comments.add',{post:a.post,user:a.user,widget:this});}});FB.provide('Anim',{ate:function(c,g,d,b){d=d?d:750;var e=40,f={},j={},a=null,h=c.style,i=setInterval(FB.bind(function(){if(!a)a=new Date().getTime();var k=Math.min((new Date().getTime()-a)/d,1);FB.Array.forEach(g,FB.bind(function(o,m){if(!f[m]){var n=FB.Dom.getStyle(c,m);if(!n)return;f[m]=this._parseCSS(n);}if(!j[m])j[m]=this._parseCSS(o.toString());var l='';FB.Array.forEach(f[m],function(q,p){if(isNaN(j[m][p].numPart)&&j[m][p].textPart=='?'){l=q.numPart+q.textPart;}else if(isNaN(q.numPart)){l=q.textPart;}else l+=(q.numPart+Math.ceil((j[m][p].numPart-q.numPart)*Math.sin(Math.PI/2*k)))+j[m][p].textPart+' ';});FB.Dom.setStyle(c,m,l);},this));if(k==1){clearInterval(i);if(b)b(c);}},this),e);},_parseCSS:function(a){var b=[];FB.Array.forEach(a.split(' '),function(d){var c=parseInt(d,10);b.push({numPart:c,textPart:d.replace(c,'')});});return b;}});FB.provide('Insights',{impression:function(e,a){var b=FB.guid(),g="//ah8.facebook.com/impression.php/"+b+"/",c=new Image(1,1),f=[];if(!e.api_key&&FB._apiKey)e.api_key=FB._apiKey;for(var d in e)f.push(encodeURIComponent(d)+'='+encodeURIComponent(e[d]));g+='?'+f.join('&');if(a)c.onload=a;c.src=g;}});FB.subclass('XFBML.ConnectBar','XFBML.Element',null,{_initialHeight:null,_initTopMargin:0,_picFieldName:'pic_square',_page:null,_displayed:false,_notDisplayed:false,_container:null,process:function(){FB.getLoginStatus(this.bind(function(a){FB.Event.monitor('auth.statusChange',this.bind(function(){if(this.isValid()&&FB._userStatus=='connected'){this._uid=FB.Helper.getLoggedInUser();FB.api({method:'Connect.shouldShowConnectBar'},this.bind(function(b){if(b==true){this._showBar();}else this._noRender();}));}else this._noRender();return false;}));}));},_showBar:function(){var a=FB.Data._selectByIndex(['first_name','profile_url',this._picFieldName],'user','uid',this._uid);var b=FB.Data._selectByIndex(['display_name'],'application','api_key',FB._apiKey);FB.Data.waitOn([a,b],FB.bind(function(c){c[0][0].site_name=c[1][0].display_name;if(!this._displayed){this._displayed=true;this._notDisplayed=false;this._renderConnectBar(c[0][0]);this.fire('render');FB.Insights.impression({lid:104,name:'widget_load'});this.fire('connectbar.ondisplay');FB.Event.fire('connectbar.ondisplay',this);FB.Helper.invokeHandler(this.getAttribute('on-display'),this);}},this));},_noRender:function(){if(this._displayed){this._displayed=false;this._closeConnectBar();}if(!this._notDisplayed){this._notDisplayed=true;this.fire('render');this.fire('connectbar.onnotdisplay');FB.Event.fire('connectbar.onnotdisplay',this);FB.Helper.invokeHandler(this.getAttribute('on-not-display'),this);}},_renderConnectBar:function(d){var b=document.createElement('div'),c=document.createElement('div');b.className='fb_connect_bar';c.className='fb_reset fb_connect_bar_container';c.appendChild(b);document.body.appendChild(c);this._container=c;this._initialHeight=Math.round(parseFloat(FB.Dom.getStyle(c,'height'))+parseFloat(FB.Dom.getStyle(c,'border-bottom-width')));b.innerHTML=FB.String.format('<div class="fb_buttons">'+'<a href="#" class="fb_bar_close">'+'<img src="{1}" alt="{2}" title="{2}"/>'+'</a>'+'</div>'+'<a href="{7}" class="fb_profile" target="_blank">'+'<img src="{3}" alt="{4}" title="{4}"/>'+'</a>'+'{5}'+' <span>'+'<a href="{8}" class="fb_learn_more" target="_blank">{6}</a> &ndash; '+'<a href="#" class="fb_no_thanks">{0}</a>'+'</span>',FB.Intl._tx("No, gracias"),FB._domain.cdn+FB.XFBML.ConnectBar.imgs.buttonUrl,FB.Intl._tx("Cerrar"),d[this._picFieldName],d.first_name,FB.Intl._tx("Hola, {firstName}. <strong>{siteName}<\/strong> est\u00e1 usando Facebook para personalizar tu experiencia.",{firstName:d.first_name,siteName:d.site_name}),FB.Intl._tx("M\u00e1s informaci\u00f3n"),d.profile_url,FB._domain.www+'sitetour/connect.php');var a=this;FB.Array.forEach(b.getElementsByTagName('a'),function(g){g.onclick=FB.bind(a._clickHandler,a);});this._page=document.body;var f=0;if(this._page.parentNode){f=Math.round((parseFloat(FB.Dom.getStyle(this._page.parentNode,'height'))-parseFloat(FB.Dom.getStyle(this._page,'height')))/2);}else f=parseInt(FB.Dom.getStyle(this._page,'marginTop'),10);f=isNaN(f)?0:f;this._initTopMargin=f;if(!window.XMLHttpRequest){c.className+=" fb_connect_bar_container_ie6";}else{c.style.top=(-1*this._initialHeight)+'px';FB.Anim.ate(c,{top:'0px'});}var e={marginTop:this._initTopMargin+this._initialHeight+'px'};if(FB.Dom.getBrowserType()=='ie'){e.backgroundPositionY=this._initialHeight+'px';}else e.backgroundPosition='? '+this._initialHeight+'px';FB.Anim.ate(this._page,e);},_clickHandler:function(a){a=a||window.event;var b=a.target||a.srcElement;while(!b.href)b=b.parentNode;switch(b.className){case'fb_bar_close':FB.api({method:'Connect.connectBarMarkAcknowledged'});FB.Insights.impression({lid:104,name:'widget_user_closed'});this._closeConnectBar();break;case'fb_learn_more':case'fb_profile':window.open(b.href);break;case'fb_no_thanks':FB.api({method:'Connect.connectBarMarkAcknowledged'});FB.Insights.impression({lid:104,name:'widget_user_no_thanks'});FB.api({method:'auth.revokeAuthorization'},this.bind(function(){this.fire('connectbar.ondeauth');FB.Event.fire('connectbar.ondeauth',this);FB.Helper.invokeHandler(this.getAttribute('on-deauth'),this);if(this._getBoolAttribute('auto-refresh',true))window.location.reload();}));break;}return false;},_closeConnectBar:function(){this._notDisplayed=true;var a={marginTop:this._initTopMargin+'px'};if(FB.Dom.getBrowserType()=='ie'){a.backgroundPositionY='0px';}else a.backgroundPosition='? 0px';FB.Anim.ate(this._page,a,300);FB.Anim.ate(this._container,{top:(-1*this._initialHeight)+'px'},300,function(b){b.parentNode.removeChild(b);});this.fire('connectbar.onclose');FB.Event.fire('connectbar.onclose',this);FB.Helper.invokeHandler(this.getAttribute('on-close'),this);}});FB.provide('XFBML.ConnectBar',{imgs:{buttonUrl:'images/facebook-widgets/close_btn.png'}});FB.subclass('XFBML.Facepile','XFBML.IframeWidget',null,{_visibleAfter:'load',setupAndValidate:function(){this._attr={channel:this.getChannelUrl(),max_rows:this.getAttribute('max-rows'),width:this._getPxAttribute('width',200)};return true;},oneTimeSetup:function(){var a=FB._userStatus;FB.Event.subscribe('auth.statusChange',FB.bind(function(b){if(a=='connected'||b.status=='connected')this.process(true);a=b.status;},this));},getSize:function(){return{width:this._attr.width,height:70};},getUrlBits:function(){return{name:'facepile',params:this._attr};}});FB.subclass('XFBML.Fan','XFBML.IframeWidget',null,{_visibleAfter:'load',setupAndValidate:function(){this._attr={api_key:FB._apiKey,connections:this.getAttribute('connections','10'),css:this.getAttribute('css'),height:this.getAttribute('height'),id:this.getAttribute('profile-id'),logobar:this._getBoolAttribute('logo-bar'),name:this.getAttribute('name'),stream:this._getBoolAttribute('stream',true),width:this._getPxAttribute('width',300)};if(!this._attr.id&&!this._attr.name){FB.log('<fb:fan> requires one of the "id" or "name" attributes.');return false;}var a=this._attr.height;if(!a)if((!this._attr.connections||this._attr.connections==='0')&&!this._attr.stream){a=65;}else if(!this._attr.connections||this._attr.connections==='0'){a=375;}else if(!this._attr.stream){a=250;}else a=550;if(this._attr.logobar)a+=25;this._attr.height=a;return true;},getSize:function(){return{width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return{name:'fan',params:this._attr};}});FB.subclass('XFBML.EdgeCommentWidget','XFBML.IframeWidget',function(a){this._iframeWidth=a.width;this._iframeHeight=a.height;this._attr={master_frame_name:a.masterFrameName};this.dom=a.commentNode;this.dom.style.top=a.relativeHeightOffset;this.dom.style.zIndex=FB.XFBML.EdgeCommentWidget.NextZIndex++;FB.Dom.addCss(this.dom,'fb_edge_comment_widget');},{_visibleAfter:'load',_showLoader:false,getSize:function(){return{width:this._iframeWidth,height:this._iframeHeight};},getUrlBits:function(){return{name:'comment_widget_shell',params:this._attr};}});FB.provide('XFBML.EdgeCommentWidget',{NextZIndex:10000});FB.subclass('XFBML.EdgeWidget','XFBML.IframeWidget',null,{_visibleAfter:'immediate',_showLoader:false,setupAndValidate:function(){FB.Dom.addCss(this.dom,'fb_edge_widget_with_comment');this._attr={channel_url:this.getChannelUrl(),debug:this._getBoolAttribute('debug'),href:this.getAttribute('href',window.location.href),is_permalink:this._getBoolAttribute('is-permalink'),node_type:this.getAttribute('node-type','link'),width:this._getWidgetWidth(),font:this.getAttribute('font'),layout:this._getLayout(),colorscheme:this.getAttribute('color-scheme'),action:this.getAttribute('action'),show_faces:this._shouldShowFaces(),no_resize:this._getBoolAttribute('no_resize')};return true;},oneTimeSetup:function(){this.subscribe('xd.presentEdgeCommentDialog',FB.bind(this._onEdgeCreate,this));this.subscribe('xd.presentEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogPresentation,this));this.subscribe('xd.dismissEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogDismissal,this));this.subscribe('xd.hideEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogHide,this));this.subscribe('xd.showEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogShow,this));},getSize:function(){return{width:this._getWidgetWidth(),height:this._getWidgetHeight()};},_getWidgetHeight:function(){var a=this._getLayout();var c=this._shouldShowFaces()?'show':'hide';var b={standard:{show:80,hide:35},bar:{show:45,hide:35},button_count:{show:21,hide:21}};return b[a][c];},_getWidgetWidth:function(){var c=this._getLayout();var e=this._shouldShowFaces()?'show':'hide';var d={standard:{show:450,hide:450},bar:{show:700,hide:450},button_count:{show:90,hide:90}};var b=d[c][e];var f=this._getPxAttribute('width',b);var a={bar:{min:600,max:900},standard:{min:225,max:900},button_count:{min:90,max:900}};if(f<a[c].min){f=a[c].min;}else if(f>a[c].max)f=a[c].max;return f;},_getLayout:function(){return this._getAttributeFromList('layout','standard',['standard','bar','button_count']);},_shouldShowFaces:function(){return this._getLayout()!=='button_count'&&this._getBoolAttribute('show-faces',true);},_handleEdgeCommentDialogPresentation:function(b){if(!this.isValid())return;var a=document.createElement('span');var c={commentNode:a,externalUrl:b.externalURL,width:330,height:200,masterFrameName:b.masterFrameName,relativeHeightOffset:'26px'};this._commentSlave=new FB.XFBML.EdgeCommentWidget(c);this.dom.appendChild(a);this._commentSlave.process();this._commentWidgetNode=a;},_handleEdgeCommentDialogDismissal:function(a){if(this._commentWidgetNode){this.dom.removeChild(this._commentWidgetNode);delete this._commentWidgetNode;}},_handleEdgeCommentDialogHide:function(){if(this._commentWidgetNode)this._commentWidgetNode.style.display="none";},_handleEdgeCommentDialogShow:function(){if(this._commentWidgetNode)this._commentWidgetNode.style.display="block";},_onEdgeCreate:function(){this.fire('edge.create',this._attr.href);FB.Event.fire('edge.create',this._attr.href,this);FB.Helper.invokeHandler(this.getAttribute('on-create'),this,[this._attr.href]);}});FB.subclass('XFBML.Like','XFBML.EdgeWidget',null,{getUrlBits:function(){return{name:'like',params:this._attr};}});FB.subclass('XFBML.LikeBox','XFBML.IframeWidget',null,{_visibleAfter:'load',setupAndValidate:function(){this._attr={api_key:FB._apiKey,connections:this.getAttribute('connections','10'),css:this.getAttribute('css'),height:this.getAttribute('height'),id:this.getAttribute('profile-id'),header:this._getBoolAttribute('header',true),name:this.getAttribute('name'),stream:this._getBoolAttribute('stream',true),width:this._getPxAttribute('width',300)};if(!this._attr.id&&!this._attr.name){FB.log('<fb:like-box> requires one of the "id" or "name" attributes.');return false;}var a=this._attr.height;if(!a)if((!this._attr.connections||this._attr.connections==='0')&&!this._attr.stream){a=62;}else{a=95;if(this._attr.connections&&this._attr.connections!=='0')a+=160;if(this._attr.stream)a+=300;if(this._attr.header&&this._attr.header!=='0')a+=32;}this._attr.height=a;return true;},getSize:function(){return{width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return{name:'likebox',params:this._attr};}});FB.subclass('XFBML.LiveStream','XFBML.IframeWidget',null,{_visibleAfter:'load',setupAndValidate:function(){this._attr={height:this._getPxAttribute('height',500),hideFriendsTab:this.getAttribute('hide-friends-tab'),redesigned:this._getBoolAttribute('redesigned-stream'),width:this._getPxAttribute('width',400),xid:this.getAttribute('xid','default'),always_post_to_friends:this._getBoolAttribute('always-post-to-friends',false)};return true;},getSize:function(){return{width:this._attr.width,height:this._attr.height};},getUrlBits:function(){var a=this._attr.redesigned?'live_stream_box':'livefeed';return{name:a,params:this._attr};}});FB.subclass('XFBML.Login','XFBML.Facepile',null,{_visibleAfter:'load',getSize:function(){return{width:this._attr.width,height:94};},getUrlBits:function(){return{name:'login',params:this._attr};}});FB.subclass('XFBML.LoginButton','XFBML.ButtonElement',null,{setupAndValidate:function(){this.autologoutlink=this._getBoolAttribute('auto-logout-link');this.onlogin=this.getAttribute('on-login');this.perms=this.getAttribute('perms');this.length=this._getAttributeFromList('length','short',['long','short']);if(this.autologoutlink)FB.Event.subscribe('auth.statusChange',FB.bind(this.process,this));return true;},getButtonMarkup:function(){var a=this.getOriginalHTML();if(a===''){if(FB.getSession()&&this.autologoutlink){return FB.Intl._tx("Cerrar sesi\u00f3n en Facebook");}else return this.length=='short'?FB.Intl._tx("Iniciar sesi\u00f3n"):FB.Intl._tx("Iniciar sesi\u00f3n con Facebook");}else return a;},onClick:function(){if(!FB.getSession()||!this.autologoutlink){FB.login(FB.bind(this._authCallback,this),{perms:this.perms});}else FB.logout(FB.bind(this._authCallback,this));},_authCallback:function(a){FB.Helper.invokeHandler(this.onlogin,this,[a]);}});FB.subclass('XFBML.Name','XFBML.Element',null,{process:function(){FB.copy(this,{_uid:this.getAttribute('uid'),_firstnameonly:this._getBoolAttribute('first-name-only'),_lastnameonly:this._getBoolAttribute('last-name-only'),_possessive:this._getBoolAttribute('possessive'),_reflexive:this._getBoolAttribute('reflexive'),_objective:this._getBoolAttribute('objective'),_linked:this._getBoolAttribute('linked',true),_subjectId:this.getAttribute('subject-id')});if(!this._uid){FB.log('"uid" is a required attribute for <fb:name>');this.fire('render');return;}var b=[];if(this._firstnameonly){b.push('first_name');}else if(this._lastnameonly){b.push('last_name');}else b.push('name');if(this._subjectId){b.push('sex');if(this._subjectId==FB.Helper.getLoggedInUser())this._reflexive=true;}var a;FB.Event.monitor('auth.statusChange',this.bind(function(){if(!this.isValid()){this.fire('render');return true;}if(FB._userStatus){if(this._uid=='loggedinuser')this._uid=FB.Helper.getLoggedInUser();if(FB.Helper.isUser(this._uid)){a=FB.Data._selectByIndex(b,'user','uid',this._uid);}else a=FB.Data._selectByIndex(['name','id'],'profile','id',this._uid);a.wait(this.bind(function(c){if(this._uid)if(this._subjectId==this._uid){this._renderPronoun(c[0]);}else this._renderOther(c[0]);this.fire('render');}));}return false;}));},_renderPronoun:function(b){var c='',a=this._objective;if(this._subjectId){a=true;if(this._subjectId===this._uid)this._reflexive=true;}if(this._uid==FB.Connect.get_loggedInUser()&&this._getBoolAttribute('use-you',true)){if(this._possessive){if(this._reflexive){c='your own';}else c='your';}else if(this._reflexive){c='yourself';}else c='you';}else switch(b.sex){case'male':if(this._possessive){c=this._reflexive?'his own':'his';}else if(this._reflexive){c='himself';}else if(a){c='him';}else c='he';break;case'female':if(this._possessive){c=this._reflexive?'her own':'her';}else if(this._reflexive){c='herself';}else if(a){c='her';}else c='she';break;default:if(this._getBoolAttribute('use-they',true)){if(this._possessive){if(this._reflexive){c='their own';}else c='their';}else if(this._reflexive){c='themselves';}else if(a){c='them';}else c='they';}else if(this._possessive){if(this._reflexive){c='his/her own';}else c='his/her';}else if(this._reflexive){c='himself/herself';}else if(a){c='him/her';}else c='he/she';break;}if(this._getBoolAttribute('capitalize',false))c=FB.Helper.upperCaseFirstChar(c);this.dom.innerHTML=c;},_renderOther:function(c){if(!c)return;var b='',a='';if(this._uid==FB.Helper.getLoggedInUser()&&this._getBoolAttribute('use-you',true)){if(this._reflexive){if(this._possessive){b='your own';}else b='yourself';}else if(this._possessive){b='your';}else b='you';}else{if(null===c.first_name)c.first_name='';if(null===c.last_name)c.last_name='';if(this._firstnameonly){b=c.first_name;}else if(this._lastnameonly)b=c.last_name;if(!b)b=c.name;if(b!==''&&this._possessive)b+='\'s';}if(!b)b=this.getAttribute('if-cant-see','Facebook User');if(b){if(this._getBoolAttribute('capitalize',false))b=FB.Helper.upperCaseFirstChar(b);if(this._linked){a=FB.Helper.getProfileLink(c,b,this.getAttribute('href',null));}else a=b;}this.dom.innerHTML=a;}});FB.subclass('XFBML.ProfilePic','XFBML.Element',null,{process:function(){var d=this.getAttribute('size','thumb'),b=FB.XFBML.ProfilePic._sizeToPicFieldMap[d],g=this._getPxAttribute('width'),a=this._getPxAttribute('height'),e=this.dom.style,f=this.getAttribute('uid');if(this._getBoolAttribute('facebook-logo'))b+='_with_logo';if(g){g=g+'px';e.width=g;}if(a){a=a+'px';e.height=a;}var c=this.bind(function(j){var l=j?j[0]:null,i=l?l[b]:null;if(!i)i=FB._domain.cdn+FB.XFBML.ProfilePic._defPicMap[b];var k=((g?'width:'+g+';':'')+(a?'height:'+g+';':'')),h=FB.String.format('<img src="{0}" alt="{1}" title="{1}" style="{2}" class="{3}" />',i,l?l.name:'',k,this.dom.className);if(this._getBoolAttribute('linked',true))h=FB.Helper.getProfileLink(l,h,this.getAttribute('href',null));this.dom.innerHTML=h;FB.Dom.addCss(this.dom,'fb_profile_pic_rendered');this.fire('render');});FB.Event.monitor('auth.statusChange',this.bind(function(){if(!this.isValid()){this.fire('render');return true;}if(this.getAttribute('uid',null)=='loggedinuser')f=FB.Helper.getLoggedInUser();if(FB._userStatus&&f){FB.Data._selectByIndex(['name',b],FB.Helper.isUser(f)?'user':'profile',FB.Helper.isUser(f)?'uid':'id',f).wait(c);}else c();}));}});FB.provide('XFBML.ProfilePic',{_defPicMap:{pic:'pics/s_silhouette.jpg',pic_big:'pics/d_silhouette.gif',pic_big_with_logo:'pics/d_silhouette_logo.gif',pic_small:'pics/t_silhouette.jpg',pic_small_with_logo:'pics/t_silhouette_logo.gif',pic_square:'pics/q_silhouette.gif',pic_square_with_logo:'pics/q_silhouette_logo.gif',pic_with_logo:'pics/s_silhouette_logo.gif'},_sizeToPicFieldMap:{n:'pic_big',normal:'pic_big',q:'pic_square',s:'pic',small:'pic',square:'pic_square',t:'pic_small',thumb:'pic_small'}});FB.subclass('XFBML.Recommendations','XFBML.IframeWidget',null,{_visibleAfter:'load',_refreshOnAuthChange:true,setupAndValidate:function(){this._attr={border_color:this.getAttribute('border-color'),colorscheme:this.getAttribute('color-scheme'),font:this.getAttribute('font'),header:this._getBoolAttribute('header'),height:this._getPxAttribute('height',300),site:this.getAttribute('site',location.hostname),width:this._getPxAttribute('width',300)};return true;},getSize:function(){return{width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return{name:'recommendations',params:this._attr};}});FB.subclass('XFBML.ServerFbml','XFBML.IframeWidget',null,{_visibleAfter:'resize',setupAndValidate:function(){this._attr={channel_url:this.getChannelUrl(),fbml:this.getAttribute('fbml'),width:this._getPxAttribute('width')};if(!this._attr.fbml){var a=this.dom.getElementsByTagName('script')[0];if(a&&a.type==='text/fbml')this._attr.fbml=a.innerHTML;}if(!this._attr.fbml){FB.log('<fb:serverfbml> requires the "fbml" attribute.');return false;}return true;},getSize:function(){return{width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return{name:'serverfbml',params:this._attr};}});FB.subclass('XFBML.ShareButton','XFBML.Element',null,{process:function(){this._href=this.getAttribute('href',window.location.href);this._type=this.getAttribute('type','icon_link');this._renderButton(true);},_renderButton:function(f){if(!this.isValid()){this.fire('render');return;}var b='',c='',d='',a='',e=FB.Intl._tx("Compartir"),g='';switch(this._type){case'icon':case'icon_link':a='fb_button_simple';b=('<span class="fb_button_text">'+(this._type=='icon_link'?e:'&nbsp;')+'</span>');f=false;break;case'link':b=FB.Intl._tx("Compartir en Facebook");f=false;break;case'button':b='<span class="fb_button_text">'+e+'</span>';a='fb_button fb_button_small';f=false;break;case'button_count':b='<span class="fb_button_text">'+e+'</span>';c=('<span class="fb_share_count_nub_right">&nbsp;</span>'+'<span class="fb_share_count fb_share_count_right">'+this._getCounterMarkup()+'</span>');a='fb_button fb_button_small';break;default:b='<span class="fb_button_text">'+e+'</span>';d=('<span class="fb_share_count_nub_top">&nbsp;</span>'+'<span class="fb_share_count fb_share_count_top">'+this._getCounterMarkup()+'</span>');a='fb_button fb_button_small';g='fb_share_count_wrapper';}this.dom.innerHTML=FB.String.format('<span class="{0}">{4}<a href="{1}" class="{2}" '+'onclick=\'FB.ui({6});return false;\''+'target="_blank">{3}</a>{5}</span>',g,this._href,a,b,d,c,FB.JSON.stringify({method:'stream.share',u:this._href}));if(!f)this.fire('render');},_getCounterMarkup:function(){if(!this._count)this._count=FB.Data._selectByIndex(['share_count'],'link_stat','url',this._href);if(this._count.value!==undefined){if(this._count.value.length>0){var a=this._count.value[0].share_count;if(a>3){var b=a>=1e+07?Math.round(a/1e+06)+'M':(a>=10000?Math.round(a/1000)+'K':a);return('<span class="fb_share_count_inner">'+b+'</span>');}}}else this._count.wait(FB.bind(this._renderButton,this,false));return'';}});FB.subclass('XFBML.SocialBar','XFBML.IframeWidget',null,{_showLoader:false,_initialWidth:860,_initialHeight:29,_barIframe:null,_currentZ:0,_currentChildRight:0,_refreshOnAuthChange:true,_visibleAfter:'load',_minimizeToolbar:function(c){var a=this._barIframe;c.resetWidth=false;if(c.width=='100%'){var d=parseInt(FB.Dom.getStyle(a.parentNode,'width'),10);c.resetWidth=true;c.width=d;}FB.Anim.ate(a,{width:c.width+'px'},300,function(e){if(c.resetWidth)e.style.width='100%';});var b=this.dom.getElementsByTagName('iframe');FB.Array.forEach(b,function(e){if(e.parentNode.className=='fb_social_bar_container')return;if(!e._isHidden){e._origHeight=parseInt(FB.Dom.getStyle(e,'height'),10);e._origWidth=parseInt(FB.Dom.getStyle(e,'width'),10);FB.Anim.ate(e,{height:'0px',width:'0px',opacity:0},300);e._isHidden=true;}else{FB.Anim.ate(e,{height:e._origHeight+'px',width:e._origWidth+'px',opacity:100});e._isHidden=false;}});},_spawnChild:function(c){var b=this._barIframe,a=this;var e=document.createElement('span');var d=parseInt(FB.Dom.getStyle(b.parentNode,'padding-right'),10)+this._currentChildRight+parseInt(c.minimizeWidth,10);b.parentNode.appendChild(e);FB.Content.insertIframe({root:e,name:c.name,url:c.src,className:'fb_social_bar_iframe',width:c.width,height:0,onload:function(f){f.style.position='absolute';f.style[a._attr.position]=a._initialHeight+'px';f.style.right=d+'px';f.style.zIndex=++a._currentZ;FB.Anim.ate(f,{height:c.height+'px',opacity:100});}});this._currentChildRight+=parseInt(c.width,10);},_removeChild:function(d){var e=0;var c=this.dom.getElementsByTagName('iframe');for(var b=1;b<c.length;b++){var a=c[b];if(a.name==d.name){var f=parseInt(FB.Dom.getStyle(a,'width'),10);e+=f;this._currentChildRight-=f;FB.Anim.ate(a,{height:'0px',opacity:0},300,function(g){g.parentNode.parentNode.removeChild(g.parentNode);});}else FB.Anim.ate(a,{right:parseInt(FB.Dom.getStyle(a,'right'),10)-e+'px'},300);}},_iframeOnLoad:function(){var b=this._barIframe=this.getIframeNode(),a=b.parentNode;a.className='fb_social_bar_container';b.style.width='100%';this._currentZ+=parseInt(FB.Dom.getStyle(b,'zIndex'),10);var c={opacity:100};b.className='fb_social_bar_iframe';if(!window.XMLHttpRequest){a.style.position='absolute';a.className+=' fb_social_bar_iframe'+this._attr.position+'_ie6';}else{FB.Anim.ate(b,c);a.style[this._attr.position]=(-1*this._initialHeight)+'px';c[this._attr.position]='0px';}FB.Anim.ate(a,c);},oneTimeSetup:function(){this.subscribe('xd.minimizeToolbar',FB.bind(this._minimizeToolbar,this));this.subscribe('xd.spawnChild',FB.bind(this._spawnChild,this));this.subscribe('xd.removeChild',FB.bind(this._removeChild,this));this.subscribe('iframe.onload',FB.bind(this._iframeOnLoad,this));},getUrlBits:function(){return{name:'social_bar',params:this._attr};},getSize:function(){return{width:this._initialWidth,height:this._initialHeight};},setupAndValidate:function(){this._attr={like:this._getBoolAttribute('like'),send:this._getBoolAttribute('send'),activity:this._getBoolAttribute('activity'),chat:this._getBoolAttribute('chat'),position:this._getAttributeFromList('position','bottom',['top','bottom']),site:this.getAttribute('site',location.hostname),channel:this.getChannelUrl()};return true;}});void(0);FB.provide("",{"_domain":{"api":"https:\/\/api.facebook.com\/","cdn":"http:\/\/static.ak.fbcdn.net\/","graph":"https:\/\/graph.facebook.com\/","www":"http:\/\/www.facebook.com\/"},"_locale":"es_ES"},true);FB.provide("Flash",{"_minVersions":[[9,0,159,0],[10,0,22,87]],"_swfPath":"rsrc.php\/z6D2S\/hash\/c729bxo3.swf"},true);FB.provide("XFBML.ConnectBar",{"imgs":{"buttonUrl":"rsrc.php\/z6PMX\/hash\/3fjrfzwb.png"}},true);FB.provide("XFBML.ProfilePic",{"_defPicMap":{"pic":"rsrc.php\/zCN9D\/hash\/8l4nfau6.jpg","pic_big":"rsrc.php\/zBPOE\/hash\/k9bm7yii.gif","pic_big_with_logo":"rsrc.php\/zNZOF\/hash\/f3zlirsm.gif","pic_small":"rsrc.php\/z3ZLQ\/hash\/16xbk6xz.jpg","pic_small_with_logo":"rsrc.php\/z1RLR\/hash\/c1lvcd6d.gif","pic_square":"rsrc.php\/z5HB7\/hash\/ecyu2wwn.gif","pic_square_with_logo":"rsrc.php\/z5R3Z\/hash\/d91h84jp.gif","pic_with_logo":"rsrc.php\/z2MBJ\/hash\/43j60xpm.gif"}},true);if(FB.Dom&&FB.Dom.addCssRules){FB.Dom.addCssRules(".fb_hidden{position:absolute;top:-10000px;z-index:10001}\n.fb_reset{background:none;border-spacing:0;border:0;color:#000;cursor:auto;direction:ltr;font-family:\"lucida grande\", tahoma, verdana, arial, sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal}\n.fb_link img{border:none}\n.fb_dialog{position:absolute;top:-10000px;z-index:10001}\n.fb_dialog_advanced{background:rgba(82, 82, 82, .7);padding:10px;-moz-border-radius:8px;-webkit-border-radius:8px}\n.fb_dialog_content{background:#fff;color:#333}\n.fb_dialog_close_icon{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zA63Q\/hash\/8o4lssjn.gif) no-repeat scroll 3px 0 transparent;cursor:pointer;display:block;height:16px;position:absolute;right:19px;top:18px;width:14px;top:10px\\9;right:7px\\9}\n.fb_dialog_close_icon:hover{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zA63Q\/hash\/8o4lssjn.gif) no-repeat scroll -10px 0 transparent}\n.fb_dialog_loader{background-color:#f2f2f2;border:1px solid #606060;font-size:24px;padding:20px}\n#fb_dialog_loader_close{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/z2APY\/hash\/41s5ptdj.gif) no-repeat scroll left top transparent;cursor:pointer;display:-moz-inline-block;display:inline-block;height:9px;margin-left:20px;position:relative;vertical-align:middle;width:9px}\n#fb_dialog_loader_close:hover{background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/z7ZL1\/hash\/bf2f4q72.png)}\n.fb_dialog_top_left,\n.fb_dialog_top_right,\n.fb_dialog_bottom_left,\n.fb_dialog_bottom_right{height:10px;width:10px;overflow:hidden;position:absolute}\n.fb_dialog_top_left{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zEYDZ\/hash\/4xk9rts8.png) no-repeat 0 0;left:-10px;top:-10px}\n.fb_dialog_top_right{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zEYDZ\/hash\/4xk9rts8.png) no-repeat 0 -10px;right:-10px;top:-10px}\n.fb_dialog_bottom_left{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zEYDZ\/hash\/4xk9rts8.png) no-repeat 0 -20px;bottom:-10px;left:-10px}\n.fb_dialog_bottom_right{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zEYDZ\/hash\/4xk9rts8.png) no-repeat 0 -30px;right:-10px;bottom:-10px}\n.fb_dialog_vert_left,\n.fb_dialog_vert_right,\n.fb_dialog_horiz_top,\n.fb_dialog_horiz_bottom{position:absolute;background:#525252;filter:alpha(opacity=70);opacity:.7}\n.fb_dialog_vert_left,\n.fb_dialog_vert_right{width:10px;height:100%}\n.fb_dialog_vert_left{margin-left:-10px}\n.fb_dialog_vert_right{right:0;margin-right:-10px}\n.fb_dialog_horiz_top,\n.fb_dialog_horiz_bottom{width:100%;height:10px}\n.fb_dialog_horiz_top{margin-top:-10px}\n.fb_dialog_horiz_bottom{bottom:0;margin-bottom:-10px}\n.fb_dialog_iframe{line-height:0}\n.fb_iframe_widget{position:relative;display:-moz-inline-block;display:inline-block}\n.fb_iframe_widget iframe{position:relative;vertical-align:text-bottom}\n.fb_iframe_widget span{position:relative}\n.fb_hide_iframes iframe{position:relative;left:-10000px}\n.fb_iframe_widget_loader{position:relative;display:inline-block}\n.fb_iframe_widget_loader iframe{min-height:32px;z-index:2;zoom:1}\n.fb_iframe_widget_loader .FB_Loader{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/z5R48\/hash\/ejut8v2y.gif) no-repeat;height:32px;width:32px;margin-left:-16px;position:absolute;left:50%;z-index:4}\n.fb_button_simple,\n.fb_button_simple_rtl{background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/z6IY3\/hash\/5gh7aaaq.png);background-repeat:no-repeat;cursor:pointer;outline:none;text-decoration:none}\n.fb_button_simple_rtl{background-position:right 0}\n.fb_button_simple .fb_button_text{margin:0 0 0 20px;padding-bottom:1px}\n.fb_button_simple_rtl .fb_button_text{margin:0 10px 0 0}\na.fb_button_simple:hover .fb_button_text,\na.fb_button_simple_rtl:hover .fb_button_text,\n.fb_button_simple:hover .fb_button_text,\n.fb_button_simple_rtl:hover .fb_button_text{text-decoration:underline}\n.fb_button,\n.fb_button_rtl{background:#29447e url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zDYYQ\/hash\/deh9tyqv.png);background-repeat:no-repeat;cursor:pointer;display:inline-block;padding:0 0 0 1px;text-decoration:none;outline:none}\n.fb_button .fb_button_text,\n.fb_button_rtl .fb_button_text{background:#5f78ab url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zDYYQ\/hash\/deh9tyqv.png);border-top:solid 1px #879ac0;border-bottom:solid 1px #1a356e;color:#fff;display:block;font-family:\"lucida grande\",tahoma,verdana,arial,sans-serif;font-weight:bold;padding:2px 6px 3px 6px;margin:1px 1px 0 21px;text-shadow:none}\na.fb_button,\na.fb_button_rtl,\n.fb_button,\n.fb_button_rtl{text-decoration:none}\na.fb_button:active .fb_button_text,\na.fb_button_rtl:active .fb_button_text,\n.fb_button:active .fb_button_text,\n.fb_button_rtl:active .fb_button_text{border-bottom:solid 1px #29447e;border-top:solid 1px #45619d;background:#4f6aa3;text-shadow:none}\n.fb_button_xlarge,\n.fb_button_xlarge_rtl{background-position:left -60px;font-size:24px;line-height:30px}\n.fb_button_xlarge .fb_button_text{padding:3px 8px 3px 12px;margin-left:38px}\na.fb_button_xlarge:active{background-position:left -99px}\n.fb_button_xlarge_rtl{background-position:right -268px}\n.fb_button_xlarge_rtl .fb_button_text{padding:3px 8px 3px 12px;margin-right:39px}\na.fb_button_xlarge_rtl:active{background-position:right -307px}\n.fb_button_large,\n.fb_button_large_rtl{background-position:left -138px;font-size:13px;line-height:16px}\n.fb_button_large .fb_button_text{margin-left:24px;padding:2px 6px 4px 6px}\na.fb_button_large:active{background-position:left -163px}\n.fb_button_large_rtl{background-position:right -346px}\n.fb_button_large_rtl .fb_button_text{margin-right:25px}\na.fb_button_large_rtl:active{background-position:right -371px}\n.fb_button_medium,\n.fb_button_medium_rtl{background-position:left -188px;font-size:11px;line-height:14px}\na.fb_button_medium:active{background-position:left -210px}\n.fb_button_medium_rtl{background-position:right -396px}\n.fb_button_text_rtl,\n.fb_button_medium_rtl .fb_button_text{padding:2px 6px 3px 6px;margin-right:22px}\na.fb_button_medium_rtl:active{background-position:right -418px}\n.fb_button_small,\n.fb_button_small_rtl{background-position:left -232px;font-size:10px;line-height:10px}\n.fb_button_small .fb_button_text{padding:2px 6px 3px;margin-left:17px}\na.fb_button_small:active,\n.fb_button_small:active{background-position:left -250px}\n.fb_button_small_rtl{background-position:right -440px}\n.fb_button_small_rtl .fb_button_text{padding:2px 6px;margin-right:18px}\na.fb_button_small_rtl:active{background-position:right -458px}\n.fb_connect_bar_container div,\n.fb_connect_bar_container span,\n.fb_connect_bar_container a,\n.fb_connect_bar_container img,\n.fb_connect_bar_container strong{background:none;border-spacing:0;border:0;direction:ltr;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal;vertical-align:baseline}\n.fb_connect_bar_container{position:fixed;left:0 !important;right:0 !important;height:42px !important;padding:0 25px !important;margin:0 !important;vertical-align:middle !important;border-bottom:1px solid #333 !important;background:#3b5998 !important;z-index:99999999 !important;overflow:hidden !important}\n.fb_connect_bar_container_ie6{position:absolute;top:expression(document.compatMode==\"CSS1Compat\"? document.documentElement.scrollTop+\"px\":body.scrollTop+\"px\")}\n.fb_connect_bar{position:relative;margin:auto;height:100%;width:100%;padding:6px 0 0 0 !important;background:none;color:#fff !important;font-family:\"lucida grande\", tahoma, verdana, arial, sans-serif !important;font-size:13px !important;font-style:normal !important;font-variant:normal !important;font-weight:normal !important;letter-spacing:normal !important;line-height:1 !important;text-decoration:none !important;text-indent:0 !important;text-shadow:none !important;text-transform:none !important;white-space:normal !important;word-spacing:normal !important}\n.fb_connect_bar a:hover{color:#fff}\n.fb_connect_bar .fb_profile img{height:30px;width:30px;vertical-align:middle;margin:0 6px 5px 0}\n.fb_connect_bar div a,\n.fb_connect_bar span,\n.fb_connect_bar span a{color:#bac6da;font-size:11px;text-decoration:none}\n.fb_connect_bar .fb_buttons{float:right;margin-top:7px}\n.fb_edge_widget_with_comment{position:relative;*z-index:1000}\n.fb_edge_widget_with_comment span.fb_edge_comment_widget{left:-4px;position:absolute}\n.fb_share_count_wrapper{position:relative;float:left}\n.fb_share_count{background:#b0b9ec none repeat scroll 0 0;color:#333;font-family:\"lucida grande\", tahoma, verdana, arial, sans-serif;text-align:center}\n.fb_share_count_inner{background:#e8ebf2;display:block}\n.fb_share_count_right{margin-left:-1px;display:inline-block}\n.fb_share_count_right .fb_share_count_inner{border-top:solid 1px #e8ebf2;border-bottom:solid 1px #b0b9ec;margin:1px 1px 0 1px;font-size:10px;line-height:10px;padding:2px 6px 3px;font-weight:bold}\n.fb_share_count_top{display:block;letter-spacing:-1px;line-height:34px;margin-bottom:7px;font-size:22px;border:solid 1px #b0b9ec}\n.fb_share_count_nub_top{border:none;display:block;position:absolute;left:7px;top:35px;margin:0;padding:0;width:6px;height:7px;background-repeat:no-repeat;background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zCXBS\/hash\/89zgzk50.png)}\n.fb_share_count_nub_right{border:none;display:inline-block;padding:0;width:5px;height:10px;background-repeat:no-repeat;background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/zAQB0\/hash\/1a8txe26.png);vertical-align:top;background-position:right 5px;z-index:10;left:2px;margin:0 2px 0 0;position:relative}\n.fb_share_no_count{display:none}\n.fb_share_size_Small .fb_share_count_right .fb_share_count_inner{font-size:10px}\n.fb_share_size_Medium .fb_share_count_right .fb_share_count_inner{font-size:11px;padding:2px 6px 3px;letter-spacing:-1px;line-height:14px}\n.fb_share_size_Large .fb_share_count_right .fb_share_count_inner{font-size:13px;line-height:16px;padding:2px 6px 4px;font-weight:normal;letter-spacing:-1px}\n.fb_social_bar_container{position:fixed;left:0;right:0;height:29px;padding:0 25px}\n.fb_social_bar_iframe{position:relative;float:right;opacity:0;-moz-opacity:0;filter:alpha(opacity=0)}\n.fb_social_bar_iframe_bottom_ie6{bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}\n.fb_social_bar_iframe_top_ie6{bottom:auto;top:expression(eval(document.documentElement.scrollTop-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}",["fb.css.base","fb.css.dialog","fb.css.iframewidget","fb.css.button","fb.css.connectbarwidget","fb.css.edgecommentwidget","fb.css.sharebutton","fb.css.socialbarwidget"]);}var WSL_Controller_GoogleAnalytics={registerClick:function(category,action)
{_gaq.push(['_trackEvent',category,action,location.pathname]);return true;},registerAction:function(category,action,label)
{_gaq.push(['_trackEvent',category,action,label]);return true;},setCustomVar:function(varIndex,varName,varValue,level)
{_gap.push(['_setCustomVar ',varIndex,varName,varValue,level]);},trackPageview:function()
{_gaq.push(['_trackPageview()']);}};var WSL_Controller_Post={postVote:function()
{obj=this;postID=$(this).attr('id');$.post('/json/post-vote/'+postID,{},function(data)
{WSL_Controller_GoogleAnalytics.registerAction('modulo-votar-posts','vota',postID);return WSL_View_Post.postVote($(obj),data,false);},'json');return false;},postFBLikeVote:function(postName)
{$.post('/json/post-fblike-vote/'+postName,{},function(data)
{return WSL_View_Post.postVote($('#'+data.pid),data,true);},'json');return false;},commentVoteUp:function()
{return WSL_Controller_Post.commentVoteUpSpecific(this);},commentVoteUpSpecific:function(obj)
{commentID=$(obj).parents("li").attr('id');WSL_Controller_GoogleAnalytics.registerAction('modulo-moderar-comentarios','positivo',commentID);$.post('/json/commentvoteup/'+commentID,{},function(data)
{return WSL_View_Post.commentVote($(obj),data);});return false;},commentVoteDown:function()
{return WSL_Controller_Post.commentVoteDownSpecific(this);},commentVoteDownSpecific:function(obj)
{commentID=$(obj).parents("li").attr('id');WSL_Controller_GoogleAnalytics.registerAction('modulo-moderar-comentarios','negativo',commentID);$.post('/json/commentvotedown/'+commentID,{},function(data)
{return WSL_View_Post.commentVote($(obj),data);});return false;},commentAbuse:function()
{return WSL_Controller_Post.commentAbuseSpecific(this);},commentAbuseSpecific:function(obj)
{commentID=$(obj).parents("li").attr('id');$.post('/json/abuse/'+commentID,{},function(data)
{return WSL_View_Post.commentVote($(obj),data.res);},"json");return false;},commentPreview:function(event)
{obj=this;WSL_View_Post.commentPreview(obj);},initPostComment:function(){if($('#comment-write .submit-area').find('p').text()!=''){$('#replyform .submit-area p').show();}else{$('#replyform .submit-area p').hide(0);}
$("#userantitrollnotice").hide();}};var WSL_Controller_SignUp={checkUserName:function(userName)
{successUserName=false;if(userName.length<3){msg='El username no puede contener menos de 3 caracteres';WSL_View_SignUp.checkUserName(1,msg);}else{validUser=new String(userName.match(/[a-z]{1}[.a-z0-9_-]+/));if(validUser!='null'&&validUser.length==userName.length&&validUser.length>1){$.post('/json/checknewusername/'+userName,{},function(data)
{return WSL_View_SignUp.checkUserName(data);});successUserName=true;}else{msg='El username contiene caracteres no permitidos';WSL_View_SignUp.checkUserName(1,msg);}}
return successUserName;},checkEmail:function(email)
{successEmail=false;if(email.length<3){msg='El correo electronico no puede contener menos de 3 caracteres';WSL_View_SignUp.checkEmail(1,msg);}else{if(WSL_Tools.validateEmail(email)){successEmail=true;}else{msg='Pon una direccion de correo electronico valida, la necesitaras';WSL_View_SignUp.checkEmail(1,msg);}}
return successEmail;},checkConditions:function(checked)
{successConditions=true;if(checked!=true){msg='Para poder darte de alta tienes que aceptar las condiciones legales';WSL_View_SignUp.checkConditions(1,msg);successConditions=false;}
return successConditions;},finishSignUp:function()
{success=true;if(this.checkUserName($('#username').val())==false){alert('El nombre de usuario introducido no es correcto');success=false;}
if(this.checkEmail($('#username').val())==false){alert('El correo electronico introducido no es correcto');success=false;}
if(this.checkConditions($('#condition_agree').attr('checked'))==false){alert('Necesitas aceptar las condiciones legales');success=false;}
if(success==true){this.submit();}
return success;}};var WSL_Controller_User={makePrivate:function(isPublic)
{if(isPublic){url='/json/makeprivate';}else{url='/json/removeprivate';}
$.post(url,{},function(data)
{return WSL_View_User.makePrivate(data);});},descriptionCounter:function()
{return WSL_View_User.descriptionCounter();},subscribe:function(id,subscribe,isSuscribe)
{if(isSuscribe){url='/json/subscribe/'+id+'/'+subscribe;}else{url='/json/unsubscribe/'+id;}
$.post(url,{},function(data)
{if(data==0){if(isSuscribe){$('#'+id+' .email-subscribe').hide();if(subscribe==1){$('#'+id+' .subscribe-post').show();}else if(subscribe==2){$('#'+id+' .subscribe-comment').show();}}else
{$('#'+id+' .email-subscribe').show();if(subscribe==1){$('#'+id+' .subscribe-post').hide();}else if(subscribe==2){$('#'+id+' .subscribe-comment').hide();}}
return WSL_View_User.subscribe(data);}else{alert('Se ha producido un error');return false;}});},addExpert:function(id,isRemoveExperto)
{if(isRemoveExperto){url='/json/removeexpert/'+id;WSL_Controller_GoogleAnalytics.registerAction('modulo-producto-anadirexperto',id,'anadir-experto');}else{url='/json/addexpert/'+id;WSL_Controller_GoogleAnalytics.registerAction('modulo-producto-anadirexperto',id,'quitar-experto');}
$.post(url,{},function(data)
{if(data==0){return WSL_View_User.addExpert(data);}else{alert('Se ha producido un error');return false;}});},removeExpert:function(id)
{$.post('/json/removeexpert/'+id,{},function(data)
{if(data==0){return WSL_View_User.removeExpert(data);}else{alert('Se ha producido un error');return false;}});},addExpertAll:function(id,isExperto)
{if(isExperto){url='/json/removeexpert/'+id;}else{url='/json/addexpert/'+id;}
$.post(url,{},function(data)
{if(data==0){return WSL_View_User.addExpertAll(data);}else{alert('Se ha producido un error');return false;}});},userPrivate:function()
{$('#private').click(function()
{currentObject=$(this);isPublic=$(this).children('a').hasClass('public');WSL_Controller_User.makePrivate(isPublic);return false;});},expertAdd:function()
{$('#addexpert').click(function()
{currentObject=$(this);id=$(this).attr('rel');isRemoveExperto=$(this).children('a').hasClass('removeExperto');WSL_Controller_User.addExpert(id,isRemoveExperto);return false;});},subscriptions:function()
{$('.suscribe').children().click(function()
{var css_var=$(this).children('.email-subscribe').css('display');if(css_var=="inline"){isSubscribe=true;}else{isSubscribe=false;}
if(isSubscribe)
{var id=$(this).parents("div").attr('id');$('#'+id+' .exito').hide();$('#'+id+' .subscribe_form').html($('#subscribe_real_form').html());$('#'+id+' .subscribe_form').show("slow");$("#"+id+" .enabled").click(function()
{var subscribe=$("#"+id+" input[@name='subscribe']:checked").val()
var type='';if(subscribe==undefined){alert("Por favor, seleccione cualquier opción");}
else{$('#'+id+' .subscribe_form').hide("slow");WSL_Controller_User.subscribe(id,subscribe,isSubscribe);}});$("#"+id+" .disabled").click(function()
{$('#'+id+' .subscribe_form').hide("slow");});}else
{var id=$(this).parents("div").attr('id');var css_post=$(this).children('.subscribe-post').css('display');var css_comment=$(this).children('.subscribe-comment').css('display');if(css_post=='inline'){subscribe=1;$('#'+id+' .exito').html($('#exit-post').html());$('#'+id+' .exito').show("slow");}else if(css_comment=='inline'){subscribe=2;$('#'+id+' .exito').html($('#exit-comment').html());$('#'+id+' .exito').show("slow");}
WSL_Controller_User.subscribe(id,subscribe,isSubscribe);}});},expertos:function()
{$('.expertos').click(function()
{currentObject=$(this);id=$(this).attr('id');isExperto=$(this).hasClass('quitar');WSL_Controller_User.addExpertAll(id,isExperto);return false;});}};jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};var currentObject;var WSL={referer:null,fbLoginStatus:null,initPostPage:function()
{$('#ud_text').keyup(WSL_Controller_Post.commentPreview);WSL_Controller_Post.initPostComment();WSL.initSidebar();WSL_Controller_Product.initProductWishHave();$('.post-votes').click(WSL_Controller_Post.postVote);},meneame:function()
{var url_clean=document.URL.replace(/(#.*$)/,'');var url='http://cached.weblogssl.com/meneame.php?url='+encodeURIComponent(url_clean);document.write("<iframe src='"+url+"' width='60' height='78' frameborder='0' scrolling='no' class='meneame'></iframe>");},initHomePage:function()
{$('.post-votes').click(WSL_Controller_Post.postVote);WSL.initSidebar();var num=$('div.mvc').length;var randNum=Math.floor(Math.random()*num);var x=0;while(x<num){if(x==randNum){$('div.mvc').eq(x).show();}
else{$('div.mvc').eq(x).hide();}
x++;};},initAuthorPage:function()
{WSL_Controller_User.expertAdd();},initDeleteComment:function()
{$('.deletecomment').click(function()
{id=$(this).attr('id');WSL_Controller_Post.deleteComment(id);return false;});},initUserMainPage:function()
{WSL_Controller_Product.initUserPage();WSL_Controller_User.userPrivate();WSL_Controller_User.expertAdd();WSL_Controller_User.subscriptions();WSL_Controller_User.expertos();WSL.getTimeAgo();$("#activity ul.tabs").tabs("#activity > div.panes > div.user-activity");},initUserPageConversations:function()
{WSL_Controller_User.userPrivate();WSL_Controller_User.expertAdd();WSL_Controller_User.subscriptions();WSL.getTimeAgo();},initUserPage:function()
{WSL_Controller_User.userPrivate();WSL_Controller_User.expertAdd();WSL.getTimeAgo();},initGalleryPage:function()
{$('#carousel1').jcarousel();$('.thumbnail').click(function(){href=$(this).attr('href');src=$(this).attr('rel');$('#tag-actual a').attr('href',href);$('#tag-actual img').attr('src',src);$('#tagtitle a').attr('href',href);$('.thumbnail').removeClass('act');$(this).addClass('act');return false;});},initLoggedIn:function()
{WSL_View_User.loggedInBox();},initRegisterPage:function()
{$('#checkNewUserName').click(function()
{WSL_Controller_SignUp.checkUserName($('#username').val());return false;});$('#finish').click(function()
{WSL_Controller_SignUp.finishSignUp();return false;});},initPrivatePage:function()
{$('#private-remove-expert').bind('click',function()
{currentObject=$(this);userId=$(this).attr('name');WSL_Controller_User.removeExpert(userId);});},initEditUserPage:function()
{$('#description').keyup(function()
{WSL_Controller_User.descriptionCounter();return false;});$('#checkNewUserName').click(function()
{WSL_Controller_SignUp.checkUserName($('#username').val());return false;});},initSidebar:function()
{$('#lo-mejor ul.tabs').tabs('#lo-mejor div.panes > div');$('#comentarios ul.tabs').tabs('#comentarios div.panes > div');$('.panes h3').hide();},initProductPage:function()
{WSL_Controller_Carousel.initProductPage();WSL_Controller_Product.init();WSL.getTimeAgo();},initProductIndex:function()
{WSL_Controller_ProductIndex.initProductIndex();WSL.getTimeAgo();},inittextalter:function(str)
{var ta=document.createElement("textarea");ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");return ta.value;},initFavicons:function()
{$(function()
{$('#favicons-list').attr('src','http://cached.weblogssl.com/iframe.html');});},initSearchBox:function()
{var active_color='#000';var inactive_color='#ccc';$("input.default-value").css("color",inactive_color);var default_values=new Array();$("input.default-value").focus(function(){if(!default_values[this.id]){default_values[this.id]=this.value;}
if(this.value==default_values[this.id]){this.value='';this.style.color=active_color;}
$(this).blur(function(){if(this.value==''){this.style.color=inactive_color;this.value=default_values[this.id];}});});},initFacebook:function()
{FB.XFBML.parse();},fbLogin:function()
{FB.login(function(response){if(response.session){WSL.fbRedirect(null);}});return false;},fbRedirect:function(referer)
{$.post('/signup-facebook',{},function(data)
{if(referer==null){referer=WSL.referer;}
if(referer==null){referer=window.location.pathname;}
if(referer=='/signup'||referer=='/singup-facebook'){referer='/';}
if(data==1){$.post('/json/islogin',{},function(result){if(result==1){window.location=referer;}});}});},setReferer:function(referer)
{WSL.referer=referer;},fbLogout:function()
{FB.logout(function(response){window.location='/logout';});return false;},fbAutoLogin:function()
{FB.getLoginStatus(function(response){if(response.session){WSL.fbRedirect(null);}});},fbAutoLogout:function()
{FB.getLoginStatus(function(response){if(response.session==null){$.get('/fbAutoLogout',{},function(data)
{var ref=WSL.referer;if(ref==null){ref=window.location.pathname;}
window.location=ref;});}});},fbLoginCheck:function(response)
{WSL.fbLoginStatus=response.status;},fbAsyncInit:function(appId)
{FB.init({appId:appId,status:true,cookie:true,xfbml:true});if($("#fbnotlogged").length){WSL.fbAutoLogin();}
if($("#fblogged").length){WSL.fbAutoLogout();}
FB.getLoginStatus(function(response){WSL.fbLoginCheck(response);if((response.status=='connected')||(response.status=='notConnected')){$('.fblike').show();$('.fb-hide').next().hide();}else if(response.status=='unknown'){$('.fblike').hide();$('.fb-hide').next().show();$('.post-likes').click(WSL_Controller_Post.postVote);}});FB.Event.subscribe('edge.create',function(href,widget){str=WSL.explode('/',href,0);var postname=str[4];WSL_Controller_Post.postFBLikeVote(postname);});$("a.fbc").click(WSL.fbLogin);$("a.fblogout").click(WSL.fbLogout);},explode:function(delimiter,string,limit){var emptyArray={0:''};if(delimiter===true){delimiter='1';}
if(!limit){return string.toString().split(delimiter.toString());}else{var splitted=string.toString().split(delimiter.toString());var partA=splitted.splice(0,limit-1);var partB=splitted.join(delimiter.toString());partA.push(partB);return partA;}},getUsersForComunityPage:function(offset)
{var offset=parseInt(offset);$('#link'+offset).html('<a class="button disabled"><span><img src="http://testimg.xataka.com/lp2/v2/images/ajax-loader.gif"/> Cargando más usuarios</span></a>');if(offset==40){$('<div id='+offset+'></div>').insertAfter("#community-index");}else{var beforeDivId=offset-40;$('<div id='+offset+'></div>').insertAfter("#"+beforeDivId);}
$('#'+offset).hide();url="/comunidad/record/"+offset;var tabid=offset+40;$.get(url,{},function(data){$('#'+offset).html(data);$('#link'+offset).remove();$('#'+offset).fadeIn('fast').slideDown('fast');$('#sub-tab'+tabid).remove();FB.XFBML.parse(document.getElementById(offset));});return true;},initComunidadPage:function()
{WSL.getTimeAgo();},getTimeAgo:function()
{$("abbr.timeago").timeago();},initLoMejorPage:function()
{WSL.getTimeAgo();},getPostsForLoMejorPage:function(offset)
{var offset=parseInt(offset);$('#link'+offset).html('<a class="button disabled"><span><img src="http://testimg.xataka.com/lp2/v2/images/ajax-loader.gif"/> Cargando...</span></a>');if(offset==40){$('<div id='+offset+'></div>').insertAfter("#thebest-index");}else{var beforeDivId=offset-40;$('<div id='+offset+'></div>').insertAfter("#"+beforeDivId);}
$('#'+offset).hide();url="/lomejor/record/"+offset;$.get(url,{},function(data){$('#'+offset).html(data);$('#link'+offset).remove();$('#'+offset).fadeIn('fast').slideDown('fast');FB.XFBML.parse(document.getElementById(offset));});return true;},handleSubscription:function(postId)
{var cookie=$.cookie('weblogssl_c');var cookieObj=$.parseJSON(decodeURIComponent(cookie));if(cookieObj.login_type!=''){userId=cookieObj.user.UserId
url="/json/post/"+postId;$.get(url,{},function(data){$("#commentform input[name=subscribe]").each(function(){if($(this).val()==data.res){$(this).attr('checked',1);}})
$("#commentform input[name=subscription_status]").val(data.res);},'json');}}};var WSL_View_Product={ProductDescJson:function(data)
{if(data.status==1)
{$(".extraproddesc").html(data.content);$('.proddescfirst').show(0);$('.moredesc').hide(0);}else{$('.moredesc').hide(0);}},LatestPostsJson:function(data)
{$(".extralastposts").html(data);$("#lasttagsmore").hide();$("#lasttagsless").show();$(".extralastposts").show(0);},DeliciousJson:function(data)
{$(".extradelicious").html(data);$("#deliciousmore").hide();$("#deliciousless").show();$(".extradelicious").show(0);},BitacorasJson:function(data)
{$(".extrabitalinks").html(data);$("#bitaless").show(0);$("#bitacorasmore").hide(0);$(".extrabitalinks").show(0);},RelatedProductsJson:function(data)
{$(".morerelatedproducts").html(data);$("#productsless").show(0);$("#relatedproductsmore").hide(0);},ProductVoteJsonMsg:function(data)
{$("#log_off_vote_message").show();$("#voteselected").val(0);$(".product-votes li").attr('class','off');},ProductVoteJsonEvent:function(data)
{$(".editors > strong").text(data.avgeditorvoting);$(".community > strong").text(data.avguservoting);currentObject.parent().nextAll().attr('class','off');currentObject.parent().prevAll().attr('class','');currentObject.parent().attr('class','');url='/json/productstream/'+parts[1];WSL_Controller_Product.ProductVoteEventJson(url);return false;}};var WSL_View_Post={postVote:function(obj,data,fb_flag)
{if(data.res==1){if(fb_flag==true)
{$(obj).parent().children('#warn-login-post-vote.facebook').show();}else{$(obj).parent().children('#warn-login-post-vote.normal').show();}}else if(data.res==2){alert('Ya has votado');}else if(data.res==0){numVotes=$(obj).children('span').children('strong');titleVotes=$(obj).children('a').children('span');titleVotes.fadeOut('normal');numVotes.fadeOut('normal',function()
{numVotes.html(parseInt(numVotes.html())+1);titleVotes.html('Me gusta');obj.children('a').bind('click',function()
{alert('Ya has votado');return false;});obj.children('a').addClass('disabled');numVotes.fadeIn('normal');titleVotes.fadeIn('fast');});}},commentVote:function(obj,data)
{if(data==1){alert('Necesita estar identificado para votar');}else if(data==2){alert('Ya has votado');}else if(data==4){alert('No puedes votar tu propio comentario');}else if(data==5){alert('Este comentario ya tiene suficientes votos negativos');}else if(data==6){var msg='No tienes suficiente karma para asignar votos negativos al comentario. Para hacerlo es necesario tener al menos 3 estrellas. Completa tu perfil y participa m&aacute;s en la comunidad. Ver&aacute;s como pronto subes de nivel';var conveted_msg=WSL.inittextalter(msg);alert(conveted_msg);}else if(data==0){voteUp=$(obj).parent().children('.comment-vote-up');voteDown=$(obj).parent().children('.comment-vote-down');abuse=$(obj).parent().children('.abuse');$(voteUp).fadeOut('slow',function()
{$(voteUp).addClass('comment-vote-up-disabled');$(voteUp).removeClass('comment-vote-up');$(voteUp).fadeIn('slow');});$(voteDown).fadeOut('slow',function()
{$(voteDown).addClass('comment-vote-down-disabled');$(voteDown).removeClass('comment-vote-down');$(voteDown).fadeIn('slow');});$(abuse).fadeOut('slow',function()
{$(abuse).addClass('abuse-disabled');$(abuse).removeClass('abuse');$(abuse).fadeIn('slow');});}},commentPreview:function(data)
{currentValue=$(data).val();currentValue=currentValue.replace(/\n/g,'<br />').replace(/\n\n+/g,'<br /><br />').replace(/(&lt;\/?)script/g,'$1noscript');$('#ud_preview').html(currentValue);},deleteComment:function(data)
{if(data==1){alert('Por favor ingrese en wp-admin');}else{$('#c'+id).hide();commentCount=parseInt($('a.comments').html());if(commentCount!=1){content=(commentCount-1)+' comentarios';}else{content=(commentCount-1)+' comentario';}
$('a.comments').html(content);}}};var WSL_View_SignUp={checkUserName:function(data,msgError)
{if(data==0){$('#res_username').removeClass('error').addClass('exito');$('#res_username').html('Disponible');}else{$('#res_username').removeClass('exito').addClass('error');if(!msgError){msgError='No disponible';}
$('#res_username').html(msgError);}},checkEmail:function(data,msgError)
{if(data==1){$('#res_email').addClass('error');if(!msgError){msgError='No disponible';}
$('#res_email').html(msgError);}},checkConditions:function(data,msgError)
{if(data==1){$('#res_conditions').addClass('error');if(!msgError){msgError='No disponible';}
$('#res_conditions').html(msgError);}}};var WSL_View_User={loggedInBox:function()
{$('#menu').hide();$('#menuName').click(function()
{$('#menu').toggle('slow');return false;});},makePrivate:function()
{currentObject.fadeOut('slow',function()
{if(currentObject.children('a').hasClass("public")){currentObject.children('a').removeClass("public");currentObject.children('a').addClass("private");currentObject.children('a').html('Hacer mi perfil p&uacute;blico');}else{currentObject.children('a').removeClass("private");currentObject.children('a').addClass("public");currentObject.children('a').html('Hacer mi perfil privado');}
currentObject.fadeIn('slow');});},descriptionCounter:function()
{l=$('#description').val().length;if(l>250){$('#description').val($('#description').val().substring(0,250));}else{if($('#remaining')){$('#remaining').html(''+(250-l));}
if(l>250){$('#remaining').css('color','#d40d12');}else if(l>130){$('#remaining').css('color','#aa0000');}else{$('#remaining').css('color','#93A33D');}}},subscribe:function()
{currentObject.fadeOut('slow',function()
{if(currentObject.children('a').hasClass('email-subscribe')){currentObject.children('a').removeClass('email-subscribe');currentObject.children('a').addClass('email-unsubscribe');currentObject.children('a').html('Desuscribir');}else{currentObject.children('a').removeClass('email-unsubscribe');currentObject.children('a').addClass('email-subscribe');currentObject.children('a').html('Suscribir');}
currentObject.fadeIn('slow');});},addExpert:function()
{currentObject.fadeOut('slow',function(){if(currentObject.children('a').hasClass('removeExperto')){delta=-1;currentObject.children('a').html('<strong>+</strong> A&ntilde;adir experto');}else{delta=1;currentObject.children('a').html('<strong>-</strong> Quitar experto');}
currentObject.children('a').toggleClass('removeExperto');currentObject.fadeIn('normal');});$('#num_followers').fadeOut('slow',function()
{$('#num_followers').html(parseInt($('#num_followers').html())+delta);$('#num_followers').fadeIn('fast');});},removeExpert:function()
{$('#private-following').fadeOut('slow');},addExpertAll:function()
{currentObject.fadeOut('slow',function(){if(currentObject.hasClass('quitar')){delta=-1;currentObject.removeClass('quitar');currentObject.addClass('anadir');currentObject.html('<strong>+</strong> a&ntilde;adir experto');}else{delta=1;currentObject.removeClass('anadir');currentObject.addClass('quitar');currentObject.html('<strong>-</strong> quitar experto');}
currentObject.fadeIn('normal');});numExperts=$('#numExperts_'+currentObject.attr('id'));numExperts.fadeOut('slow',function()
{numExperts.html(parseInt(numExperts.html())+delta);numExperts.fadeIn('fast');});}};
