﻿(function($) { $.fn.bgIframe = $.fn.bgiframe = function(_) { if ($.browser.msie && /6.0/.test(navigator.userAgent)) { _ = $.extend({ top: "auto", left: "auto", width: "auto", height: "auto", opacity: true, src: "javascript:false;" }, _ || {}); var A = function($) { return $ && $.constructor == Number ? $ + "px" : $ }, B = "<iframe class=\"bgiframe\"frameborder=\"0\"tabindex=\"-1\"src=\"" + _.src + "\"" + "style=\"display:block;position:absolute;z-index:-1;" + (_.opacity !== false ? "filter:Alpha(Opacity='0');" : "") + "top:" + (_.top == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')" : A(_.top)) + ";" + "left:" + (_.left == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')" : A(_.left)) + ";" + "width:" + (_.width == "auto" ? "expression(this.parentNode.offsetWidth+'px')" : A(_.width)) + ";" + "height:" + (_.height == "auto" ? "expression(this.parentNode.offsetHeight+'px')" : A(_.height)) + ";" + "\"/>"; return this.each(function() { if ($("> iframe.bgiframe", this).length == 0) this.insertBefore(document.createElement(B), this.firstChild) }) } return this } })(jQuery);
