$(function(){$(".helpmsg").tooltip({position:"bottom center",offset:[10,20],effect:"fade",opacity:0.8,events:{def:"click,mouseout"}});$("#more_option_myinbox").click(function(){if($(this).text()=="more options"){$("#ns_box_myinbox .ns_box_more").slideDown();$(this).text("hide options");$("#myinbox_img_arrow").attr("src","images/icons/38_topblue_16.png")}else{$("#ns_box_myinbox .ns_box_more").slideUp();$(this).text("more options");$("#myinbox_img_arrow").attr("src","images/icons/38_rightblue_16.png")}return false});$("#esl_enable").click(function(){if($(this).prop("checked")==true){$("#ns_box_myinbox .ns_box_email").slideDown();$("#ns_box_myinbox .ns_box_more_switcher").slideDown()}else{$("#ns_box_myinbox .ns_box_email").slideUp();$("#ns_box_myinbox .ns_box_more").slideUp();$("#ns_box_myinbox .ns_box_more_switcher").slideUp();$("#more_option_myinbox").text("more options");$("#myinbox_img_arrow").attr("src","images/icons/38_rightblue_16.png")}});$("#esl_from_name").bind("change",function(){if($(this).val()=="custom"){$("#esl_from_name_custom_span").show()}else{$("#esl_from_name_custom_span").hide()}});$("#esl_from_email_address").bind("change",function(){if($(this).val()=="custom"){$("#esl_from_email_address_custom_span").show()}else{$("#esl_from_email_address_custom_span").hide()}});$("#more_option_confirmation_email").click(function(){if($(this).text()=="more options"){$("#ns_box_user_email .ns_box_more").slideDown();$(this).text("hide options");$("#confirmation_email_img_arrow").attr("src","images/icons/38_topred_16.png")}else{$("#ns_box_user_email .ns_box_more").slideUp();$(this).text("more options");$("#confirmation_email_img_arrow").attr("src","images/icons/38_rightred_16.png")}return false});$("#esr_enable").click(function(){if($(this).prop("checked")==true){$("#ns_box_user_email .ns_box_email").slideDown();$("#ns_box_user_email .ns_box_more_switcher").slideDown()}else{$("#ns_box_user_email .ns_box_email").slideUp();$("#ns_box_user_email .ns_box_more").slideUp();$("#ns_box_user_email .ns_box_more_switcher").slideUp();$("#more_option_confirmation_email").text("more options");$("#confirmation_email_img_arrow").attr("src","images/icons/38_rightred_16.png")}});$("#esr_from_name").bind("change",function(){if($(this).val()=="custom"){$("#esr_from_name_custom_span").show()}else{$("#esr_from_name_custom_span").hide()}});$("#esr_from_email_address").bind("change",function(){if($(this).val()=="custom"){$("#esr_from_email_address_custom_span").show()}else{$("#esr_from_email_address_custom_span").hide()}});$("#button_save_notification").click(function(){if($("#button_save_notification").text()!="Saving..."){$("#button_save_notification").prop("disabled",true);$("#button_save_notification").text("Saving...");$("#button_save_notification").after("<div class='small_loader_box' style='float: right'><img src='images/loader_small_grey.gif' /></div>");$("#ns_form").submit()}return false});$("#dialog-template-variable").dialog({modal:true,autoOpen:false,closeOnEscape:false,width:400,position:["center",150],draggable:false,resizable:false,buttons:[{text:"Close",id:"btn-change-theme-ok","class":"bb_button bb_small bb_green",click:function(){$(this).dialog("close")}}]});$("a.tempvar_link").click(function(){$("#dialog-template-variable").dialog("open");return false});$("#tempvar_help_trigger a").click(function(){if($(this).text()=="more info"){$(this).text("hide info");$("#tempvar_help_content").slideDown();$("#tempvar_value").effect("pulsate",{times:3},1500)}else{$(this).text("more info");$("#tempvar_help_content").slideUp()}return false});$("#dialog-template-variable-input").bind("change",function(){$("#tempvar_value").text("{"+$(this).val()+"}")})});