// fsOverlay plugin v0.9.4.12 for jQuery; Code & concept by Adrian Voica 'Adana' (adrian.voica@gmail.com); Varagus(TM)Technologies (http://www.varagustechnologies.com);
(function($){$.fsoverlay=function(options){$.fsoverlay.options=$.fn.extend({},$.fsoverlay.defaults,options);};$.fsoverlay.show=function(htmlContent,callBackFunction,options){if($.fsoverlay.options==undefined)$.fsoverlay.options=$.fsoverlay.defaults;if(options!=undefined)$.fsoverlay.options=$.fn.extend($.fsoverlay.options,options);if(htmlContent==undefined||callBackFunction==undefined)return false;var o=$.fsoverlay.options;$(window).unbind("resize.fsoverlayresize");$(document.body).css("overflow","hidden");$("#"+o.content+",#"+o.container).remove();var st=parseInt($(window).scrollTop());$(document.body).append("<div id='"+o.container+"' style='position: absolute; display: none; left: 0; top: "+st+"px; background-color: "+o.bgcolor+"; z-index: "+o.zindex+";'></div>"+"<div id='"+o.content+"' style='position: absolute; display: none; left: 0; top: 0; "+(o.contentbgcolor!=''&&o.contentbgcolor!=null?'background-color: '+o.contentbgcolor+';':'')+"z-index: "+(parseInt(o.zindex)+1)+";'></div>");$("#"+o.content+",#"+o.container).fadeTo(0,0).css("display","block");$(window).bind("resize.fsoverlayresize",function(){var ww=$(window).width(),hh=$(window).height();$("#"+o.container).width(ww).height(hh);$("#"+o.content).html(htmlContent).css("left",(ww-$("#"+o.content).outerWidth(true))/2).css("top",((hh-$("#"+o.content).outerHeight(true))/2)+st);}).trigger("resize.fsoverlayresize");$("#"+o.content+",#"+o.container).fadeTo(o.fadein,o.opacity,function(){$("#"+o.content).fadeTo(0,1);callBackFunction(o.content,o.container);});return false;};$.fsoverlay.hide=function(){if($.fsoverlay.options==undefined)return false;var o=$.fsoverlay.options;$("#"+o.content).fadeTo(0,$("#"+o.container).css("opacity"));$("#"+o.content+",#"+o.container).fadeTo(o.fadeout,0,function(){$(window).unbind("resize.fsoverlayresize");$("#"+o.content+",#"+o.container).remove();});return true;};$.fsoverlay.defaults={'container':'fsoverlaycontainer','content':'fsoverlaycontent','zindex':1001,'opacity':0.7,'bgcolor':'#000000','contentbgcolor':'#FFFFFF','fadein':0,'fadeout':0};})(jQuery);
