(function($) { $.preloader = { init : function(){ if($("#doz-preloader").length==0){ var html = ""; html += "
"; $("body").append(html); } }, show : function(){ this.init(); $("#doz-preloader").show(); }, hide : function(){ $("#doz-preloader").hide(); } } })(jQuery);