// html标签增加特定class, attribute,限定样式,兼容浏览器用 document.documentelement.classname += ' ie' + document.documentmode; document.documentelement.setattribute("data-useragent", navigator.useragent); /*! jquery mobile v1.5.0-pre | copyright jquery foundation, inc. | jquery.org/license */ (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jquery,e,t)})(this,document,function(e,t,n,r){(function(t){typeof define=="function"&&define.amd?define("vmouse",["jquery"],t):t(e)})(function(e){function t(e){while(e&&typeof e.originalevent!="undefined")e=e.originalevent;return e}function n(t,n){var i=t.type,o,a,l,c,h,p,d,v,m;t=e.event(t),t.type=n,o=t.originalevent,a=u,i.search(/^(mouse|click)/)>-1&&(a=f);if(o)for(d=a.length;d;)c=a[--d],t[c]=o[c];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){l=t(o),i=l.touches,h=l.changedtouches,p=i&&i.length?i[0]:h&&h.length?h[0]:r;if(p)for(v=0,m=s.length;vi||math.abs(n.pagey-p)>i,d&&!r&&p("vmousecancel",t,s),p("vmousemove",t,s),d()}function i(t){if(g||e.data(t.target,"lasttouchtype")===r)return;a(),delete e.data(t.target).lasttouchtype;var n=c(t.target),i,s;p("vmouseup",t,n),d||(i=p("vclick",t,n),i&&i.isdefaultprevented()&&(s=t(t).changedtouches[0],v.push({touchid:e,x:s.clientx,y:s.clienty}),m=!0)),p("vmouseout",t,n),d=!1,d()}function q(n){var r=e.data(n,t),i;if(r)for(i in r)if(r[i])return!0;return!1}function r(){}function u(n){var r=n.substr(1);return{setup:function(){q(this)||e.data(this,t,{});var i=e.data(this,t);i[n]=!0,l[n]=(l[n]||0)+1,l[n]===1&&b.bind(r,h),e(this).bind(r,r),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",b).bind("touchend",i).bind("touchmove",f).bind("scroll",j))},teardown:function(){--l[n],l[n]||b.unbind(r,h),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",b).unbind("touchmove",f).unbind("touchend",i).unbind("scroll",j));var i=e(this),s=e.data(this,t);s&&(s[n]=!1),i.unbind(r,r),q(this)||i.removedata(t)}}}var t="virtualmousebindings",i="virtualtouchid",s="clientx clienty pagex pagey screenx screeny".split(" "),o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="altkey bubbles cancelable ctrlkey currenttarget detail eventphase metakey relatedtarget shiftkey target timestamp view which".split(" "),a=e.event.mousehooks?e.event.mousehooks.props:[],f=u.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addeventlistener"in n,b=e(n),w=1,e=0,s,x;e.vmouse={movedistancethreshold:10,clickdistancethreshold:10,resettimerduration:1500,maximumtimebetweentouches:100};for(x=0;x=2?15:30,verticaldistancethreshold:t.devicepixelratio>=2?15:30,getlocation:function(e){var n=t.pagexoffset,r=t.pageyoffset,i=e.clientx,s=e.clienty;if(e.pagey===0&&math.floor(s)>math.floor(e.pagey)||e.pagex===0&&math.floor(i)>math.floor(e.pagex))i-=n,s-=r;else if(se.event.special.swipe.horizontaldistancethreshold&&math.abs(t.coords[1]-n.coords[1])n.coords[0]?"swipeleft":"swiperight";return f(r,"swipe",e.event("swipe",{target:i,swipestart:t,swipestop:n}),!0),f(r,s,e.event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventinprogress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventinprogress)return;e.event.special.swipe.eventinprogress=!0;var r,o=e.event.special.swipe.start(t),f=t.target,l=!1;s.move=function(t){if(!o||t.isdefaultprevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleswipe(o,r,n,f),l&&(e.event.special.swipe.eventinprogress=!1)),math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollsupressionthreshold&&t.preventdefault()},s.stop=function(){l=!0,e.event.special.swipe.eventinprogress=!1,i.off(a,s.move),s.move=null},i.on(a,s.move).one(u,s.stop)},r.on(o,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removedata(this,"mobile-events")),n&&(n.start&&e(this).off(o,n.start),n.move&&i.off(a,n.move),n.stop&&i.off(u,n.stop))}},e.each({taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}}),e.event.special})}); /* ======================================================================== * bootstrap: transition.js v3.3.7 * http://getbootstrap.com/javascript/#transitions * ======================================================================== * copyright 2011-2016 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) * ======================================================================== */ +function ($) { 'use strict'; // css transition support (shoutout: http://www.modernizr.com/) // ============================================================ function transitionend() { var el = document.createelement('bootstrap') var transendeventnames = { webkittransition : 'webkittransitionend', moztransition : 'transitionend', otransition : 'otransitionend otransitionend', transition : 'transitionend' } for (var name in transendeventnames) { if (el.style[name] !== undefined) { return { end: transendeventnames[name] } } } return false // explicit for ie8 ( ._.) } // http://blog.alexmaccaw.com/css-transitions $.fn.emulatetransitionend = function (duration) { var called = false var $el = this $(this).one('bstransitionend', function () { called = true }) var callback = function () { if (!called) $($el).trigger($.support.transition.end) } settimeout(callback, duration) return this } $(function () { $.support.transition = transitionend() if (!$.support.transition) return $.event.special.bstransitionend = { bindtype: $.support.transition.end, delegatetype: $.support.transition.end, handle: function (e) { if ($(e.target).is(this)) return e.handleobj.handler.apply(this, arguments) } } }) }(jquery); /* ======================================================================== * bootstrap: collapse.js v3.3.7 * http://getbootstrap.com/javascript/#collapse * ======================================================================== * copyright 2011-2016 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) * ======================================================================== */ /* jshint latedef: false */ +function ($) { 'use strict'; // collapse public class definition // ================================ var collapse = function (element, options) { this.$element = $(element) this.options = $.extend({}, collapse.defaults, options) this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + '[data-toggle="collapse"][data-target="#' + element.id + '"]') this.transitioning = null if (this.options.parent) { this.$parent = this.getparent() } else { this.addariaandcollapsedclass(this.$element, this.$trigger) } if (this.options.toggle) this.toggle() } collapse.version = '3.3.7' collapse.transition_duration = 350 collapse.defaults = { toggle: true } collapse.prototype.dimension = function () { var haswidth = this.$element.hasclass('width') return haswidth ? 'width' : 'height' } collapse.prototype.show = function () { if (this.transitioning || this.$element.hasclass('in')) return var activesdata var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') if (actives && actives.length) { activesdata = actives.data('bs.collapse') if (activesdata && activesdata.transitioning) return } var startevent = $.event('show.bs.collapse') this.$element.trigger(startevent) if (startevent.isdefaultprevented()) return if (actives && actives.length) { plugin.call(actives, 'hide') activesdata || actives.data('bs.collapse', null) } var dimension = this.dimension() this.$element .removeclass('collapse') .addclass('collapsing')[dimension](0) .attr('aria-expanded', true) this.$trigger .removeclass('collapsed') .attr('aria-expanded', true) this.transitioning = 1 var complete = function () { this.$element .removeclass('collapsing') .addclass('collapse in')[dimension]('') this.transitioning = 0 this.$element .trigger('shown.bs.collapse') } if (!$.support.transition) return complete.call(this) var scrollsize = $.camelcase(['scroll', dimension].join('-')) this.$element .one('bstransitionend', $.proxy(complete, this)) .emulatetransitionend(collapse.transition_duration)[dimension](this.$element[0][scrollsize]) } collapse.prototype.hide = function () { if (this.transitioning || !this.$element.hasclass('in')) return var startevent = $.event('hide.bs.collapse') this.$element.trigger(startevent) if (startevent.isdefaultprevented()) return var dimension = this.dimension() this.$element[dimension](this.$element[dimension]())[0].offsetheight this.$element .addclass('collapsing') .removeclass('collapse in') .attr('aria-expanded', false) this.$trigger .addclass('collapsed') .attr('aria-expanded', false) this.transitioning = 1 var complete = function () { this.transitioning = 0 this.$element .removeclass('collapsing') .addclass('collapse') .trigger('hidden.bs.collapse') } if (!$.support.transition) return complete.call(this) this.$element [dimension](0) .one('bstransitionend', $.proxy(complete, this)) .emulatetransitionend(collapse.transition_duration) } collapse.prototype.toggle = function () { this[this.$element.hasclass('in') ? 'hide' : 'show']() } collapse.prototype.getparent = function () { return $(this.options.parent) .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') .each($.proxy(function (i, element) { var $element = $(element) this.addariaandcollapsedclass(gettargetfromtrigger($element), $element) }, this)) .end() } collapse.prototype.addariaandcollapsedclass = function ($element, $trigger) { var isopen = $element.hasclass('in') $element.attr('aria-expanded', isopen) $trigger .toggleclass('collapsed', !isopen) .attr('aria-expanded', isopen) } function gettargetfromtrigger($trigger) { var href var target = $trigger.attr('data-target') || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 return $(target) } // collapse plugin definition // ========================== function plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.collapse') var options = $.extend({}, collapse.defaults, $this.data(), typeof option == 'object' && option) if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false if (!data) $this.data('bs.collapse', (data = new collapse(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.collapse $.fn.collapse = plugin $.fn.collapse.constructor = collapse // collapse no conflict // ==================== $.fn.collapse.noconflict = function () { $.fn.collapse = old return this } // collapse data-api // ================= $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { var $this = $(this) if (!$this.attr('data-target')) e.preventdefault() var $target = gettargetfromtrigger($this) var data = $target.data('bs.collapse') var option = data ? 'toggle' : $this.data() plugin.call($target, option) }) }(jquery); /* ======================================================================== * 文字滚动插件 * ======================================================================== */ (function($) { $.fn.extend({ scroll: function(opt, callback) { //参数初始化 if (!opt) var opt = {}; var _btnup = $("#" + opt.up); //shawphy:向上按钮 var _btndown = $("#" + opt.down); //shawphy:向下按钮 var timerid; var _this = this.eq(0).find("ul:first"); var lineh = _this.find("li:first").height(), //获取行高 line = opt.line ? parseint(opt.line, 10) : parseint(this.height() / lineh, 10), speed = opt.speed ? parseint(opt.speed, 10) : 500; //卷动速度,数值越大,速度越慢(毫秒) timer = opt.timer if (line == 0) line = 1; var upheight = 0 - line * lineh; //滚动函数 var scrollup = function() { _btnup.unbind("click", scrollup); //shawphy:取消向上按钮的函数绑定 _this.animate({ margintop: upheight }, speed, function() { for (i = 1; i <= line; i++) { _this.find("li:first").appendto(_this); } _this.css({ margintop: 0 }); _btnup.bind("click", scrollup); //shawphy:绑定向上按钮的点击事件 }); } //shawphy:向下翻页函数 var scrolldown = function() { _btndown.unbind("click", scrolldown); for (i = 1; i <= line; i++) { _this.find("li:last").show().prependto(_this); } _this.css({ margintop: upheight }); _this.animate({ margintop: 0 }, speed, function() { _btndown.bind("click", scrolldown); }); } //shawphy:自动播放 var autoplay = function() { if (timer) timerid = window.setinterval(scrollup, timer); }; var autostop = function() { if (timer) window.clearinterval(timerid); }; //鼠标事件绑定 _this.hover(autostop, autoplay).mouseout(); _btnup.css("cursor", "pointer").click(scrollup).hover(autostop, autoplay); //shawphy:向上向下鼠标事件绑定 _btndown.css("cursor", "pointer").click(scrolldown).hover(autostop, autoplay); } }) //视频背景插件 $.fn.vidbacking = function(options){ var settings = $.extend({ 'video-opacity': '1', 'masked': false, 'mask-opacity': '1' },options); return this.each(function(){ var targetobj = $(this), obj = $('.vidbacking'), poster = obj.attr('poster'), targettag = targetobj.prop('tagname'), targetid = targetobj.prop('id'); if(targettag == 'body'){ obj.css('background-size','100% 100% !important'); obj.css('background-image','url('+poster+')'); obj.addclass('vidbacking-active-body-back'); obj.css('opacity',settings["video-opacity"]); obj.removeclass('vidbacking'); if(settings.masked == true){ obj.after('
 
'); $('.vidmask-body-back').css('opacity',settings["mask-opacity"]); } $(window).resize(function(){ var winh = $(window).height(), winw = $(window).width(), vidh = obj.height(), vidw = obj.width(); if(vidh < winh){ obj.css('height',winh); } if(vidw < winw){ obj.css('width',winw); } }); }else{ targetobj.css('position','relative'); targetobj.css('overflow','hidden'); obj.css('background-image','url('+poster+')'); obj.addclass('vidbacking-active-block-back'); obj.css('opacity',settings["video-opacity"]); obj.removeclass('vidbacking'); if(settings.masked == true){ targetobj.append('
 
'); targetobj.find('.vidmask-block-back').css('opacity',settings["mask-opacity"]); } $(window).resize(function(){ var winh = targetobj.height(), winw = targetobj.width(), vidh = obj.height(), vidw = obj.width(); if(vidh < winh){ obj.css('height',winh); } if(vidw < winw){ obj.css('width',winw); } }); } }); } })(jquery); //全屏自适应轮播 !function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},g,c),this._defaults=g,this._name=f,this.init()}var f="flickerplate",g={arrows:!0,arrows_constraint:!1,auto_flick:!0,auto_flick_delay:10,block_text:!0,dot_alignment:"center",dot_navigation:!0,flick_animation:"transition-slide",flick_position:1,theme:"light"};e.prototype={init:function(){function b(){r.addclass("flickerplate"),r.find("ul:first").addclass("flicks"),r.addclass("animate-"+q.flick_animation),r.addclass("flicker-theme-"+q.theme),r.attr("data-flick-position",q.flick_position),n(),r.find("ul.flicks > li").each(function(){u++,a(this).wrapinner('
'),$flick_block_text=a(this).data("block-text"),$flick_block_text!=d?1==$flick_block_text&&(a(this).find(".flick-title").wrapinner(''),a(this).find(".flick-sub-text").wrapinner('')):1==q.block_text&&(a(this).find(".flick-title").wrapinner(''),a(this).find(".flick-sub-text").wrapinner('')),$background=a(this).data("background"),$background!=d&&a(this).css("background-image","url("+$background+")")}),"scroller-slide"!=q.flick_animation&&"jquery-slide"!=q.flick_animation&&"jquery-fade"!=q.flick_animation&&r.find("ul.flicks").bind("transitionend mstransitionend webkittransitionend otransitionend",function(){v=!1})}function c(){"scroller-slide"!=q.flick_animation&&1==q.arrows&&($arrow_nav_html='
',$arrow_nav_html+='
',r.prepend($arrow_nav_html),r.find(".arrow-navigation").on("click",function(){a(this).hasclass("right")?++q.flick_position>u&&(q.flick_position=q.arrows_constraint?u:1):--q.flick_position<1&&(q.flick_position=q.arrows_constraint?1:u),n(),i()}))}function e(){if("scroller-slide"!=q.flick_animation&&1==q.dot_navigation){for($dot_nav_html='
    ';u>s;)s++,$dot_nav_html+=1==s?'
  • ':'
  • ';$dot_nav_html+="
",r.prepend($dot_nav_html),r.find(".dot-navigation li").on("click",function(){q.flick_position=a(this).index()+1,n(),i()})}}function f(){1==q.auto_flick&&(o=setinterval(g,q.auto_flick_delay))}function g(){++q.flick_position>u&&(q.flick_position=1),n()}function h(){1==q.auto_flick&&(o=clearinterval(o))}function i(){h(),f()}function j(){"transform-slide"==q.flick_animation||"transition-slide"==q.flick_animation||"jquery-slide"==q.flick_animation?r.find("ul.flicks").hammer().on("panleft panright",function(a){k(a)}).on("panend",function(a){l(a)}):("transition-fade"==q.flick_animation||"jquery-fade"==q.flick_animation)&&r.find("ul.flicks").hammer().on("swipeleft swiperight",function(a){m(a)})}function k(a){switch(h(),$flicker_width=r.width(),q.flick_animation){case"transform-slide":$pos_x=modernizr.touch?math.round(a.gesture.deltax/$flicker_width*1e3)/1e3+x:math.round(a.gesture.deltax/$flicker_width*10)/10+x,1==q.flick_position&&$pos_x>0?$pos_x=0:q.flick_position==u&&-(u-1)>$pos_x&&($pos_x=-(u-1)),y="translate3d("+$pos_x+"%, 0, 0)",r.find("ul.flicks").css({wekittransform:y,transform:y});break;case"transition-slide":case"jquery-slide":$pos_x=math.round(a.gesture.deltax/$flicker_width*100)+w,1==q.flick_position&&$pos_x>0?$pos_x=0:q.flick_position==u&&-(100*(u-1))>$pos_x&&($pos_x=-(100*(u-1))),r.find("ul.flicks").attr({style:"left:"+$pos_x+"%;"})}}function l(a){$end_pos_x=a.gesture.deltax,-z>$end_pos_x?q.flick_positionz&&q.flick_position>1&&q.flick_position--,settimeout(function(){n()},10),f()}function m(a){"swipeleft"==a.type?++q.flick_position>u&&(q.flick_position=q.arrows_constraint?u:1):"swiperight"==a.type&&--q.flick_position<1&&(q.flick_position=q.arrows_constraint?1:u),n(),i()}function n(){switch($position=q.flick_position-1,q.flick_animation){case"transform-slide":r.find("ul.flicks").attr({style:"-webkit-transform:translate3d(-"+$position+"%, 0, 0);-o-transform:translate3d(-"+$position+"%, 0, 0);-moz-transform:translate3d(-"+$position+"%, 0, 0);transform:translate3d(-"+$position+"%, 0, 0)"}),x=-$position;break;case"transition-slide":r.find("ul.flicks").attr({style:"left:-"+$position+"00%;"}),w=-($position+"00");break;case"jquery-slide":r.find("ul.flicks").animate({left:"-"+$position+"00%"},function(){v=!1}),w=-($position+"00");break;case"transition-fade":$pre_position=parseint(r.attr("data-flick-position"))-1,$pre_position===$position?(r.find("ul.flicks li:eq("+$pre_position+")").css("opacity",0),r.find("ul.flicks li:eq("+$position+")").css("opacity",1),settimeout(function(){r.addclass("fade-inited")},10)):(r.find("ul.flicks li:eq("+$pre_position+")").css("opacity",0),r.find("ul.flicks li:eq("+$position+")").css("opacity",1));break;case"jquery-fade":$pre_position=parseint(r.attr("data-flick-position"))-1,$pre_position===$position?r.find("ul.flicks li:gt("+$pre_position+")").css("display","none"):r.find("ul.flicks li:eq("+$pre_position+")").animate({opacity:0},q.fade_speed,function(){a(this).css("display","none")}),r.find("ul.flicks li:eq("+$position+")").css("display","").animate({opacity:1},q.fade_speed);break;default:r.find("ul.flicks").attr({style:"-webkit-transform:translate3d(-"+$position+"%, 0, 0);-o-transform:translate3d(-"+$position+"%, 0, 0);-moz-transform:translate3d(-"+$position+"%, 0, 0);transform:translate3d(-"+$position+"%, 0, 0)"})}$flick_theme=r.find("ul.flicks li:eq("+$position+")").data("theme"),r.removeclass("flicker-theme-light").removeclass("flicker-theme-dark").addclass($flick_theme!=d?"flicker-theme-"+$flick_theme:"flicker-theme-"+q.theme),r.find(".dot-navigation .dot.active").removeclass("active"),r.find(".dot:eq("+$position+")").addclass("active"),r.attr("data-flick-position",q.flick_position)}var o,p=this,q=p.settings,r=a(p.element),s=0,t=800,u=0,v=!1,w=0,x=0,y="translate3d(0, 0, 0)",z=100;r.data("arrows")!=d&&(q.arrows=r.data("arrows")),r.data("arrows-constraint")!=d&&(q.arrows_constraint=r.data("arrows-constraint")),q.auto_flick_delay=r.data("auto-flick-delay")!=d?1e3*r.data("auto-flick-delay"):1e3*q.auto_flick_delay,r.data("block-text")!=d&&(q.block_text=r.data("block-text")),q.dot_alignment=r.data("dot-alignment")||q.dot_alignment,r.data("dot-navigation")!=d&&(q.dot_navigation=r.data("dot-navigation")),q.fade_speed=t,q.flick_animation=r.data("flick-animation")||q.flick_animation,q.flick_position=r.data("flick-position")||q.flick_position,q.theme=r.find("li:eq(0)").data("theme")||r.data("theme")||q.theme,b(),c(),e(),f(),j()}},a.fn[f]=function(b){var c;return this.each(function(){c=a.data(this,"plugin_"+f),c||(c=new e(this,b),a.data(this,"plugin_"+f,c))}),c}}(jquery,window,document); /* ======================================================================== * bootstrap: tab.js v3.3.7 * http://getbootstrap.com/javascript/#tabs * ======================================================================== * copyright 2011-2016 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) * ======================================================================== */ +function ($) { 'use strict'; // tab class definition // ==================== var tab = function (element) { // jscs:disable requiredollarbeforejqueryassignment this.element = $(element) // jscs:enable requiredollarbeforejqueryassignment } tab.version = '3.3.7' tab.transition_duration = 150 tab.prototype.show = function () { var $this = this.element var $ul = $this.closest('ul:not(.dropdown-menu)') var selector = $this.data('target') if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 } if ($this.parent('li').hasclass('active')) return var $previous = $ul.find('.active:last a') var hideevent = $.event('hide.bs.tab', { relatedtarget: $this[0] }) var showevent = $.event('show.bs.tab', { relatedtarget: $previous[0] }) $previous.trigger(hideevent) $this.trigger(showevent) if (showevent.isdefaultprevented() || hideevent.isdefaultprevented()) return var $target = $(selector) this.activate($this.closest('li'), $ul) this.activate($target, $target.parent(), function () { $previous.trigger({ type: 'hidden.bs.tab', relatedtarget: $this[0] }) $this.trigger({ type: 'shown.bs.tab', relatedtarget: $previous[0] }) }) } tab.prototype.activate = function (element, container, callback) { var $active = container.find('> .active') var transition = callback && $.support.transition && ($active.length && $active.hasclass('fade') || !!container.find('> .fade').length) function next() { $active .removeclass('active') .find('> .dropdown-menu > .active') .removeclass('active') .end() .find('[data-toggle="tab"]') .attr('aria-expanded', false) element .addclass('active') .find('[data-toggle="tab"]') .attr('aria-expanded', true) if (transition) { element[0].offsetwidth // reflow for transition element.addclass('in') } else { element.removeclass('fade') } if (element.parent('.dropdown-menu').length) { element .closest('li.dropdown') .addclass('active') .end() .find('[data-toggle="tab"]') .attr('aria-expanded', true) } callback && callback() } $active.length && transition ? $active .one('bstransitionend', next) .emulatetransitionend(tab.transition_duration) : next() $active.removeclass('in') } // tab plugin definition // ===================== function plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tab') if (!data) $this.data('bs.tab', (data = new tab(this))) if (typeof option == 'string') data[option]() }) } var old = $.fn.tab $.fn.tab = plugin $.fn.tab.constructor = tab // tab no conflict // =============== $.fn.tab.noconflict = function () { $.fn.tab = old return this } // tab data-api // ============ var clickhandler = function (e) { e.preventdefault() plugin.call($(this), 'show') } $(document) .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickhandler) .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickhandler) }(jquery); /* ======================================================================== * bootstrap: affix.js v3.3.7 * http://getbootstrap.com/javascript/#affix * ======================================================================== * copyright 2011-2016 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) * ======================================================================== */ +function ($) { 'use strict'; // affix class definition // ====================== var affix = function (element, options) { this.options = $.extend({}, affix.defaults, options) this.$target = $(this.options.target) .on('scroll.bs.affix.data-api', $.proxy(this.checkposition, this)) .on('click.bs.affix.data-api', $.proxy(this.checkpositionwitheventloop, this)) this.$element = $(element) this.affixed = null this.unpin = null this.pinnedoffset = null this.checkposition() } affix.version = '3.3.7' affix.reset = 'affix affix-top affix-bottom' affix.defaults = { offset: 0, target: window } affix.prototype.getstate = function (scrollheight, height, offsettop, offsetbottom) { var scrolltop = this.$target.scrolltop() var position = this.$element.offset() var targetheight = this.$target.height() if (offsettop != null && this.affixed == 'top') return scrolltop < offsettop ? 'top' : false if (this.affixed == 'bottom') { if (offsettop != null) return (scrolltop + this.unpin <= position.top) ? false : 'bottom' return (scrolltop + targetheight <= scrollheight - offsetbottom) ? false : 'bottom' } var initializing = this.affixed == null var collidertop = initializing ? scrolltop : position.top var colliderheight = initializing ? targetheight : height if (offsettop != null && scrolltop <= offsettop) return 'top' if (offsetbottom != null && (collidertop + colliderheight >= scrollheight - offsetbottom)) return 'bottom' return false } affix.prototype.getpinnedoffset = function () { if (this.pinnedoffset) return this.pinnedoffset this.$element.removeclass(affix.reset).addclass('affix') var scrolltop = this.$target.scrolltop() var position = this.$element.offset() return (this.pinnedoffset = position.top - scrolltop) } affix.prototype.checkpositionwitheventloop = function () { settimeout($.proxy(this.checkposition, this), 1) } affix.prototype.checkposition = function () { if (!this.$element.is(':visible')) return var height = this.$element.height() var offset = this.options.offset var offsettop = offset.top var offsetbottom = offset.bottom var scrollheight = math.max($(document).height(), $(document.body).height()) if (typeof offset != 'object') offsetbottom = offsettop = offset if (typeof offsettop == 'function') offsettop = offset.top(this.$element) if (typeof offsetbottom == 'function') offsetbottom = offset.bottom(this.$element) var affix = this.getstate(scrollheight, height, offsettop, offsetbottom) if (this.affixed != affix) { if (this.unpin != null) this.$element.css('top', '') var affixtype = 'affix' + (affix ? '-' + affix : '') var e = $.event(affixtype + '.bs.affix') this.$element.trigger(e) if (e.isdefaultprevented()) return this.affixed = affix this.unpin = affix == 'bottom' ? this.getpinnedoffset() : null this.$element .removeclass(affix.reset) .addclass(affixtype) .trigger(affixtype.replace('affix', 'affixed') + '.bs.affix') } if (affix == 'bottom') { this.$element.offset({ top: scrollheight - height - offsetbottom }) } } // affix plugin definition // ======================= function plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.affix') var options = typeof option == 'object' && option if (!data) $this.data('bs.affix', (data = new affix(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.affix $.fn.affix = plugin $.fn.affix.constructor = affix // affix no conflict // ================= $.fn.affix.noconflict = function () { $.fn.affix = old return this } // affix data-api // ============== $(window).on('load', function () { $('[data-spy="affix"]').each(function () { var $spy = $(this) var data = $spy.data() data.offset = data.offset || {} if (data.offsetbottom != null) data.offset.bottom = data.offsetbottom if (data.offsettop != null) data.offset.top = data.offsettop plugin.call($spy, data) }) }) }(jquery); /*! jquery.cookie v1.4.1 | mit */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jquery)}(function(a){function b(a){return h.raw?a:encodeuricomponent(a)}function c(a){return h.raw?a:decodeuricomponent(a)}function d(a){return b(h.json?json.stringify(a):string(a))}function e(a){0===a.indexof('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeuricomponent(a.replace(g," ")),h.json?json.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isfunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isfunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new date;k.settime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toutcstring():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removecookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); // jquery autocomplete v1.0.7 // https://github.com/pixabay/jquery-autocomplete !function(e){e.fn.autocomplete=function(t){var o=e.extend({},e.fn.autocomplete.defaults,t);return"string"==typeof t?(this.each(function(){var o=e(this);"destroy"==t&&(e(window).off("resize.autocomplete",o.updatesc),o.off("blur.autocomplete focus.autocomplete keydown.autocomplete keyup.autocomplete"),o.data("autocomplete")?o.attr("autocomplete",o.data("autocomplete")):o.removeattr("autocomplete"),e(o.data("sc")).remove(),o.removedata("sc").removedata("autocomplete"))}),this):this.each(function(){function t(e){var t=s.val();if(s.cache[t]=e,e.length&&t.length>=o.minchars){for(var a="",c=0;c'),s.data("sc",s.sc).data("autocomplete",s.attr("autocomplete")),s.attr("autocomplete","off"),s.cache={},s.last_val="",s.updatesc=function(t,o){if(s.sc.css({top:s.offset().top+s.outerheight(),left:s.offset().left,width:s.outerwidth()}),!t&&(s.sc.show(),s.sc.maxheight||(s.sc.maxheight=parseint(s.sc.css("max-height"))),s.sc.suggestionheight||(s.sc.suggestionheight=e(".autocomplete-suggestion",s.sc).first().outerheight()),s.sc.suggestionheight))if(o){var a=s.sc.scrolltop(),c=o.offset().top-s.sc.offset().top;c+s.sc.suggestionheight-s.sc.maxheight>0?s.sc.scrolltop(c+s.sc.suggestionheight+a-s.sc.maxheight):0>c&&s.sc.scrolltop(c+a)}else s.sc.scrolltop(0)},e(window).on("resize.autocomplete",s.updatesc),s.sc.appendto("body"),s.sc.on("mouseleave",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeclass("selected")}),s.sc.on("mouseenter",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeclass("selected"),e(this).addclass("selected")}),s.sc.on("mousedown click",".autocomplete-suggestion",function(t){var a=e(this),c=a.data("val");return(c||a.hasclass("autocomplete-suggestion"))&&(s.val(c),o.onselect(t,c,a),s.sc.hide()),!1}),s.on("blur.autocomplete",function(){try{over_sb=e(".autocomplete-suggestions:hover").length}catch(t){over_sb=0}over_sb?s.is(":focus")||settimeout(function(){s.focus()},20):(s.last_val=s.val(),s.sc.hide(),settimeout(function(){s.sc.hide()},350))}),o.minchars||s.on("focus.autocomplete",function(){s.last_val="\n",s.trigger("keyup.autocomplete")}),s.on("keydown.autocomplete",function(t){if((40==t.which||38==t.which)&&s.sc.html()){var a,c=e(".autocomplete-suggestion.selected",s.sc);return c.length?(a=40==t.which?c.next(".autocomplete-suggestion"):c.prev(".autocomplete-suggestion"),a.length?(c.removeclass("selected"),s.val(a.addclass("selected").data("val"))):(c.removeclass("selected"),s.val(s.last_val),a=0)):(a=40==t.which?e(".autocomplete-suggestion",s.sc).first():e(".autocomplete-suggestion",s.sc).last(),s.val(a.addclass("selected").data("val"))),s.updatesc(0,a),!1}if(27==t.which)s.val(s.last_val).sc.hide();else if(13==t.which||9==t.which){var c=e(".autocomplete-suggestion.selected",s.sc);c.length&&s.sc.is(":visible")&&(o.onselect(t,c.data("val"),c),settimeout(function(){s.sc.hide()},20))}}),s.on("keyup.autocomplete",function(a){if(!~e.inarray(a.which,[13,27,35,36,37,38,39,40])){var c=s.val();if(c.length>=o.minchars){if(c!=s.last_val){if(s.last_val=c,cleartimeout(s.timer),o.cache){if(c in s.cache)return void t(s.cache[c]);for(var l=1;l'+e.replace(o,"$1")+""},onselect:function(e,t,o){}}}(jquery); /*! * bootstrap v3.3.7 (http://getbootstrap.com) * copyright 2011-2017 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) */ /*! * generated using the bootstrap customizer (http://getbootstrap.com/customize/?id=bc1f8f9eeba60afa8c091ad9887e3deb) * config saved to config.json and https://gist.github.com/bc1f8f9eeba60afa8c091ad9887e3deb */ if("undefined"==typeof jquery)throw new error("bootstrap's javascript requires jquery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new error("bootstrap's javascript requires jquery version 1.9.1 or higher, but lower than version 4")}(jquery),+function(t){"use strict";function e(e,o){return this.each(function(){var s=t(this),n=s.data("bs.modal"),r=t.extend({},i.defaults,s.data(),"object"==typeof e&&e);n||s.data("bs.modal",n=new i(this,r)),"string"==typeof e?n[e](o):r.show&&n.show(o)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isshown=null,this.originalbodypad=null,this.scrollbarwidth=0,this.ignorebackdropclick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.version="3.3.7",i.transition_duration=300,i.backdrop_transition_duration=150,i.defaults={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isshown?this.hide():this.show(t)},i.prototype.show=function(e){var o=this,s=t.event("show.bs.modal",{relatedtarget:e});this.$element.trigger(s),this.isshown||s.isdefaultprevented()||(this.isshown=!0,this.checkscrollbar(),this.setscrollbar(),this.$body.addclass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(o.$element)&&(o.ignorebackdropclick=!0)})}),this.backdrop(function(){var s=t.support.transition&&o.$element.hasclass("fade");o.$element.parent().length||o.$element.appendto(o.$body),o.$element.show().scrolltop(0),o.adjustdialog(),s&&o.$element[0].offsetwidth,o.$element.addclass("in"),o.enforcefocus();var n=t.event("shown.bs.modal",{relatedtarget:e});s?o.$dialog.one("bstransitionend",function(){o.$element.trigger("focus").trigger(n)}).emulatetransitionend(i.transition_duration):o.$element.trigger("focus").trigger(n)}))},i.prototype.hide=function(e){e&&e.preventdefault(),e=t.event("hide.bs.modal"),this.$element.trigger(e),this.isshown&&!e.isdefaultprevented()&&(this.isshown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeclass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasclass("fade")?this.$element.one("bstransitionend",t.proxy(this.hidemodal,this)).emulatetransitionend(i.transition_duration):this.hidemodal())},i.prototype.enforcefocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isshown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isshown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isshown?t(window).on("resize.bs.modal",t.proxy(this.handleupdate,this)):t(window).off("resize.bs.modal")},i.prototype.hidemodal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeclass("modal-open"),t.resetadjustments(),t.resetscrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removebackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var o=this,s=this.$element.hasclass("fade")?"fade":"";if(this.isshown&&this.options.backdrop){var n=t.support.transition&&s;if(this.$backdrop=t(document.createelement("div")).addclass("modal-backdrop "+s).appendto(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignorebackdropclick?void(this.ignorebackdropclick=!1):void(t.target===t.currenttarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),n&&this.$backdrop[0].offsetwidth,this.$backdrop.addclass("in"),!e)return;n?this.$backdrop.one("bstransitionend",e).emulatetransitionend(i.backdrop_transition_duration):e()}else if(!this.isshown&&this.$backdrop){this.$backdrop.removeclass("in");var r=function(){o.removebackdrop(),e&&e()};t.support.transition&&this.$element.hasclass("fade")?this.$backdrop.one("bstransitionend",r).emulatetransitionend(i.backdrop_transition_duration):r()}else e&&e()},i.prototype.handleupdate=function(){this.adjustdialog()},i.prototype.adjustdialog=function(){var t=this.$element[0].scrollheight>document.documentelement.clientheight;this.$element.css({paddingleft:!this.bodyisoverflowing&&t?this.scrollbarwidth:"",paddingright:this.bodyisoverflowing&&!t?this.scrollbarwidth:""})},i.prototype.resetadjustments=function(){this.$element.css({paddingleft:"",paddingright:""})},i.prototype.checkscrollbar=function(){var t=window.innerwidth;if(!t){var e=document.documentelement.getboundingclientrect();t=e.right-math.abs(e.left)}this.bodyisoverflowing=document.body.clientwidth