(function (b) { b.fn.fakeLoader = function (m) { var f = b.extend({ timeToHide: 1200, pos: "fixed", top: "0px", left: "0px", width: "100%", height: "100%", zIndex: "999", bgColor: "#2ecc71", spinner: "spinner7", imagePath: "" }, m); var l = '
'; var k = '
'; var j = '
'; var i = '
'; var h = '
'; var g = '
'; var e = '
'; var d = b(this); var c = {position: f.pos, width: f.width, height: f.height, top: f.top, left: f.left}; d.css(c); d.each(function () { var n = f.spinner; switch (n) { case"spinner1": d.html(l); break; case"spinner2": d.html(k); break; case"spinner3": d.html(j); break; case"spinner4": d.html(i); break; case"spinner5": d.html(h); break; case"spinner6": d.html(g); break; case"spinner7": d.html(e); break; default: d.html(l) } if (f.imagePath != "") { d.html('
'); a() } }); setTimeout(function () { b(d).fadeOut() }, f.timeToHide); return this.css({backgroundColor: f.bgColor, zIndex: f.zIndex}) }; function a() { var c = b(window).width(); var e = b(window).height(); var d = b(".fl").outerWidth(); var f = b(".fl").outerHeight(); b(".fl").css({position: "absolute", left: (c / 2) - (d / 2), top: (e / 2) - (f / 2)}) } b(window).load(function () { a(); b(window).resize(function () { a() }) }) }(jQuery));