!function(a){function b(){r=$("body"),c(),n(),d()}function c(){window.jQuery&&window.$&&window.$.fn&&($.fn.focusable=function(a){return Focusable.setFocus(this,a),this})}function d(){r.on("click",v,g),$(window).on("resize",e),$(window).on("keyup",f)}function e(){s&&(s=w.findOnResize?$(s.selector):s,k())}function f(a){w.hideOnESC&&27===a.keyCode&&t&&j()}function g(){w.hideOnClick&&j()}function h(a,b){$("body").css("overflow","hidden"),w=$.extend(w,b),s=a,k(),r.find(v).fadeIn(w.fadeDuration)}function i(){r.find(v).remove()}function j(){t=!1,s=null,$("body").css("overflow",""),r.find(v).fadeOut(w.fadeDuration,i)}function k(){if(s){var a=0;for(t=!0,i();4>a;)l(a),a++}}function l(a){var b=s.offset(),c=0,d=0,e=m(s.outerWidth()),f="100%",g="";switch(a){case 0:e=m(b.left);break;case 1:d=m(b.left),f=m(b.top);break;case 2:d=m(b.left),c=m(s.outerHeight()+b.top);break;case 3:e="100%",d=m(s.outerWidth()+b.left)}g="top:"+c+";left:"+d+";width:"+e+";height:"+f,r.prepend('
')}function m(a){return a+"px"}function n(){var a=function(){var a=document.createElement("style");return a.appendChild(document.createTextNode("")),document.head.appendChild(a),a.sheet}();a.insertRule(v+"{ display:none; position: absolute; background: rgba(0,0,0,0.8); }",0)}function o(){return s}function p(){return w}function q(){return t}var r=null,s=null,t=!1,u="focusable-column",v="."+u,w={fadeDuration:700,hideOnClick:!1,hideOnESC:!1,findOnResize:!1};$(document).ready(b),a.Focusable={setFocus:h,hide:j,refresh:k,getActiveElement:o,getOptions:p,isVisible:q}}(window);