if(typeof jQuery==='undefined'){throw new Error('Bootstrap\'s JavaScript requires jQuery')}
+function($){'use strict';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}
$.fn.emulateTransitionEnd=function(duration){var called=false,$el=this
$(this).one($.support.transition.end,function(){called=true})
var callback=function(){if(!called)$($el).trigger($.support.transition.end)}
setTimeout(callback,duration)
return this}
$(function(){$.support.transition=transitionEnd()})}(jQuery);+function($){'use strict';var dismiss='[data-dismiss="alert"]'
var Alert=function(el){$(el).on('click',dismiss,this.close)}
Alert.prototype.close=function(e){var $this=$(this)
var selector=$this.attr('data-target')
if(!selector){selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
var $parent=$(selector)
if(e)e.preventDefault()
if(!$parent.length){$parent=$this.hasClass('alert')?$this:$this.parent()}
$parent.trigger(e=$.Event('close.bs.alert'))
if(e.isDefaultPrevented())return
$parent.removeClass('in')
function removeElement(){$parent.trigger('closed.bs.alert').remove()}
$.support.transition&&$parent.hasClass('fade')?$parent.one($.support.transition.end,removeElement).emulateTransitionEnd(150):removeElement()}
var old=$.fn.alert
$.fn.alert=function(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.alert')
if(!data)$this.data('bs.alert',(data=new Alert(this)))
if(typeof option=='string')data[option].call($this)})}
$.fn.alert.Constructor=Alert
$.fn.alert.noConflict=function(){$.fn.alert=old
return this}
$(document).on('click.bs.alert.data-api',dismiss,Alert.prototype.close)}(jQuery);+function($){'use strict';var Button=function(element,options){this.$element=$(element)
this.options=$.extend({},Button.DEFAULTS,options)
this.isLoading=false}
Button.DEFAULTS={loadingText:'loading...'}
Button.prototype.setState=function(state){var d='disabled'
var $el=this.$element
var val=$el.is('input')?'val':'html'
var data=$el.data()
state=state+'Text'
if(!data.resetText)$el.data('resetText',$el[val]())
$el[val](data[state]||this.options[state])
setTimeout($.proxy(function(){if(state=='loadingText'){this.isLoading=true
$el.addClass(d).attr(d,d)}else if(this.isLoading){this.isLoading=false
$el.removeClass(d).removeAttr(d)}},this),0)}
Button.prototype.toggle=function(){var changed=true
var $parent=this.$element.closest('[data-toggle="buttons"]')
if($parent.length){var $input=this.$element.find('input')
if($input.prop('type')=='radio'){if($input.prop('checked')&&this.$element.hasClass('active'))changed=false
else $parent.find('.active').removeClass('active')}
if(changed)$input.prop('checked',!this.$element.hasClass('active')).trigger('change')}
if(changed)this.$element.toggleClass('active')}
var old=$.fn.button
$.fn.button=function(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.button')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.button',(data=new Button(this,options)))
if(option=='toggle')data.toggle()
else if(option)data.setState(option)})}
$.fn.button.Constructor=Button
$.fn.button.noConflict=function(){$.fn.button=old
return this}
$(document).on('click.bs.button.data-api','[data-toggle^=button]',function(e){var $btn=$(e.target)
if(!$btn.hasClass('btn'))$btn=$btn.closest('.btn')
$btn.button('toggle')
e.preventDefault()})}(jQuery);+function($){'use strict';var Carousel=function(element,options){this.$element=$(element)
this.$indicators=this.$element.find('.carousel-indicators')
this.options=options
this.paused=this.sliding=this.interval=this.$active=this.$items=null
this.options.pause=='hover'&&this.$element.on('mouseenter',$.proxy(this.pause,this)).on('mouseleave',$.proxy(this.cycle,this))}
Carousel.DEFAULTS={interval:5000,pause:'hover',wrap:true}
Carousel.prototype.cycle=function(e){e||(this.paused=false)
this.interval&&clearInterval(this.interval)
this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval))
return this}
Carousel.prototype.getActiveIndex=function(){this.$active=this.$element.find('.item.active')
this.$items=this.$active.parent().children()
return this.$items.index(this.$active)}
Carousel.prototype.to=function(pos){var that=this
var activeIndex=this.getActiveIndex()
if(pos>(this.$items.length-1)||pos<0)return
if(this.sliding)return this.$element.one('slid.bs.carousel',function(){that.to(pos)})
if(activeIndex==pos)return this.pause().cycle()
return this.slide(pos>activeIndex?'next':'prev',$(this.$items[pos]))}
Carousel.prototype.pause=function(e){e||(this.paused=true)
if(this.$element.find('.next, .prev').length&&$.support.transition){this.$element.trigger($.support.transition.end)
this.cycle(true)}
this.interval=clearInterval(this.interval)
return this}
Carousel.prototype.next=function(){if(this.sliding)return
return this.slide('next')}
Carousel.prototype.prev=function(){if(this.sliding)return
return this.slide('prev')}
Carousel.prototype.slide=function(type,next){var $active=this.$element.find('.item.active')
var $next=next||$active[type]()
var isCycling=this.interval
var direction=type=='next'?'left':'right'
var fallback=type=='next'?'first':'last'
var that=this
if(!$next.length){if(!this.options.wrap)return
$next=this.$element.find('.item')[fallback]()}
if($next.hasClass('active'))return this.sliding=false
var e=$.Event('slide.bs.carousel',{relatedTarget:$next[0],direction:direction})
this.$element.trigger(e)
if(e.isDefaultPrevented())return
this.sliding=true
isCycling&&this.pause()
if(this.$indicators.length){this.$indicators.find('.active').removeClass('active')
this.$element.one('slid.bs.carousel',function(){var $nextIndicator=$(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator&&$nextIndicator.addClass('active')})}
if($.support.transition&&this.$element.hasClass('slide')){$next.addClass(type)
$next[0].offsetWidth
$active.addClass(direction)
$next.addClass(direction)
$active.one($.support.transition.end,function(){$next.removeClass([type,direction].join(' ')).addClass('active')
$active.removeClass(['active',direction].join(' '))
that.sliding=false
setTimeout(function(){that.$element.trigger('slid.bs.carousel')},0)}).emulateTransitionEnd($active.css('transition-duration').slice(0,-1)*1000)}else{$active.removeClass('active')
$next.addClass('active')
this.sliding=false
this.$element.trigger('slid.bs.carousel')}
isCycling&&this.cycle()
return this}
var old=$.fn.carousel
$.fn.carousel=function(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.carousel')
var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=='object'&&option)
var action=typeof option=='string'?option:options.slide
if(!data)$this.data('bs.carousel',(data=new Carousel(this,options)))
if(typeof option=='number')data.to(option)
else if(action)data[action]()
else if(options.interval)data.pause().cycle()})}
$.fn.carousel.Constructor=Carousel
$.fn.carousel.noConflict=function(){$.fn.carousel=old
return this}
$(document).on('click.bs.carousel.data-api','[data-slide], [data-slide-to]',function(e){var $this=$(this),href
var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))
var options=$.extend({},$target.data(),$this.data())
var slideIndex=$this.attr('data-slide-to')
if(slideIndex)options.interval=false
$target.carousel(options)
if(slideIndex=$this.attr('data-slide-to')){$target.data('bs.carousel').to(slideIndex)}
e.preventDefault()})
$(window).on('load',function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this)
$carousel.carousel($carousel.data())})})}(jQuery);+function($){'use strict';var Collapse=function(element,options){this.$element=$(element)
this.options=$.extend({},Collapse.DEFAULTS,options)
this.transitioning=null
if(this.options.parent)this.$parent=$(this.options.parent)
if(this.options.toggle)this.toggle()}
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 startEvent=$.Event('show.bs.collapse')
this.$element.trigger(startEvent)
if(startEvent.isDefaultPrevented())return
var actives=this.$parent&&this.$parent.find('> .panel > .in')
this.$element.find('img.lazy').each(function(){var realimg=$(this).attr("data-src");$(this).attr("src",realimg)});if(actives&&actives.length){var hasData=actives.data('bs.collapse')
if(hasData&&hasData.transitioning)return
actives.collapse('hide')
hasData||actives.data('bs.collapse',null)}
var dimension=this.dimension()
this.$element.removeClass('collapse').addClass('collapsing')
[dimension](0)
this.transitioning=1
var complete=function(){this.$element.removeClass('collapsing').addClass('collapse in')
[dimension]('auto')
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($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)
[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').removeClass('in')
this.transitioning=1
var complete=function(){this.transitioning=0
this.$element.trigger('hidden.bs.collapse').removeClass('collapsing').addClass('collapse')}
if(!$.support.transition)return complete.call(this)
this.$element
[dimension](0).one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)}
Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()}
var old=$.fn.collapse
$.fn.collapse=function(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&&option=='show')option=!option
if(!data)$this.data('bs.collapse',(data=new Collapse(this,options)))
if(typeof option=='string')data[option]()})}
$.fn.collapse.Constructor=Collapse
$.fn.collapse.noConflict=function(){$.fn.collapse=old
return this}
$(document).on('click.bs.collapse.data-api','[data-toggle=collapse]',function(e){var $this=$(this),href
var target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')
var $target=$(target)
var data=$target.data('bs.collapse')
var option=data?'toggle':$this.data()
var parent=$this.attr('data-parent')
var $parent=parent&&$(parent)
if(!data||!data.transitioning){if($parent)$parent.find('[data-toggle=collapse][data-parent="'+parent+'"]').not($this).addClass('collapsed')
$this[$target.hasClass('in')?'addClass':'removeClass']('collapsed')}
$target.collapse(option)})}(jQuery);+function($){'use strict';var backdrop='.dropdown-backdrop'
var toggle='[data-toggle=dropdown]'
var Dropdown=function(element){$(element).on('click.bs.dropdown',this.toggle)}
Dropdown.prototype.toggle=function(e){var $this=$(this)
if($this.is('.disabled, :disabled'))return
var $parent=getParent($this)
var isActive=$parent.hasClass('open')
clearMenus()
if(!isActive){if('ontouchstart'in document.documentElement&&!$parent.closest('.navbar-nav').length){$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click',clearMenus)}
var relatedTarget={relatedTarget:this}
$parent.trigger(e=$.Event('show.bs.dropdown',relatedTarget))
if(e.isDefaultPrevented())return
$parent.toggleClass('open').trigger('shown.bs.dropdown',relatedTarget)
$this.focus()}
return false}
Dropdown.prototype.keydown=function(e){if(!/(38|40|27)/.test(e.keyCode))return
var $this=$(this)
e.preventDefault()
e.stopPropagation()
if($this.is('.disabled, :disabled'))return
var $parent=getParent($this)
var isActive=$parent.hasClass('open')
if(!isActive||(isActive&&e.keyCode==27)){if(e.which==27)$parent.find(toggle).focus()
return $this.click()}
var desc=' li:not(.divider):visible a'
var $items=$parent.find('[role=menu]'+desc+', [role=listbox]'+desc)
if(!$items.length)return
var index=$items.index($items.filter(':focus'))
if(e.keyCode==38&&index>0)index--
if(e.keyCode==40&&index<$items.length-1)index++
if(!~index)index=0
$items.eq(index).focus()}
function clearMenus(e){$(backdrop).remove()
$(toggle).each(function(){var $parent=getParent($(this))
var relatedTarget={relatedTarget:this}
if(!$parent.hasClass('open'))return
$parent.trigger(e=$.Event('hide.bs.dropdown',relatedTarget))
if(e.isDefaultPrevented())return
$parent.removeClass('open').trigger('hidden.bs.dropdown',relatedTarget)})}
function getParent($this){var selector=$this.attr('data-target')
if(!selector){selector=$this.attr('href')
selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}
var $parent=selector&&$(selector)
return $parent&&$parent.length?$parent:$this.parent()}
var old=$.fn.dropdown
$.fn.dropdown=function(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.dropdown')
if(!data)$this.data('bs.dropdown',(data=new Dropdown(this)))
if(typeof option=='string')data[option].call($this)})}
$.fn.dropdown.Constructor=Dropdown
$.fn.dropdown.noConflict=function(){$.fn.dropdown=old
return this}
$(document).on('click.bs.dropdown.data-api',clearMenus).on('click.bs.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.bs.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.bs.dropdown.data-api',toggle+', [role=menu], [role=listbox]',Dropdown.prototype.keydown)}(jQuery);+function($){'use strict';var Modal=function(element,options){this.options=options
this.$element=$(element)
this.$backdrop=this.isShown=null
if(this.options.remote&&!this.options.content){this.$element.find('.modal-body').addClass('loading')
this.$element.find('.modal-body').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')
this.$element.find('.modal-body').addClass('loaded');},this))}}
Modal.DEFAULTS={backdrop:true,keyboard:true,show:true}
Modal.prototype.toggle=function(_relatedTarget){return this[!this.isShown?'show':'hide'](_relatedTarget)}
Modal.prototype.show=function(_relatedTarget){var that=this
var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget})
this.$element.trigger(e)
if(this.isShown||e.isDefaultPrevented())return
this.isShown=true
this.escape()
this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this))
this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade')
if(that.$element.hasClass('lq')){that.$backdrop.addClass('lq_bg')}
if(!that.$element.parent().length){that.$element.appendTo(document.body)}
that.$element.show().scrollTop(0).css('top',$(window).scrollTop())
if(transition){that.$element[0].offsetWidth}
that.$element.addClass('in').attr('aria-hidden',false)
that.enforceFocus()
var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget})
transition?that.$element.find('.modal-dialog').one($.support.transition.end,function(){that.$element.focus().trigger(e)}).emulateTransitionEnd(300):that.$element.focus().trigger(e)})}
Modal.prototype.hide=function(e){if(e)e.preventDefault()
e=$.Event('hide.bs.modal')
this.$element.trigger(e)
if(!this.isShown||e.isDefaultPrevented())return
this.isShown=false
this.escape()
$(document).off('focusin.bs.modal')
if(this.$element.hasClass('lq')){location.reload();}
this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal').removeClass('lq').find('.modal-body').removeClass('loading loaded')
this.$element.removeData()
this.hideModal()}
Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.focus()}},this))}
Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keyup.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keyup.dismiss.bs.modal')}}
Modal.prototype.hideModal=function(){var that=this
this.$element.hide()
this.backdrop(function(){that.removeBackdrop()
that.$element.trigger('hidden.bs.modal')})}
Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove()
this.$backdrop=null}
Modal.prototype.backdrop=function(callback){var animate=this.$element.hasClass('fade')?'fade':''
if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate
this.$backdrop=$('<div id="modal-backdrop" class="modal-backdrop '+animate+'" />').appendTo($('.vzm'))
this.$backdrop.on('click.dismiss.bs.modal',$.proxy(function(e){if(e.target!==e.currentTarget)return
this.options.backdrop=='static'?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this))
if(doAnimate)this.$backdrop[0].offsetWidth
this.$backdrop.addClass('in')
if(!callback)return
doAnimate?this.$backdrop.one($.support.transition.end,callback).emulateTransitionEnd(150):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in')
$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one($.support.transition.end,callback).emulateTransitionEnd(150):callback()}else if(callback){callback()}}
var old=$.fn.modal
$.fn.modal=function(option,_relatedTarget){return this.each(function(){var $this=$(this)
var data=$this.data('bs.modal')
var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option)
if(!data)$this.data('bs.modal',(data=new Modal(this,options)))
if(typeof option=='string')data[option](_relatedTarget)
else if(options.show)data.show(_relatedTarget)})}
$.fn.modal.Constructor=Modal
$.fn.modal.noConflict=function(){$.fn.modal=old
return this}
$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this)
var href=$this.attr('href')
var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,'')))
var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data())
var title=$this.attr('data-title');var content=$this.attr('data-content');var content_div=$('#'+content+'').clone().removeClass('hidden');var image_alt=$this.attr('data-alt');if(content==='iframe'){var iframe_height=$this.attr('iframe-height');}
if(content==='iframe_lq'){var iframe_height=window.innerHeight?window.innerHeight-20:$(window).height()-20;}
try{if(href.indexOf('lq=overlay')>-1){var protocal=window.location.protocol;if(protocal=='http:'){href=href+"&secure=N"}else{href=href+"&secure=Y"}}}catch(e){}
if($this.attr("data-alt")==undefined){image_alt='';}
var iframe='<iframe src="'+href+'" style="width:100%;height:'+iframe_height+'px;" frameborder="0" allowfullscreen="true"  title="iframe modal" id="iframemodal"></iframe> ';var image='<image src="'+href+'" class="flex centered" alt="'+image_alt+'"> ';if($this.is('a'))e.preventDefault()
$target.modal(option,this).one('hide',function(){$this.is(':visible')&&$this.focus()})
$target.find('.modal-body').html(content_div);if(content==='image'){$target.find('.modal-body').html(image)}
if(content==='iframe'){$target.find('.modal-body').html(iframe)}
if(content==='iframe_lq'){$target.addClass('lq')
$target.find('.modal-body').append(iframe);$target.find('.modal-body').addClass('loading');}
if($this.attr("data-title")!=null){$target.find('.modal-title').text(title);}else{$target.find('.modal-title').empty();}})
$(document).on('show.bs.modal','.modal',function(){$(document.body).addClass('modal-open')
$('#vzm_share').removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal').css('display','none').removeData()}).on('hidden.bs.modal','.modal',function(){$(document.body).removeClass('modal-open')})}(jQuery);+function($){'use strict';var Tooltip=function(element,options){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null
this.init('tooltip',element,options)}
Tooltip.DEFAULTS={animation:true,placement:'top',selector:false,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,container:false}
Tooltip.prototype.init=function(type,element,options){this.enabled=true
this.type=type
this.$element=$(element)
this.options=this.getOptions(options)
var triggers=this.options.trigger.split(' ')
for(var i=triggers.length;i--;){var trigger=triggers[i]
if(trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){var eventIn=trigger=='hover'?'mouseenter':'focusin'
var eventOut=trigger=='hover'?'mouseleave':'focusout'
this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this))
this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}}
this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()}
Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS}
Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options)
if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}
return options}
Tooltip.prototype.getDelegateOptions=function(){var options={}
var defaults=this.getDefaults()
this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value})
return options}
Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.'+this.type)
clearTimeout(self.timeout)
self.hoverState='in'
if(!self.options.delay||!self.options.delay.show)return self.show()
self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)}
Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.'+this.type)
clearTimeout(self.timeout)
self.hoverState='out'
if(!self.options.delay||!self.options.delay.hide)return self.hide()
self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)}
Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+this.type)
if(this.hasContent()&&this.enabled){this.$element.trigger(e)
if(e.isDefaultPrevented())return
var that=this;var $tip=this.tip()
this.setContent()
if(this.options.animation)$tip.addClass('fade')
var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement
var autoToken=/\s?auto?\s?/i
var autoPlace=autoToken.test(placement)
if(autoPlace)placement=placement.replace(autoToken,'')||'top'
$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement)
this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element)
var pos=this.getPosition()
var actualWidth=$tip[0].offsetWidth
var actualHeight=$tip[0].offsetHeight
if(autoPlace){var $parent=this.$element.parent()
var orgPlacement=placement
var docScroll=document.documentElement.scrollTop||document.body.scrollTop
var parentWidth=this.options.container=='body'?window.innerWidth:$parent.outerWidth()
var parentHeight=this.options.container=='body'?window.innerHeight:$parent.outerHeight()
var parentLeft=this.options.container=='body'?0:$parent.offset().left
placement=placement=='bottom'&&pos.top+pos.height+actualHeight-docScroll>parentHeight?'top':placement=='top'&&pos.top-docScroll-actualHeight<0?'bottom':placement=='right'&&pos.right+actualWidth>parentWidth?'left':placement=='left'&&pos.left-actualWidth<parentLeft?'right':placement
$tip.removeClass(orgPlacement).addClass(placement)}
var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight)
this.applyPlacement(calculatedOffset,placement)
this.hoverState=null
var complete=function(){that.$element.trigger('shown.bs.'+that.type)}
$.support.transition&&this.$tip.hasClass('fade')?$tip.one($.support.transition.end,complete).emulateTransitionEnd(150):complete()}}
Tooltip.prototype.applyPlacement=function(offset,placement){var replace
var $tip=this.tip()
var width=$tip[0].offsetWidth
var height=$tip[0].offsetHeight
var marginTop=parseInt($tip.css('margin-top'),10)
var marginLeft=parseInt($tip.css('margin-left'),10)
if(isNaN(marginTop))marginTop=0
if(isNaN(marginLeft))marginLeft=0
offset.top=offset.top+marginTop
offset.left=offset.left+marginLeft
$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0)
$tip.addClass('in')
var actualWidth=$tip[0].offsetWidth
var actualHeight=$tip[0].offsetHeight
if(placement=='top'&&actualHeight!=height){replace=true
offset.top=offset.top+height-actualHeight}
if(/bottom|top/.test(placement)){var delta=0
if(offset.left<0){delta=offset.left*-2
offset.left=0
$tip.offset(offset)
actualWidth=$tip[0].offsetWidth
actualHeight=$tip[0].offsetHeight}
this.replaceArrow(delta-width+actualWidth,actualWidth,'left')}else{this.replaceArrow(actualHeight-height,actualHeight,'top')}
if(replace)$tip.offset(offset)}
Tooltip.prototype.replaceArrow=function(delta,dimension,position){this.arrow().css(position,delta?(50*(1-delta/dimension)+'%'):'')}
Tooltip.prototype.setContent=function(){var $tip=this.tip()
var title=this.getTitle()
$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title)
$tip.removeClass('fade in top bottom left right')}
Tooltip.prototype.hide=function(){var that=this
var $tip=this.tip()
var e=$.Event('hide.bs.'+this.type)
function complete(){if(that.hoverState!='in')$tip.detach()
that.$element.trigger('hidden.bs.'+that.type)}
this.$element.trigger(e)
if(e.isDefaultPrevented())return
$tip.removeClass('in')
$.support.transition&&this.$tip.hasClass('fade')?$tip.one($.support.transition.end,complete).emulateTransitionEnd(150):complete()
this.hoverState=null
return this}
Tooltip.prototype.fixTitle=function(){var $e=this.$element
if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}}
Tooltip.prototype.hasContent=function(){return this.getTitle()}
Tooltip.prototype.getPosition=function(){var el=this.$element[0]
return $.extend({},(typeof el.getBoundingClientRect=='function')?el.getBoundingClientRect():{width:el.offsetWidth,height:el.offsetHeight},this.$element.offset())}
Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=='bottom'?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement=='top'?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement=='left'?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}}
Tooltip.prototype.getTitle=function(){var title
var $e=this.$element
var o=this.options
title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title)
return title}
Tooltip.prototype.tip=function(){return this.$tip=this.$tip||$(this.options.template)}
Tooltip.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow')}
Tooltip.prototype.validate=function(){if(!this.$element[0].parentNode){this.hide()
this.$element=null
this.options=null}}
Tooltip.prototype.enable=function(){this.enabled=true}
Tooltip.prototype.disable=function(){this.enabled=false}
Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled}
Tooltip.prototype.toggle=function(e){var self=e?$(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.'+this.type):this
self.tip().hasClass('in')?self.leave(self):self.enter(self)}
Tooltip.prototype.destroy=function(){clearTimeout(this.timeout)
this.hide().$element.off('.'+this.type).removeData('bs.'+this.type)}
var old=$.fn.tooltip
$.fn.tooltip=function(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.tooltip')
var options=typeof option=='object'&&option
if(!data&&option=='destroy')return
if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options)))
if(typeof option=='string')data[option]()})}
$.fn.tooltip.Constructor=Tooltip
$.fn.tooltip.noConflict=function(){$.fn.tooltip=old
return this}}(jQuery);+function($){'use strict';var Popover=function(element,options){this.init('popover',element,options)}
if(!$.fn.tooltip)throw new Error('Popover requires tooltip.js')
Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:'right',trigger:'click',content:'',template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'})
Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor=Popover
Popover.prototype.getDefaults=function(){return Popover.DEFAULTS}
Popover.prototype.setContent=function(){var $tip=this.tip()
var title=this.getTitle()
var content=this.getContent()
$tip.find('.popover-title')[this.options.html?'html':'text'](title)
$tip.find('.popover-content')[this.options.html?(typeof content=='string'?'html':'append'):'text'](content)
$tip.removeClass('fade top bottom left right in')
if(!$tip.find('.popover-title').html())$tip.find('.popover-title').hide()}
Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()}
Popover.prototype.getContent=function(){var $e=this.$element
var o=this.options
return $e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)}
Popover.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find('.arrow')}
Popover.prototype.tip=function(){if(!this.$tip)this.$tip=$(this.options.template)
return this.$tip}
var old=$.fn.popover
$.fn.popover=function(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.popover')
var options=typeof option=='object'&&option
if(!data&&option=='destroy')return
if(!data)$this.data('bs.popover',(data=new Popover(this,options)))
if(typeof option=='string')data[option]()})}
$.fn.popover.Constructor=Popover
$.fn.popover.noConflict=function(){$.fn.popover=old
return this}}(jQuery);var scbSCLearnCount=0;var scbSCLearnTimer;var scbSCSectionName='';function scbSCCall(){if(typeof(s_837)!='undefined'){if(typeof(scbSCQualState)!='undefined'&&typeof(scMobileShowQualStatus)!='undefined'&&scMobileShowQualStatus){scPageView('detailpageName='+s_837.simplepageName+'| '+scbSCQualState()+'| '+scbSCSectionName);}else{scPageView('detailpageName='+s_837.simplepageName+'| '+scbSCSectionName);}}}
+function($){'use strict';function ScrollSpy(element,options){var href
var process=$.proxy(this.process,this)
this.$element=$(element).is('body')?$(window):$(element)
this.$body=$('body')
this.$scrollElement=this.$element.on('scroll.bs.scroll-spy.data-api',process)
this.options=$.extend({},ScrollSpy.DEFAULTS,options)
this.selector=(this.options.target||((href=$(element).attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))||'')+' .nav li > a'
this.offsets=$([])
this.targets=$('#subnav')
this.activeTarget=null
this.refresh()
this.process()}
ScrollSpy.DEFAULTS={offset:30}
ScrollSpy.prototype.refresh=function(){var offsetMethod=this.$element[0]==window?'offset':'position'
this.offsets=$([])
this.targets=$([])
var self=this
var $targets=this.$body.find(this.selector).map(function(){var $el=$(this)
var href=$el.data('target')||$el.attr('href')
var $href=/^#./.test(href)&&$(href)
return($href&&$href.length&&$href.is(':visible')&&[[$href[offsetMethod]().top+(!$.isWindow(self.$scrollElement.get(0))&&self.$scrollElement.scrollTop()),href]])||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0])
self.targets.push(this[1])})}
ScrollSpy.prototype.process=function(){var scrollTop=this.$scrollElement.scrollTop()+this.options.offset
var scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight
var maxScroll=scrollHeight-this.$scrollElement.height()
var offsets=this.offsets
var targets=this.targets
var activeTarget=this.activeTarget
var i
if(window.location.hash){$(".ajax").each(function(index){var ajax_pos=$(this).offset().top-$(window).scrollTop();var viewport_size=$(window).height();var window_scrolltop=$(window).scrollTop();var scroll_offset=0;if(($(this).offset().top>(window_scrolltop+scroll_offset))&&($(this).offset().top<(window_scrolltop+viewport_size-0))){if(($(this).text().trim()=="")){loadAnchor($(this).attr('id').replace('results_','')+'.html');}}});}else{$(".ajax").each(function(index){var ajax_pos=$(this).offset().top-$(window).scrollTop();var viewport_size=$(window).height();var window_scrolltop=$(window).scrollTop();var scroll_offset=0;if(($(this).offset().top>(window_scrolltop+scroll_offset))&&($(this).offset().top<(window_scrolltop+viewport_size-0))){if(($(this).text().trim()=="")){loadAnchor($(this).attr('id').replace('results_','')+'.html');}}});}
if(scrollTop>=maxScroll){return activeTarget!=(i=targets.last()[0])&&this.activate(i)}
if(activeTarget&&scrollTop<=offsets[0]){return activeTarget!=(i=targets[0])&&this.activate(i)}
for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||scrollTop<=offsets[i+1])&&this.activate(targets[i])}}
ScrollSpy.prototype.activate=function(target){window.clearTimeout(scbSCLearnTimer);scbSCSectionName=target.replace(/\#/g,'');scbSCSectionName=scbSCSectionName.replace(/-/g,' ');if(scbSCLearnCount>0){scbSCLearnTimer=window.setTimeout(scbSCCall,2000);}
scbSCLearnCount++;this.activeTarget=target
$(this.selector).parentsUntil(this.options.target,'.active').removeClass('active')
var selector=this.selector+'[data-target="'+target+'"],'+
this.selector+'[href="'+target+'"]'
var active=$(selector).parents('li').addClass('active')
if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass('active')}
active.trigger('activate.bs.scrollspy')}
var old=$.fn.scrollspy
$.fn.scrollspy=function(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.scrollspy')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.scrollspy',(data=new ScrollSpy(this,options)))
if(typeof option=='string')data[option]()})}
$.fn.scrollspy.Constructor=ScrollSpy
$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old
return this}
function loadAnchor(a){$.ajax({url:"/cs/groups/public/documents/adacct/"+a,success:function(html){$("#results_"+a.replace('.html','')).html(html);$('body').each(function(){$(this).scrollspy('refresh');});}});}
$(window).on('load',function(){$('body').each(function(){var $spy=$(this)
$spy.scrollspy($spy.data())})})}(jQuery);+function($){'use strict';var Tab=function(element){this.element=$(element)}
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]*$)/,'')}
if($this.parent('li').hasClass('active'))return
var previous=$ul.find('.active:last a')[0]
var e=$.Event('show.bs.tab',{relatedTarget:previous})
$this.trigger(e)
if(e.isDefaultPrevented())return
var $target=$(selector)
this.activate($this.parent('li'),$ul)
this.activate($target,$target.parent(),function(){$this.trigger({type:'shown.bs.tab',relatedTarget:previous})})}
Tab.prototype.activate=function(element,container,callback){var $active=container.find('> .active')
var transition=callback&&$.support.transition&&$active.hasClass('fade')
function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active')
element.addClass('active')
element.find('img.lazy').each(function(){var realimg=$(this).attr("data-src");$(this).attr("src",realimg)});if(transition){element[0].offsetWidth
element.addClass('in')}else{element.removeClass('fade')}
if(element.parent('.dropdown-menu')){element.closest('li.dropdown').addClass('active')}
callback&&callback()}
transition?$active.one($.support.transition.end,next).emulateTransitionEnd(150):next()
$active.removeClass('in')}
var old=$.fn.tab
$.fn.tab=function(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]()})}
$.fn.tab.Constructor=Tab
$.fn.tab.noConflict=function(){$.fn.tab=old
return this}
$(document).on('click.bs.tab.data-api','[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault()
$(this).tab('show')})}(jQuery);+function($){'use strict';var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options)
this.$window=$(window).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=this.unpin=this.pinnedOffset=null
this.checkPosition()}
Affix.RESET='affix affix-top affix-bottom'
Affix.DEFAULTS={offset:0}
Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop=this.$window.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 scrollHeight=$(document).height()
var scrollTop=this.$window.scrollTop()
var position=this.$element.offset()
var offset=this.options.offset
var offsetTop=offset.top
var offsetBottom=offset.bottom
if(this.affixed=='top')position.top+=scrollTop
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.unpin!=null&&(scrollTop+this.unpin<=position.top)?false:offsetBottom!=null&&(position.top+this.$element.height()>=scrollHeight-offsetBottom)?'bottom':offsetTop!=null&&(scrollTop<=offsetTop)?'top':false
if(this.affixed===affix)return
if(this.unpin)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($.Event(affixType.replace('affix','affixed')))
if(affix=='bottom'){this.$element.offset({top:scrollHeight-offsetBottom-this.$element.height()})}}
var old=$.fn.affix
$.fn.affix=function(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]()})}
$.fn.affix.Constructor=Affix
$.fn.affix.noConflict=function(){$.fn.affix=old
return this}
$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this)
var data=$spy.data()
data.offset=data.offset||{}
if(data.offsetBottom)data.offset.bottom=data.offsetBottom
if(data.offsetTop)data.offset.top=data.offsetTop
$spy.affix(data)})})}(jQuery);+function($){'use strict';function viewSelect(){$('.viewselect').each(function(){var $this=$(this)
$this.on('change',function(e){var selected=$this.find('option:selected').val()
var scLinkID=$this.attr('name')+' '+selected;scLinkID=scLinkID.replace(/\_/g,' ');scLinkTrackID(scLinkID);$this.find("option").each(function(i){$('#'+$(this).val()+'').addClass('hidden');});$('#'+selected+'').removeClass('hidden');})})}
$(function(){viewSelect()})}(jQuery);+function($){'use strict';function scrollrefresh(){var timer;$(window).on('scroll',function(){if(timer)clearTimeout(timer);timer=setTimeout(function(){$('body').each(function(){$(this).scrollspy('refresh');})},500);})}
$(function(){scrollrefresh()})}(jQuery);$(window).on('orientationchange resize',function(){var iframeHeight=window.innerHeight?window.innerHeight-20:$(window).height()-20;$("#iframemodal").height(iframeHeight);});+function($){'use strict';var Share=function(element,options){this.options=options
this.$element=$(element)
this.isShown=null}
Share.DEFAULTS={keyboard:true,show:true}
Share.prototype.toggle=function(_relatedTarget){return this[!this.isShown?'show':'hide'](_relatedTarget)}
Share.prototype.show=function(_relatedTarget){var that=this
var e=$.Event('show.bs.share',{relatedTarget:_relatedTarget})
this.$element.trigger(e)
if(this.isShown||e.isDefaultPrevented())return
this.isShown=true
this.escape()
this.$element.on('click.dismiss.bs.share','[data-dismiss="share"]',$.proxy(this.hide,this))
var transition=$.support.transition&&that.$element.hasClass('fade')
if(!that.$element.parent().length){that.$element.appendTo(document.body)}
that.$element.show().scrollTop(0)
if(transition){that.$element[0].offsetWidth}
that.$element.addClass('in').attr('aria-hidden',false)
that.enforceFocus()
var e=$.Event('shown.bs.share',{relatedTarget:_relatedTarget})}
Share.prototype.hide=function(e){e=$.Event('hide.bs.share')
this.$element.trigger(e)
if(!this.isShown||e.isDefaultPrevented())return
this.isShown=false
this.escape()
$(document).off('focusin.bs.share')
if(this.$element.hasClass('lq')){location.reload();}
this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.share').removeClass('lq').find('.share-body').removeClass('loading loaded')
this.$element.removeData()
this.hideShare()}
Share.prototype.enforceFocus=function(){$(document).off('focusin.bs.share').on('focusin.bs.share',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){if($(e.target).attr("data-target")==='#vzm_modal'){}else{this.$element.focus()}}},this))}
Share.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keyup.dismiss.bs.share',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keyup.dismiss.bs.share')}}
Share.prototype.hideShare=function(){var that=this
this.$element.hide()}
var old=$.fn.Share
$.fn.Share=function(option,_relatedTarget){return this.each(function(){var $this=$(this)
var data=$this.data('bs.share')
var options=$.extend({},Share.DEFAULTS,$this.data(),typeof option=='object'&&option)
if(!data)$this.data('bs.share',(data=new Share(this,options)))
if(typeof option=='string')data[option](_relatedTarget)
else if(options.show)data.show(_relatedTarget)})}
$.fn.Share.Constructor=Share
$.fn.Share.noConflict=function(){$.fn.Share=old
return this}
$(document).on('click.bs.share.data-api','[data-toggle="share"]',function(e){var $this=$(this)
var href=$this.attr('href')
var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,'')))
var option=$target.data('bs.share')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data())
var title=$this.attr('data-title');var content=$this.attr('data-content');var content_div=$('#'+content+'').clone().removeClass('hidden');if($this.is('a'))e.preventDefault()
$target.Share(option,this).one('hide',function(){$this.is(':visible')&&$this.focus()})
$target.find('.share-body').html(content_div);var share_pos=-$(window).scrollTop();var share_height=$('#vzm_share').height();var viewport_adj=(window.innerHeight-$(window).height())
$(".vzm .share").css('bottom',-(share_height+viewport_adj+$(window).scrollTop())).animate({bottom:share_pos-viewport_adj},500);if($this.attr("data-title")!=null){$target.find('.share-title').text(title);}else{$target.find('.share-title').empty();}})}(jQuery);var Swiper=function(selector,params){'use strict';if(document.body.__defineGetter__){if(HTMLElement){var element=HTMLElement.prototype;if(element.__defineGetter__){element.__defineGetter__('outerHTML',function(){return new XMLSerializer().serializeToString(this);});}}}
if(!window.getComputedStyle){window.getComputedStyle=function(el,pseudo){this.el=el;this.getPropertyValue=function(prop){var re=/(\-([a-z]){1})/g;if(prop==='float')prop='styleFloat';if(re.test(prop)){prop=prop.replace(re,function(){return arguments[2].toUpperCase();});}
return el.currentStyle[prop]?el.currentStyle[prop]:null;};return this;};}
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(obj,start){for(var i=(start||0),j=this.length;i<j;i++){if(this[i]===obj){return i;}}
return-1;};}
if(!document.querySelectorAll){if(!window.jQuery)return;}
function $$(selector,context){if(document.querySelectorAll)
return(context||document).querySelectorAll(selector);else
return jQuery(selector,context);}
if(typeof selector==='undefined')return;if(!(selector.nodeType)){if($$(selector).length===0)return;}
var _this=this;_this.touches={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,diff:0,abs:0};_this.positions={start:0,abs:0,diff:0,current:0};_this.times={start:0,end:0};_this.id=(new Date()).getTime();_this.container=(selector.nodeType)?selector:$$(selector)[0];_this.isTouched=false;_this.isMoved=false;_this.activeIndex=0;_this.centerIndex=0;_this.activeLoaderIndex=0;_this.activeLoopIndex=0;_this.previousIndex=null;_this.velocity=0;_this.snapGrid=[];_this.slidesGrid=[];_this.imagesToLoad=[];_this.imagesLoaded=0;_this.wrapperLeft=0;_this.wrapperRight=0;_this.wrapperTop=0;_this.wrapperBottom=0;_this.isAndroid=navigator.userAgent.toLowerCase().indexOf('android')>=0;var wrapper,slideSize,wrapperSize,direction,isScrolling,containerSize;var defaults={eventTarget:'wrapper',mode:'horizontal',touchRatio:1,speed:300,freeMode:false,freeModeFluid:false,momentumRatio:1,momentumBounce:true,momentumBounceRatio:1,slidesPerView:1,slidesPerGroup:1,slidesPerViewFit:true,simulateTouch:true,followFinger:true,shortSwipes:true,longSwipesRatio:0.5,moveStartThreshold:false,onlyExternal:false,createPagination:true,pagination:false,paginationElement:'span',paginationClickable:false,paginationAsRange:true,resistance:true,scrollContainer:false,preventLinks:true,preventLinksPropagation:false,noSwiping:false,noSwipingClass:'swiper-no-swiping',initialSlide:0,keyboardControl:false,mousewheelControl:false,mousewheelControlForceToAxis:false,useCSS3Transforms:true,autoplay:false,autoplayDisableOnInteraction:true,autoplayStopOnLast:false,loop:false,loopAdditionalSlides:0,roundLengths:false,calculateHeight:false,cssWidthAndHeight:false,updateOnImagesReady:true,releaseFormElements:true,watchActiveIndex:false,visibilityFullFit:false,offsetPxBefore:0,offsetPxAfter:0,offsetSlidesBefore:0,offsetSlidesAfter:0,centeredSlides:false,queueStartCallbacks:false,queueEndCallbacks:false,autoResize:true,resizeReInit:false,DOMAnimation:true,loader:{slides:[],slidesHTMLType:'inner',surroundGroups:1,logic:'reload',loadAllSlides:false},slideElement:'div',slideClass:'swiper-slide',slideActiveClass:'swiper-slide-active',slideVisibleClass:'swiper-slide-visible',slideDuplicateClass:'swiper-slide-duplicate',wrapperClass:'swiper-wrapper',paginationElementClass:'swiper-pagination-switch',paginationActiveClass:'swiper-active-switch',paginationVisibleClass:'swiper-visible-switch'};params=params||{};for(var prop in defaults){if(prop in params&&typeof params[prop]==='object'){for(var subProp in defaults[prop]){if(!(subProp in params[prop])){params[prop][subProp]=defaults[prop][subProp];}}}else if(!(prop in params)){params[prop]=defaults[prop];}}
_this.params=params;if(params.scrollContainer){params.freeMode=true;params.freeModeFluid=true;}
if(params.loop){params.resistance='100%';}
var isH=params.mode==='horizontal';var desktopEvents=['mousedown','mousemove','mouseup'];if(_this.browser.ie10)desktopEvents=['MSPointerDown','MSPointerMove','MSPointerUp'];if(_this.browser.ie11)desktopEvents=['pointerdown','pointermove','pointerup'];_this.touchEvents={touchStart:_this.support.touch||!params.simulateTouch?'touchstart':desktopEvents[0],touchMove:_this.support.touch||!params.simulateTouch?'touchmove':desktopEvents[1],touchEnd:_this.support.touch||!params.simulateTouch?'touchend':desktopEvents[2]};for(var i=_this.container.childNodes.length-1;i>=0;i--){if(_this.container.childNodes[i].className){var _wrapperClasses=_this.container.childNodes[i].className.split(/\s+/);for(var j=0;j<_wrapperClasses.length;j++){if(_wrapperClasses[j]===params.wrapperClass){wrapper=_this.container.childNodes[i];}}}}
_this.wrapper=wrapper;_this._extendSwiperSlide=function(el){el.append=function(){if(params.loop){el.insertAfter(_this.slides.length-_this.loopedSlides);}else{_this.wrapper.appendChild(el);_this.reInit();}
return el;};el.prepend=function(){if(params.loop){_this.wrapper.insertBefore(el,_this.slides[_this.loopedSlides]);_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}else{_this.wrapper.insertBefore(el,_this.wrapper.firstChild);}
_this.reInit();return el;};el.insertAfter=function(index){if(typeof index==='undefined')return false;var beforeSlide;if(params.loop){beforeSlide=_this.slides[index+1+_this.loopedSlides];if(beforeSlide){_this.wrapper.insertBefore(el,beforeSlide);}else{_this.wrapper.appendChild(el);}
_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}else{beforeSlide=_this.slides[index+1];_this.wrapper.insertBefore(el,beforeSlide);}
_this.reInit();return el;};el.clone=function(){return _this._extendSwiperSlide(el.cloneNode(true));};el.remove=function(){_this.wrapper.removeChild(el);_this.reInit();};el.html=function(html){if(typeof html==='undefined'){return el.innerHTML;}else{el.innerHTML=html;return el;}};el.index=function(){var index;for(var i=_this.slides.length-1;i>=0;i--){if(el===_this.slides[i])index=i;}
return index;};el.isActive=function(){if(el.index()===_this.activeIndex)return true;else return false;};if(!el.swiperSlideDataStorage)el.swiperSlideDataStorage={};el.getData=function(name){return el.swiperSlideDataStorage[name];};el.setData=function(name,value){el.swiperSlideDataStorage[name]=value;return el;};el.data=function(name,value){if(typeof value==='undefined'){return el.getAttribute('data-'+name);}else{el.setAttribute('data-'+name,value);return el;}};el.getWidth=function(outer,round){return _this.h.getWidth(el,outer,round);};el.getHeight=function(outer,round){return _this.h.getHeight(el,outer,round);};el.getOffset=function(){return _this.h.getOffset(el);};return el;};_this.calcSlides=function(forceCalcSlides){var oldNumber=_this.slides?_this.slides.length:false;_this.slides=[];_this.displaySlides=[];for(var i=0;i<_this.wrapper.childNodes.length;i++){if(_this.wrapper.childNodes[i].className){var _className=_this.wrapper.childNodes[i].className;var _slideClasses=_className.split(/\s+/);for(var j=0;j<_slideClasses.length;j++){if(_slideClasses[j]===params.slideClass){_this.slides.push(_this.wrapper.childNodes[i]);}}}}
for(i=_this.slides.length-1;i>=0;i--){_this._extendSwiperSlide(_this.slides[i]);}
if(oldNumber===false)return;if(oldNumber!==_this.slides.length||forceCalcSlides){removeSlideEvents();addSlideEvents();_this.updateActiveSlide();if(_this.params.pagination)_this.createPagination();_this.callPlugins('numberOfSlidesChanged');}};_this.createSlide=function(html,slideClassList,el){slideClassList=slideClassList||_this.params.slideClass;el=el||params.slideElement;var newSlide=document.createElement(el);newSlide.innerHTML=html||'';newSlide.className=slideClassList;return _this._extendSwiperSlide(newSlide);};_this.appendSlide=function(html,slideClassList,el){if(!html)return;if(html.nodeType){return _this._extendSwiperSlide(html).append();}else{return _this.createSlide(html,slideClassList,el).append();}};_this.prependSlide=function(html,slideClassList,el){if(!html)return;if(html.nodeType){return _this._extendSwiperSlide(html).prepend();}else{return _this.createSlide(html,slideClassList,el).prepend();}};_this.insertSlideAfter=function(index,html,slideClassList,el){if(typeof index==='undefined')return false;if(html.nodeType){return _this._extendSwiperSlide(html).insertAfter(index);}else{return _this.createSlide(html,slideClassList,el).insertAfter(index);}};_this.removeSlide=function(index){if(_this.slides[index]){if(params.loop){if(!_this.slides[index+_this.loopedSlides])return false;_this.slides[index+_this.loopedSlides].remove();_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}else _this.slides[index].remove();return true;}else return false;};_this.removeLastSlide=function(){if(_this.slides.length>0){if(params.loop){_this.slides[_this.slides.length-1-_this.loopedSlides].remove();_this.removeLoopedSlides();_this.calcSlides();_this.createLoop();}else _this.slides[_this.slides.length-1].remove();return true;}else{return false;}};_this.removeAllSlides=function(){for(var i=_this.slides.length-1;i>=0;i--){_this.slides[i].remove();}};_this.getSlide=function(index){return _this.slides[index];};_this.getLastSlide=function(){return _this.slides[_this.slides.length-1];};_this.getFirstSlide=function(){return _this.slides[0];};_this.activeSlide=function(){return _this.slides[_this.activeIndex];};_this.fireCallback=function(){var callback=arguments[0];if(Object.prototype.toString.call(callback)==='[object Array]'){for(var i=0;i<callback.length;i++){if(typeof callback[i]==='function'){callback[i](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);}}}else if(Object.prototype.toString.call(callback)==='[object String]'){if(params['on'+callback])_this.fireCallback(params['on'+callback]);}else{callback(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);}};function isArray(obj){if(Object.prototype.toString.apply(obj)==='[object Array]')return true;return false;}
_this.addCallback=function(callback,func){var _this=this,tempFunc;if(_this.params['on'+callback]){if(isArray(this.params['on'+callback])){return this.params['on'+callback].push(func);}else if(typeof this.params['on'+callback]==='function'){tempFunc=this.params['on'+callback];this.params['on'+callback]=[];this.params['on'+callback].push(tempFunc);return this.params['on'+callback].push(func);}}else{this.params['on'+callback]=[];return this.params['on'+callback].push(func);}};_this.removeCallbacks=function(callback){if(_this.params['on'+callback]){_this.params['on'+callback]=null;}};var _plugins=[];for(var plugin in _this.plugins){if(params[plugin]){var p=_this.plugins[plugin](_this,params[plugin]);if(p)_plugins.push(p);}}
_this.callPlugins=function(method,args){if(!args)args={};for(var i=0;i<_plugins.length;i++){if(method in _plugins[i]){_plugins[i][method](args);}}};if((_this.browser.ie10||_this.browser.ie11)&&!params.onlyExternal){_this.wrapper.classList.add('swiper-wp8-'+(isH?'horizontal':'vertical'));}
if(params.freeMode){_this.container.className+=' swiper-free-mode';}
_this.initialized=false;_this.init=function(force,forceCalcSlides){var _width=_this.h.getWidth(_this.container,false,params.roundLengths);var _height=_this.h.getHeight(_this.container,false,params.roundLengths);if(_width===_this.width&&_height===_this.height&&!force)return;_this.width=_width;_this.height=_height;var slideWidth,slideHeight,slideMaxHeight,wrapperWidth,wrapperHeight,slideLeft;var i;containerSize=isH?_width:_height;var wrapper=_this.wrapper;if(force){_this.calcSlides(forceCalcSlides);}
if(params.slidesPerView==='auto'){var slidesWidth=0;var slidesHeight=0;if(params.slidesOffset>0){wrapper.style.paddingLeft='';wrapper.style.paddingRight='';wrapper.style.paddingTop='';wrapper.style.paddingBottom='';}
wrapper.style.width='';wrapper.style.height='';if(params.offsetPxBefore>0){if(isH)_this.wrapperLeft=params.offsetPxBefore;else _this.wrapperTop=params.offsetPxBefore;}
if(params.offsetPxAfter>0){if(isH)_this.wrapperRight=params.offsetPxAfter;else _this.wrapperBottom=params.offsetPxAfter;}
if(params.centeredSlides){if(isH){_this.wrapperLeft=(containerSize-this.slides[0].getWidth(true,params.roundLengths))/2;_this.wrapperRight=(containerSize-_this.slides[_this.slides.length-1].getWidth(true,params.roundLengths))/2;}else{_this.wrapperTop=(containerSize-_this.slides[0].getHeight(true,params.roundLengths))/2;_this.wrapperBottom=(containerSize-_this.slides[_this.slides.length-1].getHeight(true,params.roundLengths))/2;}}
if(isH){if(_this.wrapperLeft>=0)wrapper.style.paddingLeft=_this.wrapperLeft+'px';if(_this.wrapperRight>=0)wrapper.style.paddingRight=_this.wrapperRight+'px';}else{if(_this.wrapperTop>=0)wrapper.style.paddingTop=_this.wrapperTop+'px';if(_this.wrapperBottom>=0)wrapper.style.paddingBottom=_this.wrapperBottom+'px';}
slideLeft=0;var centeredSlideLeft=0;_this.snapGrid=[];_this.slidesGrid=[];slideMaxHeight=0;for(i=0;i<_this.slides.length;i++){slideWidth=_this.slides[i].getWidth(true,params.roundLengths);slideHeight=_this.slides[i].getHeight(true,params.roundLengths);if(params.calculateHeight){slideMaxHeight=Math.max(slideMaxHeight,slideHeight);}
var _slideSize=isH?slideWidth:slideHeight;if(params.centeredSlides){var nextSlideWidth=i===_this.slides.length-1?0:_this.slides[i+1].getWidth(true,params.roundLengths);var nextSlideHeight=i===_this.slides.length-1?0:_this.slides[i+1].getHeight(true,params.roundLengths);var nextSlideSize=isH?nextSlideWidth:nextSlideHeight;if(_slideSize>containerSize){if(params.slidesPerViewFit){_this.snapGrid.push(slideLeft+_this.wrapperLeft);_this.snapGrid.push(slideLeft+_slideSize-containerSize+_this.wrapperLeft);}else{for(var j=0;j<=Math.floor(_slideSize/(containerSize+_this.wrapperLeft));j++){if(j===0)_this.snapGrid.push(slideLeft+_this.wrapperLeft);else _this.snapGrid.push(slideLeft+_this.wrapperLeft+containerSize*j);}}
_this.slidesGrid.push(slideLeft+_this.wrapperLeft);}else{_this.snapGrid.push(centeredSlideLeft);_this.slidesGrid.push(centeredSlideLeft);}
centeredSlideLeft+=_slideSize/2+nextSlideSize/2;}else{if(_slideSize>containerSize){if(params.slidesPerViewFit){_this.snapGrid.push(slideLeft);_this.snapGrid.push(slideLeft+_slideSize-containerSize);}else{if(containerSize!==0){for(var k=0;k<=Math.floor(_slideSize/containerSize);k++){_this.snapGrid.push(slideLeft+containerSize*k);}}else{_this.snapGrid.push(slideLeft);}}}else{_this.snapGrid.push(slideLeft);}
_this.slidesGrid.push(slideLeft);}
slideLeft+=_slideSize;slidesWidth+=slideWidth;slidesHeight+=slideHeight;}
if(params.calculateHeight)_this.height=slideMaxHeight;if(isH){wrapperSize=slidesWidth+_this.wrapperRight+_this.wrapperLeft;wrapper.style.width=(slidesWidth)+'px';wrapper.style.height=(_this.height)+'px';}else{wrapperSize=slidesHeight+_this.wrapperTop+_this.wrapperBottom;wrapper.style.width=(_this.width)+'px';wrapper.style.height=(slidesHeight)+'px';}}else if(params.scrollContainer){wrapper.style.width='';wrapper.style.height='';wrapperWidth=_this.slides[0].getWidth(true,params.roundLengths);wrapperHeight=_this.slides[0].getHeight(true,params.roundLengths);wrapperSize=isH?wrapperWidth:wrapperHeight;wrapper.style.width=wrapperWidth+'px';wrapper.style.height=wrapperHeight+'px';slideSize=isH?wrapperWidth:wrapperHeight;}else{if(params.calculateHeight){slideMaxHeight=0;wrapperHeight=0;if(!isH)_this.container.style.height='';wrapper.style.height='';for(i=0;i<_this.slides.length;i++){_this.slides[i].style.height='';slideMaxHeight=Math.max(_this.slides[i].getHeight(true),slideMaxHeight);if(!isH)wrapperHeight+=_this.slides[i].getHeight(true);}
slideHeight=slideMaxHeight;_this.height=slideHeight;if(isH)wrapperHeight=slideHeight;else{containerSize=slideHeight;_this.container.style.height=containerSize+'px';}}else{slideHeight=isH?_this.height:_this.height/params.slidesPerView;if(params.roundLengths)slideHeight=Math.round(slideHeight);wrapperHeight=isH?_this.height:_this.slides.length*slideHeight;}
slideWidth=isH?_this.width/params.slidesPerView:_this.width;if(params.roundLengths)slideWidth=Math.round(slideWidth);wrapperWidth=isH?_this.slides.length*slideWidth:_this.width;slideSize=isH?slideWidth:slideHeight;if(params.offsetSlidesBefore>0){if(isH)_this.wrapperLeft=slideSize*params.offsetSlidesBefore;else _this.wrapperTop=slideSize*params.offsetSlidesBefore;}
if(params.offsetSlidesAfter>0){if(isH)_this.wrapperRight=slideSize*params.offsetSlidesAfter;else _this.wrapperBottom=slideSize*params.offsetSlidesAfter;}
if(params.offsetPxBefore>0){if(isH)_this.wrapperLeft=params.offsetPxBefore;else _this.wrapperTop=params.offsetPxBefore;}
if(params.offsetPxAfter>0){if(isH)_this.wrapperRight=params.offsetPxAfter;else _this.wrapperBottom=params.offsetPxAfter;}
if(params.centeredSlides){if(isH){_this.wrapperLeft=(containerSize-slideSize)/2;_this.wrapperRight=(containerSize-slideSize)/2;}else{_this.wrapperTop=(containerSize-slideSize)/2;_this.wrapperBottom=(containerSize-slideSize)/2;}}
if(isH){if(_this.wrapperLeft>0)wrapper.style.paddingLeft=_this.wrapperLeft+'px';if(_this.wrapperRight>0)wrapper.style.paddingRight=_this.wrapperRight+'px';}else{if(_this.wrapperTop>0)wrapper.style.paddingTop=_this.wrapperTop+'px';if(_this.wrapperBottom>0)wrapper.style.paddingBottom=_this.wrapperBottom+'px';}
wrapperSize=isH?wrapperWidth+_this.wrapperRight+_this.wrapperLeft:wrapperHeight+_this.wrapperTop+_this.wrapperBottom;if(!params.cssWidthAndHeight){if(parseFloat(wrapperWidth)>0){wrapper.style.width=wrapperWidth+'px';}
if(parseFloat(wrapperHeight)>0){wrapper.style.height=wrapperHeight+'px';}}
slideLeft=0;_this.snapGrid=[];_this.slidesGrid=[];for(i=0;i<_this.slides.length;i++){_this.snapGrid.push(slideLeft);_this.slidesGrid.push(slideLeft);slideLeft+=slideSize;if(!params.cssWidthAndHeight){if(parseFloat(slideWidth)>0){_this.slides[i].style.width=slideWidth+'px';}
if(parseFloat(slideHeight)>0){_this.slides[i].style.height=slideHeight+'px';}}}}
if(!_this.initialized){_this.callPlugins('onFirstInit');if(params.onFirstInit)_this.fireCallback(params.onFirstInit,_this);}else{_this.callPlugins('onInit');if(params.onInit)_this.fireCallback(params.onInit,_this);}
_this.initialized=true;};_this.reInit=function(forceCalcSlides){_this.init(true,forceCalcSlides);};_this.resizeFix=function(reInit){_this.callPlugins('beforeResizeFix');_this.init(params.resizeReInit||reInit);if(!params.freeMode){_this.swipeTo((params.loop?_this.activeLoopIndex:_this.activeIndex),0,false);if(params.autoplay){if(_this.support.transitions&&typeof autoplayTimeoutId!=='undefined'){if(typeof autoplayTimeoutId!=='undefined'){clearTimeout(autoplayTimeoutId);autoplayTimeoutId=undefined;_this.startAutoplay();}}else{if(typeof autoplayIntervalId!=='undefined'){clearInterval(autoplayIntervalId);autoplayIntervalId=undefined;_this.startAutoplay();}}}}else if(_this.getWrapperTranslate()<-maxWrapperPosition()){_this.setWrapperTransition(0);_this.setWrapperTranslate(-maxWrapperPosition());}
_this.callPlugins('afterResizeFix');};function maxWrapperPosition(){var a=(wrapperSize-containerSize);if(params.freeMode){a=wrapperSize-containerSize;}
if(params.slidesPerView>_this.slides.length&&!params.centeredSlides){a=0;}
if(a<0)a=0;return a;}
function initEvents(){var bind=_this.h.addEventListener;var eventTarget=params.eventTarget==='wrapper'?_this.wrapper:_this.container;if(_this.slides.length>1){if(!(_this.browser.ie10||_this.browser.ie11)){if(_this.support.touch){bind(eventTarget,'touchstart',onTouchStart);bind(eventTarget,'touchmove',onTouchMove);bind(eventTarget,'touchend',onTouchEnd);}
if(params.simulateTouch){bind(eventTarget,'mousedown',onTouchStart);bind(document,'mousemove',onTouchMove);bind(document,'mouseup',onTouchEnd);}}else{bind(eventTarget,_this.touchEvents.touchStart,onTouchStart);bind(document,_this.touchEvents.touchMove,onTouchMove);bind(document,_this.touchEvents.touchEnd,onTouchEnd);}}
if(params.autoResize){bind(window,'resize',_this.resizeFix);}
addSlideEvents();_this._wheelEvent=false;if(params.mousewheelControl){if(document.onmousewheel!==undefined){_this._wheelEvent='mousewheel';}
if(!_this._wheelEvent){try{new WheelEvent('wheel');_this._wheelEvent='wheel';}catch(e){}}
if(!_this._wheelEvent){_this._wheelEvent='DOMMouseScroll';}
if(_this._wheelEvent){bind(_this.container,_this._wheelEvent,handleMousewheel);}}
function _loadImage(src){var image=new Image();image.onload=function(){if(_this&&_this.imagesLoaded!==undefined)_this.imagesLoaded++;if(_this.imagesLoaded===_this.imagesToLoad.length){_this.reInit();if(params.onImagesReady)_this.fireCallback(params.onImagesReady,_this);}};image.src=src;}
if(params.keyboardControl){bind(document,'keydown',handleKeyboardKeys);}
if(params.updateOnImagesReady){_this.imagesToLoad=$$('img',_this.container);for(var i=0;i<_this.imagesToLoad.length;i++){_loadImage(_this.imagesToLoad[i].getAttribute('src'));}}}
_this.destroy=function(){var unbind=_this.h.removeEventListener;var eventTarget=params.eventTarget==='wrapper'?_this.wrapper:_this.container;if(!(_this.browser.ie10||_this.browser.ie11)){if(_this.support.touch){unbind(eventTarget,'touchstart',onTouchStart);unbind(eventTarget,'touchmove',onTouchMove);unbind(eventTarget,'touchend',onTouchEnd);}
if(params.simulateTouch){unbind(eventTarget,'mousedown',onTouchStart);unbind(document,'mousemove',onTouchMove);unbind(document,'mouseup',onTouchEnd);}}else{unbind(eventTarget,_this.touchEvents.touchStart,onTouchStart);unbind(document,_this.touchEvents.touchMove,onTouchMove);unbind(document,_this.touchEvents.touchEnd,onTouchEnd);}
if(params.autoResize){unbind(window,'resize',_this.resizeFix);}
removeSlideEvents();if(params.paginationClickable){removePaginationEvents();}
if(params.mousewheelControl&&_this._wheelEvent){unbind(_this.container,_this._wheelEvent,handleMousewheel);}
if(params.keyboardControl){unbind(document,'keydown',handleKeyboardKeys);}
if(params.autoplay){_this.stopAutoplay();}
_this.callPlugins('onDestroy');_this=null;};function addSlideEvents(){var bind=_this.h.addEventListener,i;if(params.preventLinks){var links=$$('a',_this.container);for(i=0;i<links.length;i++){bind(links[i],'click',preventClick);}}
if(params.releaseFormElements){var formElements=$$('input, textarea, select',_this.container);for(i=0;i<formElements.length;i++){bind(formElements[i],_this.touchEvents.touchStart,releaseForms,true);}}
if(params.onSlideClick){for(i=0;i<_this.slides.length;i++){bind(_this.slides[i],'click',slideClick);}}
if(params.onSlideTouch){for(i=0;i<_this.slides.length;i++){bind(_this.slides[i],_this.touchEvents.touchStart,slideTouch);}}}
function removeSlideEvents(){var unbind=_this.h.removeEventListener,i;if(params.onSlideClick){for(i=0;i<_this.slides.length;i++){unbind(_this.slides[i],'click',slideClick);}}
if(params.onSlideTouch){for(i=0;i<_this.slides.length;i++){unbind(_this.slides[i],_this.touchEvents.touchStart,slideTouch);}}
if(params.releaseFormElements){var formElements=$$('input, textarea, select',_this.container);for(i=0;i<formElements.length;i++){unbind(formElements[i],_this.touchEvents.touchStart,releaseForms,true);}}
if(params.preventLinks){var links=$$('a',_this.container);for(i=0;i<links.length;i++){unbind(links[i],'click',preventClick);}}}
function handleKeyboardKeys(e){var kc=e.keyCode||e.charCode;if(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)return;if(kc===37||kc===39||kc===38||kc===40){var inView=false;var swiperOffset=_this.h.getOffset(_this.container);var scrollLeft=_this.h.windowScroll().left;var scrollTop=_this.h.windowScroll().top;var windowWidth=_this.h.windowWidth();var windowHeight=_this.h.windowHeight();var swiperCoord=[[swiperOffset.left,swiperOffset.top],[swiperOffset.left+_this.width,swiperOffset.top],[swiperOffset.left,swiperOffset.top+_this.height],[swiperOffset.left+_this.width,swiperOffset.top+_this.height]];for(var i=0;i<swiperCoord.length;i++){var point=swiperCoord[i];if(point[0]>=scrollLeft&&point[0]<=scrollLeft+windowWidth&&point[1]>=scrollTop&&point[1]<=scrollTop+windowHeight){inView=true;}}
if(!inView)return;}
if(isH){if(kc===37||kc===39){if(e.preventDefault)e.preventDefault();else e.returnValue=false;}
if(kc===39)_this.swipeNext();if(kc===37)_this.swipePrev();}else{if(kc===38||kc===40){if(e.preventDefault)e.preventDefault();else e.returnValue=false;}
if(kc===40)_this.swipeNext();if(kc===38)_this.swipePrev();}}
_this.disableKeyboardControl=function(){params.keyboardControl=false;_this.h.removeEventListener(document,'keydown',handleKeyboardKeys);};_this.enableKeyboardControl=function(){params.keyboardControl=true;_this.h.addEventListener(document,'keydown',handleKeyboardKeys);};var lastScrollTime=(new Date()).getTime();function handleMousewheel(e){var we=_this._wheelEvent;var delta=0;if(e.detail)delta=-e.detail;else if(we==='mousewheel'){if(params.mousewheelControlForceToAxis){if(isH){if(Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY))delta=e.wheelDeltaX;else return;}else{if(Math.abs(e.wheelDeltaY)>Math.abs(e.wheelDeltaX))delta=e.wheelDeltaY;else return;}}else{delta=e.wheelDelta;}}else if(we==='DOMMouseScroll')delta=-e.detail;else if(we==='wheel'){if(params.mousewheelControlForceToAxis){if(isH){if(Math.abs(e.deltaX)>Math.abs(e.deltaY))delta=-e.deltaX;else return;}else{if(Math.abs(e.deltaY)>Math.abs(e.deltaX))delta=-e.deltaY;else return;}}else{delta=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX:-e.deltaY;}}
if(!params.freeMode){if((new Date()).getTime()-lastScrollTime>60){if(delta<0)_this.swipeNext();else _this.swipePrev();}
lastScrollTime=(new Date()).getTime();}else{var position=_this.getWrapperTranslate()+delta;if(position>0)position=0;if(position<-maxWrapperPosition())position=-maxWrapperPosition();_this.setWrapperTransition(0);_this.setWrapperTranslate(position);_this.updateActiveSlide(position);if(position===0||position===-maxWrapperPosition())return;}
if(params.autoplay)_this.stopAutoplay(true);if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;}
if(params.grabCursor){var containerStyle=_this.container.style;containerStyle.cursor='move';containerStyle.cursor='grab';containerStyle.cursor='-moz-grab';containerStyle.cursor='-webkit-grab';}
_this.allowSlideClick=true;function slideClick(event){if(_this.allowSlideClick){setClickedSlide(event);_this.fireCallback(params.onSlideClick,_this,event);}}
function slideTouch(event){setClickedSlide(event);_this.fireCallback(params.onSlideTouch,_this,event);}
function setClickedSlide(event){if(!event.currentTarget){var element=event.srcElement;do{if(element.className.indexOf(params.slideClass)>-1){break;}
element=element.parentNode;}while(element);_this.clickedSlide=element;}else{_this.clickedSlide=event.currentTarget;}
_this.clickedSlideIndex=_this.slides.indexOf(_this.clickedSlide);_this.clickedSlideLoopIndex=_this.clickedSlideIndex-(_this.loopedSlides||0);}
_this.allowLinks=true;function preventClick(e){if(!_this.allowLinks){if(e.preventDefault)e.preventDefault();else e.returnValue=false;if(params.preventLinksPropagation&&'stopPropagation'in e){e.stopPropagation();}
return false;}}
function releaseForms(e){if(e.stopPropagation)e.stopPropagation();else e.returnValue=false;return false;}
var isTouchEvent=false;var allowThresholdMove;var allowMomentumBounce=true;function onTouchStart(event){if(params.preventLinks)_this.allowLinks=true;if(_this.isTouched||params.onlyExternal){return false;}
if(params.noSwiping&&(event.target||event.srcElement)&&noSwipingSlide(event.target||event.srcElement))return false;allowMomentumBounce=false;_this.isTouched=true;isTouchEvent=event.type==='touchstart';if(!isTouchEvent||event.targetTouches.length===1){_this.callPlugins('onTouchStartBegin');if(!isTouchEvent&&!_this.isAndroid){if(event.preventDefault)event.preventDefault();else event.returnValue=false;}
var pageX=isTouchEvent?event.targetTouches[0].pageX:(event.pageX||event.clientX);var pageY=isTouchEvent?event.targetTouches[0].pageY:(event.pageY||event.clientY);_this.touches.startX=_this.touches.currentX=pageX;_this.touches.startY=_this.touches.currentY=pageY;_this.touches.start=_this.touches.current=isH?pageX:pageY;_this.setWrapperTransition(0);_this.positions.start=_this.positions.current=_this.getWrapperTranslate();_this.setWrapperTranslate(_this.positions.start);_this.times.start=(new Date()).getTime();isScrolling=undefined;if(params.moveStartThreshold>0){allowThresholdMove=false;}
if(params.onTouchStart)_this.fireCallback(params.onTouchStart,_this);_this.callPlugins('onTouchStartEnd');}}
var velocityPrevPosition,velocityPrevTime;function onTouchMove(event){if(!_this.isTouched||params.onlyExternal)return;if(isTouchEvent&&event.type==='mousemove')return;var pageX=isTouchEvent?event.targetTouches[0].pageX:(event.pageX||event.clientX);var pageY=isTouchEvent?event.targetTouches[0].pageY:(event.pageY||event.clientY);if(typeof isScrolling==='undefined'&&isH){isScrolling=!!(isScrolling||Math.abs(pageY-_this.touches.startY)>Math.abs(pageX-_this.touches.startX));}
if(typeof isScrolling==='undefined'&&!isH){isScrolling=!!(isScrolling||Math.abs(pageY-_this.touches.startY)<Math.abs(pageX-_this.touches.startX));}
if(isScrolling){_this.isTouched=false;return;}
if(event.assignedToSwiper){_this.isTouched=false;return;}
event.assignedToSwiper=true;if(params.preventLinks){_this.allowLinks=false;}
if(params.onSlideClick){_this.allowSlideClick=false;}
if(params.autoplay){_this.stopAutoplay(true);}
if(!isTouchEvent||event.touches.length===1){if(!_this.isMoved){_this.callPlugins('onTouchMoveStart');if(params.loop){_this.fixLoop();_this.positions.start=_this.getWrapperTranslate();}
if(params.onTouchMoveStart)_this.fireCallback(params.onTouchMoveStart,_this);}
_this.isMoved=true;if(event.preventDefault)event.preventDefault();else event.returnValue=false;_this.touches.current=isH?pageX:pageY;_this.positions.current=(_this.touches.current-_this.touches.start)*params.touchRatio+_this.positions.start;if(_this.positions.current>0&&params.onResistanceBefore){_this.fireCallback(params.onResistanceBefore,_this,_this.positions.current);}
if(_this.positions.current<-maxWrapperPosition()&&params.onResistanceAfter){_this.fireCallback(params.onResistanceAfter,_this,Math.abs(_this.positions.current+maxWrapperPosition()));}
if(params.resistance&&params.resistance!=='100%'){var resistance;if(_this.positions.current>0){resistance=1-_this.positions.current/containerSize/2;if(resistance<0.5)
_this.positions.current=(containerSize/2);else
_this.positions.current=_this.positions.current*resistance;}
if(_this.positions.current<-maxWrapperPosition()){var diff=(_this.touches.current-_this.touches.start)*params.touchRatio+(maxWrapperPosition()+_this.positions.start);resistance=(containerSize+diff)/(containerSize);var newPos=_this.positions.current-diff*(1-resistance)/2;var stopPos=-maxWrapperPosition()-containerSize/2;if(newPos<stopPos||resistance<=0)
_this.positions.current=stopPos;else
_this.positions.current=newPos;}}
if(params.resistance&&params.resistance==='100%'){if(_this.positions.current>0&&!(params.freeMode&&!params.freeModeFluid)){_this.positions.current=0;}
if(_this.positions.current<-maxWrapperPosition()&&!(params.freeMode&&!params.freeModeFluid)){_this.positions.current=-maxWrapperPosition();}}
if(!params.followFinger)return;if(!params.moveStartThreshold){_this.setWrapperTranslate(_this.positions.current);}else{if(Math.abs(_this.touches.current-_this.touches.start)>params.moveStartThreshold||allowThresholdMove){if(!allowThresholdMove){allowThresholdMove=true;_this.touches.start=_this.touches.current;return;}
_this.setWrapperTranslate(_this.positions.current);}else{_this.positions.current=_this.positions.start;}}
if(params.freeMode||params.watchActiveIndex){_this.updateActiveSlide(_this.positions.current);}
if(params.grabCursor){_this.container.style.cursor='move';_this.container.style.cursor='grabbing';_this.container.style.cursor='-moz-grabbin';_this.container.style.cursor='-webkit-grabbing';}
if(!velocityPrevPosition)velocityPrevPosition=_this.touches.current;if(!velocityPrevTime)velocityPrevTime=(new Date()).getTime();_this.velocity=(_this.touches.current-velocityPrevPosition)/((new Date()).getTime()-velocityPrevTime)/2;if(Math.abs(_this.touches.current-velocityPrevPosition)<2)_this.velocity=0;velocityPrevPosition=_this.touches.current;velocityPrevTime=(new Date()).getTime();_this.callPlugins('onTouchMoveEnd');if(params.onTouchMove)_this.fireCallback(params.onTouchMove,_this);return false;}}
function onTouchEnd(event){if(isScrolling){_this.swipeReset();}
if(params.onlyExternal||!_this.isTouched)return;_this.isTouched=false;if(params.grabCursor){_this.container.style.cursor='move';_this.container.style.cursor='grab';_this.container.style.cursor='-moz-grab';_this.container.style.cursor='-webkit-grab';}
if(!_this.positions.current&&_this.positions.current!==0){_this.positions.current=_this.positions.start;}
if(params.followFinger){_this.setWrapperTranslate(_this.positions.current);}
_this.times.end=(new Date()).getTime();_this.touches.diff=_this.touches.current-_this.touches.start;_this.touches.abs=Math.abs(_this.touches.diff);_this.positions.diff=_this.positions.current-_this.positions.start;_this.positions.abs=Math.abs(_this.positions.diff);var diff=_this.positions.diff;var diffAbs=_this.positions.abs;var timeDiff=_this.times.end-_this.times.start;if(diffAbs<5&&(timeDiff)<300&&_this.allowLinks===false){if(!params.freeMode&&diffAbs!==0)_this.swipeReset();if(params.preventLinks){_this.allowLinks=true;}
if(params.onSlideClick){_this.allowSlideClick=true;}}
setTimeout(function(){if(params.preventLinks){_this.allowLinks=true;}
if(params.onSlideClick){_this.allowSlideClick=true;}},100);var maxPosition=maxWrapperPosition();if(!_this.isMoved&&params.freeMode){_this.isMoved=false;if(params.onTouchEnd)_this.fireCallback(params.onTouchEnd,_this);_this.callPlugins('onTouchEnd');return;}
if(!_this.isMoved||_this.positions.current>0||_this.positions.current<-maxPosition){_this.swipeReset();if(params.onTouchEnd)_this.fireCallback(params.onTouchEnd,_this);_this.callPlugins('onTouchEnd');return;}
_this.isMoved=false;if(params.freeMode){if(params.freeModeFluid){var momentumDuration=1000*params.momentumRatio;var momentumDistance=_this.velocity*momentumDuration;var newPosition=_this.positions.current+momentumDistance;var doBounce=false;var afterBouncePosition;var bounceAmount=Math.abs(_this.velocity)*20*params.momentumBounceRatio;if(newPosition<-maxPosition){if(params.momentumBounce&&_this.support.transitions){if(newPosition+maxPosition<-bounceAmount)newPosition=-maxPosition-bounceAmount;afterBouncePosition=-maxPosition;doBounce=true;allowMomentumBounce=true;}else newPosition=-maxPosition;}
if(newPosition>0){if(params.momentumBounce&&_this.support.transitions){if(newPosition>bounceAmount)newPosition=bounceAmount;afterBouncePosition=0;doBounce=true;allowMomentumBounce=true;}else newPosition=0;}
if(_this.velocity!==0)momentumDuration=Math.abs((newPosition-_this.positions.current)/_this.velocity);_this.setWrapperTranslate(newPosition);_this.setWrapperTransition(momentumDuration);if(params.momentumBounce&&doBounce){_this.wrapperTransitionEnd(function(){if(!allowMomentumBounce)return;if(params.onMomentumBounce)_this.fireCallback(params.onMomentumBounce,_this);_this.callPlugins('onMomentumBounce');_this.setWrapperTranslate(afterBouncePosition);_this.setWrapperTransition(300);});}
_this.updateActiveSlide(newPosition);}
if(!params.freeModeFluid||timeDiff>=300)_this.updateActiveSlide(_this.positions.current);if(params.onTouchEnd)_this.fireCallback(params.onTouchEnd,_this);_this.callPlugins('onTouchEnd');return;}
direction=diff<0?'toNext':'toPrev';if(direction==='toNext'&&(timeDiff<=300)){if(diffAbs<30||!params.shortSwipes)_this.swipeReset();else _this.swipeNext(true);}
if(direction==='toPrev'&&(timeDiff<=300)){if(diffAbs<30||!params.shortSwipes)_this.swipeReset();else _this.swipePrev(true);}
var targetSlideSize=0;if(params.slidesPerView==='auto'){var currentPosition=Math.abs(_this.getWrapperTranslate());var slidesOffset=0;var _slideSize;for(var i=0;i<_this.slides.length;i++){_slideSize=isH?_this.slides[i].getWidth(true,params.roundLengths):_this.slides[i].getHeight(true,params.roundLengths);slidesOffset+=_slideSize;if(slidesOffset>currentPosition){targetSlideSize=_slideSize;break;}}
if(targetSlideSize>containerSize)targetSlideSize=containerSize;}else{targetSlideSize=slideSize*params.slidesPerView;}
if(direction==='toNext'&&(timeDiff>300)){if(diffAbs>=targetSlideSize*params.longSwipesRatio){_this.swipeNext(true);}else{_this.swipeReset();}}
if(direction==='toPrev'&&(timeDiff>300)){if(diffAbs>=targetSlideSize*params.longSwipesRatio){_this.swipePrev(true);}else{_this.swipeReset();}}
if(params.onTouchEnd)_this.fireCallback(params.onTouchEnd,_this);_this.callPlugins('onTouchEnd');}
function noSwipingSlide(el){var noSwiping=false;do{if(el.className.indexOf(params.noSwipingClass)>-1){noSwiping=true;}
el=el.parentElement;}while(!noSwiping&&el.parentElement&&el.className.indexOf(params.wrapperClass)===-1);if(!noSwiping&&el.className.indexOf(params.wrapperClass)>-1&&el.className.indexOf(params.noSwipingClass)>-1)
noSwiping=true;return noSwiping;}
function addClassToHtmlString(klass,outerHtml){var par=document.createElement('div');var child;par.innerHTML=outerHtml;child=par.firstChild;child.className+=' '+klass;return child.outerHTML;}
_this.swipeNext=function(internal){if(!internal&&params.loop)_this.fixLoop();if(!internal&&params.autoplay)_this.stopAutoplay(true);_this.callPlugins('onSwipeNext');var currentPosition=_this.getWrapperTranslate();var newPosition=currentPosition;if(params.slidesPerView==='auto'){for(var i=0;i<_this.snapGrid.length;i++){if(-currentPosition>=_this.snapGrid[i]&&-currentPosition<_this.snapGrid[i+1]){newPosition=-_this.snapGrid[i+1];break;}}}else{var groupSize=slideSize*params.slidesPerGroup;newPosition=-(Math.floor(Math.abs(currentPosition)/Math.floor(groupSize))*groupSize+groupSize);}
if(newPosition<-maxWrapperPosition()){newPosition=-maxWrapperPosition();}
if(newPosition===currentPosition)return false;swipeToPosition(newPosition,'next');return true;};_this.swipePrev=function(internal){if(!internal&&params.loop)_this.fixLoop();if(!internal&&params.autoplay)_this.stopAutoplay(true);_this.callPlugins('onSwipePrev');var currentPosition=Math.ceil(_this.getWrapperTranslate());var newPosition;if(params.slidesPerView==='auto'){newPosition=0;for(var i=1;i<_this.snapGrid.length;i++){if(-currentPosition===_this.snapGrid[i]){newPosition=-_this.snapGrid[i-1];break;}
if(-currentPosition>_this.snapGrid[i]&&-currentPosition<_this.snapGrid[i+1]){newPosition=-_this.snapGrid[i];break;}}}else{var groupSize=slideSize*params.slidesPerGroup;newPosition=-(Math.ceil(-currentPosition/groupSize)-1)*groupSize;}
if(newPosition>0)newPosition=0;if(newPosition===currentPosition)return false;swipeToPosition(newPosition,'prev');return true;};_this.swipeReset=function(){_this.callPlugins('onSwipeReset');var currentPosition=_this.getWrapperTranslate();var groupSize=slideSize*params.slidesPerGroup;var newPosition;var maxPosition=-maxWrapperPosition();if(params.slidesPerView==='auto'){newPosition=0;for(var i=0;i<_this.snapGrid.length;i++){if(-currentPosition===_this.snapGrid[i])return;if(-currentPosition>=_this.snapGrid[i]&&-currentPosition<_this.snapGrid[i+1]){if(_this.positions.diff>0)newPosition=-_this.snapGrid[i+1];else newPosition=-_this.snapGrid[i];break;}}
if(-currentPosition>=_this.snapGrid[_this.snapGrid.length-1])newPosition=-_this.snapGrid[_this.snapGrid.length-1];if(currentPosition<=-maxWrapperPosition())newPosition=-maxWrapperPosition();}else{newPosition=currentPosition<0?Math.round(currentPosition/groupSize)*groupSize:0;}
if(params.scrollContainer){newPosition=currentPosition<0?currentPosition:0;}
if(newPosition<-maxWrapperPosition()){newPosition=-maxWrapperPosition();}
if(params.scrollContainer&&(containerSize>slideSize)){newPosition=0;}
if(newPosition===currentPosition)return false;swipeToPosition(newPosition,'reset');return true;};_this.swipeTo=function(index,speed,runCallbacks){index=parseInt(index,10);_this.callPlugins('onSwipeTo',{index:index,speed:speed});if(params.loop)index=index+_this.loopedSlides;var currentPosition=_this.getWrapperTranslate();if(index>(_this.slides.length-1)||index<0)return;var newPosition;if(params.slidesPerView==='auto'){newPosition=-_this.slidesGrid[index];}else{newPosition=-index*slideSize;}
if(newPosition<-maxWrapperPosition()){newPosition=-maxWrapperPosition();}
if(newPosition===currentPosition)return false;runCallbacks=runCallbacks===false?false:true;swipeToPosition(newPosition,'to',{index:index,speed:speed,runCallbacks:runCallbacks});return true;};function swipeToPosition(newPosition,action,toOptions){var speed=(action==='to'&&toOptions.speed>=0)?toOptions.speed:params.speed;var timeOld=+new Date();function anim(){var timeNew=+new Date();var time=timeNew-timeOld;currentPosition+=animationStep*time/(1000/60);condition=direction==='toNext'?currentPosition>newPosition:currentPosition<newPosition;if(condition){_this.setWrapperTranslate(Math.round(currentPosition));_this._DOMAnimating=true;window.setTimeout(function(){anim();},1000/60);}else{if(params.onSlideChangeEnd){if(action==='to'){if(toOptions.runCallbacks===true)_this.fireCallback(params.onSlideChangeEnd,_this);}else{_this.fireCallback(params.onSlideChangeEnd,_this);}}
_this.setWrapperTranslate(newPosition);_this._DOMAnimating=false;}}
if(_this.support.transitions||!params.DOMAnimation){_this.setWrapperTranslate(newPosition);_this.setWrapperTransition(speed);}else{var currentPosition=_this.getWrapperTranslate();var animationStep=Math.ceil((newPosition-currentPosition)/speed*(1000/60));var direction=currentPosition>newPosition?'toNext':'toPrev';var condition=direction==='toNext'?currentPosition>newPosition:currentPosition<newPosition;if(_this._DOMAnimating)return;anim();}
_this.updateActiveSlide(newPosition);if(params.onSlideNext&&action==='next'){_this.fireCallback(params.onSlideNext,_this,newPosition);}
if(params.onSlidePrev&&action==='prev'){_this.fireCallback(params.onSlidePrev,_this,newPosition);}
if(params.onSlideReset&&action==='reset'){_this.fireCallback(params.onSlideReset,_this,newPosition);}
if(action==='next'||action==='prev'||(action==='to'&&toOptions.runCallbacks===true))
slideChangeCallbacks(action);}
_this._queueStartCallbacks=false;_this._queueEndCallbacks=false;function slideChangeCallbacks(direction){_this.callPlugins('onSlideChangeStart');if(params.onSlideChangeStart){if(params.queueStartCallbacks&&_this.support.transitions){if(_this._queueStartCallbacks)return;_this._queueStartCallbacks=true;_this.fireCallback(params.onSlideChangeStart,_this,direction);_this.wrapperTransitionEnd(function(){_this._queueStartCallbacks=false;});}else _this.fireCallback(params.onSlideChangeStart,_this,direction);}
if(params.onSlideChangeEnd){if(_this.support.transitions){if(params.queueEndCallbacks){if(_this._queueEndCallbacks)return;_this._queueEndCallbacks=true;_this.wrapperTransitionEnd(function(swiper){_this.fireCallback(params.onSlideChangeEnd,swiper,direction);});}else{_this.wrapperTransitionEnd(function(swiper){_this.fireCallback(params.onSlideChangeEnd,swiper,direction);});}}else{if(!params.DOMAnimation){setTimeout(function(){_this.fireCallback(params.onSlideChangeEnd,_this,direction);},10);}}}}
_this.updateActiveSlide=function(position){if(!_this.initialized)return;if(_this.slides.length===0)return;_this.previousIndex=_this.activeIndex;if(typeof position==='undefined')position=_this.getWrapperTranslate();if(position>0)position=0;var i;if(params.slidesPerView==='auto'){var slidesOffset=0;_this.activeIndex=_this.slidesGrid.indexOf(-position);if(_this.activeIndex<0){for(i=0;i<_this.slidesGrid.length-1;i++){if(-position>_this.slidesGrid[i]&&-position<_this.slidesGrid[i+1]){break;}}
var leftDistance=Math.abs(_this.slidesGrid[i]+position);var rightDistance=Math.abs(_this.slidesGrid[i+1]+position);if(leftDistance<=rightDistance)_this.activeIndex=i;else _this.activeIndex=i+1;}}else{_this.activeIndex=Math[params.visibilityFullFit?'ceil':'round'](-position/slideSize);}
if(_this.activeIndex===_this.slides.length)_this.activeIndex=_this.slides.length-1;if(_this.activeIndex<0)_this.activeIndex=0;if(!_this.slides[_this.activeIndex])return;_this.calcVisibleSlides(position);if(_this.support.classList){var slide;for(i=0;i<_this.slides.length;i++){slide=_this.slides[i];slide.classList.remove(params.slideActiveClass);if(_this.visibleSlides.indexOf(slide)>=0){slide.classList.add(params.slideVisibleClass);}else{slide.classList.remove(params.slideVisibleClass);}}
_this.slides[_this.activeIndex].classList.add(params.slideActiveClass);}else{var activeClassRegexp=new RegExp('\\s*'+params.slideActiveClass);var inViewClassRegexp=new RegExp('\\s*'+params.slideVisibleClass);for(i=0;i<_this.slides.length;i++){_this.slides[i].className=_this.slides[i].className.replace(activeClassRegexp,'').replace(inViewClassRegexp,'');if(_this.visibleSlides.indexOf(_this.slides[i])>=0){_this.slides[i].className+=' '+params.slideVisibleClass;}}
_this.slides[_this.activeIndex].className+=' '+params.slideActiveClass;}
if(params.loop){var ls=_this.loopedSlides;_this.activeLoopIndex=_this.activeIndex-ls;if(_this.activeLoopIndex>=_this.slides.length-ls*2){_this.activeLoopIndex=_this.slides.length-ls*2-_this.activeLoopIndex;}
if(_this.activeLoopIndex<0){_this.activeLoopIndex=_this.slides.length-ls*2+_this.activeLoopIndex;}
if(_this.activeLoopIndex<0)_this.activeLoopIndex=0;}else{_this.activeLoopIndex=_this.activeIndex;}
if(params.pagination){_this.updatePagination(position);}};_this.createPagination=function(firstInit){if(params.paginationClickable&&_this.paginationButtons){removePaginationEvents();}
_this.paginationContainer=params.pagination.nodeType?params.pagination:$$(params.pagination)[0];if(params.createPagination){var paginationHTML='';var numOfSlides=_this.slides.length;var numOfButtons=numOfSlides;if(params.loop)numOfButtons-=_this.loopedSlides*2;var hide_pagination=numOfButtons==1?"none":"inline-block";var show_leftrightnav=numOfButtons==1?"none":"block";var reduceheight=numOfButtons==1?"0":"";var containyo=_this.container;for(var i=0;i<numOfButtons;i++){paginationHTML+='<'+params.paginationElement+' class="'+params.paginationElementClass+'" style="display:'+hide_pagination+';"></'+params.paginationElement+'>';$(containyo).find('.arrow-left').css('display',show_leftrightnav);$(containyo).find('.arrow-right').css('display',show_leftrightnav);$(containyo).find('.pagination').css('display',hide_pagination);$(containyo).css('padding',reduceheight);}
_this.paginationContainer.innerHTML=paginationHTML;}
_this.paginationButtons=$$('.'+params.paginationElementClass,_this.paginationContainer);if(!firstInit)_this.updatePagination();_this.callPlugins('onCreatePagination');if(params.paginationClickable){addPaginationEvents();}};function removePaginationEvents(){var pagers=_this.paginationButtons;if(pagers){for(var i=0;i<pagers.length;i++){_this.h.removeEventListener(pagers[i],'click',paginationClick);}}}
function addPaginationEvents(){var pagers=_this.paginationButtons;if(pagers){for(var i=0;i<pagers.length;i++){_this.h.addEventListener(pagers[i],'click',paginationClick);}}}
function paginationClick(e){var index;var target=e.target||e.srcElement;var pagers=_this.paginationButtons;for(var i=0;i<pagers.length;i++){if(target===pagers[i])index=i;}
_this.swipeTo(index);}
_this.updatePagination=function(position){if(!params.pagination)return;if(_this.slides.length<1)return;var activePagers=$$('.'+params.paginationActiveClass,_this.paginationContainer);if(!activePagers)return;var pagers=_this.paginationButtons;if(pagers.length===0)return;for(var i=0;i<pagers.length;i++){pagers[i].className=params.paginationElementClass;}
var indexOffset=params.loop?_this.loopedSlides:0;if(params.paginationAsRange){if(!_this.visibleSlides)_this.calcVisibleSlides(position);var visibleIndexes=[];var j;for(j=0;j<_this.visibleSlides.length;j++){var visIndex=_this.slides.indexOf(_this.visibleSlides[j])-indexOffset;if(params.loop&&visIndex<0){visIndex=_this.slides.length-_this.loopedSlides*2+visIndex;}
if(params.loop&&visIndex>=_this.slides.length-_this.loopedSlides*2){visIndex=_this.slides.length-_this.loopedSlides*2-visIndex;visIndex=Math.abs(visIndex);}
visibleIndexes.push(visIndex);}
for(j=0;j<visibleIndexes.length;j++){if(pagers[visibleIndexes[j]])pagers[visibleIndexes[j]].className+=' '+params.paginationVisibleClass;}
if(params.loop){if(pagers[_this.activeLoopIndex]!==undefined){pagers[_this.activeLoopIndex].className+=' '+params.paginationActiveClass;}}else{pagers[_this.activeIndex].className+=' '+params.paginationActiveClass;}}else{if(params.loop){if(pagers[_this.activeLoopIndex])pagers[_this.activeLoopIndex].className+=' '+params.paginationActiveClass+' '+params.paginationVisibleClass;}else{pagers[_this.activeIndex].className+=' '+params.paginationActiveClass+' '+params.paginationVisibleClass;}}};_this.calcVisibleSlides=function(position){var visibleSlides=[];var _slideLeft=0,_slideSize=0,_slideRight=0;if(isH&&_this.wrapperLeft>0)position=position+_this.wrapperLeft;if(!isH&&_this.wrapperTop>0)position=position+_this.wrapperTop;for(var i=0;i<_this.slides.length;i++){_slideLeft+=_slideSize;if(params.slidesPerView==='auto')
_slideSize=isH?_this.h.getWidth(_this.slides[i],true,params.roundLengths):_this.h.getHeight(_this.slides[i],true,params.roundLengths);else _slideSize=slideSize;_slideRight=_slideLeft+_slideSize;var isVisibile=false;if(params.visibilityFullFit){if(_slideLeft>=-position&&_slideRight<=-position+containerSize)isVisibile=true;if(_slideLeft<=-position&&_slideRight>=-position+containerSize)isVisibile=true;}else{if(_slideRight>-position&&_slideRight<=((-position+containerSize)))isVisibile=true;if(_slideLeft>=-position&&_slideLeft<((-position+containerSize)))isVisibile=true;if(_slideLeft<-position&&_slideRight>((-position+containerSize)))isVisibile=true;}
if(isVisibile)visibleSlides.push(_this.slides[i]);}
if(visibleSlides.length===0)visibleSlides=[_this.slides[_this.activeIndex]];_this.visibleSlides=visibleSlides;};var autoplayTimeoutId,autoplayIntervalId;_this.startAutoplay=function(){if(_this.support.transitions){if(typeof autoplayTimeoutId!=='undefined')return false;if(!params.autoplay)return;_this.callPlugins('onAutoplayStart');if(params.onAutoplayStart)_this.fireCallback(params.onAutoplayStart,_this);autoplay();}else{if(typeof autoplayIntervalId!=='undefined')return false;if(!params.autoplay)return;_this.callPlugins('onAutoplayStart');if(params.onAutoplayStart)_this.fireCallback(params.onAutoplayStart,_this);autoplayIntervalId=setInterval(function(){if(params.loop){_this.fixLoop();_this.swipeNext(true);}else if(!_this.swipeNext(true)){if(!params.autoplayStopOnLast)_this.swipeTo(0);else{clearInterval(autoplayIntervalId);autoplayIntervalId=undefined;}}},params.autoplay);}};_this.stopAutoplay=function(internal){if(_this.support.transitions){if(!autoplayTimeoutId)return;if(autoplayTimeoutId)clearTimeout(autoplayTimeoutId);autoplayTimeoutId=undefined;if(internal&&!params.autoplayDisableOnInteraction){_this.wrapperTransitionEnd(function(){autoplay();});}
_this.callPlugins('onAutoplayStop');if(params.onAutoplayStop)_this.fireCallback(params.onAutoplayStop,_this);}else{if(autoplayIntervalId)clearInterval(autoplayIntervalId);autoplayIntervalId=undefined;_this.callPlugins('onAutoplayStop');if(params.onAutoplayStop)_this.fireCallback(params.onAutoplayStop,_this);}};function autoplay(){autoplayTimeoutId=setTimeout(function(){if(params.loop){_this.fixLoop();_this.swipeNext(true);}else if(!_this.swipeNext(true)){if(!params.autoplayStopOnLast)_this.swipeTo(0);else{clearTimeout(autoplayTimeoutId);autoplayTimeoutId=undefined;}}
_this.wrapperTransitionEnd(function(){if(typeof autoplayTimeoutId!=='undefined')autoplay();});},params.autoplay);}
_this.loopCreated=false;_this.removeLoopedSlides=function(){if(_this.loopCreated){for(var i=0;i<_this.slides.length;i++){if(_this.slides[i].getData('looped')===true)_this.wrapper.removeChild(_this.slides[i]);}}};_this.createLoop=function(){if(_this.slides.length===0)return;if(params.slidesPerView==='auto'){_this.loopedSlides=params.loopedSlides||1;}else{_this.loopedSlides=params.slidesPerView+params.loopAdditionalSlides;}
if(_this.loopedSlides>_this.slides.length){_this.loopedSlides=_this.slides.length;}
var slideFirstHTML='',slideLastHTML='',i;var slidesSetFullHTML='';var numSlides=_this.slides.length;var fullSlideSets=Math.floor(_this.loopedSlides/numSlides);var remainderSlides=_this.loopedSlides%numSlides;for(i=0;i<(fullSlideSets*numSlides);i++){var j=i;if(i>=numSlides){var over=Math.floor(i/numSlides);j=i-(numSlides*over);}
slidesSetFullHTML+=_this.slides[j].outerHTML;}
for(i=0;i<remainderSlides;i++){slideLastHTML+=addClassToHtmlString(params.slideDuplicateClass,_this.slides[i].outerHTML);}
for(i=numSlides-remainderSlides;i<numSlides;i++){slideFirstHTML+=addClassToHtmlString(params.slideDuplicateClass,_this.slides[i].outerHTML);}
var slides=slideFirstHTML+slidesSetFullHTML+wrapper.innerHTML+slidesSetFullHTML+slideLastHTML;wrapper.innerHTML=slides;_this.loopCreated=true;_this.calcSlides();for(i=0;i<_this.slides.length;i++){if(i<_this.loopedSlides||i>=_this.slides.length-_this.loopedSlides)_this.slides[i].setData('looped',true);}
_this.callPlugins('onCreateLoop');};_this.fixLoop=function(){var newIndex;if(_this.activeIndex<_this.loopedSlides){newIndex=_this.slides.length-_this.loopedSlides*3+_this.activeIndex;_this.swipeTo(newIndex,0,false);}else if((params.slidesPerView==='auto'&&_this.activeIndex>=_this.loopedSlides*2)||(_this.activeIndex>_this.slides.length-params.slidesPerView*2)){newIndex=-_this.slides.length+_this.activeIndex+_this.loopedSlides;_this.swipeTo(newIndex,0,false);}};_this.loadSlides=function(){var slidesHTML='';_this.activeLoaderIndex=0;var slides=params.loader.slides;var slidesToLoad=params.loader.loadAllSlides?slides.length:params.slidesPerView*(1+params.loader.surroundGroups);for(var i=0;i<slidesToLoad;i++){if(params.loader.slidesHTMLType==='outer')slidesHTML+=slides[i];else{slidesHTML+='<'+params.slideElement+' class="'+params.slideClass+'" data-swiperindex="'+i+'">'+slides[i]+'</'+params.slideElement+'>';}}
_this.wrapper.innerHTML=slidesHTML;_this.calcSlides(true);if(!params.loader.loadAllSlides){_this.wrapperTransitionEnd(_this.reloadSlides,true);}};_this.reloadSlides=function(){var slides=params.loader.slides;var newActiveIndex=parseInt(_this.activeSlide().data('swiperindex'),10);if(newActiveIndex<0||newActiveIndex>slides.length-1)return;_this.activeLoaderIndex=newActiveIndex;var firstIndex=Math.max(0,newActiveIndex-params.slidesPerView*params.loader.surroundGroups);var lastIndex=Math.min(newActiveIndex+params.slidesPerView*(1+params.loader.surroundGroups)-1,slides.length-1);if(newActiveIndex>0){var newTransform=-slideSize*(newActiveIndex-firstIndex);_this.setWrapperTranslate(newTransform);_this.setWrapperTransition(0);}
var i;if(params.loader.logic==='reload'){_this.wrapper.innerHTML='';var slidesHTML='';for(i=firstIndex;i<=lastIndex;i++){slidesHTML+=params.loader.slidesHTMLType==='outer'?slides[i]:'<'+params.slideElement+' class="'+params.slideClass+'" data-swiperindex="'+i+'">'+slides[i]+'</'+params.slideElement+'>';}
_this.wrapper.innerHTML=slidesHTML;}else{var minExistIndex=1000;var maxExistIndex=0;for(i=0;i<_this.slides.length;i++){var index=_this.slides[i].data('swiperindex');if(index<firstIndex||index>lastIndex){_this.wrapper.removeChild(_this.slides[i]);}else{minExistIndex=Math.min(index,minExistIndex);maxExistIndex=Math.max(index,maxExistIndex);}}
for(i=firstIndex;i<=lastIndex;i++){var newSlide;if(i<minExistIndex){newSlide=document.createElement(params.slideElement);newSlide.className=params.slideClass;newSlide.setAttribute('data-swiperindex',i);newSlide.innerHTML=slides[i];_this.wrapper.insertBefore(newSlide,_this.wrapper.firstChild);}
if(i>maxExistIndex){newSlide=document.createElement(params.slideElement);newSlide.className=params.slideClass;newSlide.setAttribute('data-swiperindex',i);newSlide.innerHTML=slides[i];_this.wrapper.appendChild(newSlide);}}}
_this.reInit(true);};function makeSwiper(){_this.calcSlides();if(params.loader.slides.length>0&&_this.slides.length===0){_this.loadSlides();}
if(params.loop){_this.createLoop();}
_this.init();initEvents();if(params.pagination){_this.createPagination(true);}
if(params.loop||params.initialSlide>0){_this.swipeTo(params.initialSlide,0,false);}else{_this.updateActiveSlide(0);}
if(params.autoplay){_this.startAutoplay();}
_this.centerIndex=_this.activeIndex;if(params.onSwiperCreated)_this.fireCallback(params.onSwiperCreated,_this);_this.callPlugins('onSwiperCreated');}
makeSwiper();};Swiper.prototype={plugins:{},wrapperTransitionEnd:function(callback,permanent){'use strict';var a=this,el=a.wrapper,events=['webkitTransitionEnd','transitionend','oTransitionEnd','MSTransitionEnd','msTransitionEnd'],i;function fireCallBack(){callback(a);if(a.params.queueEndCallbacks)a._queueEndCallbacks=false;if(!permanent){for(i=0;i<events.length;i++){a.h.removeEventListener(el,events[i],fireCallBack);}}}
if(callback){for(i=0;i<events.length;i++){a.h.addEventListener(el,events[i],fireCallBack);}}},getWrapperTranslate:function(axis){'use strict';var el=this.wrapper,matrix,curTransform,curStyle,transformMatrix;if(typeof axis==='undefined'){axis=this.params.mode==='horizontal'?'x':'y';}
if(this.support.transforms&&this.params.useCSS3Transforms){curStyle=window.getComputedStyle(el,null);if(window.WebKitCSSMatrix){transformMatrix=new WebKitCSSMatrix(curStyle.webkitTransform);}else{transformMatrix=curStyle.MozTransform||curStyle.OTransform||curStyle.MsTransform||curStyle.msTransform||curStyle.transform||curStyle.getPropertyValue('transform').replace('translate(','matrix(1, 0, 0, 1,');matrix=transformMatrix.toString().split(',');}
if(axis==='x'){if(window.WebKitCSSMatrix)
curTransform=transformMatrix.m41;else if(matrix.length===16)
curTransform=parseFloat(matrix[12]);else
curTransform=parseFloat(matrix[4]);}
if(axis==='y'){if(window.WebKitCSSMatrix)
curTransform=transformMatrix.m42;else if(matrix.length===16)
curTransform=parseFloat(matrix[13]);else
curTransform=parseFloat(matrix[5]);}}else{if(axis==='x')curTransform=parseFloat(el.style.left,10)||0;if(axis==='y')curTransform=parseFloat(el.style.top,10)||0;}
return curTransform||0;},setWrapperTranslate:function(x,y,z){'use strict';var es=this.wrapper.style,coords={x:0,y:0,z:0},translate;if(arguments.length===3){coords.x=x;coords.y=y;coords.z=z;}else{if(typeof y==='undefined'){y=this.params.mode==='horizontal'?'x':'y';}
coords[y]=x;}
if(this.support.transforms&&this.params.useCSS3Transforms){translate=this.support.transforms3d?'translate3d('+coords.x+'px, '+coords.y+'px, '+coords.z+'px)':'translate('+coords.x+'px, '+coords.y+'px)';es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=translate;}else{es.left=coords.x+'px';es.top=coords.y+'px';}
this.callPlugins('onSetWrapperTransform',coords);if(this.params.onSetWrapperTransform)this.fireCallback(this.params.onSetWrapperTransform,this,coords);},setWrapperTransition:function(duration){'use strict';var es=this.wrapper.style;es.webkitTransitionDuration=es.MsTransitionDuration=es.msTransitionDuration=es.MozTransitionDuration=es.OTransitionDuration=es.transitionDuration=(duration/1000)+'s';this.callPlugins('onSetWrapperTransition',{duration:duration});if(this.params.onSetWrapperTransition)this.fireCallback(this.params.onSetWrapperTransition,this,duration);},h:{getWidth:function(el,outer,round){'use strict';var width=window.getComputedStyle(el,null).getPropertyValue('width');var returnWidth=parseFloat(width);if(isNaN(returnWidth)||width.indexOf('%')>0){returnWidth=el.offsetWidth-parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-left'))-parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-right'));}
if(outer)returnWidth+=parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-left'))+parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-right'));if(round)return Math.round(returnWidth);else return returnWidth;},getHeight:function(el,outer,round){'use strict';if(outer)return el.offsetHeight;var height=window.getComputedStyle(el,null).getPropertyValue('height');var returnHeight=parseFloat(height);if(isNaN(returnHeight)||height.indexOf('%')>0){returnHeight=el.offsetHeight-parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-top'))-parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-bottom'));}
if(outer)returnHeight+=parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-top'))+parseFloat(window.getComputedStyle(el,null).getPropertyValue('padding-bottom'));if(round)return Math.round(returnHeight);else return returnHeight;},getOffset:function(el){'use strict';var box=el.getBoundingClientRect();var body=document.body;var clientTop=el.clientTop||body.clientTop||0;var clientLeft=el.clientLeft||body.clientLeft||0;var scrollTop=window.pageYOffset||el.scrollTop;var scrollLeft=window.pageXOffset||el.scrollLeft;if(document.documentElement&&!window.pageYOffset){scrollTop=document.documentElement.scrollTop;scrollLeft=document.documentElement.scrollLeft;}
return{top:box.top+scrollTop-clientTop,left:box.left+scrollLeft-clientLeft};},windowWidth:function(){'use strict';if(window.innerWidth)return window.innerWidth;else if(document.documentElement&&document.documentElement.clientWidth)return document.documentElement.clientWidth;},windowHeight:function(){'use strict';if(window.innerHeight)return window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)return document.documentElement.clientHeight;},windowScroll:function(){'use strict';if(typeof pageYOffset!=='undefined'){return{left:window.pageXOffset,top:window.pageYOffset};}else if(document.documentElement){return{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop};}},addEventListener:function(el,event,listener,useCapture){'use strict';if(typeof useCapture==='undefined'){useCapture=false;}
if(el.addEventListener){el.addEventListener(event,listener,useCapture);}else if(el.attachEvent){el.attachEvent('on'+event,listener);}},removeEventListener:function(el,event,listener,useCapture){'use strict';if(typeof useCapture==='undefined'){useCapture=false;}
if(el.removeEventListener){el.removeEventListener(event,listener,useCapture);}else if(el.detachEvent){el.detachEvent('on'+event,listener);}}},setTransform:function(el,transform){'use strict';var es=el.style;es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=transform;},setTranslate:function(el,translate){'use strict';var es=el.style;var pos={x:translate.x||0,y:translate.y||0,z:translate.z||0};var transformString=this.support.transforms3d?'translate3d('+(pos.x)+'px,'+(pos.y)+'px,'+(pos.z)+'px)':'translate('+(pos.x)+'px,'+(pos.y)+'px)';es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=transformString;if(!this.support.transforms){es.left=pos.x+'px';es.top=pos.y+'px';}},setTransition:function(el,duration){'use strict';var es=el.style;es.webkitTransitionDuration=es.MsTransitionDuration=es.msTransitionDuration=es.MozTransitionDuration=es.OTransitionDuration=es.transitionDuration=duration+'ms';},support:{touch:(window.Modernizr&&Modernizr.touch===true)||(function(){'use strict';return!!(('ontouchstart'in window)||window.DocumentTouch&&document instanceof DocumentTouch);})(),transforms3d:(window.Modernizr&&Modernizr.csstransforms3d===true)||(function(){'use strict';var div=document.createElement('div').style;return('webkitPerspective'in div||'MozPerspective'in div||'OPerspective'in div||'MsPerspective'in div||'perspective'in div);})(),transforms:(window.Modernizr&&Modernizr.csstransforms===true)||(function(){'use strict';var div=document.createElement('div').style;return('transform'in div||'WebkitTransform'in div||'MozTransform'in div||'msTransform'in div||'MsTransform'in div||'OTransform'in div);})(),transitions:(window.Modernizr&&Modernizr.csstransitions===true)||(function(){'use strict';var div=document.createElement('div').style;return('transition'in div||'WebkitTransition'in div||'MozTransition'in div||'msTransition'in div||'MsTransition'in div||'OTransition'in div);})(),classList:(function(){'use strict';var div=document.createElement('div').style;return'classList'in div;})()},browser:{ie8:(function(){'use strict';var rv=-1;if(navigator.appName==='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp(/MSIE ([0-9]{1,}[\.0-9]{0,})/);if(re.exec(ua)!==null)
rv=parseFloat(RegExp.$1);}
return rv!==-1&&rv<9;})(),ie10:window.navigator.msPointerEnabled,ie11:window.navigator.pointerEnabled}};if(window.jQuery||window.Zepto){(function($){'use strict';$.fn.swiper=function(params){var s=new Swiper($(this)[0],params);$(this).data('swiper',s);return s;};})(window.jQuery||window.Zepto);}
if(typeof(module)!=='undefined'){module.exports=Swiper;}
if(typeof define==='function'&&define.amd){define([],function(){'use strict';return Swiper;});}
(function($,window,document,undefined){var $window=$(window);$.fn.lazyload=function(options){var elements=this;var $container;var settings={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:window,data_attribute:"src",skip_invisible:true,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};function update(){var counter=0;elements.each(function(){var $this=$(this);if(settings.skip_invisible&&!$this.is(":visible")){return;}
if($.abovethetop(this,settings)||$.leftofbegin(this,settings)){}else if(!$.belowthefold(this,settings)&&!$.rightoffold(this,settings)){$this.trigger("appear");counter=0;}else{if(++counter>settings.failure_limit){return false;}}});}
if(options){if(undefined!==options.failurelimit){options.failure_limit=options.failurelimit;delete options.failurelimit;}
if(undefined!==options.effectspeed){options.effect_speed=options.effectspeed;delete options.effectspeed;}
$.extend(settings,options);}
$container=(settings.container===undefined||settings.container===window)?$window:$(settings.container);if(0===settings.event.indexOf("scroll")){$container.bind(settings.event,function(){return update();});}
this.each(function(){var self=this;var $self=$(self);self.loaded=false;if($self.attr("src")===undefined||$self.attr("src")===false){if($self.is("img")){$self.attr("src",settings.placeholder);}}
$self.one("appear",function(){if(!this.loaded){if(settings.appear){var elements_left=elements.length;settings.appear.call(self,elements_left,settings);}
$("<img />").bind("load",function(){var original=$self.attr("data-"+settings.data_attribute);$self.hide();if($self.is("img")){$self.attr("src",original);}else{$self.css("background-image","url('"+original+"')");}
$self[settings.effect](settings.effect_speed);self.loaded=true;var temp=$.grep(elements,function(element){return!element.loaded;});elements=$(temp);if(settings.load){var elements_left=elements.length;settings.load.call(self,elements_left,settings);}}).attr("src",$self.attr("data-"+settings.data_attribute));}});if(0!==settings.event.indexOf("scroll")){$self.bind(settings.event,function(){if(!self.loaded){$self.trigger("appear");}});}});$window.bind("resize",function(){update();});if((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)){$window.bind("pageshow",function(event){if(event.originalEvent&&event.originalEvent.persisted){elements.each(function(){$(this).trigger("appear");});}});}
$(document).ready(function(){update();});return this;};$.belowthefold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=(window.innerHeight?window.innerHeight:$window.height())+$window.scrollTop();}else{fold=$(settings.container).offset().top+$(settings.container).height();}
return fold<=$(element).offset().top-settings.threshold;};$.rightoffold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.width()+$window.scrollLeft();}else{fold=$(settings.container).offset().left+$(settings.container).width();}
return fold<=$(element).offset().left-settings.threshold;};$.abovethetop=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.scrollTop();}else{fold=$(settings.container).offset().top;}
return fold>=$(element).offset().top+settings.threshold+$(element).height();};$.leftofbegin=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.scrollLeft();}else{fold=$(settings.container).offset().left;}
return fold>=$(element).offset().left+settings.threshold+$(element).width();};$.inviewport=function(element,settings){return!$.rightoffold(element,settings)&&!$.leftofbegin(element,settings)&&!$.belowthefold(element,settings)&&!$.abovethetop(element,settings);};$.extend($.expr[":"],{"below-the-fold":function(a){return $.belowthefold(a,{threshold:0});},"above-the-top":function(a){return!$.belowthefold(a,{threshold:0});},"right-of-screen":function(a){return $.rightoffold(a,{threshold:0});},"left-of-screen":function(a){return!$.rightoffold(a,{threshold:0});},"in-viewport":function(a){return $.inviewport(a,{threshold:0});},"above-the-fold":function(a){return!$.belowthefold(a,{threshold:0});},"right-of-fold":function(a){return $.rightoffold(a,{threshold:0});},"left-of-fold":function(a){return!$.rightoffold(a,{threshold:0});}});})(jQuery,window,document);$("img.lazy").lazyload();