PageSourceSearch

https://svetubytovani.cz/static/CACHE/js/cf67e8a5e65f.js

js svetubytovani.cz collected 2026-10-02 19:03:33 UTC 78,206 bytes, 655 lines download raw bytes

1/*!
2 * jQuery Cookie Plugin v1.4.0
3 * https://github.com/carhartl/jquery-cookie
4 *
5 * Copyright 2013 Klaus Hartl
6 * Released under the MIT license
7 */(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else{factory(jQuery);}}(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s);}
8function decode(s){return config.raw?s:decodeURIComponent(s);}
9function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value));}
10function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\');}
11try{s=decodeURIComponent(s.replace(pluses,' '));}catch(e){return;}
12try{return config.json?JSON.parse(s):s;}catch(e){}}
13function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value;}
14var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}
15return(document.cookie=[encode(key),'=',stringifyCookieValue(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}
16var result=key?undefined:{};var cookies=document.cookie?document.cookie.split('; '):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('=');var name=decode(parts.shift());var cookie=parts.join('=');if(key&&key===name){result=read(cookie,value);break;}
17if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie;}}
18return result;};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)!==undefined){$.cookie(key,'',$.extend({},options,{expires:-1}));return true;}
19return false;};}));jQuery(function($){$('.fotogalerie .thumbnails a').on('click',function(e){var carousel=$('.carousel');carousel.carousel($(this).data('thumb')-1);carousel.carousel('pause');carousel.bind('slid',function(){carousel.carousel('pause');});$('#galerie').modal();});$('.pobyt .thumb').on({mouseenter:function(){$(this).parent().find('.pobyt-detail').show();},mouseleave:function(){$(this).parent().find('.pobyt-detail').hide();}});$('.previorating a').on('click',function(){$('#reviews').modal();});$(".navobjekt a").not('.bgo').on('click',function(e){e.preventDefault();var go_to=$(this).attr("href");$("html, body").animate({scrollTop:$(go_to).offset().top-10});});$(".dalsi-mesta").on('click',function(e){e.preventDefault();var go_to=$(this).attr("href");$("html, body").animate({scrollTop:$(go_to).offset().top-10});});$(".nav-home a").on('click',function(e){e.preventDefault();var go_to=$(this).attr("href");$("html, body").animate({scrollTop:$(go_to).offset().top-10});});$('.seznam-objektu-nahradit .online-flag span').tooltip({placement:'bottom'});$('.objekt-info div').tooltip({placement:'top'});$('.objektbarheader .flag').tooltip({placement:'top'});$('.tool-pozice').tooltip({placement:'bottom'});$('.myitem-rating .progress').tooltip({placement:'bottom'});$('#mapa-panel').tooltip({placement:'bottom'});$('.svet-weather label').parent().tooltip({placement:'bottom'});var setDateForm={container:$('.set-date'),config:{effect:'slideToggle',speed:500},init:function(config){$.extend(this.config,config);$('.set-date-calendar').on('click',this.show).tooltip({title:'Zadejte předpokládaný datum odjezdu a příjezdu.',placement:'top'});$('.set-date #submit-id-submit_obsazenost').on('click',this.log);},show:function(){},close:function(){},log:function(){var datum_od=$('.set-date #id_prijezd').val();var datum_do=$('.set-date #id_odjezd').val();ga('send','event',{'eventCategory':'PrijezdOdjezd','eventAction':'Datum','eventLabel':datum_od+"-"+datum_do});}};var $clanek_imgs=$('.clanek-obsah img');$clanek_imgs.each(function(){var $this=$(this);$this.wrap("<div class='thumbnail'></div>");if($this.attr('alt')){$('<p></p>',{'class':'img-popis','text':$this.attr('alt')}).insertAfter($this);}});if($clanek_imgs.length>0){$clanek_imgs.parent().addClass('img-clanek');$clanek_imgs.parent().filter(':odd').addClass('img-clanek-left');}
20setDateForm.init({effect:'fadeToggle',speed:300});$('canvas').each(function(index,element){fitToContainer(element);});function fitToContainer(canvas){canvas.style.width='100%';canvas.style.height='100%';}
21var pano=$('.pnrmioblock img').each(function(){var pnrmio=$('<div></div>',{'text':'Obrázek dodalo ','class':'pnrmio'}).insertAfter($(this));$('<a></a>',{href:$(this).data('panoramio'),text:'Panoramio'}
21).appendTo(pnrmio);pnrmio.hide();$(this).parent().on('hover',function(){pnrmio.slideToggle({duration:200,easing:'swing'});});});});function isIE(){var myNav=navigator.userAgent.toLowerCase();return(myNav.indexOf('msie')!=-1)?parseInt(myNav.split('msie')[1]):false;}
22!function($){"use strict";$(function(){$.support.transition=(function(){var transitionEnd=(function(){var el=document.createElement('bootstrap'),transEndEventNames={'WebkitTransition':'webkitTransitionEnd','MozTransition':'transitionend','OTransition':'oTransitionEnd otransitionend','transition':'transitionend'},name
23for(name in transEndEventNames){if(el.style[name]!==undefined){return transEndEventNames[name]}}}())
24return transitionEnd&&{end:transitionEnd}})()})}(window.jQuery);!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on('click',dismiss,this.close)}
25Alert.prototype.close=function(e){var $this=$(this),selector=$this.attr('data-target'),$parent
26if(!selector){selector=$this.attr('href')
27selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
28$parent=$(selector)
29e&&e.preventDefault()
30$parent.length||($parent=$this.hasClass('alert')?$this:$this.parent())
31$parent.trigger(e=$.Event('close'))
32if(e.isDefaultPrevented())return
33$parent.removeClass('in')
34function removeElement(){$parent.trigger('closed').remove()}
35$.support.transition&&$parent.hasClass('fade')?$parent.on($.support.transition.end,removeElement):removeElement()}
36var old=$.fn.alert
37$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data('alert')
38if(!data)$this.data('alert',(data=new Alert(this)))
39if(typeof option=='string')data[option].call($this)})}
40$.fn.alert.Constructor=Alert
41$.fn.alert.noConflict=function(){$.fn.alert=old
42return this}
43$(document).on('click.alert.data-api',dismiss,Alert.prototype.close)}(window.jQuery);!function($){"use strict";var Button=function(element,options){this.$element=$(element)
44this.options=$.extend({},$.fn.button.defaults,options)}
45Button.prototype.setState=function(state){var d='disabled',$el=this.$element,data=$el.data(),val=$el.is('input')?'val':'html'
46state=state+'Text'
47data.resetText||$el.data('resetText',$el[val]())
48$el[val](data[state]||this.options[state])
49setTimeout(function(){state=='loadingText'?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)}
50Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons-radio"]')
51$parent&&$parent.find('.active').removeClass('active')
52this.$element.toggleClass('active')}
53var old=$.fn.button
54$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data('button'),options=typeof option=='object'&&option
55if(!data)$this.data('button',(data=new Button(this,options)))
56if(option=='toggle')data.toggle()
57else if(option)data.setState(option)})}
58$.fn.button.defaults={loadingText:'loading...'}
59$.fn.button.Constructor=Button
60$.fn.button.noConflict=function(){$.fn.button=old
61return this}
62$(document).on('click.button.data-api','[data-toggle^=button]',function(e){var $btn=$(e.target)
63if(!$btn.hasClass('btn'))$btn=$btn.closest('.btn')
64$btn.button('toggle')})}(window.jQuery);!function($){"use strict";var Carousel=function(element,options){this.$element=$(element)
65this.options=options
66this.options.pause=='hover'&&this.$element.on('mouseenter',$.proxy(this.pause,this)).on('mouseleave',$.proxy(this.cycle,this))}
67Carousel.prototype={cycle:function(e){if(!e)this.paused=false
68this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval))
69return this},to:function(pos){var $active=this.$element.find('.item.active'),children=$active.parent().children(),activePos=children.index($active),that=this
70if(pos>(children.length-1)||pos<0)return
71if(this.sliding){return this.$element.one('slid',function(){that.to(pos)})}
72if(activePos==pos){return this.pause().cycle()}
73return this.slide(pos>activePos?'next':'prev',$(children[pos]))},pause:function(e){if(!e)this.paused=true
74if(this.$element.find('.next, .prev').length&&$.support.transition.end){this.$element.trigger($.support.transition.end)
75this.cycle()}
76clearInterval(this.interval)
77this.interval=null
78return this},next:function(){if(this.sliding)return
79return this.slide('next')},prev:function(){if(this.sliding)return
80return this.slide('prev')},slide:function(type,next){var $active=this.$element.find('.item.active'),$next=next||$active[type](),isCycling=this.interval,direction=type=='next'?'left':'right',fallback=type=='next'?'first':'last',that=this,e
81this.sliding=true
82isCycling&&this.pause()
83$next=$next.length?$next:this.$element.find('.item')[fallback]()
84e=$.Event('slide',{relatedTarget:$next[0]})
85if($next.hasClass('active'))return
86if($.support.transition&&this.$element.hasClass('slide')){this.$element.trigger(e)
87if(e.isDefaultPrevented())return
88$next.addClass(type)
89$next[0].offsetWidth
90$active.addClass(direction)
91$next.addClass(direction)
92this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(' ')).addClass('active')
93$active.removeClass(['active',direction].join(' '))
94that.sliding=false
95setTimeout(function(){that.$element.trigger('slid')},0)})}else{this.$element.trigger(e)
96if(e.isDefaultPrevented())return
97$active.removeClass('active')
98$next.addClass('active')
99this.sliding=false
100this.$element.trigger('slid')}
101isCycling&&this.cycle()
102return this}}
103var old=$.fn.carousel
104$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data('carousel'),options=$.extend({},$.fn.carousel.defaults,typeof option=='object'&&option),action=typeof option=='string'?option:options.slide
105if(!data)$this.data('carousel',(data=new Carousel(this,options)))
106if(typeof option=='number')data.to(option)
107else if(action)data[action]()
108else if(options.interval)data.cycle()})}
109$.fn.carousel.defaults={interval:5000,pause:'hover'}
110$.fn.carousel.Constructor=Carousel
111$.fn.carousel.noConflict=function(){$.fn.carousel=old
112return this}
113$(document).on('click.carousel.data-api','[data-slide]',function(e){var $this=$(this),href,$target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')),options=$.extend({},$target.data(),$this.data())
114$target.carousel(options)
115e.preventDefault()})}(window.jQuery);!function($){"use strict";var Collapse=function(element,options){this.$element=$(element)
116this.options=$.extend({},$.fn.collapse.defaults,options)
117if(this.options.parent){this.$parent=$(this.options.parent)}
118this.options.toggle&&this.toggle()}
119Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass('width')
120return hasWidth?'width':'height'},show:function(){var dimension,scroll,actives,hasData
121if(this.transitioning)return
122dimension=this.dimension()
123scroll=$.camelCase(['scroll',dimension].join('-'))
124actives=this.$parent&&this.$parent.find('> .accordion-group > .in')
125if(actives&&actives.length){hasData=actives.data('collapse')
126if(hasData&&hasData.transitioning)return
127actives.collapse('hide')
128hasData||actives.data('collapse',null)}
129this.$element[dimension](0)
130this.transition('addClass',$.Event('show'),'shown')
131$.support.transition&&this.$element[dimension](this.$element[0][scroll])},hide:function(){var dimension
132if(this.transitioning)return
133dimension=this.dimension()
134this.reset(this.$element[dimension]())
135this.transition('removeClass',$.Event('hide'),'hidden')
136this.$element[dimension](0)},reset:function(size){var dimension=this.dimension()
137this.$element.removeClass('collapse')
138[dimension](size||'auto')
139[0].offsetWidth
140this.$element[size!==null?'addClass':'removeClass']('collapse')
141return this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){if(startEvent.type=='show')that.reset()
142that.transitioning=0
143that.$element.trigger(completeEvent)}
144this.$element.trigger(startEvent)
145if(startEvent.isDefaultPrevented())return
146this.transitioning=1
147this.$element[method]('in')
148$.support.transition&&this.$element.hasClass('collapse')?this.$element.one($.support.transition.end,complete):complete()},toggle:function(){this[this.$element.hasClass('in')?'hide':'show']()}}
149var old=$.fn.collapse
150$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data('collapse'),options=typeof option=='object'&&option
151if(!data)$this.data('collapse',(data=new Collapse(this,options)))
152if(typeof option=='string')data[option]()})}
153$.fn.collapse.defaults={toggle:true}
154$.fn.collapse.Constructor=Collapse
155$.fn.collapse.noConflict=function(){$.fn.collapse=old
156return this}
157$(document).on('click.collapse.data-api','[data-toggle=collapse]',function(e){var $this=$(this),href,target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''),option=$(target).data('collapse')?'toggle':$this.data()
158$this[$(target).hasClass('in')?'addClass':'removeClass']('collapsed')
159$(target).collapse(option)})}(window.jQuery);!function($){"use strict";var toggle='[data-toggle=dropdown]',Dropdown=function(element){var $el=$(element).on('click.dropdown.data-api',this.toggle)
160$('html').on('click.dropdown.data-api',function(){$el.parent().removeClass('open')})}
161Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $this=$(this),$parent,isActive
162if($this.is('.disabled, :disabled'))return
163$parent=getParent($this)
164isActive=$parent.hasClass('open')
165clearMenus()
166if(!isActive){$parent.toggleClass('open')}
167$this.focus()
168return false},keydown:function(e){var $this,$items,$active,$parent,isActive,index
169if(!/(38|40|27)/.test(e.keyCode))return
170$this=$(this)
171e.preventDefault()
172e.stopPropagation()
173if($this.is('.disabled, :disabled'))return
174$parent=getParent($this)
175isActive=$parent.hasClass('open')
176if(!isActive||(isActive&&e.keyCode==27))return $this.click()
177$items=$('[role=menu] li:not(.divider):visible a',$parent)
178if(!$items.length)return
179index=$items.index($items.filter(':focus'))
180if(e.keyCode==38&&index>0)index--
181if(e.keyCode==40&&index<$items.length-1)index++
182if(!~index)index=0
183$items.eq(index).focus()}}
184function clearMenus(){$(toggle).each(function(){getParent($(this)).removeClass('open')})}
185function getParent($this){var selector=$this.attr('data-target'),$parent
186if(!selector){selector=$this.attr('href')
187selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}
188$parent=$(selector)
189$parent.length||($parent=$this.parent())
190return $parent}
191var old=$.fn.dropdown
192$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data('dropdown')
193if(!data)$this.data('dropdown',(data=new Dropdown(this)))
194if(typeof option=='string')data[option].call($this)})}
195$.fn.dropdown.Constructor=Dropdown
196$.fn.dropdown.noConflict=function(){$.fn.dropdown=old
197return this}
198$(document).on('click.dropdown.data-api touchstart.dropdown.data-api',clearMenus).on('click.dropdown touchstart.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('touchstart.dropdown.data-api','.dropdown-menu',function(e){e.stopPropagation()}).on('click.dropdown.data-api touchstart.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.dropdown.data-api touchstart.dropdown.data-api',toggle+', [role=menu]',Dropdown.prototype.keydown)}(window.jQuery);!function($){"use strict";var Modal=function(element,options){this.options=options
199this.$element=$(element).delegate('[data-dismiss="modal"]','click.dismiss.modal',$.proxy(this.hide,this))
200this.options.remote&&this.$element.find('.modal-body').load(this.options.remote)}
201Modal.prototype={constructor:Modal,toggle:function(){return this[!this.isShown?'show':'hide']()},show:function(){var that=this,e=$.Event('show')
202this.$element.trigger(e)
203if(this.isShown||e.isDefaultPrevented())return
204this.isShown=true
205this.escape()
206this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade')
207if(!that.$element.parent().length){that.$element.appendTo(document.body)}
208that.$element.show()
209if(transition){that.$element[0].offsetWidth}
210that.$element.addClass('in').attr('aria-hidden',false)
211that.enforceFocus()
212transition?that.$element.one($.support.transition.end,function(){that.$element.focus().trigger('shown')}):that.$element.focus().trigger('shown')})},hide:function(e){e&&e.preventDefault()
213var that=this
214e=$.Event('hide')
215this.$element.trigger(e)
216if(!this.isShown||e.isDefaultPrevented())return
217this.isShown=false
218this.escape()
219$(document).off('focusin.modal')
220this.$element.removeClass('in').attr('aria-hidden',true)
221$.support.transition&&this.$element.hasClass('fade')?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var that=this
222$(document).on('focusin.modal',function(e){if(that.$element[0]!==e.target&&!that.$element.has(e.target).length){that.$element.focus()}})},escape:function(){var that=this
223if(this.isShown&&this.options.keyboard){this.$element.on('keyup.dismiss.modal',function(e){e.which==27&&that.hide()})}else if(!this.isShown){this.$element.off('keyup.dismiss.modal')}},hideWithTransition:function(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end)
224that.hideModal()},500)
225this.$element.one($.support.transition.end,function(){clearTimeout(timeout)
226that.hideModal()})},hideModal:function(that){this.$element.hide().trigger('hidden')
227this.backdrop()},removeBackdrop:function(){this.$backdrop.remove()
228this.$backdrop=null},backdrop:function(callback){var that=this,animate=this.$element.hasClass('fade')?'fade':''
229if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate
230this.$backdrop=$('<div class="modal-backdrop '+animate+'" />').appendTo(document.body)
231this.$backdrop.click(this.options.backdrop=='static'?$.proxy(this.$element[0].focus,this.$element[0]):$.proxy(this.hide,this))
232if(doAnimate)this.$backdrop[0].offsetWidth
233this.$backdrop.addClass('in')
234doAnimate?this.$backdrop.one($.support.transition.end,callback):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in')
235$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one($.support.transition.end,$.proxy(this.removeBackdrop,this)):this.removeBackdrop()}else if(callback){callback()}}}
236var old=$.fn.modal
237$.fn.modal=function(option){return this.each(function(){var $this=$(this),data=$this.data('modal'),options=$.extend({},$.fn.modal.defaults,$this.data(),typeof option=='object'&&option)
238if(!data)$this.data('modal',(data=new Modal(this,options)))
239if(typeof option=='string')data[option]()
240else if(options.show)data.show()})}
241$.fn.modal.defaults={backdrop:true,keyboard:true,show:true}
242$.fn.modal.Constructor=Modal
243$.fn.modal.noConflict=function(){$.fn.modal=old
244return this}
245$(document).on('click.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this),href=$this.attr('href'),$target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,''))),option=$target.data('modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data())
246e.preventDefault()
247$target.modal(option).one('hide',function(){$this.focus()})})}(window.jQuery);!function($){"use strict";var Tooltip=function(element,options){this.init('tooltip',element,options)}
248Tooltip.prototype={constructor:Tooltip,init:function(type,element,options){var eventIn,eventOut
249this.type=type
250this.$element=$(element)
251this.options=this.getOptions(options)
252this.enabled=true
253if(this.options.trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(this.options.trigger!='manual'){eventIn=this.options.trigger=='hover'?'mouseenter':'focus'
254eventOut=this.options.trigger=='hover'?'mouseleave':'blur'
255this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this))
256this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}
257this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()},getOptions:function(options){options=$.extend({},$.fn[this.type].defaults,options,this.$element.data())
258if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}
259return options},enter:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type)
260if(!self.options.delay||!self.options.delay.show)return self.show()
261clearTimeout(this.timeout)
262self.hoverState='in'
263this.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)},leave:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type)
264if(this.timeout)clearTimeout(this.timeout)
265if(!self.options.delay||!self.options.delay.hide)return self.hide()
266self.hoverState='out'
267this.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)},show:function(){var $tip,inside,pos,actualWidth,actualHeight,placement,tp
268if(this.hasContent()&&this.enabled){$tip=this.tip()
269this.setContent()
270if(this.options.animation){$tip.addClass('fade')}
271placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement
272inside=/in/.test(placement)
273$tip.detach().css({top:0,left:0,display:'block'}).insertAfter(this.$element)
274pos=this.getPosition(inside)
275actualWidth=$tip[0].offsetWidth
276actualHeight=$tip[0].offsetHeight
277switch(inside?placement.split(' ')[1]:placement){case'bottom':tp={top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}
278break
279case'top':tp={top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}
280break
281case'left':tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}
282break
283case'right':tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}
284break}
285$tip.offset(tp).addClass(placement).addClass('in')}},setContent:function(){var $tip=this.tip(),title=this.getTitle()
286$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title)
287$tip.removeClass('fade in top bottom left right')},hide:function(){var that=this,$tip=this.tip()
288$tip.removeClass('in')
289function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.support.transition.end).detach()},500)
290$tip.one($.support.transition.end,function(){clearTimeout(timeout)
291$tip.detach()})}
292$.support.transition&&this.$tip.hasClass('fade')?removeWithAnimation():$tip.detach()
293return this},fixTitle:function(){var $e=this.$element
294if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').removeAttr('title')}},hasContent:function(){return this.getTitle()},getPosition:function(inside){return $.extend({},(inside?{top:0,left:0}:this.$element.offset()),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var title,$e=this.$element,o=this.options
295title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title)
296return title},tip:function(){return this.$tip=this.$tip||$(this.options.template)},validate:function(){if(!this.$element[0].parentNode){this.hide()
297this.$element=null
298this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type)
299self[self.tip().hasClass('in')?'hide':'show']()},destroy:function(){this.hide().$element.off('.'+this.type).removeData(this.type)}}
300var old=$.fn.tooltip
301$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data('tooltip'),options=typeof option=='object'&&option
302if(!data)$this.data('tooltip',(data=new Tooltip(this,options)))
303if(typeof option=='string')data[option]()})}
304$.fn.tooltip.Constructor=Tooltip
305$.fn.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',title:'',delay:0,html:false}
306$.fn.tooltip.noConflict=function(){$.fn.tooltip=old
307return this}}(window.jQuery);!function($){"use strict";var Popover=function(element,options){this.init('popover',element,options)}
308Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype,{constructor:Popover,setContent:function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent()
309$tip.find('.popover-title')[this.options.html?'html':'text'](title)
310$tip.find('.popover-content')[this.options.html?'html':'text'](content)
311$tip.removeClass('fade top bottom left right in')},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var content,$e=this.$element,o=this.options
312content=$e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)
313return content},tip:function(){if(!this.$tip){this.$tip=$(this.options.template)}
314return this.$tip},destroy:function(){this.hide().$element.off('.'+this.type).removeData(this.type)},hide:function(){var that=this,$tip=this.tip()
315$tip.removeClass('in')
316this.$element.find('.content')['html']($tip.find('.popover-content').html())
317function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.
317support.transition.end).detach()},500)
318$tip.one($.support.transition.end,function(){clearTimeout(timeout)
319$tip.detach()})}
320$.support.transition&&this.$tip.hasClass('fade')?removeWithAnimation():$tip.detach()
321return this}})
322var old=$.fn.popover
323$.fn.popover=function(option){return this.each(function(){var $this=$(this),data=$this.data('popover'),options=typeof option=='object'&&option
324if(!data)$this.data('popover',(data=new Popover(this,options)))
325if(typeof option=='string')data[option]()})}
326$.fn.popover.Constructor=Popover
327$.fn.popover.defaults=$.extend({},$.fn.tooltip.defaults,{placement:'right',trigger:'click',content:'',template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'})
328$.fn.popover.noConflict=function(){$.fn.popover=old
329return this}}(window.jQuery);!function($){"use strict";function ScrollSpy(element,options){var process=$.proxy(this.process,this),$element=$(element).is('body')?$(window):$(element),href
330this.options=$.extend({},$.fn.scrollspy.defaults,options)
331this.$scrollElement=$element.on('scroll.scroll-spy.data-api',process)
332this.selector=(this.options.target||((href=$(element).attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))||'')+' .nav li > a'
333this.$body=$('body')
334this.refresh()
335this.process()}
336ScrollSpy.prototype={constructor:ScrollSpy,refresh:function(){var self=this,$targets
337this.offsets=$([])
338this.targets=$([])
339$targets=this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data('target')||$el.attr('href'),$href=/^#\w/.test(href)&&$(href)
340return($href&&$href.length&&[[$href.position().top+self.$scrollElement.scrollTop(),href]])||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0])
341self.targets.push(this[1])})},process:function(){var scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,maxScroll=scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget,i
342if(scrollTop>=maxScroll){return activeTarget!=(i=targets.last()[0])&&this.activate(i)}
343for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||scrollTop<=offsets[i+1])&&this.activate(targets[i])}},activate:function(target){var active,selector
344this.activeTarget=target
345$(this.selector).parent('.active').removeClass('active')
346selector=this.selector
347+'[data-target="'+target+'"],'
348+this.selector+'[href="'+target+'"]'
349active=$(selector).parent('li').addClass('active')
350if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass('active')}
351active.trigger('activate')}}
352var old=$.fn.scrollspy
353$.fn.scrollspy=function(option){return this.each(function(){var $this=$(this),data=$this.data('scrollspy'),options=typeof option=='object'&&option
354if(!data)$this.data('scrollspy',(data=new ScrollSpy(this,options)))
355if(typeof option=='string')data[option]()})}
356$.fn.scrollspy.Constructor=ScrollSpy
357$.fn.scrollspy.defaults={offset:10}
358$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old
359return this}
360$(window).on('load',function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this)
361$spy.scrollspy($spy.data())})})}(window.jQuery);!function($){"use strict";var Tab=function(element){this.element=$(element)}
362Tab.prototype={constructor:Tab,show:function(){var $this=this.element,$ul=$this.closest('ul:not(.dropdown-menu)'),selector=$this.attr('data-target'),previous,$target,e
363if(!selector){selector=$this.attr('href')
364selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
365if($this.parent('li').hasClass('active'))return
366previous=$ul.find('.active:last a')[0]
367e=$.Event('show',{relatedTarget:previous})
368$this.trigger(e)
369if(e.isDefaultPrevented())return
370$target=$(selector)
371this.activate($this.parent('li'),$ul)
372this.activate($target,$target.parent(),function(){$this.trigger({type:'shown',relatedTarget:previous})})},activate:function(element,container,callback){var $active=container.find('> .active'),transition=callback&&$.support.transition&&$active.hasClass('fade')
373function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active')
374element.addClass('active')
375if(transition){element[0].offsetWidth
376element.addClass('in')}else{element.removeClass('fade')}
377if(element.parent('.dropdown-menu')){element.closest('li.dropdown').addClass('active')}
378callback&&callback()}
379transition?$active.one($.support.transition.end,next):next()
380$active.removeClass('in')}}
381var old=$.fn.tab
382$.fn.tab=function(option){return this.each(function(){var $this=$(this),data=$this.data('tab')
383if(!data)$this.data('tab',(data=new Tab(this)))
384if(typeof option=='string')data[option]()})}
385$.fn.tab.Constructor=Tab
386$.fn.tab.noConflict=function(){$.fn.tab=old
387return this}
388$(document).on('click.tab.data-api','[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault()
389$(this).tab('show')})}(window.jQuery);!function($){"use strict";var Typeahead=function(element,options){this.$element=$(element)
390this.options=$.extend({},$.fn.typeahead.defaults,options)
391this.matcher=this.options.matcher||this.matcher
392this.sorter=this.options.sorter||this.sorter
393this.highlighter=this.options.highlighter||this.highlighter
394this.updater=this.options.updater||this.updater
395this.source=this.options.source
396this.$menu=$(this.options.menu)
397this.shown=false
398this.listen()}
399Typeahead.prototype={constructor:Typeahead,select:function(){var val=this.$menu.find('.active').attr('data-value')
400this.$element.val(this.updater(val)).change()
401return this.hide()},updater:function(item){return item},show:function(){var pos=$.extend({},this.$element.position(),{height:this.$element[0].offsetHeight})
402this.$menu.insertAfter(this.$element).css({top:pos.top+pos.height,left:pos.left}).show()
403this.shown=true
404return this},hide:function(){this.$menu.hide()
405this.shown=false
406return this},lookup:function(event){var items
407this.query=this.$element.val()
408if(!this.query||this.query.length<this.options.minLength){return this.shown?this.hide():this}
409items=$.isFunction(this.source)?this.source(this.query,$.proxy(this.process,this)):this.source
410return items?this.process(items):this},process:function(items){var that=this
411items=$.grep(items,function(item){return that.matcher(item)})
412items=this.sorter(items)
413if(!items.length){return this.shown?this.hide():this}
414return this.render(items.slice(0,this.options.items)).show()},matcher:function(item){return~item.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(items){var beginswith=[],caseSensitive=[],caseInsensitive=[],item
415while(item=items.shift()){if(!item.toLowerCase().indexOf(this.query.toLowerCase()))beginswith.push(item)
416else if(~item.indexOf(this.query))caseSensitive.push(item)
417else caseInsensitive.push(item)}
418return beginswith.concat(caseSensitive,caseInsensitive)}
418,highlighter:function(item){var query=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,'\\$&')
419return item.replace(new RegExp('('+query+')','ig'),function($1,match){return'<strong>'+match+'</strong>'})},render:function(items){var that=this
420items=$(items).map(function(i,item){i=$(that.options.item).attr('data-value',item)
421i.find('a').html(that.highlighter(item))
422return i[0]})
423items.first().addClass('active')
424this.$menu.html(items)
425return this},next:function(event){var active=this.$menu.find('.active').removeClass('active'),next=active.next()
426if(!next.length){next=$(this.$menu.find('li')[0])}
427next.addClass('active')},prev:function(event){var active=this.$menu.find('.active').removeClass('active'),prev=active.prev()
428if(!prev.length){prev=this.$menu.find('li').last()}
429prev.addClass('active')},listen:function(){this.$element.on('blur',$.proxy(this.blur,this)).on('keypress',$.proxy(this.keypress,this)).on('keyup',$.proxy(this.keyup,this))
430if(this.eventSupported('keydown')){this.$element.on('keydown',$.proxy(this.keydown,this))}
431this.$menu.on('click',$.proxy(this.click,this)).on('mouseenter','li',$.proxy(this.mouseenter,this))},eventSupported:function(eventName){var isSupported=eventName in this.$element
432if(!isSupported){this.$element.setAttribute(eventName,'return;')
433isSupported=typeof this.$element[eventName]==='function'}
434return isSupported},move:function(e){if(!this.shown)return
435switch(e.keyCode){case 9:case 13:case 27:e.preventDefault()
436break
437case 38:e.preventDefault()
438this.prev()
439break
440case 40:e.preventDefault()
441this.next()
442break}
443e.stopPropagation()},keydown:function(e){this.suppressKeyPressRepeat=~$.inArray(e.keyCode,[40,38,9,13,27])
444this.move(e)},keypress:function(e){if(this.suppressKeyPressRepeat)return
445this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break
446case 9:case 13:if(!this.shown)return
447this.select()
448break
449case 27:if(!this.shown)return
450this.hide()
451break
452default:this.lookup()}
453e.stopPropagation()
454e.preventDefault()},blur:function(e){var that=this
455setTimeout(function(){that.hide()},150)},click:function(e){e.stopPropagation()
456e.preventDefault()
457this.select()},mouseenter:function(e){this.$menu.find('.active').removeClass('active')
458$(e.currentTarget).addClass('active')}}
459var old=$.fn.typeahead
460$.fn.typeahead=function(option){return this.each(function(){var $this=$(this),data=$this.data('typeahead'),options=typeof option=='object'&&option
461if(!data)$this.data('typeahead',(data=new Typeahead(this,options)))
462if(typeof option=='string')data[option]()})}
463$.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1}
464$.fn.typeahead.Constructor=Typeahead
465$.fn.typeahead.noConflict=function(){$.fn.typeahead=old
466return this}
467$(document).on('focus.typeahead.data-api','[data-provide="typeahead"]',function(e){var $this=$(this)
468if($this.data('typeahead'))return
469e.preventDefault()
470$this.typeahead($this.data())})}(window.jQuery);!function($){"use strict";var Affix=function(element,options){this.options=$.extend({},$.fn.affix.defaults,options)
471this.$window=$(window).on('scroll.affix.data-api',$.proxy(this.checkPosition,this)).on('click.affix.data-api',$.proxy(function(){setTimeout($.proxy(this.checkPosition,this),1)},this))
472this.$document=$(document).on('ajaxSuccess.affix.data-api',$.proxy(this.checkPosition,this))
473this.$element=$(element)
474this.checkPosition()}
475Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return
476var scrollHeight=$(document).height(),scrollTop=this.$window.scrollTop(),position=this.$element.offset(),offset=this.options.offset,offsetBottom=offset.bottom,offsetTop=offset.top,reset='affix affix-top affix-bottom',affix
477if(typeof offset!='object')offsetBottom=offsetTop=offset
478if(typeof offsetTop=='function')offsetTop=offset.top()
479if(typeof offsetBottom=='function')offsetBottom=offset.bottom()
480affix=this.unpin!=null&&(scrollTop+this.unpin<=position.top)?false:offsetBottom!=null&&(position.top+this.$element.height()>=scrollHeight-offsetBottom-(this.affixed==='bottom'?offsetTop:0))?'bottom':offsetTop!=null&&scrollTop<=offsetTop?'top':false
481if(this.affixed===affix)return
482this.affixed=affix
483this.unpin=affix=='bottom'?position.top-scrollTop:null
484this.$element.removeClass(reset).addClass('affix'+(affix?'-'+affix:''))
485if(affix==='bottom')this.$element.css('bottom',$('body').height()-$('.stopaffix').position().top+20)
486else this.$element.css('bottom','auto')}
487var old=$.fn.affix
488$.fn.affix=function(option){return this.each(function(){var $this=$(this),data=$this.data('affix'),options=typeof option=='object'&&option
489if(!data)$this.data('affix',(data=new Affix(this,options)))
490if(typeof option=='string')data[option]()})}
491$.fn.affix.Constructor=Affix
492$.fn.affix.defaults={offset:0}
493$.fn.affix.noConflict=function(){$.fn.affix=old
494return this}
495$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this),data=$spy.data()
496data.offset=data.offset||{}
497data.offsetBottom&&(data.offset.bottom=data.offsetBottom)
498data.offsetTop&&(data.offset.top=data.offsetTop)
499$spy.affix(data)})})}(window.jQuery);;(function($,window,undefined){var $allDropdowns=$();$.fn.dropdownHover=function(options){if('ontouchstart'in document)return this;$allDropdowns=$allDropdowns.add(this.parent());return this.each(function(){var $this=$(this),$parent=$this.parent(),defaults={delay:500,instantlyCloseOthers:true},data={delay:$(this).data('delay'),instantlyCloseOthers:$(this).data('close-others')},showEvent='show.bs.dropdown',hideEvent='hide.bs.dropdown',settings=$.extend(true,{},defaults,options,data),timeout;$parent.hover(function(event){if(!$parent.hasClass('open')&&!$this.is(event.target)){return true;}
500openDropdown(event);},function(){timeout=window.setTimeout(function(){$parent.removeClass('open');$this.trigger(hideEvent);},settings.delay);});$this.hover(function(event){if(!$parent.hasClass('open')&&!$parent.is(event.target)){return true;}
501openDropdown(event);});$parent.find('.dropdown-submenu').each(function(){var $this=$(this);var subTimeout;$this.hover(function(){window.clearTimeout(subTimeout);$this.children('.dropdown-menu').show();$this.siblings().children('.dropdown-menu').hide();},function(){var $submenu=$this.children('.dropdown-menu');subTimeout=window.setTimeout(function(){$submenu.hide();},settings.delay);});});function openDropdown(event){$allDropdowns.find(':focus').blur();if(settings.instantlyCloseOthers===true)
502$allDropdowns.removeClass('open');window.clearTimeout(timeout);$parent.addClass('open');$this.trigger(showEvent);}});};$(document).ready(function(){$('[data-hover="dropdown"]').dropdownHover();});})(jQuery,this);(function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=r.unshift,l=i.toString,c=i.hasOwnProperty,h=r.forEach,p=r.map,d=r.reduce,v=r.reduceRight,m=r.filter,g=r.every,y=r.some,b=r.indexOf,w=r.lastIndexOf,E=Array.isArray,S=Object.keys,x=s.bind,T=function(e){if(e instanceof T)return e;if(!(this instanceof T))return new T(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=T),exports._=T):e._=T,T.VERSION="1.4.2";var N=T.each=T.forEach=function(e,t,r){if(e==null)return;if(h&&e.forEach===h)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(T.has(e,o)&&t.call(r,e[o],o,e)===n)return};T.map=T.collect=function(e,t,n){var r=[];return e==null?r:p&&e.map===p?e.map(t,n):(N(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)},T.reduce=T.foldl=T.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(d&&e.reduce===d)return r&&(t=T.bind(t,r)),i?e.reduce(t,n):e.reduce(t);N(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});
502if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},T.reduceRight=T.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(v&&e.reduceRight===v)return r&&(t=T.bind(t,r)),arguments.length>2?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=T.keys(e);s=o.length}N(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},T.find=T.detect=function(e,t,n){var r;return C(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},T.filter=T.select=function(e,t,n){var r=[];return e==null?r:m&&e.filter===m?e.filter(t,n):(N(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},T.reject=function(e,t,n){var r=[];return e==null?r:(N(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)},T.every=T.all=function(e,t,r){t||(t=T.identity);var i=!0;return e==null?i:g&&e.every===g?e.every(t,r):(N(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var C=T.some=T.any=function(e,t,r){t||(t=T.identity);var i=!1;return e==null?i:y&&e.some===y?e.some(t,r):(N(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};T.contains=T.include=function(e,t){var n=!1;return e==null?n:b&&e.indexOf===b?e.indexOf(t)!=-1:(n=C(e,function(e){return e===t}),n)},T.invoke=function(e,t){var n=u.call(arguments,2);return T.map(e,function(e){return(T.isFunction(t)?t:e[t]).apply(e,n)})},T.pluck=function(e,t){return T.map(e,function(e){return e[t]})},T.where=function(e,t){return T.isEmpty(t)?[]:T.filter(e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},T.max=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&T.isEmpty(e))return-Infinity;var r={computed:-Infinity};return N(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},T.min=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&T.isEmpty(e))return Infinity;var r={computed:Infinity};return N(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},T.shuffle=function(e){var t,n=0,r=[];return N(e,function(e){t=T.random(n++),r[n-1]=r[t],r[t]=e}),r};var k=function(e){return T.isFunction(e)?e:function(t){return t[e]}};T.sortBy=function(e,t,n){var r=k(t);return T.pluck(T.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var L=function(e,t,n,r){var i={},s=k(t);return N(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};T.groupBy=function(e,t,n){return L(e,t,n,function(e,t,n){(T.has(e,t)?e[t]:e[t]=[]).push(n)})},T.countBy=function(e,t,n){return L(e,t,n,function(e,t,n){T.has(e,t)||(e[t]=0),e[t]++})},T.sortedIndex=function(e,t,n,r){n=n==null?T.identity:k(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},T.toArray=function(e){return e?e.length===+e.length?u.call(e):T.values(e):[]},T.size=function(e){return e.length===+e.length?e.length:T.keys(e).length},T.first=T.head=T.take=function(e,t,n){return t!=null&&!n?u.call(e,0,t):e[0]},T.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},T.last=function(e,t,n){return t!=null&&!n?u.call(e,Math.max(e.length-t,0)):e[e.length-1]},T.rest=T.tail=T.drop=function(e,t,n){return u.call(e,t==null||n?1:t)},T.compact=function(e){return T.filter(e,function(e){return!!e})};var A=function(e,t,n){return N(e,function(e){T.isArray(e)?t?o.apply(n,e):A(e,t,n):n.push(e)}),n};T.flatten=function(e,t){return A(e,t,[])},T.without=function(e){return T.difference(e,u.call(arguments,1))},T.uniq=T.unique=function(e,t,n,r){var i=n?T.map(e,n,r):e,s=[],o=[];return N(i,function(n,r){if(t?!r||o[o.length-1]!==n:!T.contains(o,n))o.push(n),s.push(e[r])}),s},T.union=function(){return T.uniq(a.apply(r,arguments))},T.intersection=function(e){var t=u.call(arguments,1);return T.filter(T.uniq(e),function(e){return T.every(t,function(t){return T.indexOf(t,e)>=0})})}
502,T.difference=function(e){var t=a.apply(r,u.call(arguments,1));return T.filter(e,function(e){return!T.contains(t,e)})},T.zip=function(){var e=u.call(arguments),t=T.max(T.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=T.pluck(e,""+r);return n},T.object=function(e,t){var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},T.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=T.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(b&&e.indexOf===b)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},T.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=n!=null;if(w&&e.lastIndexOf===w)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},T.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var O=function(){};T.bind=function(t,n){var r,i;if(t.bind===x&&x)return x.apply(t,u.call(arguments,1));if(!T.isFunction(t))throw new TypeError;return i=u.call(arguments,2),r=function(){if(this instanceof r){O.prototype=t.prototype;var e=new O,s=t.apply(e,i.concat(u.call(arguments)));return Object(s)===s?s:e}return t.apply(n,i.concat(u.call(arguments)))}},T.bindAll=function(e){var t=u.call(arguments,1);return t.length==0&&(t=T.functions(e)),N(t,function(t){e[t]=T.bind(e[t],e)}),e},T.memoize=function(e,t){var n={};return t||(t=T.identity),function(){var r=t.apply(this,arguments);return T.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},T.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},T.defer=function(e){return T.delay.apply(T,[e,1].concat(u.call(arguments,1)))},T.throttle=function(e,t){var n,r,i,s,o,u,a=T.debounce(function(){o=s=!1},t);return function(){n=this,r=arguments;var f=function(){i=null,o&&(u=e.apply(n,r)),a()};return i||(i=setTimeout(f,t)),s?o=!0:(s=!0,u=e.apply(n,r)),a(),u}},T.debounce=function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r;return clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},T.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},T.wrap=function(e,t){return function(){var n=[e];return o.apply(n,arguments),t.apply(this,n)}},T.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},T.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},T.keys=S||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)T.has(e,n)&&(t[t.length]=n);return t},T.values=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push(e[n]);return t},T.pairs=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push([n,e[n]]);return t},T.invert=function(e){var t={};for(var n in e)T.has(e,n)&&(t[e[n]]=n);return t},T.functions=T.methods=function(e){var t=[];for(var n in e)T.isFunction(e[n])&&t.push(n);return t.sort()},T.extend=function(e){return N(u.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e},T.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return N(n,function(n){n in e&&(t[n]=e[n])}),t},T.omit=function(e){var t={},n=a.apply(r,u.call(arguments,1));for(var i in e)T.contains(n,i)||(t[i]=e[i]);return t},T.defaults=function(e){return N(u.call(arguments,1),function(t){for(var n in t)e[n]==null&&(e[n]=t[n])}),e},T.clone=function(e){return T.isObject(e)?T.isArray(e)?e.slice():T.extend({},e):e},T.tap=function(e,t){return t(e),e};var M=function(e,t,n,r){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof T&&(e=e._wrapped),t instanceof T&&(t=t._wrapped);var i=l.call(e);if(i!=l.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;n.push(e),r.push(t);var o=0,u=!0;if(i=="[object Array]"){o=e.length,u=o==t.length;if(u)while(o--)if(!(u=M(e[o],t[o],n,r)))break}else{var a=e.constructor,f=t.constructor;if(a!==f&&!(T.isFunction(a)&&a instanceof a&&T.isFunction(f)&&f instanceof f))return!1;for(var c in e)if(T.has(e,c)){o++;if(!(u=T.has(t,c)&&M(e[c],t[c],n,r)))break}if(u){for(c in t)if(T.has(t,c)&&!(o--))break;u=!o}}return n.pop(),r.pop(),u};T.isEqual=function(e,t){return M(e,t,[],[])},T.isEmpty=function(e){if(e==null)return!0;
502if(T.isArray(e)||T.isString(e))return e.length===0;for(var t in e)if(T.has(e,t))return!1;return!0},T.isElement=function(e){return!!e&&e.nodeType===1},T.isArray=E||function(e){return l.call(e)=="[object Array]"},T.isObject=function(e){return e===Object(e)},N(["Arguments","Function","String","Number","Date","RegExp"],function(e){T["is"+e]=function(t){return l.call(t)=="[object "+e+"]"}}),T.isArguments(arguments)||(T.isArguments=function(e){return!!e&&!!T.has(e,"callee")}),typeof/./!="function"&&(T.isFunction=function(e){return typeof e=="function"}),T.isFinite=function(e){return T.isNumber(e)&&isFinite(e)},T.isNaN=function(e){return T.isNumber(e)&&e!=+e},T.isBoolean=function(e){return e===!0||e===!1||l.call(e)=="[object Boolean]"},T.isNull=function(e){return e===null},T.isUndefined=function(e){return e===void 0},T.has=function(e,t){return c.call(e,t)},T.noConflict=function(){return e._=t,this},T.identity=function(e){return e},T.times=function(e,t,n){for(var r=0;r<e;r++)t.call(n,r)},T.random=function(e,t){return t==null&&(t=e,e=0),e+(0|Math.random()*(t-e+1))};var _={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};_.unescape=T.invert(_.escape);var D={escape:new RegExp("["+T.keys(_.escape).join("")+"]","g"),unescape:new RegExp("("+T.keys(_.unescape).join("|")+")","g")};T.each(["escape","unescape"],function(e){T[e]=function(t){return t==null?"":(""+t).replace(D[e],function(t){return _[e][t]})}}),T.result=function(e,t){if(e==null)return null;var n=e[t];return T.isFunction(n)?n.call(e):n},T.mixin=function(e){N(T.functions(e),function(t){var n=T[t]=e[t];T.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),F.call(this,n.apply(T,e))}})};var P=0;T.uniqueId=function(e){var t=P++;return e?e+t:t},T.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","	":"t","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\t|\u2028|\u2029/g;T.template=function(e,t,n){n=T.defaults({},n,T.templateSettings);var r=new RegExp([(n.escape||H).source,(n.interpolate||H).source,(n.evaluate||H).source].join("|")+"|$","g"),i=0,s="__p+='";e.replace(r,function(t,n,r,o,u){s+=e.slice(i,u).replace(j,function(e){return"\\"+B[e]}),s+=n?"'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?"'+\n((__t=("+r+"))==null?'':__t)+\n'":o?"';\n"+o+"\n__p+='":"",i=u+t.length}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(n.variable||"obj","_",s)}catch(u){throw u.source=s,u}if(t)return o(t,T);var a=function(e){return o.call(this,e,T)};return a.source="function("+(n.variable||"obj")+"){\n"+s+"}",a},T.chain=function(e){return T(e).chain()};var F=function(e){return this._chain?T(e).chain():e};T.mixin(T),N(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];T.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],F.call(this,n)}}),N(["concat","join","slice"],function(e){var t=r[e];T.prototype[e]=function(){return F.call(this,t.apply(this._wrapped,arguments))}}),T.extend(T.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);(function($){$.fn.bindWithDelay=function(type,data,fn,timeout,throttle){if($.isFunction(data)){throttle=timeout;timeout=fn;fn=data;data=undefined;}
503fn.guid=fn.guid||($.guid&&$.guid++);return this.each(function(){var wait=null;function cb(){var e=$.extend(true,{},arguments[0]);var ctx=this;var throttler=function(){wait=null;fn.apply(ctx,[e]);};if(!throttle){clearTimeout(wait);wait=null;}
504if(!wait){wait=setTimeout(throttler,timeout);}}
505cb.guid=fn.guid;$(this).bind(type,data,cb);});};})(jQuery);var kategorie={'9_pobyty':'Pobyty se slevou','8_svet_objekt':'Ubytovací zařízení mimo ČR','5_svet_mesto':'Města v zahraničí','7_svet_zeme':'Státy','6_svet_oblast':'Turistické oblasti v zahraničí','1_su_region':'Regiony v ČR','3_su_mesto':'Města v ČR','2_su_oblast':'Turistické oblasti v ČR','4_su_objekt':'Ubytovací zařízení v ČR'};var sablony={'9_pobyty':_.template('<div class="media">\
506                <a class="pull-left" href="<%= url %>">\
507                  <img class="media-object" src="<%= img %>" width="64" height="64">\
508                </a>\
509                <div class="media-body">\
510                  <a href="<%= url %>"><h4 class="media-heading"> <%= nazev %></h4> </a>\
511                  <div class="autocomplete-panylek">\
512                       <div class="polozka"><i class="ikonka icon-bell"></i>&nbsp;zbývá <span><%= timeleft %></span></div>\
513                       <div class="polozka"><i class="ikonka icon-shopping-cart"></i>&nbsp;<a href="<%= serverUrl %>"><%= server %></a></div>\
514                       <div class="polozka"><i class="ikonka icon-user"></i>&nbsp;Zakoupeno <span><%= koupeno %>x</span></div>\
515                       <div class="polozka"><i class="ikonka icon-tag"></i>&nbsp;<strong><%= cena %> Kč</strong></div>\
516                    </div>\
517                  </div>\
518              </div>'),'8_svet_objekt':_.template('<div class="media">\
519                <a class="pull-left" href="<%= url %>">\
520                  <img class="media-object" src="<%= img %>" width="64" height="64">\
521                </a>\
522                <div class="media-body">\
523                  <a href="<%= url %>"><h4 class="media-heading"><%= nazev %></h4> </a>\
524                  <div class="autocomplete-panylek">\
525                       <div class="polozka"><i class="ikonka icon-globe"></i>&nbsp;<a class="myitem-mesto" href="<%= zemeUrl %>"><%= zeme %></a></div>\
526                       <div class="polozka"><i class="ikonka icon-map-marker"></i>&nbsp;<a class="myitem-mesto" href="<%= mestoUrl %>"><%= mesto %></a></div>\
527                       <div class="polozka"><i class="ikonka icon-home"></i>&nbsp;<%= typUbytovani %></div>\
528                    </div>\
529                  </div>\
530              </div>'),'5_svet_mesto':_.template('<div class="media">\
531                <a class="pull-left" href="<%= url %>">\
532                  <img class="media-object" src="<%= img %>" width="64" height="64">\
533                </a>\
534                <div class="media-body">\
535                  <a href="<%= url %>"><h4 class="media-heading"><%= nazev %></h4> </a>\
536                  <div class="autocomplete-panylek">\
537                       <div class="polozka"><i class="ikonka icon-globe"></i>&nbsp;<a class="myitem-mesto" href="<%= zemeUrl %>"><%= zeme %></a></div>\
538                       <div class="polozka"><i class="ikonka icon-home"></i>&nbsp;<%= pocetObjektu %></div>\
539                    </div>\
540                  </div>\
541              </div>'),'7_svet_zeme':_.template('<div class="media">\
542                <a class="pull-left" href="<%= url %>">\
543                  <img class="media-object" src="<%= img %>" width="64" height="64">\
544                </a>\
545                <div class="media-body">\
546                  <a href="<%= url %>"><h4 class="media-heading"><%= nazev %></h4></a>\
547                  <div class="autocomplete-panylek">\
548                        <div class="polozka"><i class="ikonka icon-home"></i>&nbsp;<%= pocetObjektu %></div>\
549                    </div>\
550                  </div>\
551              </div>'),'6_svet_oblast':_.template('<div class="media">\
552                <a class="pull-left" href="<%= url %>">\
553                  <img class="media-object" src="<%= img %>" width="64" height="64">\
554                </a>\
555                <div class="media-body">\
556                  <a href="<%= url %>"><h4 class="media-heading"><%= nazev %></h4></a>\
557                  <div class="autocomplete-panylek">\
558                        <div class="polozka"><i class="ikonka icon-home"></i>&nbsp;<%= pocetObjektu %></div>\
559                    </div>\
560                  </div>\
561              </div>'),'1_su_region':_.template('<div class="media">\
562                <a class="pull-left" href="<%= url %>">\
563                  <img class="media-object" src="<%= img %>" width="64" height="64">\
564                </a>\
565                <div class="media-body">\
566                  <a href="<%= url %>"><h4 class="media-heading"><%= nazev %></h4></a>\
567                  <div class="autocomplete-panylek">\
568                        <div class="polozka"><i class="ikonka icon-home"></i>&nbsp;<%= pocetObjektu %></div>\
569                    </div>\
570                  </div>\
571              </div>'),'3_su_mesto':_.template('<div class="media">\
572                <a class="pull-left" href="<%= url %>">\
573                  <img class="media-object" src="<%= img %>" width="64" height="64">\
574                </a>\
575                <div class="media-body">\
576                  <a href="<%= url %>"><h4 class="media-heading"><%= nazev %></h4></a>\
577                  <div class="autocomplete-panylek">\
578                        <div class="polozka"><i class="ikonka icon-globe"></i>&nbsp;<a class="myitem-mesto" href="<%= regionUrl %>"><%= region %></a></div>\
579                        <div class="polozka"><i class="ikonka icon-home"></i>&nbsp;<%= pocetObjektu %></div>\
580                    </div>\
581                  </div>\
582              </div>'),'2_su_oblast':_.template('<div class="media">\
583                <a class="pull-left" href="<%= url %>">\
584                  <img class="media-object" src="<%= img %>" width="64" height="64">\
585                </a>\
586                <div class="media-body">\
587                  <a href="<%= url %>"><h4 class="media-heading"><%= nazev %></h4></a>\
588                  <div class="autocomplete-panylek">\
589                        <div class="polozka"><i class="ikonka icon-home"></i>&nbsp;<%= pocetObjektu %></div>\
590                    </div>\
591                  </div>\
592              </div>'),'4_su_objekt':_.template('<div class="media">\
593                <a class="pull-left" href="<%= url %>">\
594                  <img class="media-object" src="<%= img %>" width="64" height="64">\
595                </a>\
596                <div class="media-body">\
597                  <a href="<%= url %>"><h4 class="media-heading"><%= nazev %></h4></a>\
598                  <div class="autocomplete-panylek">\
599                       <div class="polozka"><i class="ikonka icon-globe"></i>&nbsp;<a class="myitem-mesto" href="<%= regionUrl %>"><%= region %></a></div>\
600                        <div class="polozka"><i class="ikonka icon-map-marker"></i>&nbsp;<a class="myitem-mesto" href="<%= mestoUrl %>"><%= mesto %></a></div>\
601                        <div class="polozka"><i class="ikonka icon-home"></i>&nbsp;<%= typUbytovani %></div>\
602                        <%if (cena!==null) { %><div class="polozka"><i class="ikonka icon-tag"></i>&nbsp;<strong>od <%= cena %> Kč</strong></div><% } %>\
603                        <% if (celkoveHodnoceni > 0) { %>\
604                          <div class="polozka"><i class="icon-user"></i>&nbsp;\
605                            <div class="progress" title="Průměrné hodnocení od ubytovaných hostů.">\
606                              <div class="bar bar-warning" style="width:<%= celkoveHodnoceniProcenta %>%"></div>\
607                              <span class="hodnoceni" style=""><%= celkoveHodnoceni %> / 10</span>\
608                            </div>\
609                            <div class="reviews">podle <%= pocetHodnoceni %> hodnocení</div>\
610                          </div>\
611                      <% } %>\
612                      <% if (balicky === 1) { %>\
613                        <div class="polozka">\
614                          <div><i class="ikonka icon-gift"></i>&nbsp;Pobytové balíčky</div>\
615                        </div>\
616                      <% } %>\
617                    </div>\
618                  </div>\
619              </div>'),}
620var Autocomplete={init:function(){this.url='/autocomplete/autocomplete';this.delay=600;this.minimum_length=3;this.form_elem=null;this.query_box=null;var self=this;this.caller=null
621this.query_box=$('#search-input');this.query_home=$('#search-input-home');this.ajax_indicator=$('<div class="ajax-indicator"></div>').appendTo(this.query_box.parent()).hide();this.ajax_indicator_home=$('<div class="ajax-indicator"></div>').appendTo(this.query_home.parent()).hide();if(this.query_box.length){this.query_box.keyup(_.debounce(function(){self.proved_search(self.query_box);},300));}
622if(this.query_home.length){this.query_home.keyup(_.debounce(function(){self.proved_search(self.query_home);},300));}},proved_search:function(policko){var self=this;var query=policko.val();if(query.length<self.minimum_length){return false;}
623self.caller=policko;self.fetch(query);},fetch:function(query){var self=this;ga('send','event',{'eventCategory':'Vyhledavani','eventAction':'Autocomplete','evenLabel':query});if(this.caller.attr('id')==='search-input-home'){self.ajax_indicator_home.show();}else{self.ajax_indicator.show()}
624$.ajax({url:this.url,data:{'q':query},success:function(data){self.ajax_indicator_home.hide();self.ajax_indicator.hide();self.show_results(data);}});},show_results:function(data){$('.ac-results').remove();this.caller.parent().bind("keyup keypress",function(e){var code=e.keyCode||e.which;if(code==13){e.preventDefault();return false;}});var results=data.results||[];if(this.caller.attr('id')==='search-input-home')var results_wrapper=$('<div class="ac-results"><button type="button" class="close" data-dismiss="alert">&times;</button><p>Zobrazeno až 5 nejlepších výsledků z každé kategorie.</p></div>');else var results_wrapper=$('<div class="ac-results ac-results-top"><button type="button" class="close" data-dismiss="alert">&times;</button><p>Klikněte na název kategorie. Zobrazeno až 5 nejlepších výsledků z každé kategorie.</p><div class="ac-divider"></div></div>');var kategorie_elem=$('<div class="kategorie-wrapper"><h3 class="ac-kategorie"></h3></div>');var base_elem=$('<div class="result-wrapper"><a href="#" class="ac-result"></a><div></div></div>');var jsouVysledky=false;$.each(results,function(katKey,vals){if(vals.length>0){jsouVysledky=true;var kat=kategorie_elem.clone();kat.find('.ac-kategorie').text(kategorie[katKey]);$.each(vals,function(key,value){kat.append(sablony[katKey](value))});results_wrapper.append(kat);}});if(!jsouVysledky){var elem=base_elem.clone()
625elem.text("Pro hledaný výraz nebyly nalezeny žádné výsledky :-(")
626results_wrapper.append(elem)}
627this.caller.after(results_wrapper);}};$(document).ready(function(){window.autocompleted=Autocomplete;window.autocompleted.init();});(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){factory(require('jquery'));}else{factory(jQuery);}}(function($){var defaults={element:'body',position:null,type:"info",allow_dismiss:true,newest_on_top:false,showProgressbar:false,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5000,timer:1000,url_target:'_blank',mouse_over:null,animate:{enter:'animated fadeInDown',exit:'animated fadeOutUp'},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:'class',template:'<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'};String.format=function(){var str=arguments[0];for(var i=1;i<arguments.length;i++){str=str.replace(RegExp("\\{"+(i-1)+"\\}","gm"),arguments[i]);}
628return str;};function Notify(element,content,options){var content={content:{message:typeof content=='object'?content.message:content,title:content.title?content.title:'',icon:content.icon?content.icon:'',url:content.url?content.url:'#',target:content.target?content.target:'-'}};options=$.extend(true,{},content,options);this.settings=$.extend(true,{},defaults,options);this._defaults=defaults;if(this.settings.content.target=="-"){this.settings.content.target=this.settings.url_target;}
629this.animations={start:'webkitAnimationStart oanimationstart MSAnimationStart animationstart',end:'webkitAnimationEnd oanimationend MSAnimationEnd animationend'}
630if(typeof this.settings.offset=='number'){this.settings.offset={x:this.settings.offset,y:this.settings.offset};}
631this.init();};$.extend(Notify.prototype,{init:function(){var self=this;this.buildNotify();if(this.settings.content.icon){this.setIcon();}
632if(this.settings.content.url!="#"){this.styleURL();}
633this.placement();this.bind();this.notify={$ele:this.$ele,update:function(command,update){var commands={};if(typeof command=="string"){commands[command]=update;}else{commands=command;}
634for(var command in commands){switch(command){case"type":this.$ele.removeClass('alert-'+self.settings.type);this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass('progress-bar-'+self.settings.type);self.settings.type=commands[command];this.$ele.addClass('alert-'+commands[command]).find('[data-notify="progressbar"] > .progress-bar').addClass('progress-bar-'+commands[command]);break;case"icon":var $icon=this.$ele.find('[data-notify="icon"]');if(self.settings.icon_type.toLowerCase()=='class'){$icon.removeClass(self.settings.content.icon).addClass(commands[command]);}else{if(!$icon.is('img')){$icon.find('img');}
635$icon.attr('src',commands[command]);}
636break;case"progress":var newDelay=self.settings.delay-(self.settings.delay*(commands[command]/100));this.$ele.data('notify-delay',newDelay);this.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow',commands[command]).css('width',commands[command]+'%');break;case"url":this.$ele.find('[data-notify="url"]').attr('href',commands[command]);break;case"target":this.$ele.find('[data-notify="url"]').attr('target',commands[command]);break;default:this.$ele.find('[data-notify="'+command+'"]').html(commands[command]);};}
637var posX=this.$ele.outerHeight()+parseInt(self.settings.spacing)+parseInt(self.settings.offset.y);self.reposition(posX);},close:function(){self.close();}};},buildNotify:function(){var content=this.settings.content;
vendor: 6,193 bytes, lines 637-646
637this.$ele=$(String.format(this.settings.template,this.settings.type,content.title,content.message,content.url,content.target));this.$ele.attr('data-notify-position',this.settings.placement.from+'-'+this.settings.placement.align);if(!this.settings.allow_dismiss){this.$ele.find('[data-notify="dismiss"]').css('display','none');}
638if((this.settings.delay<=0&&!this.settings.showProgressbar)||!this.settings.showProgressbar){this.$ele.find('[data-notify="progressbar"]').remove();}},setIcon:function(){if(this.settings.icon_type.toLowerCase()=='class'){this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon);}else{if(this.$ele.find('[data-notify="icon"]').is('img')){this.$ele.find('[data-notify="icon"]').attr('src',this.settings.content.icon);}else{this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />');}}},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)',height:'100%',left:'0px',position:'absolute',top:'0px',width:'100%',zIndex:this.settings.z_index+1});this.$ele.find('[data-notify="dismiss"]').css({position:'absolute',right:'10px',top:'5px',zIndex:this.settings.z_index+2});},placement:function(){var self=this,offsetAmt=this.settings.offset.y,css={display:'inline-block',margin:'0px auto',position:this.settings.position?this.settings.position:(this.settings.element==='body'?'fixed':'absolute'),transition:'all .5s ease-in-out',zIndex:this.settings.z_index},hasAnimation=false,settings=this.settings;$('[data-notify-position="'+this.settings.placement.from+'-'+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return offsetAmt=Math.max(offsetAmt,parseInt($(this).css(settings.placement.from))+parseInt($(this).outerHeight())+parseInt(settings.spacing));});if(this.settings.newest_on_top==true){offsetAmt=this.settings.offset.y;}
639css[this.settings.placement.from]=offsetAmt+'px';switch(this.settings.placement.align){case"left":case"right":css[this.settings.placement.align]=this.settings.offset.x+'px';break;case"center":css.left=0;css.right=0;break;}
640this.$ele.css(css).addClass(this.settings.animate.enter);$.each(Array('webkit','moz','o','ms',''),function(index,prefix){self.$ele[0].style[prefix+'AnimationIterationCount']=1;});$(this.settings.element).append(this.$ele);if(this.settings.newest_on_top==true){offsetAmt=(parseInt(offsetAmt)+parseInt(this.settings.spacing))+this.$ele.outerHeight();this.reposition(offsetAmt);}
641if($.isFunction(self.settings.onShow)){self.settings.onShow.call(this.$ele);}
642this.$ele.one(this.animations.start,function(event){hasAnimation=true;}).one(this.animations.end,function(event){if($.isFunction(self.settings.onShown)){self.settings.onShown.call(this);}});setTimeout(function(){if(!hasAnimation){if($.isFunction(self.settings.onShown)){self.settings.onShown.call(this);}}},600);},bind:function(){var self=this;this.$ele.find('[data-notify="dismiss"]').on('click',function(){self.close();})
643this.$ele.mouseover(function(e){$(this).data('data-hover',"true");}).mouseout(function(e){$(this).data('data-hover',"false");});this.$ele.data('data-hover',"false");if(this.settings.delay>0){self.$ele.data('notify-delay',self.settings.delay);var timer=setInterval(function(){var delay=parseInt(self.$ele.data('notify-delay'))-self.settings.timer;if((self.$ele.data('data-hover')==='false'&&self.settings.mouse_over=="pause")||self.settings.mouse_over!="pause"){var percent=((self.settings.delay-delay)/self.settings.delay)*100;self.$ele.data('notify-delay',delay);self.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow',percent).css('width',percent+'%');}
644if(delay<=-(self.settings.timer)){clearInterval(timer);self.close();}},self.settings.timer);}},close:function(){var self=this,$successors=null,posX=parseInt(this.$ele.css(this.settings.placement.from)),hasAnimation=false;this.$ele.data('closing','true').addClass(this.settings.animate.exit);self.reposition(posX);if($.isFunction(self.settings.onClose)){self.settings.onClose.call(this.$ele);}
645this.$ele.one(this.animations.start,function(event){hasAnimation=true;}).one(this.animations.end,function(event){$(this).remove();if($.isFunction(self.settings.onClosed)){self.settings.onClosed.call(this);}});setTimeout(function(){if(!hasAnimation){self.$ele.remove();if(self.settings.onClosed){self.settings.onClosed(self.$ele);}}},600);},reposition:function(posX){var self=this,notifies='[data-notify-position="'+this.settings.placement.from+'-'+this.settings.placement.align+'"]:not([data-closing="true"])',$elements=this.$ele.nextAll(notifies);if(this.settings.newest_on_top==true){$elements=this.$ele.prevAll(notifies);}
646$elements.each(function(){$(this).css(self.settings.placement.from,posX);posX=(parseInt(posX)+parseInt(self.settings.spacing))+$(this).outerHeight();});}});$.notify=function(content,options){var plugin=new Notify(this,content,options);return plugin.notify;};$.notifyDefaults=function(options){defaults=$.extend(true,{},defaults,options);return defaults;};$.notifyClose=function(command){if(typeof command==="undefined"||command=="all"){$('[data-notify]').find('[data-notify="dismiss"]').trigger('click');}else{$('[data-notify-position="'+command+'"]').find('[data-notify="dismiss"]').trigger('click');}};}));var defaultTemplate='<div data-notify="container" class="alert col-xs-11 col-sm-3 col-md-3 col-lg-3 alert-{0} alert-minimalist-in" role="alert">'+'<button type="button" class="close" aria-label="Close" data-notify="dismiss"><i class="fa fa-close fa-large" aria-hidden="true"></i></button>'+'<i data-notify="icon" class="pull-left" />'+'<span data-notify="title">{1}</span>'+'<span data-notify="message">{2}</span>'+'</div>';var facebookTemplate='<div data-notify="container" class="growl-facebook alert col-xs-11 col-sm-3 col-md-3 col-lg-3 alert-{0} alert-minimalist-in" role="alert">'+'<button type="button" class="close" aria-label="Close" data-notify="dismiss"><i class="fa fa-close fa-large" aria-hidden="true"></i></button>'+'<span data-notify="title">Sledujte nás na Facebooku pro informace o cestování, ubytování a slev
646ách.</span>'+'<div class="fb-page" data-href="http://www.facebook.com/SvetUbytovani.cz" data-width="500" data-adapt-container-width="true" data-small-header="false" data-adapt-container-width="false" data-hide-cover="false" data-show-facepile="true" data-show-posts="false"><div class="fb-xfbml-parse-ignore"><blockquote cite="http://www.facebook.com/SvetUbytovani.cz"><a href="http://www.facebook.com/SvetUbytovani.cz">SvětUbytování.cz</a></blockquote></div></div>'+'<script>FB.XFBML.parse();</script></div>';var soutezTemplate='<div data-notify="container" class="alert col-xs-11 col-sm-3 col-md-3 col-lg-3 alert-{0} alert-minimalist-in" role="alert">'+'<button type="button" class="close" aria-label="Close" data-notify="dismiss"><i class="fa fa-close fa-large" aria-hidden="true"></i></button>'+'<span data-notify="title">{1}</span>'+'<span data-notify="message">{2}</span>'+'<img src="/static/img/poster-soutez-popup.jpg" />'+'</div>';var GrowlApp={show_message_id:0,message_count:0,has_messages:false,init:function(messages,settings){var self=this;shouldShowMessages=settings['shouldShowMessages'];self.messages=this.parse_messages(messages);var length=0;for(var prop in self.messages){if(self.messages.hasOwnProperty(prop))
647length++;}
648self.message_count=length;self.timeout(self.messages);},parse_messages:function(messages){var parsedMessages={};var i=0;$.each(messages,function(key){if(messages[key].msg_valid===true){parsedMessages[i]=messages[key];i++;}});return parsedMessages;},show_message:function(message,message_id){var self=this;var messageTemplate=window[message['msg_template']];if(window.matchMedia("(min-width: 768px)").matches||message['msg_sm_devices']){var mes=$.notify({icon:message['msg_icon'],title:message['msg_title'],message:message['msg_message'],},{type:'minimalist',delay:parseInt(message['msg_delay']),allow_dismiss:true,placement:{from:"bottom",align:"right"},mouse_over:'pause',animate:{enter:'animated fadeInDown',exit:'animated fadeOutUp'},template:messageTemplate,onShow:function(){var message_name='message_'+message_id+'_open';if($.cookie(message_name)===null){$.cookie(message_name,1);}else{$.cookie(message_name,parseInt($.cookie(message_name))+1);};},onShown:function(){$(this).removeClass('alert-minimalist-in');}});mes.$ele.find('.close').on('click',function(){self.log_close(message_id);});}},log_close:function(message_id){var self=this;var message_name='message_'+message_id+'_closed';if($.cookie(message_name)===null){$.cookie(message_name,1);}else{$.cookie(message_name,parseInt($.cookie(message_name))+1);};},timeout:function(messages){var self=this;var isIntervalSet=false;$('body').on("mouseover touchstart",function(){if(isIntervalSet){return;}
649isIntervalSet=true;setTimeout(function(){for(var i=self.show_message_id;i<self.message_count;i++){var message_name_closed='message_'+messages[i]['msg_hash']+'_closed';var message_name_open='message_'+messages[i]['msg_hash']+'_open';if($.cookie(message_name_closed)===undefined){$.cookie(message_name_closed,0)}
650if($.cookie(message_name_open)===undefined){$.cookie(message_name_open,0)}
651if($.cookie(message_name_closed)<messages[i]['msg_max_closed']&&$.cookie(message_name_open)<messages[i]['msg_max_view']){self.show_message_id=i;self.has_messages=true;break;}};if(self.has_messages){self.show_message(messages[self.show_message_id],messages[self.show_message_id]['msg_hash'])
652self.show_message_id++;if(self.show_message_id<(self.message_count)){self.timeout(messages);}}},self.get_random_int(1,5));});},get_random_int:function(min,max){return(Math.floor(Math.random()*(max-min+1))+min)*1000;}};function getCookie(name){var cookieValue=null;if(document.cookie&&document.cookie!==''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)===(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
653return cookieValue;}
654var csrftoken=getCookie('csrftoken');function csrfSafeMethod(method){return(/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));}
655$.ajaxSetup({beforeSend:function(xhr,settings){if(!csrfSafeMethod(settings.type)&&!this.crossDomain){xhr.setRequestHeader("X-CSRFToken",csrftoken);}}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.