(function($) {
$.aLERT = {
$overlay: $("\
\
\
"),
$BG: $("\
\
\
"),
$messageholder: $("\
\
\
"),
$closebutt: $("\
\
×\
\
"),
$message: $("\
\
\
"),
init: function() {
this.$messageholder.html(this.$message);
this.$messageholder.append(this.$closebutt);
this.$overlay.append(this.$BG);
this.$overlay.append(this.$messageholder);
$("body").append(this.$overlay);
this.$closebutt.bind('click',function(){
$.aLERT.close();
});
this.$BG.bind('click',function(){
$.aLERT.close();
});
},
throww: function(message){
this.$message.html(message);
this.$overlay.show();
},
reset: function(){
this.$message.html("");
},
close: function(message){
this.$overlay.hide();
this.reset();
},
}
$.aLERT.init();
window.alert = function(txt) {
$.aLERT.throww(txt);
}
})(jQuery);