(function(a){jAlert=function(c,d,e){var b='<div id="_alert_dialog" class="ui-widget" style="display: none;"><div class="ui-state-highlight ui-corner-all"><span class="ui-icon ui-icon-info" style="position: absolute; left: 8px; top: 0; margin:8px 0px 0px 7px;"></span><div id="_alert_content" style="float: inherit; margin-left: 25px;"></div></div></div>';if(!a("#_alert_dialog").length){a("body").append(b);a("#_alert_dialog").dialog({autoOpen:false})}a("#_alert_content").html(c);if(!d){d="Alert"}a("#_alert_dialog").dialog("option",{modal:true,title:d,buttons:{Ok:function(){a(this).dialog("close");if(e){e(true)}}}});a("#_alert_dialog").dialog("open")};jError=function(b,d,e){var c='<div id="_error_dialog" class="ui-widget" style="display: none;"><div class="ui-state-error ui-corner-all"><span class="ui-icon ui-icon-info" style="position: absolute; left: 8px; top: 0; margin:8px 0px 0px 7px;"></span><div id="_error_content" style="float: inherit; margin-left: 25px;"></div></div></div>';if(!a("#_error_dialog").length){a("body").append(c);a("#_error_dialog").dialog({autoOpen:false})}a("#_error_content").html(b);if(!d){d="Error"}a("#_error_dialog").dialog("option",{modal:true,title:d,buttons:{Ok:function(){a(this).dialog("close");if(e){e(true)}}}});a("#_error_dialog").dialog("open")};jConfirm=function(c,d,e){var b='<div id="_confirm_dialog" class="ui-widget" style="display: none;"><div class="ui-state-highlight ui-corner-all"><span class="ui-icon ui-icon-alert" style="position: absolute; left: 8px; top: 0; margin:8px 0px 0px 7px;"></span><div id="_confirm_content" style="float: inherit; margin-left: 25px;"></div></div></div>';if(!a("#_confirm_dialog").length){a("body").append(b);a("#_confirm_dialog").dialog({autoOpen:false})}a("#_confirm_content").html(c);if(!d){d="Please Confirm"}a("#_confirm_dialog").dialog({modal:true,title:d,buttons:{Ok:function(){a(this).dialog("close");if(e){e(true)}},Cancel:function(){a(this).dialog("close");if(e){e(false)}}}});a("#_confirm_dialog").dialog("open")};jPrompt=function(b,c,e,f){var d='<div id="_prompt_dialog" class="ui-widget" style="display: none;"><div class="ui-state-highlight ui-corner-all"><span class="ui-icon ui-icon-help" style="position: absolute; left: 8px; top: 0; margin:8px 0px 0px 7px;"></span><div style="float: inherit; margin-left: 25px;"><span id="_prompt_content"></span><input id="_prompt_text" type="text" size="30" style="width: 220px; margin-bottom: 5px;"></div></div></div>';if(!a("#_prompt_dialog").length){a("body").append(d);a("#_prompt_dialog").dialog({autoOpen:false})}a("#_prompt_content").html(b);a("#_prompt_text").val(c);if(!e){e="Prompt"}a("#_prompt_dialog").dialog({modal:true,title:e,open:function(){a("#_prompt_text").focus();if(c){a("#_prompt_text").select()}},buttons:{Ok:function(){a(this).dialog("close");if(f){f(a("#_prompt_text").val())}},Cancel:function(){a(this).dialog("close");if(f){f(null)}}}});a("#_prompt_dialog").dialog("open")};a("a.footer_popup, a.learnmore, a.product_learn_more").live("click",function(){var e=a(this).text();if(a(this).attr("title")){e=a(this).attr("title")}var c=a(this).attr("href");var d=600;var b=700;if(a(this).attr("data-width")){d=a(this).attr("data-width")}if(a(this).attr("data-height")){b=a(this).attr("data-height")}if(c.match("^#.*")){a(c).dialog({modal:true,width:d,height:b,title:e});return false}else{a("<div>").dialog({modal:true,open:function(){a(this).load(c)},close:function(){a(this).remove()},width:d,height:b,title:e});return false}});a(".ecom_learn_more").live("click",function(){var c=a(this).text();if(a(this).attr("title")){c=a(this).attr("title")}var b=a(this).attr("href");a("<div>").dialog({modal:true,open:function(){a(this).load(b)},close:function(){a(this).remove()},width:600,height:"auto",title:c});return false})})(jQuery);
