/*!
Copyright (c) 2011, 2012 Julien Wajsberg <felash@gmail.com>
All rights reserved.

Official repository: https://github.com/julienw/jquery-trap-input
License is there: https://github.com/julienw/jquery-trap-input/blob/master/LICENSE
This is version 1.2.0.
*/
!function(t,e){function i(t){if(9===t.keyCode){var e=!!t.shiftKey;n(this,t.target,e)&&(t.preventDefault(),t.stopPropagation())}}function n(t,e,i){var n,s,o,r,l=a(t),u=e;do{switch(n=l.index(u),s=n+1,o=n-1,r=l.length-1,n){case-1:return!1;case 0:o=r;break;case r:s=0}i&&(s=o),u=l.get(s);try{u.focus()}catch(c){}}while(e===e.ownerDocument.activeElement);return!0}function s(){return this.tabIndex>0}function o(){return!this.tabIndex}function r(t,e){return t.t-e.t||t.i-e.i}function a(e){var i=t(e),n=[],a=0;return d.enable&&d.enable(),i.find("a[href], link[href], [draggable=true], [contenteditable=true], :input:enabled, [tabindex=0]").filter(":visible").filter(o).each(function(t,e){n.push({v:e,t:0,i:a++})}),i.find("[tabindex]").filter(":visible").filter(s).each(function(t,e){n.push({v:e,t:e.tabIndex,i:a++})}),d.disable&&d.disable(),n=t.map(n.sort(r),function(t){return t.v}),t(n)}function l(){return this.keydown(i),this.data(h,!0),this}function u(){return this.unbind("keydown",i),this.removeData(h),this}function c(){return!!this.data(h)}/*
(this comment is after the first line of code so that uglifyjs removes it)

Redistribution and use in source and binary forms, with or without
modification, are permitted without condition.

Although that's not an obligation, I would appreciate that you provide a
link to the official repository.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED.
*/
var h="trap.isTrapping";t.fn.extend({trap:l,untrap:u,isTrapping:c});var d={};t.find.find&&t.find.attr!==t.attr&&function(){function i(t){var i=t.getAttributeNode(o);return i&&i.specified?parseInt(i.value,10):e}function n(){r[o]=r.tabIndex=i}function s(){delete r[o],delete r.tabIndex}var o="tabindex",r=t.expr.attrHandle;d={enable:n,disable:s}}()}(jQuery);