(function(A){A.fn.lightBox_ext=function(E,L,M){E=jQuery.extend({width:600,height:200,overlayBgColor:"#000",overlayOpacity:0.8,imageLoading:"images/lightbox-ico-loading.gif",imageBtnClose:"images/lightbox-btn-close.gif"},E);var B=this;function K(){A("embed, object, select").css({visibility:"hidden"});N()}function N(){A("body").append('<div id="lightBox-ext-overlay"></div>');A("body").append('<div id="lightBox-ext-container"><div id="lightBox-ext-center-container"><div id="lightBox-ext-close-container"><a href="#" id="lightBox-ext-link-close"><img src="'+E.imageBtnClose+'" /></a></div><div id="lightBox-ext-loading-container"><img  src="'+E.imageLoading+'" /></div></div></div>');A("#lightBox-ext-close-container").hide();var P=J();A("#lightBox-ext-overlay").css({backgroundColor:E.overlayBgColor,opacity:E.overlayOpacity,width:P[0],height:P[1]}).fadeIn();var Q=I();A("#lightBox-ext-container").css({top:Q[1]+(P[3]/10),left:Q[0]}).show();A("#lightBox-ext-overlay, #lightBox-ext-loading-container").click(function(){D()});A("#lightBox-ext-link-close").click(function(){D();return false});A(window).resize(function(){var R=J();A("#lightBox-ext-overlay").css({width:R[0],height:R[1]});var S=I();A("#lightBox-ext-container").css({top:S[1]+(R[3]/10),left:S[0]})});if((typeof(L)=="undefined")||(L==null)){F(E.width,E.height)}else{L=A.extend(L,{success:function(S,R){C(E.width,E.height,S)}});A.ajax(L)}}function D(){B.appendTo("body").hide();A("#lightBox-ext-container").remove();A("#lightBox-ext-overlay").fadeOut(function(){A(this).remove()});A("embed, object, select").css({visibility:"visible"})}function O(P){A("#lightBox-ext-loading-container").hide();B.empty().append(P).prependTo("#lightBox-ext-center-container").fadeIn(function(){if(typeof(M)=="function"){M.call(this)}A("#lightBox-ext-close-container").slideDown()})}function C(W,V,S){var X=A("#lightBox-ext-center-container").width();var Q=A("#lightBox-ext-center-container").height();var R=(W+(10*2));var T=(V+(10*2));var P=X-R;var U=Q-T;A("#lightBox-ext-center-container").animate({width:R,height:T},400,function(){O(S)});if((P==0)&&(U==0)){if(A.browser.msie){G(250)}else{G(100)}}}function H(){A("#lightBox-ext-loading-container").hide();B.prependTo("#lightBox-ext-center-container").fadeIn(function(){if(typeof(M)=="function"){M.call(this)}A("#lightBox-ext-close-container").slideDown()})}function F(S,V){var P=A("#lightBox-ext-center-container").width();var U=A("#lightBox-ext-center-container").height();var T=(S+(10*2));var R=(V+(10*2));var Q=P-T;var W=U-R;A("#lightBox-ext-center-container").animate({width:T,height:R},400,function(){H()});if((Q==0)&&(W==0)){if(A.browser.msie){G(250)}else{G(100)}}}function G(R){var Q=new Date();P=null;do{var P=new Date()}while(P-Q<R)}function J(){var R,P;if(window.innerHeight&&window.scrollMaxY){R=window.innerWidth+window.scrollMaxX;P=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){R=document.body.scrollWidth;P=document.body.scrollHeight}else{R=document.body.offsetWidth;P=document.body.offsetHeight}}var Q,S;if(self.innerHeight){if(document.documentElement.clientWidth){Q=document.documentElement.clientWidth}else{Q=self.innerWidth}S=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){Q=document.documentElement.clientWidth;S=document.documentElement.clientHeight}else{if(document.body){Q=document.body.clientWidth;S=document.body.clientHeight}}}if(P<S){pageHeight=S}else{pageHeight=P}if(R<Q){pageWidth=R}else{pageWidth=Q}arrayPageSize=new Array(pageWidth,pageHeight,Q,S);return arrayPageSize}function I(){var Q,P;if(self.pageYOffset){P=self.pageYOffset;Q=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){P=document.documentElement.scrollTop;Q=document.documentElement.scrollLeft}else{if(document.body){P=document.body.scrollTop;Q=document.body.scrollLeft}}}arrayPageScroll=new Array(Q,P);return arrayPageScroll}K();return this}})(jQuery);