(function(a){a.fn.jqm=function(h){var r={zIndex:3E3,overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:g,ajaxText:"",target:g,modal:g,toTop:g,onShow:g,onHide:g,onLoad:g};return this.each(function(){if(this._jqm)return d[this._jqm].c=a.extend({},d[this._jqm].c,h);b++;this._jqm=b;d[b]={c:a.extend(r,a.jqm.params,h),a:g,w:a(this).addClass("jqmID"+b),s:b};r.trigger&&a(this).jqmAddTrigger(r.trigger)})};a.fn.jqmAddClose=function(h){return o(this,h,"jqmHide")};a.fn.jqmAddTrigger=
function(h){return o(this,h,"jqmShow")};a.fn.jqmShow=function(h){return this.each(function(){a(".s-Ads").css("visibility","hidden");a.jqm.open(this._jqm,h)})};a.fn.jqmHide=function(h){return this.each(function(){a(".s-Ads").css("visibility","visible");a.jqm.close(this._jqm,h)})};a.jqm={hash:{},open:function(h,r){var k=d[h],q=k.c,n="."+q.closeClass,p=parseInt(k.w.css("z-index"));p=p>0?p:3E3;var u=a("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":p-1,opacity:q.overlay/
100});if(k.a)return g;k.t=r;k.a=true;k.w.css("z-index",p);if(q.modal){e[0]||v("bind");e.push(h)}else if(q.overlay>0)k.w.jqmAddClose(u);else u=g;k.o=u?u.addClass(q.overlayClass).prependTo("body"):g;if(f){a("html,body").css({height:"100%",width:"100%"});if(u){u=u.css({position:"absolute"})[0];for(var y in{Top:1,Left:1})u.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'")}}if(q.ajax){h=q.target||k.w;p=q.ajax;h=typeof h=="string"?a(h,k.w):
a(h);p=p.substr(0,1)=="@"?a(r).attr(p.substring(1)):p;h.html(q.ajaxText).load(p,function(){q.onLoad&&q.onLoad.call(this,k);n&&k.w.jqmAddClose(a(n,k.w));l(k)})}else n&&k.w.jqmAddClose(a(n,k.w));q.toTop&&k.o&&k.w.before('<span id="jqmP'+k.w[0]._jqm+'"></span>').insertAfter(k.o);q.onShow?q.onShow(k):k.w.show();l(k);return g},close:function(h){h=d[h];if(!h.a)return g;h.a=g;if(e[0]){e.pop();e[0]||v("unbind")}h.c.toTop&&h.o&&a("#jqmP"+h.w[0]._jqm).after(h.w).remove();if(h.c.onHide)h.c.onHide(h);else{h.w.hide();
h.o&&h.o.remove()}return g},params:{}};var b=0,d=a.jqm.hash,e=[],f=a.browser.msie&&a.browser.version=="6.0",g=false,j=a('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),l=function(h){if(f)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(j);else a("iframe.jqm",h.w)[0]||h.w.prepend(j);m(h)},m=function(h){try{a(":input:visible",h.w)[0].focus()}catch(r){}},v=function(h){a()[h]("keypress",s)[h]("keydown",s)[h]("mousedown",s)},s=function(h){var r=
d[e[e.length-1]];(h=!a(h.target).parents(".jqmID"+r.s)[0])&&m(r);return!h},o=function(h,r,k){return h.each(function(){var q=this._jqm;a(r).each(function(){if(!this[k]){this[k]=[];a(this).click(function(){for(var n in{jqmShow:1,jqmHide:1})for(var p in this[n])d[this[n][p]]&&d[this[n][p]].w[n](this);return g})}this[k].push(q)})})}})(jQuery);
jQuery.fn.ajaxSubmit=function(a){function b(){function m(){if(!u++){k.detachEvent?k.detachEvent("onload",m):k.removeEventListener("load",m,false);var w=true;try{if(y)throw"timeout";var t,x;x=k.contentWindow?k.contentWindow.document:k.contentDocument?k.contentDocument:k.document;n.responseText=x.body?x.body.innerHTML:null;n.responseXML=x.XMLDocument?x.XMLDocument:x;if(o.dataType=="json"||o.dataType=="script"){var z=x.getElementsByTagName("textarea")[0];t=z?z.value:n.responseText;o.dataType=="json"?
eval("data = "+t):jQuery.globalEval(t)}else if(o.dataType=="xml"){t=n.responseXML;if(!t&&n.responseText!=null)t=v(n.responseText)}else t=n.responseText}catch(A){w=false;jQuery.handleError(o,n,"error",A)}if(w){o.success(t,"success");p&&jQuery.event.trigger("ajaxSuccess",[n,o])}p&&jQuery.event.trigger("ajaxComplete",[n,o]);p&&!--jQuery.active&&jQuery.event.trigger("ajaxStop");if(o.complete)o.complete(n,w?"success":"error");setTimeout(function(){r.remove();n.responseXML=null},100)}}function v(w,t){if(window.ActiveXObject){t=
new ActiveXObject("Microsoft.XMLDOM");t.async="false";t.loadXML(w)}else t=(new DOMParser).parseFromString(w,"text/xml");return t&&t.documentElement&&t.documentElement.tagName!="parsererror"?t:null}var s=f[0],o=jQuery.extend({},jQuery.ajaxSettings,a),h="jqFormIO"+jQuery.fn.ajaxSubmit.counter++,r=jQuery('<iframe id="'+h+'" name="'+h+'" />'),k=r[0],q=jQuery.browser.opera&&window.opera.version()<9;if(jQuery.browser.msie||q)k.src='javascript:false;document.write("");';r.css({position:"absolute",top:"-1000px",
left:"-1000px"});s.method="POST";s.encoding?(s.encoding="multipart/form-data"):(s.enctype="multipart/form-data");var n={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}},p=o.global;p&&!jQuery.active++&&jQuery.event.trigger("ajaxStart");p&&jQuery.event.trigger("ajaxSend",[n,o]);var u=0,y=0;setTimeout(function(){r.appendTo("body");k.attachEvent?k.attachEvent("onload",m):k.addEventListener("load",
m,false);s.action=o.url;var w=s.target;s.target=h;o.timeout&&setTimeout(function(){y=true;m()},o.timeout);s.submit();s.target=w},10)}if(typeof a=="function")a={success:a};a=jQuery.extend({url:this.attr("action")||window.location,type:this.attr("method")||"GET"},a||{});var d=this.formToArray(a.semantic);if(a.beforeSubmit&&a.beforeSubmit(d,this,a)===false)return this;var e={};jQuery.event.trigger("form.submit.validate",[d,this,a,e]);if(e.veto)return this;d=jQuery.param(d);if(a.type.toUpperCase()=="GET"){a.url+=
(a.url.indexOf("?")>=0?"&":"?")+d;a.data=null}else a.data=d;var f=this,g=[];a.resetForm&&g.push(function(){f.resetForm()});a.clearForm&&g.push(function(){f.clearForm()});if(!a.dataType&&a.target){var j=a.success||function(){};g.push(function(m,v){jQuery(a.target).attr("innerHTML",m).evalScripts().each(j,[m,v])})}else a.success&&g.push(a.success);a.success=function(m,v){for(var s=0,o=g.length;s<o;s++)g[s](m,v)};d=jQuery("input:file",this).fieldValue();e=false;for(var l=0;l<d.length;l++)if(d[l])e=true;
a.iframe||e?b():jQuery.ajax(a);jQuery.event.trigger("form.submit.notify",[this,a]);return this};jQuery.fn.ajaxSubmit.counter=0;
jQuery.fn.ajaxForm=function(a){return this.each(function(){jQuery("input:submit,input:image,button:submit",this).click(function(b){var d=this.form;d.clk=this;if(this.type=="image")if(b.offsetX!=undefined){d.clk_x=b.offsetX;d.clk_y=b.offsetY}else if(typeof jQuery.fn.offset=="function"){var e=jQuery(this).offset();d.clk_x=b.pageX-e.left;d.clk_y=b.pageY-e.top}else{d.clk_x=b.pageX-this.offsetLeft;d.clk_y=b.pageY-this.offsetTop}setTimeout(function(){d.clk=d.clk_x=d.clk_y=null},10)})}).submit(function(){jQuery(this).ajaxSubmit(a);
return false})};
jQuery.fn.formToArray=function(a){var b=[];if(this.length==0)return b;var d=this[0],e=a?d.getElementsByTagName("*"):d.elements;if(!e)return b;for(var f=0,g=e.length;f<g;f++){var j=e[f],l=j.name;if(l)if(a&&d.clk&&j.type=="image")!j.disabled&&d.clk==j&&b.push({name:l+".x",value:d.clk_x},{name:l+".y",value:d.clk_y});else{j=jQuery.fieldValue(j,true);if(j!==null)if(j.constructor==Array)for(var m=0,v=j.length;m<v;m++)b.push({name:l,value:j[m]});else b.push({name:l,value:j})}}if(!a&&d.clk){a=d.getElementsByTagName("input");
f=0;for(g=a.length;f<g;f++){e=a[f];(l=e.name)&&!e.disabled&&e.type=="image"&&d.clk==e&&b.push({name:l+".x",value:d.clk_x},{name:l+".y",value:d.clk_y})}}return b};jQuery.fn.formSerialize=function(a){return jQuery.param(this.formToArray(a))};
jQuery.fn.fieldSerialize=function(a){var b=[];this.each(function(){var d=this.name;if(d){var e=jQuery.fieldValue(this,a);if(e&&e.constructor==Array)for(var f=0,g=e.length;f<g;f++)b.push({name:d,value:e[f]});else e!==null&&typeof e!="undefined"&&b.push({name:this.name,value:e})}});return jQuery.param(b)};
jQuery.fn.fieldValue=function(a){for(var b=[],d=0,e=this.length;d<e;d++){var f=jQuery.fieldValue(this[d],a);f===null||typeof f=="undefined"||f.constructor==Array&&!f.length||(f.constructor==Array?jQuery.merge(b,f):b.push(f))}return b};
jQuery.fieldValue=function(a,b){var d=a.name,e=a.type,f=a.tagName.toLowerCase();if(typeof b=="undefined")b=true;if(b&&(!d||a.disabled||e=="reset"||e=="button"||(e=="checkbox"||e=="radio")&&!a.checked||(e=="submit"||e=="image")&&a.form&&a.form.clk!=a||f=="select"&&a.selectedIndex==-1))return null;if(f=="select"){f=a.selectedIndex;if(f<0)return null;b=[];a=a.options;d=(e=e=="select-one")?f+1:a.length;for(f=e?f:0;f<d;f++){var g=a[f];if(g.selected){g=jQuery.browser.msie&&!g.attributes.value.specified?
g.text:g.value;if(e)return g;b.push(g)}}return b}return a.value};jQuery.fn.clearForm=function(){return this.each(function(){jQuery("input,select,textarea",this).clearFields()})};jQuery.fn.clearFields=jQuery.fn.clearInputs=function(){return this.each(function(){var a=this.type,b=this.tagName.toLowerCase();if(a=="text"||a=="password"||b=="textarea")this.value="";else if(a=="checkbox"||a=="radio")this.checked=false;else if(b=="select")this.selectedIndex=-1})};
jQuery.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)this.reset()})};
var globalTimer=Array(),allCheckboxes=false,STATUS_ERROR=0,STATUS_SUCCESS=1,EFFECT_NONE=0,EFFECT_FADE=1,EFFECT_SLIDE=2,POST_TYPE_MESSAGE=0,POST_TYPE_VIDEO=1,BOARD_TAB_ALL=0,BOARD_TAB_MESSAGES=1,BOARD_TAB_VIDEOS=2,BOARD_TAB_VIDEOS_SHARE_YT=3,BOARD_TAB_VIDEOS_SHARE_YT2=4,BOARD_TAB_VIDEOS_SHARE_OWN=5,BOARD_TAB_GIFTS=6,EVENT_ONBLUR=1,EVENT_ONFOCUS=2,JCAROUSEL_TYPE_BOARD_VIDEO=0,BOARD_VIDEOS_TITLE=0,BOARD_VIDEOS_DESCRIPTION=1,BOARD_VIDEOS_MODE_NORMAL=0,BOARD_VIDEOS_MODE_EDITION=1,EDIT_BASIC_NICKNAME=0,
VIDEOS_AJAX_SUCCESS=1;function collapseText(a,b,d){switch(d){case "none":default:$("#"+a).hide();$("#"+b).show();break;case "fade":$("#"+a).hide();$("#"+b).fadeIn();break;case "slide":$("#"+a).slideToggle("fast",function(){$("#"+b).slideToggle("slow")});break}return false}
function changeTab(a,b,d,e,f,g,j,l){$.each($("."+b),function(){if($(this).css("opacity")<"0.999")return false});if(typeof g=="undefined"||!g)g="current-tab";if(typeof j=="undefined"||!j)j="current-tab";if(typeof f=="undefined"||!f)f="none";$("."+a).removeClass(j);$("#"+d).addClass(g);try{eval(l)}catch(m){}switch(f){case "none":default:$("."+b).hide();$("#"+e).show();break;case "fade":$("."+b).hide();$("#"+e).fadeIn();break}return false}
function magicTxtHelp(a,b,d,e,f){if(typeof e=="undefined"||!e)e="grey-text";if(typeof f=="undefined")f=false;if(typeof window.magicTxtHelp_activated=="undefined"||!window.magicTxtHelp_activated)magicTxtHelp_activated=true;if(magicTxtHelp_activated)switch(a){case EVENT_ONBLUR:if($("#"+b).val()===""||f)$("#"+b).val(d).addClass(e);break;case EVENT_ONFOCUS:if($("#"+b).val()===d||f)$("#"+b).val("").removeClass(e);break}return false}
function array_clean(a){var b=[];$.each(a,function(d,e){typeof e!=="undefined"&&e!==""&&e!==null&&b.push(e)});return b}
function timeoutMessages(a,b,d,e,f){a="#"+a;if(typeof b=="undefined")b=null;if(typeof d=="undefined"||!d)d=5E3;if(typeof e=="undefined")e=EFFECT_NONE;if(typeof f=="undefined")f="default";clearTimeout(globalTimer[f]);b&&$(a).html(b);switch(e){case EFFECT_NONE:default:$(a).show("normal",function(){globalTimer[f]=setTimeout("$('"+a+"').hide();",d)});break;case EFFECT_FADE:$(a).fadeIn("normal",function(){globalTimer[f]=setTimeout("$('"+a+"').fadeOut();",d)});break;case EFFECT_SLIDE:$(a).slideDown("normal",
function(){globalTimer[f]=setTimeout("$('"+a+"').slideUp();",d)});break}return false}function captureEvent(a,b,d){if(typeof d==="undefined")d=13;$("#"+a).keydown(function(e){if(e.keyCode===d){eval(b);e.preventDefault()}});return false}function textareaMaxLength(a,b,d){if(typeof b==="undefined")b=1024;if(typeof d==="undefined")d=null;var e=$("#"+a);e.bind("keyup blur",function(){var f=e.val();f.length>b&&e.val(f.substring(0,b));d&&eval(d)});return false}
function goTo(a){location.assign(a);return false}function addToMyVideos(a,b,d,e){if(typeof d=="undefined")d=false;if(typeof e=="undefined")e=false;$("."+b).animate({opacity:0.01});$.getJSON("/ajax_videos.php",{action:"addToMyVideos",data:[a]},function(f){switch(f[0]){case VIDEOS_AJAX_SUCCESS:d?eval(d):$("."+b).replaceWith(f[1]);break;default:e||alert(f[1])}$("."+b).animate({opacity:1})});return false}function daysInFebruary(a){return a%4===0&&(a%100!==0||a%400===0)?29:28}
function DaysArray(a){for(var b=1;b<=a;b++){this[b]=31;if(b==4||b==6||b==9||b==11)this[b]=30;if(b==2)this[b]=29}return this}function month_day(a,b,d){var e=DaysArray(12);a=parseInt(a,10);b=parseInt(b,10);if(a===0||b===0||d===0)return false;return b===2&&a>daysInFebruary(d)||a>e[b]?false:true}
function im_apply_profile_settings(a){if(!window.pc_profile_dynamic_style){pc_profile_dynamic_style=document.createElement("style");pc_profile_dynamic_style.setAttribute("type","text/css");document.getElementsByTagName("head")[0].appendChild(pc_profile_dynamic_style)}if(pc_profile_dynamic_style.styleSheet)pc_profile_dynamic_style.styleSheet.cssText=a;else $(pc_profile_dynamic_style).text(a)}function page(a,b,d){if(!(a<1)){document.getElementById(b).value=a;document.getElementById(d).submit()}}
function show_help_tip(a,b){$help_tip_div=$('<div class="help-ball" id="help_tip" style="display:none;position:absolute;top:0;left:0"><div class="body-balloon"></div><h5></h5></div>');$("body").append($help_tip_div);$(".tipped").focus(function(f){show_help_tip(f,this)}).blur(function(f){$help_tip_div.hide()});a=$(b);var d=a.offset(),e=a.width();if(a.attr("position"))e=parseInt(a.attr("position"),10);$(".body-balloon",$help_tip_div).html($("<p></p>").html(b.getAttribute("title")));$help_tip_div.css({position:"absolute",
top:d.top-10,left:d.left+e}).show()}function selectAllCheckboxes(a){a=document.getElementsByName(a);allCheckboxes=!allCheckboxes;for(i=0;i<a.length;i++)a[i].checked=allCheckboxes}function strSearch(a,b){$q=$("#"+a);a=$.trim($q.val());if(a==b)a="";$q.val(a.toLowerCase());return true}if(typeof sonico=="undefined")var sonico=function(){};sonico.translate={resources:{}};sonico.translate._=function(a){return typeof sonico.translate.resources[a]=="string"?sonico.translate.resources[a]:a};_=sonico.translate._;
sonico.translate.addResources=function(a){for(var b in a)sonico.translate.resources[b]=a[b]};sonico.String={ltrim:function(a){return a.replace(/^\s+/,"")},rtrim:function(a){return a.replace(/\s+$/,"")},trim:function(a){return a.replace(/^\s+|\s+$/g,"")},extendString:function(){String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}}};
sonico.resourceLoader={loaded:{},loading:{},loadResources:function(a,b){for(var d=[],e=this.getHeadpoint(),f=0;f<a.length;++f)if(a[f].src&&this.loaded[a[f].src]===undefined&&this.loading[a[f].src]===undefined){this.loading[a[f].src]=true;d.push(a[f].src);this.requestResource(a[f].type,a[f].src,e)}if(typeof b=="function")var g=setInterval(function(){if(d.length)for(var j=0;j<d.length;++j)sonico.resourceLoader.loaded[d[j]]!==undefined&&d.splice(j--,1);else{b();clearInterval(g)}},10)},requestResource:function(a,
b,d){if(a=="js"){a=document.createElement("script");a.src=b;a.type="text/javascript";d.appendChild(a);a.onload=function(){sonico.resourceLoader._scriptLoaded(this.src)};a.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState=="loaded")sonico.resourceLoader._scriptLoaded(this.src)}}},getHeadpoint:function(){var a=document.getElementsByTagName("head");return a.length?a[0]:document.body},_scriptLoaded:function(a){this.loaded[a]=true;delete this.loading[a]}};
var magicTxtHelp_activated=true;function fillText_(a){var b=$("#quick").val();if(typeof text_=="undefined")text_=_("Buscar...");switch(a){case 1:if(b===""){$("#quick").val(text_);$("#quick").addClass("quiet")}break;case 2:magicTxtHelp_activated=false;if(b==text_){$("#quick").val("");$("#quick").removeClass("quiet")}break}return true}
function sidebarformatItem(a,b,d){if(typeof d==="undefined")d="";a=a;var e=d.split(" "),f={a:"\u00e1",e:"\u00e9",i:"\u00ed",o:"\u00f3",u:"\u00fa",n:"\u00f1",A:"\u00c1",E:"\u00c9",I:"\u00cd",O:"\u00d3",U:"\u00da",N:"\u00d1"},g=["#",",","\\.","'","_","-"];d=[];var j="";for(var l in e)if(j=e[l].replace(/\s+/,"")){j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)");for(var m in f){j=j.replace(new RegExp("("+f[m]+")","g"),m);j=j.replace(new RegExp("("+m+")","g"),"[$1"+f[m]+"]")}for(m in g)j=j.replace(new RegExp("("+
g[m]+")","g"),"$1?");d.push("("+j+")")}l="";if(sonico_qs_extra[b])l='<span class="block note">'+sonico_qs_extra[b]+" "+quickSearchExtra+"</span>";if(d.length)a=a.replace(new RegExp("("+d.join("|")+")","ig"),'<span class="added">$1</span>');return j=typeof sonico_friends_photos=="undefined"?'<a href="javascript:void();" class="f-wrap">'+a+"</a>":b>=9E8?'<a href="javascript:void();" class="f-wrap"><span class="thumb"><img src="'+sonico_groups_photos[b]+'" width="40" height="40" /></span>'+a+"</a>":
b>=5E8?'<a href="javascript:void();" class="f-wrap"><span class="thumb"><img src="'+sonico_pages_photos[b]+'" width="40" height="40" /></span>'+a+"</a>":b<1E3&&b>0?'<a href="javascript:void();" class="f-wrap"><span class="thumb"><b class="icon '+{1:"i-games",2:"i-cards",3:"i-cumplealerta",4:"i-photo",5:"i-group",6:"i-bands",7:"i-pages",8:"i-apps"}[b]+'"></b></span>'+a+"</a>":b<0?'<a href="javascript:void();" class="f-wrap"><span class="thumb"><img src="'+sonico_application_photos[-b]+'" width="17" height="17" /></span>'+
a+"</a>":'<a href="javascript:void();" class="f-wrap"><span class="thumb"><img src="'+sonico_friends_photos[b]+'" width="40" height="40" /></span>'+a+l+"</a>"}var qSearchHasLoaded=false;
function launch_autocomplete(){if(typeof sonico_groups==="undefined"){sonico_groups={};sonico_groups_photos={}}var a={};if(typeof sonico_friends==="undefined")sonico_friends={};if(typeof sonico_pages==="undefined"){sonico_pages={};sonico_pages_photos={}}if(typeof sonico_application==="undefined"){sonico_application={};sonico_application_photos={}}if(typeof sonico_qs_extra==="undefined")sonico_qs_extra={};for(var b in sonico_friends)a[b]=sonico_friends[b];for(b in sonico_groups)a[b]=sonico_groups[b];
for(b in sonico_pages)a[b]=sonico_pages[b];for(b in sonico_application)a[-b]=sonico_application[b];if(typeof sonico_site_language_id!=="undefined"){var d={1:{Games:"http://games.sonico.com/","E-card":"http://greetingcards.sonico.com/",Alerts:"http://birthdaytime.sonico.com/",Photos:"http://www.sonico.com/photos.php","Find Friend":"http://www.sonico.com/friends.php?tab=add",Bands:"http://www.sonico.com/bands/bands_index.php","Public Pages":"http://www.sonico.com/publico/pages_list.php","Social Games":"http://www.sonico.com/app_directory.php"},
2:{Juegos:"http://juegos.sonico.com/",Postales:"http://greetingcards.sonico.com/","Alertas de Cumplea\u00f1os":"http://birthdaytime.sonico.com/",Fotos:"http://www.sonico.com/photos.php","Buscador de Amigos":"http://www.sonico.com/friends.php?tab=add",Bandas:"http://www.sonico.com/bandas/bands_index.php","Paginas Publicas":"http://www.sonico.com/publico/pages_list.php","Juegos Sociales":"http://www.sonico.com/app_directory.php"},3:{Jogos:"http://jogos.sonico.com/","Cart\u00f5es":"http://seucartao.sonico.com/",
Alertas:"http://alertas.sonico.com/",Fotos:"http://www.sonico.com/photos.php","Buscador de Amigos":"http://www.sonico.com/friends.php?tab=add",Bandas:"http://www.sonico.com/bandas/bands_index.php","Paginas Publicas":"http://www.sonico.com/publico/pages_list.php","Jogos Sociais":"http://www.sonico.com/app_directory.php"}},e=1;for(b in d[sonico_site_language_id]){a[e]=b;e+=1}}if(typeof text_=="undefined")text_=_("Buscar...");$("#quick").autocomplete(a,{onItemSelect:function(f){if(f.selectValue<1E3&&
f.selectValue>=0){window.location=d[sonico_site_language_id][f.selectOption];return false}window.location=f.selectValue>=9E8?sonico_url+"groups_index.php?gid="+f.selectValue:f.selectValue>=5E8?sonico_url+"publico/pages_index.php?fpid="+f.selectValue:f.selectValue<0?sonico_url+"apps/games/preview?appId="+-f.selectValue:sonico_url+"profile.php?u="+f.selectValue},maxItemsToShow:10,extraResultsCSS:{top:$("#quick").offset().top,left:$("#quick").offset().left},resultsID:"quicksearch-autocomplete",delay:10,
formatItem:sidebarformatItem,defaultText:text_,resultsDivClass:"autocomplete"}).focus(function(){qSearchHasLoaded||sajax({timeout:1E4,action:"QuickSearch",actionMethod:"Search",data:{cacheHeaders:"1"},response:function(f){for(var g in f.res.names){var j=f.res.names[g];sonico_friends[g]=j;a[g]=j;sonico_friends_photos[g]=f.res.photos[g];sonico_qs_extra[g]=f.res.qs_extra[g]}}});qSearchHasLoaded=true})}
function closeUserPreferenceBox(a,b){var d=function(){alert(_("Hubo un error, por favor vuelva a intentar."));$("#"+b).show()};$("#"+b).fadeOut(100);upUserPreference(a,1)}function upUserPreference(a,b){sajax({action:"UpdateUserPreference",data:{preference:a,value:b},error:function(){},response:function(d){if(d.error){errorF();return false}}})}
(function(a){sonico.ajax=function(b){b=a.extend({data:{},url:"/ajax_action.php",param:"action",error:function(){alert(_("Ops! Internet no es perfecto, intenta de nuevo."))},response:function(){},method:"POST",type:"json",timeout:1E4},b);var d=b.url+"?"+b.param+"="+b.action+"&sST="+__sST__;if(b.actionMethod)d+="&actionMethod="+b.actionMethod;if(b.type=="html")d+="&callType=html";a.ajax({timeout:b.timeout,type:b.method,dataType:b.type,url:d,data:b.data,error:b.error,success:b.response});return false}})(jQuery);
sajax=sonico.ajax;var faviconUtils={change:function(a){this.addLink(a)},addLink:function(a){var b=document.createElement("link");b.type="image/vnd.microsoft.icon";b.rel="shortcut icon";b.href=a;this.removeLinkIfExists();this.docHead.appendChild(b)},removeLinkIfExists:function(){for(var a=this.docHead.getElementsByTagName("link"),b=0;b<a.length;b++)a[b].rel=="shortcut icon"&&this.docHead.removeChild(a[b])},docHead:document.getElementsByTagName("head")[0]},_errorLog=[],_adActive=0;
function myOnError(a,b,d){if(typeof _errorLog[a+d]==="undefined"){_errorLog[a+d]=1;if(Math.random()*1E4%100>_trErrPer)return true;try{analyticsTrackEvent("js-error",_sonico_ref_page,a+",line:"+d)}catch(e){}}return true}function selectICByImage(a){for(var b=document.getElementById("w_import_opt"),d=b.length,e=0;e++<d;)if(b.options[e].text&&b.options[e].text.match(a)){document.getElementById("w_import_opt").selectedIndex=e;d=0}}
function page(a,b,d){if(!(a<1)){document.getElementById(b).value=a;document.getElementById(d).submit()}}var _gaq=_gaq||[];function analyticsTrackEvent(a,b,d,e){var f;try{return isNaN(f=parseInt(e,10))?_gaq.push(["_trackEvent",a,b,d]):_gaq.push(["_trackEvent",a,b,d,f])}catch(g){}return false}
function viewMoreComments2(a,b,d,e,f){var g=$(a),j=$("#ch-"+b);a=j.html();j.html("");g.parent().after(a);if(d){g.hide().parent().find(".s-loading").show();d=e;if(g.data("offset")){d=g.data("offset")+e;g.data("offset",d)}else g.data("offset",e);f.offset=d;sajax({action:"Comments",actionMethod:"getMore",data:f,type:"html",response:function(l){if(l.substr(0,1)=="0"){l=l.substr(1);g.parent().after(l);l="";g.html(_("Ocultar")).attr("onclick","").click(function(){var m=g.text()==_("Mostrar")?_("Ocultar"):
_("Mostrar");g.html(m).parent().parent().find("dl").toggle()})}j.html(l);g.show().parent().find(".s-loading").hide()}})}else g.parent().hide()}
(function(){sonico.async=function(a,b){setTimeout(function(){for(var d in a){var e;if(b=="js"){e=document.createElement("script");e.src=static_host_sonico_nocdn+a[d];e.type="text/javascript"}else{e=document.createElement("link");e.rel="stylesheet";e.type="text/css";e.href=static_host_sonico_nocdn+a[d]}try{document.getElementsByTagName("head")[0].appendChild(e)}catch(f){}}},0)}})();
function toogleSidebarMenu(a){$("#nav-site li.collapse").toggle();a=$(a);var b=a.find("a");b.text(b.text()==_("4 mas")?_("Ver menos"):_("4 mas"));a.find(".icon").toggleClass("i-arrowBlueDown");a.find(".icon").toggleClass("i-arrowBlueUp")}function relocateAds(a){try{var b=$("#"+a+"_src"),d=$("#"+a),e=0,f=0;b.css({position:"absolute",width:d.width()}).show();function g(){var l=d.offset();if(l!==e){e=l;b.css(l)}l=b.height();if(l!==f){f=l;d.css({height:f})}}g();setInterval(g,400)}catch(j){}}
function showPopup(a,b){var d=$("#ex2");if(d.length){d.jqm({ajax:a,modal:b}).jqmShow();d.jqm({ajax:"@src"})}else setTimeout(function(){showPopup(a,b)},500)}function showMsg(a,b,d,e,f){b=b||_("Aviso");d=d||"col-w350px";c="<div class=title>"+(e&&!f?"":'<a href="#" onclick="'+(f?f:"$('#ex2').jqmHide();")+'" class="link-close jqmClose"><span class="icon i-close"></span></a>')+"<h1>"+b+'</h1></div><div class="content f-wrap">'+a+"</div>";showClientPopup(c,d,e)}
function showClientPopup(a,b,d){b=b||"col-w350px";var e='<div id=popito class="'+b+'"><table><tr><td class=b colspan=3></td></tr><tr><td class=b></td><td>'+a+"</td><td class=b></td></tr><tr><td class=b colspan=3></td></tr></table></div>";if($("#ex2").length){d&&$("#ex2").jqm({modal:true});$("#ex2").jqmShow().html(e)}else setTimeout(function(){showClientPopup(a,b)},500)};

