function pc_aprox_col(hex){if(hex.substr(0,1)=="#"){hex=hex.substr(1)}var r_f=(17*(Math.ceil(parseInt(hex.substring(0,2),16)/17))).toString(16);r_f=r_f==0?"00":r_f;var g_f=(17*(Math.ceil(parseInt(hex.substring(2,4),16)/17))).toString(16);g_f=g_f==0?"00":g_f;var b_f=(17*(Math.ceil(parseInt(hex.substring(4,6),16)/17))).toString(16);b_f=b_f==0?"00":b_f;return r_f+g_f+b_f}function pc_apply_profile_settings(settings){var keys=["link","background","text","title"];$.each(keys,function(i,k){if(settings[k].substr(0,1)!="#"){settings[k]="#"+settings[k]}});var tit=settings.title;var txt=settings.text;var lnk=settings.link;var bkg=settings.background;var bkg2=profile_mixcolor(txt,bkg,18,false);var bkg3=profile_mixcolor(bkg,bkg2,48,false);var txt2=profile_mixcolor(txt,bkg,72,false);var tit2=profile_mixcolor(tit,bkg,84,false);var fc=pc_aprox_col(tit)+".png";var on=pc_aprox_col(lnk)+".png";var arrow=pc_aprox_col(bkg)+".png";var arrow1=pc_aprox_col(lnk)+".png";var arrow2=pc_aprox_col(bkg2)+".png";var arrow3=pc_aprox_col(tit)+".png";var arrow4=pc_aprox_col(txt2)+".png";var bkgImg="";if(settings.bgImage!=null){bkgImg=" url("+settings.bgImage+") repeat"}css="/* LOGO */.enchulado #logo { background: url("+static_host_sonico+"/img/logo/fc"+fc+") no-repeat; _display: none; }.enchulado #logo a, .enchulado #logo a:hover { background: url("+static_host_sonico+"/img/logo/on"+on+') no-repeat; }.enchulado #logo img { display: none; }/* Logo IE */.enchulado #logo-ie { height: 53px; overflow: hidden; position: absolute; width: 133px; cursor: pointer; }.enchulado #logo-ie a { display: block; height: 60px; width: 133px; cursor: pointer; }.enchulado #logo-ie { _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled=true,src="'+static_host_sonico+"/img/logo/fc"+fc+'"); }.enchulado #logo-ie a { _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled=true,src="'+static_host_sonico+"/img/logo/on"+on+'"); } /* IMAGENES */body.enchulado { background: '+bkg+bkgImg+"; }.enchulado #menu .toggler {background-image: url("+static_host_sonico+"/img/arrows/"+arrow+");background-position: right -16px;}.enchulado #menu .open .toggler {background-position: right -48px;}.enchulado #page-title .breadcrumbs li {background-image: url("+static_host_sonico+"/img/arrows/"+arrow3+");background-position: left -16px;}.enchulado .link-slide, .enchulado .link-expand {background-image: url("+static_host_sonico+"/img/arrows/"+arrow1+");}.enchulado .link-slide {background-position: right -32px;}.enchulado .link-expand {background-position: right -48px;}.enchulado .jcarousel-container-horizontal .link-prev,.enchulado .jcarousel-container-horizontal .link-next {background-image: url("+static_host_sonico+"/img/arrows/"+arrow2+");}.enchulado .jcarousel-container-horizontal .link-prev {background-position: 0 -96px !important;}.enchulado .jcarousel-container-horizontal .link-next {background-position: 0 -128px !important;}.enchulado .newsfeed-comments .tip-top {background-image: url("+static_host_sonico+"/img/arrows/"+arrow2+");background-position: -5px -37px;}/* X cerrar */.enchulado #bd .i-close { width: auto; height: auto; padding: 0 3px; background: none; color: "+txt2+"; font-size: 9px; }.enchulado #bd a:hover .i-close { background: "+bkg2+"; color: "+txt+"; }/* Newsfeed quotes */.enchulado .quotes .open, .enchulado .quotes .close {color: "+txt2+";}/* REDONDEADO ABAJO AREA CONTENIDO */.enchulado .rbc { display: none; }/* COLORES */.enchulado #hd, .enchulado #hd .dark-link,.enchulado #bd, .enchulado #bd .dark-link, .enchulado #bd a.title, .enchulado #page-title .flag,.enchulado #ft .container, .ftlogged dl dd {color: "+txt+" !important;}.enchulado #bd h2, .enchulado #bd h3, .enchulado #bd h4, .enchulado #bd h5, .enchulado #bd h6 { color: "+tit+"; }.enchulado #hd a, .enchulado #bd a, .enchulado #ft a { color: "+lnk+"; } .enchulado .btn-plus, .enchulado .btn-plus:hover { color: "+lnk+" !important; }.enchulado .ftlogged-cont .note, .enchulado #ft .note { color: "+lnk+" !important; }.enchulado #bd .pager .current { background-color: "+lnk+"; color: "+bkg+"; }.enchulado #dashboard { padding-right: .4em; padding-left: .4em; background: "+bkg+"; }.enchulado #lang-select { border-color: "+bkg2+" !important; background: "+bkg3+" !important; }.enchulado #ft { background: "+bkg3+"; }.enchulado #ft .nav { color: "+txt2+"; }.enchulado #menu, .enchulado #menu-r { background: "+tit+"; } .enchulado #menu-wrap, .enchulado #menu-r-wrap { background: none; }.enchulado #menu { color: "+bkg3+"; }.enchulado #menu a { color: "+bkg+"; }.enchulado #menu .edit-tools a { color: "+bkg2+" !important; }.enchulado #menu .nav, .enchulado #menu .apps, .enchulado #menu .txtinput, .enchulado #menu #quick-btn, .enchulado #menu #invitefriend { border-color: "+tit2+"; }.enchulado #menu .nav .open { background: "+tit2+"; }.enchulado #menu .tag, .enchulado #menu .tag span { background: "+bkg3+"; }.enchulado #menu .tag a { color: "+tit+"; }.enchulado #page-title { background: "+bkg2+"; } .enchulado #page-title .title { background: none; }.enchulado #page-title .nav-tabs li, .enchulado #page-title .nav-tabs a { background: "+bkg3+"; color: "+txt2+"; }.enchulado #page-title .nav-tabs a { padding-bottom: 5px; }.enchulado #page-title .nav-tabs .current-tab, .enchulado #page-title .nav-tabs .current-tab a, .enchulado #page-title .nav-tabs li:hover, .enchulado #page-title .nav-tabs a:hover { background: "+bkg+"; color: "+txt+"; }.enchulado #content-wrap { border-color: "+bkg+" "+bkg2+" "+bkg2+"; background: "+bkg+"; }.enchulado #bd .box-highlight, .enchulado #bd .box-highlight .rt b, .enchulado #bd .box-highlight .rb b { background-color: "+bkg3+";  }.enchulado #bd .box-highlight .rt, .enchulado #bd .box-highlight .rb { background-color: "+bkg+";  }.enchulado .col-w305px .box-highlight, .enchulado .col-w305px .box-highlight .rt b, .enchulado .col-w305px .box-highlight .rb b { background-color: "+bkg+";  }.enchulado .col-w305px .box-highlight .rt, .enchulado .col-w305px .box-highlight .rb, .enchulado .ftlogged { background-color: "+bkg2+"; }.enchulado .jScrollPaneTrack { background-color: "+bkg3+"; }.enchulado .jScrollPaneDrag { background-color: "+lnk+"; }.enchulado #bd .underline, .enchulado #bd .overline, .enchulado .user-info .acts ul { border-color: "+bkg3+"; }.enchulado #bd .datetime, .enchulado #bd .note, .enchulado #bd .info dt, .enchulado .ad300x250 .edit-tools a, .enchulado .ad120x600 .edit-tools a, .enchulado .newsfeed-metadata { color: "+txt2+" !important; }.enchulado #bd .txtinput, .enchulado #bd .txtarea, .enchulado #bd .select, .enchulado #bd .select-inline, .enchulado #bd .select-block, .enchulado #bd .select-friends-list { border-color: "+bkg2+"; }.enchulado .profile-photos .empty a { border-color: "+bkg2+"; color: "+lnk+"; }.enchulado .profile-photos .empty a:hover { background-color: "+bkg3+"; }.enchulado .profile-photos .empty a.nohover { background-color: "+bkg+"; }.enchulado .profile-friends .empty a { border-color: "+bkg+"; color: "+lnk+"; }.enchulado .profile-friends .empty a:hover { background-color: "+bkg3+"; }/* NEWSFEED y CARTELERA */.enchulado .board { margin-left: 0; background: "+tit+"; color: "+bkg+"; } .enchulado .board .ebox-tl, .enchulado .board .ebox-bl, .enchulado .board .ebox-bl .ebox-br { background: none; }.enchulado .board .nav-tabs { margin-left: -8px; }.enchulado .board .nav-tabs .current-tab, .enchulado .board .nav-tabs .current-tab a { border-color: "+tit+"; background: "+tit+"; }.enchulado .board .nav-tabs .current-tab a { color: "+bkg+" !important; }.enchulado .board .nav-tabs a, .enchulado .board .nav-tabs a:hover { color: "+lnk+"; }.enchulado .board .ebox-bl .ebox-br a { color: "+bkg2+"; }.enchulado .board .form dt, .enchulado .board .note { color: "+bkg2+" !important; }.enchulado .jcarousel-container .thumb { border-color: "+bkg2+" !important; }.enchulado .status-comments, .enchulado .status-comments .new-msg { border-color: "+bkg2+"; background: none; }.enchulado .newsfeed dd.user-msg, .enchulado .status-comments .new-msg, .enchulado .new-photo-comments dl.user-comment, .enchulado dd.video-comments dl.user-comment, .enchulado dd.video-comments .new-msg, .enchulado .new-photo-comments .new-msg { background: "+bkg3+"; }.enchulado #bd a.thumb-frame img, .enchulado #bd img.thumb-frame { background: "+bkg3+"; border-color: "+txt+"; }.enchulado #bd a.thumb-frame:hover img { border-color: "+lnk+"; }/* COLUMNA DERECHA */.enchulado .col-w305px { min-height: 715px; _height: 715px; margin-top: -11px; background-color: "+bkg2+"; }.enchulado .profile-event dt span { background: "+txt+"; color: "+bkg+"; }.enchulado .profile-event dt strong { border-color: "+txt+"; color: "+txt+"; }.enchulado .se-hover { background-color: "+bkg3+"; }.enchulado .col-w305px .calendar caption { background-color: "+bkg+"; }.enchulado .col-w305px .calendar caption .prev, .enchulado .col-w305px .calendar caption .next { background-color: "+lnk+"; color: "+bkg+" !important; }.enchulado .col-w305px .calendar thead th, .enchulado .col-w305px .calendar span.quiet { color: "+txt2+"; }.enchulado .col-w305px .calendar .today { border-color: "+bkg+"; background-color: "+bkg3+"; color: "+lnk+"; }/* ESPECIFICO DE PERFIL DE USUARIO */.enchulado #profileUserPhoto .hover {border-color: "+lnk+"; background-color: "+bkg+";}.enchulado #profileUserPhoto .box-msg {background-color: "+lnk+";}.enchulado #profileUserPhoto .box-msg .dark-link {color: "+bkg+" !important;}.enchulado #profileMedia .list-photos-grid .thumb {color: "+bkg+";}.enchulado #profileMedia .list-photos-grid .thumb:hover {color: "+txt2+";}.enchulado #profileMedia .list-photos-grid span.thumb {border-color: "+txt2+";}.enchulado .pager-buttons .arrow, .enchulado .pager-buttons .xbl, .enchulado .pager-buttons .xbr {border-color: "+txt2+";}.enchulado .pager-buttons a:hover .arrow, .enchulado .pager-buttons a:hover .xbl, .enchulado .pager-buttons a:hover .xbr {border-color: "+lnk+";}.enchulado .pager-buttons .current .arrow, .enchulado .pager-buttons .current .xbl, .enchulado .pager-buttons .current .xbr {border-color: "+bkg2+" !important;}.enchulado .pager-buttons .arrow {background-color: "+bkg+";background-image: url("+static_host_sonico+"/img/arrows/"+arrow4+");}.enchulado .pager-buttons a:hover .arrow {background-color: "+lnk+";background-image: url("+static_host_sonico+"/img/arrows/"+arrow+");}.enchulado .pager-buttons .current .arrow {background-color: "+bkg3+" !important;background-image: url("+static_host_sonico+"/img/arrows/"+arrow2+") !important;}.enchulado .pager-buttons .link-prev .arrow {background-position: 0 -64px !important;}.enchulado .pager-buttons .link-next .arrow {background-position: 0 -80px !important;}/* ESPECIFICO DE PERFIL DE FAN PAGE */.enchulado .info-other dt {color: "+txt2+";}/* NUEVO NEWSFEED Y CAJAS */.enchulado #content-wrap .nav-filter .current .t1,.enchulado #content-wrap .nav-filter .current .t2 {border-color: "+bkg+"; background-color: "+tit+";}.enchulado #content-wrap .nav-filter .current strong,.enchulado #content-wrap .nav-filter .current a {background-color: "+tit+"; color: "+bkg+";}.enchulado #content-wrap .nav-filter,.enchulado #content-wrap .nFtLnks .current, .enchulado #content-wrap .nFtBox, .enchulado .content-clipping,.enchulado .newsfeed-comments,.enchulado .newsfeed-comments .rt, .enchulado .newsfeed-comments .rb {border-color: "+bkg2+";}.enchulado .newsfeed .content-clipping .rt,.enchulado .newsfeed .content-clipping .rb {background-color: "+bkg3+";}.enchulado .newsfeed-comments,.enchulado #content-wrap .nFtBox,.enchulado #content-wrap .nFtLnks .current,.enchulado .newsfeed-comments .user-comment,.enchulado .newsfeed-comments .old-msg,.enchulado .newsfeed-comments .new-msg {background-color: "+bkg3+";}.enchulado .newsfeed-comments .old-msg,.enchulado .newsfeed-comments .user-comment {border-color: "+bkg+";}.enchulado .xbx .xbcont,.enchulado .xb2,.enchulado .box-app-content {border-color: "+bkg3+"; background-color: "+bkg+";}.enchulado .xb1  {background-color: "+bkg3+";}.enchulado .xbx.sub .xbot .xb1, .enchulado .xbx.sub .xbot .xb2, .enchulado .xbx.sub .sublnk {border-color: "+bkg3+"; background-color: "+bkg3+";}.enchulado .xbx.sub .sublnk a {color: "+txt+";}.enchulado .xbx.grey .xbcont,.enchulado .xbx.grey .xb2 {border-color: "+bkg3+"; background-color: "+bkg2+";}.enchulado .xbx.grey .xb1 {background-color: "+bkg3+";}.enchulado #shareAttach .nav-tabs .current .xbl, .enchulado #shareAttach .nav-tabs .current .xbr {background: "+bkg+"; border-color: "+bkg2+";}.enchulado #shareAttach .nav-tabs .current {background: "+bkg+";}.enchulado #shareAttach .nav-tabs .current a {border-color: "+bkg+";}.enchulado #shareAttachContent.xbx.white .xb2, .enchulado #shareAttachContent.xbx.white .xbcont { background: "+bkg+"; border-color: "+bkg3+"; } .enchulado #shareAttachContent.xbx.white .xb1 { background: "+bkg3+"; }.enchulado #shareAttachContent.xbx.white #attachGiftFilter,.enchulado .nav-attachtype li {border-color: "+bkg3+";}.enchulado .nav-attachtype a:hover {background: "+bkg3+";}/* Anula enchule en partes especificas */.enchulado #quicksearch-autocomplete .dark-link, .enchulado .box-msg, .enchulado .box-msg h2, .enchulado .xbx.yellow { color: #1E1E1E !important; }.enchulado .thumb .txt { color: #3860A9; }.enchulado .xbx.yellow .xb2, .enchulado .xbx.yellow .xbcont { background-color: #FCFCC6; border-color: #E1CF85; } .enchulado .xbx.yellow .xb1 { background-color: #E1CF85; }.enchulado .box-msg a { color: #0156ee !important; }/* interior caja personalizar perfil */.enchulado #customize .i-close { width: 13px; height: 13px; padding: 0; background: url(http://st2.sonicocnt.com/3/img/sprite.png) -2px -993px; font-size: 0; }.enchulado #customize a:hover .i-close { background: #fff url(http://st2.sonicocnt.com/3/img/sprite.png) -2px -1025px; }.enchulado #customize .i-close { _background-image: url(http://st2.sonicocnt.com/3/img/spriteIE6.png) !important; }.enchulado #customize .content .arrow, .enchulado #customize .content .link-prev, .enchulado #customize .content .link-next { background-image: url(http://st2.sonicocnt.com/3/img/sprite.png) !important; _background-image: url(http://st2.sonicocnt.com/3/img/spriteIE6.png) !important; }.enchulado #customize .content a { color: #3860A9 !important; }.enchulado #customize .content, .enchulado #customize .current-tab a, .enchulado #customize .content .dark-link { color: #1E1E1E !important; }.enchulado #customize .content .note { color: #666 !important; }.enchulado #customize .content .underline, .enchulado #customize .content .overline { border-color: #D8DFEA !important; }";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=css}else{$(pc_profile_dynamic_style).text(css)}if(settings.ttlImage){$ccTitleImage.attr("src",settings.ttlImage);$ccTitleImage.show()}else{$ccTitleImage.hide()}}function pc_get_colors(){var greys=["000000","111111","333333","444444","555555","777777","999999","AAAAAA","CCCCCC","DDDDDD","EEEEEE","FFFFFF"];var colors=[];var pos=0;var rl={1:"00",2:"33",3:"66"};var rh={1:"99",2:"CC",3:"FF"};var gba={1:"00",2:"33",3:"66",4:"99",5:"CC",6:"FF"};for(n=1;n<=228;n++){if(((n-1)%19)==0){colors.push(greys[((n-1)/19)]);continue}pos=n-Math.ceil(n/19);colors.push((pos<=108?rl[Math.ceil((pos-18*(Math.ceil(pos/18)-1))/6)]:rh[Math.ceil((pos-18*(Math.ceil(pos/18)-1))/6)])+gba[pos-6*(Math.ceil(pos/6)-1)]+gba[Math.ceil((pos-108*(Math.ceil(pos/108)-1))/18)])}return colors}pc_customization_rows={pc_txt_col_box:"pc_txt_cust_row",pc_bg_col_box:"pc_bg_cust_row",pc_lnk_col_box:"pc_lnk_cust_row",pc_ttl_col_box:"pc_ttl_cust_row"};function pc_build_palette(){var colors=pc_get_colors();for(i in colors){$('<li style="background:#'+colors[i]+'" hexColor="#'+colors[i]+'" onclick="pc_preview_color(\'#'+colors[i]+"')\">&nbsp;</li>").appendTo($ccPul)}pc_loaded_palette=true}function pc_has_changes(){var changed=false;for(i in profile_customization){if(profile_customization[i]!=pc_preview_settings[i]){changed=true;break}}if(changed){$ccSaveButton.attr("disabled",false);$ccCancelButton.val(i18n.Cancelar)}else{$ccSaveButton.attr("disabled",true);$ccCancelButton.val(i18n.Cerrar)}return changed}function pc_start_customization(e){if(!$("body").hasClass("enchulado")){if(profile_customization.ttlImage){$("#pc_title_image").attr("src",profile_customization.ttlImage).show()}else{$("#pc_title_image").hide()}$("body").addClass("enchulado");$("#im-iframe iframe").contents().find("body").addClass("enchulado");$("#switch-enchule").text("on");setViewColors("0")}$pc_container.css({top:e.pageY-8,left:e.pageX-20}).show();if(!pc_loaded_palette){pc_build_palette()}}function pc_start_color_chooser(e){$ccSaveButton.attr("disabled",true);$ccCancelButton.attr("disabled",true);ccCurrentTarget=e.target.id;$curTarget=$("#"+ccCurrentTarget);$("#"+pc_customization_rows[e.target.id]).show();for(k in pc_customization_rows){if(k!=e.target.id){$("#"+pc_customization_rows[k]).hide()}}$ccHexInput.val(e.target.getAttribute("currHexColor"));$(".pc_cambiar_lnk").hide();$ccdiv.show()}function pc_go_to_colors_customization(){$ccDivImages.hide();$ccDivColors.show()}function pc_go_to_images_customization(){if(pc_has_changes()){if(!confirm(i18n["Tienes cambios sin guardar, continuar?"])){return}pc_sync_customization(profile_customization);pc_sync_images_divs()}$ccDivColors.hide();$ccDivImages.show()}function pc_abort_customization(e){if(pc_has_changes()){if(!confirm(i18n["Tienes cambios sin guardar, continuar?"])){return}pc_sync_customization(profile_customization);pc_sync_images_divs()}pc_reset_customization();$pc_container.hide();$(".s-Ads").show()}function pc_stop_color_chooser(apply){$ccSaveButton.attr("disabled",false);$ccCancelButton.attr("disabled",false);if(apply){$curTarget.css("background",$curTarget.attr("currHexColor"));pc_preview_settings[$curTarget.attr("target")]=$curTarget.attr("currHexColor")}else{pc_apply_profile_settings(pc_preview_settings)}for(k in pc_customization_rows){$("#"+pc_customization_rows[k]).show()}pc_has_changes();$(".pc_cambiar_lnk").show();$ccdiv.hide()}function pc_preview_color(hex){var tmp={text:"pc_txt_col_box",background:"pc_bg_col_box",link:"pc_lnk_col_box",title:"pc_ttl_col_box"};var tmp2={};for(k in pc_preview_settings){tmp2[k]=pc_preview_settings[k]}tmp2[$curTarget.attr("target")]=hex;$curTarget.css("background",hex).attr("currHexColor",hex);$ccHexInput.val(hex.toUpperCase());pc_apply_profile_settings(tmp2)}function pc_color_input(){var val=$ccHexInput.val();if(val.substr(0,1)!="#"){val="#"+val}if(val.match(new RegExp("^#[0-9a-fA-F]{6}$"))){pc_preview_color(val)}}function pc_sync_customization(settings){pc_apply_profile_settings(settings);for(k in settings){pc_preview_settings[k]=settings[k]}$.each($("td.color_box"),function(i,n){var hex=settings[n.getAttribute("target")];if(hex.substr(0,1)!="#"){hex="#"+hex}n.setAttribute("currHexColor",hex);n.style.background=hex});if(settings.template){var seli=null;for(i=0;i<ccTemplateSelect.options.length;i++){if(ccTemplateSelect.options[i].value==settings.template){seli=i;break}}ccTemplateSelect.selectedIndex=seli}else{ccTemplateSelect.selectedIndex=0}}function pc_sync_images_divs(){if(profile_customization.bgImage){$ccBgImageDelDiv.show();$ccBgImageUpDiv.hide();$ccImgBck.attr("src",profile_customization.bgImage)}else{$ccBgImageDelDiv.hide();$ccBgImageUpDiv.show();$ccImgBck.attr("src","")}if(profile_customization.ttlImage){$ccTtlImageDelDiv.show();$ccTtlImageUpDiv.hide();$ccImgTitle.attr("src",profile_customization.ttlImage)}else{$ccTtlImageDelDiv.hide();$ccTtlImageUpDiv.show();$ccImgTitle.attr("src","")}}function pc_reset_customization(){pc_apply_profile_settings(profile_customization);for(k in profile_customization){pc_preview_settings[k]=profile_customization[k]}$.each($("td.color_box"),function(i,n){var hex=profile_customization[n.getAttribute("target")];if(hex.substr(0,1)!="#"){hex="#"+hex}n.setAttribute("hexColor",hex);n.setAttribute("currHexColor",hex);n.style.background=hex})}function pc_save_customization(){$.ajax({url:"/profile_save_customization.php",type:"POST",data:pc_preview_settings,dataType:"json",error:function(msg){window.alert(i18n["Ha habido un error, por favor intente nuevamente en unos minutos"])},success:function(resp){if(resp.text){profile_customization=resp;pc_reset_customization();pc_sync_images_divs();pc_has_changes()}}});$(".s-Ads").show()}function pc_delete_image(type){if(!window.confirm(i18n["Esta seguro?"])){return}$.ajax({url:"/profile_save_customization.php",type:"POST",data:"delete_image="+type,dataType:"json",error:function(msg){window.alert(i18n["Ha habido un error, por favor intente nuevamente en unos minutos"])},success:function(resp){if(resp.text){profile_customization=resp;pc_reset_customization();pc_sync_images_divs();pc_has_changes()}}})}function pc_change_template(name){if(name=="custom"){return false}pc_sync_customization(name=="personal"?profile_customization:sonico_templates[name]);pc_has_changes()}function profile_mixcolor(fg,bg,opacity,d){var f=new Array();var b=new Array();var add=new Array();var out=new Array();f[0]=parseInt((fg.charAt(1)+fg.charAt(2)),16);f[1]=parseInt((fg.charAt(3)+fg.charAt(4)),16);f[2]=parseInt((fg.charAt(5)+fg.charAt(6)),16);b[0]=parseInt((bg.charAt(1)+bg.charAt(2)),16);b[1]=parseInt((bg.charAt(3)+bg.charAt(4)),16);b[2]=parseInt((bg.charAt(5)+bg.charAt(6)),16);add[0]=(f[0]-b[0])/100;add[1]=(f[1]-b[1])/100;add[2]=(f[2]-b[2])/100;b[0]+=parseInt(add[0]*opacity);b[1]+=parseInt(add[1]*opacity);b[2]+=parseInt(add[2]*opacity);out[0]=b[0].toString(16);out[1]=b[1].toString(16);out[2]=b[2].toString(16);if(out[0].length==1){out[0]="0"+out[0]}if(out[1].length==1){out[1]="0"+out[1]}if(out[2].length==1){out[2]="0"+out[2]}var ret=out[0]+out[1]+out[2];if(d){return ret}return"#"+ret.toUpperCase()}function setViewColors(v){$.ajax({url:"/ajax_responser.php",type:"POST",data:{action:"hide_colors",colors:v},dataType:"json"});return true}function setLaboralNoticeOff(v){$.ajax({url:"/ajax_responser.php",type:"POST",data:{action:"laboral_notice"},dataType:"json"});return true}function setTTColorsOff(v){$.ajax({url:"/ajax_responser.php",type:"POST",data:{action:"hide_tt_colors"},dataType:"json"});return true}function toggleColors(){if($("body").hasClass("enchulado")){$("#pc_title_image").hide();$("body").removeClass("enchulado");$("#im-iframe iframe").contents().find("body").removeClass("enchulado");$("#switch-enchule").text("on");setViewColors("1")}else{if(profile_customization.ttlImage){$("#pc_title_image").attr("src",profile_customization.ttlImage).show()}else{$("#pc_title_image").hide()}$("body").addClass("enchulado");$("#im-iframe iframe").contents().find("body").addClass("enchulado");$("#switch-enchule").text("off");setViewColors("0")}}function rzContent(){var content=$("#content-wrap");$(".col-w500px,.col-w305px",content).height("auto");var col1=$(".col-w500px",content);var col2=$(".col-w305px",content);var col1h=col1.height();var col2h=col2.height();if(col1h>col2h){col2.height(col1h+12)}else{if(col2h>col1h){col1.height(col2h)}}}$(document).ready(function(){rzContent()});