(function(){if(useBoseTransitionEnd){var e,t,n="boseTransitionEnd";function r(){i()}function i(){e=jQuery.fn.addClass,jQuery.fn.addClass=s(e),t=jQuery.fn.removeClass,jQuery.fn.removeClass=s(t)}function s(e){return function(){var t=arguments,n=this;fastEach(n,function(e){$(e).data("original-class",e.className)});var r=e.apply(this,t);return setTimeout(function(){fastEach(n,function(e){$(e).data("original-class")!==e.className&&(o(e),e.id&&(e.id!=="main"||t[0]!=="device_tray"&&t[0]!==""&&typeof t[0]!="undefined"?e.id==="viewport"&&(t[0]==="main_play"||t[0]==="drawer"||t[0]===""||typeof t[0]=="undefined")&&(o(document.getElementById("main_tray")),o(document.getElementById("main_play")),o(document.getElementById("content_source"))):o(document.getElementById("main_tray")))),$(e).removeData("original-class")})},0),r}}function o(e){var t=parseFloat(window.getComputedStyle(e).getPropertyValue("transition-duration"))*1e3;if(t){$(e).data("boseTransitionEndTimeout")&&(clearTimeout($(e).data("boseTransitionEndTimeout")),$(e).data("boseTransitionEndTimeout",null));var r=setTimeout(function(){var t=jQuery.Event(n,{originalEvent:{srcElement:e}});$(e).trigger(t),$(e).data("boseTransitionEndTimeout",null)},t);$(e).data("boseTransitionEndTimeout",r)}}r()}})();