global.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. function autoFlashHeight(){
  2. var infoHeight = $(".contactInfo").height();
  3. var headerHeight = $(".header").height();
  4. var cateHeight = $(".contactCate").height();
  5. var groupcHeight = $(".groupCate").height();
  6. var lockHeight = $(".lockCate").height();
  7. var contactTab = $(".contactTab").height();
  8. var seCensor = $(".seCensor").height();
  9. var btnList = $(".reportButton").height();
  10. $(".autoHeight").height($(window).height());
  11. $(".autoHeightL1").height($(window).height()-lockHeight-53);
  12. $(".autoHeightL2").height($(window).height()-cateHeight-86);
  13. $(".autoHeightL3").height($(window).height()-groupcHeight-77);
  14. $(".autoHeightR1").height($(window).height()-infoHeight-contactTab-2);
  15. $(".autoHeightR2").height($(window).height()-headerHeight-contactTab-17);
  16. $(".autoHeightR3").height($(window).height()-contactTab);
  17. $(".autoHeightR4").height($(window).height()-infoHeight-48);
  18. $(".autoHeightR5").height($(window).height()-48);
  19. $(".autoHeightI1").height($(window).height()-144);
  20. $(".autoHeightI2").height($(window).height()-80);
  21. // $(".autoHeightI2").height($(window).height()-132);
  22. $(".mailAutoHeigh").height($(window).height()-75);
  23. $(".censorHeight").height(seCensor-btnList-27);
  24. };
  25. $(window).resize(autoFlashHeight);
  26. $(function(){
  27. var infoHeight = $(".contactInfo").height();
  28. $(".zhzdFir").click(function () {
  29. $(this).toggleClass("now").siblings(".zhzdMenu").slideToggle("fast")
  30. });
  31. $(".amInput").children("label").children("input:checkbox").click(function(){
  32. if($(this).is(":checked")) {
  33. // 当前未选中
  34. $(".amInput").find("input:checked").removeAttr("checked");
  35. $(this).attr("checked", "checked");
  36. }
  37. });
  38. $(".pmInput").children("label").children("input:checkbox").click(function(){
  39. if($(this).is(":checked")) {
  40. // 当前未选中
  41. $(".pmInput").find("input:checked").removeAttr("checked");
  42. $(this).attr("checked", "checked");
  43. }
  44. });
  45. $('*[data-toggle=ctooltip]').mouseover(function() {
  46. $(this).ctooltip('show');
  47. });
  48. $("#openRecallInput").click(function(){
  49. $(this).parent(".toolItem").hide().siblings(".toolItem").show();
  50. });
  51. /*顶部提醒*/
  52. $("#openRemind").click(function(){
  53. $(this).toggleClass("focus").siblings(".remindList").toggle("fast");
  54. $(".remind").toggleClass("focus")
  55. }
  56. );
  57. /*顶部提醒*/
  58. $("#closeST").click(function(){
  59. $(".searchTips").hide();
  60. });
  61. // $('.tipGray').hover(function() {
  62. // $(".tipContent").removeClass('tipConactive');
  63. // }, function() {
  64. // $(".tipContent").addClass('tipConactive');
  65. // });
  66. $(".sortAddup").hover(function () {
  67. $(this).siblings("ul,div").animate({opacity:'0.2'},0);
  68. $(this).addClass("focus").find(".sec").show();
  69. },
  70. function () {
  71. $(this).siblings("ul,div").animate({opacity:'1'},0);
  72. $(this).removeClass("focus").find("dl").hide();
  73. }
  74. );
  75. //模拟点击
  76. // $('.chalvCheck').click(function(){
  77. // if($(".chalv").css("display")=="none"){
  78. // $(".chalv").show();
  79. // $("#chalv").show();
  80. // }else{
  81. // $(".chalv").hide();
  82. // $("#chalv").hide();
  83. // }
  84. // });
  85. $('.banshiCheck').click(function(){
  86. $(".banshi").toggle();
  87. $("#banshi").toggle();
  88. });
  89. $('.chalvCheck').click(function(){
  90. $(".chalv").toggle();
  91. $("#chalv").toggle();
  92. });
  93. $('.neibupeixunCheck').click(function(){
  94. $(".neibupeixun").toggle();
  95. $("#neibupeixun").toggle();
  96. });
  97. // $('.da').click(function(){
  98. // if($(".fsfs").css("display")=="none"){
  99. // $(".fsfs").show();
  100. // }else{
  101. // $(".fsfs").hide();
  102. // }
  103. // })
  104. $(".rmDone").click(function(){
  105. $(this).parent().parent("th").removeClass().toggleClass("grM");
  106. });
  107. $(".rmUdone").click(function(){
  108. $(this).parent().parent("th").removeClass().toggleClass("reM");
  109. });
  110. $(".rmClear").click(function(){
  111. $(this).parent().parent("th").removeClass();
  112. });
  113. $(".smileImg").click(function(){
  114. $(this).siblings(".smileItem").toggle();
  115. });
  116. $(".demandBoard .tab a").click(function(){
  117. $(this).addClass("focus").siblings().removeClass("focus");
  118. $(".boardList .entry ").hide().eq($(".demandBoard .tab a").index(this)).show();});
  119. /*档案库类别折叠2*/
  120. $(".snavLeve0 li").click(function(){
  121. $(this).children("h4").addClass("focus");
  122. $(this).children(".snavLeve1").slideDown();
  123. $(this).siblings("li").children("h4").removeClass("focus");
  124. $(this).siblings("li").children(".snavLeve1").slideUp();
  125. });
  126. /*侧滑窗口*/
  127. $(".opensidebar").click(function(){
  128. $(".wrapDetil").animate({width:"702"}).addClass("open");
  129. });
  130. // $("body").click(function(event){
  131. // var e = event || window.event; //浏览器兼容性
  132. // var elem = event.target || e.srcElement;
  133. // while (elem) { //循环判断至跟节点,防止点击的是div子元素
  134. // if (elem.className == "opensidebar" || elem.className == 'wrapDetil open') {
  135. // return false;
  136. // }
  137. // elem = elem.parentNode;
  138. // }
  139. // $(".wrapDetil").animate({width:"0"}).removeClass("open")// 关闭处理
  140. // });
  141. $("body").click(function(event){
  142. var e = event || window.event; //浏览器兼容性
  143. if(!$(event.target).is('a')) {
  144. var elem = event.target || e.srcElement;
  145. while (elem) { //循环判断至跟节点,防止点击的是div子元素
  146. if (elem.className == "opensidebar" || elem.className == 'wrapDetil open') {
  147. return false;
  148. }
  149. elem = elem.parentNode;
  150. }
  151. $(".wrapDetil").animate({width:"0"}).removeClass("open")// 关闭处理
  152. }
  153. });
  154. /*侧滑窗口*/
  155. });
  156. function slideupInfo(c){
  157. $(c).parent(".addRecord").hide().siblings(".addRecord").show();
  158. $('.contactInfo').slideUp();
  159. $('.lockRecord').toggleClass("autoHeightR1").height($(window).height()-53);
  160. };
  161. function slidedownInfo(a){
  162. var infoHeight = $(".contactInfo").height();
  163. $(a).parent(".addRecord").hide().siblings(".addRecord").show();
  164. $('.contactInfo').slideDown();
  165. $('.lockRecord').toggleClass("autoHeightR1").height($(window).height()-infoHeight-48);
  166. };
  167. /* ========================================================================
  168. * Bootstrap: modal.js v3.3.0
  169. * http://getbootstrap.com/javascript/#modals
  170. * ========================================================================
  171. * Copyright 2011-2014 Twitter, Inc.
  172. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  173. * ======================================================================== */
  174. +function ($) {
  175. 'use strict';
  176. // MODAL CLASS DEFINITION
  177. // ======================
  178. var Modal = function (element, options) {
  179. this.options = options
  180. this.$body = $(document.body)
  181. this.$element = $(element)
  182. this.$backdrop =
  183. this.isShown = null
  184. this.scrollbarWidth = 0
  185. if (this.options.remote) {
  186. this.$element
  187. .find('.modal-content')
  188. .load(this.options.remote, $.proxy(function () {
  189. this.$element.trigger('loaded.bs.modal')
  190. }, this))
  191. }
  192. }
  193. Modal.VERSION = '3.3.0'
  194. Modal.TRANSITION_DURATION = 300
  195. Modal.BACKDROP_TRANSITION_DURATION = 150
  196. Modal.DEFAULTS = {
  197. backdrop: true,
  198. keyboard: true,
  199. show: true
  200. }
  201. Modal.prototype.toggle = function (_relatedTarget) {
  202. return this.isShown ? this.hide() : this.show(_relatedTarget)
  203. }
  204. Modal.prototype.show = function (_relatedTarget) {
  205. var that = this
  206. var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
  207. this.$element.trigger(e)
  208. if (this.isShown || e.isDefaultPrevented()) return
  209. this.isShown = true
  210. this.checkScrollbar()
  211. this.$body.addClass('modal-open')
  212. this.setScrollbar()
  213. this.escape()
  214. this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
  215. this.backdrop(function () {
  216. var transition = $.support.transition && that.$element.hasClass('fade')
  217. if (!that.$element.parent().length) {
  218. that.$element.appendTo(that.$body) // don't move modals dom position
  219. }
  220. that.$element
  221. .show()
  222. .scrollTop(0)
  223. if (transition) {
  224. that.$element[0].offsetWidth // force reflow
  225. }
  226. that.$element
  227. .addClass('in')
  228. .attr('aria-hidden', false)
  229. that.enforceFocus()
  230. var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
  231. transition ?
  232. that.$element.find('.modal-dialog') // wait for modal to slide in
  233. .one('bsTransitionEnd', function () {
  234. that.$element.trigger('focus').trigger(e)
  235. })
  236. .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
  237. that.$element.trigger('focus').trigger(e)
  238. })
  239. }
  240. Modal.prototype.hide = function (e) {
  241. if (e) e.preventDefault()
  242. e = $.Event('hide.bs.modal')
  243. this.$element.trigger(e)
  244. if (!this.isShown || e.isDefaultPrevented()) return
  245. this.isShown = false
  246. this.escape()
  247. $(document).off('focusin.bs.modal')
  248. this.$element
  249. .removeClass('in')
  250. .attr('aria-hidden', true)
  251. .off('click.dismiss.bs.modal')
  252. $.support.transition && this.$element.hasClass('fade') ?
  253. this.$element
  254. .one('bsTransitionEnd', $.proxy(this.hideModal, this))
  255. .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
  256. this.hideModal()
  257. }
  258. Modal.prototype.enforceFocus = function () {
  259. $(document)
  260. .off('focusin.bs.modal') // guard against infinite focus loop
  261. .on('focusin.bs.modal', $.proxy(function (e) {
  262. if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
  263. this.$element.trigger('focus')
  264. }
  265. }, this))
  266. }
  267. Modal.prototype.escape = function () {
  268. if (this.isShown && this.options.keyboard) {
  269. this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
  270. e.which == 27 && this.hide()
  271. }, this))
  272. } else if (!this.isShown) {
  273. this.$element.off('keydown.dismiss.bs.modal')
  274. }
  275. }
  276. Modal.prototype.hideModal = function () {
  277. var that = this
  278. this.$element.hide()
  279. this.backdrop(function () {
  280. that.$body.removeClass('modal-open')
  281. that.resetScrollbar()
  282. that.$element.trigger('hidden.bs.modal')
  283. })
  284. }
  285. Modal.prototype.removeBackdrop = function () {
  286. this.$backdrop && this.$backdrop.remove()
  287. this.$backdrop = null
  288. }
  289. Modal.prototype.backdrop = function (callback) {
  290. var that = this
  291. var animate = this.$element.hasClass('fade') ? 'fade' : ''
  292. if (this.isShown && this.options.backdrop) {
  293. var doAnimate = $.support.transition && animate
  294. this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
  295. .prependTo(this.$element)
  296. .on('click.dismiss.bs.modal', $.proxy(function (e) {
  297. if (e.target !== e.currentTarget) return
  298. this.options.backdrop == 'static'
  299. ? this.$element[0].focus.call(this.$element[0])
  300. : this.hide.call(this)
  301. }, this))
  302. if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
  303. this.$backdrop.addClass('in')
  304. if (!callback) return
  305. doAnimate ?
  306. this.$backdrop
  307. .one('bsTransitionEnd', callback)
  308. .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
  309. callback()
  310. } else if (!this.isShown && this.$backdrop) {
  311. this.$backdrop.removeClass('in')
  312. var callbackRemove = function () {
  313. that.removeBackdrop()
  314. callback && callback()
  315. }
  316. $.support.transition && this.$element.hasClass('fade') ?
  317. this.$backdrop
  318. .one('bsTransitionEnd', callbackRemove)
  319. .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
  320. callbackRemove()
  321. } else if (callback) {
  322. callback()
  323. }
  324. }
  325. Modal.prototype.checkScrollbar = function () {
  326. this.scrollbarWidth = this.measureScrollbar()
  327. }
  328. Modal.prototype.setScrollbar = function () {
  329. var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
  330. if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
  331. }
  332. Modal.prototype.resetScrollbar = function () {
  333. this.$body.css('padding-right', '')
  334. }
  335. Modal.prototype.measureScrollbar = function () { // thx walsh
  336. if (document.body.clientWidth >= window.innerWidth) return 0
  337. var scrollDiv = document.createElement('div')
  338. scrollDiv.className = 'modal-scrollbar-measure'
  339. this.$body.append(scrollDiv)
  340. var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
  341. this.$body[0].removeChild(scrollDiv)
  342. return scrollbarWidth
  343. }
  344. // MODAL PLUGIN DEFINITION
  345. // =======================
  346. function Plugin(option, _relatedTarget) {
  347. return this.each(function () {
  348. var $this = $(this)
  349. var data = $this.data('bs.modal')
  350. var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
  351. if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
  352. if (typeof option == 'string') data[option](_relatedTarget)
  353. else if (options.show) data.show(_relatedTarget)
  354. })
  355. }
  356. var old = $.fn.modal
  357. $.fn.modal = Plugin
  358. $.fn.modal.Constructor = Modal
  359. // MODAL NO CONFLICT
  360. // =================
  361. $.fn.modal.noConflict = function () {
  362. $.fn.modal = old
  363. return this
  364. }
  365. // MODAL DATA-API
  366. // ==============
  367. $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
  368. var $this = $(this)
  369. var href = $this.attr('href')
  370. var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
  371. var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
  372. if ($this.is('a')) e.preventDefault()
  373. $target.one('show.bs.modal', function (showEvent) {
  374. if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
  375. $target.one('hidden.bs.modal', function () {
  376. $this.is(':visible') && $this.trigger('focus')
  377. })
  378. })
  379. Plugin.call($target, option, this)
  380. })
  381. }(jQuery);
  382. !function(a){var b=function(a,b){this.init("ctooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" ");for(i=g.length;i--;)h=g[i],h=="click"?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):h!="manual"&&(e=h=="hover"?"mouseenter":"focus",f=h=="hover"?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a.fn[this.type].defaults,d={},e;this._options&&a.each(this._options,function(a,b){c[a]!=b&&(d[a]=b)},this),e=a(b.currentTarget)[this.type](d).data(this.type);if(!e.options.delay||!e.options.delay.show)return e.show();clearTimeout(this.timeout),e.hoverState="in",this.timeout=setTimeout(function(){e.hoverState=="in"&&e.show()},e.options.delay.show)},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!c.options.delay||!c.options.delay.hide)return c.hide();c.hoverState="out",this.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(h);if(h.isDefaultPrevented())return;b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight;switch(f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c=this.tip(),d=c[0].offsetWidth,e=c[0].offsetHeight,f,g,h,i;c.offset(a).addClass(b).addClass("in"),f=c[0].offsetWidth,g=c[0].offsetHeight,b=="top"&&g!=e&&(a.top=a.top+e-g,i=!0),b=="bottom"||b=="top"?(h=0,a.left<0&&(h=a.left*-2,a.left=0,c.offset(a),f=c[0].offsetWidth,g=c[0].offsetHeight),this.replaceArrow(h-d+f,f,"left")):this.replaceArrow(g-e,g,"top"),i&&c.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".ctooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function e(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var b=this,c=this.tip(),d=a.Event("hide");this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?e():c.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".ctooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.ctooltip;a.fn.ctooltip=function(c){return this.each(function(){var d=a(this),e=d.data("ctooltip"),f=typeof c=="object"&&c;e||d.data("ctooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.ctooltip.Constructor=b,a.fn.ctooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="ctooltip"><div class="ctooltip-arrow"></div><div class="ctooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.ctooltip.noConflict=function(){return a.fn.ctooltip=c,this}}(window.jQuery)
  383. !function(a){function d(){a(".dropdown-backdrop").remove(),a(b).each(function(){e(a(this)).removeClass("open")})}function e(b){var c=b.attr("data-target"),d;c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,"")),d=c&&a(c);if(!d||!d.length)d=b.parent();return d}var b="[data-toggle=dropdown]",c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),f,g;if(c.is(".disabled, :disabled"))return;return f=e(c),g=f.hasClass("open"),d(),g||("ontouchstart"in document.documentElement&&a('<div class="dropdown-backdrop"/>').insertBefore(a(this)).on("click",d),f.toggleClass("open")),c.focus(),!1},keydown:function(c){var d,f,g,h,i,j;if(!/(38|40|27)/.test(c.keyCode))return;d=a(this),c.preventDefault(),c.stopPropagation();if(d.is(".disabled, :disabled"))return;h=e(d),i=h.hasClass("open");if(!i||i&&c.keyCode==27)return c.which==27&&h.find(b).focus(),d.click();f=a("[role=menu] li:not(.divider):visible a",h);if(!f.length)return;j=f.index(f.filter(":focus")),c.keyCode==38&&j>0&&j--,c.keyCode==40&&j<f.length-1&&j++,~j||(j=0),f.eq(j).focus()}};var f=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=f,this},a(document).on("click.dropdown.data-api",d).on("click.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",b,c.prototype.toggle).on("keydown.dropdown.data-api",b+", [role=menu]",c.prototype.keydown)}(window.jQuery);