function rolloverImg(b,a){doc=document;el=doc.getElementById(b);if(!el.oldSrc){el.oldSrc=el.src}el.src=a;el.onmouseout=function(){restoreImg()};doc.currentHover=b}function trim(a){return a.replace(/^\s+|\s+$/g,"")}String.prototype.ucfirst=function(){var a=this.split(/\s+/g);for(var b=0;b<a.length;b++){var c=a[b].match(/(\w)(\w*)/);a[b]=c[1].toUpperCase()+c[2].toLowerCase()}return a.join(" ")};function urlencode(a){return escape(a).replace(/\+/g,"%2B").replace(/%20/g,"+").replace(/\*/g,"%2A").replace(/\//g,"%2F").replace(/@/g,"%40")}function restoreImg(){doc=document;id=doc.currentHover;el=doc.getElementById(id);el.src=el.oldSrc}function check_email(a){at=a.indexOf("@");dot=a.indexOf(".",at);last_at=a.lastIndexOf("@");last_dot=a.lastIndexOf(".");if(at>0&&dot>0&&(dot-at)>1&&a.length-dot>1&&last_at==at&&a.length>5){valid="1"}else{valid="0"}return valid}function show_and_hide(b,a){document.getElementById(b).style.display="block";document.getElementById(a).style.display="none"}function pop_up(c,b,e,a){w=(document.body.clientWidth-e)/2;h=(document.body.clientHeight)/2;window.open(c,b,"width="+e+",height="+a+",menubar=no,left="+w+",top="+h+",screenX="+w+",screenY="+h+"")}function write_editor(a){parent.frame_editor.document.write(a)}function show_hide(a){if(jQuery("#"+a).css("display")=="none"){jQuery("#"+a).css("display","block")}else{jQuery("#"+a).css("display","none")}}function show_hide_check(a){alert("You must login to add a review.")}function increase_height(b){var a=parseInt(document.getElementById(b).style.height);var a=a+50;document.getElementById(b).style.height=a+"px"}function decrease_height(b){var a=parseInt(document.getElementById(b).style.height);if(a>50){var a=a-50;document.getElementById(b).style.height=a+"px"}else{alert("Minimum height reached")}}function add_emot(b,a){document.getElementById(b).value=document.getElementById(b).value+a;document.getElementById(b).focus()}function over(b,a){document.getElementById(b).style.backgroundColor="#"+a}function out(a){document.getElementById(a).style.backgroundColor=""}function over_u(a){document.getElementById("usermenu"+a).style.backgroundColor="#83c274";document.getElementById("usermenu"+a).style.padding="2";document.getElementById("userlink"+a).style.color="#ffffff";document.getElementById("userlink"+a).style.fontWeight="bold"}function out_u(a){document.getElementById("usermenu"+a).style.backgroundColor="";document.getElementById("usermenu"+a).style.padding="2";document.getElementById("userlink"+a).style.color="#000000";document.getElementById("userlink"+a).style.fontWeight="normal"}function show(a){document.getElementById(a).style.display="block"}function hide(a){document.getElementById(a).style.display="none"}function click_search(a){if(a=="all"){document.getElementById("quizz").value="yes";document.getElementById("shopping").value="yes";document.getElementById("answers").value="yes";document.getElementById("tips").value="yes";document.getElementById("my_looks").value="yes"}else{document.getElementById("quizz").value="";document.getElementById("shopping").value="";document.getElementById("answers").value="";document.getElementById("tips").value="";document.getElementById("my_looks").value="";document.getElementById(a).value="yes"}}function browser_detection(){browser_version=parseInt(navigator.appVersion);browser_type=navigator.appName;if(browser_type=="Microsoft Internet Explorer"&&(browser_version>=4)){var a="ie"}else{var a="other"}return a}function hover_star(a,b,c){if(!c){c="/icons/star_hover.gif"}for(i=1;i<=b;i++){el=document.getElementById(a+i);el.oSrc=el.src;el.src=c}}function out_star(a,b){for(i=1;i<=b;i++){el=document.getElementById(a+i);el.src=el.oSrc}}function rateIt(b,a){d=document;dv=d.getElementById("rating"+b);dv.innerHTML='<img src="http://www.becomegorgeous.com/inc/files/loader_rate.gif" alt="">';runFile(a)}function search_type(a){types=new Array("web","encyclopedia","store","all","videos");for(i=0;i<types.length;i++){document.getElementById("search_"+types[i]).style.cursor="pointer";document.getElementById("search_"+types[i]).style.fontWeight="";document.getElementById("search_"+types[i]).onClick='search_type("'+types[i]+'")'}document.getElementById("search_"+a).style.cursor="";document.getElementById("search_"+a).style.fontWeight="bold";document.getElementById("search_"+a).onClick="";document.getElementById("search_type").value=a}function check_search(){if(document.getElementById("search_type").value=="web"){document.getElementById("search_form").target="_blank"}else{document.getElementById("search_form").target=""}el=document.getElementById("search_keyword");if(el.value.length<3){alert("Your keyword has to be at least 3 characters");el.focus();return false}}function preload_images(a,b){b=b.split(";");for(i=0;i<b.length;i++){img=new Image();img.src=a+b[i]}}function changeValue(a){d=document;el=d.getElementById(a);if(!el.oldValue){el.oldValue=el.value}val=el.oldValue;if(el.value==el.oldValue){el.focus();el.value="";el.onblur=function(){returnValue(a)}}}function returnValue(a){d=document;el=d.getElementById(a);if(el.value==""){el.value=el.oldValue}}if(navigator.appVersion.indexOf("MSIE")!==-1){function correctPNG(){var j=navigator.appVersion.split("MSIE");var k=parseFloat(j[1]);if((k>=5.5)&&(document.body.filters)){for(var c=0;c<document.images.length;c++){var e=document.images[c];var m=e.src.toUpperCase();if(m.substring(m.length-3,m.length)=="PNG"){var g=(e.id)?"id='"+e.id+"' ":"";var n=(e.className)?"class='"+e.className+"' ":"";var b=(e.title)?"title='"+e.title+"' ":"title='"+e.alt+"' ";var l="display:inline-block;"+e.style.cssText;if(e.align=="left"){l="float:left;"+l}if(e.align=="right"){l="float:right;"+l}if(e.parentElement.href){l="cursor:hand;"+l}var a="<span "+g+n+b+' style="width:'+e.width+"px; height:"+e.height+"px;"+l+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e.src+"', sizingMethod='scale');\"></span>";e.outerHTML=a;c=c-1}}}}window.attachEvent("onload",correctPNG)}function runFile(a){d=document;ifr=d.getElementById("hiddenIfr");ifr.src=a}function getElementPosition(e){var a=document.getElementById(e);var c=0;var b=0;while(a){c+=a.offsetLeft;b+=a.offsetTop;a=a.offsetParent}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"){c+=document.body.leftMargin;b+=document.body.topMargin}return{left:c,top:b}}function getEl(a){return document.getElementById(a)}function forms(){this.toCheck=new Array();this.checkPass=new Array();this.checkEmails=new Array();this.message="";this.alertMsg="";this.createMessage=true;this.check=function(){var a=true;var c=document;var b;if(this.alertMsg==""){this.alertMsg="You must fill all the fields marked with ' * '"}for(i=0;i<this.toCheck.length;i++){el=c.getElementById(this.toCheck[i]);if(trim(el.value)==""||el.value==" "){if(a){b=el}a=false;el.style.backgroundImage="url(http://www.becomegorgeous.com/images/inp_check.gif)"}else{el.style.backgroundImage="url(http://www.becomegorgeous.com/images/inp.gif)"}}if(this.checkPass.length==2){el1=c.getElementById(this.checkPass[0]);el2=c.getElementById(this.checkPass[1]);if(el1.value!==el2.value&&a==true){alert("The password does not match with its confirmation");el1.style.backgroundImage="url(http://www.becomegorgeous.com/images/inp_check.gif)";el2.style.backgroundImage="url(http://www.becomegorgeous.com/images/inp_check.gif)";el1.focus();return false}else{if(a==true){el1.style.backgroundImage="url(http://www.becomegorgeous.com/images/inp.gif)";el2.style.backgroundImage="url(http://www.becomegorgeous.com/images/inp.gif)"}}}ems=true;for(i=0;i<this.checkEmails.length;i++){el=c.getElementById(this.checkEmails[i]);if(check_email(el.value)==0&&a==true&&ems==true){el.style.backgroundImage="url(http://www.becomegorgeous.com/images/inp_check.gif)";el.focus();alert("Email address incorrect");ems=false;return false}else{if(a==true){el.style.backgroundImage="url(http://www.becomegorgeous.com/images/inp.gif)"}}}if(a==false){b.focus();alert(this.alertMsg);return false}else{return true}};this.send=function(c,b,a){d=document;f=d.getElementById(c);if(!a){a="formResult"}resDiv=d.getElementById(a);f.target="hiddenIfr";f.action=b;resDiv.style.display="block";if(this.createMessage){resDiv.innerHTML="<div class='success'>"+this.message+"<br><center><img src='http://www.becomegorgeous.com/inc/files/loader.gif'></center></div>"}f.style.display="none";f.submit()}}function sapos(a){if(typeof(a)!=="undefined"&&a!==null){a=a.replace("'","&#39;");a=a.replace('"',"&#34;");return a}else{return""}}function nl2br(a){if(typeof(a)!=="undefined"&&a!==null){return(a+"").replace(/([^>]?)\n/g,"$1<br>\n")}}function nobr(a){if(typeof(a)!=="undefined"&&a!==null){return a.replace(/<br>/gi,"").replace(/<br \/>/gi,"")}}window.addEvent("domready",function(){$$("a.tipz").each(function(e,c){var g=e.get("title").split("::");e.store("tip:title",g[0]);e.store("tip:text",g[1])});$$("a.tipzFixed").each(function(e,c){var g=e.get("title").split("::");e.store("tip:title",g[0]);e.store("tip:text",g[1])});var a=new Tips(".tipz",{className:"tip"});var b=new Tips(".tipzFixed",{fixed:true,className:"tip"})});function checkSearchForm(){s=$("searchKeyword");if(trim(s.value).length<3){alert("You have to enter a keyword of at least 3 characters");s.focus();return false}else{return true}}function checkSearchForm2(){s=$("searchKeyword2");if(trim(s.value).length<3){alert("You have to enter a keyword of at least 3 characters");s.focus();return false}else{return true}}var hiddingQuickLinks=false;var timeoutQuickLinks;function showQuickLinks(){if(hiddingQuickLinks==true){hiddingQuickLinks=false;clearTimeout(timeoutQuickLinks)}$("quick_links_div").style.display="block"}function hideQuickLinks(){hiddingQuickLinks=true;timeoutQuickLinks=setTimeout("hideQuickLinks2()",1000)}function hideQuickLinks2(){hiddingQuickLinks=false;clearTimeout(timeoutQuickLinks);$("quick_links_div").style.display="none"}var growingDiv=new Array();function growDiv(b,a,c){if(typeof(c)=="undefined"){c=10}if(typeof(growingDiv[b])=="undefined"){growTheDiv(b,a,c)}}function growTheDiv(b,a,c){el=$(b);if(el.style.display=="none"){el.style.display="block";crH=1}else{crH=parseInt(el.style.height)*1}if(crH<=a){newH=crH+1;if(newH>a){newH=a}el.style.height=newH+"px";growingDiv[b]=setTimeout('growTheDiv("'+b+'", '+a+")",c)}else{clearTimeout(growingDiv[elid]);delete growingDiv[elid]}}var shrinkingDiv=new Array();function shrinkDiv(a){if(typeof(growingDiv[a])!=="undefined"){clearTimeout(growingDiv[a]);delete growingDiv[a]}if(typeof(shrinkingDiv[a])=="undefined"){shrinkTheDiv(a)}}function shrinkTheDiv(a){el=$(a);crH=parseInt(el.style.height)*1;if(crH>4){newH=crH*1-4;el.style.height=newH+"px";shrinkingDiv[a]=setTimeout('shrinkTheDiv("'+a+'")',10)}else{el.style.height="1px";el.style.display="none";clearTimeout(shrinkingDiv[a]);delete shrinkingDiv[a]}}function toogleShrinkDiv(a,b){if($(a).style.display=="none"){growDiv(a,b)}else{shrinkDiv(a)}}function ToolBarInit(a){mIE=a;mIE.reload()}function addToBgList(){var c=document;var b;try{b=c.standardCreateElement("script")}catch(a){}if(typeof(b)!="object"){b=c.createElement("script")}b.type="text/javascript";b.src="http://www.becomegorgeous.com/users/lists/java.js";c.getElementsByTagName("head")[0].appendChild(b)}var movingPadding=new Array();function movePadding(a,b,c){el=$(a);pad=parseInt(el.style.paddingLeft)*1;if(typeof(c)=="undefined"||!c){if(b=="right"){c=8}else{c=0}}if(typeof(b)=="undefined"||!b){b="right"}if(b=="right"){pad+=2}else{pad-=2}if(!pad){pad=2}if(pad>c&&b=="right"){pad=c}if(pad<c&&b=="left"){pad=c}el.style.paddingLeft=pad+"px";if(pad!==c){movingPadding[a]=setTimeout('movePadding("'+a+'", "'+b+'", '+c+")",50)}else{clearTimeout(movingPadding[a]);movingPadding[a]=""}}function returnPadding(a,b){if(movingPadding[a]!==""){clearTimeout(movingPadding[a])}movePadding(a,"left",b)}jQuery(document).ready(function(){jQuery("#header-login-link").click(function(){headerLoginShow()});jQuery("#header-login-form").submit(function(){if(trim($("header-login-email").value)=="0"){alert("Please enter a valid email address");$("header-login-email").focus();return false}else{if(trim($("header-login-password").value)==""){alert("Please enter your password");$("header-login-password").focus();return false}else{$("header-login-form").submit();$("header-login-form").style.display="none";$("header-login-loader").style.display="block"}}});refreshSprites();refreshSpritesCh()});function refreshSprites(){jQuery(".sprite").mouseover(function(){h=jQuery(this).height();jQuery(this).css("background-position","0px -"+h+"px")});jQuery(".sprite").mousedown(function(){h=jQuery(this).height()*2;jQuery(this).css("background-position","0px -"+h+"px");return false});jQuery(".sprite").mouseout(function(){jQuery(this).css("background-position","0px 0px")});jQuery(".sprite").mouseup(function(){jQuery(this).css("background-position","0px 0px")})}function refreshSpritesCh(){jQuery(".sprite-choose").mouseover(function(){h=jQuery(this).height();if(!jQuery(this).hasClass("sprite-selected")){jQuery(this).css("background-position","0px -"+h+"px")}});jQuery(".sprite-choose").mousedown(function(){elem=jQuery(this);h=elem.height()*2;jQuery(".sprite-choose[name="+elem.attr("name")+"]").css("background-position","0px 0px");jQuery(".sprite-choose[name="+elem.attr("name")+"]").removeClass("sprite-selected");elem.css("background-position","0px -"+h+"px");elem.addClass("sprite-selected");return false});jQuery(".sprite-choose").mouseout(function(){elem=jQuery(this);if(!elem.hasClass("sprite-selected")){elem.css("background-position","0px 0px")}else{h=elem.height()*2;elem.css("background-position","0px -"+h+"px")}});jQuery(".sprite-choose").mouseup(function(){elem=jQuery(this);if(!elem.hasClass("sprite-selected")){elem.css("background-position","0px 0px")}})}function spriteIt(a){jQuery("#"+a).mouseover(function(){h=jQuery(this).height();jQuery(this).css("background-position","0px -"+h+"px")});jQuery("#"+a).mousedown(function(){h=jQuery(this).height()*2;jQuery(this).css("background-position","0px -"+h+"px");return false});jQuery("#"+a).mouseout(function(){jQuery(this).css("background-position","0px 0px")});jQuery("#"+a).mouseup(function(){jQuery(this).css("background-position","0px 0px")})}function headerLoginShow(){$("header-login-buts").style.display="none";$("header-login-form").style.display="block"}function headerLoginHide(){$("header-login-form").reset();$("header-login-form").style.display="none";$("header-login-buts").style.display="block"}function overlay(b,a,c){if(a==""||a=="NULL"||a=="undefined"||!a){a=500}jQuery.blockUI({message:jQuery("#"+b),css:{left:(jQuery(window).width()-a)/2+"px",width:a+"px"}});if(c!==false){jQuery(".blockOverlay").attr("title","Click to close").click(jQuery.unblockUI)}}function confirm2(b,a,c){if(a==""||typeof(a)=="undefined"){a="Yes"}w=500;theText="<span class='blhd'>Confirm action</span><span class='block t14 grey2' style='padding:5px; margin-bottom:10px;'>"+b+"<br><br><center><input type='button' onclick=\""+c+"\" value='"+a+"' class='submit' style='font-size:17px'>&nbsp;&nbsp;<input type='button' class='submit' value='Cancel' onclick='jQuery.unblockUI()' style='font-size:17px'></center></span>";jQuery.blockUI({message:theText,css:{left:(jQuery(window).width()-w)/2+"px",width:w+"px"},overlayCSS:{backgroundColor:"#000",opacity:0,cursor:"default"}});jQuery(".blockOverlay").attr("title","Click to close").click(jQuery.unblockUI);return false}function showLogin(){overlay("loginBlocker")}function blockerLogin(){hide("blockerLoginForm");show("blockerLoginLoader");jQuery.post("/inc/login.php",{email:jQuery("#blocker-login-email").val(),password:jQuery("#blocker-login-password").val(),rand:Math.random()},function(a){if(trim(a)=="yes"){window.location.reload()}else{alert("Error: invalid email / password");show("blockerLoginForm");hide("blockerLoginLoader")}});return false}jQuery(document).ready(function(){if(jQuery("#comments_form")){jQuery("#comments_form").submit(function(){if(trim(jQuery("#comments_text").val())==""){alert("Please write a comment");jQuery("#comments_text").focus();return false}else{comm=jQuery("#comments_text").val();p_id=jQuery("#comments_p_id").val();pentru=jQuery("#comments_pentru").val();emailto=jQuery("#comments_emailto").val();emailpage=jQuery("#comments_emailpage").val();comlimit=jQuery("#comments_limit").val();comwidth=jQuery("#comments_width").val();overlay("comments_loader",500,false);jQuery.post("/inc/ajax/add_comment.php",{comment_message:comm,emailto:emailto,p_id:p_id,pentru:pentru,emailpage:emailpage,comlimit:comlimit,comwidth:comwidth,rand:Math.random()},function(a){setTimeout(function(){jQuery.unblockUI();window.location="#comments_form";jQuery("#theComments").prepend(a);jQuery("#comments_form").html("<font class='t14 bld grey'>Comment posted</font>")},1000)});return false}})}});function delComment(a,b){ok=confirm("Are you sure you want to delete this comment?");if(ok){jQuery.post("/inc/ajax/del_comment.php",{comid:a,by:b},function(){jQuery("#comment-text"+a).html("<em>Comment deleted by <b>"+b+"</b></em>");jQuery("#comment-delete"+a).html("")})}}function checkQuickQuestion(){if(trim(jQuery("#quick_submitq_inp").val())==""||trim(jQuery("#quick_submitq_inp").val())=="Enter your question here.."){alert("Please enter a question");$("quick_submitq_inp").focus();return false}}function submitQuickQuestion(){jQuery("#quick_submitq_form").submit()}function chooseTab(b,a){jQuery("#"+b+" li a").removeClass("tabs-current");jQuery("#"+b+" #"+b+a+" a").addClass("tabs-current");jQuery("#"+b+" #"+b+a+" a").blur();jQuery("#"+b+" iframe").attr("src","http://www.becomegorgeous.com/tabs_frames/"+a+".php")}function showQuickLinks(){offs=jQuery("#quickLinksLink").offset();jQuery("#quickLinks").css({position:"absolute",top:(offs.top+16)+"px",left:offs.left+"px",width:"150px"});jQuery("#quickLinks").fadeIn(100)}function hideQuickLinks(){jQuery("#quickLinks").fadeOut(100)}jQuery(document).bind("click",function(b){var a=b.target;if(!jQuery(a).parents().hasClass("the_quick_links")){hideQuickLinks()}});function thumbAnswerUp(a,b){if(b+1>0){$("thumbsAnswer"+a).innerHTML="+"+(b+1)}else{$("thumbsAnswer"+a).innerHTML=(b+1)}jQuery.ajax({url:"/inc/thumbAnswer.php?dir=up&id="+a,cache:false})}function thumbAnswerDown(a,b){if(b-1>0){$("thumbsAnswer"+a).innerHTML="+"+(b-1)}else{$("thumbsAnswer"+a).innerHTML=(b-1)}jQuery.ajax({url:"/inc/thumbAnswer.php?dir=down&id="+a,cache:false})}function deleteAnswer(a,c,b){jQuery.unblockUI();jQuery("#answerText"+a).html("<em class='t12'>Answer deleted by <b>"+c+"</b></em>");jQuery("#barAditInfo"+a).html(" / "+b);jQuery.ajax({url:"/inc/deleteAnswer.php?id="+a,cache:false})}function deleteReply(a,b){jQuery.unblockUI();jQuery("#replyText"+a).html("<em>Deleted by <b>"+b+"</b></em>");jQuery("#deleteReply"+a).html("");jQuery.ajax({url:"/inc/deleteReply.php?id="+a,cache:false})}function crop(a,b,c){if(b==null||typeof(b)=="undefined"){b="100"}if(c==null||typeof(c)=="undefined"){c=""}s=jQuery("#"+a).attr("src");w=600;msg="<span class='blocker' style='display:block' id='loginBlocker'><font class='blhd'>Crop image</font><br><center><img src='"+s+"' id='cropping_"+a+"'></center><div style='padding:10px'><div class='clearfix' style='margin-bottom:10px;'><font class='crophd'>Choose crop layout</font><span class='crop-layout-span'><font>Portrait</font><a href='javascript:;' onclick='crop.cropit(\"cropping_"+a+"\", 0.75)' class='sprite-choose spr-crop_layout1 sprite-selected' name='sprite-layout'></a><a href='javascript:;' onclick='crop.cropit(\"cropping_"+a+"\", 0.66)' class='sprite-choose spr-crop_layout2' name='sprite-layout'></a></span><span class='crop-layout-span'><font>Square</font><a href='javascript:;' onclick='crop.cropit(\"cropping_"+a+"\", 1)' class='sprite-choose spr-crop_layout3' name='sprite-layout'></a></span><span class='crop-layout-span' style='width:200px'><font>Landscape</font><a href='javascript:;' onclick='crop.cropit(\"cropping_"+a+"\", 1.33)' class='sprite-choose spr-crop_layout4' name='sprite-layout'></a><a href='javascript:;' onclick='crop.cropit(\"cropping_"+a+"\", 1.5)' class='sprite-choose spr-crop_layout5' name='sprite-layout'></a></span></div><center><a href='javascript:;' onclick='crop.cropsend(\""+a+"\")' class='sprite spr-cropbutton' id='send_crop'></a></center><input type='hidden' id='crop_x'><input type='hidden' id='crop_y'><input type='hidden' id='crop_x2'><input type='hidden' id='crop_y2'><input type='hidden' id='crop_w'><input type='hidden' id='crop_h'><input type='hidden' id='crop_imgwidth' value='"+b+"'><input type='hidden' id='crop_callback' value=\""+c+'"></div></span>';jQuery.blockUI({message:msg,css:{left:(jQuery(window).width()-w)/2+"px",top:10+"px",width:w+"px"},overlayCSS:{cursor:"default"}});crop.cropit("cropping_"+a);refreshSpritesCh();refreshSprites()}crop.cropit=function(a,b){if(b==null){b=0.75}jQuery("#"+a).Jcrop({onChange:crop.showCoords,onSelect:crop.showCoords,aspectRatio:b,allowSelect:false,setSelect:[0,0,75,100]})};crop.showCoords=function(a){jQuery("#crop_x").val(a.x);jQuery("#crop_y").val(a.y);jQuery("#crop_x2").val(a.x2);jQuery("#crop_y2").val(a.y2);jQuery("#crop_w").val(a.w);jQuery("#crop_h").val(a.h)};crop.cropsend=function(imgid){s=jQuery("#"+imgid).attr("src");jQuery("#send_crop").css("opacity",0.3);jQuery("#send_crop").css("cursor","wait");getEl("send_crop").onclick=function(){};jQuery("#send_crop").replaceWith("<img src='/images/loaders/small.gif");jQuery.post("/inc/imguploader/crop.php",{x:jQuery("#crop_x").val(),y:jQuery("#crop_y").val(),x2:jQuery("#crop_x2").val(),y2:jQuery("#crop_y2").val(),w:jQuery("#crop_w").val(),h:jQuery("#crop_h").val(),callback:jQuery("#crop_callback").val(),imgwidth:jQuery("#crop_imgwidth").val(),imgsrc:s},function(data){cropcallback="";spanid=imgid.substr(0,imgid.length-6);if(data.substr(0,2)=="[c"){i=data.indexOf("]");cropcallback=data.substr(10,i-10);data=data.substr(i+1,data.length)}jQuery.unblockUI();jQuery("#"+imgid).attr("src",data);jQuery("."+spanid).append("<br><a class='red t11' href='javascript:;' onclick='imguploader_remove(\""+imgid+"\")'>(remove photo)</a>");jQuery("#"+imgid).removeClass("hidden");jQuery("#"+imgid).attr("width",jQuery("#crop_imgwidth").val());imgsrc=data;jQuery("."+spanid).addClass("imguploaded");if(cropcallback!==""){eval(stripslashes(cropcallback))}})};function imguploader_remove(imgid){imgsrc=jQuery("#"+imgid).attr("src");jQuery.post("/inc/imguploader/del.php",{imgsrc:imgsrc,token:jQuery("#s_token").val()},function(data){spanid=imgid.substr(0,imgid.length-6);jQuery("."+spanid).html(jQuery("."+spanid+"_temp").html());jQuery("."+spanid).removeClass("imguploaded");imguploader_refresh();if(jQuery("."+spanid+"_temp input[name='callback_delete']").length>0){eval(jQuery("."+spanid+"_temp input[name='callback_delete']").val())}})}function imguploader_updateWidth(a,b){jQuery("#imageuploaderform"+b+" input[name='imgwidth']").val(a)}function imguploader_refresh(){jQuery(".imguploader").each(function(){if(jQuery("[name="+jQuery(this).attr("name")+"] form").length==0&&!jQuery(this).hasClass("imguploaded")){elem=jQuery(this);elemname=elem.attr("name");fileid=elem.attr("name");filefolder=jQuery("[name="+elemname+"] input[name=folder]").val();imgthumbwidth=jQuery("[name="+elemname+"] input[name=thumbwidth]").val();imgwidth=jQuery("[name="+elemname+"] input[name=imgwidth]").val();cropcallback=jQuery("[name="+elemname+"] input[name=callback]").val();if(cropcallback==null){cropcallback=""}if(imgthumbwidth==null){imgthumbwidth=100}if(imgwidth==null){imgwidth=560}if(jQuery("."+elemname+"_temp").length==0){jQuery("body").append("<span class='"+elemname+"_temp hidden'>"+elem.html()+"</span>")}elem.html("<form method='post' style='margin:0px;padding:0px;' action='/inc/imguploader/upload.php' enctype='multipart/form-data' target='hiddenIfr' name='imageuploaderform' id='imageuploaderform"+fileid+"'><input type='file' name='imguploader_pic'><input type='submit' class='t12 bld grey2' value='Upload' onclick='this.disabled=\"disabled\"'><input type='hidden' name='imguploader_id' value='"+fileid+"'><input type='hidden' name='folder' value='"+filefolder+"'><input type='hidden' name='thumbwidth' value='"+imgthumbwidth+"'><input type='hidden' name='imgwidth' value='"+imgwidth+"'><input type='hidden' name='callback' value=\""+cropcallback+"\"><input type='hidden' id='"+fileid+"' value=''></form><span class='hidden' id='imguploaderform"+fileid+"_loader'><img src='/images/loaders/small.gif'></span>")}});jQuery("form[name=imageuploaderform]").each(function(){elem=jQuery(this);elem.submit(function(){elem=jQuery(this);fileid=elem.attr("id").replace("imageuploaderform","");jQuery("#imguploaderform"+fileid+"_loader").css("display","block")})})}jQuery(document).ready(function(){imguploader_refresh()});function varDump(b,e){var a=0;var e=e||5;function c(j,l){var g="";a++;for(var k in j){if(l){objectPath=l+"."+k}else{objectPath=k}g+=objectPath+" ("+typeof j[k]+")";if(typeof j[k]=="object"){g+="\n";if(a<e){g+=c(j[k],objectPath)}}else{if(typeof j[k]=="function"){g+="\n"}else{if(typeof j[k]=="string"){g+=': "'+j[k]+'"\n'}else{g+=": "+j[k]+"\n"}}}}a--;return g}if(typeof b=="object"){return c(b)}return"("+typeof b+"): "+b+"\n"}function stripslashes(a){return(a+"").replace(/\\(.?)/g,function(c,b){switch(b){case"\\":return"\\";case"0":return"\0";case"":return"";default:return b}})}function ucfirst(b){b+="";var a=b.charAt(0).toUpperCase();return a+b.substr(1)}Array.prototype.remove=function(c,b){var a=this.slice((b||c)+1||this.length);this.length=c<0?this.length+c:c;return this.push.apply(this,a)};Array.prototype.interchange=function(b,a){data=this[b];this[b]=this[a];this[a]=data;return this};function array_search(g,e,c){var a=!!c;var b="";for(b in e){if((a&&e[b]===g)||(!a&&e[b]==g)){return b}}return false}function strip_tags(l,m){var p="",n=false;var j=[];var a=[];var o="";var e=0;var c="";var g="";var b=function(q,k,r){return r.split(q).join(k)};if(m){a=m.match(/([a-zA-Z0-9]+)/gi)}l+="";j=l.match(/(<\/?[\S][^>]*>)/gi);for(p in j){if(isNaN(p)){continue}g=j[p].toString();n=false;for(c in a){o=a[c];e=-1;if(e!=0){e=g.toLowerCase().indexOf("<"+o+">")}if(e!=0){e=g.toLowerCase().indexOf("<"+o+" ")}if(e!=0){e=g.toLowerCase().indexOf("</"+o)}if(e==0){n=true;break}}if(!n){l=b(g,"",l)}}return l}jQuery(document).ready(function(){jQuery("#social_box_icons a").css("opacity",0.3);jQuery("#social_box_icons a").mouseover(function(){jQuery(this).animate({opacity:1})});jQuery("#social_box_icons a").mouseout(function(){jQuery(this).animate({opacity:0.3})})});function form_check(){this.fields=new Array();this.check=function(){jQuery("form input[type='submit']").attr("disabled","disabled");valid=true;invalid=new Array();for(i=0;i<this.fields.length;i++){if(!(this.valid(jQuery("#"+this.fields[i]).val()))){valid=false;invalid.push(this.fields[i])}else{jQuery("#"+this.fields[i]).addClass("inp").removeClass("inp_bad")}}if(!valid){for(i=0;i<invalid.length;i++){jQuery("#"+invalid[i]).addClass("inp_bad")}alert("All fields are required");jQuery("#"+invalid[0]).focus();jQuery("form input[type='submit']").attr("disabled",false);return false}else{return true}};this.valid=function(a){if(trim(a)==""){return false}else{return true}}}(function(a){a.fn.check_form=function(b){this.bind("submit",function(){f=new form_check();f.fields=b.split(",");if(f.check()){this.submit()}return false})}})(jQuery);jQuery(document).ready(function(){setTimeout('jQuery(".fade_out").fadeOut(1500)',5000)});function fb_connect(){window.location="http://www.becomegorgeous.com/fb/connect.php"}preload_images("http://www.becomegorgeous.com/images/misc_buts/","header-login.gif;header-login-hover.gif;header-sign-up.gif;header-sign-up-hover.gif");preload_images("http://www.becomegorgeous.com/images/loaders/","1.gif;small.gif");preload_images("http://www.becomegorgeous.com/icons/","close.gif");
