(function(){"use strict";function i(i,t){var e=i.is(":visible");function a(){if(!i||!i.length||!i.data("doPollVisibility")){return}var l=i.is(":visible");if(e!==l){if(t=="appear"&&e===false&&l===true){i.trigger("appear")}else if(t=="disappear"&&e===true&&l===false){i.trigger("disappear")}else{i.trigger("visibilityChange",{visible:l})}e=l}i.data("doPollVisibilityTimeout",setTimeout(a,150))}a()}function t(t){t.event.special.appear={setup:function(){var t=$$(this);t.data("doPollVisibility",true);i(t,"appear")},teardown:function(){var i=$$(this);i.removeData("doPollVisibility");clearTimeout(i.data("doPollVisibilityTimeout"))}}}function e(t){t.event.special.disappear={setup:function(){var t=$$(this);t.data("doPollVisibility",true);i(t,"disappear")},teardown:function(){var i=$$(this);i.removeData("doPollVisibility");clearTimeout(i.data("doPollVisibilityTimeout"))}}}function a(t){t.event.special.visibilityChange={setup:function(){var t=$$(this);t.data("doPollVisibility",true);i(t,"visibilityChange")},teardown:function(){var i=$$(this);i.removeData("doPollVisibility");clearTimeout(i.data("doPollVisibilityTimeout"))}}}u8.Base._Window.extend("appear",function(i){var l=i.$;if(l){t(l);e(l);a(l)}})})();