PageSourceSearch

https://www.novotelhongkongcentury.com/wp-content/themes/novotel-template/js/function.js?refresh

js novotelhongkongcentury.com collected 2026-09-30 12:40:24 UTC 152,120 bytes, 4,064 lines download raw bytes

1jQuery(document).ready(function ($) {
2	function replace_fullsizeurl_srcs() {
3		if (!_is_mobile) {
4			return;
5		}
6		if ($(window).width() > 767) {
7			$('img[data-fullsizeurl]').each(function () {
8				var img = $(this), fullsizeurl = img.data('fullsizeurl');
9				if (typeof fullsizeurl !== 'undefined' && fullsizeurl != '') {
10					img.removeAttr('srcset');
11					img.removeAttr('sizes');
12					img.attr('src', fullsizeurl);
13					img.removeAttr('data-fullsizeurl');
14				}
15			});
16		}
17	}
18
19	replace_fullsizeurl_srcs();
20	// Fix For Vietnamese font
21	if ($('html').hasClass('lang_vi')) {
22		$('*').each(function (n, elm) {
23			if ($(elm).css('font-family') !== '') {
24				var _s = '';
25				if (elm.getAttribute('style') !== null) {
26					var _s = elm.getAttribute('style');
27					if (_s.slice(-1) !== ';') {
28						_s += ';';
29					}
30				}
31				elm.setAttribute('style', _s + 'font-family : Arial, sans-serif !important');
32			}
33		});
34	}
35
36	if ($('body').hasClass('full-slideshow')) {
37		window.novotel_custom_slideshow_height = function () {
38			if ($(window).width() <= $(window).height()) {
39				return $(window).width() * 1.2;
40			} else {
41				var difference = $(window).width() < 768 ? 0 : 20;
42				return $(window).height() - $('#header').height() - difference;
43			}
44		}
45	}
46
47	//Fix for border on last room
48	var div = $('.section.roomtype ul li').last().addClass('borderlast');
49
50	// Main menu
51	if (!$('html').hasClass('mobile')) {
52		$('#hotel nav .w-container ul:first-child > li > a').each(function () {
53			var _pond = $(this).text().split(' ');
54			var _mid = Math.floor(_pond.length / 2) - 1;
55			_pond[_mid] += '<br>';
56			$(this).html(_pond.join(' '));
57		});
58	}
59
60	// Seobar
61	$('#seobar').appendTo('footer').show();
62
63	// Main book button
64	if (_is_mobile === false) {
65		$('#book_button').appendTo($('nav > div.w-container'));
66	}
67	window.__toggle_book_panel = function () {
68		if ($('#book_panel').hasClass('open')) {
69			$('#book_panel').removeClass('open');
70			$('div.book_overlay').fadeOut(250, function () {
71				$('html, body').css('overflow', 'auto');
72			});
73		} else {
74			$(document).trigger('accor_event.open_calendar');
75			$('div.book_overlay').fadeIn(250, function () {
76				$('html, body').css('overflow', 'hidden');
77				$('#book_panel').addClass('open');
78			});
79		}
80	};
81	$('#book_button').on('click', __toggle_book_panel);
82
83	// Book button for rooms
84	$('.roomtype li a.book, #bookthisroom > a').accorBookNowLink();
85
86	// Booking form
87	if ($('body').hasClass('home')) {
88		$('#booking').insertAfter($('#main_slideshow'));
89		var mincheckout, checkin_date, checkout_date, checkin_dp = $('#bookingform-check #checkin-check'),
90				checkout_dp = $('#bookingform-check #checkout-check');
91		$('#bookingform-check').accorBookingInitDatepickers(
92				{
93					onSelect: function (dateText, inst) {
94						$('#bookingform-check label[for="checkin-check"] > span').text(dateText);
95						checkin_date = checkin_dp.datepicker('getDate');
96						checkout_date = checkout_dp.datepicker('getDate');
97						if (checkout_date <= checkin_date) {
98							mincheckout = new Date(checkin_date.getTime() + 86400000);
99							checkout_dp.datepicker('option', 'minDate', mincheckout);
100							checkout_dp.datepicker('setDate', mincheckout);
101							var _month = mincheckout.getMonth() + 1;
102							$('#bookingform-check label[for="checkout-check"] > span').text(mincheckout.getDate() + '/' + (_month < 10 ? '0' + _month : _month) + '/' + mincheckout.getFullYear());
103						}
104						checkin_dp.trigger('change');
105						checkout_dp.trigger('change');
106					}
107				},
108				{
109					onSelect: function (dateText, inst) {
110						$('#bookingform-check label[for="checkout-check"] > span').text(dateText);
111						checkin_date = checkin_dp.datepicker('getDate');
112						checkout_date = checkout_dp.datepicker('getDate');
113						if (checkin_date >= checkout_date) {
114							maxcheckin = new Date(checkout_date.getTime() - 86400000);
115							checkin_dp.datepicker('option', 'minDate', maxcheckin);
116							checkin_dp.datepicker('setDate', maxcheckin);
117							var _month = maxcheckin.getMonth() + 1;
118							$('#bookingform-check label[for="checkin-check"] > span').text(maxcheckin.getDate() + '/' + (_month < 10 ? '0' + _month : _month) + '/' + maxcheckin.getFullYear());
119						}
120						checkin_dp.trigger('change');
121						checkout_dp.trigger('change');
122					}
123				}
124		);
125		$('#bookingform-check').accorBookingForm();
126		$('#bookingform-check').appendTo($('#booking'));
127		$('#bookingform-check label').on('click', function () {
128			$(this).next('input').trigger('click');
129			$('ul.select_children').stop(true, true).fadeOut();
130			$('ul.select_adults').stop(true, true).fadeOut();
131		});
132
133		var _adults_text = $('label[for="adultNumber-check"]').text();
134		var _children_text = $('label[for="childrenNumber-check"]').text();
135		var _select_adults = $('<ul class="select_adults"></ul>');
136		var _select_children = $('<ul class="select_children"></ul>');
137		$('#adultNumber-check').children().each(function () {
138			var _li = $('<li>' + $(this).attr('value') + '</li>');
139			_li.appendTo(_select_adults);
140		});
141		_select_adults.appendTo($('#bookingform-check div.adults'));
142		$('#childrenNumber-check').children().each(function () {
143			var _li = $('<li>' + $(this).attr('value') + '</li>');
144			_li.appendTo(_select_children);
145		});
146		_select_children.appendTo($('#bookingform-check div.children'));
147		$('label[for="adultNumber-check"]').data('text', _adults_text).on('click', function () {
148			checkin_dp.datepicker('hide');
149			checkout_dp.datepicker('hide');
150			$('ul.select_children').stop(true, true).fadeOut();
151			$('ul.select_adults').stop(true, true).fadeIn();
152			$(this).addClass('hasChildOpened');
153		});
154		$('label[for="childrenNumber-check"]').data('text', _children_text).on('click', function () {
155			checkin_dp.datepicker('hide');
156			checkout_dp.datepicker('hide');
157			$('ul.select_adults').stop(true, true).fadeOut();
158			$('ul.select_children').stop(true, true).fadeIn();
159			$(this).addClass('hasChildOpened');
160		});
161		$('.select_adults li, .select_children li').each(function () {
162			$(this).on('click', function () {
163				var _parent = $(this).parents('div.field').first();
164				var _label = _parent.find('label').first();
165				_parent.find('select option[value="' + $(this).text() + '"]').prop('selected', true);
166				_label.text(_label.data('text') + ' : ' + $(this).text());
167				$(this).parents('ul').first().fadeOut();
168				_parent.find('> label').removeClass('hasChildOpened');
169			});
170		});
171
172		/* Extended fields - July 2019 */
173		var extend_button = $('#bookingform-check .extend_fields');
174		var extended_fields = $('#bookingform-check .extended_fields');
175		var childrenages_row = extended_fields.find('.childrenages_row');
176		extend_button.click(function () {
177			$(this).toggleClass('open');
178			extended_fields.toggleClass('hidden');
179		});
180		$('#bookingform-check select[name=childrenNumber]').change(function () {
181			var nChildren = parseInt($(this).val(), 10);
182			if (nChildren > 0) {
183				extend_button.addClass('open');
184				childrenages_row.removeClass('hidden');
185				extended_fields.removeClass('hidden');
186			} else {
187				childrenages_row.addClass('hidden');
188			}
189			$('.field.childrenAge0,.field.childrenAge1,.field.childrenAge2').addClass('hidden');
190			for (var i = 0; i < nChildren; i++) {
191				$('.field.childrenAge' + i).removeClass('hidden');
192			}
193		});
194		$('#bookingform-check .select_children li').on('click', function () {
195			setTimeout(function () {
196				$('#bookingform-check select[name=childrenNumber]').trigger('change');
197			}, 50);
198		});
199		/* END Extended fields - July 2019 */
200
201		/**/
202		$('#bookingform').accorBookingInitDatepickers();
203		$('#bookingform').accorBookingForm();
204		$('#childrenNumber').on('change', function () {
205			$('div[class*="childrenAge"]').stop(true, true).hide();
206			var _val = $(this).val();
207			for (_i = 0; _i < _val; _i++) {
208				$('div.childrenAge' + _i).stop(true, true).slideDown();
209			}
210		});
211		$('img.book_close').on('click', __toggle_book_panel);
212		/**/
213	} else {
214		if (typeof (offer) === 'undefined') {
215			$('#bookingform').accorBookingInitDatepickers();
216		} else {
217			if (offer.start == '') {
218				offer.start = Date.now();
219			}
220			if (offer.end == '') {
221				offer.end = Date.now() + 730 * 86400000;
222			}
223			var lastCheckIn = new Date(new Date(offer.end).getTime() - 86400000);
224			var minstay = typeof($('#bookingform').attr('data-minstay')) !== 'undefined' && $('#bookingform').attr('data-minstay').length > 0;
225			var checkout_minstay_format = $('#bookingform').attr('data-checkoutyear') + ',' + $('#bookingform').attr('data-checkoutmonth') + ',' + $('#bookingform').attr('data-checkoutday');
226			$('#bookingform').accorBookingInitDatepickers(
227					{minDate: new Date(offer.start), maxDate: lastCheckIn},
228					{minDate: minstay ?  new Date(checkout_minstay_format) : new Date((new Date(offer.start).getTime()) + 86400000), maxDate: new Date(offer.end)}
229			);
230			$('#bookingform input[name=checkin]').on('change', function () {
231				setTimeout(function () {
232					$('#bookingform input[name=checkout]').datepicker('option', 'maxDate', new Date(offer.end));
233				}, 100);
234			});
235		}
236		$('#bookingform').accorBookingForm();
237		$('#childrenNumber').on('change', function () {
238			$('div[class*="childrenAge"]').stop(true, true).hide();
239			var _val = $(this).val();
240			for (_i = 0; _i < _val; _i++) {
241				$('div.childrenAge' + _i).stop(true, true).slideDown();
242			}
243		});
244		$('img.book_close').on('click', __toggle_book_panel);
245	}
246
247	// homepage
248	if ($('body').hasClass('home')) {
249		if ($(window).scrollTop() > $('#booking').offset().top + $('#booking').innerHeight() - $('#header').innerHeight()) {
250			$('#book_button').addClass('shown');
251		} else {
252			$('#book_button').removeClass('shown');
253		}
254	}
255
256	function detectIE() {
257		var ua = window.navigator.userAgent;
258		var msie = ua.indexOf('MSIE ');
259		if (msie > 0) {
260			return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
261		}
262		var trident = ua.indexOf('Trident/');
263		if (trident > 0) {
264			var rv = ua.indexOf('rv:');
265			return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
266		}
267		var edge = ua.indexOf('Edge/');
268		if (edge > 0) {
269			return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
270		}
271		return false;
272	}
273
274	// - Fix for IE
275	var IEversion = detectIE();
276	if (IEversion !== false) {
277		$('.main_slideshow li img').each(function () {
278			if (!$(this).attr('srcset')) return;
279			var _img = $(this).attr('srcset').split(', ');
280			_img = _img[_img.length - 1].split(' ');
281			$(this).attr('src', _img[0]);
282		});
283	}
284
285	// Homepage Video
286	if ($('#video-container').length > 0) {
287		$('body').addClass('hasVideo');
288		$('#video-container').appendTo('#main_slideshow');
289		var _video_play = $('<span id="hp_video_play" class="video-play"></span>');
290		_video_play.appendTo('#main_slideshow');
291		_video_play.on('click', function () {
292			if (player !== undefined) {
293				$('#booking').css('opacity', 0);
294				player.playVideo();
295				$('.main_slideshow').animate({'opacity': 0}, function () {
296					$('#main_slideshow').height(player_h);
297					$('body').addClass('playing-video');
298				});
299			}
300		});
301		$('.stop_video').on('click', function () {
302			onPlayerStateChange({'data': 0});
303		});
304		$('.mute_video').on('click', function () {
305			if ($(this).hasClass('muted')) {
306				$(this).removeClass('muted');
307				player.setVolume(100);
308			} else {
309				$(this).addClass('muted');
310				(typeof riseVolume !== 'undefined') && clearInterval(riseVolume);
311				player.setVolume(0);
312			}
313		});
314	}
315
316	// Main slideshow
317	$('.main_slideshow').each(function () {
318		var _self = $(this);
319		var window_width = $(window).innerWidth();
320		var _height = window_width * 25 / 100;
321		if (_is_mobile === true) {
322			if (window_width > 767 && _height < 350) {
323				_height = 350;
324			} else {
325				_height = window_width * 60 / 100;
326			}
327		}
328		if (typeof (novotel_custom_slideshow_height) !== 'undefined') {
329			_self.height(novotel_custom_slideshow_height());
330			_height = novotel_custom_slideshow_height();
331		} else {
332			_self.height(_height);
333		}
334		$('#main_slideshow').height(_height + $('#header').innerHeight());
335
336		if (_self.data('type') === 'full' || _is_mobile === true) {
337
338			_self.resizeCenter({
339				onLoad: function () {
340					_self.appendTo($('#main_slideshow'));
341					_self.find('ul.cycle').on('cycle-initialized', function (event, opts) {
342						_self.find('img').animate({'opacity': 1});
343					});
344					$('#main_slideshow').removeClass('loading');
345					_self.find('ul.cycle').cycle({
346						fx: 'fadeout',
347						timeout: 6000,
348						swipe: true,
349						slides: '> li',
350						sync: true
351					});
352
353				}
354			});
355
356		} else {
357
358			slideShow();
359
360		}
361
362	});
363	$('div.see-gallery').appendTo($('#main_slideshow')).show();
364
365	// Webfonts
366	WebFont.load({
367		custom: {
368			families: ['Roboto-Regular']
369		},
370		fontactive: function (familyName, fvd) {
371			// Main menu : submenus
372			$('nav li.has-child').each(function () {
373				var _self = $(this);
374				if (_is_mobile === false) {
375					var _pos = _self.position().left;
376					if ($('body').hasClass('rtl')) {
377						_pos = _self.innerWidth() - _self.find('> ul').innerWidth() + _pos;
378					}
379					_self.find('> ul').css('left', _pos);
380				}
381			});
382
383			// Titles in circle
384			$('figcaption > h4, .offer_detail h3').each(function () {
385				$(this).css('margin-top', -$(this).innerHeight() / 2 - 5); // -5px because of the font
386			});
387			$('#highlighted .overlay strong').each(function () {
388				if (_is_mobile && $(window).width() > 767) {
389					$(this).css('margin-top', -$(this).outerHeight() / 2);
390				} else {
391					$(this).css('margin-top', -$(this).innerHeight() / 4);
392				}
393			});
394
395			// Rooms menu
396			if ($('#room-nav div.room_slider').length > 0) {
397				$('#room-nav div.room_slider').attr('data-initial-width', $('#room-nav div.room_slider').innerWidth());
398				var _slider_w = $('#room-nav div.room_slider').innerWidth() + $('.previous_room').innerWidth() + $('.next_room').innerWidth();
399				var _slider_diff = $('#room-nav').innerWidth() - _slider_w;
400				if (_slider_diff < 0) {
401					$('#room-nav div.room_slider').width($('#room-nav div.room_slider').innerWidth() + _slider_diff);
402				} else {
403					$('#room-nav div.room_slider').width($('#room-nav div.room_slider').data('initital-width'));
404				}
405				var _w = 1;
406				$('#room-nav div.room_slider li').each(function () {
407					_w += Math.ceil($(this).outerWidth(true));
408				});
409				$('#room-nav div.room_slider ul').width(_w);
410				var _p = _k = 0, _w = $('#room-nav div.room_slider').innerWidth(), _current = 1, _pos = {};
411				$('#room-nav div.room_slider li').each(function (i) {
412					if (i === 0) {
413						_k++;
414						$(this).addClass('step-' + _k);
415						_pos[_k] = i;
416					}
417					_p += Math.ceil($(this).outerWidth(true));
418					if (_p >= _w) {
419						_k++;
420						$(this).addClass('step-' + _k);
421						_p = 0;
422						_pos[_k] = $('#room-nav div.room_slider li').index(this);
423					}
424				});
425				$('a.previous_room').click(function () {
426					_current--;
427					if (_current <= 0) {
428						_current = _k;
429					}
430					$('#room-nav div.room_slider ul').animate({'left': -$('li.step-' + _current).position().left});
431				});
432				$('a.next_room').click(function () {
433					_current++;
434					if (_current > _k) {
435						_current = 1;
436					}
437					$('#room-nav div.room_slider ul').animate({'left': -$('li.step-' + _current).position().left});
438				});
439				var _c = $('#room-nav div.room_slider li').index($('li.room-active'));
440				for (var n in _pos) {
441					if (_c > _pos[n] && _c < _pos[(parseInt(n) + 1)] && typeof (_pos[(parseInt(n) + 1)]) !== 'undefined') {
442						$('#room-nav div.room_slider ul').css('left', -$('li.step-' + n).position().left);
443						_current = parseInt(n);
444						break;
445					} else if (typeof (_pos[(parseInt(n) + 1)]) === 'undefined') {
446						$('#room-nav div.room_slider ul').css('left', -$('li.step-' + n).position().left);
447						_current = parseInt(n);
448						break;
449					} else if (_c === _pos[n]) {
450						$('#room-nav div.room_slider ul').css('left', -$('li.step-' + n).position().left);
451						_current = parseInt(n);
452						break;
453					}
454				}
455			} else {
456				$('#room-nav .horizontal-nav').horizontalNav();
457			}
458			if ($(window).scrollTop() > $('.main_slideshow').innerHeight()) {
459				$('#room-nav').addClass('fixed');
460			} else {
461				$('#room-nav').removeClass('fixed');
462			}
463
464		}
465	});
466
467	// Languages
468	$('#lang').on('click', function () {
469		if (_is_mobile === false) {
470			var content_html = $(this).find('.languages').html();
471			$.fancybox({
472				padding: 0,
473				href: '',
474				content: '<div id="popup_content"><strong>' + _choose_language + '</strong><hr><ul>' + content_html + '</ul></div>',
475				scrolling: 'no',
476				helpers: {overlay: {locked: false}},
477				afterShow: function () {
478					$('#popup_content li.select > select').attr('data-xiti', 'transverse::language::selection').on('change', function () {
479						var _url = $(this).find('option:selected').data('url');
480						if (_url !== undefined) {
481							$(document).trigger('accor_event.other_language');
482							var w = window.open(_url, '_blank');
483							w.focus();
484						}
485					});
486				}
487			});
488		}
489	});
490
491	// Homepage highlighted pages
492	if (_is_mobile === false) {
493		$('#highlighted ul li').each(function () {
494			$(this).find('.overlay strong').each(function () {
495				var _pond = $(this).text().split(' ');
496				var _mid = Math.floor(_pond.length / 2) - 1;
497				_pond[_mid] += '<br>';
498				$(this).html(_pond.join(' '));
499			});
500			// we want to optimize the google pagespeed score and give the user the joy to enjoy nice images
501			$(this).find('img').waypoint(function () {
502				var _self = $(this);
503				var _src = _self.data('src');
504				var _parent = $(this).parents('li.w-resp').first();
505				_self.get(0).onload = function () {
506					_parent.resizeCenter({
507						onLoad: function () {
508							_self.animate({'opacity': 1});
509						}
510					});
511				}
512				_self.attr('src', _src);
513			}, {
514				offset: '100%'
515			});
516		});
517	} else {
518		$('#highlighted ul li').each(function () {
519			var _self = $(this).find('img');
520			var _src = _self.data('src');
521			_self.attr('src', _src).css({'opacity': 1});
522		});
523	}
524
525	// FB Social plugin
526	$('.fb-social-widget').each(function (i) {
527		$(this).find('.fb-social-image > img').attr('src', $(this).data('img'));
528		if ((i + 1) % 9 == 0) {
529			$(this).addClass('big');
530		}
531		$(this).find('.fb-social-image').resizeCenter();
532	});
533
534	// Map
535	if (typeof (_hotel) != 'undefined' && typeof ($.fn.FBMap) != 'undefined') {
536		$('#map_canvas').FBMap({
537			lat: _hotel.lat,
538			lng: _hotel.lng,
539			marker: _hotel.marker,
540			train_station: _hotel.img_path + 'point.png',
541			airport: _hotel.img_path + 'point.png',
542			subway_station: _hotel.img_path + 'point.png',
543			taxi_stand: _hotel.img_path + 'point.png',
544			cafe: _hotel.img_path + 'point.png',
545			restaurant: _hotel.img_path + 'point.png',
546			museum: _hotel.img_path + 'point.png',
547			art_gallery: _hotel.img_path + 'point.png',
548			blank: _hotel.img_path + 'point.png',
549			noplaces_text: map_noplaces_text,
550			link_text: map_directions_text,
551			zoomControl: {
552				'display': true,
553				'style': 'LARGE',
554				'position': ($('body').hasClass('rtl')) ? 'LEFT_TOP' : 'RIGHT_TOP'
555			},
556			'infobox_options': {
557				'boxStyle': {
558					'background': ""
559				},
560				'closeBoxURL': ""
561			},
562			mapStyle: [
563				{"featureType": "landscape.man_made", "elementType": "geometry", "stylers": [{"color": "#f7f1df"}]},
564				{"featureType": "landscape.natural", "elementType": "geometry", "stylers": [{"color": "#d0e3b4"}]},
565				{"featureType": "landscape.natural.terrain", "elementType": "geometry", "stylers": [{"visibility": "off"}]},
566				{"featureType": "poi", "elementType": "labels", "stylers": [{"visibility": "off"}]},
567				{"featureType": "poi.business", "elementType": "all", "stylers": [{"visibility": "off"}]},
568				{"featureType": "poi.medical", "elementType": "geometry", "stylers": [{"color": "#fbd3da"}]},
569				{"featureType": "poi.park", "elementType": "geometry", "stylers": [{"color": "#bde6ab"}]},
570				{"featureType": "road", "elementType": "geometry.stroke", "stylers": [{"visibility": "off"}]},
571				{"featureType": "road.highway", "elementType": "geometry.fill", "stylers": [{"color": "#ffe15f"}]},
572				{"featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [{"color": "#efd151"}]},
573				{"featureType": "road.arterial", "elementType": "geometry.fill", "stylers": [{"color": "#ffffff"}]},
574				{"featureType": "road.local", "elementType": "geometry.fill", "stylers": [{"color": "black"}]},
575				{"featureType": "transit.station.airport", "elementType": "geometry.fill", "stylers": [{"color": "#cfb2db"}]},
576				{"featureType": "water", "elementType": "geometry", "stylers": [{"color": "#a2daf2"}]}
577			],
578			pois: ((typeof (pois) !== 'undefined') ? pois : null),
579			display_pois: true,
580			group_fit_bounds: false
581		});
582		$('#map_buttons > span').on('click', function () {
583			$('#map_buttons > span').removeClass('active');
584			$(this).addClass('active');
585		});
586		var _wait_poi = setInterval(function () {
587			if ($('#monuments > li').first().children().length > 0) {
588				clearInterval(_wait_poi);
589				$('#monuments').horizontalNav();
590				$('#monuments li > label').each(function () {
591					$(this).on('click', function () {
592						if (!$(this).parents('li').first().hasClass('current')) {
593							$('#monuments li').removeClass('current');
594							$(this).parents('li').first().addClass('current');
595							$('#places_content').css({'display': 'block'});
596						} else {
597							$('#monuments li').removeClass('current');
598							$('#places_content').css({'display': 'none'});
599						}
600					});
601				});
602				$('#monuments li > strong').each(function () {
603					$(this).on('click', function () {
604						var _category = $(this).text();
605						if (!$(this).parents('li').first().hasClass('current')) {
606							$('#places_list').html('');
607							$('#monuments li').removeClass('current');
608							$(this).parents('li').first().addClass('current');
609							$($(this).next('ul').html()).clone().appendTo($('#places_list'));
610							$('#places_content').css({'display': 'block'});
611						} else {
612							$('#monuments li').removeClass('current');
613							$('#places_content').css({'display': 'none'});
614						}
615					});
616				});
617			}
618		}, 50);
619		$('#streetview').on('click', function () {
620			$('#places_content').hide();
621		});
622		if (_is_mobile === true) {
623			$('#map_ctx, #map_canvas').height($(window).innerWidth());
624		}
625	}
626
627	// Resize and center images
628	$('.w-resp').each(function () {
629		var _self = $(this);
630		_self.resizeCenter({
631			onLoad: function () {
632				setTimeout(function () {
633					_self.find('img.resp').animate({'opacity': 1});
634				}, 200);
635			}
636		});
637	});
638
639	// Tripadvisor
640	$('#tripadvisor ul').first().cycle({slides: "> li", timeout: 6000});
641	$('a.tripadvisor_reviews').fancybox({
642		maxWidth: 800,
643		maxHeight: 600,
644		fitToView: false,
645		width: '70%',
646		height: '70%',
647		padding: 0
648	});
649
650	// Location link
651	if ($('body').hasClass('home')) {
652		$('a.location_link').attr('href', '#location').on('click', function (e) {
653			e.preventDefault();
654			$('html,body').stop(0, 0).animate({
655				scrollTop: $('#location').offset().top - $('#header').innerHeight()
656			}, 1000);
657		});
658		if (window.location.hash !== '') {
659			$('html,body').animate({
660				scrollTop: $(window.location.hash).offset().top - $('#header').innerHeight()
661			}, 1000);
662		}
663	}
664
665	// Page section (move the title into the slideshow)
666	if (_is_mobile === false) {
667		$('h3.slideshow_title').appendTo($('div.main_slideshow')).css({
668			'height': $('div.main_slideshow').innerHeight() + 'px',
669			'line-height': $('div.main_slideshow').innerHeight() + 'px'
670		}).show();
671	}
672
673	// Gallery popin
674	if (_is_mobile === false) {
675		$('div.see-gallery a').attr('href', 'javascript:void(0);').on('click', function (e) {
676			e.preventDefault();
677			var gallery_cat = $(this).data('gallerycat');
678			galleryPopin(0, true, gallery_cat);
679		});
680	}
681
682	// Gallery page
683	var photogallery_category = location.hash.replace('#___', '');
684	var $container = $('#gallery');
685	$container.imagesLoaded(function () {
686		var _l = $container.find('div.elm').length;
687
688		function appear(i) {
689			if ((i + 1) <= _l) {
690				$($container.find('div.elm').get(i)).animate({'opacity': 1}, 250, function () {
691					$(this).addClass('set');
692					appear(i + 1);
693				});
694			}
695		}
696
697		appear(0);
698
699		if (_is_mobile === false) {
700
701			$('.fancy a').attr('href', 'javascript:void(0);').on('click', function () {
702				var pageTemplate;
703				if ($('body').hasClass('page-template-template-gallery-enhvideos')){
704					pageTemplate = 'template-gallery-enhvideos.php'
705				} else if($('body').hasClass('page-template-template-gallery-wp')){
706					pageTemplate = 'template-gallery-wp.php'
707				} else {
708					pageTemplate = 'template-gallery.php'
709				}
710				galleryPopin($(this).data('id'), undefined, undefined, pageTemplate);
711				return false;
712			});
713			var _tags = $('#gallery-tags li');
714			_tags.each(function () {
715				$(this).on('click', function () {
716					_tags.removeClass('active');
717					$(this).addClass('active');
718					var _tag = $(this).data('tag');
719					if (_tag !== undefined) {
720						$container.isotope({filter: '.' + _tag});
721					} else {
722						$container.isotope({filter: '*'});
723					}
724				});
725			});
726
727			if (photogallery_category != '') {
728				$('#gallery-tags li[data-tag=' + photogallery_category + ']').trigger('click');
729			}
730
731		} else {
732
733			$('#video').prependTo('#gallery');
734			$('.fancy.video > a').each(function () {
735				var _href = '//www.youtube.com/embed/' + YouTubeGetID($(this).attr('href')) + '?showinfo=0&rel=0&modestbranding=1&autoplay=1&wmode=opaque';
736				$(this).attr('data-href', _href).attr('href', 'javascript:void(0);');
737				$(this).addClass('fancybox.iframe').fancybox({
738					fitToView: true,
739					href: _href,
740					openEffect: 'none',
741					closeEffect: 'none',
742					padding: 0
743				});
744			});
745			$('.fancy.virtualtour > a').each(function () {
746				var _href = $(this).attr('href');
747				$(this).attr('data-href', _href).attr('href', 'javascript:void(0);');
748				$(this).addClass('fancybox.iframe').fancybox({
749					fitToView: true,
750					href: _href,
751					openEffect: 'none',
752					closeEffect: 'none',
753					padding: 0
754				});
755			});
756			$('.fancy.image a').each(function () {
757				var _href = $(this).attr('href');
758				$(this).attr('data-href', _href).attr('href', 'javascript:void(0);');
759				$(this).on('click', function () {
760					$.fancybox({
761						openEffect: 'elastic',
762						closeEffect: 'elastic',
763						href: _href,
764						padding: 0
765					});
766				});
767			});
768			var _tags = $('#gallery-tags li');
769			var _select_photos = $('<select></select>');
770			_select_photos.appendTo('#gallery-tags');
771			_tags.each(function () {
772				var _option = $('<option value="' + $(this).data('tag') + '">' + $(this).text() + '</option>');
773				_option.appendTo(_select_photos);
774			});
775			$('#gallery-tags ul').remove();
776			$('#gallery-tags').insertAfter('#header').show();
777			_select_photos.on('change', function () {
778				var _tag = $(this).val();
779				if (_tag !== 'undefined') {
780					$container.isotope({filter: '.' + _tag});
781				} else {
782					$container.isotope({filter: '*'});
783				}
784				$('html, body').scrollTop(0);
785			});
786
787			if (photogallery_category != '') {
788				_select_photos.val(photogallery_category).trigger('change');
789			}
790
791			$('#gallery div.elm').each(function () {
792				if ($(this).hasClass('fancy')) {
793					var _src = $(this).find('img').attr('src');
794				} else {
795					var _src = $(this).find('a').first().data('href');
796				}
797				$(this).find('img').attr('src', _src);
798			});
799
800			$('#video, #video-ctx, #gallery div.video, #gallery .video-ctx, #gallery div.elm').each(function () {
801				var _self = $(this);
802				$(this).parents().each(function () {
803					var _w = $(this).width();
804					if (_w !== 0) {
805						_self.css({'width': _w, 'height': _w * 9 / 16});
806						return false;
807					}
808				});
809
810			});
811
812			$('.w-resp, #gallery div.elm').each(function () {
813				var _self = $(this);
814				setTimeout(function () {
815					_self.resizeCenter();
816				}, 250);
817			});
818
819			$(window).on('resize', function () {
820				$('#video, #video-ctx, #gallery div.video, #gallery .video-ctx, #gallery div.elm').each(function () {
821					var _self = $(this);
822					$(this).parents().each(function () {
823						var _w = $(this).width();
824						if (_w !== 0) {
825							_self.css({'width': _w, 'height': _w * 9 / 16});
826							return false;
827						}
828					});
829
830				});
831				$('.w-resp, #gallery div.elm').each(function () {
832					var _self = $(this);
833					setTimeout(function () {
834						_self.resizeCenter();
835					}, 250);
836				});
837			});
838
839		}
840
841		$container.isotope({
842			itemSelector: '.fancy',
843			layoutMode: 'masonry',
844			isOriginLeft: ($('body').hasClass('rtl')) ? false : true,
845			masonry: {
846				columnWidth: '.elm'
847			}
848		});
849
850	});
851
852	// News main page
853	var _news_max = $('.news-section ul li').length;
854	$('.news-section span.load_more').on('click', function () {
855		var _min = $('.news-section ul li:visible').length;
856		var _max = _min + 9;
857		for (i = _min; i < _max; i++) {
858			$($('.news-section ul li').get(i)).removeClass('hidden');
859		}
860		if (_max >= _news_max) {
861			$(this).remove();
862		}
863	});
864
865	// News single page
866	$('.slideshow_title > strong').css('margin-top', -$('.slideshow_title > strong').innerHeight() / 2);
867
868	// Meeting single page || Restaurant single page || Spa main page
869	if ($('body').hasClass('single-offers') || $('body').hasClass('page-template-template-meeting') || $('body').hasClass('page-template-template-restaurant') || $('body').hasClass('page-template-template-spa') || $('body').hasClass('page-template-template-long-stay') || $('body').hasClass('page-template-template-wedding-single')) {
870
871		function updateForm(_content, _form, _lang, _title) {
872			$('input[name="restaurant"]').val(_title);
873			var _hours = $('#form_hours > option:disabled');
874			var _minutes = $('#form_minutes > option:disabled');
875
876			// Function to update minutes based on selected hour and date
877			function updateMinutesValidation() {
878				var selectedDate = $('#form_date').datepicker('getDate');
879				var selectedHour = parseInt($('#form_hours').val());
880				var currentDate = new Date();
881				var currentHour = currentDate.getHours();
882				var currentMinute = currentDate.getMinutes();
883
884				if ($('body').hasClass('page-template-template-restaurant') && 
885					selectedDate && 
886					selectedDate.toDateString() === currentDate.toDateString() && 
887					selectedHour === currentHour) {
888					
889					// Disable past minutes for current hour
890					$('#form_minutes > option').each(function() {
891						var minuteValue = parseInt($(this).val());
892						if (!isNaN(minuteValue) && minuteValue <= currentMinute) {
893							$(this).prop('disabled', true);
894						} else {
895							$(this).prop('disabled', false);
896						}
897					});
898				} else {
899					// Enable all minutes for other hours/dates
900					$('#form_minutes > option').each(function() {
901						$(this).prop('disabled', false);
902					});
903				}
904			}
905
906			$('#form_date, #form_meeting_start_date, #form_meeting_end_date, #form_rooms_start_date, #form_rooms_end_date,.contact_form_datepicker').datepicker({
907				numberOfMonths: 2,
908				minDate: new Date(),
909				onSelect: function (dateText, inst) {
910					var _date = new Date();
911
912					if ($('body').hasClass('page-template-template-restaurant') && $(this).datepicker('getDate').toDateString() === _date.toDateString()) {
913						$('#form_hours > option').each(function (i) {
914							if (typeof (_hours[i]) !== 'undefined') {
915								$(this).prop('disabled', true);
916							}
917						});
918						// Update minutes validation when date changes
919						updateMinutesValidation();
920					} else if ($('body').hasClass('page-template-template-meeting') && $(this).datepicker('getDate').toDateString() === _date.toDateString()) {
921						// Disable past hours for meeting forms
922						var currentHour = _date.getHours();
923						$('#form_hours > option').each(function () {
924							var hourValue = parseInt($(this).val());
925							if (!isNaN(hourValue) && hourValue < currentHour) {
926								$(this).prop('disabled', true);
927							} else {
928								$(this).prop('disabled', false);
929							}
930						});
931						// Update minutes validation when date changes for meeting forms
932						updateMinutesValidationMeeting();
933					} else {
934						$('#form_hours > option, #form_minutes > option').each(function () {
935							$(this).prop('disabled', false);
936						});
937					}
938				}
939			});
940
941			// Function to update minutes based on selected hour and date for meeting forms
942			function updateMinutesValidationMeeting() {
943				var selectedDate = $('#form_date').datepicker('getDate');
944				var selectedHour = parseInt($('#form_hours').val());
945				var currentDate = new Date();
946				var currentHour = currentDate.getHours();
947				var currentMinute = currentDate.getMinutes();
948
949				if ($('body').hasClass('page-template-template-meeting') && 
950					selectedDate && 
951					selectedDate.toDateString() === currentDate.toDateString() && 
952					selectedHour === currentHour) {
953					
954					// Disable past minutes for current hour
955					$('#form_minutes > option').each(function() {
956						var minuteValue = parseInt($(this).val());
957						if (!isNaN(minuteValue) && minuteValue <= currentMinute) {
958							$(this).prop('disabled', true);
959						} else {
960							$(this).prop('disabled', false);
961						}
962					});
963				} else {
964					// Enable all minutes for other hours/dates
965					$('#form_minutes > option').each(function() {
966						$(this).prop('disabled', false);
967					});
968				}
969			}
970
971			// Add event listener for hour selection change
972			$('#form_hours').on('change', function() {
973				updateMinutesValidation();
974				updateMinutesValidationMeeting();
975			});
976
977			if ($('#g-recaptcha').length > 0) {
978				var _key = $('#g-recaptcha').attr('data-sitekey');
979				grecaptcha.render('g-recaptcha', {'sitekey': _key});
980			}
981
982			// Validation for Number of People field
983			function validatePeopleField() {
984				var peopleValue = $('#form_people').val();
985				var peopleField = $('#form_people').closest('p');
986				
987				// Remove existing error class
988				peopleField.removeClass('alert');
989				
990				// Check if value is empty, zero, or not a positive number
991				if (!peopleValue || peopleValue === '' || parseInt(peopleValue) <= 0 || isNaN(parseInt(peopleValue))) {
992					peopleField.addClass('alert');
993					return false;
994				}
995				return true;
996			}
997
998			// Add validation on people field change
999			$('#form_people').on('blur change', function() {
1000				validatePeopleField();
1001			});
1002
1003			$('.tableplus-submit').click(function () {
1004				$(this).trigger('accor_event.submit_form');
1005				$.fancybox.close();
1006				return true;
1007			});
1008
1009			$('input[name="longstay_meeting"], input[name="longstay_rooms"]').change(function () {
1010				$('p.' + $(this).attr('name')).hide();
1011				if ($(this).val() === '1') {
1012					$('p.' + $(this).attr('name')).show();
1013				}
1014				$.fancybox.update();
1015				$.fancybox.reposition();
1016			});
1017
1018			$('form.form').on('submit', function (e) {
1019				e.preventDefault();
1020				$(this).trigger('accor_event.submit_form');
1021				
1022				// Validate people field before submission for restaurant forms
1023				if ($('body').hasClass('page-template-template-restaurant')) {
1024					var isPeopleValid = validatePeopleField();
1025					if (!isPeopleValid) {
1026						// Scroll to the error field
1027						$('html, body').animate({
1028							scrollTop: $('#form_people').offset().top - 100
1029						}, 500);
1030						return false;
1031					}
1032				}
1033				
1034				var data = $('form.form').serialize() + '&action=hotel_form&form=' + _form + '&lang=' + _lang;
1035				var post_id = $('meta[name=accor_post_id]').attr('content');
1036				if (post_id && post_id !== '0') {
1037					data = data + '&source_post_id=' + post_id;
1038				}
1039				jQuery.post(ajax_url, data, function (response) {
1040					$('.fancybox-inner').html(response);
1041					$.fancybox.update();
1042					$.fancybox.reposition();
1043					updateForm(response, _form, _lang, _title);
1044				});
1045				return false;
1046			});
1047
1048		}
1049
1050		$('a[data-form]').on('click', function () {
1051			$(this).trigger('accor_event.open_form');
1052
1053			var _form = $(this).data('form');
1054			var _title = $(this).data('post');
1055			var _id = $(this).data('id');
1056			var data = {'action': 'hotel_form', 'form': _form, 'title': _title, 'restaurant_post_id': _id, 'lang': _lang};
1057			var post_id = $('meta[name=accor_post_id]').attr('content');
1058			if (post_id && post_id !== '0') {
1059				data.source_post_id = post_id;
1060			}
1061			jQuery.get(ajax_url, data, function (response) {
1062				$.fancybox({
1063					padding: 0,
1064					href: '',
1065					content: response,
1066					scrolling: 'no',
1067					fitToView: false,
1068					width: '70%',
1069					height: '70%',
1070					autoSize: true,
1071					helpers: {overlay: {locked: false}},
1072					afterShow: function () {
1073						updateForm(this.content, _form, _lang, _title);
1074						if (typeof (xiti_tracking) !== 'undefined') {
1075							xiti_tracking();
1076						}
1077					}
1078				});
1079			});
1080			return false;
1081		});
1082
1083		if ($(window).scrollTop() > $('.main_slideshow').innerHeight()) {
1084			$('.subnav').addClass('fixed');
1085		} else {
1086			$('.subnav').removeClass('fixed');
1087		}
1088		$('.subnav ul a').each(function () {
1089			$(this).on('click', function () {
1090				$('.subnav li').removeClass('current');
1091				$(this).parents('li').first().addClass('current');
1092				var _href = $(this).attr('href');
1093				$('html,body').addClass('scrolling').stop(0, 0).animate({
1094					scrollTop: $(_href).offset().top - $('#header').innerHeight() - $('.subnav').innerHeight()
1095				}, 1000, function () {
1096					$(this).removeClass('scrolling');
1097				});
1098			});
1099		});
1100		if (window.location.hash !== '') {
1101			$('.subnav ul a[href="' + window.location.hash + '"]').parents('li').first().addClass('current');
1102			$('html,body').animate({
1103				scrollTop: $(window.location.hash).offset().top - $('#header').innerHeight() - $('.subnav').innerHeight()
1104			}, 1000);
1105		}
1106	}
1107
1108	//meeting table
1109	if ($('body').hasClass('page-template-template-meeting')) {
1110		function meetingSelectTable() {
1111			var wraps = $('.section_meeting_table.table');
1112			wraps.each(function () {
1113				var wrap = $(this),
1114						select = wrap.find('.filter_table'),
1115						hiddenClass = 'hidden_on_mobile';
1116
1117				if (select.length > 0 && _is_mobile) {
1118					select.change(function () {
1119						var $this = $(this),
1120								filter = $this.find(':selected').attr('data-filter-value'),
1121								cell = wrap.find('.element_to_filter');
1122
1123						cell.addClass(hiddenClass);
1124						wrap.find(filter).removeClass(hiddenClass);
1125
1126					})
1127				}
1128			})
1129		}
1130	}
1131	// Offers Main Page
1132	$('li.offer_detail h3').each(function () {
1133		var _pond = $(this).text().split(' ');
1134		var _mid = Math.floor(_pond.length / 2) - 1;
1135		_pond[_mid] += '<br>';
1136		$(this).html(_pond.join(' '));
1137	})
1138	$('a[data-offer]').each(function () {
1139		$(this).on('click', function () {
1140			var _offer = $(this).data('offer').split(':');
1141			if (_offer[1] !== '') {
1142				var _dayIn = _offer[1];
1143				var _monthIn = _offer[2];
1144				var _yearIn = _offer[3];
1145			}
1146			if (_offer[0] !== '') {
1147				var _tk = _offer[0];
1148				accorBookNow({"preferredCode": _tk, "dayIn": _dayIn, "monthIn": _monthIn, "yearIn": _yearIn});
1149			} else {
1150				accorBookNow();
1151			}
1152			return false;
1153		});
1154	});
1155	$('#choose_offers').on('change', function () {
1156		$('li.offer_detail').removeClass('last').hide();
1157		var _val = $(this).find('option:selected').data('category');
1158		if (_val !== 'all') {
1159			$('li.offer_detail[data-category="' + _val + '"]').show();
1160		} else {
1161			$('li.offer_detail').show();
1162		}
1163		$('li.offer_detail:visible').each(function (n) {
1164			if ((n + 1) % 3 === 0) {
1165				$(this).addClass('last');
1166			}
1167		});
1168	});
1169
1170	var _getUrlParams = function () {
1171		var regex = /[?&]([^=#]+)=([^&#]*)/g,
1172				url = window.location.href,
1173				params = {},
1174				match;
1175		while (match = regex.exec(url)) {
1176			params[match[1]] = match[2];
1177		}
1178		return params;
1179	};
1180	var urlParams = _getUrlParams();
1181	if (typeof urlParams.category !== 'undefined' && $('#choose_offers').length > 0) {
1182		$('#choose_offers option').each(function () {
1183			var option = $(this);
1184			var select = option.parent();
1185			if (option.data('category').toLowerCase() === urlParams.category.toLowerCase()) {
1186				select.find('option:selected').removeAttr('selected');
1187				option.attr('selected', 'selected');
1188				select.trigger('change');
1189			}
1190		});
1191	}
1192
1193	// Offers single page
1194	$('div.terms h5').on('click', function () {
1195		$(this).next('div').slideDown();
1196	});
1197
1198	// Newsletter page
1199	$('select[name="brand_news_language"], select[name="news_language"]').on('change', function () {
1200		var _checkbox = $(this).parents('p.checkbox').first().find('input[type="checkbox"]');
1201		if ($(this).val() !== '') {
1202			_checkbox.prop('checked', true);
1203		} else {
1204			_checkbox.prop('checked', false);
1205		}
1206	});
1207
1208	// Long stay Page
1209	if ($('body').hasClass('page-template-template-long-stay')) {
1210		$('a[data-form]').each(function () {
1211			var _self = $(this);
1212			var _html = $(this).parents('div').first();
1213			var _form = $(this).data('form');
1214			var _title = $(this).data('post');
1215			var _id = $(this).data('id');
1216			var data = {'action': 'hotel_form', 'form': _form, 'title': _title, 'restaurant_post_id': _id, 'lang': _lang}
1217			jQuery.get(ajax_url, data, function (response) {
1218				_self.remove();
1219				$(response).appendTo(_html);
1220				updateForm(response, _form);
1221				if (typeof (xiti_tracking) !== 'undefined') {
1222					xiti_tracking();
1223				}
1224			});
1225			return false;
1226		});
1227	}
1228	/*
1229	 * 23 Mar 2022, 11:43AM SGT, by Mon N
1230	 * - Caused a full white screen since meetingSelectTable() only exist in meeting page template
1231	 */
1232	if ($('body').hasClass('page-template-template-meeting')) {
1233		meetingSelectTable();
1234	}
1235});
1236
1237$(window).resize(function () {
1238
1239	// homepage
1240	if (_is_mobile === false) {
1241		$('.main_slideshow').each(function () {
1242			var _self = $(this);
1243			var _height = _self.innerWidth() * 25 / 100;
1244			_self.height(_height);
1245			$('#main_slideshow').height(_height + $('#header').innerHeight());
1246		});
1247	}
1248
1249	// Main menu
1250	$('nav li.has-child').each(function () {
1251		var _self = $(this);
1252		if (_self.find('> ul').hasClass('set')) {
1253			_self.find('> ul').css('left', _self.position().left);
1254		}
1255	});
1256
1257	//
1258	$('#rooms ul li').each(function () {
1259		var _height = parseFloat($('#rooms ul li:first').innerWidth() * 80 / 100);
1260		$(this).css('height', _height);
1261	});
1262
1263	// Rooms menu
1264	if ($('#room-nav div.room_slider').length > 0) {
1265		var _slider_w = $('#room-nav div.room_slider').data('initial-width') + $('.previous_room').innerWidth() + $('.next_room').innerWidth();
1266		var _slider_diff = $('#room-nav').innerWidth() - _slider_w;
1267		if (_slider_diff < 0) {
1268			$('#room-nav div.room_slider').width($('#room-nav div.room_slider').data('initial-width') + _slider_diff);
1269		} else {
1270			$('#room-nav div.room_slider').width($('#room-nav div.room_slider').data('initial-width'));
1271		}
1272	}
1273
1274	// Page section (adjust the title)
1275	if (_is_mobile === false) {
1276		$('h3.slideshow_title').css({
1277			'height': $('div.main_slideshow').innerHeight() + 'px',
1278			'line-height': $('div.main_slideshow').innerHeight() + 'px'
1279		});
1280	}
1281
1282	// News single page
1283	$('.slideshow_title > strong').css('margin-top', -$('.slideshow_title > strong').innerHeight() / 2);
1284
1285	// Gallery popin
1286	if ($('#gallery_popin').hasClass('shown')) {
1287		makeGalleryScrollable();
1288	}
1289
1290	//
1291
1292}).blur(function () {
1293
1294	// pause the main slideshow
1295	$('.main_slideshow ul.cycle').cycle('pause');
1296
1297}).focus(function () {
1298
1299	// resume the main slideshow
1300	$('.main_slideshow ul.cycle').cycle('resume');
1301
1302}).scroll(function () {
1303
1304	// homepage
1305	if ($('body').hasClass('home')) {
1306		if ($(window).scrollTop() > $('#booking').offset().top + $('#booking').innerHeight() - $('#header').innerHeight()) {
1307			$('#book_button').addClass('shown');
1308		} else {
1309			$('#book_button').removeClass('shown');
1310		}
1311	}
1312
1313	// rooms menu
1314	if ($(window).scrollTop() > $('.main_slideshow').innerHeight()) {
1315		$('#room-nav').addClass('fixed');
1316	} else {
1317		$('#room-nav').removeClass('fixed');
1318	}
1319
1320	// restaurant menu
1321	if ($(window).scrollTop() > $('.main_slideshow').innerHeight()) {
1322		$('.subnav').addClass('fixed');
1323	} else {
1324		$('.subnav').removeClass('fixed');
1325	}
1326	if (!$('html,body').hasClass('scrolling')) {
1327		var _subnav = new Array();
1328		$('.subnav ul a').each(function () {
1329			_subnav.push($(this).attr('href'));
1330		});
1331		$.map(_subnav, function (el) {
1332			if ($(window).scrollTop() >= ($(el).offset().top - $('#header').innerHeight() - $('.subnav').innerHeight())) {
1333				$('.subnav li').removeClass('current');
1334				$('.subnav ul a[href="' + el + '"]').parents('li').first().addClass('current');
1335			}
1336		});
1337	}
1338	//
1339
1340}).bind('click', function (e) {
1341	if ($('label[for="adultNumber-check"]').hasClass('hasChildOpened') && $(e.target) != undefined && !$(e.target).parents().hasClass('adults')) {
1342		$('label[for="adultNumber-check"]').removeClass('hasChildOpened');
1343		$('ul.select_adults').stop(true, true).fadeOut();
1344	}
1345	if ($('label[for="childrenNumber-check"]').hasClass('hasChildOpened') && $(e.target) != undefined && !$(e.target).parents().hasClass('children')) {
1346		$('label[for="childrenNumber-check"]').removeClass('hasChildOpened');
1347		$('ul.select_children').stop(true, true).fadeOut();
1348	}
1349
1350}).keydown(function (e) {
1351
1352	// Gallery popin
1353	if ($('#gallery_popin').hasClass('shown')) {
1354		switch (e.which) {
1355			case 37:
1356				$('.gallery_prev').trigger('click');
1357				break;
1358			case 39:
1359				$('.gallery_next').trigger('click');
1360				break;
1361			default:
1362				return;
1363		}
1364		e.preventDefault();
1365	}
1366
1367});
1368
1369var galleryPopin = function (id, panel, category, pageTemplate) {
1370	pageTemplate = pageTemplate || 'auto';
1371	if (typeof category === 'undefined') {
1372		category = false;
1373	}
1374	$.ajax({
1375		type: "GET",
1376		data: {'action': 'gallery',pageTemplate: pageTemplate, 'lang': ((_lang !== undefined) ? _lang : 'en')},
1377		url: ajax_url,
1378		error: function () {
1379			if (window.console && console.log) {
1380				console.log("error while getting the gallery data !");
1381			}
1382		},
1383		success: function (gallery) {
1384			if (gallery !== 'error') {
1385				gallery_html = gallery;
1386			} else {
1387				if (window.console && console.log) {
1388					console.log("error during success while getting the gallery data !");
1389				}
1390			}
1391		},
1392		complete: function () {
1393			if (gallery_html !== undefined) {
1394
1395				$('.main_slideshow ul.cycle').cycle('pause');
1396
1397				var gallery_current = 0;
1398
1399				$('html, body').css('overflow', 'hidden');
1400				$('#gallery_popin').html(gallery_html);
1401
1402				var _width = $('#gallery_thumbnails_ctx li:visible').length * $('#gallery_thumbnails_ctx li:visible').outerWidth(true);
1403				var $container = $('#gallery_thumbnails_ctx > ul');
1404				$container.width(_width);
1405				$container.isotope({
1406					itemSelector: '.thumb',
1407					layoutMode: 'masonry',
1408					isOriginLeft: ($('body').hasClass('rtl')) ? false : true,
1409					masonry: {
1410						columnWidth: '.elm'
1411					}
1412				});
1413
1414				var lastTimeout = null;
1415
1416				$container.on('arrangeComplete', function (event, filteredItems) {
1417					if (lastTimeout) {
1418						clearTimeout(lastTimeout);
1419					}
1420					lastTimeout = setTimeout(function () {
1421						$container.find('.thumb').css('position', 'relative');
1422						$('#gallery_caption i.gallery_total').text($('#gallery_thumbnails_ctx li[data-type!="video"]:visible').length - $('#gallery_thumbnails_ctx li[data-type="virtual"]:visible').length);
1423						gallery_current = 0;
1424						$($('#gallery_thumbnails_ctx li:visible').get(gallery_current)).trigger('click');
1425						makeGalleryScrollable();
1426					}, 400);
1427
1428				});
1429
1430				$('#gallery_categories li').each(function () {
1431					$(this).on('click', function () {
1432						$('#gallery_categories li').removeClass('active');
1433						$(this).addClass('active');
1434						var _tag = $(this).data('tag');
1435						$container.width(_width);
1436						if (_tag !== undefined) {
1437							$container.isotope({filter: '.' + _tag});
1438						} else {
1439							$container.isotope({filter: '*'});
1440						}
1441						$('.gallery_info').text($(this).text());
1442						setTimeout(function () {
1443							// update total number of pics.
1444							// Sometimes arrange complete is not getting called.
1445							$container.trigger('arrangeComplete');
1446						}, 300);
1447					});
1448				});
1449				$('#gallery_thumbnails_ctx li').each(function () {
1450					$(this).on('click', function () {
1451
1452						var _self = $(this);
1453						var _caption = _self.data('caption');
1454						var _category = _self.data('cat');
1455						gallery_current = $('#gallery_thumbnails_ctx li:visible').index(this);
1456
1457						if (gallery_current <= 0) {
1458							$('.gallery_prev').hide();
1459							$('.gallery_next').show();
1460						} else if (gallery_current + 1 >= $('#gallery_thumbnails_ctx li:visible').length) {
1461							$('.gallery_next').hide();
1462							$('.gallery_prev').show();
1463						} else {
1464							$('.gallery_next, .gallery_prev').show();
1465						}
1466
1467						$('#gallery_thumbnails_ctx li').removeClass('current');
1468						_self.addClass('current');
1469
1470						$('#gallery_preview > img.resp, #gallery_preview > iframe').fadeOut(750, function () {
1471							$(this).remove();
1472						});
1473
1474						if (_self.data('type') == 'image') {
1475							var _img = new Image();
1476							_img.onload = function () {
1477								var _image = $(_img).addClass('resp');
1478								_image.prependTo($('#gallery_preview'));
1479								$('#gallery_preview').resizeCenter({
1480									onLoad: function () {
1481										$('#gallery_preview > img.resp').animate({'opacity': 1});
1482										$('#gallery_caption').show();
1483										var _index = $('#gallery_thumbnails_ctx li[data-type!="video"]:visible').not('[data-type="virtual"]').index(_self.get(0)) + 1;
1484										$('#gallery_caption i.gallery_current').text(_index);
1485										$('#gallery_caption strong').text(_caption);
1486										$('#gallery_caption span').text(_category);
1487										$('.gallery_info').text(_category);
1488									}
1489								});
1490								$('#gallery_thumbnails').css({'bottom': '0', 'left': '0'});
1491							};
1492							_img.src = $(this).data('big');
1493						} else if (_self.data('type') == 'virtual') {
1494							$('#gallery_caption').hide();
1495							$('#gallery_thumbnails').css({'bottom': '-999999px', 'left': '-999999px'});
1496							if (!($('#gallery_categories').hasClass('closed'))) {
1497								$('#gallery_categories').addClass('closed');
1498							}
1499							var _iframe = $('<iframe width="100%" height="100%" src="' + _self.data('big') + '" style="border:0" frameborder="0" allowfullscreen></iframe>');
1500							if (_is_mobile === true && $('html').hasClass('portrait')) {
1501								var _mhv = $('#gallery_preview').innerHeight(), _mwv = $('#gallery_preview').innerWidth();
1502								_iframe.css({
1503									'width': _mhv,
1504									'height': _mwv,
1505									'left': -(_mhv - _mwv) / 2,
1506									'bottom': (_mhv - _mwv) / 2
1507								});
1508							}
1509							_iframe.prependTo($('#gallery_preview'));
1510						} else {
1511							$('#gallery_caption').hide();
1512							$('#gallery_thumbnails').css({'bottom': '0', 'left': '0'});
1513							var _video = $('<iframe width="100%" height="100%" src="https://www.youtube.com/embed/' + _self.data('big') + '?showinfo=0&rel=0&modestbranding=1&autoplay=1&wmode=opaque" frameborder="0" allowfullscreen></iframe>');
1514							_video.prependTo($('#gallery_preview'));
1515
1516						}
1517
1518						var _center = $('#gallery_thumbnails_ctx').innerWidth() / _self.outerWidth(true) / 2;
1519						$('#gallery_thumbnails_ctx').animate({scrollLeft: _self.position().left - _center * _self.innerWidth()});
1520					});
1521				});
1522				/***/
1523				$('.gallery_menu').on('click', function () {
1524					if ($('#gallery_categories').hasClass('closed')) {
1525						$('#gallery_categories').removeClass('closed');
1526						$('#gallery_preview').removeClass('closed');
1527					} else {
1528						$('#gallery_categories').addClass('closed');
1529						$('#gallery_preview').addClass('closed');
1530					}
1531				});
1532				$('.gallery_next').on('click', function () {
1533					gallery_current = gallery_current + 1;
1534					$('.gallery_prev, .gallery_next').show();
1535					$($('#gallery_thumbnails_ctx li:visible').get(gallery_current)).trigger('click');
1536				});
1537				$('.gallery_prev').on('click', function () {
1538					gallery_current = gallery_current - 1;
1539					$($('#gallery_thumbnails_ctx li:visible').get(gallery_current)).trigger('click');
1540				});
1541				$('#gallery_popin span.close').on('click', function () {
1542					$('#gallery_popin_ctx').fadeOut(750, function () {
1543						$('#gallery_popin').children().remove();
1544						$('#gallery_popin').html('').removeClass('shown');
1545						$('html, body').css('overflow', 'auto');
1546						$('.main_slideshow ul.cycle').cycle('resume');
1547					});
1548				});
1549
1550				if (gallery_current <= 0) {
1551					$('.gallery_prev').hide();
1552					$('.gallery_next').show();
1553				} else if (gallery_current + 1 >= $('#gallery_thumbnails_ctx li:visible').length) {
1554					$('.gallery_next').hide();
1555					$('.gallery_prev').show();
1556				} else {
1557					$('.gallery_next, .gallery_prev').show();
1558				}
1559
1560				if ($('#gallery_thumbnails_ctx li:visible').length <= 1) {
1561					$('.gallery_next, .gallery_prev').hide();
1562				}
1563				makeGalleryScrollable();
1564				/**/
1565				if (id === undefined) {
1566					id = 0;
1567				}
1568				if (panel !== undefined) {
1569					$('.gallery_menu').trigger('click');
1570				}
1571
1572				$('#gallery_caption i.gallery_total').text($('#gallery_thumbnails_ctx li[data-type!="video"]:visible').length - $('#gallery_thumbnails_ctx li[data-type="virtual"]:visible').length);
1573				$($('#gallery_thumbnails_ctx li:visible').get(id)).trigger('click');
1574
1575				$('#gallery_popin').addClass('shown');
1576
1577				if (category) {
1578					$('#gallery_popin li[data-tag=' + category + ']').trigger('click');
1579				}
1580
1581			}
1582		}
1583	});
1584
1585}
1586
1587var makeGalleryScrollable = function () {
1588
1589	var _width = $('#gallery_thumbnails_ctx li:visible').length * $('#gallery_thumbnails_ctx li:visible').outerWidth(true);
1590	var $container = $('#gallery_thumbnails_ctx > ul');
1591	$container.width(_width);
1592
1593	var $scrollable = $('#gallery_thumbnails_ctx'),
1594			$scrollbar = $('.gallery_scrollbar_track'),
1595			_w = $scrollable.outerWidth(true) - $('.gallery_scrollbar_bar').position().left,
1596			_sW = $scrollable[0].scrollWidth,
1597			_sbW = _w * _w / _sW;
1598
1599	$('.gallery_scrollbar_track').width(_sbW).draggable({
1600		axis: 'x',
1601		containment: '.gallery_scrollbar_bar',
1602		drag: function (e, ui) {
1603			$scrollable.scrollLeft(_sW / _w * ui.position.left);
1604		}
1605	});
1606
1607	$scrollable.on("scroll", function () {
1608		$scrollbar.css({left: $scrollable.scrollLeft() / _w * _sbW});
1609	});
1610
1611};
1612
1613function slideShow() {
1614
1615	$('.main_slideshow').appendTo($('#main_slideshow'));
1616	var carouselContent, carouselIndex, carouselLength, firstItem, secondItem, isAnimating, itemWidth, prelastItem,
1617			lastItem, transitionTime, initialLength;
1618	initialLength = $('.main_slideshow > ul > li').length;
1619	carouselContent = $("#main_slideshow .main_slideshow > ul"), nextItem = $('<span class="main_slideshow_next"></span>'), prevItem = $('<span class="main_slideshow_prev"></span>'),
1620			carouselIndex = 2;
1621	isAnimating = false;
1622	$('#main_slideshow').addClass($('#main_slideshow .main_slideshow').data('type'));
1623	if (initialLength > 1) {
1624		nextItem.appendTo('#main_slideshow .main_slideshow');
1625		prevItem.appendTo('#main_slideshow .main_slideshow');
1626		carouselLength = carouselContent.children().length;
1627		firstItem = $(carouselContent.children()[0]);
1628		secondItem = $(carouselContent.children()[1]);
1629		prelastItem = $(carouselContent.children()[carouselLength - 2]);
1630		lastItem = $(carouselContent.children()[carouselLength - 1]);
1631		firstItem.clone().appendTo(carouselContent);
1632		secondItem.clone().appendTo(carouselContent);
1633		lastItem.clone().prependTo(carouselContent);
1634		prelastItem.clone().prependTo(carouselContent);
1635		carouselLength = carouselContent.children().length;
1636	}
1637	if ($("html").hasClass("ie8")) {
1638		itemWidth = $('#main_slideshow .cycle li').innerWidth();
1639	} else {
1640		itemWidth = 100 / carouselLength;
1641	}
1642	transitionTime = 1000;
1643	if ($("html").hasClass("ie8")) {
1644		carouselContent.css("width", carouselLength * itemWidth);
1645		var _container = $('<div class="ctx"></div>');
1646		_container.prependTo($("#main_slideshow .main_slideshow"));
1647		carouselContent.appendTo(_container);
1648		carouselContent.css("left", -itemWidth * carouselIndex);
1649	} else {
1650		carouselContent.css("width", carouselLength * 100 + "%");
1651		carouselContent.transition({x: (2 * -itemWidth) + "%"}, 0);
1652	}
1653	$($('#main_slideshow .cycle li').get(2)).attr('data-current', 'current');
1654	$.each(carouselContent.children(), function () {
1655		if ($("html").hasClass("ie8")) {
1656			return $(this).css("width", itemWidth + "px");
1657		} else {
1658			return $(this).css("width", itemWidth + "%");
1659		}
1660	});
1661	$('#main_slideshow .cycle li').each(function () {
1662		var _self = $(this);
1663		$(this).resizeCenter({
1664			onLoad: function () {
1665				_self.find('img').animate({'opacity': 1});
1666			}
1667		});
1668	});
1669	prevItem.on("click", function () {
1670		if (isAnimating) {
1671			return;
1672		}
1673		isAnimating = true;
1674		carouselIndex--;
1675		$('#main_slideshow .cycle li').attr('data-current', '');
1676		$($('#main_slideshow .cycle li').get(carouselIndex)).attr('data-current', 'current');
1677		if ($("html").hasClass("ie8")) {
1678			carouselContent.animate({'left': carouselIndex * -itemWidth + 'px'}, transitionTime, "easeInOutCirc", function () {
1679				isAnimating = false;
1680				if (carouselIndex === 1) {
1681					carouselIndex = carouselLength - 3;
1682					$('#main_slideshow .cycle li').attr('data-current', '');
1683					$($('#main_slideshow .cycle li').get(carouselIndex)).attr('data-current', 'current');
1684					carouselContent.css('left', -itemWidth * carouselIndex + "px");
1685				}
1686			});
1687		} else {
1688			return carouselContent.transition({
1689				x: (carouselIndex * -itemWidth) + "%"
1690			}, transitionTime, "easeInOutCirc", function () {
1691				isAnimating = false;
1692				if (carouselIndex === 1) {
1693					carouselIndex = carouselLength - 3;
1694					$('#main_slideshow .cycle li').attr('data-current', '');
1695					$($('#main_slideshow .cycle li').get(carouselIndex)).attr('data-current', 'current');
1696					return carouselContent.transition({
1697						x: -itemWidth * carouselIndex + "%"
1698					}, 0);
1699				}
1700			});
1701		}
1702	});
1703
1704	nextItem.on("click", function () {
1705		if (isAnimating) {
1706			return;
1707		}
1708		isAnimating = true;
1709		carouselIndex++;
1710		$('#main_slideshow .cycle li').attr('data-current', '');
1711		$($('#main_slideshow .cycle li').get(carouselIndex)).attr('data-current', 'current');
1712		if ($("html").hasClass("ie8")) {
1713			carouselContent.animate({'left': carouselIndex * -itemWidth + 'px'}, transitionTime, "easeInOutCirc", function () {
1714				isAnimating = false;
1715				if (carouselIndex === carouselLength - 2) {
1716					carouselIndex = 2;
1717					$('#main_slideshow .cycle li').attr('data-current', '');
1718					$($('#main_slideshow .cycle li').get(carouselIndex)).attr('data-current', 'current');
1719					carouselContent.css('left', -itemWidth * carouselIndex + "px");
1720				}
1721			});
1722		} else {
1723			return carouselContent.transition({
1724				x: (carouselIndex * -itemWidth) + "%"
1725			}, transitionTime, "easeInOutCirc", function () {
1726				isAnimating = false;
1727				if (carouselIndex === carouselLength - 2) {
1728					carouselIndex = 2;
1729					$('#main_slideshow .cycle li').attr('data-current', '');
1730					$($('#main_slideshow .cycle li').get(carouselIndex)).attr('data-current', 'current');
1731					return carouselContent.transition({
1732						x: -itemWidth * carouselIndex + "%"
1733					}, 0);
1734				}
1735			});
1736		}
1737	});
1738
1739};
1740
1741/**
1742 * Get YouTube ID from various YouTube URL
1743 * @author: takien
1744 * @url: http://takien.com
1745 * For PHP YouTube parser, go here http://takien.com/864
1746 */
1747
1748function YouTubeGetID(url) {
1749	var ID = '';
1750	url = url.replace(/(>|<)/gi, '').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);
1751	if (url[2] !== undefined) {
1752		ID = url[2].split(/[^0-9a-z_\-]/i);
1753		ID = ID[0];
1754	} else {
1755		ID = url;
1756	}
1757	return ID;
1758}
1759
1760/*!
1761 * imagesLoaded PACKAGED v3.1.8
1762 * JavaScript is all like "You images are done yet or what?"
1763 * MIT License
1764 */
1765
1766(function () {
1767	function e() {
1768	}
1769
1770	function t(e, t) {
1771		for (var n = e.length; n--;
1771) if (e[n].listener === t) return n;
1772		return -1
1773	}
1774
1775	function n(e) {
1776		return function () {
1777			return this[e].apply(this, arguments)
1778		}
1779	}
1780
1781	var i = e.prototype, r = this, o = r.EventEmitter;
1782	i.getListeners = function (e) {
1783		var t, n, i = this._getEvents();
1784		if ("object" == typeof e) {
1785			t = {};
1786			for (n in i) i.hasOwnProperty(n) && e.test(n) && (t[n] = i[n])
1787		} else t = i[e] || (i[e] = []);
1788		return t
1789	}, i.flattenListeners = function (e) {
1790		var t, n = [];
1791		for (t = 0; e.length > t; t += 1) n.push(e[t].listener);
1792		return n
1793	}, i.getListenersAsObject = function (e) {
1794		var t, n = this.getListeners(e);
1795		return n instanceof Array && (t = {}, t[e] = n), t || n
1796	}, i.addListener = function (e, n) {
1797		var i, r = this.getListenersAsObject(e), o = "object" == typeof n;
1798		for (i in r) r.hasOwnProperty(i) && -1 === t(r[i], n) && r[i].push(o ? n : {listener: n, once: !1});
1799		return this
1800	}, i.on = n("addListener"), i.addOnceListener = function (e, t) {
1801		return this.addListener(e, {listener: t, once: !0})
1802	}, i.once = n("addOnceListener"), i.defineEvent = function (e) {
1803		return this.getListeners(e), this
1804	}, i.defineEvents = function (e) {
1805		for (var t = 0; e.length > t; t += 1) this.defineEvent(e[t]);
1806		return this
1807	}, i.removeListener = function (e, n) {
1808		var i, r, o = this.getListenersAsObject(e);
1809		for (r in o) o.hasOwnProperty(r) && (i = t(o[r], n), -1 !== i && o[r].splice(i, 1));
1810		return this
1811	}, i.off = n("removeListener"), i.addListeners = function (e, t) {
1812		return this.manipulateListeners(!1, e, t)
1813	}, i.removeListeners = function (e, t) {
1814		return this.manipulateListeners(!0, e, t)
1815	}, i.manipulateListeners = function (e, t, n) {
1816		var i, r, o = e ? this.removeListener : this.addListener, s = e ? this.removeListeners : this.addListeners;
1817		if ("object" != typeof t || t instanceof RegExp) for (i = n.length; i--;) o.call(this, t, n[i]); else for (i in t) t.hasOwnProperty(i) && (r = t[i]) && ("function" == typeof r ? o.call(this, i, r) : s.call(this, i, r));
1818		return this
1819	}, i.removeEvent = function (e) {
1820		var t, n = typeof e, i = this._getEvents();
1821		if ("string" === n) delete i[e]; else if ("object" === n) for (t in i) i.hasOwnProperty(t) && e.test(t) && delete i[t]; else delete this._events;
1822		return this
1823	}, i.removeAllListeners = n("removeEvent"), i.emitEvent = function (e, t) {
1824		var n, i, r, o, s = this.getListenersAsObject(e);
1825		for (r in s) if (s.hasOwnProperty(r)) for (i = s[r].length; i--;) n = s[r][i], n.once === !0 && this.removeListener(e, n.listener), o = n.listener.apply(this, t || []), o === this._getOnceReturnValue() && this.removeListener(e, n.listener);
1826		return this
1827	}, i.trigger = n("emitEvent"), i.emit = function (e) {
1828		var t = Array.prototype.slice.call(arguments, 1);
1829		return this.emitEvent(e, t)
1830	}, i.setOnceReturnValue = function (e) {
1831		return this._onceReturnValue = e, this
1832	}, i._getOnceReturnValue = function () {
1833		return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue : !0
1834	}, i._getEvents = function () {
1835		return this._events || (this._events = {})
1836	}, e.noConflict = function () {
1837		return r.EventEmitter = o, e
1838	}, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function () {
1839		return e
1840	}) : "object" == typeof module && module.exports ? module.exports = e : this.EventEmitter = e
1841}).call(this), function (e) {
1842	function t(t) {
1843		var n = e.event;
1844		return n.target = n.target || n.srcElement || t, n
1845	}
1846
1847	var n = document.documentElement, i = function () {
1848	};
1849	n.addEventListener ? i = function (e, t, n) {
1850		e.addEventListener(t, n, !1)
1851	} : n.attachEvent && (i = function (e, n, i) {
1852		e[n + i] = i.handleEvent ? function () {
1853			var n = t(e);
1854			i.handleEvent.call(i, n)
1855		} : function () {
1856			var n = t(e);
1857			i.call(e, n)
1858		}, e.attachEvent("on" + n, e[n + i])
1859	});
1860	var r = function () {
1861	};
1862	n.removeEventListener ? r = function (e, t, n) {
1863		e.removeEventListener(t, n, !1)
1864	} : n.detachEvent && (r = function (e, t, n) {
1865		e.detachEvent("on" + t, e[t + n]);
1866		try {
1867			delete e[t + n]
1868		} catch (i) {
1869			e[t + n] = void 0
1870		}
1871	});
1872	var o = {bind: i, unbind: r};
1873	"function" == typeof define && define.amd ? define("eventie/eventie", o) : e.eventie = o
1874}(this), function (e, t) {
1875	"function" == typeof define && define.amd ? define(["eventEmitter/EventEmitter", "eventie/eventie"], function (n, i) {
1876		return t(e, n, i)
1877	}) : "object" == typeof exports ? module.exports = t(e, require("wolfy87-eventemitter"), require("eventie")) : e.imagesLoaded = t(e, e.EventEmitter, e.eventie)
1878}(window, function (e, t, n) {
1879	function i(e, t) {
1880		for (var n in t) e[n] = t[n];
1881		return e
1882	}
1883
1884	function r(e) {
1885		return "[object Array]" === d.call(e)
1886	}
1887
1888	function o(e) {
1889		var t = [];
1890		if (r(e)) t = e; else if ("number" == typeof e.length) for (var n = 0, i = e.length; i > n; n++) t.push(e[n]); else t.push(e);
1891		return t
1892	}
1893
1894	function s(e, t, n) {
1895		if (!(this instanceof s)) return new s(e, t);
1896		"string" == typeof e && (e = document.querySelectorAll(e)), this.elements = o(e), this.options = i({}, this.options), "function" == typeof t ? n = t : i(this.options, t), n && this.on("always", n), this.getImages(), a && (this.jqDeferred = new a.Deferred);
1897		var r = this;
1898		setTimeout(function () {
1899			r.check()
1900		})
1901	}
1902
1903	function f(e) {
1904		this.img = e
1905	}
1906
1907	function c(e) {
1908		this.src = e, v[e] = this
1909	}
1910
1911	var a = e.jQuery, u = e.console, h = u !== void 0, d = Object.prototype.toString;
1912	s.prototype = new t, s.prototype.options = {}, s.prototype.getImages = function () {
1913		this.images = [];
1914		for (var e = 0, t = this.elements.length; t > e; e++) {
1915			var n = this.elements[e];
1916			"IMG" === n.nodeName && this.addImage(n);
1917			var i = n.nodeType;
1918			if (i && (1 === i || 9 === i || 11 === i)) for (var r = n.querySelectorAll("img"), o = 0, s = r.length; s > o; o++) {
1919				var f = r[o];
1920				this.addImage(f)
1921			}
1922		}
1923	}, s.prototype.addImage = function (e) {
1924		var t = new f(e);
1925		this.images.push(t)
1926	}, s.prototype.check = function () {
1927		function e(e, r) {
1928			return t.options.debug && h && u.log("confirm", e, r), t.progress(e), n++, n === i && t.complete(), !0
1929		}
1930
1931		var t = this, n = 0, i = this.images.length;
1932		if (this.hasAnyBroken = !1, !i) return this.complete(), void 0;
1933		for (var r = 0; i > r; r++) {
1934			var o = this.images[r];
1935			o.on("confirm", e), o.check()
1936		}
1937	}, s.prototype.progress = function (e) {
1938		this.hasAnyBroken = this.hasAnyBroken || !e.isLoaded;
1939		var t = this;
1940		setTimeout(function () {
1941			t.emit("progress", t, e), t.jqDeferred && t.jqDeferred.notify && t.jqDeferred.notify(t, e)
1942		})
1943	}, s.prototype.complete = function () {
1944		var e = this.hasAnyBroken ? "fail" : "done";
1945		this.isComplete = !0;
1946		var t = this;
1947		setTimeout(function () {
1948			if (t.emit(e, t), t.emit("always", t), t.jqDeferred) {
1949				var n = t.hasAnyBroken ? "reject" : "resolve";
1950				t.jqDeferred[n](t)
1951			}
1952		})
1953	}, a && (a.fn.imagesLoaded = function (e, t) {
1954		var n = new s(this, e, t);
1955		return n.jqDeferred.promise(a(this))
1956	}), f.prototype = new t, f.prototype.check = function () {
1957		var e = v[this.img.src] || new c(this.img.src);
1958		if (e.isConfirmed) return this.confirm(e.isLoaded, "cached was confirmed"), void 0;
1959		if (this.img.complete && void 0 !== this.img.naturalWidth) return this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), void 0;
1960		var t = this;
1961		e.on("confirm", function (e, n) {
1962			return t.confirm(e.isLoaded, n), !0
1963		}), e.check()
1964	}, f.prototype.confirm = function (e, t) {
1965		this.isLoaded = e, this.emit("confirm", this, t)
1966	};
1967	var v = {};
1968	return c.prototype = new t, c.prototype.check = function () {
1969		if (!this.isChecked) {
1970			var e = new Image;
1971			n.bind(e, "load", this), n.bind(e, "error", this), e.src = this.src, this.isChecked = !0
1972		}
1973	}, c.prototype.handleEvent = function (e) {
1974		var t = "on" + e.type;
1975		this[t] && this[t](e)
1976	}, c.prototype.onload = function (e) {
1977		this.confirm(!0, "onload"), this.unbindProxyEvents(e)
1978	}, c.prototype.onerror = function (e) {
1979		this.confirm(!1, "onerror"), this.unbindProxyEvents(e)
1980	}, c.prototype.confirm = function (e, t) {
1981		this.isConfirmed = !0, this.isLoaded = e, this.emit("confirm", this, t)
1982	}, c.prototype.unbindProxyEvents = function (e) {
1983		n.unbind(e.target, "load", this), n.unbind(e.target, "error", this)
1984	}, s
1985});
1986
1987/**
1988 * jQuery Horizontal Navigation 1.0
1989 * https://github.com/sebnitu/horizontalNav
1990 *
1991 * By Sebastian Nitu - Copyright 2014 - All rights reserved
1992 * Author URL: http://sebnitu.com
1993 */
1994;(function (e) {
1995	e.fn.horizontalNav = function (t) {
1996		"use strict";
1997		var n = e.extend({}, e.fn.horizontalNav.defaults, t);
1998		return this.each(function () {
1999			function l(e) {
2000				return e.innerWidth() - (parseInt(e.css("padding-left")) + parseInt(e.css("padding-right")))
2001			}
2002
2003			function c(t, n) {
2004				n = n || 100;
2005				var r;
2006				e(window).resize(function () {
2007					clearTimeout(r);
2008					r = setTimeout(function () {
2009						t()
2010					}, n)
2011				})
2012			}
2013
2014			function h() {
2015				if (r.tableDisplay != true || e.browser.msie && parseInt(e.browser.version, 10) <= 7) {
2016					s.css({"float": "left"});
2017					o.css({"float": "left", width: "auto"});
2018					f.css({"padding-left": 0, "padding-right": 0});
2019					var n = l(s), c = s.outerWidth(true), h = c - n, p = l(i), d = p - h - n, v = Math.floor(d / a);
2020					o.each(function (t) {
2021						var n = l(e(this));
2022						e(this).css({width: n + v + "px"})
2023					});
2024					var m = l(u) + (p - h - l(s));
2025					if (e.browser.mozilla || e.browser.msie) {
2026						m = m - 1
2027					}
2028					u.css({width: m + "px"})
2029				} else {
2030					s.css({display: "table", "float": "none", width: "100%"});
2031					o.css({display: "table-cell", "float": "none"})
2032				}
2033				t.addClass("horizontalNav-processed").removeClass("horizontalNav-notprocessed")
2034			}
2035
2036			var t = e(this);
2037			var r = e.meta ? e.extend({}, n, t.data()) : n;
2038			if (t.is("ul")) {
2039				var i = t.parent()
2040			} else {
2041				var i = t
2042			}
2043			var s = t.is("ul") ? t : i.find("> ul"), o = s.find("> li"), u = o.last(), a = o.size(), f = o.find("> a");
2044			if (r.minimumItems && r.minimumItems > a) {
2045				t.addClass("horizontalNav-notprocessed");
2046				return false
2047			}
2048			if (r.responsive === true) {
2049				if (r.tableDisplay != true || e.browser.msie && parseInt(e.browser.version, 10) <= 7) {
2050					c(h, r.responsiveDelay)
2051				}
2052			}
2053			if (e(".clearHorizontalNav").length) {
2054				i.css({zoom: "1"})
2055			} else {
2056				i.css({zoom: "1"}).append('<div class="clearHorizontalNav">');
2057				e(".clearHorizontalNav").css({
2058					display: "block",
2059					overflow: "hidden",
2060					visibility: "hidden",
2061					width: 0,
2062					height: 0,
2063					clear: "both"
2064				})
2065			}
2066			h()
2067		})
2068	};
2069	e.fn.horizontalNav.defaults = {responsive: true, responsiveDelay: 100, tableDisplay: true, minimumItems: 0}
2070})(jQuery)
2071
2072/*!
2073 * Isotope PACKAGED v2.2.2
2074 *
2075 * Licensed GPLv3 for open source use
2076 * or Isotope Commercial License for commercial use
2077 *
2078 * http://isotope.metafizzy.co
2079 * Copyright 2015 Metafizzy
2080 */
2081
2082!function (a) {
2083	function b() {
2084	}
2085
2086	function c(a) {
2087		function c(b) {
2088			b.prototype.option || (b.prototype.option = function (b) {
2089				a.isPlainObject(b) && (this.options = a.extend(!0, this.options, b))
2090			})
2091		}
2092
2093		function e(b, c) {
2094			a.fn[b] = function (e) {
2095				if ("string" == typeof e) {
2096					for (var g = d.call(arguments, 1), h = 0, i = this.length; i > h; h++) {
2097						var j = this[h], k = a.data(j, b);
2098						if (k) if (a.isFunction(k[e]) && "_" !== e.charAt(0)) {
2099							var l = k[e].apply(k, g);
2100							if (void 0 !== l) return l
2101						} else f("no such method '" + e + "' for " + b + " instance"); else f("cannot call methods on " + b + " prior to initialization; attempted to call '" + e + "'")
2102					}
2103					return this
2104				}
2105				return this.each(function () {
2106					var d = a.data(this, b);
2107					d ? (d.option(e), d._init()) : (d = new c(this, e), a.data(this, b, d))
2108				})
2109			}
2110		}
2111
2112		if (a) {
2113			var f = "undefined" == typeof console ? b : function (a) {
2114				console.error(a)
2115			};
2116			return a.bridget = function (a, b) {
2117				c(b), e(a, b)
2118			}, a.bridget
2119		}
2120	}
2121
2122	var d = Array.prototype.slice;
2123	"function" == typeof define && define.amd ? define("jquery-bridget/jquery.bridget", ["jquery"], c) : c("object" == typeof exports ? require("jquery") : a.jQuery)
2124}(window), function (a) {
2125	function b(b) {
2126		var c = a.event;
2127		return c.target = c.target || c.srcElement || b, c
2128	}
2129
2130	var c = document.documentElement, d = function () {
2131	};
2132	c.addEventListener ? d = function (a, b, c) {
2133		a.addEventListener(b, c, !1)
2134	} : c.attachEvent && (d = function (a, c, d) {
2135		a[c + d] = d.handleEvent ? function () {
2136			var c = b(a);
2137			d.handleEvent.call(d, c)
2138		} : function () {
2139			var c = b(a);
2140			d.call(a, c)
2141		}, a.attachEvent("on" + c, a[c + d])
2142	});
2143	var e = function () {
2144	};
2145	c.removeEventListener ? e = function (a, b, c) {
2146		a.removeEventListener(b, c, !1)
2147	} : c.detachEvent && (e = function (a, b, c) {
2148		a.detachEvent("on" + b, a[b + c]);
2149		try {
2150			delete a[b + c]
2151		} catch (d) {
2152			a[b + c] = void 0
2153		}
2154	});
2155	var f = {bind: d, unbind: e};
2156	"function" == typeof define && define.amd ? define("eventie/eventie", f) : "object" == typeof exports ? module.exports = f : a.eventie = f
2157}(window), function () {
2158	"use strict";
2159
2160	function a() {
2161	}
2162
2163	function b(a, b) {
2164		for (var c = a.length; c--;) if (a[c].listener === b) return c;
2165		return -1
2166	}
2167
2168	function c(a) {
2169		return function () {
2170			return this[a].apply(this, arguments)
2171		}
2172	}
2173
2174	var d = a.prototype, e = this, f = e.EventEmitter;
2175	d.getListeners = function (a) {
2176		var b, c, d = this._getEvents();
2177		if (a instanceof RegExp) {
2178			b = {};
2179			for (c in d) d.hasOwnProperty(c) && a.test(c) && (b[c] = d[c])
2180		} else b = d[a] || (d[a] = []);
2181		return b
2182	}, d.flattenListeners = function (a) {
2183		var b, c = [];
2184		for (b = 0; b < a.length; b += 1) c.push(a[b].listener);
2185		return c
2186	}, d.getListenersAsObject = function (a) {
2187		var b, c = this.getListeners(a);
2188		return c instanceof Array && (b = {}, b[a] = c), b || c
2189	}, d.addListener = function (a, c) {
2190		var d, e = this.getListenersAsObject(a), f = "object" == typeof c;
2191		for (d in e) e.hasOwnProperty(d) && -1 === b(e[d], c) && e[d].push(f ? c : {listener: c, once: !1});
2192		return this
2193	}, d.on = c("addListener"), d.addOnceListener = function (a, b) {
2194		return this.addListener(a, {listener: b, once: !0})
2195	}, d.once = c("addOnceListener"), d.defineEvent = function (a) {
2196		return this.getListeners(a), this
2197	}, d.defineEvents = function (a) {
2198		for (var b = 0; b < a.length; b += 1) this.defineEvent(a[b]);
2199		return this
2200	}, d.removeListener = function (a, c) {
2201		var d, e, f = this.getListenersAsObject(a);
2202		for (e in f) f.hasOwnProperty(e) && (d = b(f[e], c), -1 !== d && f[e].splice(d, 1));
2203		return this
2204	}, d.off = c("removeListener"), d.addListeners = function (a, b) {
2205		return this.manipulateListeners(!1, a, b)
2206	}, d.removeListeners = function (a, b) {
2207		return this.manipulateListeners(!0, a, b)
2208	}, d.manipulateListeners = function (a, b, c) {
2209		var d, e, f = a ? this.removeListener : this.addListener, g = a ? this.removeListeners : this.addListeners;
2210		if ("object" != typeof b || b instanceof RegExp) for (d = c.length; d--;) f.call(this, b, c[d]); else for (d in b) b.hasOwnProperty(d) && (e = b[d]) && ("function" == typeof e ? f.call(this, d, e) : g.call(this, d, e));
2211		return this
2212	}, d.removeEvent = function (a) {
2213		var b, c = typeof a, d = this._getEvents();
2214		if ("string" === c) delete d[a]; else if (a instanceof RegExp) for (b in d) d.hasOwnProperty(b) && a.test(b) && delete d[b]; else delete this._events;
2215		return this
2216	}, d.removeAllListeners = c("removeEvent"), d.emitEvent = function (a, b) {
2217		var c, d, e, f, g = this.getListenersAsObject(a);
2218		for (e in g) if (g.hasOwnProperty(e)) for (d = g[e].length; d--;) c = g[e][d], c.once === !0 && this.removeListener(a, c.listener), f = c.listener.apply(this, b || []), f === this._getOnceReturnValue() && this.removeListener(a, c.listener);
2219		return this
2220	}, d.trigger = c("emitEvent"), d.emit = function (a) {
2221		var b = Array.prototype.slice.call(arguments, 1);
2222		return this.emitEvent(a, b)
2223	}, d.setOnceReturnValue = function (a) {
2224		return this._onceReturnValue = a, this
2225	}, d._getOnceReturnValue = function () {
2226		return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue : !0
2227	}, d._getEvents = function () {
2228		return this._events || (this._events = {})
2229	}, a.noConflict = function () {
2230		return e.EventEmitter = f, a
2231	}, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function () {
2232		return a
2233	}) : "object" == typeof module && module.exports ? module.exports = a : e.EventEmitter = a
2234}.call(this), function (a) {
2235	function b(a) {
2236		if (a) {
2237			if ("string" == typeof d[a]) return a;
2238			a = a.charAt(0).toUpperCase() + a.slice(1);
2239			for (var b, e = 0, f = c.length; f > e; e++) if (b = c[e] + a, "string" == typeof d[b]) return b
2240		}
2241	}
2242
2243	var c = "Webkit Moz ms Ms O".split(" "), d = document.documentElement.style;
2244	"function" == typeof define && define.amd ? define("get-style-property/get-style-property", [], function () {
2245		return b
2246	}) : "object" == typeof exports ? module.exports = b : a.getStyleProperty = b
2247}(window), function (a, b) {
2248	function c(a) {
2249		var b = parseFloat(a), c = -1 === a.indexOf("%") && !isNaN(b);
2250		return c && b
2251	}
2252
2253	function d() {
2254	}
2255
2256	function e() {
2257		for (var a = {
2258			width: 0,
2259			height: 0,
2260			innerWidth: 0,
2261			innerHeight: 0,
2262			outerWidth: 0,
2263			outerHeight: 0
2264		}, b = 0, c = h.length; c > b; b++) {
2265			var d = h[b];
2266			a[d] = 0
2267		}
2268		return a
2269	}
2270
2271	function f(b) {
2272		function d() {
2273			if (!m) {
2274				m = !0;
2275				var d = a.getComputedStyle;
2276				if (j = function () {
2277					var a = d ? function (a) {
2278						return d(a, null)
2279					} : function (a) {
2280						return a.currentStyle
2281					};
2282					return function (b) {
2283						var c = a(b);
2284						return c || g("Style returned " + c + ". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"), c
2285					}
2286				}(), k = b("boxSizing")) {
2287					var e = document.createElement("div");
2288					e.style.width = "200px", e.style.padding = "1px 2px 3px 4px", e.style.borderStyle = "solid", e.style.borderWidth = "1px 2px 3px 4px", e.style[k] = "border-box";
2289					var f = document.body || document.documentElement;
2290					f.appendChild(e);
2291					var h = j(e);
2292					l = 200 === c(h.width), f.removeChild(e)
2293				}
2294			}
2295		}
2296
2297		function f(a) {
2298			if (d(), "string" == typeof a && (a = document.querySelector(a)), a && "object" == typeof a && a.nodeType) {
2299				var b = j(a);
2300				if ("none" === b.display) return e();
2301				var f = {};
2302				f.width = a.offsetWidth, f.height = a.offsetHeight;
2303				for (var g = f.isBorderBox = !(!k || !b[k] || "border-box" !== b[k]), m = 0, n = h.length; n > m; m++) {
2304					var o = h[m], p = b[o];
2305					p = i(a, p);
2306					var q = parseFloat(p);
2307					f[o] = isNaN(q) ? 0 : q
2308				}
2309				var r = f.paddingLeft + f.paddingRight, s = f.paddingTop + f.paddingBottom, t = f.marginLeft + f.marginRight,
2310						u = f.marginTop + f.marginBottom, v = f.borderLeftWidth + f.borderRightWidth,
2311						w = f.borderTopWidth + f.borderBottomWidth, x = g && l, y = c(b.width);
2312				y !== !1 && (f.width = y + (x ? 0 : r + v));
2313				var z = c(b.height);
2314				return z !== !1 && (f.height = z + (x ? 0 : s + w)), f.innerWidth = f.width - (r + v), f.innerHe
2314ight = f.height - (s + w), f.outerWidth = f.width + t, f.outerHeight = f.height + u, f
2315			}
2316		}
2317
2318		function i(b, c) {
2319			if (a.getComputedStyle || -1 === c.indexOf("%")) return c;
2320			var d = b.style, e = d.left, f = b.runtimeStyle, g = f && f.left;
2321			return g && (f.left = b.currentStyle.left), d.left = c, c = d.pixelLeft, d.left = e, g && (f.left = g), c
2322		}
2323
2324		var j, k, l, m = !1;
2325		return f
2326	}
2327
2328	var g = "undefined" == typeof console ? d : function (a) {
2329				console.error(a)
2330			},
2331			h = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"];
2332	"function" == typeof define && define.amd ? define("get-size/get-size", ["get-style-property/get-style-property"], f) : "object" == typeof exports ? module.exports = f(require("desandro-get-style-property")) : a.getSize = f(a.getStyleProperty)
2333}(window), function (a) {
2334	function b(a) {
2335		"function" == typeof a && (b.isReady ? a() : g.push(a))
2336	}
2337
2338	function c(a) {
2339		var c = "readystatechange" === a.type && "complete" !== f.readyState;
2340		b.isReady || c || d()
2341	}
2342
2343	function d() {
2344		b.isReady = !0;
2345		for (var a = 0, c = g.length; c > a; a++) {
2346			var d = g[a];
2347			d()
2348		}
2349	}
2350
2351	function e(e) {
2352		return "complete" === f.readyState ? d() : (e.bind(f, "DOMContentLoaded", c), e.bind(f, "readystatechange", c), e.bind(a, "load", c)), b
2353	}
2354
2355	var f = a.document, g = [];
2356	b.isReady = !1, "function" == typeof define && define.amd ? define("doc-ready/doc-ready", ["eventie/eventie"], e) : "object" == typeof exports ? module.exports = e(require("eventie")) : a.docReady = e(a.eventie)
2357}(window), function (a) {
2358	"use strict";
2359
2360	function b(a, b) {
2361		return a[g](b)
2362	}
2363
2364	function c(a) {
2365		if (!a.parentNode) {
2366			var b = document.createDocumentFragment();
2367			b.appendChild(a)
2368		}
2369	}
2370
2371	function d(a, b) {
2372		c(a);
2373		for (var d = a.parentNode.querySelectorAll(b), e = 0, f = d.length; f > e; e++) if (d[e] === a) return !0;
2374		return !1
2375	}
2376
2377	function e(a, d) {
2378		return c(a), b(a, d)
2379	}
2380
2381	var f, g = function () {
2382		if (a.matches) return "matches";
2383		if (a.matchesSelector) return "matchesSelector";
2384		for (var b = ["webkit", "moz", "ms", "o"], c = 0, d = b.length; d > c; c++) {
2385			var e = b[c], f = e + "MatchesSelector";
2386			if (a[f]) return f
2387		}
2388	}();
2389	if (g) {
2390		var h = document.createElement("div"), i = b(h, "div");
2391		f = i ? b : e
2392	} else f = d;
2393	"function" == typeof define && define.amd ? define("matches-selector/matches-selector", [], function () {
2394		return f
2395	}) : "object" == typeof exports ? module.exports = f : window.matchesSelector = f
2396}(Element.prototype), function (a, b) {
2397	"use strict";
2398	"function" == typeof define && define.amd ? define("fizzy-ui-utils/utils", ["doc-ready/doc-ready", "matches-selector/matches-selector"], function (c, d) {
2399		return b(a, c, d)
2400	}) : "object" == typeof exports ? module.exports = b(a, require("doc-ready"), require("desandro-matches-selector")) : a.fizzyUIUtils = b(a, a.docReady, a.matchesSelector)
2401}(window, function (a, b, c) {
2402	var d = {};
2403	d.extend = function (a, b) {
2404		for (var c in b) a[c] = b[c];
2405		return a
2406	}, d.modulo = function (a, b) {
2407		return (a % b + b) % b
2408	};
2409	var e = Object.prototype.toString;
2410	d.isArray = function (a) {
2411		return "[object Array]" == e.call(a)
2412	}, d.makeArray = function (a) {
2413		var b = [];
2414		if (d.isArray(a)) b = a; else if (a && "number" == typeof a.length) for (var c = 0, e = a.length; e > c; c++) b.push(a[c]); else b.push(a);
2415		return b
2416	}, d.indexOf = Array.prototype.indexOf ? function (a, b) {
2417		return a.indexOf(b)
2418	} : function (a, b) {
2419		for (var c = 0, d = a.length; d > c; c++) if (a[c] === b) return c;
2420		return -1
2421	}, d.removeFrom = function (a, b) {
2422		var c = d.indexOf(a, b);
2423		-1 != c && a.splice(c, 1)
2424	}, d.isElement = "function" == typeof HTMLElement || "object" == typeof HTMLElement ? function (a) {
2425		return a instanceof HTMLElement
2426	} : function (a) {
2427		return a && "object" == typeof a && 1 == a.nodeType && "string" == typeof a.nodeName
2428	}, d.setText = function () {
2429		function a(a, c) {
2430			b = b || (void 0 !== document.documentElement.textContent ? "textContent" : "innerText"), a[b] = c
2431		}
2432
2433		var b;
2434		return a
2435	}(), d.getParent = function (a, b) {
2436		for (; a != document.body;) if (a = a.parentNode, c(a, b)) return a
2437	}, d.getQueryElement = function (a) {
2438		return "string" == typeof a ? document.querySelector(a) : a
2439	}, d.handleEvent = function (a) {
2440		var b = "on" + a.type;
2441		this[b] && this[b](a)
2442	}, d.filterFindElements = function (a, b) {
2443		a = d.makeArray(a);
2444		for (var e = [], f = 0, g = a.length; g > f; f++) {
2445			var h = a[f];
2446			if (d.isElement(h)) if (b) {
2447				c(h, b) && e.push(h);
2448				for (var i = h.querySelectorAll(b), j = 0, k = i.length; k > j; j++) e.push(i[j])
2449			} else e.push(h)
2450		}
2451		return e
2452	}, d.debounceMethod = function (a, b, c) {
2453		var d = a.prototype[b], e = b + "Timeout";
2454		a.prototype[b] = function () {
2455			var a = this[e];
2456			a && clearTimeout(a);
2457			var b = arguments, f = this;
2458			this[e] = setTimeout(function () {
2459				d.apply(f, b), delete f[e]
2460			}, c || 100)
2461		}
2462	}, d.toDashed = function (a) {
2463		return a.replace(/(.)([A-Z])/g, function (a, b, c) {
2464			return b + "-" + c
2465		}).toLowerCase()
2466	};
2467	var f = a.console;
2468	return d.htmlInit = function (c, e) {
2469		b(function () {
2470			for (var b = d.toDashed(e), g = document.querySelectorAll(".js-" + b), h = "data-" + b + "-options", i = 0, j = g.length; j > i; i++) {
2471				var k, l = g[i], m = l.getAttribute(h);
2472				try {
2473					k = m && JSON.parse(m)
2474				} catch (n) {
2475					f && f.error("Error parsing " + h + " on " + l.nodeName.toLowerCase() + (l.id ? "#" + l.id : "") + ": " + n);
2476					continue
2477				}
2478				var o = new c(l, k), p = a.jQuery;
2479				p && p.data(l, e, o)
2480			}
2481		})
2482	}, d
2483}), function (a, b) {
2484	"use strict";
2485	"function" == typeof define && define.amd ? define("outlayer/item", ["eventEmitter/EventEmitter", "get-size/get-size", "get-style-property/get-style-property", "fizzy-ui-utils/utils"], function (c, d, e, f) {
2486		return b(a, c, d, e, f)
2487	}) : "object" == typeof exports ? module.exports = b(a, require("wolfy87-eventemitter"), require("get-size"), require("desandro-get-style-property"), require("fizzy-ui-utils")) : (a.Outlayer = {}, a.Outlayer.Item = b(a, a.EventEmitter, a.getSize, a.getStyleProperty, a.fizzyUIUtils))
2488}(window, function (a, b, c, d, e) {
2489	"use strict";
2490
2491	function f(a) {
2492		for (var b in a) return !1;
2493		return b = null, !0
2494	}
2495
2496	function g(a, b) {
2497		a && (this.element = a, this.layout = b, this.position = {x: 0, y: 0}, this._create())
2498	}
2499
2500	function h(a) {
2501		return a.replace(/([A-Z])/g, function (a) {
2502			return "-" + a.toLowerCase()
2503		})
2504	}
2505
2506	var i = a.getComputedStyle, j = i ? function (a) {
2507		return i(a, null)
2508	} : function (a) {
2509		return a.currentStyle
2510	}, k = d("transition"), l = d("transform"), m = k && l, n = !!d("perspective"), o = {
2511		WebkitTransition: "webkitTransitionEnd",
2512		MozTransition: "transitionend",
2513		OTransition: "otransitionend",
2514		transition: "transitionend"
2515	}[k], p = ["transform", "transition", "transitionDuration", "transitionProperty"], q = function () {
2516		for (var a = {}, b = 0, c = p.length; c > b; b++) {
2517			var e = p[b], f = d(e);
2518			f && f !== e && (a[e] = f)
2519		}
2520		return a
2521	}();
2522	e.extend(g.prototype, b.prototype), g.prototype._create = function () {
2523		this._transn = {ingProperties: {}, clean: {}, onEnd: {}}, this.css({position: "absolute"})
2524	}, g.prototype.handleEvent = function (a) {
2525		var b = "on" + a.type;
2526		this[b] && this[b](a)
2527	}, g.prototype.getSize = function () {
2528		this.size = c(this.element)
2529	}, g.prototype.css = function (a) {
2530		var b = this.element.style;
2531		for (var c in a) {
2532			var d = q[c] || c;
2533			b[d] = a[c]
2534		}
2535	}, g.prototype.getPosition = function () {
2536		var a = j(this.element), b = this.layout.options, c = b.isOriginLeft, d = b.isOriginTop,
2537				e = a[c ? "left" : "right"], f = a[d ? "top" : "bottom"], g = this.layout.size,
2538				h = -1 != e.indexOf("%") ? parseFloat(e) / 100 * g.width : parseInt(e, 10),
2539				i = -1 != f.indexOf("%") ? parseFloat(f) / 100 * g.height : parseInt(f, 10);
2540		h = isNaN(h) ? 0 : h, i = isNaN(i) ? 0 : i, h -= c ? g.paddingLeft : g.paddingRight, i -= d ? g.paddingTop : g.paddingBottom, this.position.x = h, this.position.y = i
2541	}, g.prototype.layoutPosition = function () {
2542		var a = this.layout.size, b = this.layout.options, c = {}, d = b.isOriginLeft ? "paddingLeft" : "paddingRight",
2543				e = b.isOriginLeft ? "left" : "right", f = b.isOriginLeft ? "right" : "left", g = this.position.x + a[d];
2544		c[e] = this.getXValue(g), c[f] = "";
2545		var h = b.isOriginTop ? "paddingTop" : "paddingBottom", i = b.isOriginTop ? "top" : "bottom",
2546				j = b.isOriginTop ? "bottom" : "top", k = this.position.y + a[h];
2547		c[i] = this.getYValue(k), c[j] = "", this.css(c), this.emitEvent("layout", [this])
2548	}, g.prototype.getXValue = function (a) {
2549		var b = this.layout.options;
2550		return b.percentPosition && !b.isHorizontal ? a / this.layout.size.width * 100 + "%" : a + "px"
2551	}, g.prototype.getYValue = function (a) {
2552		var b = this.layout.options;
2553		return b.percentPosition && b.isHorizontal ? a / this.layout.size.height * 100 + "%" : a + "px"
2554	}, g.prototype._transitionTo = function (a, b) {
2555		this.getPosition();
2556		var c = this.position.x, d = this.position.y, e = parseInt(a, 10), f = parseInt(b, 10),
2557				g = e === this.position.x && f === this.position.y;
2558		if (this.setPosition(a, b), g && !this.isTransitioning) return void this.layoutPosition();
2559		var h = a - c, i = b - d, j = {};
2560		j.transform = this.getTranslate(h, i), this.transition({
2561			to: j,
2562			onTransitionEnd: {transform: this.layoutPosition},
2563			isCleaning: !0
2564		})
2565	}, g.prototype.getTranslate = function (a, b) {
2566		var c = this.layout.options;
2567		return a = c.isOriginLeft ? a : -a, b = c.isOriginTop ? b : -b, n ? "translate3d(" + a + "px, " + b + "px, 0)" : "translate(" + a + "px, " + b + "px)"
2568	}, g.prototype.goTo = function (a, b) {
2569		this.setPosition(a, b), this.layoutPosition()
2570	}, g.prototype.moveTo = m ? g.prototype._transitionTo : g.prototype.goTo, g.prototype.setPosition = function (a, b) {
2571		this.position.x = parseInt(a, 10), this.position.y = parseInt(b, 10)
2572	}, g.prototype._nonTransition = function (a) {
2573		this.css(a.to), a.isCleaning && this._removeStyles(a.to);
2574		for (var b in a.onTransitionEnd) a.onTransitionEnd[b].call(this)
2575	}, g.prototype._transition = function (a) {
2576		if (!parseFloat(this.layout.options.transitionDuration)) return void this._nonTransition(a);
2577		var b = this._transn;
2578		for (var c in a.onTransitionEnd) b.onEnd[c] = a.onTransitionEnd[c];
2579		for (c in a.to) b.ingProperties[c] = !0, a.isCleaning && (b.clean[c] = !0);
2580		if (a.from) {
2581			this.css(a.from);
2582			var d = this.element.offsetHeight;
2583			d = null
2584		}
2585		this.enableTransition(a.to), this.css(a.to), this.isTransitioning = !0
2586	};
2587	var r = "opacity," + h(q.transform || "transform");
2588	g.prototype.enableTransition = function () {
2589		this.isTransitioning || (this.css({
2590			transitionProperty: r,
2591			transitionDuration: this.layout.options.transitionDuration
2592		}), this.element.addEventListener(o, this, !1))
2593	}, g.prototype.transition = g.prototype[k ? "_transition" : "_nonTransition"], g.prototype.onwebkitTransitionEnd = function (a) {
2594		this.ontransitionend(a)
2595	}, g.prototype.onotransitionend = function (a) {
2596		this.ontransitionend(a)
2597	};
2598	var s = {"-webkit-transform": "transform", "-moz-transform": "transform", "-o-transform": "transform"};
2599	g.prototype.ontransitionend = function (a) {
2600		if (a.target === this.element) {
2601			var b = this._transn, c = s[a.propertyName] || a.propertyName;
2602			if (delete b.ingProperties[c], f(b.ingProperties) && this.disableTransition(), c in b.clean && (this.element.style[a.propertyName] = "", delete b.clean[c]), c in b.onEnd) {
2603				var d = b.onEnd[c];
2604				d.call(this), delete b.onEnd[c]
2605			}
2606			this.emitEvent("transitionEnd", [this])
2607		}
2608	}, g.prototype.disableTransition = function () {
2609		this.removeTransitionStyles(), this.element.removeEventListener(o, this, !1), this.isTransitioning = !1
2610	}, g.prototype._removeStyles = function (a) {
2611		var b = {};
2612		for (var c in a) b[c] = "";
2613		this.css(b)
2614	};
2615	var t = {transitionProperty: "", transitionDuration: ""};
2616	return g.prototype.removeTransitionStyles = function () {
2617		this.css(t)
2618	}, g.prototype.removeElem = function () {
2619		this.element.parentNode.removeChild(this.element), this.css({display: ""}), this.emitEvent("remove", [this])
2620	}, g.prototype.remove = function () {
2621		if (!k || !parseFloat(this.layout.options.transitionDuration)) return void this.removeElem();
2622		var a = this;
2623		this.once("transitionEnd", function () {
2624			a.removeElem()
2625		}), this.hide()
2626	}, g.prototype.reveal = function () {
2627		delete this.isHidden, this.css({display: ""});
2628		var a = this.layout.options, b = {}, c = this.getHideRevealTransitionEndProperty("visibleStyle");
2629		b[c] = this.onRevealTransitionEnd, this.transition({
2630			from: a.hiddenStyle,
2631			to: a.visibleStyle,
2632			isCleaning: !0,
2633			onTransitionEnd: b
2634		})
2635	}, g.prototype.onRevealTransitionEnd = function () {
2636		this.isHidden || this.emitEvent("reveal")
2637	}, g.prototype.getHideRevealTransitionEndProperty = function (a) {
2638		var b = this.layout.options[a];
2639		if (b.opacity) return "opacity";
2640		for (var c in b) return c
2641	}, g.prototype.hide = function () {
2642		this.isHidden = !0, this.css({display: ""});
2643		var a = this.layout.options, b = {}, c = this.getHideRevealTransitionEndProperty("hiddenStyle");
2644		b[c] = this.onHideTransitionEnd, this.transition({
2645			from: a.visibleStyle,
2646			to: a.hiddenStyle,
2647			isCleaning: !0,
2648			onTransitionEnd: b
2649		})
2650	}, g.prototype.onHideTransitionEnd = function () {
2651		this.isHidden && (this.css({display: "none"}), this.emitEvent("hide"))
2652	}, g.prototype.destroy = function () {
2653		this.css({position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: ""})
2654	}, g
2655}), function (a, b) {
2656	"use strict";
2657	"function" == typeof define && define.amd ? define("outlayer/outlayer", ["eventie/eventie", "eventEmitter/EventEmitter", "get-size/get-size", "fizzy-ui-utils/utils", "./item"], function (c, d, e, f, g) {
2658		return b(a, c, d, e, f, g)
2659	}) : "object" == typeof exports ? module.exports = b(a, require("eventie"), require("wolfy87-eventemitter"), require("get-size"), require("fizzy-ui-utils"), require("./item")) : a.Outlayer = b(a, a.eventie, a.EventEmitter, a.getSize, a.fizzyUIUtils, a.Outlayer.Item)
2660}(window, function (a, b, c, d, e, f) {
2661	"use strict";
2662
2663	function g(a, b) {
2664		var c = e.getQueryElement(a);
2665		if (!c) return void (h && h.error("Bad element for " + this.constructor.namespace + ": " + (c || a)));
2666		this.element = c, i && (this.$element = i(this.element)), this.options = e.extend({}, this.constructor.defaults), this.option(b);
2667		var d = ++k;
2668		this.element.outlayerGUID = d, l[d] = this, this._create(), this.options.isInitLayout && this.layout()
2669	}
2670
2671	var h = a.console, i = a.jQuery, j = function () {
2672	}, k = 0, l = {};
2673	return g.namespace = "outlayer", g.Item = f, g.defaults = {
2674		containerStyle: {position: "relative"},
2675		isInitLayout: !0,
2676		isOriginLeft: !0,
2677		isOriginTop: !0,
2678		isResizeBound: !0,
2679		isResizingContainer: !0,
2680		transitionDuration: "0.4s",
2681		hiddenStyle: {opacity: 0, transform: "scale(0.001)"},
2682		visibleStyle: {opacity: 1, transform: "scale(1)"}
2683	}, e.extend(g.prototype, c.prototype), g.prototype.option = function (a) {
2684		e.extend(this.options, a)
2685	}, g.prototype._create = function () {
2686		this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), e.extend(this.element.style, this.options.containerStyle), this.options.isResizeBound && this.bindResize()
2687	}, g.prototype.reloadItems = function () {
2688		this.items = this._itemize(this.element.children)
2689	}, g.prototype._itemize = function (a) {
2690		for (var b = this._filterFindItemElements(a), c = this.constructor.Item, d = [], e = 0, f = b.length; f > e; e++) {
2691			var g = b[e], h = new c(g, this);
2692			d.push(h)
2693		}
2694		return d
2695	}, g.prototype._filterFindItemElements = function (a) {
2696		return e.filterFindElements(a, this.options.itemSelector)
2697	}, g.prototype.getItemElements = function () {
2698		for (var a = [], b = 0, c = this.items.length; c > b; b++) a.push(this.items[b].element);
2699		return a
2700	}, g.prototype.layout = function () {
2701		this._resetLayout(), this._manageStamps();
2702		var a = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited;
2703		this.layoutItems(this.items, a), this._isLayoutInited = !0
2704	}, g.prototype._init = g.prototype.layout, g.prototype._resetLayout = function () {
2705		this.getSize()
2706	}, g.prototype.getSize = function () {
2707		this.size = d(this.element)
2708	}, g.prototype._getMeasurement = function (a, b) {
2709		var c, f = this.options[a];
2710		f ? ("string" == typeof f ? c = this.element.querySelector(f) : e.isElement(f) && (c = f), this[a] = c ? d(c)[b] : f) : this[a] = 0
2711	}, g.prototype.layoutItems = function (a, b) {
2712		a = this._getItemsForLayout(a), this._layoutItems(a, b), this._postLayout()
2713	}, g.prototype._getItemsForLayout = function (a) {
2714		for (var b = [], c = 0, d = a.length; d > c; c++) {
2715			var e = a[c];
2716			e.isIgnored || b.push(e)
2717		}
2718		return b
2719	}, g.prototype._layoutItems = function (a, b) {
2720		if (this._emitCompleteOnItems("layout", a), a && a.length) {
2721			for (var c = [], d = 0, e = a.length; e > d; d++) {
2722				var f = a[d], g = this._getItemLayoutPosition(f);
2723				g.item = f, g.isInstant = b || f.isLayoutInstant, c.push(g)
2724			}
2725			this._processLayoutQueue(c)
2726		}
2727	}, g.prototype._getItemLayoutPosition = function () {
2728		return {x: 0, y: 0}
2729	}, g.prototype._processLayoutQueue = function (a) {
2730		for (var b = 0, c = a.length; c > b; b++) {
2731			var d = a[b];
2732			this._positionItem(d.item, d.x, d.y, d.isInstant)
2733		}
2734	}, g.prototype._positionItem = function (a, b, c, d) {
2735		d ? a.goTo(b, c) : a.moveTo(b, c)
2736	}, g.prototype._postLayout = function () {
2737		this.resizeContainer()
2738	}, g.prototype.resizeContainer = function () {
2739		if (this.options.isResizingContainer) {
2740			var a = this._getContainerSize();
2741			a && (this._setContainerMeasure(a.width, !0), this._setContainerMeasure(a.height, !1))
2742		}
2743	}, g.prototype._getContainerSize = j, g.prototype._setContainerMeasure = function (a, b) {
2744		if (void 0 !== a) {
2745			var c = this.size;
2746			c.isBorderBox && (a += b ? c.paddingLeft + c.paddingRight + c.borderLeftWidth + c.borderRightWidth : c.paddingBottom + c.paddingTop + c.borderTopWidth + c.borderBottomWidth), a = Math.max(a, 0), this.element.style[b ? "width" : "height"] = a + "px"
2747		}
2748	}, g.prototype._emitCompleteOnItems = function (a, b) {
2749		function c() {
2750			e.dispatchEvent(a + "Complete", null, [b])
2751		}
2752
2753		function d() {
2754			g++, g === f && c()
2755		}
2756
2757		var e = this, f = b.length;
2758		if (!b || !f) return void c();
2759		for (var g = 0, h = 0, i = b.length; i > h; h++) {
2760			var j = b[h];
2761			j.once(a, d)
2762		}
2763	}, g.prototype.dispatchEvent = function (a, b, c) {
2764		var d = b ? [b].concat(c) : c;
2765		if (this.emitEvent(a, d), i) if (this.$element = this.$element || i(this.element), b) {
2766			var e = i.Event(b);
2767			e.type = a, this.$element.trigger(e, c)
2768		} else this.$element.trigger(a, c)
2769	}, g.prototype.ignore = function (a) {
2770		var b = this.getItem(a);
2771		b && (b.isIgnored = !0)
2772	}, g.prototype.unignore = function (a) {
2773		var b = this.getItem(a);
2774		b && delete b.isIgnored
2775	}, g.prototype.stamp = function (a) {
2776		if (a = this._find(a)) {
2777			this.stamps = this.stamps.concat(a);
2778			for (var b = 0, c = a.length; c > b; b++) {
2779				var d = a[b];
2780				this.ignore(d)
2781			}
2782		}
2783	}, g.prototype.unstamp = function (a) {
2784		if (a = this._find(a)) for (var b = 0, c = a.length; c > b; b++) {
2785			var d = a[b];
2786			e.removeFrom(this.stamps, d), this.unignore(d)
2787		}
2788	}, g.prototype._find = function (a) {
2789		return a ? ("string" == typeof a && (a = this.element.querySelectorAll(a)), a = e.makeArray(a)) : void 0
2790	}, g.prototype._manageStamps = function () {
2791		if (this.stamps && this.stamps.length) {
2792			this._getBoundingRect();
2793			for (var a = 0, b = this.stamps.length; b > a; a++) {
2794				var c = this.stamps[a];
2795				this._manageStamp(c)
2796			}
2797		}
2798	}, g.prototype._getBoundingRect = function () {
2799		var a = this.element.getBoundingClientRect(), b = this.size;
2800		this._boundingRect = {
2801			left: a.left + b.paddingLeft + b.borderLeftWidth,
2802			top: a.top + b.paddingTop + b.borderTopWidth,
2803			right: a.right - (b.paddingRight + b.borderRightWidth),
2804			bottom: a.bottom - (b.paddingBottom + b.borderBottomWidth)
2805		}
2806	}, g.prototype._manageStamp = j, g.prototype._getElementOffset = function (a) {
2807		var b = a.getBoundingClientRect(), c = this._boundingRect, e = d(a), f = {
2808			left: b.left - c.left - e.marginLeft,
2809			top: b.top - c.top - e.marginTop,
2810			right: c.right - b.right - e.marginRight,
2811			bottom: c.bottom - b.bottom - e.marginBottom
2812		};
2813		return f
2814	}, g.prototype.handleEvent = function (a) {
2815		var b = "on" + a.type;
2816		this[b] && this[b](a)
2817	}, g.prototype.bindResize = function () {
2818		this.isResizeBound || (b.bind(a, "resize", this), this.isResizeBound = !0)
2819	}, g.prototype.unbindResize = function () {
2820		this.isResizeBound && b.unbind(a, "resize", this), this.isResizeBound = !1
2821	}, g.prototype.onresize = function () {
2822		function a() {
2823			b.resize(), delete b.resizeTimeout
2824		}
2825
2826		this.resizeTimeout && clearTimeout(this.resizeTimeout);
2827		var b = this;
2828		this.resizeTimeout = setTimeout(a, 100)
2829	}, g.prototype.resize = function () {
2830		this.isResizeBound && this.needsResizeLayout() && this.layout()
2831	}, g.prototype.needsResizeLayout = function () {
2832		var a = d(this.element), b = this.size && a;
2833		return b && a.innerWidth !== this.size.innerWidth
2834	}, g.prototype.addItems = function (a) {
2835		var b = this._itemize(a);
2836		return b.length && (this.items = this.items.concat(b)), b
2837	}, g.prototype.appended = function (a) {
2838		var b = this.addItems(a);
2839		b.length && (this.layoutItems(b, !0), this.reveal(b))
2840	}, g.prototype.prepended = function (a) {
2841		var b = this._itemize(a);
2842		if (b.length) {
2843			var c = this.items.slice(0);
2844			this.items = b.concat(c), this._resetLayout(), this._manageStamps(), this.layoutItems(b, !0), this.reveal(b), this.layoutItems(c)
2845		}
2846	}, g.prototype.reveal = function (a) {
2847		this._emitCompleteOnItems("reveal", a);
2848		for (var b = a && a.length, c = 0; b && b > c; c++) {
2849			var d = a[c];
2850			d.reveal()
2851		}
2852	}, g.prototype.hide = function (a) {
2853		this._emitCompleteOnItems("hide", a);
2854		for (var b = a && a.length, c = 0; b && b > c; c++) {
2855			var d = a[c];
2856			d.hide()
2857		}
2858	}, g.prototype.revealItemElements = function (a) {
2859		var b = this.getItems(a);
2860		this.reveal(b)
2861	}, g.prototype.hideItemElements = function (a) {
2862		var b = this.getItems(a);
2863		this.hide(b)
2864	}, g.prototype.getItem = function (a) {
2865		for (var b = 0, c = this.items.length; c > b; b++) {
2866			var d = this.items[b];
2867			if (d.element === a) return d
2868		}
2869	}, g.prototype.getItems = function (a) {
2870		a = e.makeArray(a);
2871		for (var b = [], c = 0, d = a.length; d > c; c++) {
2872			var f = a[c], g = this.getItem(f);
2873			g && b.push(g)
2874		}
2875		return b
2876	}, g.prototype.remove = function (a) {
2877		var b = this.getItems(a);
2878		if (this._emitCompleteOnItems("remove", b), b && b.length) for (var c = 0, d = b.length; d > c; c++) {
2879			var f = b[c];
2880			f.remove(), e.removeFrom(this.items, f)
2881		}
2882	}, g.prototype.destroy = function () {
2883		var a = this.element.style;
2884		a.height = "", a.position = "", a.width = "";
2885		for (var b = 0, c = this.items.length; c > b; b++) {
2886			var d = this.items[b];
2887			d.destroy()
2888		}
2889		this.unbindResize();
2890		var e = this.element.outlayerGUID;
2891		delete l[e], delete this.element.outlayerGUID, i && i.removeData(this.element, this.constructor.namespace)
2892	}, g.data = function (a) {
2893		a = e.getQueryElement(a);
2894		var b = a && a.outlayerGUID;
2895		return b && l[b]
2896	}, g.create = function (a, b) {
2897		function c() {
2898			g.apply(this, arguments)
2899		}
2900
2901		return Object.create ? c.prototype = Object.create(g.prototype) : e.extend(c.prototype, g.prototype), c.prototype.constructor = c, c.defaults = e.extend({}, g.defaults), e.extend(c.defaults, b), c.prototype.settings = {}, c.namespace = a, c.data = g.data, c.Item = function () {
2902			f.apply(this, arguments)
2903		}, c.Item.prototype = new f, e.htmlInit(c, a), i && i.bridget && i.bridget(a, c), c
2904	}, g.Item = f, g
2905}), function (a, b) {
2906	"use strict";
2907	"function" == typeof define && define.amd ? define("isotope/js/item", ["outlayer/outlayer"], b) : "object" == typeof exports ? module.exports = b(require("outlayer")) : (a.Isotope = a.Isotope || {}, a.Isotope.Item = b(a.Outlayer))
2908}(window, function (a) {
2909	"use strict";
2910
2911	function b() {
2912		a.Item.apply(this, arguments)
2913	}
2914
2915	b.prototype = new a.Item, b.prototype._create = function () {
2916		this.id = this.layout.itemGUID++, a.Item.prototype._create.call(this), this.sortData = {}
2917	}, b.prototype.updateSortData = function () {
2918		if (!this.isIgnored) {
2919			this.sortData.id = this.id, this.sortData["original-order"] = this.id, this.sortData.random = Math.random();
2920			var a = this.layout.options.getSortData, b = this.layout._sorters;
2921			for (var c in a) {
2922				var d = b[c];
2923				this.sortData[c] = d(this.element, this)
2924			}
2925		}
2926	};
2927	var c = b.prototype.destroy;
2928	return b.prototype.destroy = function () {
2929		c.apply(this, arguments), this.css({display: ""})
2930	}, b
2931}), function (a, b) {
2932	"use strict";
2933	"function" == typeof define && define.amd ? define("isotope/js/layout-mode", ["get-size/get-size", "outlayer/outlayer"], b) : "object" == typeof exports ? module.exports = b(require("get-size"), require("outlayer")) : (a.Isotope = a.Isotope || {}, a.Isotope.LayoutMode = b(a.getSize, a.Outlayer))
2934}(window, function (a, b) {
2935	"use strict";
2936
2937	function c(a) {
2938		this.isotope = a, a && (this.options = a.options[this.namespace], this.element = a.element, this.items = a.filteredItems, this.size = a.size)
2939	}
2940
2941	return function () {
2942		function a(a) {
2943			return function () {
2944				return b.prototype[a].apply(this.isotope, arguments)
2945			}
2946		}
2947
2948		for (var d = ["_resetLayout", "_getItemLayoutPosition", "_manageStamp", "_getContainerSize", "_getElementOffset", "needsResizeLayout"], e = 0, f = d.length; f > e; e++) {
2949			var g = d[e];
2950			c.prototype[g] = a(g)
2951		}
2952	}(), c.prototype.needsVerticalResizeLayout = function () {
2953		var b = a(this.isotope.element), c = this.isotope.size && b;
2954		return c && b.innerHeight != this.isotope.size.innerHeight
2955	}, c.prototype._getMeasurement = function () {
2956		this.isotope._getMeasurement.apply(this, arguments)
2957	}, c.prototype.getColumnWidth = function () {
2958		this.getSegmentSize("column", "Width")
2959	}, c.prototype.getRowHeight = function () {
2960		this.getSegmentSize("row", "Height")
2961	}, c.prototype.getSegmentSize = function (a, b) {
2962		var c = a + b, d = "outer" + b;
2963		if (this._getMeasurement(c, d), !this[c]) {
2964			var e = this.getFirstItemSize();
2965			this[c] = e && e[d] || this.isotope.size["inner" + b]
2966		}
2967	}, c.prototype.getFirstItemSize = function () {
2968		var b = this.isotope.filteredItems[0];
2969		return b && b.element && a(b.element)
2970	}, c.prototype.layout = function () {
2971		this.isotope.layout.apply(this.isotope, arguments)
2972	}, c.prototype.getSize = function () {
2973		this.isotope.getSize(), this.size = this.isotope.size
2974	}, c.modes = {}, c.create = function (a, b) {
2975		function d() {
2976			c.apply(this, arguments)
2977		}
2978
2979		return d.prototype = new c, b && (d.options = b), d.prototype.namespace = a, c.modes[a] = d, d
2980	}, c
2981}), function (a, b) {
2982	"use strict";
2983	"function" == typeof define && define.amd ? define("masonry/masonry", ["outlayer/outlayer", "get-size/get-size", "fizzy-ui-utils/utils"], b) : "object" == typeof exports ? module.exports = b(require("outlayer"), require("get-size"), require("fizzy-ui-utils")) : a.Masonry = b(a.Outlayer, a.getSize, a.fizzyUIUtils)
2984}(window, function (a, b, c) {
2985	var d = a.create("masonry");
2986	return d.prototype._resetLayout = function () {
2987		this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns();
2988		var a = this.cols;
2989		for (this.colYs = []; a--;) this.colYs.push(0);
2990		this.maxY = 0
2991	}, d.prototype.measureColumns = function () {
2992		if (this.getContainerWidth(), !this.columnWidth) {
2993			var a = this.items[0], c = a && a.element;
2994			this.columnWidth = c && b(c).outerWidth || this.containerWidth
2995		}
2996		var d = this.columnWidth += this.gutter, e = this.containerWidth + this.gutter, f = e / d, g = d - e % d,
2997				h = g && 1 > g ? "round" : "floor";
2998		f = Math[h](f), this.cols = Math.max(f, 1)
2999	}, d.prototype.getContainerWidth = function () {
3000		var a = this.options.isFitWidth ? this.element.parentNode : this.element, c = b(a);
3001		this.containerWidth = c && c.innerWidth
3002	}, d.prototype._getItemLayoutPosition = function (a) {
3003		a.getSize();
3004		var b = a.size.outerWidth % this.columnWidth, d = b && 1 > b ? "round" : "ceil",
3005				e = Math[d](a.size.outerWidth / this.columnWidth);
3006		e = Math.min(e, this.cols);
3007		for (var f = this._getColGroup(e), g = Math.min.apply(Math, f), h = c.indexOf(f, g), i = {
3008			x: this.columnWidth * h,
3009			y: g
3010		}, j = g + a.size.outerHeight, k = this.cols + 1 - f.length, l = 0; k > l; l++) this.colYs[h + l] = j;
3011		return i
3012	}, d.prototype._getColGroup = function (a) {
3013		if (2 > a) return this.colYs;
3014		for (var b = [], c = this.cols + 1 - a, d = 0; c > d; d++) {
3015			var e = this.colYs.slice(d, d + a);
3016			b[d] = Math.max.apply(Math, e)
3017		}
3018		return b
3019	}, d.prototype._manageStamp = function (a) {
3020		var c = b(a), d = this._getElementOffset(a), e = this.options.isOriginLeft ? d.left : d.right, f = e + c.outerWidth,
3021				g = Math.floor(e / this.columnWidth);
3022		g = Math.max(0, g);
3023		var h = Math.floor(f / this.columnWidth);
3024		h -= f % this.columnWidth ? 0 : 1, h = Math.min(this.cols - 1, h);
3025		for (var i = (this.options.isOriginTop ? d.top : d.bottom) + c.outerHeight, j = g; h >= j; j++) this.colYs[j] = Math.max(i, this.colYs[j])
3026	}, d.prototype._getContainerSize = function () {
3027		this.maxY = Math.max.apply(Math, this.colYs);
3028		var a = {height: this.maxY};
3029		return this.options.isFitWidth && (a.width = this._getContainerFitWidth()), a
3030	}, d.prototype._getContainerFitWidth = function () {
3031		for (var a = 0, b = this.cols; --b && 0 === this.colYs[b];) a++;
3032		return (this.cols - a) * this.columnWidth - this.gutter
3033	}, d.prototype.needsResizeLayout = function () {
3034		var a = this.containerWidth;
3035		return this.getContainerWidth(), a !== this.containerWidth
3036	}, d
3037}), function (a, b) {
3038	"use strict";
3039	"function" == typeof define && define.amd ? define("isotope/js/layout-modes/masonry", ["../layout-mode", "masonry/masonry"], b) : "object" == typeof exports ? module.exports = b(require("../layout-mode"), require("masonry-layout")) : b(a.Isotope.LayoutMode, a.Masonry)
3040}(window, function (a, b) {
3041	"use strict";
3042
3043	function c(a, b) {
3044		for (var c in b) a[c] = b[c];
3045		return a
3046	}
3047
3048	var d = a.create("masonry"), e = d.prototype._getElementOffset, f = d.prototype.layout,
3049			g = d.prototype._getMeasurement;
3050	c(d.prototype, b.prototype), d.prototype._getElementOffset = e, d.prototype.layout = f, d.prototype._getMeasurement = g;
3051	var h = d.prototype.measureColumns;
3052	d.prototype.measureColumns = function () {
3053		this.items = this.isotope.filteredItems, h.call(this)
3054	};
3055	var i = d.prototype._manageStamp;
3056	return d.prototype._manageStamp = function () {
3057		this.options.isOriginLeft = this.isotope.options.isOriginLeft, this.options.isOriginTop = this.isotope.options.isOriginTop, i.apply(this, arguments)
3058	}, d
3059}), function (a, b) {
3060	"use strict";
3061	"function" == typeof define && define.amd ? define("isotope/js/layout-modes/fit-rows", ["../layout-mode"], b) : "object" == typeof exports ? module.exports = b(require("../layout-mode")) : b(a.Isotope.LayoutMode)
3062}(window, function (a) {
3063	"use strict";
3064	var b = a.create("fitRows");
3065	return b.prototype._resetLayout = function () {
3066		this.x = 0, this.y = 0, this.maxY = 0, this._getMeasurement("gutter", "outerWidth")
3067	}, b.prototype._getItemLayoutPosition = function (a) {
3068		a.getSize();
3069		var b = a.size.outerWidth + this.gutter, c = this.isotope.size.innerWidth + this.gutter;
3070		0 !== this.x && b + this.x > c && (this.x = 0, this.y = this.maxY);
3071		var d = {x: this.x, y: this.y};
3072		return this.maxY = Math.max(this.maxY, this.y + a.size.outerHeight), this.x += b, d
3073	}, b.prototype._getContainerSize = function () {
3074		return {height: this.maxY}
3075	}, b
3076}), function (a, b) {
3077	"use strict";
3078	"function" == typeof define && define.amd ? define("isotope/js/layout-modes/vertical", ["../layout-mode"], b) : "object" == typeof exports ? module.exports = b(require("../layout-mode")) : b(a.Isotope.LayoutMode)
3079}(window, function (a) {
3080	"use strict";
3081	var b = a.create("vertical", {horizontalAlignment: 0});
3082	return b.prototype._resetLayout = function () {
3083		this.y = 0
3084	}, b.prototype._getItemLayoutPosition = function (a) {
3085		a.getSize();
3086		var b = (this.isotope.size.innerWidth - a.size.outerWidth) * this.options.horizontalAlignment, c = this.y;
3087		return this.y += a.size.outerHeight, {x: b, y: c}
3088	}, b.prototype._getContainerSize = function () {
3089		return {height: this.y}
3090	}, b
3091}), function (a, b) {
3092	"use strict";
3093	"function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size", "matches-selector/matches-selector", "fizzy-ui-utils/utils", "isotope/js/item", "isotope/js/layout-mode", "isotope/js/layout-modes/masonry", "isotope/js/layout-modes/fit-rows", "isotope/js/layout-modes/vertical"], function (c, d, e, f, g, h) {
3094		return b(a, c, d, e, f, g, h)
3095	}) : "object" == typeof exports ? module.exports = b(a, require("outlayer"), require("get-size"), require("desandro-matches-selector"), require("fizzy-ui-utils"), require("./item"), require("./layout-mode"), require("./layout-modes/masonry"), require("./layout-modes/fit-rows"), require("./layout-modes/vertical")) : a.Isotope = b(a, a.Outlayer, a.getSize, a.matchesSelector, a.fizzyUIUtils, a.Isotope.Item, a.Isotope.LayoutMode)
3096}(window, function (a, b, c, d, e, f, g) {
3097	function h(a, b) {
3098		return function (c, d) {
3099			for (var e = 0, f = a.length; f > e; e++) {
3100				var g = a[e], h = c.sortData[g], i = d.sortData[g];
3101				if (h > i || i > h) {
3102					var j = void 0 !== b[g] ? b[g] : b, k = j ? 1 : -1;
3103					return (h > i ? 1 : -1) * k
3104				}
3105			}
3106			return 0
3107		}
3108	}
3109
3110	var i = a.jQuery, j = String.prototype.trim ? function (a) {
3111		return a.trim()
3112	} : function (a) {
3113		return a.replace(/^\s+|\s+$/g, "")
3114	}, k = document.documentElement, l = k.textContent ? function (a) {
3115		return a.textContent
3116	} : function (a) {
3117		return a.innerText
3118	}, m = b.create("isotope", {layoutMode: "masonry", isJQueryFiltering: !0, sortAscending: !0});
3119	m.Item = f, m.LayoutMode = g, m.prototype._create = function () {
3120		this.itemGUID = 0, this._sorters = {}, this._getSorters(), b.prototype._create.call(this), this.modes = {}, this.filteredItems = this.items, this.sortHistory = ["original-order"];
3121		for (var a in g.modes) this._initLayoutMode(a)
3122	}, m.prototype.reloadItems = function () {
3123		this.itemGUID = 0, b.prototype.reloadItems.call(this)
3124	}, m.prototype._itemize = function () {
3125		for (var a = b.prototype._itemize.apply(this, arguments), c = 0, d = a.length; d > c; c++) {
3126			var e = a[c];
3127			e.id = this.itemGUID++
3128		}
3129		return this._updateItemsSortData(a), a
3130	}, m.prototype._initLayoutMode = function (a) {
3131		var b = g.modes[a], c = this.options[a] || {};
3132		this.options[a] = b.options ? e.extend(b.options, c) : c, this.modes[a] = new b(this)
3133	}, m.prototype.layout = function () {
3134		return !this._isLayoutInited && this.options.isInitLayout ? void this.arrange() : void this._layout()
3135	}, m.prototype._layout = function () {
3136		var a = this._getIsInstant();
3137		this._resetLayout(), this._manageStamps(), this.layoutItems(this.filteredItems, a), this._isLayoutInited = !0
3138	}, m.prototype.arrange = function (a) {
3139		function b() {
3140			d.reveal(c.needReveal), d.hide(c.needHide)
3141		}
3142
3143		this.option(a), this._getIsInstant();
3144		var c = this._filter(this.items);
3145		this.filteredItems = c.matches;
3146		var d = this;
3147		this._bindArrangeComplete(), this._isInstant ? this._noTransition(b) : b(), this._sort(), this._layout()
3148	}, m.prototype._init = m.prototype.arrange, m.prototype._getIsInstant = function () {
3149		var a = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited;
3150		return this._isInstant = a, a
3151	}, m.prototype._bindArrangeComplete = function () {
3152		function a() {
3153			b && c && d && e.dispatchEvent("arrangeComplete", null, [e.filteredItems])
3154		}
3155
3156		var b, c, d, e = this;
3157		this.once("layoutComplete", function () {
3158			b = !0, a()
3159		}), this.once("hideComplete", function () {
3160			c = !0, a()
3161		}), this.once("revealComplete", function () {
3162			d = !0, a()
3163		})
3164	}, m.prototype._filter = function (a) {
3165		var b = this.options.filter;
3166		b = b || "*";
3167		for (var c = [], d = [], e = [], f = this._getFilterTest(b), g = 0, h = a.length; h > g; g++) {
3168			var i = a[g];
3169			if (!i.isIgnored) {
3170				var j = f(i);
3171				j && c.push(i), j && i.isHidden ? d.push(i) : j || i.isHidden || e.push(i)
3172			}
3173		}
3174		return {matches: c, needReveal: d, needHide: e}
3175	}, m.prototype._getFilterTest = function (a) {
3176		return i && this.options.isJQueryFiltering ? function (b) {
3177			return i(b.element).is(a)
3178		} : "function" == typeof a ? function (b) {
3179			return a(b.element)
3180		} : function (b) {
3181			return d(b.element, a)
3182		}
3183	}, m.prototype.updateSortData = function (a) {
3184		var b;
3185		a ? (a = e.makeArray(a), b = this.getItems(a)) : b = this.items, this._getSorters(), this._updateItemsSortData(b)
3186	}, m.prototype._getSorters = function () {
3187		var a = this.options.getSortData;
3188		for (var b in a) {
3189			var c = a[b];
3190			this._sorters[b] = n(c)
3191		}
3192	}, m.prototype._updateItemsSortData = function (a) {
3193		for (var b = a && a.length, c = 0; b && b > c; c++) {
3194			var d = a[c];
3195			d.updateSortData()
3196		}
3197	};
3198	var n = function () {
3199		function a(a) {
3200			if ("string" != typeof a) return a;
3201			var c = j(a).split(" "), d = c[0], e = d.match(/^\[(.+)\]$/), f = e && e[1], g = b(f, d),
3202					h = m.sortDataParsers[c[1]];
3203			return a = h ? function (a) {
3204				return a && h(g(a))
3205			} : function (a) {
3206				return a && g(a)
3207			}
3208		}
3209
3210		function b(a, b) {
3211			var c;
3212			return c = a ? function (b) {
3213				return b.getAttribute(a)
3214			} : function (a) {
3215				var c = a.querySelector(b);
3216				return c && l(c)
3217			}
3218		}
3219
3220		return a
3221	}();
3222	m.sortDataParsers = {
3223		parseInt: function (a) {
3224			return parseInt(a, 10)
3225		}, parseFloat: function (a) {
3226			return parseFloat(a)
3227		}
3228	}, m.prototype._sort = function () {
3229		var a = this.options.sortBy;
3230		if (a) {
3231			var b = [].concat.apply(a, this.sortHistory), c = h(b, this.options.sortAscending);
3232			this.filteredItems.sort(c), a != this.sortHistory[0] && this.sortHistory.unshift(a)
3233		}
3234	}, m.prototype._mode = function () {
3235		var a = this.options.layoutMode, b = this.modes[a];
3236		if (!b) throw new Error("No layout mode: " + a);
3237		return b.options = this.options[a], b
3238	}, m.prototype._resetLayout = function () {
3239		b.prototype._resetLayout.call(this), this._mode()._resetLayout()
3240	}, m.prototype._getItemLayoutPosition = function (a) {
3241		return this._mode()._getItemLayoutPosition(a)
3242	}, m.prototype._manageStamp = function (a) {
3243		this._mode()._manageStamp(a)
3244	}, m.prototype._getContainerSize = function () {
3245		return this._mode()._getContainerSize()
3246	}, m.prototype.needsResizeLayout = function () {
3247		return this._mode().needsResizeLayout()
3248	}, m.prototype.appended = function (a) {
3249		var b = this.addItems(a);
3250		if (b.length) {
3251			var c = this._filterRevealAdded(b);
3252			this.filteredItems = this.filteredItems.concat(c)
3253		}
3254	}, m.prototype.prepended = function (a) {
3255		var b = this._itemize(a);
3256		if (b.length) {
3257			this._resetLayout(), this._manageStamps();
3258			var c = this._filterRevealAdded(b);
3259			this.layoutItems(this.filteredItems), this.filteredItems = c.c
3259oncat(this.filteredItems), this.items = b.concat(this.items)
3260		}
3261	}, m.prototype._filterRevealAdded = function (a) {
3262		var b = this._filter(a);
3263		return this.hide(b.needHide), this.reveal(b.matches), this.layoutItems(b.matches, !0), b.matches
3264	}, m.prototype.insert = function (a) {
3265		var b = this.addItems(a);
3266		if (b.length) {
3267			var c, d, e = b.length;
3268			for (c = 0; e > c; c++) d = b[c], this.element.appendChild(d.element);
3269			var f = this._filter(b).matches;
3270			for (c = 0; e > c; c++) b[c].isLayoutInstant = !0;
3271			for (this.arrange(), c = 0; e > c; c++) delete b[c].isLayoutInstant;
3272			this.reveal(f)
3273		}
3274	};
3275	var o = m.prototype.remove;
3276	return m.prototype.remove = function (a) {
3277		a = e.makeArray(a);
3278		var b = this.getItems(a);
3279		o.call(this, a);
3280		var c = b && b.length;
3281		if (c) for (var d = 0; c > d; d++) {
3282			var f = b[d];
3283			e.removeFrom(this.filteredItems, f)
3284		}
3285	}, m.prototype.shuffle = function () {
3286		for (var a = 0, b = this.items.length; b > a; a++) {
3287			var c = this.items[a];
3288			c.sortData.random = Math.random()
3289		}
3290		this.options.sortBy = "random", this._sort(), this._layout()
3291	}, m.prototype._noTransition = function (a) {
3292		var b = this.options.transitionDuration;
3293		this.options.transitionDuration = 0;
3294		var c = a.call(this);
3295		return this.options.transitionDuration = b, c
3296	}, m.prototype.getFilteredItemElements = function () {
3297		for (var a = [], b = 0, c = this.filteredItems.length; c > b; b++) a.push(this.filteredItems[b].element);
3298		return a
3299	}, m
3300});
3301
3302/*! device.js 0.2.7 /
3303(function(){var a,b,c,d,e,f,g,h,i,j;b=window.device,a={},window.device=a,d=window.document.documentElement,j=window.navigator.userAgent.toLowerCase(),a.ios=function(){return a.iphone()||a.ipod()||a.ipad()},a.iphone=function(){return!a.windows()&&e("iphone")},a.ipod=function(){return e("ipod")},a.ipad=function(){return e("ipad")},a.android=function(){return!a.windows()&&e("android")},a.androidPhone=function(){return a.android()&&e("mobile")},a.androidTablet=function(){return a.android()&&!e("mobile")},a.blackberry=function(){return e("blackberry")||e("bb10")||e("rim")},a.blackberryPhone=function(){return a.blackberry()&&!e("tablet")},a.blackberryTablet=function(){return a.blackberry()&&e("tablet")},a.windows=function(){return e("windows")},a.windowsPhone=function(){return a.windows()&&e("phone")},a.windowsTablet=function(){return a.windows()&&e("touch")&&!a.windowsPhone()},a.fxos=function(){return(e("(mobile;")||e("(tablet;"))&&e("; rv:")},a.fxosPhone=function(){return a.fxos()&&e("mobile")},a.fxosTablet=function(){return a.fxos()&&e("tablet")},a.meego=function(){return e("meego")},a.cordova=function(){return window.cordova&&"file:"===location.protocol},a.nodeWebkit=function(){return"object"==typeof window.process},a.mobile=function(){return a.androidPhone()||a.iphone()||a.ipod()||a.windowsPhone()||a.blackberryPhone()||a.fxosPhone()||a.meego()},a.tablet=function(){return a.ipad()||a.androidTablet()||a.blackberryTablet()||a.windowsTablet()||a.fxosTablet()},a.desktop=function(){return!a.tablet()&&!a.mobile()},a.television=function(){var a;for(television=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","roku","pov_tv","hbbtv","ce-html"],a=0;a<television.length;){if(e(television[a]))return!0;a++}return!1},a.portrait=function(){return window.innerHeight/window.innerWidth>1},a.landscape=function(){return window.innerHeight/window.innerWidth<1},a.noConflict=function(){return window.device=b,this},e=function(a){return-1!==j.indexOf(a)},g=function(a){var b;return b=new RegExp(a,"i"),d.className.match(b)},c=function(a){var b=null;g(a)||(b=d.className.replace(/^\s+|\s+$/g,""),d.className=b+" "+a)},i=function(a){g(a)&&(d.className=d.className.replace(" "+a,""))},a.ios()?a.ipad()?c("ios ipad tablet"):a.iphone()?c("ios iphone mobile"):a.ipod()&&c("ios ipod mobile"):a.android()?c(a.androidTablet()?"android tablet":"android mobile"):a.blackberry()?c(a.blackberryTablet()?"blackberry tablet":"blackberry mobile"):a.windows()?c(a.windowsTablet()?"windows tablet":a.windowsPhone()?"windows mobile":"desktop"):a.fxos()?c(a.fxosTablet()?"fxos tablet":"fxos mobile"):a.meego()?c("meego mobile"):a.nodeWebkit()?c("node-webkit"):a.television()?c("television"):a.desktop()&&c("desktop"),a.cordova()&&c("cordova"),f=function(){a.landscape()?(i("portrait"),c("landscape")):(i("landscape"),c("portrait"))},h=Object.prototype.hasOwnProperty.call(window,"onorientationchange")?"orientationchange":"resize",window.addEventListener?window.addEventListener(h,f,!1):window.attachEvent?window.attachEvent(h,f):window[h]=f,f(),"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?module.exports=a:window.device=a}).call(this);
3304*/
3305
3306/*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
3307/*! ONLY TOUCH EVENTS */
3308(function (e, t, n) {
3309	typeof define == "function" && define.amd ? define(["jquery"], function (r) {
3310		return n(r, e, t), r.mobile
3311	}) : n(e.jQuery, e, t)
3312})(this, document, function (e, t, n, r) {
3313	(function (e, t, n, r) {
3314		function T(e) {
3315			while (e && typeof e.originalEvent != "undefined") e = e.originalEvent;
3316			return e
3317		}
3318
3319		function N(t, n) {
3320			var i = t.type, s, o, a, l, c, h, p, d, v;
3321			t = e.Event(t), t.type = n, s = t.originalEvent, o = e.event.props, i.search(/^(mouse|click)/) > -1 && (o = f);
3322			if (s) for (p = o.length, l; p;) l = o[--p], t[l] = s[l];
3323			i.search(/mouse(down|up)|click/) > -1 && !t.which && (t.which = 1);
3324			if (i.search(/^touch/) !== -1) {
3325				a = T(s), i = a.touches, c = a.changedTouches, h = i && i.length ? i[0] : c && c.length ? c[0] : r;
3326				if (h) for (d = 0, v = u.length; d < v; d++) l = u[d], t[l] = h[l]
3327			}
3328			return t
3329		}
3330
3331		function C(t) {
3332			var n = {}, r, s;
3333			while (t) {
3334				r = e.data(t, i);
3335				for (s in r) r[s] && (n[s] = n.hasVirtualBinding = !0);
3336				t = t.parentNode
3337			}
3338			return n
3339		}
3340
3341		function k(t, n) {
3342			var r;
3343			while (t) {
3344				r = e.data(t, i);
3345				if (r && (!n || r[n])) return t;
3346				t = t.parentNode
3347			}
3348			return null
3349		}
3350
3351		function L() {
3352			g = !1
3353		}
3354
3355		function A() {
3356			g = !0
3357		}
3358
3359		function O() {
3360			E = 0, v.length = 0, m = !1, A()
3361		}
3362
3363		function M() {
3364			L()
3365		}
3366
3367		function _() {
3368			D(), c = setTimeout(function () {
3369				c = 0, O()
3370			}, e.vmouse.resetTimerDuration)
3371		}
3372
3373		function D() {
3374			c && (clearTimeout(c), c = 0)
3375		}
3376
3377		function P(t, n, r) {
3378			var i;
3379			if (r && r[t] || !r && k(n.target, t)) i = N(n, t), e(n.target).trigger(i);
3380			return i
3381		}
3382
3383		function H(t) {
3384			var n = e.data(t.target, s), r;
3385			!m && (!E || E !== n) && (r = P("v" + t.type, t), r && (r.isDefaultPrevented() && t.preventDefault(), r.isPropagationStopped() && t.stopPropagation(), r.isImmediatePropagationStopped() && t.stopImmediatePropagation()))
3386		}
3387
3388		function B(t) {
3389			var n = T(t).touches, r, i, o;
3390			n && n.length === 1 && (r = t.target, i = C(r), i.hasVirtualBinding && (E = w++, e.data(r, s, E), D(), M(), d = !1, o = T(t).touches[0], h = o.pageX, p = o.pageY, P("vmouseover", t, i), P("vmousedown", t, i)))
3391		}
3392
3393		function j(e) {
3394			if (g) return;
3395			d || P("vmousecancel", e, C(e.target)), d = !0, _()
3396		}
3397
3398		function F(t) {
3399			if (g) return;
3400			var n = T(t).touches[0], r = d, i = e.vmouse.moveDistanceThreshold, s = C(t.target);
vendor: 6,825 bytes, lines 3401-3559
3401			d = d || Math.abs(n.pageX - h) > i || Math.abs(n.pageY - p) > i, d && !r && P("vmousecancel", t, s), P("vmousemove", t, s), _()
3402		}
3403
3404		function I(e) {
3405			if (g) return;
3406			A();
3407			var t = C(e.target), n, r;
3408			P("vmouseup", e, t), d || (n = P("vclick", e, t), n && n.isDefaultPrevented() && (r = T(e).changedTouches[0], v.push({
3409				touchID: E,
3410				x: r.clientX,
3411				y: r.clientY
3412			}), m = !0)), P("vmouseout", e, t), d = !1, _()
3413		}
3414
3415		function q(t) {
3416			var n = e.data(t, i), r;
3417			if (n) for (r in n) if (n[r]) return !0;
3418			return !1
3419		}
3420
3421		function R() {
3422		}
3423
3424		function U(t) {
3425			var n = t.substr(1);
3426			return {
3427				setup: function () {
3428					q(this) || e.data(this, i, {});
3429					var r = e.data(this, i);
3430					r[t] = !0, l[t] = (l[t] || 0) + 1, l[t] === 1 && b.bind(n, H), e(this).bind(n, R), y && (l.touchstart = (l.touchstart || 0) + 1, l.touchstart === 1 && b.bind("touchstart", B).bind("touchend", I).bind("touchmove", F).bind("scroll", j))
3431				}, teardown: function () {
3432					--l[t], l[t] || b.unbind(n, H), y && (--l.touchstart, l.touchstart || b.unbind("touchstart", B).unbind("touchmove", F).unbind("touchend", I).unbind("scroll", j));
3433					var r = e(this), s = e.data(this, i);
3434					s && (s[t] = !1), r.unbind(n, R), q(this) || r.removeData(i)
3435				}
3436			}
3437		}
3438
3439		var i = "virtualMouseBindings", s = "virtualTouchID",
3440				o = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),
3441				u = "clientX clientY pageX pageY screenX screenY".split(" "),
3442				a = e.event.mouseHooks ? e.event.mouseHooks.props : [], f = e.event.props.concat(a), l = {}, c = 0, h = 0,
3443				p = 0, d = !1, v = [], m = !1, g = !1, y = "addEventListener" in n, b = e(n), w = 1, E = 0, S, x;
3444		e.vmouse = {moveDistanceThreshold: 10, clickDistanceThreshold: 10, resetTimerDuration: 1500};
3445		for (x = 0; x < o.length; x++) e.event.special[o[x]] = U(o[x]);
3446		y && n.addEventListener("click", function (t) {
3447			var n = v.length, r = t.target, i, o, u, a, f, l;
3448			if (n) {
3449				i = t.clientX, o = t.clientY, S = e.vmouse.clickDistanceThreshold, u = r;
3450				while (u) {
3451					for (a = 0; a < n; a++) {
3452						f = v[a], l = 0;
3453						if (u === r && Math.abs(f.x - i) < S && Math.abs(f.y - o) < S || e.data(u, s) === f.touchID) {
3454							t.preventDefault(), t.stopPropagation();
3455							return
3456						}
3457					}
3458					u = u.parentNode
3459				}
3460			}
3461		}, !0)
3462	})(e, t, n), function (e) {
3463		e.mobile = {}
3464	}(e), function (e, t) {
3465		var r = {touch: "ontouchend" in n};
3466		e.mobile.support = e.mobile.support || {}, e.extend(e.support, r), e.extend(e.mobile.support, r)
3467	}(e), function (e, t, r) {
3468		function l(t, n, i, s) {
3469			var o = i.type;
3470			i.type = n, s ? e.event.trigger(i, r, t) : e.event.dispatch.call(t, i), i.type = o
3471		}
3472
3473		var i = e(n), s = e.mobile.support.touch, o = "touchmove scroll", u = s ? "touchstart" : "mousedown",
3474				a = s ? "touchend" : "mouseup", f = s ? "touchmove" : "mousemove";
3475		e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "), function (t, n) {
3476			e.fn[n] = function (e) {
3477				return e ? this.bind(n, e) : this.trigger(n)
3478			}, e.attrFn && (e.attrFn[n] = !0)
3479		}), e.event.special.scrollstart = {
3480			enabled: !0, setup: function () {
3481				function s(e, n) {
3482					r = n, l(t, r ? "scrollstart" : "scrollstop", e)
3483				}
3484
3485				var t = this, n = e(t), r, i;
3486				n.bind(o, function (t) {
3487					if (!e.event.special.scrollstart.enabled) return;
3488					r || s(t, !0), clearTimeout(i), i = setTimeout(function () {
3489						s(t, !1)
3490					}, 50)
3491				})
3492			}, teardown: function () {
3493				e(this).unbind(o)
3494			}
3495		}, e.event.special.tap = {
3496			tapholdThreshold: 750, emitTapOnTaphold: !0, setup: function () {
3497				var t = this, n = e(t), r = !1;
3498				n.bind("vmousedown", function (s) {
3499					function a() {
3500						clearTimeout(u)
3501					}
3502
3503					function f() {
3504						a(), n.unbind("vclick", c).unbind("vmouseup", a), i.unbind("vmousecancel", f)
3505					}
3506
3507					function c(e) {
3508						f(), !r && o === e.target ? l(t, "tap", e) : r && e.preventDefault()
3509					}
3510
3511					r = !1;
3512					if (s.which && s.which !== 1) return !1;
3513					var o = s.target, u;
3514					n.bind("vmouseup", a).bind("vclick", c), i.bind("vmousecancel", f), u = setTimeout(function () {
3515						e.event.special.tap.emitTapOnTaphold || (r = !0), l(t, "taphold", e.Event("taphold", {target: o}))
3516					}, e.event.special.tap.tapholdThreshold)
3517				})
3518			}, teardown: function () {
3519				e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"), i.unbind("vmousecancel")
3520			}
3521		}, e.event.special.swipe = {
3522			scrollSupressionThreshold: 30,
3523			durationThreshold: 1e3,
3524			horizontalDistanceThreshold: 30,
3525			verticalDistanceThreshold: 30,
3526			getLocation: function (e) {
3527				var n = t.pageXOffset, r = t.pageYOffset, i = e.clientX, s = e.clientY;
3528				if (e.pageY === 0 && Math.floor(s) > Math.floor(e.pageY) || e.pageX === 0 && Math.floor(i) > Math.floor(e.pageX)) i -= n, s -= r; else if (s < e.pageY - r || i < e.pageX - n) i = e.pageX - n, s = e.pageY - r;
3529				return {x: i, y: s}
3530			},
3531			start: function (t) {
3532				var n = t.originalEvent.touches ? t.originalEvent.touches[0] : t, r = e.event.special.swipe.getLocation(n);
3533				return {time: (new Date).getTime(), coords: [r.x, r.y], origin: e(t.target)}
3534			},
3535			stop: function (t) {
3536				var n = t.originalEvent.touches ? t.originalEvent.touches[0] : t, r = e.event.special.swipe.getLocation(n);
3537				return {time: (new Date).getTime(), coords: [r.x, r.y]}
3538			},
3539			handleSwipe: function (t, n, r, i) {
3540				if (n.time - t.time < e.event.special.swipe.durationThreshold && Math.abs(t.coords[0] - n.coords[0]) > e.event.special.swipe.horizontalDistanceThreshold && Math.abs(t.coords[1] - n.coords[1]) < e.event.special.swipe.verticalDistanceThreshold) {
3541					var s = t.coords[0] > n.coords[0] ? "swipeleft" : "swiperight";
3542					return l(r, "swipe", e.Event("swipe", {
3543						target: i,
3544						swipestart: t,
3545						swipestop: n
3546					}), !0), l(r, s, e.Event(s, {target: i, swipestart: t, swipestop: n}), !0), !0
3547				}
3548				return !1
3549			},
3550			eventInProgress: !1,
3551			setup: function () {
3552				var t, n = this, r = e(n), s = {};
3553				t = e.data(this, "mobile-events"), t || (t = {length: 0}, e.data(this, "mobile-events", t)), t.length++, t.swipe = s, s.start = function (t) {
3554					if (e.event.special.swipe.eventInProgress) return;
3555					e.event.special.swipe.eventInProgress = !0;
3556					var r, o = e.event.special.swipe.start(t), u = t.target, l = !1;
3557					s.move = function (t) {
3558						if (!o || t.isDefaultPrevented()) return;
3559						r = e.event.special.swipe.stop(t), l || (l = e.event.special.swipe.handleSwipe(o, r, n, u), l && (e.event.special.swipe.eventInProgress = !1)), Math.abs(o.coords[0] - r.co
3559ords[0]) > e.event.special.swipe.scrollSupressionThreshold && t.preventDefault()
3560					}, s.stop = function () {
3561						l = !0, e.event.special.swipe.eventInProgress = !1, i.off(f, s.move), s.move = null
3562					}, i.on(f, s.move).one(a, s.stop)
3563				}, r.on(u, s.start)
3564			},
3565			teardown: function () {
3566				var t, n;
3567				t = e.data(this, "mobile-events"), t && (n = t.swipe, delete t.swipe, t.length--, t.length === 0 && e.removeData(this, "mobile-events")), n && (n.start && e(this).off(u, n.start), n.move && i.off(f, n.move), n.stop && i.off(a, n.stop))
3568			}
3569		}, e.each({
3570			scrollstop: "scrollstart",
3571			taphold: "tap",
3572			swipeleft: "swipe.left",
3573			swiperight: "swipe.right"
3574		}, function (t, n) {
3575			e.event.special[t] = {
3576				setup: function () {
3577					e(this).bind(n, e.noop)
3578				}, teardown: function () {
3579					e(this).unbind(n)
3580				}
3581			}
3582		})
3583	}(e, this)
3584});
3585
3586/*!
3587 * jQuery Transit - CSS3 transitions and transformations
3588 * (c) 2011-2012 Rico Sta. Cruz <[email protected]>
3589 * MIT Licensed.
3590 *
3591 * http://ricostacruz.com/jquery.transit
3592 * http://github.com/rstacruz/jquery.transit
3593 */
3594(function (d) {
3595	function m(a) {
3596		if (a in j.style) return a;
3597		var b = ["Moz", "Webkit", "O", "ms"], c = a.charAt(0).toUpperCase() + a.substr(1);
3598		if (a in j.style) return a;
3599		for (a = 0; a < b.length; ++a) {
3600			var d = b[a] + c;
3601			if (d in j.style) return d
3602		}
3603	}
3604
3605	function l(a) {
3606		"string" === typeof a && this.parse(a);
3607		return this
3608	}
3609
3610	function q(a, b, c, e) {
3611		var h = [];
3612		d.each(a, function (a) {
3613			a = d.camelCase(a);
3614			a = d.transit.propertyMap[a] || d.cssProps[a] || a;
3615			a = a.replace(/([A-Z])/g, function (a) {
3616				return "-" + a.toLowerCase()
3617			});
3618			-1 === d.inArray(a, h) && h.push(a)
3619		});
3620		d.cssEase[c] && (c = d.cssEase[c]);
3621		var f = "" + n(b) + " " + c;
3622		0 < parseInt(e, 10) && (f += " " + n(e));
3623		var g = [];
3624		d.each(h, function (a, b) {
3625			g.push(b + " " + f)
3626		});
3627		return g.join(", ")
3628	}
3629
3630	function f(a, b) {
3631		b || (d.cssNumber[a] = !0);
3632		d.transit.propertyMap[a] = e.transform;
3633		d.cssHooks[a] = {
3634			get: function (b) {
3635				return d(b).css("transit:transform").get(a)
3636			}, set: function (b, e) {
3637				var h = d(b).css("transit:transform");
3638				h.setFromString(a, e);
3639				d(b).css({"transit:transform": h})
3640			}
3641		}
3642	}
3643
3644	function g(a, b) {
3645		return "string" === typeof a && !a.match(/^[\-0-9\.]+$/) ? a : "" + a + b
3646	}
3647
3648	function n(a) {
3649		d.fx.speeds[a] && (a = d.fx.speeds[a]);
3650		return g(a, "ms")
3651	}
3652
3653	d.transit = {
3654		version: "0.9.9",
3655		propertyMap: {
3656			marginLeft: "margin",
3657			marginRight: "margin",
3658			marginBottom: "margin",
3659			marginTop: "margin",
3660			paddingLeft: "padding",
3661			paddingRight: "padding",
3662			paddingBottom: "padding",
3663			paddingTop: "padding"
3664		},
3665		enabled: !0,
3666		useTransitionEnd: !1
3667	};
3668	var j = document.createElement("div"), e = {}, r = -1 < navigator.userAgent.toLowerCase().indexOf("chrome");
3669	e.transition = m("transition");
3670	e.transitionDelay = m("transitionDelay");
3671	e.transform = m("transform");
3672	e.transformOrigin = m("transformOrigin");
3673	j.style[e.transform] =
3674			"";
3675	j.style[e.transform] = "rotateY(90deg)";
3676	e.transform3d = "" !== j.style[e.transform];
3677	var p = e.transitionEnd = {
3678		transition: "transitionEnd",
3679		MozTransition: "transitionend",
3680		OTransition: "oTransitionEnd",
3681		WebkitTransition: "webkitTransitionEnd",
3682		msTransition: "MSTransitionEnd"
3683	}[e.transition] || null, k;
3684	for (k in e) e.hasOwnProperty(k) && "undefined" === typeof d.support[k] && (d.support[k] = e[k]);
3685	j = null;
3686	d.cssEase = {
3687		_default: "ease",
3688		"in": "ease-in",
3689		out: "ease-out",
3690		"in-out": "ease-in-out",
3691		snap: "cubic-bezier(0,1,.5,1)",
3692		easeOutCubic: "cubic-bezier(.215,.61,.355,1)",
3693		easeInOutCubic: "cubic-bezier(.645,.045,.355,1)",
3694		easeInCirc: "cubic-bezier(.6,.04,.98,.335)",
3695		easeOutCirc: "cubic-bezier(.075,.82,.165,1)",
3696		easeInOutCirc: "cubic-bezier(.785,.135,.15,.86)",
3697		easeInExpo: "cubic-bezier(.95,.05,.795,.035)",
3698		easeOutExpo: "cubic-bezier(.19,1,.22,1)",
3699		easeInOutExpo: "cubic-bezier(1,0,0,1)",
3700		easeInQuad: "cubic-bezier(.55,.085,.68,.53)",
3701		easeOutQuad: "cubic-bezier(.25,.46,.45,.94)",
3702		easeInOutQuad: "cubic-bezier(.455,.03,.515,.955)",
3703		easeInQuart: "cubic-bezier(.895,.03,.685,.22)",
3704		easeOutQuart: "cubic-bezier(.165,.84,.44,1)",
vendor: 5,207 bytes, lines 3705-3845
3705		easeInOutQuart: "cubic-bezier(.77,0,.175,1)",
3706		easeInQuint: "cubic-bezier(.755,.05,.855,.06)",
3707		easeOutQuint: "cubic-bezier(.23,1,.32,1)",
3708		easeInOutQuint: "cubic-bezier(.86,0,.07,1)",
3709		easeInSine: "cubic-bezier(.47,0,.745,.715)",
3710		easeOutSine: "cubic-bezier(.39,.575,.565,1)",
3711		easeInOutSine: "cubic-bezier(.445,.05,.55,.95)",
3712		easeInBack: "cubic-bezier(.6,-.28,.735,.045)",
3713		easeOutBack: "cubic-bezier(.175, .885,.32,1.275)",
3714		easeInOutBack: "cubic-bezier(.68,-.55,.265,1.55)"
3715	};
3716	d.cssHooks["transit:transform"] = {
3717		get: function (a) {
3718			return d(a).data("transform") ||
3719					new l
3720		}, set: function (a, b) {
3721			var c = b;
3722			c instanceof l || (c = new l(c));
3723			a.style[e.transform] = "WebkitTransform" === e.transform && !r ? c.toString(!0) : c.toString();
3724			d(a).data("transform", c)
3725		}
3726	};
3727	d.cssHooks.transform = {set: d.cssHooks["transit:transform"].set};
3728	"1.8" > d.fn.jquery && (d.cssHooks.transformOrigin = {
3729		get: function (a) {
3730			return a.style[e.transformOrigin]
3731		}, set: function (a, b) {
3732			a.style[e.transformOrigin] = b
3733		}
3734	}, d.cssHooks.transition = {
3735		get: function (a) {
3736			return a.style[e.transition]
3737		}, set: function (a, b) {
3738			a.style[e.transition] = b
3739		}
3740	});
3741	f("scale");
3742	f("translate");
3743	f("rotate");
3744	f("rotateX");
3745	f("rotateY");
3746	f("rotate3d");
3747	f("perspective");
3748	f("skewX");
3749	f("skewY");
3750	f("x", !0);
3751	f("y", !0);
3752	l.prototype = {
3753		setFromString: function (a, b) {
3754			var c = "string" === typeof b ? b.split(",") : b.constructor === Array ? b : [b];
3755			c.unshift(a);
3756			l.prototype.set.apply(this, c)
3757		}, set: function (a) {
3758			var b = Array.prototype.slice.apply(arguments, [1]);
3759			this.setter[a] ? this.setter[a].apply(this, b) : this[a] = b.join(",")
3760		}, get: function (a) {
3761			return this.getter[a] ? this.getter[a].apply(this) : this[a] || 0
3762		}, setter: {
3763			rotate: function (a) {
3764				this.rotate =
3765						g(a, "deg")
3766			}, rotateX: function (a) {
3767				this.rotateX = g(a, "deg")
3768			}, rotateY: function (a) {
3769				this.rotateY = g(a, "deg")
3770			}, scale: function (a, b) {
3771				void 0 === b && (b = a);
3772				this.scale = a + "," + b
3773			}, skewX: function (a) {
3774				this.skewX = g(a, "deg")
3775			}, skewY: function (a) {
3776				this.skewY = g(a, "deg")
3777			}, perspective: function (a) {
3778				this.perspective = g(a, "px")
3779			}, x: function (a) {
3780				this.set("translate", a, null)
3781			}, y: function (a) {
3782				this.set("translate", null, a)
3783			}, translate: function (a, b) {
3784				void 0 === this._translateX && (this._translateX = 0);
3785				void 0 === this._translateY && (this._translateY = 0);
3786				null !== a && void 0 !== a && (this._translateX = g(a, "px"));
3787				null !== b && void 0 !== b && (this._translateY = g(b, "px"));
3788				this.translate = this._translateX + "," + this._translateY
3789			}
3790		}, getter: {
3791			x: function () {
3792				return this._translateX || 0
3793			}, y: function () {
3794				return this._translateY || 0
3795			}, scale: function () {
3796				var a = (this.scale || "1,1").split(",");
3797				a[0] && (a[0] = parseFloat(a[0]));
3798				a[1] && (a[1] = parseFloat(a[1]));
3799				return a[0] === a[1] ? a[0] : a
3800			}, rotate3d: function () {
3801				for (var a = (this.rotate3d || "0,0,0,0deg").split(","), b = 0; 3 >= b; ++b) a[b] && (a[b] = parseFloat(a[b]));
3802				a[3] && (a[3] = g(a[3], "deg"));
3803				return a
3804			}
3805		}, parse: function (a) {
3806			var b = this;
3807			a.replace(/([a-zA-Z0-9]+)\((.*?)\)/g, function (a, d, e) {
3808				b.setFromString(d, e)
3809			})
3810		}, toString: function (a) {
3811			var b = [], c;
3812			for (c in this) if (this.hasOwnProperty(c) && (e.transform3d || !("rotateX" === c || "rotateY" === c || "perspective" === c || "transformOrigin" === c))) "_" !== c[0] && (a && "scale" === c ? b.push(c + "3d(" + this[c] + ",1)") : a && "translate" === c ? b.push(c + "3d(" + this[c] + ",0)") : b.push(c + "(" + this[c] + ")"));
3813			return b.join(" ")
3814		}
3815	};
3816	d.fn.transition = d.fn.transit = function (a,
3817																						 b, c, f) {
3818		var h = this, g = 0, j = !0;
3819		"function" === typeof b && (f = b, b = void 0);
3820		"function" === typeof c && (f = c, c = void 0);
3821		"undefined" !== typeof a.easing && (c = a.easing, delete a.easing);
3822		"undefined" !== typeof a.duration && (b = a.duration, delete a.duration);
3823		"undefined" !== typeof a.complete && (f = a.complete, delete a.complete);
3824		"undefined" !== typeof a.queue && (j = a.queue, delete a.queue);
3825		"undefined" !== typeof a.delay && (g = a.delay, delete a.delay);
3826		"undefined" === typeof b && (b = d.fx.speeds._default);
3827		"undefined" === typeof c && (c = d.cssEase._default);
3828		b = n(b);
3829		var l = q(a, b, c, g), k = d.transit.enabled && e.transition ? parseInt(b, 10) + parseInt(g, 10) : 0;
3830		if (0 === k) return b = j, c = function (b) {
3831			h.css(a);
3832			f && f.apply(h);
3833			b && b()
3834		}, !0 === b ? h.queue(c) : b ? h.queue(b, c) : c(), h;
3835		var m = {};
3836		b = j;
3837		c = function (b) {
3838			var c = 0;
3839			"MozTransition" === e.transition && 25 > c && (c = 25);
3840			window.setTimeout(function () {
3841				var c = !1, g = function () {
3842					c && h.unbind(p, g);
3843					0 < k && h.each(function () {
3844						this.style[e.transition] = m[this] || null
3845					});
3846					"function" === typeof f && f.apply(h);
3847					"function" === typeof b && b()
3848				};
3849				0 < k && p && d.transit.useTransitionEnd ?
3850						(c = !0, h.bind(p, g)) : window.setTimeout(g, k);
3851				h.each(function () {
3852					0 < k && (this.style[e.transition] = l);
3853					d(this).css(a)
3854				})
3855			}, c)
3856		};
3857		!0 === b ? h.queue(c) : b ? h.queue(b, c) : c();
3858		return this
3859	};
3860	d.transit.getTransitionValue = q
3861})(jQuery);
3862
3863
3864/**************/
3865
3866if (document.getElementById('hp_video') !== undefined) {
3867	var script = document.createElement("script");
3868	script.type = "text/javascript";
3869	script.onload = function () {
3870	};
3871	document.getElementsByTagName("head")[0].appendChild(script);
3872	script.src = 'https://www.youtube.com/iframe_api';
3873
3874	var player, player_h, slideshow_orig_h;
3875
3876	function onYouTubePlayerAPIReady() {
3877		player = new YT.Player('hp_video', {
3878			videoId: jQuery('#hp_video').attr('data-videoid'),
3879			playerVars: {
3880				controls: 0,
3881				cc_load_policy: 0,
3882				enablejsapi: 1,
3883				fs: 0,
3884				modestbranding: 1,
3885				rel: 0,
3886				showinfo: 0,
3887				iv_load_policy: 3,
3888			},
3889			events: {
3890				'onReady': onPlayerReady,
3891				'onStateChange': onPlayerStateChange
3892			}
3893		});
3894	}
3895
3896	function onPlayerReady(event) {
3897		player.seekTo((typeof (_video_start) !== 'undefined' ? _video_start : 0));
3898		player.pauseVideo();
3899		if (typeof (_video_start) !== 'undefined') {
3900			player.setVolume(0);
3901		}
3902		slideshow_orig_h = $('#main_slideshow').innerHeight();
3903		player_h = $('#video-container').outerHeight(true);
3904	}
3905
3906	function stopVideo() {
3907		$('body').removeClass('playing-video');
3908		$('#booking, .mute_video, .stop_video').removeAttr('style');
3909		$('#booking, .main_slideshow').css('opacity', 1);
3910		$('#main_slideshow').height(slideshow_orig_h);
3911		$('.mute_video').removeClass('mute');
3912		player.seekTo((typeof (_video_start) !== 'undefined' ? _video_start : 0));
3913		player.pauseVideo();
3914		player.setVolume(0);
3915	}
3916
3917	function onPlayerStateChange(event) {
3918		if (event.data === 1) {
3919			if (typeof (_video_start) !== 'undefined') {
3920				var i = 0;
3921				riseVolume = setInterval(function () {
3922					i++;
3923					player.setVolume(i);
3924					if (i >= 100) {
3925						clearInterval(riseVolume);
3926					}
3927				}, 100);
3928			}
3929			if (typeof (_video_end) !== 'undefined') {
3930				var checkTime = setInterval(function () {
3931					if (player.getCurrentTime() >= (_video_end - 12)) {
3932						clearInterval(checkTime);
3933						var i = 100;
3934						if (!$('.mute_video').hasClass('muted')) {
3935							var lowVolume = setInterval(function () {
3936								i--;
3937								player.setVolume(i);
3938								if (i <= 0) {
3939									clearInterval(lowVolume);
3940									setTimeout(function () {
3941										stopVideo();
3942									}, 1800);
3943								}
3944							}, 100);
3945						} else {
3946							setTimeout(function () {
3947								stopVideo();
3948							}, 11800);
3949						}
3950					}
3951				}, 1000);
3952			}
3953		} else if (event.data === 0) {
3954			stopVideo();
3955		}
3956	}
3957
3958}
3959
3960$(window).load(function () {
3961	// Equilibrate the left and right columns
3962	$('.left-column').each(function () {
3963		var left = $(this);
3964		var right = left.parent().find('.right-column');
3965		var _left_h = left.innerHeight();
3966		var _right_h = right.innerHeight();
3967		if (_left_h >= _right_h) {
3968			right.height(_left_h);
3969		} else {
3970			left.height(_right_h);
3971		}
3972	});
3973	var ta_right_content = $('#tripadvisor .right-column > div');
3974	ta_right_content.css('margin-top', (-1 * ta_right_content.height() / 2) + 15);
3975});
3976
3977// Sticky Book button for Restaurant and Special offers
3978(function ($) {
3979	$(document).ready(function () {
3980		// Restaurant
3981		if ($(document.body).hasClass('page-template-template-restaurant')) {
3982			var bookatable_button = $('#wrapper > .w-container > .right-column a.restaurant_order');
3983			if (bookatable_button.length > 0) {
3984				// Desktop
3985				var newButton = $('<a>', {
3986					href: '#',
3987					class: 'btn anchors_table_booking_link',
3988					text: bookatable_button.text()
3989				});
3990				newButton.prependTo('#subnav .subnav .w-container');
3991				newButton.click(function (e) {
3992					e.preventDefault();
3993					bookatable_button.trigger('click');
3994				});
3995
3996				// Mobile
3997				var mobileButton = newButton.clone();
3998				mobileButton.off('click');
3999				mobileButton.attr('class', 'btn mobile_table_booking_link');
4000				mobileButton.appendTo('#container');
4001				$('#book_button').remove();
4002				mobileButton.click(function (e) {
4003					e.preventDefault();
4004					if (bookatable_button.attr('href').match(/^https?:\/\/.+/)) {
4005						window.open(bookatable_button.attr('href'), '_blank');
4006					} else {
4007						$('html,body').stop().animate({
4008							'scrollTop': $('.popin_form').offset().top - $('#header').height()
4009						});
4010					}
4011				});
4012			}
4013		}
4014
4015		// Offer
4016		if ($(document.body).hasClass('single-offers')) {
4017			var has_booking_form = $('.right-column #bookingform').length > 0;
4018			var custom_button = $('.left-column .offer_custom_button a');
4019			var links_to_restaurant_page = $('.offer_restaurant_button_container').length > 0;
4020			var has_custom_button_form = custom_button.length > 0 && custom_button.attr('href') == 'javascript:;';
4021			var has_custom_button_link = custom_button.length > 0 && (!!custom_button.attr('href').match(/^https?:\/\/.+/));
4022			var is_bookable = (has_booking_form || links_to_restaurant_page || has_custom_button_form || has_custom_button_link);
4023			if (is_bookable) {
4024				var book_offer_text = '';
4025				if (has_booking_form) {
4026					book_offer_text = $.trim($('#bookingform > strong:first-child').text());
4027				} else if (links_to_restaurant_page) {
4028					book_offer_text = $.trim($('.offer_restaurant_button_container').find('a').eq(0).text());
4029				} else if (has_custom_button_form || has_custom_button_link) {
4030					book_offer_text = $.trim(custom_button.text());
4031				}
4032				if (book_offer_text == '') {
4033					book_offer_text = 'Book this offer';
4034				}
4035				// Desktop + Mobile (mobile/custom.js moves this to the right place when on mobile)
4036				var newButton = $('<a>', {
4037					href: '#',
4038					id: 'book_button',
4039					text: book_offer_text
4040				});
4041				newButton.insertAfter('#header nav .w-container > ul');
4042				newButton.click(function () {
4043					if (has_booking_form) {
4044						$('html,body').stop().animate({
4045							'scrollTop': $('#bookingform').offset().top - $('#header').height()
4046						});
4047					} else if (links_to_restaurant_page) {
4048						location.href = $('.offer_restaurant_button_container').find('a').eq(0).attr('href');
4049					} else if (has_custom_button_form) {
4050						if ($('html').hasClass('mobile')) {
4051							$('html,body').stop().animate({
4052								'scrollTop': $('.pop_form').offset().top - $('#header').height()
4053							});
4054						} else {
4055							custom_button.trigger('click');
4056						}
4057					} else if (has_custom_button_link) {
4058						window.open(custom_button.attr('href'), '_blank');
4059					}
4060				});
4061			}
4062		}
4063	});
4064})(jQuery);

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.