(function($) {
	$.popunder = function(sUrl) {
		var _parent = self;
	var bPopunder = ($.browser.msie && parseInt($.browser.version, 10) < 9);

	if (top != self) {
		try {
			if (top.document.location.toString()) {
				_parent = top;
			}
		}
		catch(err) { }
	}


	var sOptions = 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=' + (screen.availWidth - 10).toString();
	sOptions += ',height=' + (screen.availHeight - 122).toString() + ',screenX=0,screenY=0,left=0,top=0';


	var popunder = _parent.window.open(sUrl, 'pu_' + Math.floor(89999999*Math.random()+10000000), sOptions);
		if (popunder) {
			popunder.blur();
			if (bPopunder) {

				window.focus();
				try { opener.window.focus(); }
				catch (err) { }
			}
			else {

				popunder.init = function(e) {
					with (e) {
						(function() {
							if (typeof window.mozPaintCount != 'undefined') {
								var x = window.open('about:blank');
								x.close();
							}

							try { opener.window.focus(); }
							catch (err) { }
						})();
					}
				};
				popunder.params = {
					url: sUrl
				};
				popunder.init(popunder);
			}
		}
		
		return this;
	}
})(jQuery);
