function updateColorPreference(A){$j.ajax({url:Stylehive.HIVE_ALTERNATE_BASE_URL+"/ajax/hive/profile/updateColorPreference.htm",dataType:"json",type:"POST",data:"colorPreferenceId="+A,success:function(D){$j("#custom_header").html(D.headerImageHtml);
$j("#current_theme_preview").html('<p><img src="'+D.previewImageUrl+'" width="330" height="330"/></p>');
var C={"background-color":D.tabBackgroundColor,color:D.tabFontColor};
var B={"background-color":"#FFFFFF",color:"#000000"};
$j("#sb_content a, #sb_content a:link, #sb_content a:visited").css("color",D.linkColor);
$j("#sb_content a:hover").css("color",D.linkColor);
$j("#myhive_tabs").css("background-color",D.tabBarBackgroundColor);
$j("#myhive_tabs a, #myhive_tabs a:link, #myhive_tabs a:visited, #myhive_sub_tabs a, #myhive_sub_tabs a:link, #myhive_sub_tabs a:visited").css(C);
$j("#myhive_tabs .selected a, #myhive_tabs .selected a:link, #myhive_tabs .selected a:visited, #myhive_sub_tabs .selected a, #myhive_sub_tabs .selected a:link, #myhive_sub_tabs .selected a:visited").css(B);
$j("#myhive_tabs a:hover, #myhive_tabs a:hover").css("background-color",D.tabBackgroundColor);
$j("#themes").css("border-color",D.tabBarBackgroundColor)
}})
}function grabColorPreference(A){$j.ajax({url:Stylehive.HIVE_ALTERNATE_BASE_URL+"/ajax/hive/profile/updateColorPreference.htm",dataType:"json",type:"POST",data:"colorPreferenceId="+A,success:function(B){$j("#theme_grabber").html("<span>Grabbed!</span>");
$j("#theme_grabber").fadeOut(5000)
}})
}function selectTheme(B,A){$j.ajax({url:Stylehive.HIVE_ALTERNATE_BASE_URL+"/ajax/hive/profile/updateColorPreference.htm",dataType:"json",type:"POST",data:"colorPreferenceId="+B,success:function(C){$j(".button").removeClass("b-selected");
$j(".button").addClass("b-select");
$j(".button").html("Select this theme");
$j(A).html("Selected");
$j(A).addClass("b-selected")
},error:function(E,C,D){$j(".button").removeClass("b-error");
$j(".button").addClass("b-select");
$j(".button").html("Select this theme");
if(E.status==403){$j(A).html("Please login");
$j(A).addClass("b-error")
}else{$j(A).html("Error. Try again later.");
$j(A).addClass("b-error")
}}})
};