/*
 * Bootstrap v3.1.1 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
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')
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.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},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.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.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')
this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal')
$.support.transition&&this.$element.hasClass('fade')?this.$element.one($.support.transition.end,$.proxy(this.hideModal,this)).emulateTransitionEnd(300):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 class="modal-backdrop '+animate+'" />').appendTo(document.body)
this.$element.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())
if($this.is('a'))e.preventDefault()
$target.modal(option,this).one('hide',function(){$this.is(':visible')&&$this.focus()})})
$(document).on('show.bs.modal','.modal',function(){$(document.body).addClass('modal-open')}).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);+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=$([])
this.activeTarget=null
this.refresh()
this.process()}
ScrollSpy.DEFAULTS={offset:10}
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(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){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}
$(window).on('load',function(){$('[data-spy="scroll"]').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')
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(e){e.fn.camera=function(t,n){function i(){if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)){return true}}function D(){var t=e(y).width();e("li",y).removeClass("camera_visThumb");e("li",y).each(function(){var n=e(this).position(),r=e("ul",y).outerWidth(),i=e("ul",y).offset().left,s=e("> div",y).offset().left,o=s-i;if(o>0){e(".camera_prevThumbs",J).removeClass("hideNav")}else{e(".camera_prevThumbs",J).addClass("hideNav")}if(r-o>t){e(".camera_nextThumbs",J).removeClass("hideNav")}else{e(".camera_nextThumbs",J).addClass("hideNav")}var u=n.left,a=n.left+e(this).width();if(a-o<=t&&u-o>=0){e(this).addClass("camera_visThumb")}})}function B(){function r(){b=s.width();if(t.height.indexOf("%")!=-1){var n=Math.round(b/(100/parseFloat(t.height)));if(t.minHeight!=""&&n<parseFloat(t.minHeight)){w=parseFloat(t.minHeight)}else{w=n}s.css({height:w})}else if(t.height=="auto"){w=s.height()}else{w=parseFloat(t.height);s.css({height:w})}e(".camerarelative",l).css({width:b,height:w});e(".imgLoaded",l).each(function(){var n=e(this),r=n.attr("width"),i=n.attr("height"),s=n.index(),o,u,a=n.attr("data-alignment"),f=n.attr("data-portrait");if(typeof a==="undefined"||a===false||a===""){a=t.alignment}if(typeof f==="undefined"||f===false||f===""){f=t.portrait}if(f==false||f=="false"){if(r/i<b/w){var l=b/r;var c=Math.abs(w-i*l)*.5;switch(a){case"topLeft":o=0;break;case"topCenter":o=0;break;case"topRight":o=0;break;case"centerLeft":o="-"+c+"px";break;case"center":o="-"+c+"px";break;case"centerRight":o="-"+c+"px";break;case"bottomLeft":o="-"+c*2+"px";break;case"bottomCenter":o="-"+c*2+"px";break;case"bottomRight":o="-"+c*2+"px";break}n.css({height:i*l,"margin-left":0,"margin-top":o,position:"absolute",visibility:"visible",width:b})}else{var l=w/i;var c=Math.abs(b-r*l)*.5;switch(a){case"topLeft":u=0;break;case"topCenter":u="-"+c+"px";break;case"topRight":u="-"+c*2+"px";break;case"centerLeft":u=0;break;case"center":u="-"+c+"px";break;case"centerRight":u="-"+c*2+"px";break;case"bottomLeft":u=0;break;case"bottomCenter":u="-"+c+"px";break;case"bottomRight":u="-"+c*2+"px";break}n.css({height:w,"margin-left":u,"margin-top":0,position:"absolute",visibility:"visible",width:r*l})}}else{if(r/i<b/w){var l=w/i;var c=Math.abs(b-r*l)*.5;switch(a){case"topLeft":u=0;break;case"topCenter":u=c+"px";break;case"topRight":u=c*2+"px";break;case"centerLeft":u=0;break;case"center":u=c+"px";break;case"centerRight":u=c*2+"px";break;case"bottomLeft":u=0;break;case"bottomCenter":u=c+"px";break;case"bottomRight":u=c*2+"px";break}n.css({height:w,"margin-left":u,"margin-top":0,position:"absolute",visibility:"visible",width:r*l})}else{var l=b/r;var c=Math.abs(w-i*l)*.5;switch(a){case"topLeft":o=0;break;case"topCenter":o=0;break;case"topRight":o=0;break;case"centerLeft":o=c+"px";break;case"center":o=c+"px";break;case"centerRight":o=c+"px";break;case"bottomLeft":o=c*2+"px";break;case"bottomCenter":o=c*2+"px";break;case"bottomRight":o=c*2+"px";break}n.css({height:i*l,"margin-left":0,"margin-top":o,position:"absolute",visibility:"visible",width:b})}}})}var n;if(P==true){clearTimeout(n);n=setTimeout(r,200)}else{r()}P=true}function Q(e){for(var t,n,r=e.length;r;t=parseInt(Math.random()*r),n=e[--r],e[r]=e[t],e[t]=n);return e}function G(e){return Math.ceil(e)==Math.floor(e)}function ut(){if(e(y).length&&!e(g).length){var t=e(y).outerWidth(),n=e("ul > li",y).outerWidth(),r=e("li.cameracurrent",y).length?e("li.cameracurrent",y).position():"",i=e("ul > li",y).length*e("ul > li",y).outerWidth(),o=e("ul",y).offset().left,u=e("> div",y).offset().left,a;if(o<0){a="-"+(u-o)}else{a=u-o}if(ot==true){e("ul",y).width(e("ul > li",y).length*e("ul > li",y).outerWidth());if(e(y).length&&!e(g).lenght){s.css({marginBottom:e(y).outerHeight()})}D();e("ul",y).width(e("ul > li",y).length*e("ul > li",y).outerWidth());if(e(y).length&&!e(g).lenght){s.css({marginBottom:e(y).outerHeight()})}}ot=false;var f=e("li.cameracurrent",y).length?r.left:"",l=e("li.cameracurrent",y).length?r.left+e("li.cameracurrent",y).outerWidth():"";if(f<e("li.cameracurrent",y).outerWidth()){f=0}if(l-a>t){if(f+t<i){e("ul",y).animate({"margin-left":"-"+f+"px"},500,D)}else{e("ul",y).animate({"margin-left":"-"+(e("ul",y).outerWidth()-t)+"px"},500,D)}}else if(f-a<0){e("ul",y).animate({"margin-left":"-"+f+"px"},500,D)}else{e("ul",y).css({"margin-left":"auto","margin-right":"auto"});setTimeout(D,100)}}}function at(){tt=0;var n=e(".camera_bar_cont",J).width(),r=e(".camera_bar_cont",J).height();if(u!="pie"){switch(V){case"leftToRight":e("#"+a).css({right:n});break;case"rightToLeft":e("#"+a).css({left:n});break;case"topToBottom":e("#"+a).css({bottom:r});break;case"bottomToTop":e("#"+a).css({top:r});break}}else{rt.clearRect(0,0,t.pieDiameter,t.pieDiameter)}}function ft(n){f.addClass("camerasliding");z=false;var r=parseFloat(e("div.cameraSlide.cameracurrent",l).index());if(n>0){var c=n-1}else if(r==k-1){var c=0}else{var c=r+1}var h=e(".cameraSlide:eq("+c+")",l);var p=e(".cameraSlide:eq("+(c+1)+")",l).addClass("cameranext");if(r!=c+1){p.hide()}e(".cameraContent",o).fadeOut(600);e(".camera_caption",o).show();e(".camerarelative",h).append(e("> div ",f).eq(c).find("> div.camera_effected"));e(".camera_target_content .cameraContent:eq("+c+")",s).append(e("> div ",f).eq(c).find("> div"));if(!e(".imgLoaded",h).length){var d=E[c];var v=new Image;v.src=d+"?"+(new Date).getTime();h.css("visibility","hidden");h.prepend(e(v).attr("class","imgLoaded").css("visibility","hidden"));var m,S;if(!e(v).get(0).complete||m=="0"||S=="0"||typeof m==="undefined"||m===false||typeof S==="undefined"||S===false){e(".camera_loader",s).delay(500).fadeIn(400);v.onload=function(){m=v.naturalWidth;S=v.naturalHeight;e(v).attr("data-alignment",N[c]).attr("data-portrait",T[c]);e(v).attr("width",m);e(v).attr("height",S);l.find(".cameraSlide_"+c).hide().css("visibility","visible");B();ft(c+1)}}}else{if(E.length>c+1&&!e(".imgLoaded",p).length){var x=E[c+1];var C=new Image;C.src=x+"?"+(new Date).getTime();p.prepend(e(C).attr("class","imgLoaded").css("visibility","hidden"));C.onload=function(){m=C.naturalWidth;S=C.naturalHeight;e(C).attr("data-alignment",N[c+1]).attr("data-portrait",T[c+1]);e(C).attr("width",m);e(C).attr("height",S);B()}}t.onLoaded.call(this);if(e(".camera_loader",s).is(":visible")){e(".camera_loader",s).fadeOut(400)}else{e(".camera_loader",s).css({visibility:"hidden"});e(".camera_loader",s).fadeOut(400,function(){e(".camera_loader",s).css({visibility:"visible"})})}var L=t.rows,A=t.cols,M=1,_=0,D,P,H,I,q,R=new Array("simpleFade","curtainTopLeft","curtainTopRight","curtainBottomLeft","curtainBottomRight","curtainSliceLeft","curtainSliceRight","blindCurtainTopLeft","blindCurtainTopRight","blindCurtainBottomLeft","blindCurtainBottomRight","blindCurtainSliceBottom","blindCurtainSliceTop","stampede","mosaic","mosaicReverse","mosaicRandom","mosaicSpiral","mosaicSpiralReverse","topLeftBottomRight","bottomRightTopLeft","bottomLeftTopRight","topRightBottomLeft","scrollLeft","scrollRight","scrollTop","scrollBottom","scrollHorz");marginLeft=0,marginTop=0,opacityOnGrid=0;if(t.opacityOnGrid==true){opacityOnGrid=0}else{opacityOnGrid=1}var U=e(" > div",f).eq(c).attr("data-fx");if(i()&&t.mobileFx!=""&&t.mobileFx!="default"){I=t.mobileFx}else{if(typeof U!=="undefined"&&U!==false&&U!=="default"){I=U}else{I=t.fx}}if(I=="random"){I=Q(R);I=I[0]}else{I=I;if(I.indexOf(",")>0){I=I.replace(/ /g,"");I=I.split(",");I=Q(I);I=I[0]}}dataEasing=e(" > div",f).eq(c).attr("data-easing");mobileEasing=e(" > div",f).eq(c).attr("data-mobileEasing");if(i()&&t.mobileEasing!=""&&t.mobileEasing!="default"){if(typeof mobileEasing!=="undefined"&&mobileEasing!==false&&mobileEasing!=="default"){q=mobileEasing}else{q=t.mobileEasing}}else{if(typeof dataEasing!=="undefined"&&dataEasing!==false&&dataEasing!=="default"){q=dataEasing}else{q=t.easing}}D=e(" > div",f).eq(c).attr("data-slideOn");if(typeof D!=="undefined"&&D!==false){X=D}else{if(t.slideOn=="random"){var X=new Array("next","prev");X=Q(X);X=X[0]}else{X=t.slideOn}}var G=e(" > div",f).eq(c).attr("data-time");if(typeof G!=="undefined"&&G!==false&&G!==""){P=parseFloat(G)}else{P=t.time}var Y=e(" > div",f).eq(c).attr("data-transPeriod");if(typeof Y!=="undefined"&&Y!==false&&Y!==""){H=parseFloat(Y)}else{H=t.transPeriod}if(!e(f).hasClass("camerastarted")){I="simpleFade";X="next";q="";H=400;e(f).addClass("camerastarted")}switch(I){case"simpleFade":A=1;L=1;break;case"curtainTopLeft":if(t.slicedCols==0){A=t.cols}else{A=t.slicedCols}L=1;break;case"curtainTopRight":if(t.slicedCols==0){A=t.cols}else{A=t.slicedCols}L=1;break;case"curtainBottomLeft":if(t.slicedCols==0){A=t.cols}else{A=t.slicedCols}L=1;break;case"curtainBottomRight":if(t.slicedCols==0){A=t.cols}else{A=t.slicedCols}L=1;break;case"curtainSliceLeft":if(t.slicedCols==0){A=t.cols}else{A=t.slicedCols}L=1;break;case"curtainSliceRight":if(t.slicedCols==0){A=t.cols}else{A=t.slicedCols}L=1;break;case"blindCurtainTopLeft":if(t.slicedRows==0){L=t.rows}else{L=t.slicedRows}A=1;break;case"blindCurtainTopRight":if(t.slicedRows==0){L=t.rows}else{L=t.slicedRows}A=1;break;case"blindCurtainBottomLeft":if(t.slicedRows==0){L=t.rows}else{L=t.slicedRows}A=1;break;case"blindCurtainBottomRight":if(t.slicedRows==0){L=t.rows}else{L=t.slicedRows}A=1;break;case"blindCurtainSliceTop":if(t.slicedRows==0){L=t.rows}else{L=t.slicedRows}A=1;break;case"blindCurtainSliceBottom":if(t.slicedRows==0){L=t.rows}else{L=t.slicedRows}A=1;break;case"stampede":_="-"+H;break;case"mosaic":_=t.gridDifference;break;case"mosaicReverse":_=t.gridDifference;break;case"mosaicRandom":break;case"mosaicSpiral":_=t.gridDifference;M=1.7;break;case"mosaicSpiralReverse":_=t.gridDifference;M=1.7;break;case"topLeftBottomRight":_=t.gridDifference;M=6;break;case"bottomRightTopLeft":_=t.gridDifference;M=6;break;case"bottomLeftTopRight":_=t.gridDifference;M=6;break;case"topRightBottomLeft":_=t.gridDifference;M=6;break;case"scrollLeft":A=1;L=1;break;case"scrollRight":A=1;L=1;break;case"scrollTop":A=1;L=1;break;case"scrollBottom":A=1;L=1;break;case"scrollHorz":A=1;L=1;break}var Z=0;var et=L*A;var it=b-Math.floor(b/A)*A;var st=w-Math.floor(w/L)*L;var ot;var lt;var ct=0;var ht=0;var pt=new Array;var dt=new Array;var vt=new Array;while(Z<et){pt.push(Z);dt.push(Z);O.append('<div class="cameraappended" style="display:none; overflow:hidden; position:absolute; z-index:1000" />');var mt=e(".cameraappended:eq("+Z+")",l);if(I=="scrollLeft"||I=="scrollRight"||I=="scrollTop"||I=="scrollBottom"||I=="scrollHorz"){W.eq(c).clone().show().appendTo(mt)}else{if(X=="next"){W.eq(c).clone().show().appendTo(mt)}else{W.eq(r).clone().show().appendTo(mt)}}if(Z%A<it){ot=1}else{ot=0}if(Z%A==0){ct=0}if(Math.floor(Z/A)<st){lt=1}else{lt=0}mt.css({height:Math.floor(w/L+lt+1),left:ct,top:ht,width:Math.floor(b/A+ot+1)});e("> .cameraSlide",mt).css({height:w,"margin-left":"-"+ct+"px","margin-top":"-"+ht+"px",width:b});ct=ct+mt.width()-1;if(Z%A==A-1){ht=ht+mt.height()-1}Z++}switch(I){case"curtainTopLeft":break;case"curtainBottomLeft":break;case"curtainSliceLeft":break;case"curtainTopRight":pt=pt.reverse();break;case"curtainBottomRight":pt=pt.reverse();break;case"curtainSliceRight":pt=pt.reverse();break;case"blindCurtainTopLeft":break;case"blindCurtainBottomLeft":pt=pt.reverse();break;case"blindCurtainSliceTop":break;case"blindCurtainTopRight":break;case"blindCurtainBottomRight":pt=pt.reverse();break;case"blindCurtainSliceBottom":pt=pt.reverse();break;case"stampede":pt=Q(pt);break;case"mosaic":break;case"mosaicReverse":pt=pt.reverse();break;case"mosaicRandom":pt=Q(pt);break;case"mosaicSpiral":var gt=L/2,yt,bt,wt,Et=0;for(wt=0;wt<gt;wt++){bt=wt;for(yt=wt;yt<A-wt-1;yt++){vt[Et++]=bt*A+yt}yt=A-wt-1;for(bt=wt;bt<L-wt-1;bt++){vt[Et++]=bt*A+yt}bt=L-wt-1;for(yt=A-wt-1;yt>wt;yt--){vt[Et++]=bt*A+yt}yt=wt;for(bt=L-wt-1;bt>wt;bt--){vt[Et++]=bt*A+yt}}pt=vt;break;case"mosaicSpiralReverse":var gt=L/2,yt,bt,wt,Et=et-1;for(wt=0;wt<gt;wt++){bt=wt;for(yt=wt;yt<A-wt-1;yt++){vt[Et--]=bt*A+yt}yt=A-wt-1;for(bt=wt;bt<L-wt-1;bt++){vt[Et--]=bt*A+yt}bt=L-wt-1;for(yt=A-wt-1;yt>wt;yt--){vt[Et--]=bt*A+yt}yt=wt;for(bt=L-wt-1;bt>wt;bt--){vt[Et--]=bt*A+yt}}pt=vt;break;case"topLeftBottomRight":for(var bt=0;bt<L;bt++)for(var yt=0;yt<A;yt++){vt.push(yt+bt)}dt=vt;break;case"bottomRightTopLeft":for(var bt=0;bt<L;bt++)for(var yt=0;yt<A;yt++){vt.push(yt+bt)}dt=vt.reverse();break;case"bottomLeftTopRight":for(var bt=L;bt>0;bt--)for(var yt=0;yt<A;yt++){vt.push(yt+bt)}dt=vt;break;case"topRightBottomLeft":for(var bt=0;bt<L;bt++)for(var yt=A;yt>0;yt--){vt.push(yt+bt)}dt=vt;break}e.each(pt,function(n,i){function d(){e(this).addClass("cameraeased");if(e(".cameraeased",l).length>=0){e(y).css({visibility:"visible"})}if(e(".cameraeased",l).length==et){ut();e(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom",o).each(function(){e(this).css("visibility","hidden")});W.eq(c).show().css("z-index","999").removeClass("cameranext").addClass("cameracurrent");W.eq(r).css("z-index","1").removeClass("cameracurrent");e(".cameraContent",o).eq(c).addClass("cameracurrent");if(r>=0){e(".cameraContent",o).eq(r).removeClass("cameracurrent")}t.onEndTransition.call(this);if(e("> div",f).eq(c).attr("data-video")!="hide"&&e(".cameraContent.cameracurrent .imgFake",o).length){e(".cameraContent.cameracurrent .imgFake",o).click()}var n=W.eq(c).find(".fadeIn").length;var i=e(".cameraContent",o).eq(c).find(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom").length;if(n!=0){e(".cameraSlide.cameracurrent .fadeIn",o).each(function(){if(e(this).attr("data-easing")!=""){var t=e(this).attr("data-easing")}else{var t=q}var r=e(this);if(typeof r.attr("data-outerWidth")==="undefined"||r.attr("data-outerWidth")===false||r.attr("data-outerWidth")===""){var i=r.outerWidth();r.attr("data-outerWidth",i)}else{var i=r.attr("data-outerWidth")}if(typeof r.attr("data-outerHeight")==="undefined"||r.attr("data-outerHeight")===false||r.attr("data-outerHeight")===""){var s=r.outerHeight();r.attr("data-outerHeight",s)}else{var s=r.attr("data-outerHeight")}var o=r.position();var u=o.left;var a=o.top;var f=r.attr("class");var l=r.index();var c=r.parents(".camerarelative").outerHeight();var h=r.parents(".camerarelative").outerWidth();if(f.indexOf("fadeIn")!=-1){r.animate({opacity:0},0).css("visibility","visible").delay(P/n*.1*(l-1)).animate({opacity:1},P/n*.15,t)}else{r.css("visibility","visible")}})}e(".cameraContent.cameracurrent",o).show();if(i!=0){e(".cameraContent.cameracurrent .moveFromLeft, .cameraContent.cameracurrent .moveFromRight, .cameraContent.cameracurrent .moveFromTop, .cameraContent.cameracurrent .moveFromBottom, .cameraContent.cameracurrent .fadeIn, .cameraContent.cameracurrent .fadeFromLeft, .cameraContent.cameracurrent .fadeFromRight, .cameraContent.cameracurrent .fadeFromTop, .cameraContent.cameracurrent .fadeFromBottom",o).each(function(){if(e(this).attr("data-easing")!=""){var t=e(this).attr("data-easing")}else{var t=q}var n=e(this);var r=n.position();var s=r.left;var o=r.top;var u=n.attr("class");var a=n.index();var f=n.outerHeight();if(u.indexOf("moveFromLeft")!=-1){n.css({left:"-"+b+"px",right:"auto"});n.css("visibility","visible").delay(P/i*.1*(a-1)).animate({left:r.left},P/i*.15,t)}else if(u.indexOf("moveFromRight")!=-1){n.css({left:b+"px",right:"auto"});n.css("visibility","visible").delay(P/i*.1*(a-1)).animate({left:r.left},P/i*.15,t)}else if(u.indexOf("moveFromTop")!=-1){n.css({top:"-"+w+"px",bottom:"auto"});n.css("visibility","visible").delay(P/i*.1*(a-1)).animate({top:r.top},P/i*.15,t,function(){n.css({top:"auto",bottom:0})})}else if(u.indexOf("moveFromBottom")!=-1){n.css({top:w+"px",bottom:"auto"});n.css("visibility","visible").delay(P/i*.1*(a-1)).animate({top:r.top},P/i*.15,t)}else if(u.indexOf("fadeFromLeft")!=-1){n.animate({opacity:0},0).css({left:"-"+b+"px",right:"auto"});n.css("visibility","visible").delay(P/i*.1*(a-1)).animate({left:r.left,opacity:1},P/i*.15,t)}else if(u.indexOf("fadeFromRight")!=-1){n.animate({opacity:0},0).css({left:b+"px",right:"auto"});n.css("visibility","visible").delay(P/i*.1*(a-1)).animate({left:r.left,opacity:1},P/i*.15,t)}else if(u.indexOf("fadeFromTop")!=-1){n.animate({opacity:0},0).css({top:"-"+w+"px",bottom:"auto"});n.css("visibility","visible").delay(P/i*.1*(a-1)).animate({top:r.top,opacity:1},P/i*.15,t,function(){n.css({top:"auto",bottom:0})})}else if(u.indexOf("fadeFromBottom")!=-1){n.animate({opacity:0},0).css({bottom:"-"+f+"px"});n.css("visibility","visible").delay(P/i*.1*(a-1)).animate({bottom:"0",opacity:1},P/i*.15,t)}else if(u.indexOf("fadeIn")!=-1){n.animate({opacity:0},0).css("visibility","visible").delay(P/i*.1*(a-1)).animate({opacity:1},P/i*.15,t)}else{n.css("visibility","visible")}})}e(".cameraappended",l).remove();f.removeClass("camerasliding");W.eq(r).hide();var s=e(".camera_bar_cont",J).width(),h=e(".camera_bar_cont",J).height(),d;if(u!="pie"){d=.05}else{d=.005}e("#"+a).animate({opacity:t.loaderOpacity},200);j=setInterval(function(){if(f.hasClass("stopped")){clearInterval(j)}if(u!="pie"){if(tt<=1.002&&!f.hasClass("stopped")&&!f.hasClass("paused")&&!f.hasClass("hovered")){tt=tt+d}else if(tt<=1&&(f.hasClass("stopped")||f.hasClass("paused")||f.hasClass("stopped")||f.hasClass("hovered"))){tt=tt}else{if(!f.hasClass("stopped")&&!f.hasClass("paused")&&!f.hasClass("hovered")){clearInterval(j);K();e("#"+a).animate({opacity:0},200,function(){clearTimeout(F);F=setTimeout(at,p);ft();t.onStartLoading.call(this)})}}switch(V){case"leftToRight":e("#"+a).animate({right:s-s*tt},P*d,"linear");break;case"rightToLeft":e("#"+a).animate({left:s-s*tt},P*d,"linear");break;case"topToBottom":e("#"+a).animate({bottom:h-h*tt},P*d,"linear");break;case"bottomToTop":e("#"+a).animate({bottom:h-h*tt},P*d,"linear");break}}else{nt=tt;rt.clearRect(0,0,t.pieDiameter,t.pieDiameter);rt.globalCompositeOperation="destination-over";rt.beginPath();rt.arc(t.pieDiameter/2,t.pieDiameter/2,t.pieDiameter/2-t.loaderStroke,0,Math.PI*2,false);rt.lineWidth=t.loaderStroke;rt.strokeStyle=t.loaderBgColor;rt.stroke();rt.closePath();rt.globalCompositeOperation="source-over";rt.beginPath();rt.arc(t.pieDiameter/2,t.pieDiameter/2,t.pieDiameter/2-t.loaderStroke,0,Math.PI*2*nt,false);rt.lineWidth=t.loaderStroke-t.loaderPadding*2;rt.strokeStyle=t.loaderColor;rt.stroke();rt.closePath();if(tt<=1.002&&!f.hasClass("stopped")&&!f.hasClass("paused")&&!f.hasClass("hovered")){tt=tt+d}else if(tt<=1&&(f.hasClass("stopped")||f.hasClass("paused")||f.hasClass("hovered"))){tt=tt}else{if(!f.hasClass("stopped")&&!f.hasClass("paused")&&!f.hasClass("hovered")){clearInterval(j);K();e("#"+a+", .camera_canvas_wrap",J).animate({opacity:0},200,function(){clearTimeout(F);F=setTimeout(at,p);ft();t.onStartLoading.call(this)})}}}},P*d)}}if(i%A<it){ot=1}else{ot=0}if(i%A==0){ct=0}if(Math.floor(i/A)<st){lt=1}else{lt=0}switch(I){case"simpleFade":height=w;width=b;opacityOnGrid=0;break;case"curtainTopLeft":height=0,width=Math.floor(b/A+ot+1),marginTop="-"+Math.floor(w/L+lt+1)+"px";break;case"curtainTopRight":height=0,width=Math.floor(b/A+ot+1),marginTop="-"+Math.floor(w/L+lt+1)+"px";break;case"curtainBottomLeft":height=0,width=Math.floor(b/A+ot+1),marginTop=Math.floor(w/L+lt+1)+"px";break;case"curtainBottomRight":height=0,width=Math.floor(b/A+ot+1),marginTop=Math.floor(w/L+lt+1)+"px";break;case"curtainSliceLeft":height=0,width=Math.floor(b/A+ot+1);if(i%2==0){marginTop=Math.floor(w/L+lt+1)+"px"}else{marginTop="-"+Math.floor(w/L+lt+1)+"px"}break;case"curtainSliceRight":height=0,width=Math.floor(b/A+ot+1);if(i%2==0){marginTop=Math.floor(w/L+lt+1)+"px"}else{marginTop="-"+Math.floor(w/L+lt+1)+"px"}break;case"blindCurtainTopLeft":height=Math.floor(w/L+lt+1),width=0,marginLeft="-"+Math.floor(b/A+ot+1)+"px";break;case"blindCurtainTopRight":height=Math.floor(w/L+lt+1),width=0,marginLeft=Math.floor(b/A+ot+1)+"px";break;case"blindCurtainBottomLeft":height=Math.floor(w/L+lt+1),width=0,marginLeft="-"+Math.floor(b/A+ot+1)+"px";break;case"blindCurtainBottomRight":height=Math.floor(w/L+lt+1),width=0,marginLeft=Math.floor(b/A+ot+1)+"px";break;case"blindCurtainSliceBottom":height=Math.floor(w/L+lt+1),width=0;if(i%2==0){marginLeft="-"+Math.floor(b/A+ot+1)+"px"}else{marginLeft=Math.floor(b/A+ot+1)+"px"}break;case"blindCurtainSliceTop":height=Math.floor(w/L+lt+1),width=0;if(i%2==0){marginLeft="-"+Math.floor(b/A+ot+1)+"px"}else{marginLeft=Math.floor(b/A+ot+1)+"px"}break;case"stampede":height=0;width=0;marginLeft=b*.2*(n%A-(A-Math.floor(A/2)))+"px";marginTop=w*.2*(Math.floor(n/A)+1-(L-Math.floor(L/2)))+"px";break;case"mosaic":height=0;width=0;break;case"mosaicReverse":height=0;width=0;marginLeft=Math.floor(b/A+ot+1)+"px";marginTop=Math.floor(w/L+lt+1)+"px";break;case"mosaicRandom":height=0;width=0;marginLeft=Math.floor(b/A+ot+1)*.5+"px";marginTop=Math.floor(w/L+lt+1)*.5+"px";break;case"mosaicSpiral":height=0;width=0;marginLeft=Math.floor(b/A+ot+1)*.5+"px";marginTop=Math.floor(w/L+lt+1)*.5+"px";break;case"mosaicSpiralReverse":height=0;width=0;marginLeft=Math.floor(b/A+ot+1)*.5+"px";marginTop=Math.floor(w/L+lt+1)*.5+"px";break;case"topLeftBottomRight":height=0;width=0;break;case"bottomRightTopLeft":height=0;width=0;marginLeft=Math.floor(b/A+ot+1)+"px";marginTop=Math.floor(w/L+lt+1)+"px";break;case"bottomLeftTopRight":height=0;width=0;marginLeft=0;marginTop=Math.floor(w/L+lt+1)+"px";break;case"topRightBottomLeft":height=0;width=0;marginLeft=Math.floor(b/A+ot+1)+"px";marginTop=0;break;case"scrollRight":height=w;width=b;marginLeft=-b;break;case"scrollLeft":height=w;width=b;marginLeft=b;break;case"scrollTop":height=w;width=b;marginTop=w;break;case"scrollBottom":height=w;width=b;marginTop=-w;break;case"scrollHorz":height=w;width=b;if(r==0&&c==k-1){marginLeft=-b}else if(r<c||r==k-1&&c==0){marginLeft=b}else{marginLeft=-b}break}var h=e(".cameraappended:eq("+i+")",l);if(typeof j!=="undefined"){clearInterval(j);clearTimeout(F);F=setTimeout(at,H+_)}if(e(g).length){e(".camera_pag li",s).removeClass("cameracurrent");e(".camera_pag li",s).eq(c).addClass("cameracurrent")}if(e(y).length){e("li",y).removeClass("cameracurrent");e("li",y).eq(c).addClass("cameracurrent");e("li",y).not(".cameracurrent").find("img").animate({opacity:.5},0);e("li.cameracurrent img",y).animate({opacity:1},0);e("li",y).hover(function(){e("img",this).stop(true,false).animate({opacity:1},150)},function(){if(!e(this).hasClass("cameracurrent")){e("img",this).stop(true,false).animate({opacity:.5},150)}})}var p=parseFloat(H)+parseFloat(_);if(I=="scrollLeft"||I=="scrollRight"||I=="scrollTop"||I=="scrollBottom"||I=="scrollHorz"){t.onStartTransition.call(this);p=0;h.delay((H+_)/et*dt[n]*M*.5).css({display:"block",height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width}).animate({height:Math.floor(w/L+lt+1),"margin-top":0,"margin-left":0,width:Math.floor(b/A+ot+1)},H-_,q,d);W.eq(r).delay((H+_)/et*dt[n]*M*.5).animate({"margin-left":marginLeft*-1,"margin-top":marginTop*-1},H-_,q,function(){e(this).css({"margin-top":0,"margin-left":0})})}else{t.onStartTransition.call(this);p=parseFloat(H)+parseFloat(_);if(X=="next"){h.delay((H+_)/et*dt[n]*M*.5).css({display:"block",height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width,opacity:opacityOnGrid}).animate({height:Math.floor(w/L+lt+1),"margin-top":0,"margin-left":0,opacity:1,width:Math.floor(b/A+ot+1)},H-_,q,d)}else{W.eq(c).show().css("z-index","999").addClass("cameracurrent");W.eq(r).css("z-index","1").removeClass("cameracurrent");e(".cameraContent",o).eq(c).addClass("cameracurrent");e(".cameraContent",o).eq(r).removeClass("cameracurrent");h.delay((H+_)/et*dt[n]*M*.5).css({display:"block",height:Math.floor(w/L+lt+1),"margin-top":0,"margin-left":0,opacity:1,width:Math.floor(b/A+ot+1)}).animate({height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width,opacity:opacityOnGrid},H-_,q,d)}}})}}var r={alignment:"center",autoAdvance:true,mobileAutoAdvance:true,barDirection:"leftToRight",barPosition:"bottom",cols:6,easing:"easeInOutExpo",mobileEasing:"",fx:"random",mobileFx:"",gridDifference:250,height:"50%",imagePath:"images/",hover:true,loader:"pie",loaderColor:"#eeeeee",loaderBgColor:"#222222",loaderOpacity:.8,loaderPadding:2,loaderStroke:7,minHeight:"200px",navigation:true,navigationHover:true,mobileNavHover:true,opacityOnGrid:false,overlayer:true,pagination:true,playPause:true,pauseOnClick:true,pieDiameter:38,piePosition:"rightTop",portrait:false,rows:4,slicedCols:12,slicedRows:8,slideOn:"random",thumbnails:false,time:7e3,transPeriod:1500,onEndTransition:function(){},onLoaded:function(){},onStartLoading:function(){},onStartTransition:function(){}};var t=e.extend({},r,t);var s=e(this).addClass("camera_wrap");s.wrapInner('<div class="camera_src" />').wrapInner('<div class="camera_fakehover" />');var o=e(".camera_fakehover",s);o.append('<div class="camera_target"></div>');if(t.overlayer==true){o.append('<div class="camera_overlayer"></div>')}o.append('<div class="camera_target_content"></div>');var u;u=t.loader;if(u=="pie"){o.append('<div class="camera_pie"></div>')}else if(u=="bar"){o.append('<div class="camera_bar"></div>')}else{o.append('<div class="camera_bar" style="display:none"></div>')}if(t.playPause==true){o.append('<div class="camera_commands"></div>')}if(t.navigation==true){o.append('<div class="camera_prev"><span></span></div>').append('<div class="camera_next"><span></span></div>')}if(t.thumbnails==true){s.append('<div class="camera_thumbs_cont" />')}if(t.thumbnails==true&&t.pagination!=true){e(".camera_thumbs_cont",s).wrap("<div />").wrap('<div class="camera_thumbs" />').wrap("<div />").wrap('<div class="camera_command_wrap" />')}if(t.pagination==true){s.append('<div class="camera_pag"></div>')}s.append('<div class="camera_loader"></div>');e(".camera_caption",s).each(function(){e(this).wrapInner("<div />")});var a="pie_"+s.index(),f=e(".camera_src",s),l=e(".camera_target",s),c=e(".camera_target_content",s),h=e(".camera_pie",s),p=e(".camera_bar",s),d=e(".camera_prev",s),v=e(".camera_next",s),m=e(".camera_commands",s),g=e(".camera_pag",s),y=e(".camera_thumbs_cont",s);var b,w;var E=new Array;e("> div",f).each(function(){E.push(e(this).attr("data-src"))});var S=new Array;e("> div",f).each(function(){if(e(this).attr("data-link")){S.push(e(this).attr("data-link"))}else{S.push("")}});var x=new Array;e("> div",f).each(function(){if(e(this).attr("data-target")){x.push(e(this).attr("data-target"))}else{x.push("")}});var T=new Array;e("> div",f).each(function(){if(e(this).attr("data-portrait")){T.push(e(this).attr("data-portrait"))}else{T.push("")}});var N=new Array;e("> div",f).each(function(){if(e(this).attr("data-alignment")){N.push(e(this).attr("data-alignment"))}else{N.push("")}});var C=new Array;e("> div",f).each(function(){if(e(this).attr("data-thumb")){C.push(e(this).attr("data-thumb"))}else{C.push("")}});var k=E.length;e(c).append('<div class="cameraContents" />');var L;for(L=0;L<k;L++){e(".cameraContents",c).append('<div class="cameraContent" />');if(S[L]!=""){var A=e("> div ",f).eq(L).attr("data-box");if(typeof A!=="undefined"&&A!==false&&A!=""){A='data-box="'+e("> div ",f).eq(L).attr("data-box")+'"'}else{A=""}e(".camera_target_content .cameraContent:eq("+L+")",s).append('<a class="camera_link" href="'+S[L]+'" '+A+' target="'+x[L]+'"></a>')}}e(".camera_caption",s).each(function(){var t=e(this).parent().index(),n=s.find(".cameraContent").eq(t);e(this).appendTo(n)});l.append('<div class="cameraCont" />');var O=e(".cameraCont",s);var M;for(M=0;M<k;M++){O.append('<div class="cameraSlide cameraSlide_'+M+'" />');var _=e("> div:eq("+M+")",f);l.find(".cameraSlide_"+M).clone(_)}e(window).bind("load resize pageshow",function(){ut();D()});O.append('<div class="cameraSlide cameraSlide_'+M+'" />');var P;s.show();var b=l.width();var w=l.height();var H;e(window).bind("resize pageshow",function(){if(P==true){B()}e("ul",y).animate({"margin-top":0},0,ut);if(!f.hasClass("paused")){f.addClass("paused");if(e(".camera_stop",J).length){e(".camera_stop",J).hide();e(".camera_play",J).show();if(u!="none"){e("#"+a).hide()}}else{if(u!="none"){e("#"+a).hide()}}clearTimeout(H);H=setTimeout(function(){f.removeClass("paused");if(e(".camera_play",J).length){e(".camera_play",J).hide();e(".camera_stop",J).show();if(u!="none"){e("#"+a).fadeIn()}}else{if(u!="none"){e("#"+a).fadeIn()}}},1500)}});var j,F;var I,q,R,m,g;var U,z;if(i()&&t.mobileAutoAdvance!=""){q=t.mobileAutoAdvance}else{q=t.autoAdvance}if(q==false){f.addClass("paused")}if(i()&&t.mobileNavHover!=""){R=t.mobileNavHover}else{R=t.navigationHover}if(f.length!=0){var W=e(".cameraSlide",l);W.wrapInner('<div class="camerarelative" />');var X;var V=t.barDirection;var J=s;e("iframe",o).each(function(){var t=e(this);var n=t.attr("src");t.attr("data-src",n);var r=t.parent().index(".camera_src > div");e(".camera_target_content .cameraContent:eq("+r+")",s).append(t)});function K(){e("iframe",o).each(function(){e(".camera_caption",o).show();var n=e(this);var r=n.attr("data-src");n.attr("src",r);var i=t.imagePath+"blank.gif";var u=new Image;u.src=i;if(t.height.indexOf("%")!=-1){var a=Math.round(b/(100/parseFloat(t.height)));if(t.minHeight!=""&&a<parseFloat(t.minHeight)){w=parseFloat(t.minHeight)}else{w=a}}else if(t.height=="auto"){w=s.height()}else{w=parseFloat(t.height)}n.after(e(u).attr({"class":"imgFake",width:b,height:w}));var f=n.clone();n.remove();e(u).bind("click",function(){if(e(this).css("position")=="absolute"){e(this).remove();if(r.indexOf("vimeo")!=-1||r.indexOf("youtube")!=-1){if(r.indexOf("?")!=-1){autoplay="&autoplay=1"}else{autoplay="?autoplay=1"}}else if(r.indexOf("dailymotion")!=-1){if(r.indexOf("?")!=-1){autoplay="&autoPlay=1"}else{autoplay="?autoPlay=1"}}f.attr("src",r+autoplay);z=true}else{e(this).css({position:"absolute",top:0,left:0,zIndex:10}).after(f);f.css({position:"absolute",top:0,left:0,zIndex:9})}})})}K();if(t.hover==true){if(!i()){o.hover(function(){f.addClass("hovered")},function(){f.removeClass("hovered")})}}if(R==true){e(d,s).animate({opacity:0},0);e(v,s).animate({opacity:0},0);e(m,s).animate({opacity:0},0);if(i()){o.on("vmouseover",function(){e(d,s).animate({opacity:1},200);e(v,s).animate({opacity:1},200);e(m,s).animate({opacity:1},200)});o.on("vmouseout",function(){e(d,s).delay(500).animate({opacity:0},200);e(v,s).delay(500).animate({opacity:0},200);e(m,s).delay(500).animate({opacity:0},200)})}else{o.hover(function(){e(d,s).animate({opacity:1},200);e(v,s).animate({opacity:1},200);e(m,s).animate({opacity:1},200)},function(){e(d,s).animate({opacity:0},200);e(v,s).animate({opacity:0},200);e(m,s).animate({opacity:0},200)})}}e(".camera_stop",J).on("click",function(){q=false;f.addClass("paused");if(e(".camera_stop",J).length){e(".camera_stop",J).hide();e(".camera_play",J).show();if(u!="none"){e("#"+a).hide()}}else{if(u!="none"){e("#"+a).hide()}}});e(".camera_play",J).on("click",function(){q=true;f.removeClass("paused");if(e(".camera_play",J).length){e(".camera_play",J).hide();e(".camera_stop",J).show();if(u!="none"){e("#"+a).show()}}else{if(u!="none"){e("#"+a).show()}}});if(t.pauseOnClick==true){e(".camera_target_content",o).mouseup(function(){q=false;f.addClass("paused");e(".camera_stop",J).hide();e(".camera_play",J).show();e("#"+a).hide()})}e(".cameraContent, .imgFake",o).hover(function(){U=true},function(){U=false});e(".cameraContent, .imgFake",o).bind("click",function(){if(z==true&&U==true){q=false;e(".camera_caption",o).hide();f.addClass("paused");e(".camera_stop",J).hide();e(".camera_play",J).show();e("#"+a).hide()}})}if(u!="pie"){p.append('<span class="camera_bar_cont" />');e(".camera_bar_cont",p).animate({opacity:t.loaderOpacity},0).css({position:"absolute",left:0,right:0,top:0,bottom:0,"background-color":t.loaderBgColor}).append('<span id="'+a+'" />');e("#"+a).animate({opacity:0},0);var Y=e("#"+a);Y.css({position:"absolute","background-color":t.loaderColor});switch(t.barPosition){case"left":p.css({right:"auto",width:t.loaderStroke});break;case"right":p.css({left:"auto",width:t.loaderStroke});break;case"top":p.css({bottom:"auto",height:t.loaderStroke});break;case"bottom":p.css({top:"auto",height:t.loaderStroke});break}switch(V){case"leftToRight":Y.css({left:0,right:0,top:t.loaderPadding,bottom:t.loaderPadding});break;case"rightToLeft":Y.css({left:0,right:0,top:t.loaderPadding,bottom:t.loaderPadding});break;case"topToBottom":Y.css({left:t.loaderPadding,right:t.loaderPadding,top:0,bottom:0});break;case"bottomToTop":Y.css({left:t.loaderPadding,right:t.loaderPadding,top:0,bottom:0});break}}else{h.append('<canvas id="'+a+'"></canvas>');var Z;var Y=document.getElementById(a);Y.setAttribute("width",t.pieDiameter);Y.setAttribute("height",t.pieDiameter);var et;switch(t.piePosition){case"leftTop":et="left:0; top:0;";break;case"rightTop":et="right:0; top:0;";break;case"leftBottom":et="left:0; bottom:0;";break;case"rightBottom":et="right:0; bottom:0;";break}Y.setAttribute("style","position:absolute; z-index:1002; "+et);var tt;var nt;if(Y&&Y.getContext){var rt=Y.getContext("2d");rt.rotate(Math.PI*(3/2));rt.translate(-t.pieDiameter,0)}}if(u=="none"||q==false){e("#"+a).hide();e(".camera_canvas_wrap",J).hide()}if(e(g).length){e(g).append('<ul class="camera_pag_ul" />');var it;for(it=0;it<k;it++){e(".camera_pag_ul",s).append('<li class="pag_nav_'+it+'" style="position:relative; z-index:1002"><span><span>'+it+"</span></span></li>")}e(".camera_pag_ul li",s).hover(function(){e(this).addClass("camera_hover");if(e(".camera_thumb",this).length){var t=e(".camera_thumb",this).outerWidth(),n=e(".camera_thumb",this).outerHeight(),r=e(this).outerWidth();e(".camera_thumb",this).show().css({top:"-"+n+"px",left:"-"+(t-r)/2+"px"}).animate({opacity:1,"margin-top":"-3px"},200);e(".thumb_arrow",this).show().animate({opacity:1,"margin-top":"-3px"},200)}},function(){e(this).removeClass("camera_hover");e(".camera_thumb",this).animate({"margin-top":"-20px",opacity:0},200,function(){e(this).css({marginTop:"5px"}).hide()});e(".thumb_arrow",this).animate({"margin-top":"-20px",opacity:0},200,function(){e(this).css({marginTop:"5px"}).hide()})})}if(e(y).length){var st;if(!e(g).length){e(y).append("<div />");e(y).before('<div class="camera_prevThumbs hideNav"><div></div></div>').before('<div class="camera_nextThumbs hideNav"><div></div></div>');e("> div",y).append("<ul />");e.each(C,function(t,n){if(e("> div",f).eq(t).attr("data-thumb")!=""){var r=e("> div",f).eq(t).attr("data-thumb"),i=new Image;i.src=r;e("ul",y).append('<li class="pix_thumb pix_thumb_'+t+'" />');e("li.pix_thumb_"+t,y).append(e(i).attr("class","camera_thumb"))}})}else{e.each(C,function(t,n){if(e("> div",f).eq(t).attr("data-thumb")!=""){var r=e("> div",f).eq(t).attr("data-thumb"),i=new Image;i.src=r;e("li.pag_nav_"+t,g).append(e(i).attr("class","camera_thumb").css({position:"absolute"}).animate({opacity:0},0));e("li.pag_nav_"+t+" > img",g).after('<div class="thumb_arrow" />');e("li.pag_nav_"+t+" > .thumb_arrow",g).animate({opacity:0},0)}});s.css({marginBottom:e(g).outerHeight()})}}else if(!e(y).length&&e(g).length){s.css({marginBottom:e(g).outerHeight()})}var ot=true;if(e(m).length){e(m).append('<div class="camera_play"></div>').append('<div class="camera_stop"></div>');if(q==true){e(".camera_play",J).hide();e(".camera_stop",J).show()}else{e(".camera_stop",J).hide();e(".camera_play",J).show()}}at();e(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom",o).each(function(){e(this).css("visibility","hidden")});t.onStartLoading.call(this);ft();if(e(d).length){e(d).click(function(){if(!f.hasClass("camerasliding")){var n=parseFloat(e(".cameraSlide.cameracurrent",l).index());clearInterval(j);K();e("#"+a+", .camera_canvas_wrap",s).animate({opacity:0},0);at();if(n!=0){ft(n)}else{ft(k)}t.onStartLoading.call(this)}})}if(e(v).length){e(v).click(function(){if(!f.hasClass("camerasliding")){var n=parseFloat(e(".cameraSlide.cameracurrent",l).index());clearInterval(j);K();e("#"+a+", .camera_canvas_wrap",J).animate({opacity:0},0);at();if(n==k-1){ft(1)}else{ft(n+2)}t.onStartLoading.call(this)}})}if(i()){o.bind("swipeleft",function(n){if(!f.hasClass("camerasliding")){var r=parseFloat(e(".cameraSlide.cameracurrent",l).index());clearInterval(j);K();e("#"+a+", .camera_canvas_wrap",J).animate({opacity:0},0);at();if(r==k-1){ft(1)}else{ft(r+2)}t.onStartLoading.call(this)}});o.bind("swiperight",function(n){if(!f.hasClass("camerasliding")){var r=parseFloat(e(".cameraSlide.cameracurrent",l).index());clearInterval(j);K();e("#"+a+", .camera_canvas_wrap",J).animate({opacity:0},0);at();if(r!=0){ft(r)}else{ft(k)}t.onStartLoading.call(this)}})}if(e(g).length){e(".camera_pag li",s).click(function(){if(!f.hasClass("camerasliding")){var n=parseFloat(e(this).index());var r=parseFloat(e(".cameraSlide.cameracurrent",l).index());if(n!=r){clearInterval(j);K();e("#"+a+", .camera_canvas_wrap",J).animate({opacity:0},0);at();ft(n+1);t.onStartLoading.call(this)}}})}if(e(y).length){e(".pix_thumb img",y).click(function(){if(!f.hasClass("camerasliding")){var n=parseFloat(e(this).parents("li").index());var r=parseFloat(e(".cameracurrent",l).index());if(n!=r){clearInterval(j);K();e("#"+a+", .camera_canvas_wrap",J).animate({opacity:0},0);e(".pix_thumb",y).removeClass("cameracurrent");e(this).parents("li").addClass("cameracurrent");at();ft(n+1);ut();t.onStartLoading.call(this)}}});e(".camera_thumbs_cont .camera_prevThumbs",J).hover(function(){e(this).stop(true,false).animate({opacity:1},250)},function(){e(this).stop(true,false).animate({opacity:.7},250)});e(".camera_prevThumbs",J).click(function(){var t=0,n=e(y).outerWidth(),r=e("ul",y).offset().left,i=e("> div",y).offset().left,s=i-r;e(".camera_visThumb",y).each(function(){var n=e(this).outerWidth();t=t+n});if(s-t>0){e("ul",y).animate({"margin-left":"-"+(s-t)+"px"},500,D)}else{e("ul",y).animate({"margin-left":0},500,D)}});e(".camera_thumbs_cont .camera_nextThumbs",J).hover(function(){e(this).stop(true,false).animate({opacity:1},250)},function(){e(this).stop(true,false).animate({opacity:.7},250)});e(".camera_nextThumbs",J).click(function(){var t=0,n=e(y).outerWidth(),r=e("ul",y).outerWidth(),i=e("ul",y).offset().left,s=e("> div",y).offset().left,o=s-i;e(".camera_visThumb",y).each(function(){var n=e(this).outerWidth();t=t+n});if(o+t+t<r){e("ul",y).animate({"margin-left":"-"+(o+t)+"px"},500,D)}else{e("ul",y).animate({"margin-left":"-"+(r-n)+"px"},500,D)}})}}})(jQuery);(function(e){e.fn.cameraStop=function(){var t=e(this),n=e(".camera_src",t),r="pie_"+t.index();n.addClass("stopped");if(e(".camera_showcommands").length){var i=e(".camera_thumbs_wrap",t)}else{var i=t}}})(jQuery);(function(e){e.fn.cameraPause=function(){var t=e(this);var n=e(".camera_src",t);n.addClass("paused")}})(jQuery);(function(e){e.fn.cameraResume=function(){var t=e(this);var n=e(".camera_src",t);if(typeof autoAdv==="undefined"||autoAdv!==true){n.removeClass("paused")}}})(jQuery)
jQuery.fn.exists=function(){return this.length>0;}
function showhide(id){if(document.getElementById(id).style.display=='none'){document.getElementById(id).style.display='block';}else{fv
document.getElementById(id).style.display='none';}}
function show(id){document.getElementById(id).style.display='block';}
function hide(id){document.getElementById(id).style.display='none';}
function popUp(URL){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=350,left = 376,top = 132');");}
function disableButton(button){if(document.all||document.getElementById)
button.disabled=true;else if(button){button.oldOnClick=button.onclick;button.onclick=null;button.oldValue=button.value;button.value='DISABLED';}}
function retrieveData(id){document.getElementById(id).innerHTML="<img src='/interface/imgs/loading.gif' width='80' height='10' border='0' alt='' />";document.getElementById("bridgeFrame").src="/catalogo/getinfo.php?id="+id;document.getElementById("cube"+id).innerHTML="<a href='javascript: fecha("+id+");'><img src='/interface/imgs/iminus.gif' border='0' alt='' /></a>";}
function innerbrowse(obj,id,file){document.getElementById(id).innerHTML="<img src='/interface/imgs/loading.gif' width='80' height='10' border='0' alt='' />";document.getElementById("bridgeFrame").src=file+"&selected="+obj.value;}
function iframeCallback(doc,id){myData=doc.getElementById("mydata");document.getElementById(id).innerHTML=myData.innerHTML;}
function fecha(id){document.getElementById(id).innerHTML="";document.getElementById("cube"+id).innerHTML="<a href='javascript: retrieveData("+id+");'><img src='/interface/imgs/iplus.gif' border='0' alt='' /></a>";}
function updateDiv(div,text){var obj=document.getElementById(div);obj.innerHTML=text;}
$(function(){function onResize(){var largura=$(window).width();if(largura<980){$("body").addClass("redux");$(".fale-connosco-up").addClass("none");$(".fale-connosco-down").removeClass("none");}else{$("body").removeClass("redux");}
if(largura<770){$("body").addClass("medium");$(".fale-connosco-up").addClass("none");$(".fale-connosco-down").removeClass("none");}else{$("body").removeClass("medium");}
if(largura<660){$("body").addClass("small");$(".fale-connosco-up").addClass("none");$(".fale-connosco-down").removeClass("none");}else{$("body").removeClass("small");}
if(largura<660){$("html").addClass("html-mobile");$("body").addClass("mobile");$("#pagina-interior > div").removeClass("content-struct-left");$("#pagina-interior > div").removeClass("content-struct-right");$("#template_inicial > div").removeClass("content-struct-left");$("#template_inicial > div").removeClass("content-struct-right");$(".fale-connosco-down").removeClass("none");$(".fale-connosco-up").addClass("none");if($(".lingua_selecionada").html()=="PT"){$("#header-video").html("<img src='/interface/imgs/ac_pt.gif' alt=''>");}
if($(".lingua_selecionada").html()=="EN"){$("#header-video").html("<img src='/interface/imgs/ac_en.gif' alt=''>");}}else{$("body").removeClass("mobile");$("html").removeClass("html-mobile");}}
$(window).bind('resize',onResize);onResize();});$(document).ready(function(){if($("#slides").size()>0){$("#slides").camera({height:'360px',time:3500,pagination:true,thumbnails:false,navigation:false,playPause:false,hover:true,opacityOnGrid:false,loader:"none"});}
if($("#template_inicial").size()>0){}
if($(".list_article_wrapper").size()>0){$('.layout_one').last().css("border-width","0");$('.layout_two').last().css("border-width","0");}
if($(".represetacoes").size()>0){$('.represetacoes:nth-child(3n+2)').addClass("thirdrow");$('.represetacoes:nth-child(3n+1)').addClass("secondrow");}
if($(".main-menu").size()>0){$('.main-menu li:nth-child(1)').addClass("curtumes");$('.main-menu li li:nth-child(1)').removeClass("curtumes");$('.main-menu li:nth-child(2)').addClass("enologia");$('.main-menu li li:nth-child(2)').removeClass("enologia");$('.main-menu li:nth-child(3)').addClass("textil");$('.main-menu li li:nth-child(3)').removeClass("textil");$('.main-menu li:nth-child(4)').addClass("farmaceutica");$('.main-menu li li:nth-child(4)').removeClass("farmaceutica");$('.main-menu li:nth-child(5)').addClass("alimentar");$('.main-menu li li:nth-child(5)').removeClass("alimentar");$('.main-menu li:nth-child(6)').addClass("tintas");$('.main-menu li li:nth-child(6)').removeClass("tintas");$('.main-menu li:nth-child(7)').addClass("ceramica");$('.main-menu li li:nth-child(7)').removeClass("ceramica");$('.main-menu li:last-child').addClass("cortica");$('.main-menu li li:last-child').removeClass("cortica");}
if($("#mega-menu-prods").size()>0){$('#mega-menu-prods > li').prepend("<div class='menu-line'></div>");$('#mega-menu-prods > li:nth-child(1)').addClass("mega-menu-curtumes");$('#mega-menu-prods > li:nth-child(2)').addClass("mega-menu-enologia");$('#mega-menu-prods > li:nth-child(3)').addClass("mega-menu-textil");$('#mega-menu-prods > li:nth-child(4)').addClass("mega-menu-farmaceutica");$('#mega-menu-prods > li:nth-child(5)').addClass("mega-menu-alimentar");$('#mega-menu-prods > li:nth-child(6)').addClass("mega-menu-tintas");$('#mega-menu-prods > li:nth-child(7)').addClass("mega-menu-ceramica");$('#mega-menu-prods > li:last-child').addClass("mega-menu-cortica");$("#mega-menu-prods ul ul").remove();$("#mega-menu-prods ul").addClass("navg");$("#mega-menu-prods ul").parent("li").addClass("seta");$("#mega-menu-prods li").has("ul").hover(function(){$(this).addClass("selected").children("ul").fadeIn('100');},function(){$(this).removeClass("selected").children("ul").stop(true,true).css("display","none");});}
if($(".curtumes.on").size()>0){$('.content-wrap-txt-prods').addClass("curtumes-txt");}
if($(".enologia.on").size()>0){$('.content-wrap-txt-prods').addClass("enologia-txt");}
if($(".textil.on").size()>0){$('.content-wrap-txt-prods').addClass("textil-txt");}
if($(".farmaceutica.on").size()>0){$('.content-wrap-txt-prods').addClass("farmaceutica-txt");}
if($(".alimentar.on").size()>0){$('.content-wrap-txt-prods').addClass("alimentar-txt");}
if($(".tintas.on").size()>0){$('.content-wrap-txt-prods').addClass("tintas-txt");}
if($(".ceramica.on").size()>0){$('.content-wrap-txt-prods').addClass("ceramica-txt");}
if($(".cortica.on").size()>0){$('.content-wrap-txt-prods').addClass("cortica-txt");}
if($("#product-list").size()>0){$('#product-list tr:odd').addClass("table-odd");}
if($(".mobile").size()>0){$('#logo_img').remove();$('#logo_img_mobile').addClass('show');}
$('.fancybox').fancybox();$(".fancybox-button").fancybox({prevEffect:'none',nextEffect:'none',closeBtn:false,helpers:{title:{type:'inside'},buttons:{}}});$(".various").fancybox({maxWidth:800,maxHeight:600,fitToView:false,width:'70%',height:'70%',autoSize:false,closeClick:false,openEffect:'none',closeEffect:'none'});$('.fancybox-media').fancybox({openEffect:'none',closeEffect:'none',helpers:{media:{}}});if($(".read-more").exists()){var lang=$(".lon").text();if(lang=="EN"){$(".read-more").text("READ MORE »");}}
if($("#search-form").exists()){$("#search-form").submit(function(event){event.preventDefault();var valor=$("#search-input-name").val();window.location="/search/byproduct/&search="+valor;});}
if($(".lingua_selecionada").html()=="EN"){$(".noticia-destaque-tit > span").html("FOCUS / ");}
if($(".sispage").exists()){$(".sispage").each(function(index){var numElements=4;var indexElement=index+1;var regExpInteger=/^[0-90]*$/;var lastItem=indexElement/numElements;if(regExpInteger.test(lastItem)){$(this).addClass("last-col");}});}
$("form .input input").bind({focusin:function(){if($(this).attr("name")=="username"&&$("#username").val()=="Utilizador"){$("#username").val("");}
if($(this).attr("name")=="passwd"&&$("#passwd").val()=="Password"){$("#passwd").val("");}
if($(this).attr("name")=="nome"&&$("#n_nome").val()=="Nome"){$("#n_nome").val("");}
if($(this).attr("name")=="email"&&$("#n_email").val()=="E-mail"){$("#n_email").val("");}},focusout:function(){if($(this).attr("name")=="username"&&($("#username").val()==""||$("#username").val()==" ")){$("#username").val("Utilizador");}
if($(this).attr("name")=="passwd"&&($("#passwd").val()==""||$("#passwd").val()==" ")){$("#passwd").val("Password");}
if($(this).attr("name")=="nome"&&($("#n_nome").val()==""||$("#n_nome").val()==" ")){$("#n_nome").val("Nome");}
if($(this).attr("name")=="email"&&($("#n_email").val()=="E-mail"||$("#n_nome").val()==" ")){$("#n_email").val("E-mail");}}});if($(".prod-list").exists()&&$("#letter-selector").exists()){var char="";var previousChar="";var html_letter_selector="";var html_replace="";var num_prods=$(".prod-list").size();num_prods=num_prods-1;$(".prod-list").each(function(index){var real_char=$(this).attr("rel");char=$(this).attr("rel");if(char=="AA"){char="A";}
if(char!=previousChar){if(previousChar!=""){html_replace+='</div>';}
html_replace+='<div id="char-'+real_char+'">';$(this).attr("id","char-"+char);html_letter_selector=$("#letter-selector").html();if($("#letter-selector > a").attr("href")=="#char-"+char){}else{html_letter_selector=html_letter_selector.replace(char,"<a href='#char-"+char+"'>"+char+"</a>");$("#letter-selector").html(html_letter_selector);}}
html_replace+='<div rel="'+real_char+'" class="prod-list">'+$(this).html()+"</div>";if(num_prods==index){html_replace+="</div>";}
previousChar=char;});$(".listagem-produtos").html(html_replace);if($("#char-AA").exists()&&($(".listagem-produtos > div").size()>1)){var html_char_AA=$("#char-AA").html();$("#char-AA").remove();if($("#char-A").exists()){$('<div id="char-AA">'+html_char_AA+'</div>').insertAfter("#char-A");}else{$('<div id="char-AA">'+html_char_AA+'</div>').insertBefore($(".listagem-produtos > div").first());}}}
$("#letter-selector > a").on("click",function(){var element_show=$(this).attr("href");var extra_char="";if(element_show=="#char-A"){extra_char="#char-AA"}
$(".listagem-produtos > div").css("display","none");$(".listagem-produtos "+element_show).css("display","block");if(extra_char!=""){$(".listagem-produtos "+extra_char).css("display","block");}});$(".external-link").on("click",function(){var href=$(this).attr("href");window.open(href);return false;});if($("a.shopcart").size()>0){if($("#old_url").html()!=""){var oldUrl=$("#old_url").html();var pos=oldUrl.search("search=");if(pos!=-1){oldUrl="javascript: history.back();"}
$("a.shopcart").attr("href",oldUrl);}}
$(".prods-rel").click(function(){var content="";if($(this).next(".prod-list-rel").size()>0){content=$(this).next(".prod-list-rel").html();$('#prodsRelModal .modal-body').html(content);$('#prodsRelModal').modal('show');}});$(".add-prod-rel").on("click",function(){var href=$(this).attr("href");var qtd=$(this).parents(".prod-rel").find(".input-qtd").val();var add_param="";if(qtd>0){add_param="&qtd="+qtd;}
window.location.href=href+add_param;return false;});if($("#contacts-wrap").size()>0){$(".content-wrap").addClass("vertical-top");}
if($(".mobile").length>0){$("#menu-mobile").click(function(){$("#simple-mobile-menu").slideToggle('slow');});}else{$('#simple-mobile-menu').remove();}
if($("#video-historia").size()>0){var video=videojs("video-historia",{"loop":true,"autoplay":true,"preload":"auto"});video.on("ended",function(){this.play();video.play();video.currentTime(0);video.posterImage.show();});var myVideo=document.getElementById('video-historia_html5_api');if(typeof myVideo.loop=='boolean'){myVideo.loop=true;}else{myVideo.on('ended',function(){this.currentTime=0;this.play();},false);}
myVideo.play();}
if($("#template_inicial").size()>0){$("html").css("background","#fff");$("html").css("background-image","none");$("body").css("background","#fff");$("body").css("background-image","none");$(".grey-background").css("background","#fff");$(".content-struct-right").css("background","#fff");$("#footer").addClass("colormewhite");}
$("#contacts-wrap").sibling(".form-submit-button").addClass("contact-form-26-button");});$(document).ready(function(){if($(".prod-list").size()>0){$('.prod-list:odd').addClass("odd");}});jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});
/*
 * fancyBox - jQuery Plugin
 * version: 2.1.5 (Fri, 14 Jun 2013)
 * @requires jQuery v1.6 or later
 *
 * Examples at http://fancyapps.com/fancybox/
 * License: www.fancyapps.com/fancybox/#license
 *
 * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
 *
 */
(function(window,document,$,undefined){"use strict";var H=$("html"),W=$(window),D=$(document),F=$.fancybox=function(){F.open.apply(this,arguments);},IE=navigator.userAgent.match(/msie/i),didUpdate=null,isTouch=document.createTouch!==undefined,isQuery=function(obj){return obj&&obj.hasOwnProperty&&obj instanceof $;},isString=function(str){return str&&$.type(str)==="string";},isPercentage=function(str){return isString(str)&&str.indexOf('%')>0;},isScrollable=function(el){return(el&&!(el.style.overflow&&el.style.overflow==='hidden')&&((el.clientWidth&&el.scrollWidth>el.clientWidth)||(el.clientHeight&&el.scrollHeight>el.clientHeight)));},getScalar=function(orig,dim){var value=parseInt(orig,10)||0;if(dim&&isPercentage(orig)){value=F.getViewport()[dim]/100*value;}
return Math.ceil(value);},getValue=function(value,dim){return getScalar(value,dim)+'px';};$.extend(F,{version:'2.1.5',defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:true,autoHeight:false,autoWidth:false,autoResize:true,autoCenter:!isTouch,fitToView:true,aspectRatio:false,topRatio:0.5,leftRatio:0.5,scrolling:'auto',wrapCSS:'',arrows:true,closeBtn:true,closeClick:false,nextClick:false,mouseWheel:true,autoPlay:false,playSpeed:3000,preload:3,modal:false,loop:true,ajax:{dataType:'html',headers:{'X-fancyBox':true}},iframe:{scrolling:'auto',preload:true},swf:{wmode:'transparent',allowfullscreen:'true',allowscriptaccess:'always'},keys:{next:{13:'left',34:'up',39:'left',40:'up'},prev:{8:'right',33:'down',37:'right',38:'down'},close:[27],play:[32],toggle:[70]},direction:{next:'left',prev:'right'},scrollOutside:true,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(IE?' allowtransparency="true"':'')+'></iframe>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:'fade',openSpeed:250,openEasing:'swing',openOpacity:true,openMethod:'zoomIn',closeEffect:'fade',closeSpeed:250,closeEasing:'swing',closeOpacity:true,closeMethod:'zoomOut',nextEffect:'elastic',nextSpeed:250,nextEasing:'swing',nextMethod:'changeIn',prevEffect:'elastic',prevSpeed:250,prevEasing:'swing',prevMethod:'changeOut',helpers:{overlay:true,title:true},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeChange:$.noop,beforeClose:$.noop,afterClose:$.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:false,isOpen:false,isOpened:false,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:false},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(group,opts){if(!group){return;}
if(!$.isPlainObject(opts)){opts={};}
if(false===F.close(true)){return;}
if(!$.isArray(group)){group=isQuery(group)?$(group).get():[group];}
$.each(group,function(i,element){var obj={},href,title,content,type,rez,hrefParts,selector;if($.type(element)==="object"){if(element.nodeType){element=$(element);}
if(isQuery(element)){obj={href:element.data('fancybox-href')||element.attr('href'),title:element.data('fancybox-title')||element.attr('title'),isDom:true,element:element};if($.metadata){$.extend(true,obj,element.metadata());}}else{obj=element;}}
href=opts.href||obj.href||(isString(element)?element:null);title=opts.title!==undefined?opts.title:obj.title||'';content=opts.content||obj.content;type=content?'html':(opts.type||obj.type);if(!type&&obj.isDom){type=element.data('fancybox-type');if(!type){rez=element.prop('class').match(/fancybox\.(\w+)/);type=rez?rez[1]:null;}}
if(isString(href)){if(!type){if(F.isImage(href)){type='image';}else if(F.isSWF(href)){type='swf';}else if(href.charAt(0)==='#'){type='inline';}else if(isString(element)){type='html';content=element;}}
if(type==='ajax'){hrefParts=href.split(/\s+/,2);href=hrefParts.shift();selector=hrefParts.shift();}}
if(!content){if(type==='inline'){if(href){content=$(isString(href)?href.replace(/.*(?=#[^\s]+$)/,''):href);}else if(obj.isDom){content=element;}}else if(type==='html'){content=href;}else if(!type&&!href&&obj.isDom){type='inline';content=element;}}
$.extend(obj,{href:href,type:type,content:content,title:title,selector:selector});group[i]=obj;});F.opts=$.extend(true,{},F.defaults,opts);if(opts.keys!==undefined){F.opts.keys=opts.keys?$.extend({},F.defaults.keys,opts.keys):false;}
F.group=group;return F._start(F.opts.index);},cancel:function(){var coming=F.coming;if(!coming||false===F.trigger('onCancel')){return;}
F.hideLoading();if(F.ajaxLoad){F.ajaxLoad.abort();}
F.ajaxLoad=null;if(F.imgPreload){F.imgPreload.onload=F.imgPreload.onerror=null;}
if(coming.wrap){coming.wrap.stop(true,true).trigger('onReset').remove();}
F.coming=null;if(!F.current){F._afterZoomOut(coming);}},close:function(event){F.cancel();if(false===F.trigger('beforeClose')){return;}
F.unbindEvents();if(!F.isActive){return;}
if(!F.isOpen||event===true){$('.fancybox-wrap').stop(true).trigger('onReset').remove();F._afterZoomOut();}else{F.isOpen=F.isOpened=false;F.isClosing=true;$('.fancybox-item, .fancybox-nav').remove();F.wrap.stop(true,true).removeClass('fancybox-opened');F.transitions[F.current.closeMethod]();}},play:function(action){var clear=function(){clearTimeout(F.player.timer);},set=function(){clear();if(F.current&&F.player.isActive){F.player.timer=setTimeout(F.next,F.current.playSpeed);}},stop=function(){clear();D.unbind('.player');F.player.isActive=false;F.trigger('onPlayEnd');},start=function(){if(F.current&&(F.current.loop||F.current.index<F.group.length-1)){F.player.isActive=true;D.bind({'onCancel.player beforeClose.player':stop,'onUpdate.player':set,'beforeLoad.player':clear});set();F.trigger('onPlayStart');}};if(action===true||(!F.player.isActive&&action!==false)){start();}else{stop();}},next:function(direction){var current=F.current;if(current){if(!isString(direction)){direction=current.direction.next;}
F.jumpto(current.index+1,direction,'next');}},prev:function(direction){var current=F.current;if(current){if(!isString(direction)){direction=current.direction.prev;}
F.jumpto(current.index-1,direction,'prev');}},jumpto:function(index,direction,router){var current=F.current;if(!current){return;}
index=getScalar(index);F.direction=direction||current.direction[(index>=current.index?'next':'prev')];F.router=router||'jumpto';if(current.loop){if(index<0){index=current.group.length+(index%current.group.length);}
index=index%current.group.length;}
if(current.group[index]!==undefined){F.cancel();F._start(index);}},reposition:function(e,onlyAbsolute){var current=F.current,wrap=current?current.wrap:null,pos;if(wrap){pos=F._getPosition(onlyAbsolute);if(e&&e.type==='scroll'){delete pos.position;wrap.stop(true,true).animate(pos,200);}else{wrap.css(pos);current.pos=$.extend({},current.dim,pos);}}},update:function(e){var type=(e&&e.type),anyway=!type||type==='orientationchange';if(anyway){clearTimeout(didUpdate);didUpdate=null;}
if(!F.isOpen||didUpdate){return;}
didUpdate=setTimeout(function(){var current=F.current;if(!current||F.isClosing){return;}
F.wrap.removeClass('fancybox-tmp');if(anyway||type==='load'||(type==='resize'&&current.autoResize)){F._setDimension();}
if(!(type==='scroll'&&current.canShrink)){F.reposition(e);}
F.trigger('onUpdate');didUpdate=null;},(anyway&&!isTouch?0:300));},toggle:function(action){if(F.isOpen){F.current.fitToView=$.type(action)==="boolean"?action:!F.current.fitToView;if(isTouch){F.wrap.removeAttr('style').addClass('fancybox-tmp');F.trigger('onUpdate');}
F.update();}},hideLoading:function(){D.unbind('.loading');$('#fancybox-loading').remove();},showLoading:function(){var el,viewport;F.hideLoading();el=$('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');D.bind('keydown.loading',function(e){if((e.which||e.keyCode)===27){e.preventDefault();F.cancel();}});if(!F.defaults.fixed){viewport=F.getViewport();el.css({position:'absolute',top:(viewport.h*0.5)+viewport.y,left:(viewport.w*0.5)+viewport.x});}},getViewport:function(){var locked=(F.current&&F.current.locked)||false,rez={x:W.scrollLeft(),y:W.scrollTop()};if(locked){rez.w=locked[0].clientWidth;rez.h=locked[0].clientHeight;}else{rez.w=isTouch&&window.innerWidth?window.innerWidth:W.width();rez.h=isTouch&&window.innerHeight?window.innerHeight:W.height();}
return rez;},unbindEvents:function(){if(F.wrap&&isQuery(F.wrap)){F.wrap.unbind('.fb');}
D.unbind('.fb');W.unbind('.fb');},bindEvents:function(){var current=F.current,keys;if(!current){return;}
W.bind('orientationchange.fb'+(isTouch?'':' resize.fb')+(current.autoCenter&&!current.locked?' scroll.fb':''),F.update);keys=current.keys;if(keys){D.bind('keydown.fb',function(e){var code=e.which||e.keyCode,target=e.target||e.srcElement;if(code===27&&F.coming){return false;}
if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey&&!(target&&(target.type||$(target).is('[contenteditable]')))){$.each(keys,function(i,val){if(current.group.length>1&&val[code]!==undefined){F[i](val[code]);e.preventDefault();return false;}
if($.inArray(code,val)>-1){F[i]();e.preventDefault();return false;}});}});}
if($.fn.mousewheel&&current.mouseWheel){F.wrap.bind('mousewheel.fb',function(e,delta,deltaX,deltaY){var target=e.target||null,parent=$(target),canScroll=false;while(parent.length){if(canScroll||parent.is('.fancybox-skin')||parent.is('.fancybox-wrap')){break;}
canScroll=isScrollable(parent[0]);parent=$(parent).parent();}
if(delta!==0&&!canScroll){if(F.group.length>1&&!current.canShrink){if(deltaY>0||deltaX>0){F.prev(deltaY>0?'down':'left');}else if(deltaY<0||deltaX<0){F.next(deltaY<0?'up':'right');}
e.preventDefault();}}});}},trigger:function(event,o){var ret,obj=o||F.coming||F.current;if(!obj){return;}
if($.isFunction(obj[event])){ret=obj[event].apply(obj,Array.prototype.slice.call(arguments,1));}
if(ret===false){return false;}
if(obj.helpers){$.each(obj.helpers,function(helper,opts){if(opts&&F.helpers[helper]&&$.isFunction(F.helpers[helper][event])){F.helpers[helper][event]($.extend(true,{},F.helpers[helper].defaults,opts),obj);}});}
D.trigger(event);},isImage:function(str){return isString(str)&&str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);},isSWF:function(str){return isString(str)&&str.match(/\.(swf)((\?|#).*)?$/i);},_start:function(index){var coming={},obj,href,type,margin,padding;index=getScalar(index);obj=F.group[index]||null;if(!obj){return false;}
coming=$.extend(true,{},F.opts,obj);margin=coming.margin;padding=coming.padding;if($.type(margin)==='number'){coming.margin=[margin,margin,margin,margin];}
if($.type(padding)==='number'){coming.padding=[padding,padding,padding,padding];}
if(coming.modal){$.extend(true,coming,{closeBtn:false,closeClick:false,nextClick:false,arrows:false,mouseWheel:false,keys:null,helpers:{overlay:{closeClick:false}}});}
if(coming.autoSize){coming.autoWidth=coming.autoHeight=true;}
if(coming.width==='auto'){coming.autoWidth=true;}
if(coming.height==='auto'){coming.autoHeight=true;}
coming.group=F.group;coming.index=index;F.coming=coming;if(false===F.trigger('beforeLoad')){F.coming=null;return;}
type=coming.type;href=coming.href;if(!type){F.coming=null;if(F.current&&F.router&&F.router!=='jumpto'){F.current.index=index;return F[F.router](F.direction);}
return false;}
F.isActive=true;if(type==='image'||type==='swf'){coming.autoHeight=coming.autoWidth=false;coming.scrolling='visible';}
if(type==='image'){coming.aspectRatio=true;}
if(type==='iframe'&&isTouch){coming.scrolling='scroll';}
coming.wrap=$(coming.tpl.wrap).addClass('fancybox-'+(isTouch?'mobile':'desktop')+' fancybox-type-'+type+' fancybox-tmp '+coming.wrapCSS).appendTo(coming.parent||'body');$.extend(coming,{skin:$('.fancybox-skin',coming.wrap),outer:$('.fancybox-outer',coming.wrap),inner:$('.fancybox-inner',coming.wrap)});$.each(["Top","Right","Bottom","Left"],function(i,v){coming.skin.css('padding'+v,getValue(coming.padding[i]));});F.trigger('onReady');if(type==='inline'||type==='html'){if(!coming.content||!coming.content.length){return F._error('content');}}else if(!href){return F._error('href');}
if(type==='image'){F._loadImage();}else if(type==='ajax'){F._loadAjax();}else if(type==='iframe'){F._loadIframe();}else{F._afterLoad();}},_error:function(type){$.extend(F.coming,{type:'html',autoWidth:true,autoHeight:true,minWidth:0,minHeight:0,scrolling:'no',hasError:type,content:F.coming.tpl.error});F._afterLoad();},_loadImage:function(){var img=F.imgPreload=new Image();img.onload=function(){this.onload=this.onerror=null;F.coming.width=this.width/F.opts.pixelRatio;F.coming.height=this.height/F.opts.pixelRatio;F._afterLoad();};img.onerror=function(){this.onload=this.onerror=null;F._error('image');};img.src=F.coming.href;if(img.complete!==true){F.showLoading();}},_loadAjax:function(){var coming=F.coming;F.showLoading();F.ajaxLoad=$.ajax($.extend({},coming.ajax,{url:coming.href,error:function(jqXHR,textStatus){if(F.coming&&textStatus!=='abort'){F._error('ajax',jqXHR);}else{F.hideLoading();}},success:function(data,textStatus){if(textStatus==='success'){coming.content=data;F._afterLoad();}}}));},_loadIframe:function(){var coming=F.coming,iframe=$(coming.tpl.iframe.replace(/\{rnd\}/g,new Date().getTime())).attr('scrolling',isTouch?'auto':coming.iframe.scrolling).attr('src',coming.href);$(coming.wrap).bind('onReset',function(){try{$(this).find('iframe').hide().attr('src','//about:blank').end().empty();}catch(e){}});if(coming.iframe.preload){F.showLoading();iframe.one('load',function(){$(this).data('ready',1);if(!isTouch){$(this).bind('load.fb',F.update);}
$(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();F._afterLoad();});}
coming.content=iframe.appendTo(coming.inner);if(!coming.iframe.preload){F._afterLoad();}},_preloadImages:function(){var group=F.group,current=F.current,len=group.length,cnt=current.preload?Math.min(current.preload,len-1):0,item,i;for(i=1;i<=cnt;i+=1){item=group[(current.index+i)%len];if(item.type==='image'&&item.href){new Image().src=item.href;}}},_afterLoad:function(){var coming=F.coming,previous=F.current,placeholder='fancybox-placeholder',current,content,type,scrolling,href,embed;F.hideLoading();if(!coming||F.isActive===false){return;}
if(false===F.trigger('afterLoad',coming,previous)){coming.wrap.stop(true).trigger('onReset').remove();F.coming=null;return;}
if(previous){F.trigger('beforeChange',previous);previous.wrap.stop(true).removeClass('fancybox-opened').find('.fancybox-item, .fancybox-nav').remove();}
F.unbindEvents();current=coming;content=coming.content;type=coming.type;scrolling=coming.scrolling;$.extend(F,{wrap:current.wrap,skin:current.skin,outer:current.outer,inner:current.inner,current:current,previous:previous});href=current.href;switch(type){case'inline':case'ajax':case'html':if(current.selector){content=$('<div>').html(content).find(current.selector);}else if(isQuery(content)){if(!content.data(placeholder)){content.data(placeholder,$('<div class="'+placeholder+'"></div>').insertAfter(content).hide());}
content=content.show().detach();current.wrap.bind('onReset',function(){if($(this).find(content).length){content.hide().replaceAll(content.data(placeholder)).data(placeholder,false);}});}
break;case'image':content=current.tpl.image.replace('{href}',href);break;case'swf':content='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+href+'"></param>';embed='';$.each(current.swf,function(name,val){content+='<param name="'+name+'" value="'+val+'"></param>';embed+=' '+name+'="'+val+'"';});content+='<embed src="'+href+'" type="application/x-shockwave-flash" width="100%" height="100%"'+embed+'></embed></object>';break;}
if(!(isQuery(content)&&content.parent().is(current.inner))){current.inner.append(content);}
F.trigger('beforeShow');current.inner.css('overflow',scrolling==='yes'?'scroll':(scrolling==='no'?'hidden':scrolling));F._setDimension();F.reposition();F.isOpen=false;F.coming=null;F.bindEvents();if(!F.isOpened){$('.fancybox-wrap').not(current.wrap).stop(true).trigger('onReset').remove();}else if(previous.prevMethod){F.transitions[previous.prevMethod]();}
F.transitions[F.isOpened?current.nextMethod:current.openMethod]();F._preloadImages();},_setDimension:function(){var viewport=F.getViewport(),steps=0,canShrink=false,canExpand=false,wrap=F.wrap,skin=F.skin,inner=F.inner,current=F.current,width=current.width,height=current.height,minWidth=current.minWidth,minHeight=current.minHeight,maxWidth=current.maxWidth,maxHeight=current.maxHeight,scrolling=current.scrolling,scrollOut=current.scrollOutside?current.scrollbarWidth:0,margin=current.margin,wMargin=getScalar(margin[1]+margin[3]),hMargin=getScalar(margin[0]+margin[2]),wPadding,hPadding,wSpace,hSpace,origWidth,origHeight,origMaxWidth,origMaxHeight,ratio,width_,height_,maxWidth_,maxHeight_,iframe,body;wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');wPadding=getScalar(skin.outerWidth(true)-skin.width());hPadding=getScalar(skin.outerHeight(true)-skin.height());wSpace=wMargin+wPadding;hSpace=hMargin+hPadding;origWidth=isPercentage(width)?(viewport.w-wSpace)*getScalar(width)/100:width;origHeight=isPercentage(height)?(viewport.h-hSpace)*getScalar(height)/100:height;if(current.type==='iframe'){iframe=current.content;if(current.autoHeight&&iframe.data('ready')===1){try{if(iframe[0].contentWindow.document.location){inner.width(origWidth).height(9999);body=iframe.contents().find('body');if(scrollOut){body.css('overflow-x','hidden');}
origHeight=body.outerHeight(true);}}catch(e){}}}else if(current.autoWidth||current.autoHeight){inner.addClass('fancybox-tmp');if(!current.autoWidth){inner.width(origWidth);}
if(!current.autoHeight){inner.height(origHeight);}
if(current.autoWidth){origWidth=inner.width();}
if(current.autoHeight){origHeight=inner.height();}
inner.removeClass('fancybox-tmp');}
width=getScalar(origWidth);height=getScalar(origHeight);ratio=origWidth/origHeight;minWidth=getScalar(isPercentage(minWidth)?getScalar(minWidth,'w')-wSpace:minWidth);maxWidth=getScalar(isPercentage(maxWidth)?getScalar(maxWidth,'w')-wSpace:maxWidth);minHeight=getScalar(isPercentage(minHeight)?getScalar(minHeight,'h')-hSpace:minHeight);maxHeight=getScalar(isPercentage(maxHeight)?getScalar(maxHeight,'h')-hSpace:maxHeight);origMaxWidth=maxWidth;origMaxHeight=maxHeight;if(current.fitToView){maxWidth=Math.min(viewport.w-wSpace,maxWidth);maxHeight=Math.min(viewport.h-hSpace,maxHeight);}
maxWidth_=viewport.w-wMargin;maxHeight_=viewport.h-hMargin;if(current.aspectRatio){if(width>maxWidth){width=maxWidth;height=getScalar(width/ratio);}
if(height>maxHeight){height=maxHeight;width=getScalar(height*ratio);}
if(width<minWidth){width=minWidth;height=getScalar(width/ratio);}
if(height<minHeight){height=minHeight;width=getScalar(height*ratio);}}else{width=Math.max(minWidth,Math.min(width,maxWidth));if(current.autoHeight&&current.type!=='iframe'){inner.width(width);height=inner.height();}
height=Math.max(minHeight,Math.min(height,maxHeight));}
if(current.fitToView){inner.width(width).height(height);wrap.width(width+wPadding);width_=wrap.width();height_=wrap.height();if(current.aspectRatio){while((width_>maxWidth_||height_>maxHeight_)&&width>minWidth&&height>minHeight){if(steps++>19){break;}
height=Math.max(minHeight,Math.min(maxHeight,height-10));width=getScalar(height*ratio);if(width<minWidth){width=minWidth;height=getScalar(width/ratio);}
if(width>maxWidth){width=maxWidth;height=getScalar(width/ratio);}
inner.width(width).height(height);wrap.width(width+wPadding);width_=wrap.width();height_=wrap.height();}}else{width=Math.max(minWidth,Math.min(width,width-(width_-maxWidth_)));height=Math.max(minHeight,Math.min(height,height-(height_-maxHeight_)));}}
if(scrollOut&&scrolling==='auto'&&height<origHeight&&(width+wPadding+scrollOut)<maxWidth_){width+=scrollOut;}
inner.width(width).height(height);wrap.width(width+wPadding);width_=wrap.width();height_=wrap.height();canShrink=(width_>maxWidth_||height_>maxHeight_)&&width>minWidth&&height>minHeight;canExpand=current.aspectRatio?(width<origMaxWidth&&height<origMaxHeight&&width<origWidth&&height<origHeight):((width<origMaxWidth||height<origMaxHeight)&&(width<origWidth||height<origHeight));$.extend(current,{dim:{width:getValue(width_),height:getValue(height_)},origWidth:origWidth,origHeight:origHeight,canShrink:canShrink,canExpand:canExpand,wPadding:wPadding,hPadding:hPadding,wrapSpace:height_-skin.outerHeight(true),skinSpace:skin.height()-height});if(!iframe&&current.autoHeight&&height>minHeight&&height<maxHeight&&!canExpand){inner.height('auto');}},_getPosition:function(onlyAbsolute){var current=F.current,viewport=F.getViewport(),margin=current.margin,width=F.wrap.width()+margin[1]+margin[3],height=F.wrap.height()+margin[0]+margin[2],rez={position:'absolute',top:margin[0],left:margin[3]};if(current.autoCenter&&current.fixed&&!onlyAbsolute&&height<=viewport.h&&width<=viewport.w){rez.position='fixed';}else if(!current.locked){rez.top+=viewport.y;rez.left+=viewport.x;}
rez.top=getValue(Math.max(rez.top,rez.top+((viewport.h-height)*current.topRatio)));rez.left=getValue(Math.max(rez.left,rez.left+((viewport.w-width)*current.leftRatio)));return rez;},_afterZoomIn:function(){var current=F.current;if(!current){return;}
F.isOpen=F.isOpened=true;F.wrap.css('overflow','visible').addClass('fancybox-opened');F.update();if(current.closeClick||(current.nextClick&&F.group.length>1)){F.inner.css('cursor','pointer').bind('click.fb',function(e){if(!$(e.target).is('a')&&!$(e.target).parent().is('a')){e.preventDefault();F[current.closeClick?'close':'next']();}});}
if(current.closeBtn){$(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb',function(e){e.preventDefault();F.close();});}
if(current.arrows&&F.group.length>1){if(current.loop||current.index>0){$(current.tpl.prev).appendTo(F.outer).bind('click.fb',F.prev);}
if(current.loop||current.index<F.group.length-1){$(current.tpl.next).appendTo(F.outer).bind('click.fb',F.next);}}
F.trigger('afterShow');if(!current.loop&&current.index===current.group.length-1){F.play(false);}else if(F.opts.autoPlay&&!F.player.isActive){F.opts.autoPlay=false;F.play();}},_afterZoomOut:function(obj){obj=obj||F.current;$('.fancybox-wrap').trigger('onReset').remove();$.extend(F,{group:{},opts:{},router:false,current:null,isActive:false,isOpened:false,isOpen:false,isClosing:false,wrap:null,skin:null,outer:null,inner:null});F.trigger('afterClose',obj);}});F.transitions={getOrigPosition:function(){var current=F.current,element=current.element,orig=current.orig,pos={},width=50,height=50,hPadding=current.hPadding,wPadding=current.wPadding,viewport=F.getViewport();if(!orig&&current.isDom&&element.is(':visible')){orig=element.find('img:first');if(!orig.length){orig=element;}}
if(isQuery(orig)){pos=orig.offset();if(orig.is('img')){width=orig.outerWidth();height=orig.outerHeight();}}else{pos.top=viewport.y+(viewport.h-height)*current.topRatio;pos.left=viewport.x+(viewport.w-width)*current.leftRatio;}
if(F.wrap.css('position')==='fixed'||current.locked){pos.top-=viewport.y;pos.left-=viewport.x;}
pos={top:getValue(pos.top-hPadding*current.topRatio),left:getValue(pos.left-wPadding*current.leftRatio),width:getValue(width+wPadding),height:getValue(height+hPadding)};return pos;},step:function(now,fx){var ratio,padding,value,prop=fx.prop,current=F.current,wrapSpace=current.wrapSpace,skinSpace=current.skinSpace;if(prop==='width'||prop==='height'){ratio=fx.end===fx.start?1:(now-fx.start)/(fx.end-fx.start);if(F.isClosing){ratio=1-ratio;}
padding=prop==='width'?current.wPadding:current.hPadding;value=now-padding;F.skin[prop](getScalar(prop==='width'?value:value-(wrapSpace*ratio)));F.inner[prop](getScalar(prop==='width'?value:value-(wrapSpace*ratio)-(skinSpace*ratio)));}},zoomIn:function(){var current=F.current,startPos=current.pos,effect=current.openEffect,elastic=effect==='elastic',endPos=$.extend({opacity:1},startPos);delete endPos.position;if(elastic){startPos=this.getOrigPosition();if(current.openOpacity){startPos.opacity=0.1;}}else if(effect==='fade'){startPos.opacity=0.1;}
F.wrap.css(startPos).animate(endPos,{duration:effect==='none'?0:current.openSpeed,easing:current.openEasing,step:elastic?this.step:null,complete:F._afterZoomIn});},zoomOut:function(){var current=F.current,effect=current.closeEffect,elastic=effect==='elastic',endPos={opacity:0.1};if(elastic){endPos=this.getOrigPosition();if(current.closeOpacity){endPos.opacity=0.1;}}
F.wrap.animate(endPos,{duration:effect==='none'?0:current.closeSpeed,easing:current.closeEasing,step:elastic?this.step:null,complete:F._afterZoomOut});},changeIn:function(){var current=F.current,effect=current.nextEffect,startPos=current.pos,endPos={opacity:1},direction=F.direction,distance=200,field;startPos.opacity=0.1;if(effect==='elastic'){field=direction==='down'||direction==='up'?'top':'left';if(direction==='down'||direction==='right'){startPos[field]=getValue(getScalar(startPos[field])-distance);endPos[field]='+='+distance+'px';}else{startPos[field]=getValue(getScalar(startPos[field])+distance);endPos[field]='-='+distance+'px';}}
if(effect==='none'){F._afterZoomIn();}else{F.wrap.css(startPos).animate(endPos,{duration:current.nextSpeed,easing:current.nextEasing,complete:F._afterZoomIn});}},changeOut:function(){var previous=F.previous,effect=previous.prevEffect,endPos={opacity:0.1},direction=F.direction,distance=200;if(effect==='elastic'){endPos[direction==='down'||direction==='up'?'top':'left']=(direction==='up'||direction==='left'?'-':'+')+'='+distance+'px';}
previous.wrap.animate(endPos,{duration:effect==='none'?0:previous.prevSpeed,easing:previous.prevEasing,complete:function(){$(this).trigger('onReset').remove();}});}};F.helpers.overlay={defaults:{closeClick:true,speedOut:200,showEarly:true,css:{},locked:!isTouch,fixed:true},overlay:null,fixed:false,el:$('html'),create:function(opts){opts=$.extend({},this.defaults,opts);if(this.overlay){this.close();}
this.overlay=$('<div class="fancybox-overlay"></div>').appendTo(F.coming?F.coming.parent:opts.parent);this.fixed=false;if(opts.fixed&&F.defaults.fixed){this.overlay.addClass('fancybox-overlay-fixed');this.fixed=true;}},open:function(opts){var that=this;opts=$.extend({},this.defaults,opts);if(this.overlay){this.overlay.unbind('.overlay').width('auto').height('auto');}else{this.create(opts);}
if(!this.fixed){W.bind('resize.overlay',$.proxy(this.update,this));this.update();}
if(opts.closeClick){this.overlay.bind('click.overlay',function(e){if($(e.target).hasClass('fancybox-overlay')){if(F.isActive){F.close();}else{that.close();}
return false;}});}
this.overlay.css(opts.css).show();},close:function(){var scrollV,scrollH;W.unbind('resize.overlay');if(this.el.hasClass('fancybox-lock')){$('.fancybox-margin').removeClass('fancybox-margin');scrollV=W.scrollTop();scrollH=W.scrollLeft();this.el.removeClass('fancybox-lock');W.scrollTop(scrollV).scrollLeft(scrollH);}
$('.fancybox-overlay').remove().hide();$.extend(this,{overlay:null,fixed:false});},update:function(){var width='100%',offsetWidth;this.overlay.width(width).height('100%');if(IE){offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(D.width()>offsetWidth){width=D.width();}}else if(D.width()>W.width()){width=D.width();}
this.overlay.width(width).height(D.height());},onReady:function(opts,obj){var overlay=this.overlay;$('.fancybox-overlay').stop(true,true);if(!overlay){this.create(opts);}
if(opts.locked&&this.fixed&&obj.fixed){if(!overlay){this.margin=D.height()>W.height()?$('html').css('margin-right').replace("px",""):false;}
obj.locked=this.overlay.append(obj.wrap);obj.fixed=false;}
if(opts.showEarly===true){this.beforeShow.apply(this,arguments);}},beforeShow:function(opts,obj){var scrollV,scrollH;if(obj.locked){if(this.margin!==false){$('*').filter(function(){return($(this).css('position')==='fixed'&&!$(this).hasClass("fancybox-overlay")&&!$(this).hasClass("fancybox-wrap"));}).addClass('fancybox-margin');this.el.addClass('fancybox-margin');}
scrollV=W.scrollTop();scrollH=W.scrollLeft();this.el.addClass('fancybox-lock');W.scrollTop(scrollV).scrollLeft(scrollH);}
this.open(opts);},onUpdate:function(){if(!this.fixed){this.update();}},afterClose:function(opts){if(this.overlay&&!F.coming){this.overlay.fadeOut(opts.speedOut,$.proxy(this.close,this));}}};F.helpers.title={defaults:{type:'float',position:'bottom'},beforeShow:function(opts){var current=F.current,text=current.title,type=opts.type,title,target;if($.isFunction(text)){text=text.call(current.element,current);}
if(!isString(text)||$.trim(text)===''){return;}
title=$('<div class="fancybox-title fancybox-title-'+type+'-wrap">'+text+'</div>');switch(type){case'inside':target=F.skin;break;case'outside':target=F.wrap;break;case'over':target=F.inner;break;default:target=F.skin;title.appendTo('body');if(IE){title.width(title.width());}
title.wrapInner('<span class="child"></span>');F.current.margin[2]+=Math.abs(getScalar(title.css('margin-bottom')));break;}
title[(opts.position==='top'?'prependTo':'appendTo')](target);}};$.fn.fancybox=function(options){var index,that=$(this),selector=this.selector||'',run=function(e){var what=$(this).blur(),idx=index,relType,relVal;if(!(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&!what.is('.fancybox-wrap')){relType=options.groupAttr||'data-fancybox-group';relVal=what.attr(relType);if(!relVal){relType='rel';relVal=what.get(0)[relType];}
if(relVal&&relVal!==''&&relVal!=='nofollow'){what=selector.length?$(selector):that;what=what.filter('['+relType+'="'+relVal+'"]');idx=what.index(this);}
options.index=idx;if(F.open(what,options)!==false){e.preventDefault();}}};options=options||{};index=options.index||0;if(!selector||options.live===false){that.unbind('click.fb-start').bind('click.fb-start',run);}else{D.undelegate(selector,'click.fb-start').delegate(selector+":not('.fancybox-item, .fancybox-nav')",'click.fb-start',run);}
this.filter('[data-fancybox-start=1]').trigger('click');return this;};D.ready(function(){var w1,w2;if($.scrollbarWidth===undefined){$.scrollbarWidth=function(){var parent=$('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),child=parent.children(),width=child.innerWidth()-child.height(99).innerWidth();parent.remove();return width;};}
if($.support.fixedPosition===undefined){$.support.fixedPosition=(function(){var elem=$('<div style="position:fixed;top:20px;"></div>').appendTo('body'),fixed=(elem[0].offsetTop===20||elem[0].offsetTop===15);elem.remove();return fixed;}());}
$.extend(F.defaults,{scrollbarWidth:$.scrollbarWidth(),fixed:$.support.fixedPosition,parent:$('body')});w1=$(window).width();H.addClass('fancybox-lock-test');w2=$(window).width();H.removeClass('fancybox-lock-test');$("<style type='text/css'>.fancybox-margin{margin-right:"+(w2-w1)+"px;}</style>").appendTo("head");});}(window,document,jQuery));(function(e,t){if(!e)return t;var n=function(){this.el=t;this.items=t;this.sizes=[];this.max=[0,0];this.current=0;this.interval=t;this.opts={speed:500,delay:3e3,complete:t,keys:!t,dots:t,fluid:t};var n=this;this.init=function(t,n){this.el=t;this.ul=t.children("ul");this.max=[t.outerWidth(),t.outerHeight()];this.items=this.ul.children("li").each(this.calculate);this.opts=e.extend(this.opts,n);this.setup();return this};this.calculate=function(t){var r=e(this),i=r.outerWidth(),s=r.outerHeight();n.sizes[t]=[i,s];if(i>n.max[0])n.max[0]=i;if(s>n.max[1])n.max[1]=s};this.setup=function(){this.el.css({overflow:"hidden",width:n.max[0],height:this.items.first().outerHeight()});this.ul.css({width:this.items.length*100+"%",position:"relative"});this.items.css("width",100/this.items.length+"%");if(this.opts.delay!==t){this.start();this.el.hover(this.stop,this.start)}this.opts.keys&&e(document).keydown(this.keys);this.opts.dots&&this.dots();if(this.opts.fluid){var r=function(){n.el.css("width",Math.min(Math.round(n.el.outerWidth()/n.el.parent().outerWidth()*100),100)+"%")};r();e(window).resize(r)}if(this.opts.arrows){this.el.parent().append('<p class="arrows"><span class="prev">â†</span><span class="next">â†’</span></p>').find(".arrows span").click(function(){e.isFunction(n[this.className])&&n[this.className]()})}if(e.event.swipe){this.el.on("swipeleft",n.prev).on("swiperight",n.next)}};this.move=function(t,r){if(!this.items.eq(t).length)t=0;if(t<0)t=this.items.length-1;var i=this.items.eq(t);var s={height:i.outerHeight()};var o=r?5:this.opts.speed;if(!this.ul.is(":animated")){n.el.find(".dot:eq("+t+")").addClass("active").siblings().removeClass("active");this.el.animate(s,o)&&this.ul.animate(e.extend({left:"-"+t+"00%"},s),o,function(i){n.current=t;e.isFunction(n.opts.complete)&&!r&&n.opts.complete(n.el)})}};this.start=function(){n.interval=setInterval(function(){n.move(n.current+1)},n.opts.delay)};this.stop=function(){n.interval=clearInterval(n.interval);return n};this.keys=function(t){var r=t.which;var i={37:n.prev,39:n.next,27:n.stop};if(e.isFunction(i[r])){i[r]()}};this.next=function(){return n.stop().move(n.current+1)};this.prev=function(){return n.stop().move(n.current-1)};this.dots=function(){var t='<ol class="dots">';e.each(this.items,function(e){t+='<li class="dot'+(e<1?" active":"")+'">'+(e+1)+"</li>"});t+="</ol>";this.el.addClass("has-dots").append(t).find(".dot").click(function(){n.move(e(this).index())})}};e.fn.unslider=function(t){var r=this.length;return this.each(function(i){var s=e(this);var u=(new n).init(s,t);s.data("unslider"+(r>1?"-"+(i+1):""),u)})}})(window.jQuery,false)
/* Video.js v4.10.2 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
(function(){var b=void 0,f=!0,k=null,l=!1;function m(){return function(){}}function p(a){return function(){return this[a]}}function q(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Ca[a])return t.Ca[a];a=t.w(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}
var videojs=window.videojs=t;t.Vb="4.10";t.Vc="https:"==document.location.protocol?"https://":"http://";t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.ze||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};"GENERATED_CDN_VSN"!==t.Vb&&(videojs.options.flash.swf=t.Vc+"vjs.zencdn.net/"+t.Vb+"/video-js.swf");t.hd=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.ga.Va(t.options.languages[a],c):c;return t.options.languages};t.Ca={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.qa=t.CoreObject=m();t.qa.extend=function(a){var c,d;a=a||{};c=a.init||a.i||this.prototype.init||this.prototype.i||m();d=function(){c.apply(this,arguments)};d.prototype=t.g.create(this.prototype);d.prototype.constructor=d;d.extend=t.qa.extend;d.create=t.qa.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.qa.create=function(){var a=t.g.create(this.prototype);this.apply(a,arguments);return a};t.c=function(a,c,d){if(t.g.isArray(c))return u(t.c,a,c,d);var e=t.getData(a);e.C||(e.C={});e.C[c]||(e.C[c]=[]);d.r||(d.r=t.r++);e.C[c].push(d);e.W||(e.disabled=l,e.W=function(c){if(!e.disabled){c=t.rc(c);var d=e.C[c.type];if(d)for(var d=d.slice(0),j=0,n=d.length;j<n&&!c.zc();j++)d[j].call(a,c)}});1==e.C[c].length&&(a.addEventListener?a.addEventListener(c,e.W,l):a.attachEvent&&a.attachEvent("on"+c,e.W))};t.j=function(a,c,d){if(t.uc(a)){var e=t.getData(a);if(e.C){if(t.g.isArray(c))return u(t.j,a,c,d);if(c){var g=e.C[c];if(g){if(d){if(d.r)for(e=0;e<g.length;e++)g[e].r===d.r&&g.splice(e--,1)}else e.C[c]=[];t.kc(a,c)}}else for(g in e.C)c=g,e.C[c]=[],t.kc(a,c)}}};t.kc=function(a,c){var d=t.getData(a);0===d.C[c].length&&(delete d.C[c],a.removeEventListener?a.removeEventListener(c,d.W,l):a.detachEvent&&a.detachEvent("on"+c,d.W));t.Ib(d.C)&&(delete d.C,delete d.W,delete d.disabled);t.Ib(d)&&t.Ic(a)};t.rc=function(a){function c(){return f}function d(){return l}if(!a||!a.Jb){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.Cd=c;a.defaultPrevented=f};a.Cd=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&e.stopPropagation();a.cancelBubble=f;a.Jb=c};a.Jb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.zc=c;a.stopPropagation()};a.zc=d;if(a.clientX!=k){g=document.documentElement;var h=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||h&&h.scrollLeft||0)-(g&&g.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||h&&h.scrollTop||0)-(g&&g.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=k&&(a.button=a.button&1?0:a.button&4?1:a.button&2?2:0)}return a};t.l=function(a,c){var d=t.uc(a)?t.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=t.rc(c);d.W&&d.W.call(a,c);if(e&&!c.Jb()&&c.bubbles!==l)t.l(e,c);else if(!e&&!c.defaultPrevented&&(d=t.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};t.R=function(a,c,d){function e(){t.j(a,c,e);d.apply(this,arguments)}if(t.g.isArray(c))return u(t.R,a,c,d);e.r=d.r=d.r||t.r++;t.c(a,c,e)};function u(a,c,d,e){t.ic.forEach(d,function(d){a(c,d,e)})}var v=Object.prototype.hasOwnProperty;t.e=function(a,c){var d;c=c||{};d=document.createElement(a||"div");t.g.X(c,function(a,c){-1!==a.indexOf("aria-")||"role"==a?d.setAttribute(a,c):d[a]=c});return d};t.ba=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};t.g={};t.g.create=Object.create||function(a){function c(){}c.prototype=a;return new c};t.g.X=function(a,c,d){for(var e in a)v.call(a,e)&&c.call(d||this,e,a[e])};t.g.z=function(a,c){if(!c)return a;for(var d in c)v.call(c,d)&&(a[d]=c[d]);return a};t.g.qd=function(a,c){var d,e,g;a=t.g.copy(a);for(d in c)v.call(c,d)&&(e=a[d],g=c[d],a[d]=t.g.Ta(e)&&t.g.Ta(g)?t.g.qd(e,g):c[d]);return a};t.g.copy=function(a){return t.g.z({},a)};t.g.Ta=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};t.g.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};t.Ed=function(a){return a!==a};t.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.r||(c.r=t.r++);e.r=d?d+"_"+c.r:c.r;return e};t.va={};t.r=1;t.expando="vdata"+(new Date).getTime();t.getData=function(a){var c=a[t.expando];c||(c=a[t.expando]=t.r++,t.va[c]={});return t.va[c]};t.uc=function(a){a=a[t.expando];return!(!a||t.Ib(t.va[a]))};t.Ic=function(a){var c=a[t.expando];if(c){delete t.va[c];try{delete a[t.expando]}catch(d){a.removeAttribute?a.removeAttribute(t.expando):a[t.expando]=k}}};t.Ib=function(a){for(var c in a)if(a[c]!==k)return l;return f};t.Sa=function(a,c){return-1!==(" "+a.className+" ").indexOf(" "+c+" ")};t.n=function(a,c){t.Sa(a,c)||(a.className=""===a.className?c:a.className+" "+c)};t.p=function(a,c){var d,e;if(t.Sa(a,c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};t.A=t.e("video");t.O=navigator.userAgent;t.bd=/iPhone/i.test(t.O);t.ad=/iPad/i.test(t.O);t.cd=/iPod/i.test(t.O);t.$c=t.bd||t.ad||t.cd;var aa=t,x;var y=t.O.match(/OS (\d+)_/i);x=y&&y[1]?y[1]:b;aa.oe=x;t.Yc=/Android/i.test(t.O);var ba=t,z;var A=t.O.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),B,C;A?(B=A[1]&&parseFloat(A[1]),C=A[2]&&parseFloat(A[2]),z=B&&C?parseFloat(A[1]+"."+A[2]):B?B:k):z=k;ba.Ub=z;t.dd=t.Yc&&/webkit/i.test(t.O)&&2.3>t.Ub;t.Zc=/Firefox/i.test(t.O);t.pe=/Chrome/i.test(t.O);t.ec=!!("ontouchstart"in window||window.Xc&&document instanceof window.Xc);t.Wc="backgroundSize"in t.A.style;t.Kc=function(a,c){t.g.X(c,function(c,e){e===k||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};t.Aa=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var h=d.length-1;0<=h;h--){e=d[h].name;g=d[h].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==k?f:l;c[e]=g}}return c};t.ve=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};t.Hb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};t.Oa={};t.w=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};t.za=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),h=Math.floor(c/60%60),j=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<j?g+":":"";return g+(((g||10<=h)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.kd=function(){document.body.focus();document.onselectstart=q(l)};t.ke=function(){document.onselectstart=q(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};t.zb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};t.get=function(a,c,d,e){var g,h,j,n;d=d||m();"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});h=new XMLHttpRequest;j=t.Xd(a);n=window.location;j.protocol+j.host!==n.protocol+n.host&&window.XDomainRequest&&!("withCredentials"in
h)?(h=new window.XDomainRequest,h.onload=function(){c(h.responseText)},h.onerror=d,h.onprogress=m(),h.ontimeout=d):(g="file:"==j.protocol||"file:"==n.protocol,h.onreadystatechange=function(){4===h.readyState&&(200===h.status||g&&0===h.status?c(h.responseText):d(h.responseText))});try{h.open("GET",a,f),e&&(h.withCredentials=f)}catch(r){d(r);return}try{h.send()}catch(w){d(w)}};t.ae=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};t.tc=function(a){a.match(/^https?:\/\//)||(a=t.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};t.Xd=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.e("div"),c.innerHTML='<a href="'+a+'"></a>',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;h<g.length;h++)a[g[h]]=d[g[h]];e&&document.body.removeChild(c);return a};function D(a,c){var d,e;d=Array.prototype.slice.call(c);e=m();e=window.console||{log:e,warn:e,error:e};a?d.unshift(a.toUpperCase()+":"):a="log";t.log.history.push(d);d.unshift("VIDEOJS:");if(e[a].apply)e[a].apply(e,d);else e[a](d.join(" "))}t.log=function(){D(k,arguments)};t.log.history=[];t.log.error=function(){D("error",arguments)};t.log.warn=function(){D("warn",arguments)};t.xd=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:t.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:t.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};t.ic={};t.ic.forEach=function(a,c,d){if(t.g.isArray(a)&&c instanceof Function)for(var e=0,g=a.length;e<g;++e)c.call(d||t,a[e],e,a);return a};t.ga={};t.ga.Va=function(a,c){var d,e,g;a=t.g.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=t.g.Ta(e)&&t.g.Ta(g)?t.ga.Va(e,g):c[d]);return a};t.a=t.qa.extend({i:function(a,c,d){this.d=a;this.m=t.g.copy(this.m);c=this.options(c);this.L=c.id||c.el&&c.el.id;this.L||(this.L=(a.id&&a.id()||"no_player")+"_component_"+t.r++);this.Kd=c.name||k;this.b=c.el||this.e();this.P=[];this.Pa={};this.Qa={};this.wc();this.K(d);if(c.Jc!==l){var e,g;this.k().reportUserActivity&&(e=t.bind(this.k(),this.k().reportUserActivity),this.c("touchstart",function(){e();clearInterval(g);g=setInterval(e,250)}),a=function(){e();clearInterval(g)},this.c("touchmove",e),this.c("touchend",a),this.c("touchcancel",a))}}});s=t.a.prototype;s.dispose=function(){this.l({type:"dispose",bubbles:l});if(this.P)for(var a=this.P.length-1;0<=a;a--)this.P[a].dispose&&this.P[a].dispose();this.Qa=this.Pa=this.P=k;this.j();this.b.parentNode&&this.b.parentNode.removeChild(this.b);t.Ic(this.b);this.b=k};s.d=f;s.k=p("d");s.options=function(a){return a===b?this.m:this.m=t.ga.Va(this.m,a)};s.e=function(a,c){return t.e(a,c)};s.t=function(a){var c=this.d.language(),d=this.d.languages();return d&&d[c]&&d[c][a]?d[c][a]:a};s.w=p("b");s.ja=function(){return this.v||this.b};s.id=p("L");s.name=p("Kd");s.children=p("P");s.zd=function(a){return this.Pa[a]};s.ka=function(a){return this.Qa[a]};s.V=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||t.ba(e),c.name=e,d=new window.videojs[d](this.d||this,c)):d=a;this.P.push(d);"function"===typeof d.id&&(this.Pa[d.id()]=d);(e=e||d.name&&d.name())&&(this.Qa[e]=d);"function"===typeof d.el&&d.el()&&this.ja().appendChild(d.el());return d};s.removeChild=function(a){"string"===typeof a&&(a=this.ka(a));if(a&&this.P){for(var c=l,d=this.P.length-1;0<=d;d--)if(this.P[d]===a){c=f;this.P.splice(d,1);break}c&&(this.Pa[a.id]=k,this.Qa[a.name]=k,(c=a.w())&&c.parentNode===this.ja()&&this.ja().removeChild(a.w()))}};s.wc=function(){var a,c,d,e,g,h;a=this;c=a.options();if(d=c.children)if(h=function(d,e){c[d]!==b&&(e=c[d]);e!==l&&(a[d]=a.V(d,e))},t.g.isArray(d))for(var j=0;j<d.length;j++)e=d[j],"string"==typeof e?(g=e,e={}):g=e.name,h(g,e);else t.g.X(d,h)};s.T=q("");s.c=function(a,c,d){var e,g,h;"string"===typeof a||t.g.isArray(a)?t.c(this.b,a,t.bind(this,c)):(e=t.bind(this,d),h=this,g=function(){h.j(a,c,e)},g.r=e.r,this.c("dispose",g),d=function(){h.j("dispose",g)},d.r=e.r,a.nodeName?(t.c(a,c,e),t.c(a,"dispose",d)):"function"===typeof a.c&&(a.c(c,e),a.c("dispose",d)));return this};s.j=function(a,c,d){!a||"string"===typeof a||t.g.isArray(a)?t.j(this.b,a,c):(d=t.bind(this,d),this.j("dispose",d),a.nodeName?(t.j(a,c,d),t.j(a,"dispose",d)):(a.j(c,d),a.j("dispose",d)));return this};s.R=function(a,c,d){var e,g,h;"string"===typeof a||t.g.isArray(a)?t.R(this.b,a,t.bind(this,c)):(e=t.bind(this,d),g=this,h=function(){g.j(a,c,h);e.apply(this,arguments)},h.r=e.r,this.c(a,c,h));return this};s.l=function(a){t.l(this.b,a);return this};s.K=function(a){a&&(this.la?a.call(this):(this.ab===b&&(this.ab=[]),this.ab.push(a)));return this};s.Ga=function(){this.la=f;var a=this.ab;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.ab=[];this.l("ready")}};s.Sa=function(a){return t.Sa(this.b,a)};s.n=function(a){t.n(this.b,a);return this};s.p=function(a){t.p(this.b,a);return this};s.show=function(){this.b.style.display="block";return this};s.Y=function(){this.b.style.display="none";return this};function E(a){a.p("vjs-lock-showing")}s.disable=function(){this.Y();this.show=m()};s.width=function(a,c){return F(this,"width",a,c)};s.height=function(a,c){return F(this,"height",a,c)};s.td=function(a,c){return this.width(a,f).height(c)};function F(a,c,d,e){if(d!==b){if(d===k||t.Ed(d))d=0;a.b.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px";e||a.l("resize");return a}if(!a.b)return 0;d=a.b.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.b["offset"+t.ba(c)],10)}
function G(a){var c,d,e,g,h,j,n,r;c=0;d=k;a.c("touchstart",function(a){1===a.touches.length&&(d=a.touches[0],c=(new Date).getTime(),g=f)});a.c("touchmove",function(a){1<a.touches.length?g=l:d&&(j=a.touches[0].pageX-d.pageX,n=a.touches[0].pageY-d.pageY,r=Math.sqrt(j*j+n*n),22<r&&(g=l))});h=function(){g=l};a.c("touchleave",h);a.c("touchcancel",h);a.c("touchend",function(a){d=k;g===f&&(e=(new Date).getTime()-c,250>e&&(a.preventDefault(),this.l("tap")))})}
t.u=t.a.extend({i:function(a,c){t.a.call(this,a,c);G(this);this.c("tap",this.s);this.c("click",this.s);this.c("focus",this.Ya);this.c("blur",this.Xa)}});s=t.u.prototype;s.e=function(a,c){var d;c=t.g.z({className:this.T(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.e.call(this,a,c);c.innerHTML||(this.v=t.e("div",{className:"vjs-control-content"}),this.xb=t.e("span",{className:"vjs-control-text",innerHTML:this.t(this.ua)||"Need Text"}),this.v.appendChild(this.xb),d.appendChild(this.v));return d};s.T=function(){return"vjs-control "+t.a.prototype.T.call(this)};s.s=m();s.Ya=function(){t.c(document,"keydown",t.bind(this,this.Z))};s.Z=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.s()};s.Xa=function(){t.j(document,"keydown",t.bind(this,this.Z))};t.S=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.jd=this.ka(this.m.barName);this.handle=this.ka(this.m.handleName);this.c("mousedown",this.Za);this.c("touchstart",this.Za);this.c("focus",this.Ya);this.c("blur",this.Xa);this.c("click",this.s);this.c(a,"controlsvisible",this.update);this.c(a,this.Ec,this.update);this.F={};this.F.move=t.bind(this,this.$a);this.F.end=t.bind(this,this.Mb)}});s=t.S.prototype;s.dispose=function(){t.j(document,"mousemove",this.F.move,l);t.j(document,"mouseup",this.F.end,l);t.j(document,"touchmove",this.F.move,l);t.j(document,"touchend",this.F.end,l);t.j(document,"keyup",t.bind(this,this.Z));t.a.prototype.dispose.call(this)};s.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.g.z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.e.call(this,a,c)};s.Za=function(a){a.preventDefault();t.kd();this.n("vjs-sliding");t.c(document,"mousemove",this.F.move);t.c(document,"mouseup",this.F.end);t.c(document,"touchmove",this.F.move);t.c(document,"touchend",this.F.end);this.$a(a)};s.$a=m();s.Mb=function(){t.ke();this.p("vjs-sliding");t.j(document,"mousemove",this.F.move,l);t.j(document,"mouseup",this.F.end,l);t.j(document,"touchmove",this.F.move,l);t.j(document,"touchend",this.F.end,l);this.update()};s.update=function(){if(this.b){var a,c=this.Gb(),d=this.handle,e=this.jd;isNaN(c)&&(c=0);a=c;if(d){a=this.b.offsetWidth;var g=d.w().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.w().style.left=t.round(100*c,2)+"%"}e&&(e.w().style.width=t.round(100*a,2)+"%")}};function H(a,c){var d,e,g,h;d=a.b;e=t.xd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.w().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.w().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.Ya=function(){t.c(document,"keyup",t.bind(this,this.Z))};s.Z=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.Nc();else if(38==a.which||39==a.which)a.preventDefault(),this.Oc()};s.Xa=function(){t.j(document,"keyup",t.bind(this,this.Z))};s.s=function(a){a.stopImmediatePropagation();a.preventDefault()};t.$=t.a.extend();t.$.prototype.defaultValue=0;t.$.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.g.z({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return t.a.prototype.e.call(this,"div",c)};t.ha=t.a.extend();function ca(a,c){a.V(c);c.c("click",t.bind(a,function(){E(this)}))}
t.ha.prototype.e=function(){var a=this.options().lc||"ul";this.v=t.e(a,{className:"vjs-menu-content"});a=t.a.prototype.e.call(this,"div",{append:this.v,className:"vjs-menu"});a.appendChild(this.v);t.c(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.J=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.selected(c.selected)}});t.J.prototype.e=function(a,c){return t.u.prototype.e.call(this,"li",t.g.z({className:"vjs-menu-item",innerHTML:this.t(this.m.label)},c))};t.J.prototype.s=function(){this.selected(f)};t.J.prototype.selected=function(a){a?(this.n("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.p("vjs-selected"),this.b.setAttribute("aria-selected",l))};t.N=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.Ba=this.xa();this.V(this.Ba);this.Q&&0===this.Q.length&&this.Y();this.c("keyup",this.Z);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});s=t.N.prototype;s.ta=l;s.xa=function(){var a=new t.ha(this.d);this.options().title&&a.ja().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.options().title),he:-1}));if(this.Q=this.createItems())for(var c=0;c<this.Q.length;c++)ca(a,this.Q[c]);return a};s.wa=m();s.T=function(){return this.className+" vjs-menu-button "+t.u.prototype.T.call(this)};s.Ya=m();s.Xa=m();s.s=function(){this.R("mouseout",t.bind(this,function(){E(this.Ba);this.b.blur()}));this.ta?I(this):J(this)};s.Z=function(a){a.preventDefault();32==a.which||13==a.which?this.ta?I(this):J(this):27==a.which&&this.ta&&I(this)};function J(a){a.ta=f;a.Ba.n("vjs-lock-showing");a.b.setAttribute("aria-pressed",f);a.Q&&0<a.Q.length&&a.Q[0].w().focus()}function I(a){a.ta=l;E(a.Ba);a.b.setAttribute("aria-pressed",l)}t.D=function(a){"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:"object"===typeof a&&t.g.z(this,a);this.message||(this.message=t.D.rd[this.code]||"")};t.D.prototype.code=0;t.D.prototype.message="";t.D.prototype.status=k;t.D.Ra="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");t.D.rd={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var K=0;K<t.D.Ra.length;K++)t.D[t.D.Ra[K]]=K,t.D.prototype[t.D.Ra[K]]=K;var L,M,N,O;L=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")];M=L[0];for(O=0;O<L.length;O++)if(L[O][1]in document){N=L[O];break}if(N){t.Oa.Fb={};for(O=0;O<N.length;O++)t.Oa.Fb[M[O]]=N[O]}
t.Player=t.a.extend({i:function(a,c,d){this.I=a;a.id=a.id||"vjs_video_"+t.r++;this.ie=a&&t.Aa(a);c=t.g.z(da(a),c);this.Ua=c.language||t.options.language;this.Id=c.languages||t.options.languages;this.G={};this.Fc=c.poster||"";this.yb=!!c.controls;a.controls=l;c.Jc=l;P(this,"audio"===this.I.nodeName.toLowerCase());t.a.call(this,this,c,d);this.controls()?this.n("vjs-controls-enabled"):this.n("vjs-controls-disabled");P(this)&&this.n("vjs-audio");t.Ca[this.L]=this;c.plugins&&t.g.X(c.plugins,function(a,c){this[a](c)},this);var e,g,h,j,n,r;e=t.bind(this,this.reportUserActivity);this.c("mousedown",function(){e();clearInterval(g);g=setInterval(e,250)});this.c("mousemove",function(a){if(a.screenX!=n||a.screenY!=r)n=a.screenX,r=a.screenY,e()});this.c("mouseup",function(){e();clearInterval(g)});this.c("keydown",e);this.c("keyup",e);h=setInterval(t.bind(this,function(){if(this.pa){this.pa=l;this.userActive(f);clearTimeout(j);var a=this.options().inactivityTimeout;0<a&&(j=setTimeout(t.bind(this,function(){this.pa||this.userActive(l)}),a))}}),250);this.c("dispose",function(){clearInterval(h);clearTimeout(j)})}});s=t.Player.prototype;s.language=function(a){if(a===b)return this.Ua;this.Ua=a;return this};s.languages=p("Id");s.m=t.options;s.dispose=function(){this.l("dispose");this.j("dispose");t.Ca[this.L]=k;this.I&&this.I.player&&(this.I.player=k);this.b&&this.b.player&&(this.b.player=k);this.o&&this.o.dispose();t.a.prototype.dispose.call(this)};function da(a){var c,d,e={sources:[],tracks:[]};c=t.Aa(a);d=c["data-setup"];d!==k&&t.g.z(c,t.JSON.parse(d||"{}"));t.g.z(e,c);if(a.hasChildNodes()){var g,h;a=a.childNodes;g=0;for(h=a.length;g<h;g++)c=a[g],d=c.nodeName.toLowerCase(),"source"===d?e.sources.push(t.Aa(c)):"track"===d&&e.tracks.push(t.Aa(c))}return e}
s.e=function(){var a=this.b=t.a.prototype.e.call(this,"div"),c=this.I,d;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes()){var e,g,h,j,n;e=c.childNodes;g=e.length;for(n=[];g--;)h=e[g],j=h.nodeName.toLowerCase(),"track"===j&&n.push(h);for(e=0;e<n.length;e++)c.removeChild(n[e])}d=t.Aa(c);t.g.X(d,function(c){"class"==c?a.className=d[c]:a.setAttribute(c,d[c])});c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.n("vjs-paused");this.width(this.m.width,f);this.height(this.m.height,f);c.Bd=c.networkState;c.parentNode&&c.parentNode.insertBefore(a,c);t.Hb(c,a);this.b=a;this.c("loadstart",this.Pd);this.c("waiting",this.Vd);this.c(["canplay","canplaythrough","playing","ended"],this.Ud);this.c("seeking",this.Sd);this.c("seeked",this.Rd);this.c("ended",this.Ld);this.c("play",this.Ob);this.c("firstplay",this.Nd);this.c("pause",this.Nb);this.c("progress",this.Qd);this.c("durationchange",this.Cc);this.c("fullscreenchange",this.Od);return a};function Q(a,c,d){a.o&&(a.la=l,a.o.dispose(),a.o=l);"Html5"!==c&&a.I&&(t.h.Bb(a.I),a.I=k);a.eb=c;a.la=l;var e=t.g.z({source:d,parentEl:a.b},a.m[c.toLowerCase()]);d&&(a.nc=d.type,d.src==a.G.src&&0<a.G.currentTime&&(e.startTime=a.G.currentTime),a.G.src=d.src);a.o=new window.videojs[c](a,e);a.o.K(function(){this.d.Ga()})}s.Pd=function(){this.error(k);this.paused()?(R(this,l),this.R("play",function(){R(this,f)})):this.l("firstplay")};s.vc=l;function R(a,c){c!==b&&a.vc!==c&&((a.vc=c)?(a.n("vjs-has-started"),a.l("firstplay")):a.p("vjs-has-started"))}s.Ob=function(){this.p("vjs-paused");this.n("vjs-playing")};s.Vd=function(){this.n("vjs-waiting")};s.Ud=function(){this.p("vjs-waiting")};s.Sd=function(){this.n("vjs-seeking")};s.Rd=function(){this.p("vjs-seeking")};s.Nd=function(){this.m.starttime&&this.currentTime(this.m.starttime);this.n("vjs-has-started")};s.Nb=function(){this.p("vjs-playing");this.n("vjs-paused")};s.Qd=function(){1==this.bufferedPercent()&&this.l("loadedalldata")};s.Ld=function(){this.m.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()};s.Cc=function(){var a=S(this,"duration");a&&(0>a&&(a=Infinity),this.duration(a),Infinity===a?this.n("vjs-live"):this.p("vjs-live"))};s.Od=function(){this.isFullscreen()?this.n("vjs-fullscreen"):this.p("vjs-fullscreen")};function T(a,c,d){if(a.o&&!a.o.la)a.o.K(function(){this[c](d)});else try{a.o[c](d)}catch(e){throw t.log(e),e;}}
function S(a,c){if(a.o&&a.o.la)try{return a.o[c]()}catch(d){throw a.o[c]===b?t.log("Video.js: "+c+" method not defined for "+a.eb+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.eb+" playback technology element.",d),a.o.la=l):t.log(d),d;}}s.play=function(){T(this,"play");return this};s.pause=function(){T(this,"pause");return this};s.paused=function(){return S(this,"paused")===l?l:f};s.currentTime=function(a){return a!==b?(T(this,"setCurrentTime",a),this):this.G.currentTime=S(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.G.duration=parseFloat(a),this;this.G.duration===b&&this.Cc();return this.G.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=S(this,"buffered");if(!a||!a.length)a=t.zb(0,0);return a};s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;h<c.length;h++)e=c.start(h),g=c.end(h),g>a&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.G.volume=a,T(this,"setVolume",a),t.ae(a),this;a=parseFloat(S(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(T(this,"setMuted",a),this):S(this,"muted")||l};s.Ea=function(){return S(this,"supportsFullScreen")||l};s.yc=l;s.isFullscreen=function(a){return a!==b?(this.yc=!!a,this):this.yc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};s.requestFullscreen=function(){var a=t.Oa.Fb;this.isFullscreen(f);a?(t.c(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.j(document,a.fullscreenchange,arguments.callee);this.l("fullscreenchange")})),this.b[a.requestFullscreen]()):this.o.Ea()?T(this,"enterFullScreen"):(this.qc(),this.l("fullscreenchange"));return this};s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.Oa.Fb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.o.Ea()?T(this,"exitFullScreen"):(this.Cb(),this.l("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};s.qc=function(){this.Dd=f;this.ud=document.documentElement.style.overflow;t.c(document,"keydown",t.bind(this,this.sc));document.documentElement.style.overflow="hidden";t.n(document.body,"vjs-full-window");this.l("enterFullWindow")};s.sc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Cb())};s.Cb=function(){this.Dd=l;t.j(document,"keydown",this.sc);document.documentElement.style.overflow=this.ud;t.p(document.body,"vjs-full-window");this.l("exitFullWindow")};s.selectSource=function(a){for(var c=0,d=this.m.techOrder;c<d.length;c++){var e=t.ba(d[c]),g=window.videojs[e];if(g){if(g.isSupported())for(var h=0,j=a;h<j.length;h++){var n=j[h];if(g.canPlaySource(n))return{source:n,o:e}}}else t.log.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return l};s.src=function(a){if(a===b)return S(this,"src");t.g.isArray(a)?U(this,a):"string"===typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!window.videojs[this.eb].canPlaySource(a)?U(this,[a]):(this.G.src=a.src,this.nc=a.type||"",this.K(function(){T(this,"src",a.src);"auto"==this.m.preload&&this.load();this.m.autoplay&&this.play()})));return this};function U(a,c){var d=a.selectSource(c),e;d?d.o===a.eb?a.src(d.source):Q(a,d.o,d.source):(e=setTimeout(t.bind(a,function(){this.error({code:4,message:this.t(this.options().notSupportedMessage)})}),0),a.Ga(),a.c("dispose",function(){clearTimeout(e)}))}s.load=function(){T(this,"load");return this};s.currentSrc=function(){return S(this,"currentSrc")||this.G.src||""};s.pd=function(){return this.nc||""};s.Da=function(a){return a!==b?(T(this,"setPreload",a),this.m.preload=a,this):S(this,"preload")};s.autoplay=function(a){return a!==b?(T(this,"setAutoplay",a),this.m.autoplay=a,this):S(this,"autoplay")};s.loop=function(a){return a!==b?(T(this,"setLoop",a),this.m.loop=a,this):S(this,"loop")};s.poster=function(a){if(a===b)return this.Fc;a||(a="");this.Fc=a;T(this,"setPoster",a);this.l("posterchange");return this};s.controls=function(a){return a!==b?(a=!!a,this.yb!==a&&((this.yb=a)?(this.p("vjs-controls-disabled"),this.n("vjs-controls-enabled"),this.l("controlsenabled")):(this.p("vjs-controls-enabled"),this.n("vjs-controls-disabled"),this.l("controlsdisabled"))),this):this.yb};t.Player.prototype.Tb;s=t.Player.prototype;s.usingNativeControls=function(a){return a!==b?(a=!!a,this.Tb!==a&&((this.Tb=a)?(this.n("vjs-using-native-controls"),this.l("usingnativecontrols")):(this.p("vjs-using-native-controls"),this.l("usingcustomcontrols"))),this):this.Tb};s.da=k;s.error=function(a){if(a===b)return this.da;if(a===k)return this.da=a,this.p("vjs-error"),this;this.da=a instanceof t.D?a:new t.D(a);this.l("error");this.n("vjs-error");t.log.error("(CODE:"+this.da.code+" "+t.D.Ra[this.da.code]+")",this.da.message,this.da);return this};s.ended=function(){return S(this,"ended")};s.seeking=function(){return S(this,"seeking")};s.pa=f;s.reportUserActivity=function(){this.pa=f};s.Sb=f;s.userActive=function(a){return a!==b?(a=!!a,a!==this.Sb&&((this.Sb=a)?(this.pa=f,this.p("vjs-user-inactive"),this.n("vjs-user-active"),this.l("useractive")):(this.pa=l,this.o&&this.o.R("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.p("vjs-user-active"),this.n("vjs-user-inactive"),this.l("userinactive"))),this):this.Sb};s.playbackRate=function(a){return a!==b?(T(this,"setPlaybackRate",a),this):this.o&&this.o.featuresPlaybackRate?S(this,"playbackRate"):1};s.xc=l;function P(a,c){return c!==b?(a.xc=!!c,a):a.xc}t.Ja=t.a.extend();t.Ja.prototype.m={we:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{}}};t.Ja.prototype.e=function(){return t.e("div",{className:"vjs-control-bar"})};t.Yb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.Yb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-live-controls vjs-control"});this.v=t.e("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.t("Stream Type")+"</span>"+this.t("LIVE"),"aria-live":"off"});a.appendChild(this.v);return a};t.ac=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.c(a,"play",this.Ob);this.c(a,"pause",this.Nb)}});s=t.ac.prototype;s.ua="Play";s.T=function(){return"vjs-play-control "+t.u.prototype.T.call(this)};s.s=function(){this.d.paused()?this.d.play():this.d.pause()};s.Ob=function(){this.p("vjs-paused");this.n("vjs-playing");this.b.children[0].children[0].innerHTML=this.t("Pause")};s.Nb=function(){this.p("vjs-playing");this.n("vjs-paused");this.b.children[0].children[0].innerHTML=this.t("Play")};t.hb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});t.hb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.v);return a};t.hb.prototype.fa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.v.innerHTML='<span class="vjs-control-text">'+this.t("Current Time")+"</span> "+t.za(a,this.d.duration())};t.ib=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});t.ib.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.t("Duration Time")+"</span> 0:00","aria-live":"off"});a.appendChild(this.v);return a};t.ib.prototype.fa=function(){var a=this.d.duration();a&&(this.v.innerHTML='<span class="vjs-control-text">'+this.t("Duration Time")+"</span> "+t.za(a))};t.gc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.gc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};t.pb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});t.pb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.t("Remaining Time")+"</span> -0:00","aria-live":"off"});a.appendChild(this.v);return a};t.pb.prototype.fa=function(){this.d.duration()&&(this.v.innerHTML='<span class="vjs-control-text">'+this.t("Remaining Time")+"</span> -"+t.za(this.d.remainingTime()))};t.Ka=t.u.extend({i:function(a,c){t.u.call(this,a,c)}});t.Ka.prototype.ua="Fullscreen";t.Ka.prototype.T=function(){return"vjs-fullscreen-control "+t.u.prototype.T.call(this)};t.Ka.prototype.s=function(){this.d.isFullscreen()?(this.d.exitFullscreen(),this.xb.innerHTML=this.t("Fullscreen")):(this.d.requestFullscreen(),this.xb.innerHTML=this.t("Non-Fullscreen"))};t.ob=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.ob.prototype.m={children:{seekBar:{}}};t.ob.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.cc=t.S.extend({i:function(a,c){t.S.call(this,a,c);this.c(a,"timeupdate",this.oa);a.K(t.bind(this,this.oa))}});s=t.cc.prototype;s.m={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Ec="timeupdate";s.e=function(){return t.S.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};s.oa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.b.setAttribute("aria-valuenow",t.round(100*this.Gb(),2));this.b.setAttribute("aria-valuetext",t.za(a,this.d.duration()))};s.Gb=function(){return this.d.currentTime()/this.d.duration()};s.Za=function(a){t.S.prototype.Za.call(this,a);this.d.bb=f;this.me=!this.d.paused();this.d.pause()};s.$a=function(a){a=H(this,a)*this.d.duration();a==this.d.duration()&&(a-=0.1);this.d.currentTime(a)};s.Mb=function(a){t.S.prototype.Mb.call(this,a);this.d.bb=l;this.me&&this.d.play()};s.Oc=function(){this.d.currentTime(this.d.currentTime()+5)};s.Nc=function(){this.d.currentTime(this.d.currentTime()-5)};t.lb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"progress",this.update)}});t.lb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.t("Loaded")+"</span>: 0%</span>"})};t.lb.prototype.update=function(){var a,c,d,e,g=this.d.buffered();a=this.d.duration();var h,j=this.d;h=j.buffered();j=j.duration();h=h.end(h.length-1);h>j&&(h=j);j=this.b.children;this.b.style.width=100*(h/a||0)+"%";for(a=0;a<g.length;a++)c=g.start(a),d=g.end(a),(e=j[a])||(e=this.b.appendChild(t.e())),e.style.left=100*(c/h||0)+"%",e.style.width=100*((d-c)/h||0)+"%";for(a=j.length;a>g.length;a--)this.b.removeChild(j[a-1])};t.$b=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.$b.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.t("Progress")+"</span>: 0%</span>"})};t.La=t.$.extend({i:function(a,c){t.$.call(this,a,c);this.c(a,"timeupdate",this.fa)}});t.La.prototype.defaultValue="00:00";t.La.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};t.La.prototype.fa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.b.innerHTML='<span class="vjs-control-text">'+t.za(a,this.d.duration())+"</span>"};t.rb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")})}});t.rb.prototype.m={children:{volumeBar:{}}};t.rb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.qb=t.S.extend({i:function(a,c){t.S.call(this,a,c);this.c(a,"volumechange",this.oa);a.K(t.bind(this,this.oa))}});s=t.qb.prototype;s.oa=function(){this.b.setAttribute("aria-valuenow",t.round(100*this.d.volume(),2));this.b.setAttribute("aria-valuetext",t.round(100*this.d.volume(),2)+"%")};s.m={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};s.Ec="volumechange";s.e=function(){return t.S.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.$a=function(a){this.d.muted()&&this.d.muted(l);this.d.volume(H(this,a))};s.Gb=function(){return this.d.muted()?0:this.d.volume()};s.Oc=function(){this.d.volume(this.d.volume()+0.1)};s.Nc=function(){this.d.volume(this.d.volume()-0.1)};t.hc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.hc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};t.sb=t.$.extend();t.sb.prototype.defaultValue="00:00";t.sb.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};t.ia=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.c(a,"volumechange",this.update);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")})}});t.ia.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.t("Mute")+"</span></div>"})};t.ia.prototype.s=function(){this.d.muted(this.d.muted()?l:f)};t.ia.prototype.update=function(){var a=this.d.volume(),c=3;0===a||this.d.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.d.muted()?this.b.children[0].children[0].innerHTML!=this.t("Unmute")&&(this.b.children[0].children[0].innerHTML=this.t("Unmute")):this.b.children[0].children[0].innerHTML!=this.t("Mute")&&(this.b.children[0].children[0].innerHTML=this.t("Mute"));for(a=0;4>a;a++)t.p(this.b,"vjs-vol-"+a);t.n(this.b,"vjs-vol-"+c)};t.sa=t.N.extend({i:function(a,c){t.N.call(this,a,c);this.c(a,"volumechange",this.update);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")});this.n("vjs-menu-button")}});t.sa.prototype.xa=function(){var a=new t.ha(this.d,{lc:"div"}),c=new t.qb(this.d,this.m.volumeBar);c.c("focus",function(){a.n("vjs-lock-showing")});c.c("blur",function(){E(a)});a.V(c);return a};t.sa.prototype.s=function(){t.ia.prototype.s.call(this);t.N.prototype.s.call(this)};t.sa.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.t("Mute")+"</span></div>"})};t.sa.prototype.update=t.ia.prototype.update;t.bc=t.N.extend({i:function(a,c){t.N.call(this,a,c);this.Tc();this.Sc();this.c(a,"loadstart",this.Tc);this.c(a,"ratechange",this.Sc)}});s=t.bc.prototype;s.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-playback-rate vjs-menu-button vjs-control",innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+this.t("Playback Rate")+"</span></div>"});this.Ac=t.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.Ac);return a};s.xa=function(){var a=new t.ha(this.k()),c=this.k().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.V(new t.nb(this.k(),{rate:c[d]+"x"}));return a};s.oa=function(){this.w().setAttribute("aria-valuenow",this.k().playbackRate())};s.s=function(){for(var a=this.k().playbackRate(),c=this.k().options().playbackRates,d=c[0],e=0;e<c.length;e++)if(c[e]>a){d=c[e];break}this.k().playbackRate(d)};function ea(a){return a.k().o&&a.k().o.featuresPlaybackRate&&a.k().options().playbackRates&&0<a.k().options().playbackRates.length}s.Tc=function(){ea(this)?this.p("vjs-hidden"):this.n("vjs-hidden")};s.Sc=function(){ea(this)&&(this.Ac.innerHTML=this.k().playbackRate()+"x")};t.nb=t.J.extend({lc:"button",i:function(a,c){var d=this.label=c.rate,e=this.Hc=parseFloat(d,10);c.label=d;c.selected=1===e;t.J.call(this,a,c);this.c(a,"ratechange",this.update)}});t.nb.prototype.s=function(){t.J.prototype.s.call(this);this.k().playbackRate(this.Hc)};t.nb.prototype.update=function(){this.selected(this.k().playbackRate()==this.Hc)};t.ra=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.update();a.c("posterchange",t.bind(this,this.update))}});t.ra.prototype.dispose=function(){this.k().j("posterchange",this.update);t.u.prototype.dispose.call(this)};t.ra.prototype.e=function(){var a=t.e("div",{className:"vjs-poster",tabIndex:-1});t.Wc||(this.Db=t.e("img"),a.appendChild(this.Db));return a};t.ra.prototype.update=function(){var a=this.k().poster(),c;this.Db?this.Db.src=a:(c="",a&&(c='url("'+a+'")'),this.b.style.backgroundImage=c);a?this.b.style.display="":this.Y()};t.ra.prototype.s=function(){this.d.play()};t.Zb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.Zb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};t.fb=t.u.extend();t.fb.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};t.fb.prototype.s=function(){this.d.play()};t.jb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.update();this.c(a,"error",this.update)}});t.jb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-error-display"});this.v=t.e("div");a.appendChild(this.v);return a};t.jb.prototype.update=function(){this.k().error()&&(this.v.innerHTML=this.t(this.k().error().message))};t.q=t.a.extend({i:function(a,c,d){c=c||{};c.Jc=l;t.a.call(this,a,c,d);this.featuresProgressEvents||(this.Bc=f,this.Gc=setInterval(t.bind(this,function(){var a=this.k().bufferedPercent();this.ld!=a&&this.k().l("progress");this.ld=a;1===a&&clearInterval(this.Gc)}),500));this.featuresTimeupdateEvents||(a=this.d,this.Lb=f,this.c(a,"play",this.Rc),this.c(a,"pause",this.cb),this.R("timeupdate",function(){this.featuresTimeupdateEvents=f;fa(this)}));var e;e=this.k();a=function(){if(e.controls()&&!e.usingNativeControls()){var a;this.c("mousedown",this.s);this.c("touchstart",function(){a=this.d.userActive()});this.c("touchmove",function(){a&&this.k().reportUserActivity()});this.c("touchend",function(a){a.preventDefault()});G(this);this.c("tap",this.Td)}};this.K(a);this.c(e,"controlsenabled",a);this.c(e,"controlsdisabled",this.Zd);this.K(function(){this.networkState&&0<this.networkState()&&this.k().l("loadstart")})}});s=t.q.prototype;s.Zd=function(){this.j("tap");this.j("touchstart");this.j("touchmove");this.j("touchleave");this.j("touchcancel");this.j("touchend");this.j("click");this.j("mousedown")};s.s=function(a){0===a.button&&this.k().controls()&&(this.k().paused()?this.k().play():this.k().pause())};s.Td=function(){this.k().userActive(!this.k().userActive())};function fa(a){a.Lb=l;a.cb();a.j("play",a.Rc);a.j("pause",a.cb)}
s.Rc=function(){this.mc&&this.cb();this.mc=setInterval(t.bind(this,function(){this.k().l("timeupdate")}),250)};s.cb=function(){clearInterval(this.mc);this.k().l("timeupdate")};s.dispose=function(){this.Bc&&(this.Bc=l,clearInterval(this.Gc));this.Lb&&fa(this);t.a.prototype.dispose.call(this)};s.Qb=function(){this.Lb&&this.k().l("timeupdate")};s.Lc=m();t.q.prototype.featuresVolumeControl=f;t.q.prototype.featuresFullscreenResize=l;t.q.prototype.featuresPlaybackRate=l;t.q.prototype.featuresProgressEvents=l;t.q.prototype.featuresTimeupdateEvents=l;t.media={};t.h=t.q.extend({i:function(a,c,d){this.featuresVolumeControl=t.h.nd();this.featuresPlaybackRate=t.h.md();this.movingMediaElementInDOM=!t.$c;this.featuresProgressEvents=this.featuresFullscreenResize=f;t.q.call(this,a,c,d);for(d=t.h.kb.length-1;0<=d;d--)this.c(t.h.kb[d],this.vd);if((c=c.source)&&this.b.currentSrc!==c.src||a.I&&3===a.I.Bd)this.b.src=c.src;if(t.ec&&a.options().nativeControlsForTouch===f){var e,g,h,j;e=this;g=this.k();c=g.controls();e.b.controls=!!c;h=function(){e.b.controls=f};j=function(){e.b.controls=l};g.c("controlsenabled",h);g.c("controlsdisabled",j);c=function(){g.j("controlsenabled",h);g.j("controlsdisabled",j)};e.c("dispose",c);g.c("usingcustomcontrols",c);g.usingNativeControls(f)}a.K(function(){this.I&&(this.m.autoplay&&this.paused())&&(delete this.I.poster,this.play())});this.Ga()}});s=t.h.prototype;s.dispose=function(){t.h.Bb(this.b);t.q.prototype.dispose.call(this)};s.e=function(){var a=this.d,c=a.I,d;if(!c||this.movingMediaElementInDOM===l)c?(d=c.cloneNode(l),t.h.Bb(c),c=d,a.I=k):(c=t.e("video"),t.Kc(c,t.g.z(a.ie||{},{id:a.id()+"_html5_api","class":"vjs-tech"}))),c.player=a,t.Hb(c,a.w());d=["autoplay","preload","loop","muted"];for(var e=d.length-1;0<=e;e--){var g=d[e],h={};"undefined"!==typeof a.m[g]&&(h[g]=a.m[g]);t.Kc(c,h)}return c};s.vd=function(a){"error"==a.type&&this.error()?this.k().error(this.error().code):(a.bubbles=l,this.k().l(a))};s.play=function(){this.b.play()};s.pause=function(){this.b.pause()};s.paused=function(){return this.b.paused};s.currentTime=function(){return this.b.currentTime};s.Qb=function(a){try{this.b.currentTime=a}catch(c){t.log(c,"Video is not ready. (Video.js)")}};s.duration=function(){return this.b.duration||0};s.buffered=function(){return this.b.buffered};s.volume=function(){return this.b.volume};s.fe=function(a){this.b.volume=a};s.muted=function(){return this.b.muted};s.ce=function(a){this.b.muted=a};s.width=function(){return this.b.offsetWidth};s.height=function(){return this.b.offsetHeight};s.Ea=function(){return"function"==typeof this.b.webkitEnterFullScreen&&(/Android/.test(t.O)||!/Chrome|Mac OS X 10.5/.test(t.O))?f:l};s.pc=function(){var a=this.b;"webkitDisplayingFullscreen"in a&&this.R("webkitbeginfullscreen",function(){this.d.isFullscreen(f);this.R("webkitendfullscreen",function(){this.d.isFullscreen(l);this.d.l("fullscreenchange")});this.d.l("fullscreenchange")});a.paused&&a.networkState<=a.ne?(this.b.play(),setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};s.wd=function(){this.b.webkitExitFullScreen()};s.src=function(a){if(a===b)return this.b.src;this.b.src=a};s.load=function(){this.b.load()};s.currentSrc=function(){return this.b.currentSrc};s.poster=function(){return this.b.poster};s.Lc=function(a){this.b.poster=a};s.Da=function(){return this.b.Da};s.ee=function(a){this.b.Da=a};s.autoplay=function(){return this.b.autoplay};s.$d=function(a){this.b.autoplay=a};s.controls=function(){return this.b.controls};s.loop=function(){return this.b.loop};s.be=function(a){this.b.loop=a};s.error=function(){return this.b.error};s.seeking=function(){return this.b.seeking};s.ended=function(){return this.b.ended};s.playbackRate=function(){return this.b.playbackRate};s.de=function(a){this.b.playbackRate=a};s.networkState=function(){return this.b.networkState};t.h.isSupported=function(){try{t.A.volume=0.5}catch(a){return l}return!!t.A.canPlayType};t.h.vb=function(a){try{return!!t.A.canPlayType(a.type)}catch(c){return""}};t.h.nd=function(){var a=t.A.volume;t.A.volume=a/2+0.1;return a!==t.A.volume};t.h.md=function(){var a=t.A.playbackRate;t.A.playbackRate=a/2+0.1;return a!==t.A.playbackRate};var V,ga=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,ha=/^video\/mp4/i;t.h.Dc=function(){4<=t.Ub&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ga.test(a)?"maybe":V.call(this,a)});t.dd&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ha.test(a)?"maybe":V.call(this,a)})};t.h.le=function(){var a=t.A.constructor.prototype.canPlayType;t.A.constructor.prototype.canPlayType=V;V=k;return a};t.h.Dc();t.h.kb="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");t.h.Bb=function(a){if(a){a.player=k;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};t.f=t.q.extend({i:function(a,c,d){t.q.call(this,a,c,d);var e=c.source;d=c.parentEl;var g=this.b=t.e("div",{id:a.id()+"_temp_flash"}),h=a.id()+"_flash_api",j=a.m,j=t.g.z({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:j.autoplay,preload:j.Da,loop:j.loop,muted:j.muted},c.flashVars),n=t.g.z({wmode:"opaque",bgcolor:"#fff"},c.params),h=t.g.z({id:h,name:h,"class":"vjs-tech"},c.attributes);e&&(e.type&&t.f.Gd(e.type)?(e=t.f.Pc(e.src),j.rtmpConnection=encodeURIComponent(e.wb),j.rtmpStream=encodeURIComponent(e.Rb)):j.src=encodeURIComponent(t.tc(e.src)));t.Hb(g,d);c.startTime&&this.K(function(){this.load();this.play();this.currentTime(c.startTime)});t.Zc&&this.K(function(){this.c("mousemove",function(){this.k().l({type:"mousemove",bubbles:l})})});a.c("stageclick",a.reportUserActivity);this.b=t.f.oc(c.swf,g,j,n,h)}});t.f.prototype.dispose=function(){t.q.prototype.dispose.call(this)};t.f.prototype.play=function(){this.b.vjs_play()};t.f.prototype.pause=function(){this.b.vjs_pause()};t.f.prototype.src=function(a){if(a===b)return this.currentSrc();t.f.Fd(a)?(a=t.f.Pc(a),this.xe(a.wb),this.ye(a.Rb)):(a=t.tc(a),this.b.vjs_src(a));if(this.d.autoplay()){var c=this;setTimeout(function(){c.play()},0)}};t.f.prototype.setCurrentTime=function(a){this.Jd=a;this.b.vjs_setProperty("currentTime",a);t.q.prototype.Qb.call(this)};t.f.prototype.currentTime=function(){return this.seeking()?this.Jd||0:this.b.vjs_getProperty("currentTime")};t.f.prototype.currentSrc=function(){var a=this.b.vjs_getProperty("currentSrc");if(a==k){var c=this.rtmpConnection(),d=this.rtmpStream();c&&d&&(a=t.f.ge(c,d))}return a};t.f.prototype.load=function(){this.b.vjs_load()};t.f.prototype.poster=function(){this.b.vjs_getProperty("poster")};t.f.prototype.setPoster=m();t.f.prototype.buffered=function(){return t.zb(0,this.b.vjs_getProperty("buffered"))};t.f.prototype.Ea=q(l);t.f.prototype.pc=q(l);function ia(){var a=W[X],c=a.charAt(0).toUpperCase()+a.slice(1);ja["set"+c]=function(c){return this.b.vjs_setProperty(a,c)}}function ka(a){ja[a]=function(){return this.b.vjs_getProperty(a)}}
var ja=t.f.prototype,W="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),la="error networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" "),X;for(X=0;X<W.length;X++)ka(W[X]),ia();for(X=0;X<la.length;X++)ka(la[X]);t.f.isSupported=function(){return 10<=t.f.version()[0]};t.f.vb=function(a){if(!a.type)return"";a=a.type.replace(/;.*/,"").toLowerCase();if(a in t.f.yd||a in t.f.Qc)return"maybe"};t.f.yd={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};t.f.Qc={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};t.f.onReady=function(a){var c;if(c=(a=t.w(a))&&a.parentNode&&a.parentNode.player)a.player=c,t.f.checkReady(c.o)};t.f.checkReady=function(a){a.w()&&(a.w().vjs_getProperty?a.Ga():setTimeout(function(){t.f.checkReady(a)},50))};t.f.onEvent=function(a,c){t.w(a).player.l(c)};t.f.onError=function(a,c){var d=t.w(a).player,e="FLASH: "+c;"srcnotfound"==c?d.error({code:4,message:e}):d.error(e)};t.f.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};t.f.oc=function(a,c,d,e,g){a=t.f.Ad(a,d,e,g);a=t.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var h=d.childNodes[0];setTimeout(function(){h.style.display="block"},1E3);return a};t.f.Ad=function(a,c,d,e){var g="",h="",j="";c&&t.g.X(c,function(a,c){g+=a+"="+c+"&amp;"});d=t.g.z({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);t.g.X(d,function(a,c){h+='<param name="'+a+'" value="'+c+'" />'});e=t.g.z({data:a,width:"100%",height:"100%"},e);t.g.X(e,function(a,c){j+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash"'+j+">"+h+"</object>"};t.f.ge=function(a,c){return a+"&"+c};t.f.Pc=function(a){var c={wb:"",Rb:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.wb=a.substring(0,d);c.Rb=a.substring(e,a.length);return c};t.f.Gd=function(a){return a in t.f.Qc};t.f.fd=/^rtmp[set]?:\/\//i;t.f.Fd=function(a){return t.f.fd.test(a)};t.ed=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(!a.m.sources||0===a.m.sources.length){c=0;for(d=a.m.techOrder;c<d.length;c++){var e=t.ba(d[c]),g=window.videojs[e];if(g&&g.isSupported()){Q(a,e);break}}}else a.src(a.m.sources)}});t.Player.prototype.textTracks=function(){return this.Fa=this.Fa||[]};function ma(a,c,d,e,g){var h=a.Fa=a.Fa||[];g=g||{};g.kind=c;g.label=d;g.language=e;c=t.ba(c||"subtitles");var j=new window.videojs[c+"Track"](a,g);h.push(j);j.Ab()&&a.K(function(){setTimeout(function(){Y(j.k(),j.id())},0)})}function Y(a,c,d){for(var e=a.Fa,g=0,h=e.length,j,n;g<h;g++)j=e[g],j.id()===c?(j.show(),n=j):d&&(j.M()==d&&0<j.mode())&&j.disable();(c=n?n.M():d?d:l)&&a.l(c+"trackchange")}
t.B=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.L=c.id||"vjs_"+c.kind+"_"+c.language+"_"+t.r++;this.Mc=c.src;this.sd=c["default"]||c.dflt;this.je=c.title;this.Ua=c.srclang;this.Hd=c.label;this.ca=[];this.tb=[];this.ma=this.na=0}});s=t.B.prototype;s.M=p("H");s.src=p("Mc");s.Ab=p("sd");s.title=p("je");s.language=p("Ua");s.label=p("Hd");s.od=p("ca");s.gd=p("tb");s.readyState=p("na");s.mode=p("ma");s.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-"+this.H+" vjs-text-track"})};s.show=function(){na(this);this.ma=2;t.a.prototype.show.call(this)};s.Y=function(){na(this);this.ma=1;t.a.prototype.Y.call(this)};s.disable=function(){2==this.ma&&this.Y();this.d.j("timeupdate",t.bind(this,this.update,this.L));this.d.j("ended",t.bind(this,this.reset,this.L));this.reset();this.d.ka("textTrackDisplay").removeChild(this);this.ma=0};function na(a){0===a.na&&a.load();0===a.ma&&(a.d.c("timeupdate",t.bind(a,a.update,a.L)),a.d.c("ended",t.bind(a,a.reset,a.L)),("captions"===a.H||"subtitles"===a.H)&&a.d.ka("textTrackDisplay").V(a))}s.load=function(){0===this.na&&(this.na=1,t.get(this.Mc,t.bind(this,this.Wd),t.bind(this,this.Md)))};s.Md=function(a){this.error=a;this.na=3;this.l("error")};s.Wd=function(a){var c,d;a=a.split("\n");for(var e="",g=1,h=a.length;g<h;g++)if(e=t.trim(a[g])){-1==e.indexOf("--\x3e")?(c=e,e=t.trim(a[++g])):c=this.ca.length;c={id:c,index:this.ca.length};d=e.split(/[\t ]+/);c.startTime=oa(d[0]);c.ya=oa(d[2]);for(d=[];a[++g]&&(e=t.trim(a[g]));)d.push(e);c.text=d.join("<br/>");this.ca.push(c)}this.na=2;this.l("loaded")};function oa(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
s.update=function(){if(0<this.ca.length){var a=this.d.options().trackTimeOffset||0,a=this.d.currentTime()+a;if(this.Pb===b||a<this.Pb||this.Wa<=a){var c=this.ca,d=this.d.duration(),e=0,g=l,h=[],j,n,r,w;a>=this.Wa||this.Wa===b?w=this.Eb!==b?this.Eb:0:(g=f,w=this.Kb!==b?this.Kb:c.length-1);for(;;){r=c[w];if(r.ya<=a)e=Math.max(e,r.ya),r.Na&&(r.Na=l);else if(a<r.startTime){if(d=Math.min(d,r.startTime),r.Na&&(r.Na=l),!g)break}else g?(h.splice(0,0,r),n===b&&(n=w),j=w):(h.push(r),j===b&&(j=w),n=w),d=Math.min(d,r.ya),e=Math.max(e,r.startTime),r.Na=f;if(g)if(0===w)break;else w--;else if(w===c.length-1)break;else w++}this.tb=h;this.Wa=d;this.Pb=e;this.Eb=j;this.Kb=n;j=this.tb;n="";a=0;for(c=j.length;a<c;a++)n+='<span class="vjs-tt-cue">'+j[a].text+"</span>";this.b.innerHTML=n;this.l("cuechange")}}};s.reset=function(){this.Wa=0;this.Pb=this.d.duration();this.Kb=this.Eb=0};t.Wb=t.B.extend();t.Wb.prototype.H="captions";t.dc=t.B.extend();t.dc.prototype.H="subtitles";t.Xb=t.B.extend();t.Xb.prototype.H="chapters";t.fc=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(a.m.tracks&&0<a.m.tracks.length){c=this.d;a=a.m.tracks;for(var e=0;e<a.length;e++)d=a[e],ma(c,d.kind,d.label,d.language,d)}}});t.fc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};t.aa=t.J.extend({i:function(a,c){var d=this.ea=c.track;c.label=d.label();c.selected=d.Ab();t.J.call(this,a,c);this.c(a,d.M()+"trackchange",this.update)}});t.aa.prototype.s=function(){t.J.prototype.s.call(this);Y(this.d,this.ea.L,this.ea.M())};t.aa.prototype.update=function(){this.selected(2==this.ea.mode())};t.mb=t.aa.extend({i:function(a,c){c.track={M:function(){return c.kind},k:a,label:function(){return c.kind+" off"},Ab:q(l),mode:q(l)};t.aa.call(this,a,c);this.selected(f)}});t.mb.prototype.s=function(){t.aa.prototype.s.call(this);Y(this.d,this.ea.L,this.ea.M())};t.mb.prototype.update=function(){for(var a=this.d.textTracks(),c=0,d=a.length,e,g=f;c<d;c++)e=a[c],e.M()==this.ea.M()&&2==e.mode()&&(g=l);this.selected(g)};t.U=t.N.extend({i:function(a,c){t.N.call(this,a,c);1>=this.Q.length&&this.Y()}});t.U.prototype.wa=function(){var a=[],c;a.push(new t.mb(this.d,{kind:this.H}));for(var d=0;d<this.d.textTracks().length;d++)c=this.d.textTracks()[d],c.M()===this.H&&a.push(new t.aa(this.d,{track:c}));return a};t.Ha=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Captions Menu")}});t.Ha.prototype.H="captions";t.Ha.prototype.ua="Captions";t.Ha.prototype.className="vjs-captions-button";t.Ma=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Subtitles Menu")}});t.Ma.prototype.H="subtitles";t.Ma.prototype.ua="Subtitles";t.Ma.prototype.className="vjs-subtitles-button";t.Ia=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Chapters Menu")}});s=t.Ia.prototype;s.H="chapters";s.ua="Chapters";s.className="vjs-chapters-button";s.wa=function(){for(var a=[],c,d=0;d<this.d.textTracks().length;d++)c=this.d.textTracks()[d],c.M()===this.H&&a.push(new t.aa(this.d,{track:c}));return a};s.xa=function(){for(var a=this.d.textTracks(),c=0,d=a.length,e,g,h=this.Q=[];c<d;c++)if(e=a[c],e.M()==this.H)if(0===e.readyState())e.load(),e.c("loaded",t.bind(this,this.xa));else{g=e;break}a=this.Ba;a===b&&(a=new t.ha(this.d),a.ja().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.H),he:-1})));if(g){e=g.ca;for(var j,c=0,d=e.length;c<d;c++)j=e[c],j=new t.gb(this.d,{track:g,cue:j}),h.push(j),a.V(j);this.V(a)}0<this.Q.length&&this.show();return a};t.gb=t.J.extend({i:function(a,c){var d=this.ea=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.ya;t.J.call(this,a,c);d.c("cuechange",t.bind(this,this.update))}});t.gb.prototype.s=function(){t.J.prototype.s.call(this);this.d.currentTime(this.cue.startTime);this.update(this.cue.startTime)};t.gb.prototype.update=function(){var a=this.cue,c=this.d.currentTime();this.selected(a.startTime<=c&&c<a.ya)};t.g.z(t.Ja.prototype.m.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});if("undefined"!==typeof window.JSON&&"function"===typeof window.JSON.parse)t.JSON=window.JSON;else{t.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;t.JSON.parse=function(a,c){function d(a,e){var j,n,r=a[e];if(r&&"object"===typeof r)for(j in r)Object.prototype.hasOwnProperty.call(r,j)&&(n=d(r,j),n!==b?r[j]=n:delete r[j]);return c.call(a,e,r)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+
a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
t.jc=function(){var a,c,d,e;a=document.getElementsByTagName("video");c=document.getElementsByTagName("audio");var g=[];if(a&&0<a.length){d=0;for(e=a.length;d<e;d++)g.push(a[d])}if(c&&0<c.length){d=0;for(e=c.length;d<e;d++)g.push(c[d])}if(g&&0<g.length){d=0;for(e=g.length;d<e;d++)if((c=g[d])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==k&&videojs(c));else{t.ub();break}}else t.Uc||t.ub()};t.ub=function(){setTimeout(t.jc,1)};"complete"===document.readyState?t.Uc=f:t.R(window,"load",function(){t.Uc=f});t.ub();t.Yd=function(a,c){t.Player.prototype[a]=c};var pa=this;function $(a,c){var d=a.split("."),e=pa;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",t);$("_V_",t);$("videojs.options",t.options);$("videojs.players",t.Ca);$("videojs.TOUCH_ENABLED",t.ec);$("videojs.cache",t.va);$("videojs.Component",t.a);t.a.prototype.player=t.a.prototype.k;t.a.prototype.options=t.a.prototype.options;t.a.prototype.init=t.a.prototype.i;t.a.prototype.dispose=t.a.prototype.dispose;t.a.prototype.createEl=t.a.prototype.e;t.a.prototype.contentEl=t.a.prototype.ja;t.a.prototype.el=t.a.prototype.w;t.a.prototype.addChild=t.a.prototype.V;t.a.prototype.getChild=t.a.prototype.ka;t.a.prototype.getChildById=t.a.prototype.zd;t.a.prototype.children=t.a.prototype.children;t.a.prototype.initChildren=t.a.prototype.wc;t.a.prototype.removeChild=t.a.prototype.removeChild;t.a.prototype.on=t.a.prototype.c;t.a.prototype.off=t.a.prototype.j;t.a.prototype.one=t.a.prototype.R;t.a.prototype.trigger=t.a.prototype.l;t.a.prototype.triggerReady=t.a.prototype.Ga;t.a.prototype.show=t.a.prototype.show;t.a.prototype.hide=t.a.prototype.Y;t.a.prototype.width=t.a.prototype.width;t.a.prototype.height=t.a.prototype.height;t.a.prototype.dimensions=t.a.prototype.td;t.a.prototype.ready=t.a.prototype.K;t.a.prototype.addClass=t.a.prototype.n;t.a.prototype.removeClass=t.a.prototype.p;t.a.prototype.buildCSSClass=t.a.prototype.T;t.a.prototype.localize=t.a.prototype.t;t.Player.prototype.ended=t.Player.prototype.ended;t.Player.prototype.enterFullWindow=t.Player.prototype.qc;t.Player.prototype.exitFullWindow=t.Player.prototype.Cb;t.Player.prototype.preload=t.Player.prototype.Da;t.Player.prototype.remainingTime=t.Player.prototype.remainingTime;t.Player.prototype.supportsFullScreen=t.Player.prototype.Ea;t.Player.prototype.currentType=t.Player.prototype.pd;t.Player.prototype.requestFullScreen=t.Player.prototype.requestFullScreen;t.Player.prototype.requestFullscreen=t.Player.prototype.requestFullscreen;t.Player.prototype.cancelFullScreen=t.Player.prototype.cancelFullScreen;t.Player.prototype.exitFullscreen=t.Player.prototype.exitFullscreen;t.Player.prototype.isFullScreen=t.Player.prototype.isFullScreen;t.Player.prototype.isFullscreen=t.Player.prototype.isFullscreen;$("videojs.MediaLoader",t.ed);$("videojs.TextTrackDisplay",t.fc);$("videojs.ControlBar",t.Ja);$("videojs.Button",t.u);$("videojs.PlayToggle",t.ac);$("videojs.FullscreenToggle",t.Ka);$("videojs.BigPlayButton",t.fb);$("videojs.LoadingSpinner",t.Zb);$("videojs.CurrentTimeDisplay",t.hb);$("videojs.DurationDisplay",t.ib);$("videojs.TimeDivider",t.gc);$("videojs.RemainingTimeDisplay",t.pb);$("videojs.LiveDisplay",t.Yb);$("videojs.ErrorDisplay",t.jb);$("videojs.Slider",t.S);$("videojs.ProgressControl",t.ob);$("videojs.SeekBar",t.cc);$("videojs.LoadProgressBar",t.lb);$("videojs.PlayProgressBar",t.$b);$("videojs.SeekHandle",t.La);$("videojs.VolumeControl",t.rb);$("videojs.VolumeBar",t.qb);$("videojs.VolumeLevel",t.hc);$("videojs.VolumeMenuButton",t.sa);$("videojs.VolumeHandle",t.sb);$("videojs.MuteToggle",t.ia);$("videojs.PosterImage",t.ra);$("videojs.Menu",t.ha);$("videojs.MenuItem",t.J);$("videojs.MenuButton",t.N);$("videojs.PlaybackRateMenuButton",t.bc);t.N.prototype.createItems=t.N.prototype.wa;t.U.prototype.createItems=t.U.prototype.wa;t.Ia.prototype.createItems=t.Ia.prototype.wa;$("videojs.SubtitlesButton",t.Ma);$("videojs.CaptionsButton",t.Ha);$("videojs.ChaptersButton",t.Ia);$("videojs.MediaTechController",t.q);t.q.prototype.featuresVolumeControl=t.q.prototype.ue;t.q.prototype.featuresFullscreenResize=t.q.prototype.qe;t.q.prototype.featuresPlaybackRate=t.q.prototype.re;t.q.prototype.featuresProgressEvents=t.q.prototype.se;t.q.prototype.featuresTimeupdateEvents=t.q.prototype.te;t.q.prototype.setPoster=t.q.prototype.Lc;$("videojs.Html5",t.h);t.h.Events=t.h.kb;t.h.isSupported=t.h.isSupported;t.h.canPlaySource=t.h.vb;t.h.patchCanPlayType=t.h.Dc;t.h.unpatchCanPlayType=t.h.le;t.h.prototype.setCurrentTime=t.h.prototype.Qb;t.h.prototype.setVolume=t.h.prototype.fe;t.h.prototype.setMuted=t.h.prototype.ce;t.h.prototype.setPreload=t.h.prototype.ee;t.h.prototype.setAutoplay=t.h.prototype.$d;t.h.prototype.setLoop=t.h.prototype.be;t.h.prototype.enterFullScreen=t.h.prototype.pc;t.h.prototype.exitFullScreen=t.h.prototype.wd;t.h.prototype.playbackRate=t.h.prototype.playbackRate;t.h.prototype.setPlaybackRate=t.h.prototype.de;$("videojs.Flash",t.f);t.f.isSupported=t.f.isSupported;t.f.canPlaySource=t.f.vb;t.f.onReady=t.f.onReady;t.f.embed=t.f.oc;t.f.version=t.f.version;$("videojs.TextTrack",t.B);t.B.prototype.label=t.B.prototype.label;t.B.prototype.kind=t.B.prototype.M;t.B.prototype.mode=t.B.prototype.mode;t.B.prototype.cues=t.B.prototype.od;t.B.prototype.activeCues=t.B.prototype.gd;$("videojs.CaptionsTrack",t.Wb);$("videojs.SubtitlesTrack",t.dc);$("videojs.ChaptersTrack",t.Xb);$("videojs.autoSetup",t.jc);$("videojs.plugin",t.Yd);$("videojs.createTimeRange",t.zb);$("videojs.util",t.ga);t.ga.mergeOptions=t.ga.Va;t.addLanguage=t.hd;})();