PageSourceSearch

http://www.mirandarights.org/assets/js/scripts.js

js mirandarights.org collected 2026-10-02 12:17:41 UTC 128,700 bytes, 2,011 lines download raw bytes

1/** ********************************************** **
2	@Author			Dorin Grigoras
3	@Website		www.stepofweb.com
4	@Last Update	Saturday, August 09, 2014
5
6	NOTE! 	Do not change anything here if you want to
7			be able to update in the future! Please use
8			your custom script (eg. custom.js).
9
10
11	TABLE CONTENTS
12	-------------------------------
13		01. Top Nav
14		02. Animate
15		03. OWL Carousel
16		04. Popover
17		05. LightBox
18		06. ScrollTo
19		07. Parallax
20		08. Masonry Filter
21		09. Toggle
22		10. Background Image
23		11. Quick Cart
24		12. Placeholder
25		13. Word Rotate
26		14. Misc
27		15. Datepicker
28		16. Colorpicker
29		17. Contact Google Map
30		18. Newsletter Subscribe
31
32	INLINE SCRIPTS
33	-------------------------------
34
35		COUNT TO
36			https://github.com/mhuggins/jquery-countTo
37
38		WAIT FOR IMAGES [used by masonry]
39			https://github.com/alexanderdickson/waitForImages
40
41		BROWSER DETECT
42
43		SMOOTHSCROLL V1.2.1
44
45		Datepicker v1.3.7
46			https://github.com/dangrossman/bootstrap-daterangepicker
47
48		Colorpicker v2.0
49			http://mjolnic.github.io/bootstrap-colorpicker/
50
51		Appear
52			https://github.com/bas2k/jquery.appear/
53			
54		Parallax
55			http://www.ianlunn.co.uk/plugins/jquery-parallax/
56
57		jQuery Easing v1.3
58			http://gsgd.co.uk/sandbox/jquery/easing/
59
60		Backstretch v2.0.4
61			http://srobbin.com/jquery-plugins/backstretch/
62*************************************************** **/
63 
64	/* Init */
65	jQuery(window).ready(function () {
66		Epona();
67	});
68
69
70/** Core
71 **************************************************************** **/
72	function Epona() {
73		jQuery.browserDetect();
74
75		_topNav();
76		_animate();
77		_owl_carousel();
78		_popover();
79		_lightbox();
80		_scrollTo();
81		_parallax();
82		_masonry();
83		_toggle();
84		_bgimage();
85		_quickCart();
86		_placeholder();
87		_wrotate();
88		_misc();
89		_datepicker();
90		_colorpicker();
91		_newsletterSubscribe();
92
93		/* --- */
94		if(jQuery("html").hasClass("chrome") && jQuery("body").hasClass("smoothscroll")) {
95			jQuery.smoothScroll();
96		}
97		/* --- */
98
99		/** Bootstrap Tooltip **/ 
100		jQuery("a[data-toggle=tooltip]").tooltip();
101
102		/** mobile - hide on click! **/
103		jQuery(document).bind("click", function() {
104			if(jQuery("div.navbar-collapse").hasClass('in')) {
105				jQuery("button.btn-mobile").trigger('click');
106			}
107		});
108
109		/** side nav **/
110        jQuery("li.list-toggle").bind("click", function() {
111            jQuery(this).toggleClass("active");
112        });
113
114		/** 
115			Sticky Header 
116			IE has strange bugs - we avoid sticky header on IE boxed version!
117		**/
118		if(jQuery('html').hasClass('ie') && jQuery('body').hasClass('boxed')) {} else {
119
120			jQuery('#header.sticky').affix({
121
122				offset: {
123					top: jQuery("#header").outerHeight(true)
124				},
125
126				bottom: function () {
127					return (this.bottom = jQuery('#footer').outerHeight(true))
128				}
129
130			});
131
132		}
133
134	}
135
136
137/** 01. Top Nav
138 **************************************************************** **/
139function _topNav() {
140	window.scrollTop 	= 0;
141
142	jQuery(window).scroll(function() {
143		_toTop();
144	});
145
146	/* Scroll To Top */
147	function _toTop() {
148		_scrollTop = jQuery(document).scrollTop();
149
150		if(_scrollTop > 100) {
151
152			if(jQuery("#toTop").is(":hidden")) {
153				jQuery("#toTop").show();
154			}
155
156		} else {
157
158			if(jQuery("#toTop").is(":visible")) {
159				jQuery("#toTop").hide();
160			}
161
162		}
163
164	}
165
166
167	// Mobile Submenu
168	var addActiveClass 	= false;
169	jQuery("#topMain a.dropdown-toggle").bind("click", function(e) {
170		e.preventDefault();
171
172
173		addActiveClass = jQuery(this).parent().hasClass("resp-active");
174		jQuery("#topMain").find(".resp-active").removeClass("resp-active");
175
176		if(!addActiveClass) {
177			jQuery(this).parents("li").addClass("resp-active");
178		}
179
180		return;
181
182	});
183
184	// Drop Downs - do not hide on click
185	jQuery("#topMain li.dropdown, #topMain a.dropdown-toggle").bind("click", function(e) {
186		e.stopPropagation();
187	});
188
189	// IE11 Bugfix
190	// Version 1.1
191	// Wednesday, July 23, 2014
192	if(jQuery("html").hasClass("ie") || jQuery("html").hasClass("ff3")) {
193		jQuery("#topNav ul.nav > li.mega-menu div").addClass('block');
194		jQuery("#topNav ul.nav > li.mega-menu div div").addClass('pull-left');
195	}
196}
197
198
199
200/** 02. Animate
201 **************************************************************** **/
202function _animate() {
203
204	// Animation [appear]
205	jQuery("[data-animation]").each(function() {
206		var _t = jQuery(this);
207
208		if(jQuery(window).width() > 767) {
209
210			_t.appear(function() {
211
212				var delay = (_t.attr("data-animation-delay") ? _t.attr("data-animation-delay") : 1);
213
214				if(delay > 1) _t.css("animation-delay", delay + "ms");
215				_t.addClass(_t.attr("data-animation"));
216
217				setTimeout(function() {
218					_t.addClass("animation-visible");
219				}, delay);
220
221			}, {accX: 0, accY: -50}); /* -150 */
222
223		} else {
224
225			_t.addClass("animation-visible");
226
227		}
228
229	});
230
231	// Bootstrap Progress Bar
232	jQuery("[data-appear-progress-animation]").each(function() {
233		var $_t = jQuery(this);
234
235		if(jQuery(window).width() > 767) {
236
237			$_t.appear(function() {
238				_delay = 1;
239
240				if($_t.attr("data-appear-progress-animation-delay")) {
241					_delay = $_t.attr("data-appear-progress-animation-delay");
242				}
243
244				if(_delay > 1) {
245					$_t.css("animation-delay", _delay + "ms");
246				}
247
248				$_t.addClass($_t.attr("data-appear-progress-animation"));
249
250				setTimeout(function() {
251
252					$_t.addClass("animation-visible");
253
254				}, _delay);
255
256			}, {accX: 0, accY: -50}); /* -150 */
257
258		} else {
259
260			$_t.addClass("animation-visible");
261
262		}
263
264	});
265
266
267	jQuery("[data-appear-progress-animation]").each(function() {
268		var $_t = jQuery(this);
269
270		$_t.appear(function() {
271
272			var _delay = ($_t.attr("data-appear-animation-delay") ? $_t.attr("data-appear-animation-delay"): 1);
273
274			if(_delay > 1) {
275				$_t.css("animation-delay", _delay + "ms");
276			}
277
278			$_t.addClass($_t.attr("data-appear-animation"));
279			setTimeout(function() {
280
281				$_t.animate({"width": $_t.attr("data-appear-progress-animation")}, 1000, "easeOutQuad", function() {
282					$_t.find(".progress-bar-tooltip").animate({"opacity": 1}, 500, "easeOutQuad");
283				});
284
285			}, _delay);
286
287		}, {accX: 0, accY: -25});
288
289	});
290
291
292	// Count To
293	jQuery(".countTo [data-to]").each(function() {
294		var $_t = jQuery(this);
295
296		$_t.appear(function() {
297
298			$_t.countTo();
299
300		}, {accX:0, accY: -50});
301
302	});
303
304
305	/* Knob Circular Bar */
306	if(jQuery().knob) {
307
308		jQuery(".knob").knob();
309
310	}
311
312
313	/* Animation */
314	jQuery('.animate_from_top').each(function () {
315		jQuery(this).appear(function() {
316			jQuery(this).delay(150).animate({opacity:1,top:"0px"},1000);
317		});	
318	});
319
320	jQuery('.animate_from_bottom').each(function () {
321		jQuery(this).appear(function() {
322			jQuery(this).delay(150).animate({opacity:1,bottom:"0px"},1000);
323		});	
324	});
325
326
327	jQuery('.animate_from_left').each(function () {
328		jQuery(this).appear(function() {
329			jQuery(this).delay(150).animate({opacity:1,left:"0px"},1000);
330		});	
331	});
332
333
334	jQuery('.animate_from_right').each(function () {
335		jQuery(this).appear(function() {
336			jQuery(this).delay(150).animate({opacity:1,right:"0px"},1000);
337		});	
338	});
339
340	jQuery('.animate_fade_in').each(function () {
341		jQuery(this).appear(function() {
342			jQuery(this).delay(350).animate({opacity:1,right:"0px"},1000);
343		});	
344	});
345}
346
347
348
349/** 03. OWL Carousel
350 **************************************************************** **/
351function _owl_carousel() {
352
353	var total = jQuery("div.owl-carousel").length,
354		count = 0;
355
356	jQuery("div.owl-carousel").each(function() {
357
358		var slider 		= jQuery(this);
359		var options 	= slider.attr('data-plugin-options');
360
361		// Progress Bar
362		var $opt = eval('(' + options + ')');  // convert text to json
363
364		if($opt.progressBar == 'true') {
365			var afterInit = progressBar;
366		} else {
367			var afterInit = false;
368		}
369
370		var defaults = {
371			items: 					5,
372			itemsCustom: 			false,
373			itemsDesktop: 			[1199,4],
374			itemsDesktopSmall: 		[980,3],
375			itemsTablet: 			[768,2],
376			itemsTabletSmall: 		false,
377			itemsMobile: 			[479,1],
378			singleItem: 			true,
379			itemsScaleUp: 			false,
380
381			slideSpeed: 			200,
382			paginationSpeed: 		800,
383			rewindSpeed: 			1000,
384
385			autoPlay: 				false,
386			stopOnHover: 			false,
387
388			navigation: 			false,
389			navigationText: [
390								'<i class="fa fa-chevron-left"></i>',
391								'<i class="fa fa-chevron-right"></i>'
392							],
393			rewindNav: 				true,
394			scrollPerPage: 			false,
395
396			pagination: 			true,
397			paginationNumbers: 		false,
398
399			responsive: 			true,
400			responsiveRefreshRate: 	200,
401			responsiveBaseWidth: 	window,
402
403			baseClass: 				"owl-carousel",
404			theme: 					"owl-theme",
405
406			lazyLoad: 				false,
407			lazyFollow: 			true,
408			lazyEffect: 			"fade",
409
410			autoHeight: 			false,
411
412			jsonPath: 				false,
413			jsonSuccess: 			false,
414
415			dragBeforeAnimFinish: 	true,
416			mouseDrag: 				true,
417			touchDrag: 				true,
418
419			transitionStyle: 		false,
420
421			addClassActive: 		false,
422
423			beforeUpdate: 			false,
424			afterUpdate: 			false,
425			beforeInit: 			false,
426			afterInit: 				afterInit,
427			beforeMove: 			false,
428			afterMove: 				(afterInit == false) ? false : moved,
429			afterAction: 			false,
430			startDragging: 			false,
431			afterLazyLoad: 			false
432		}
433
434		var config = jQuery.extend({}, defaults, options, slider.data("plugin-options"));
435		slider.owlCarousel(config).addClass("owl-carousel-init");
436		
437
438		// Progress Bar
439		var elem = jQuery(this);
440
441		//Init progressBar where elem is $("#owl-demo")
442		function progressBar(elem){
443		  $elem = elem;
444		  //build progress bar elements
445		  buildProgressBar();
446		  //start counting
447		  start();
448		}
449	 
450		//create div#progressBar and div#bar then prepend to $("#owl-demo")
451		function buildProgressBar(){
452		  $progressBar = $("<div>",{
453			id:"progressBar"
454		  });
455		  $bar = $("<div>",{
456			id:"bar"
457		  });
458		  $progressBar.append($bar).prependTo($elem);
459		}
460
461		function start() {
462		  //reset timer
463		  percentTime = 0;
464		  isPause = false;
465		  //run interval every 0.01 second
466		  tick = setInterval(interval, 10);
467		};
468
469 
470		var time = 7; // time in seconds
471		function interval() {
472		  if(isPause === false){
473			percentTime += 1 / time;
474			$bar.css({
475			   width: percentTime+"%"
476			 });
477			//if percentTime is equal or greater than 100
478			if(percentTime >= 100){
479			  //slide to next item 
480			  $elem.trigger('owl.next')
481			}
482		  }
483		}
484	 
485		//pause while dragging 
486		function pauseOnDragging(){
487		  isPause = true;
488		}
489	 
490		//moved callback
491		function moved(){
492		  //clear interval
493		  clearTimeout(tick);
494		  //start again
495		  start();
496		}
497
498	});
499}
500
501
502
503
504/** 04. Popover
505 **************************************************************** **/
506function _popover() {
507
508		jQuery("a[data-toggle=popover]").bind("click", function(e) {
509			jQuery('.popover-title .close').remove();
510			e.preventDefault();
511		});
512
513		var isVisible 	= false,
514			clickedAway = false;
515
516
517		jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover({
518
519				html: true,
520				trigger: 'manual'
521
522			}).click(function(e) {
523
524				jQuery(this).popover('show');
525				
526				clickedAway = false;
527				isVisible = true;
528				e.preventDefault();
529
530			});
531
532			jQuery(document).click(function(e) {
533				if(isVisible & clickedAway) {
534
535					jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover('hide');
536					isVisible = clickedAway = false;
537
538				} else {
539
540
541					clickedAway = true;
542
543				}
544
545			});
546
547		jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover({
548
549			html: true,
550			trigger: 'manual'
551
552		}).click(function(e) {
553
554			$(this).popover('show');
555			$('.popover-title').append('<button type="button" class="close">&times;</button>');
556			$('.close').click(function(e){
557
558				jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover('hide');
559
560			});
561
562			e.preventDefault();
563		});
564
565
566	// jQuery("a[data-toggle=popover], button[data-toggle=popover]").popover();
567}
568
569
570
571/** 05. LightBox
572 **************************************************************** **/
573function _lightbox() {
574
575	if(typeof(jQuery.magnificPopup) == "undefined") {
576		return false;
577	}
578
579	jQuery.extend(true, jQuery.magnificPopup.defaults, {
580		tClose: 		'Close',
581		tLoading: 		'Loading...',
582
583		gallery: {
584			tPrev: 		'Previous',
585			tNext: 		'Next',
586			tCounter: 	'%curr% / %total%'
587		},
588
589		image: 	{ 
590			tError: 	'Image not loaded!' 
591		},
592
593		ajax: 	{ 
594			tError: 	'Content not loaded!' 
595		}
596	});
597
598	jQuery(".lightbox").each(function() {
599
600		var _t 			= jQuery(this),
601			options 	= _t.attr('data-plugin-options'),
602			config		= {},
603			defaults 	= {
604				type: 				'image',
605				fixedContentPos: 	false,
606				fixedBgPos: 		false,
607				mainClass: 			'mfp-no-margins mfp-with-zoom',
608				image: {
609					verticalFit: 	true
610				},
611
612				zoom: {
613					enabled: 		false,
614					duration: 		300
615				},
616
617				gallery: {
618					enabled: false,
619					navigateByImgClick: true,
620					preload: 			[0,1],
621					arrowMarkup: 		'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
622					tPrev: 				'Previou',
623					tNext: 				'Next',
624					tCounter: 			'<span class="mfp-counter">%curr% / %total%</span>'
625				},
626			};
627
628		if(_t.data("plugin-options")) {
629			config = jQuery.extend({}, defaults, options, _t.data("plugin-options"));
630		}
631
632		jQuery(this).magnificPopup(config);
633
634	});
635}
636
637
638
639
640/** 06. ScrollTo
641 **************************************************************** **/
642function _scrollTo() {
643
644	jQuery("a.scrollTo").bind("click", function(e) {
645		e.preventDefault();
646
647		var href = jQuery(this).attr('href');
648
649		if(href != '#') {
650			jQuery('html,body').animate({scrollTop: jQuery(href).offset().top}, 800, 'easeInOutExpo');
651		}
652	});
653
654	jQuery("a#toTop").bind("click", function(e) {
655		e.preventDefault();
656		jQuery('html,body').animate({scrollTop: 0}, 800, 'easeInOutExpo');
657	});
658}
659
660
661
662
663/** 07. Parallax
664 **************************************************************** **/
665	function _parallax() {
666
667		if(jQuery().parallax) {
668
669			/* Default */
670			jQuery(".parallax.parallax-default").css("background-attachment", "fixed");
671			jQuery(".parallax.parallax-default").parallax("50%", "0.4");
672
673			jQuery(".parallax.parallax-1").css("background-attachment", "fixed");
674			jQuery(".parallax.parallax-1").parallax("50%", "0.4");
675
676			jQuery(".parallax.parallax-2").css("background-attachment", "fixed");
677			jQuery(".parallax.parallax-2").parallax("50%", "0.4");
678
679			jQuery(".parallax.parallax-3").css("background-attachment", "fixed");
680			jQuery(".parallax.parallax-3").parallax("50%", "0.4");
681
682			jQuery(".parallax.parallax-4").css("background-attachment", "fixed");
683			jQuery(".parallax.parallax-4").parallax("50%", "0.4");
684
685			/* Home Slider */
686			jQuery("#home div.slider").css("background-attachment", "fixed");
687			jQuery("#home div.slider").parallax("50%", "0.4");
688
689		}
690
691	}
692
693
694
695
696/** 08. Masonry Filter
697 **************************************************************** **/
698function _masonry() {
699
700	jQuery(window).load(function() {
701
702		jQuery("span.js_loader").remove();
703		jQuery("li.masonry-item").addClass('fadeIn');
704
705		jQuery(".masonry-list").each(function() {
706
707			var _c = jQuery(this);
708
709			_c.waitForImages(function() { // waitForImages Plugin - bottom of this file
710
711				_c.masonry({
712					itemSelector: '.masonry-item'
713				});
714
715			});
716
717		});
718
719	});
720
721	jQuery("ul.isotope-filter").each(function() {
722
723		var _el		 		= jQuery(this),
724			destination 	= jQuery("ul.sort-destination[data-sort-id=" + jQuery(this).attr("data-sort-id") + "]");
725
726		if(destination.get(0)) {
727
728			jQuery(window).load(function() {
729
730				destination.isotope({
731					itemSelector: 	"li",
732					layoutMode: 	'sloppyMasonry'
733				});
734
735				_el.find("a").click(function(e) {
736
737					e.preventDefault();
738
739					var $_t 	= jQuery(this),
740						sortId 	= $_t.parents(".sort-source").attr("data-sort-id"),
741						filter 	= $_t.parent().attr("data-option-value");
742
743					_el.find("li.active").removeClass("active");
744					$_t.parent().addClass("active");
745
746					destination.isotope({
747						filter: filter
748					});
749
750					jQuery(".sort-source-title[data-sort-id=" + sortId + "] strong").html($_t.html());
751					return false;
752
753				});
754
755			});
756
757		}
758
759	});
760
761
762	jQuery(window).load(function() {
763
764		jQuery("ul.isotope").addClass('fadeIn');
765
766	});
767}
768
769
770
771
772/** 09. Toggle
773 **************************************************************** **/
774function _toggle() {
775
776	var $_t = this,
777		previewParClosedHeight = 25;
778
779	jQuery("div.toggle.active > p").addClass("preview-active");
780	jQuery("div.toggle.active > div.toggle-content").slideDown(400);
781	jQuery("div.toggle > label").click(function(e) {
782
783		var parentSection 	= jQuery(this).parent(),
784			parentWrapper 	= jQuery(this).parents("div.toggle"),
785			previewPar 		= false,
786			isAccordion 	= parentWrapper.hasClass("toggle-accordion");
787
788		if(isAccordion && typeof(e.originalEvent) != "undefined") {
789			parentWrapper.find("div.toggle.active > label").trigger("click");
790		}
791
792		parentSection.toggleClass("active");
793
794		if(parentSection.find("> p").get(0)) {
795
796			previewPar 					= parentSection.find("> p");
797			var previewParCurrentHeight = previewPar.css("height");
798			var previewParAnimateHeight = previewPar.css("height");
799			previewPar.css("height", "auto");
800			previewPar.css("height", previewParCurrentHeight);
801
802		}
803
804		var toggleContent = parentSection.find("> div.toggle-content");
805
806		if(parentSection.hasClass("active")) {
807
808			jQuery(previewPar).animate({height: previewParAnimateHeight}, 350, function() {jQuery(this).addClass("preview-active");});
809			toggleContent.slideDown(350);
810
811		} else {
812
813			jQuery(previewPar).animate({height: previewParClosedHeight}, 350, function() {jQuery(this).removeClass("preview-active");});
814			toggleContent.slideUp(350);
815
816		}
817
818	});
819}
820
821
822
823/** 10. Background Image
824	class="boxed" should be added to body.
825	Add to body - example: data-background="assets/images/boxed_background/1.jpg"
826 **************************************************************** **/
827	function _bgimage() {
828		if(jQuery('body').hasClass('boxed')) {
829			backgroundImageSwitch();
830		}
831		function backgroundImageSwitch() {
832			var data_background = jQuery('body').attr('data-background');
833			if(data_background) {
834				jQuery.backstretch(data_background);
835				jQuery('body').addClass('transparent'); // remove backround color of boxed class
836			}
837		}
838	}
839
840
841
842/** 11. Quick Cart
843 **************************************************************** **/
844	function _quickCart() {
845
846		jQuery('li.quick-cart').bind("click", function() {
847
848			jQuery('li.quick-cart .quick-cart-content').bind("click", function(e) {
849				e.stopPropagation();
850			});
851
852			if(jQuery(this).hasClass('open')) {
853
854				disable_overlay();
855				enable_scroll();
856				jQuery(this).removeClass('open');
857
858			} else {
859
860				enable_overlay();
861				disable_scroll();
862				jQuery(this).addClass('open');
863				jQuery('li.search').removeClass('open'); // close search
864
865			}
866
867			return false;
868		});
869
870		// 'esc' key
871		jQuery(document).keydown(function(e) {
872			var code = e.keyCode ? e.keyCode : e.which;
873			if(code == 27) {
874				jQuery('li.search, li.quick-cart').removeClass('open');
875				disable_overlay();
876				enable_scroll();
877			}
878		});
879
880		jQuery(document).bind("click", function() {
881			if(jQuery('li.quick-cart').hasClass('open')) {
882				jQuery('li.search, li.quick-cart').removeClass('open');
883				disable_overlay();
884				enable_scroll();
885			}
886		});
887
888	}
889
890
891
892/** 12. Placeholder
893 **************************************************************** **/
894	function _placeholder() {
895
896		//check for IE
897		if(navigator.appVersion.indexOf("MSIE")!=-1) {
898
899			jQuery('[placeholder]').focus(function() {
900
901				var input = jQuery(this);
902				if (input.val() == input.attr('placeholder')) {
903					input.val('');
904					input.removeClass('placeholder');
905				}
906
907			}).blur(function() {
908
909				var input = jQuery(this);
910				if (input.val() == '' || input.val() == input.attr('placeholder')) {
911				input.addClass('placeholder');
912				input.val(input.attr('placeholder'));
913				}
914
915			}).blur();
916
917		}
918
919	}
920
921
922
923/** 13. Word Rotate
924 **************************************************************** **/
925	function _wrotate() {
926		jQuery(".word-rotator").each(function() {
927
928			var _t 				= jQuery(this),
929				_items 			= _t.find(".items"),
930				items 			= _items.find("> span"),
931				firstItem 		= items.eq(0),
932				firstItemClone 	= firstItem.clone(),
933				_iHeight 		= jQuery(this).height(),
934				_cItem 			= 1,
935				_cTop 			= 0;
936
937			_items.append(firstItemClone);
938			_t.height(_iHeight).addClass("active");
939
940			setInterval(function() {
941				_cTop = (_cItem * _iHeight);
942
943				_items.animate({top: - (_cTop) + "px"}, 300, "easeOutQuad", function(){
944					_cItem++;
945
946					if(_cItem > items.length) {
947						_items.css("top", 0);
948						_cItem = 1;
949					}
950
951				});
952
953			}, 2000);
954
955		});
956	}
957
958
959
960/** 14. Misc
961 **************************************************************** **/
962	function _misc() {
963
964		/*
965			@FLEX SLIDER
966		*/
967		if(jQuery().flexslider && jQuery("div.flexslider").length > 0) {
968			jQuery("div.flexslider").flexslider(flex_options);
969		}
970
971		/* 
972			@LAYER SLIDER
973		*/
974		if(jQuery().layerSlider && jQuery("div.layerslider").length > 0) {
975			jQuery("div.layerslider").each(function() {
976				jQuery(this).layerSlider(layer_options);
977			});
978		}
979
980	}
981
982
983
984/** 15. Datepicker
985 **************************************************************** **/
986	function _datepicker() {
987		jQuery('.demo-datepicker').daterangepicker({ singleDatePicker: true }, function(start, end, label) {});
988		jQuery('.demo-rangepicker').daterangepicker(null, function(start, end, label) {});
989	}
990
991
992
993/** 16. Colorpicker
994 **************************************************************** **/
995	function _colorpicker() {
996		jQuery('.colorpicker').colorpicker();
997		jQuery('.colorpicker-element').colorpicker();
998	}
999
1000
1001
1002/**	17. Contact Google Map
1003*************************************************** **/
1004	function contactMap() {
1005
1006		var latLang = new google.maps.LatLng($googlemap_latitude,$googlemap_longitude);
1007
1008		var mapOptions = {
1009			zoom:$googlemap_zoom,
1010			center: latLang,
1011			disableDefaultUI: false,
1012			navigationControl: false,
1013			mapTypeControl: false,
1014			scrollwheel: false,
1015			// styles: styles,
1016			mapTypeId: google.maps.MapTypeId.ROADMAP
1017		};
1018
1019		var map = new google.maps.Map(document.getElementById('gmap'), mapOptions);
1020		google.maps.event.trigger(map, 'resize');
1021		map.setZoom( map.getZoom() );
1022
1023		var marker = new google.maps.Marker({
1024			icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAArCAYAAAD7YZFOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBG
1024CzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAABONJREFUeNrEmMFvG0UUh7+13dI0Ng0pVEJIEJCQcgmEI1zo7pEDyh+A1JY7EhUnTglIvSG1cEGIQ3JBAg5VwglBWW9JSQWFkoCsxFjJOgpWtlXjNE6dOl57h8vbauV61/baEU8aRfaMZ7/83pvfzKymlCIqDMOYBM4Bk8DZNkMs4DowBxSj5jJNk15CC4MzDOMsMB0CFBYWcBFYHgRcIgTsMpDtEQwZ/ycwwwAi1QI1IlCTfc47DbwAXOhnklblBgHmx3lgdiBwkspBgQUB34/7Y00p5Rd/tovxy1L0e8ApYAoY6+J3LwLFXhdEKlAjnVbhhTZWcVEWQSfVp+PUX0J8LGpVzpmmqZumWYwAf018Liq9Y3Fq7lxE/7xpmt3+xxfC/E1iKg5clGoXe5wvavybceAmI9JZ7HE+K0K9sdhW0iZWYjqAFfL95CDhlmPC7Q3KJKPgxvifIwru1ZhzhhV+MQ7c/TBvkoNALzEWsfpjwYXV1kiMffFyRF9R07SE9ngQ1hIdCn/aMIzzYZ3ZbFaTllBKvRtltJ7n5YDjwBPSjsv2mRKRtHZ76/UOCs0ahjFmmuZMEEomTExMTIyOjo5+omnaO1GSViqVW0AaUIEG0AQa0pqA5/dpuq6PALtdpKwIzHuet9hsNveVUqeTyeTbyWTyLTmhhIZSasuyrNcD6mgCoAlQE6gDh9I8QPlHpjhH8q6j0Wh8s7i4+AFwTBRPtaTRA1ygCjzwAX0rWThKv2o2mwvAAfBQFEsBQ8BJaWlR/0n5PgloPtzcEbIVl5aWvhVFHggksihOAsOBlpbvE49M2DTN+8D8EcHN67ruF71fU0og0oE2HADTWneIT48ILjivJik90aKYD6YFVq1KBC68VhwX76QaUBTrSYlCzwBPi8n7qp0QNatATeAe21s/GiSZUuqzbDZ7TGrrNPA88BLwHPAUkJE+gH3ZSmuPfK71dYRhGPYgTiRKqUXLsqbk4aeAM8CzAumvyIZAbQHrQEnU8x678QfUm+0XznGcr4BXBGxUlEoHvM4H2wX+Be4ErCb8RU6/6tVqtX9u3rz5uSg0FNhPE/JwV1K4CeQBWz43gnCJkJR83I9qtm2vAuOB+jojBjssyj2UFOZlEe61goXCWZY1p5S6EQdsZ2en6DhOXWprRKDSUnuaKFQA/gY2JK1uK1jkSbher1+KsU256+vrm7IK0/LX97AG4AA5eU223i6VHeGUUmppaSnruu7VXuC2t7e3q9VqMuD4Q6JWRdS6Bfwhqaz4ZhvnDtGwbftDpVS1G7CDg4OHhUJhR6BOymHSBe7KNfMX4LbYRrUTWCc4VSqVnN3d3SvdwBUKhXuBlalJkeeBG3Kg/QvYlo3f6+v2pZTygNrKyspsrVbLR01SKpX2y+WyJ75ZE4u4BfwE/CyQ5bDCj6McUqxl27ZnPM87bDfg8PCwadv2gTz4jqTwR+B74FcB3dd1vdELWEc4Ua/qOM5vjuN83W7M2tranuu6O8CavIBcAK6JVdwFDnVd9+LYUqqbUzZwL5/Pf5nJZN7IZDIv+x2bm5uVcrmcl3q
10246LarZUm9uXKhu0+qrdwDYq6url+r1elVWZ21jY+Ma8B1wVdTKATtAvV+wbpXzr2+71Wr190Kh8MX4+Ph7uVxuAfhBfGtLjuCuruuKAcV/AwDnrxMM7gFGVQAAAABJRU5ErkJggg==',
1025			position: latLang,
1026			map: map,
1027			title: ""
1028		});
1029
1030		marker.setMap(map);
1031		google.maps.event.addListener(marker, "click", function() {
1032			// Add optionally an action for when the marker is clicked
1033		});
1034
1035		// kepp googlemap responsive - center on resize
1036		google.maps.event.addDomListener(window, 'resize', function() {
1037			map.setCenter(latLang);
1038		});
1039
1040	}
1041
1042	
1043	function showMap(initWhat) {
1044		var script 		= document.createElement('script');
1045		script.type 	= 'text/javascript';
1046		script.src 		= 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true&callback='+initWhat;
1047		document.body.appendChild(script);
1048	}
1049
1050	
1051	// INIT CONTACT, ONLY IF #gmap EXISRS
1052	if(jQuery("#gmap").length > 0) {
1053		showMap('contactMap');
1054	}
1055
1056
1057
1058
1059/**	18. Newsletter Subscribe
1060*************************************************** **/
1061	function _newsletterSubscribe() {
1062
1063		jQuery("form#newsletterSubscribe button").bind("click", function(e) {
1064				e.preventDefault();
1065
1066				var email 			= jQuery("form#newsletterSubscribe input").val(),				// required
1067					_action			= jQuery("#newsletterSubscribe").attr('action'),	// form action URL
1068					_method			= jQuery("#newsletterSubscribe").attr('method');	// form method
1069
1070				// SEND VIA AJAX
1071				$.ajax({
1072					url: 	_action,
1073					data: 	{ajax:"true", action:'newsletter_subscribe', email:email},
1074					type: 	_method,
1075					error: 	function(XMLHttpRequest, textStatus, errorThrown) {
1076
1077						alert('Server Internal Error'); // usualy on headers 404
1078
1079					},
1080
1081					success: function(data) {
1082						data = data.trim(); // remove output spaces
1083
1084
1085						// PHP RETURN: Mandatory Fields
1086						if(data == '_required_') {
1087							alert('Please complete all fields!');
1088						} else
1089
1090						// PHP RETURN: INVALID EMAIL
1091						if(data == '_invalid_email_') {
1092							alert('Invalid Email!');
1093						} else
1094
1095						// VALID EMAIL
1096						if(data == '_ok_') {
1097
1098							jQuery("#newsletter_email").val('');
1099							// modal
1100							alert('Thank You!');
1101
1102						} else {
1103
1104							// PHPMAILER ERROR
1105							alert(data); 
1106
1107						}
1108					}
1109				});
1110
1111		});
1112
1113	}
1114
1115
1116/** **************************************************************************************************************** **/
1117/** **************************************************************************************************************** **/
1118/** **************************************************************************************************************** **/
1119/** **************************************************************************************************************** **/
1120
1121
1122
1123	// scroll 
1124	function wheel(e) {
1125	  e.preventDefault();
1126	}
1127
1128	function disable_scroll() {
1129	  if (window.addEventListener) {
1130		  window.addEventListener('DOMMouseScroll', wheel, false);
1131	  }
1132	  window.onmousewheel = document.onmousewheel = wheel;
1133	}
1134
1135	function enable_scroll() {
1136		if (window.removeEventListener) {
1137			window.removeEventListener('DOMMouseScroll', wheel, false);
1138		}
1139		window.onmousewheel = document.onmousewheel = document.onkeydown = null;  
1140	}
1141
1142	// overlay
1143	function enable_overlay() {
1144		jQuery("span.global-overlay").remove(); // remove first!
1145		jQuery('body').append('<span class="global-overlay"></span>');
1146	}
1147	function disable_overlay() {
1148		jQuery("span.global-overlay").remove();
1149	}
1150
1151
1152
1153/** COUNT TO
1154	https://github.com/mhuggins/jquery-countTo
1155 **************************************************************** **/
1156 (function ($) {
1157	$.fn.countTo = function (options) {
1158		options = options || {};
1159
1160		return jQuery(this).each(function () {
1161			// set options for current element
1162			var settings = jQuery.extend({}, $.fn.countTo.defaults, {
1163				from:            jQuery(this).data('from'),
1164				to:              jQuery(this).data('to'),
1165				speed:           jQuery(this).data('speed'),
1166				refreshInterval: jQuery(this).data('refresh-interval'),
1167				decimals:        jQuery(this).data('decimals')
1168			}, options);
1169
1170			// how many times to update the value, and how much to increment the value on each update
1171			var loops = Math.ceil(settings.speed / settings.refreshInterval),
1172				increment = (settings.to - settings.from) / loops;
1173
1174			// references & variables that will change with each update
1175			var self = this,
1176				$self = jQuery(this),
1177				loopCount = 0,
1178				value = settings.from,
1179				data = $self.data('countTo') || {};
1180
1181			$self.data('countTo', data);
1182
1183			// if an existing interval can be found, clear it first
1184			if (data.interval) {
1185				clearInterval(data.interval);
1186			}
1187			data.interval = setInterval(updateTimer, settings.refreshInterval);
1188
1189			// __construct the element with the starting value
1190			render(value);
1191
1192			function updateTimer() {
1193				value += increment;
1194				loopCount++;
1195
1196				render(value);
1197
1198				if (typeof(settings.onUpdate) == 'function') {
1199					settings.onUpdate.call(self, value);
1200				}
1201
1202				if (loopCount >= loops) {
1203					// remove the interval
1204					$self.removeData('countTo');
1205					clearInterval(data.interval);
1206					value = settings.to;
1207
1208					if (typeof(settings.onComplete) == 'function') {
1209						settings.onComplete.call(self, value);
1210					}
1211				}
1212			}
1213
1214			function render(value) {
1215				var formattedValue = settings.formatter.call(self, value, settings);
1216				$self.html(formattedValue);
1217			}
1218		});
1219	};
1220
1221	$.fn.countTo.defaults = {
1222		from: 0,               // the number the element should start at
1223		to: 0,                 // the number the element should end at
1224		speed: 1000,           // how long it should take to count between the target numbers
1225		refreshInterval: 100,  // how often the element should be updated
1226		decimals: 0,           // the number of decimal places to show
1227		formatter: formatter,  // handler for formatting the value before rendering
1228		onUpdate: null,        // callback method for every time the element is updated
1229		onComplete: null       // callback method for when the element finishes updating
1230	};
1231
1232	function formatter(value, settings) {
1233		return value.toFixed(settings.decimals);
1234	}
1235}(jQuery));
1236
1237
1238/** WAIT FOR IMAGES [used by masonry]
1239	https://github.com/alexanderdickson/waitForImages
1240 **************************************************************** **/
1241;(function ($) {
1242    // Namespace all events.
1243    var eventNamespace = 'waitForImages';
1244
1245    // CSS properties which contain references to images.
1246    $.waitForImages = {
1247        hasImageProperties: ['backgroundImage', 'listStyleImage', 'borderImage', 'borderCornerImage', 'cursor']
1248    };
1249
1250    // Custom selector to find `img` elements that have a valid `src` attribute and have not already loaded.
1251    $.expr[':'].uncached = function (obj) {
1252        // Ensure we are dealing with an `img` element with a valid `src` attribute.
1253        if (!$(obj).is('img[src!=""]')) {
1254            return false;
1255        }
1256
1257        // Firefox's `complete` property will always be `true` even if the image has not been downloaded.
1258        // Doing it this way works in Firefox.
1259        var img = new Image();
1260        img.src = obj.src;
1261        return !img.complete;
1262    };
1263
1264    $.fn.waitForImages = function (finishedCallback, eachCallback, waitForAll) {
1265
1266        var allImgsLength = 0;
1267        var allImgsLoaded = 0;
1268
1269        // Handle options object.
1270        if ($.isPlainObject(arguments[0])) {
1271            waitForAll = arguments[0].waitForAll;
1272            eachCallback = arguments[0].each;
1273			// This must be last as arguments[0]
1274			// is aliased with finishedCallback.
1275            finishedCallback = arguments[0].finished;
1276        }
1277
1278        // Handle missing callbacks.
1279        finishedCallback = finishedCallback || $.noop;
1280        eachCallback = eachCallback || $.noop;
1281
1282        // Convert waitForAll to Boolean
1283        waitForAll = !! waitForAll;
1284
1285        // Ensure callbacks are functions.
1286        if (!$.isFunction(finishedCallback) || !$.isFunction(eachCallback)) {
1287            throw new TypeError('An invalid callback was supplied.');
1288        }
1289
1290        return this.each(function () {
1291            // Build a list of all imgs, dependent on what images will be considered.
1292            var obj = $(this);
1293            var allImgs = [];
1294            // CSS properties which may contain an image.
1295            var hasImgProperties = $.waitForImages.hasImageProperties || [];
1296            // To match `url()` references.
1297            // Spec: http://www.w3.org/TR/CSS2/syndata.html#value-def-uri
1298            var matchUrl = /url\(\s*(['"]?)(.*?)\1\s*\)/g;
1299
1300            if (waitForAll) {
1301
1302                // Get all elements (including the original), as any one of them could have a background image.
1303                obj.find('*').addBack().each(function () {
1304                    var element = $(this);
1305
1306                    // If an `img` element, add it. But keep iterating in case it has a background image too.
1307                    if (element.is('img:uncached')) {
1308                        allImgs.push({
1309                            src: element.attr('src'),
1310                            element: element[0]
1311                        });
1312                    }
1313
1314                    $.each(hasImgProperties, function (i, property) {
1315                        var propertyValue = element.css(property);
1316                        var match;
1317
1318                        // If it doesn't contain this property, skip.
1319                        if (!propertyValue) {
1320                            return true;
1321                        }
1322
1323                        // Get all url() of this element.
1324                        while (match = matchUrl.exec(propertyValue)) {
1325                            allImgs.push({
1326                                src: match[2],
1327                                element: element[0]
1328                            });
1329                        }
1330                    });
1331                });
1332            } else {
1333                // For images only, the task is simpler.
1334                obj.find('img:uncached')
1335                    .each(function () {
1336                    allImgs.push({
1337                        src: this.src,
1338                        element: this
1339                    });
1340                });
1341            }
1342
1343            allImgsLength = allImgs.length;
1344            allImgsLoaded = 0;
1345
1346            // If no images found, don't bother.
1347            if (allImgsLength === 0) {
1348                finishedCallback.call(obj[0]);
1349            }
1350
1351            $.each(allImgs, function (i, img) {
1352
1353                var image = new Image();
1354
1355                // Handle the image loading and error with the same callback.
1356                $(image).on('load.' + eventNamespace + ' error.' + eventNamespace, function (event) {
1357                    allImgsLoaded++;
1358
1359                    // If an error occurred with loading the image, set the third argument accordingly.
1360                    eachCallback.call(img.element, allImgsLoaded, allImgsLength, event.type == 'load');
1361
1362                    if (allImgsLoaded == allImgsLength) {
1363                        finishedCallback.call(obj[0]);
1364                        return false;
1365                    }
1366
1367                });
1368
1369                image.src = img.src;
1370            });
1371        });
1372    };
1373}(jQuery));
1374
1375
1376/** BROWSER DETECT
1377	Add browser to html class
1378 **************************************************************** **/
1379(function($) {
1380	$.extend({
1381
1382		browserDetect: function() {
1383
1384			var u = navigator.userAgent,
1385				ua = u.toLowerCase(),
1386				is = function (t) {
1387					return ua.indexOf(t) > -1;
1388				},
1389				g = 'gecko',
1390				w = 'webkit',
1391				s = 'safari',
1392				o = 'opera',
1393				h = document.documentElement,
1394				b = [(!(/opera|webtv/i.test(ua)) && /msie\s(\d)/.test(ua)) ? ('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1])) : is('firefox/2') ? g + ' ff2' : is('firefox/3.5') ? g + ' ff3 ff3_5' : is('firefox/3') ? g + ' ff3' : is('gecko/') ? g : is('opera') ? o + (/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1 : (/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2 : '')) : is('konqueror') ? 'konqueror' : is('chrome') ? w + ' chrome' : is('iron') ? w + ' iron' : is('applewebkit/') ? w + ' ' + s + (/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1 : '') : is('mozilla/') ? g : '', is('j2me') ? 'mobile' : is('iphone') ? 'iphone' : is('ipod') ? 'ipod' : is('mac') ? 'mac' : is('darwin') ? 'mac' : is('webtv') ? 'webtv' : is('win') ? 'win' : is('freebsd') ? 'freebsd' : (is('x11') || is('linux')) ? 'linux' : '', 'js'];
1395
1396			c = b.join(' ');
1397			h.className += ' ' + c;
1398
1399			var isIE11 = !(window.ActiveXObject) && "ActiveXObject" in window;
1400
1401			if(isIE11) {
1402				jQuery('html').removeClass('gecko').addClass('ie ie11');
1403				return;
1404			}
1405
1406		}
1407
1408	});
1409})(jQuery);
1410
1411 
1412/** SMOOTHSCROLL V1.2.1
1413	Licensed under the terms of the MIT license.
1414 **************************************************************** **/
1415(function($) {
1416	$.extend({
1417
1418		smoothScroll: function() {
1419
1420			// Scroll Variables (tweakable)
1421			var defaultOptions = {
1422
1423				// Scrolling Core
1424				frameRate        : 60, // [Hz]
1425				animationTime    : 700, // [px]
1426				stepSize         : 120, // [px]
1427
1428				// Pulse (less tweakable)
1429				// ratio of "tail" to "acceleration"
1430				pulseAlgorithm   : true,
1431				pulseScale       : 10,
1432				pulseNormalize   : 1,
1433
1434				// Acceleration
1435				accelerationDelta : 20,  // 20
1436				accelerationMax   : 1,   // 1
1437
1438				// Keyboard Settings
1439				keyboardSupport   : true,  // option
1440				arrowScroll       : 50,     // [px]
1441
1442				// Other
1443				touchpadSupport   : true,
1444				fixedBackground   : true,
1445				excluded          : ""
1446			};
1447
1448			var options = defaultOptions;
1449
1450			// Other Variables
1451			var isExcluded = false;
1452			var isFrame = false;
1453			var direction = { x: 0, y: 0 };
1454			var initDone  = false;
1455			var root = document.documentElement;
1456			var activeElement;
1457			var observer;
1458			var deltaBuffer = [ 120, 120, 120 ];
1459
1460			var key = { left: 37, up: 38, right: 39, down: 40, spacebar: 32,
1461						pageup: 33, pagedown: 34, end: 35, home: 36 };
1462
1463
1464			/***********************************************
1465			 * INITIALIZE
1466			 ***********************************************/
1467
1468			/**
1469			 * Tests if smooth scrolling is allowed. Shuts down everything if not.
1470			 */
1471			function initTest() {
1472
1473				var disableKeyboard = false;
1474
1475				// disable keys for google reader (spacebar conflict)
1476				if (document.URL.indexOf("google.com/reader/view") > -1) {
1477					disableKeyboard = true;
1478				}
1479
1480				// disable everything if the page is blacklisted
1481				if (options.excluded) {
1482					var domains = options.excluded.split(/[,\n] ?/);
1483					domains.push("mail.google.com"); // exclude Gmail for now
1484					for (var i = domains.length; i--;) {
1485						if (document.URL.indexOf(domains[i]) > -1) {
1486							observer && observer.disconnect();
1487							removeEvent("mousewheel", wheel);
1488							disableKeyboard = true;
1489							isExcluded = true;
1490							break;
1491						}
1492					}
1493				}
1494
1495				// disable keyboard support if anything above requested it
1496				if (disableKeyboard) {
1497					removeEvent("keydown", keydown);
1498				}
1499
1500				if (options.keyboardSupport && !disableKeyboard) {
1501					addEvent("keydown", keydown);
1502				}
1503			}
1504
1505			/**
1506			 * Sets up scrolls array, determines if frames are involved.
1507			 */
1508			function init() {
1509
1510				if (!document.body) return;
1511
1512				var body = document.body;
1513				var html = document.documentElement;
1514				var windowHeight = window.innerHeight;
1515				var scrollHeight = body.scrollHeight;
1516
1517				// check compat mode for root element
1518				root = (document.compatMode.indexOf('CSS') >= 0) ? html : body;
1519				activeElement = body;
1520
1521				initTest();
1522				initDone = true;
1523
1524				// Checks if this script is running in a frame
1525				if (top != self) {
1526					isFrame = true;
1527				}
1528
1529				/**
1530				 * This fixes a bug where the areas left and right to
1531				 * the content does not trigger the onmousewheel event
1532				 * on some pages. e.g.: html, body { height: 100% }
1533				 */
1534				else if (scrollHeight > windowHeight &&
1535						(body.offsetHeight <= windowHeight ||
1536						 html.offsetHeight <= windowHeight)) {
1537
1538					// DOMChange (throttle): fix height
1539					var pending = false;
1540					var refresh = function () {
1541						if (!pending && html.scrollHeight != document.height) {
1542							pending = true; // add a new pending action
1543							setTimeout(function () {
1544								html.style.height = document.height + 'px';
1545								pending = false;
1546							}, 500); // act rarely to stay fast
1547						}
1548					};
1549					html.style.height = 'auto';
1550					setTimeout(refresh, 10);
1551
1552					var config = {
1553						attributes: true,
1554						childList: true,
1555						characterData: false
1556					};
1557
1558					observer = new MutationObserver(refresh);
1559					observer.observe(body, config);
1560
1561					// clearfix
1562					if (root.offsetHeight <= windowHeight) {
1563						var underlay = document.createElement("div");
1564						underlay.style.clear = "both";
1565						body.appendChild(underlay);
1566					}
1567				}
1568
1569				// gmail performance fix
1570				if (document.URL.indexOf("mail.google.com") > -1) {
1571					var s = document.createElement("style");
1572					s.innerHTML = ".iu { visibility: hidden }";
1573					(document.getElementsByTagName("head")[0] || html).appendChild(s);
1574				}
1575				// facebook better home timeline performance
1576				// all the HTML resized images make rendering CPU intensive
1577				else if (document.URL.indexOf("www.facebook.com") > -1) {
1578					var home_stream = document.getElementById("home_stream");
1579					home_stream && (home_stream.style.webkitTransform = "translateZ(0)");
1580				}
1581				// disable fixed background
1582				if (!options.fixedBackground && !isExcluded) {
1583					body.style.backgroundAttachment = "scroll";
1584					html.style.backgroundAttachment = "scroll";
1585				}
1586			}
1587
1588
1589			/************************************************
1590			 * SCROLLING
1591			 ************************************************/
1592
1593			var que = [];
1594			var pending = false;
1595			var lastScroll = +new Date;
1596
1597			/**
1598			 * Pushes scroll actions to the scrolling queue.
1599			 */
1600			function scrollArray(elem, left, top, delay) {
1601
1602				delay || (delay = 1000);
1603				directionCheck(left, top);
1604
1605				if (options.accelerationMax != 1) {
1606					var now = +new Date;
1607					var elapsed = now - lastScroll;
1608					if (elapsed < options.accelerationDelta) {
1609						var factor = (1 + (30 / elapsed)) / 2;
1610						if (factor > 1) {
1611							factor = Math.min(factor, options.accelerationMax);
1612							left *= factor;
1613							top  *= factor;
1614						}
1615					}
1616					lastScroll = +new Date;
1617				}
1618
1619				// push a scroll command
1620				que.push({
1621					x: left,
1622					y: top,
1623					lastX: (left < 0) ? 0.99 : -0.99,
1624					lastY: (top  < 0) ? 0.99 : -0.99,
1625					start: +new Date
1626				});
1627
1628				// don't act if there's a pending queue
1629				if (pending) {
1630					return;
1631				}
1632
1633				var scrollWindow = (elem === document.body);
1634
1635				var step = function (time) {
1636
1637					var now = +new Date;
1638					var scrollX = 0;
1639					var scrollY = 0;
1640
1641					for (var i = 0; i < que.length; i++) {
1642
1643						var item = que[i];
1644						var elapsed  = now - item.start;
1645						var finished = (elapsed >= options.animationTime);
1646
1647						// scroll position: [0, 1]
1648						var position = (finished) ? 1 : elapsed / options.animationTime;
1649
1650						// easing [optional]
1651						if (options.pulseAlgorithm) {
1652							position = pulse(position);
1653						}
1654
1655						// only need the difference
1656						var x = (item.x * position - item.lastX) >> 0;
1657						var y = (item.y * position - item.lastY) >> 0;
1658
1659						// add this to the total scrolling
1660						scrollX += x;
1661						scrollY += y;
1662
1663						// update last values
1664						item.lastX += x;
1665						item.lastY += y;
1666
1667						// delete and step back if it's over
1668						if (finished) {
1669							que.splice(i, 1); i--;
1670						}
1671					}
1672
1673					// scroll left and top
1674					if (scrollWindow) {
1675						window.scrollBy(scrollX, scrollY);
1676					}
1677					else {
1678						if (scrollX) elem.scrollLeft += scrollX;
1679						if (scrollY) elem.scrollTop  += scrollY;
1680					}
1681
1682					// clean up if there's nothing left to do
1683					if (!left && !top) {
1684						que = [];
1685					}
1686
1687					if (que.length) {
1688						requestFrame(step, elem, (delay / options.frameRate + 1));
1689					} else {
1690						pending = false;
1691					}
1692				};
1693
1694				// start a new queue of actions
1695				requestFrame(step, elem, 0);
1696				pending = true;
1697			}
1698
1699
1700			/***********************************************
1701			 * EVENTS
1702			 ***********************************************/
1703
1704			/**
1705			 * Mouse wheel handler.
1706			 * @param {Object} event
1707			 */
1708			function wheel(event) {
1709
1710				if (!initDone) {
1711					init();
1712				}
1713
1714				var target = event.target;
1715				var overflowing = overflowingAncestor(target);
1716
1717				// use default if there's no overflowing
1718				// element or default action is prevented
1719				if (!overflowing || event.defaultPrevented ||
1720					isNodeName(activeElement, "embed") ||
1721				   (isNodeName(target, "embed") && /\.pdf/i.test(target.src))) {
1722					return true;
1723				}
1724
1725				var deltaX = event.wheelDeltaX || 0;
1726				var deltaY = event.wheelDeltaY || 0;
1727
1728				// use wheelDelta if deltaX/Y is not available
1729				if (!deltaX && !deltaY) {
1730					deltaY = event.wheelDelta || 0;
1731				}
1732
1733				// check if it's a touchpad scroll that should be ignored
1734				if (!options.touchpadSupport && isTouchpad(deltaY)) {
1735					return true;
1736				}
1737
1738				// scale by step size
1739				// delta is 120 most of the time
1740				// synaptics seems to send 1 sometimes
1741				if (Math.abs(deltaX) > 1.2) {
1742					deltaX *= options.stepSize / 120;
1743				}
1744				if (Math.abs(deltaY) > 1.2) {
1745					deltaY *= options.stepSize / 120;
1746				}
1747
1748				scrollArray(overflowing, -deltaX, -deltaY);
1749				event.preventDefault();
1750			}
1751
1752			/**
1753			 * Keydown event handler.
1754			 * @param {Object} event
1755			 */
1756			function keydown(event) {
1757
1758				var target   = event.target;
1759				var modifier = event.ctrlKey || event.altKey || event.metaKey ||
1760							  (event.shiftKey && event.keyCode !== key.spacebar);
1761
1762				// do nothing if user is editing text
1763				// or using a modifier key (except shift)
1764				// or in a dropdown
1765				if ( /input|textarea|select|embed/i.test(target.nodeName) ||
1766					 target.isContentEditable ||
1767					 event.defaultPrevented   ||
1768					 modifier ) {
1769				  return true;
1770				}
1771				// spacebar should trigger button press
1772				if (isNodeName(target, "button") &&
1773					event.keyCode === key.spacebar) {
1774				  return true;
1775				}
1776
1777				var shift, x = 0, y = 0;
1778				var elem = overflowingAncestor(activeElement);
1779				var clientHeight = elem.clientHeight;
1780
1781				if (elem == document.body) {
1782					clientHeight = window.innerHeight;
1783				}
1784
1785				switch (event.keyCode) {
1786					case key.up:
1787						y = -options.arrowScroll;
1788						break;
1789					case key.down:
1790						y = options.arrowScroll;
1791						break;
1792					case key.spacebar: // (+ shift)
1793						shift = event.shiftKey ? 1 : -1;
1794						y = -shift * clientHeight * 0.9;
1795						break;
1796					case key.pageup:
1797						y = -clientHeight * 0.9;
1798						break;
1799					case key.pagedown:
1800						y = clientHeight * 0.9;
1801						break;
1802					case key.home:
1803						y = -elem.scrollTop;
1804						break;
1805					case key.end:
1806						var damt = elem.scrollHeight - elem.scrollTop - clientHeight;
1807						y = (damt > 0) ? damt+10 : 0;
1808						break;
1809					case key.left:
1810						x = -options.arrowScroll;
1811						break;
1812					case key.right:
1813						x = options.arrowScroll;
1814						break;
1815					default:
1816						return true; // a key we don't care about
1817				}
1818
1819				scrollArray(elem, x, y);
1820				event.preventDefault();
1821			}
1822
1823			/**
1824			 * Mousedown event only for updating activeElement
1825			 */
1826			function mousedown(event) {
1827				activeElement = event.target;
1828			}
1829
1830
1831			/***********************************************
1832			 * OVERFLOW
1833			 ***********************************************/
1834
1835			var cache = {}; // cleared out every once in while
1836			setInterval(function () { cache = {}; }, 10 * 1000);
1837
1838			var uniqueID = (function () {
1839				var i = 0;
1840				return function (el) {
1841					return el.uniqueID || (el.uniqueID = i++);
1842				};
1843			})();
1844
1845			function setCache(elems, overflowing) {
1846				for (var i = elems.length; i--;)
1847					cache[uniqueID(elems[i])] = overflowing;
1848				return overflowing;
1849			}
1850
1851			function overflowingAncestor(el) {
1852				var elems = [];
1853				var rootScrollHeight = root.scrollHeight;
1854				do {
1855					var cached = cache[uniqueID(el)];
1856					if (cached) {
1857						return setCache(elems, cached);
1858					}
1859					elems.push(el);
1860					if (rootScrollHeight === el.scrollHeight) {
1861						if (!isFrame || root.clientHeight + 10 < rootScrollHeight) {
1862							return setCache(elems, document.body); // scrolling root in WebKit
1863						}
1864					} else if (el.clientHeight + 10 < el.scrollHeight) {
1865						overflow = getComputedStyle(el, "").getPropertyValue("overflow-y");
1866						if (overflow === "scroll" || overflow === "auto") {
1867							return setCache(elems, el);
1868						}
1869					}
1870				} while (el = el.parentNode);
1871			}
1872
1873
1874			/***********************************************
1875			 * HELPERS
1876			 ***********************************************/
1877
1878			function addEvent(type, fn, bubble) {
1879				window.addEventListener(type, fn, (bubble||false));
1880			}
1881
1882			function removeEvent(type, fn, bubble) {
1883				window.removeEventListener(type, fn, (bubble||false));
1884			}
1885
1886			function isNodeName(el, tag) {
1887				return (el.nodeName||"").toLowerCase() === tag.toLowerCase();
1888			}
1889
1890			function directionCheck(x, y) {
1891				x = (x > 0) ? 1 : -1;
1892				y = (y > 0) ? 1 : -1;
1893				if (direction.x !== x || direction.y !== y) {
1894					direction.x = x;
1895					direction.y = y;
1896					que = [];
1897					lastScroll = 0;
1898				}
1899			}
1900
1901			var deltaBufferTimer;
1902
1903			function isTouchpad(deltaY) {
1904				if (!deltaY) return;
1905				deltaY = Math.abs(deltaY)
1906				deltaBuffer.push(deltaY);
1907				deltaBuffer.shift();
1908				clearTimeout(deltaBufferTimer);
1909				var allEquals    = (deltaBuffer[0] == deltaBuffer[1] &&
1910									deltaBuffer[1] == deltaBuffer[2]);
1911				var allDivisable = (isDivisible(deltaBuffer[0], 120) &&
1912									isDivisible(deltaBuffer[1], 120) &&
1913									isDivisible(deltaBuffer[2], 120));
1914				return !(allEquals || allDivisable);
1915			}
1916
1917			function isDivisible(n, divisor) {
1918				return (Math.floor(n / divisor) == n / divisor);
1919			}
1920
1921			var requestFrame = (function () {
1922				  return  window.requestAnimationFrame       ||
1923						  window.webkitRequestAnimationFrame ||
1924						  function (callback, element, delay) {
1925							  window.setTimeout(callback, delay || (1000/60));
1926						  };
1927			})();
1928
1929			var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
1930
1931
1932			/***********************************************
1933			 * PULSE
1934			 ***********************************************/
1935
1936			/**
1937			 * Viscous fluid with a pulse for part and decay for the rest.
1938			 * - Applies a fixed force over an interval (a damped acceleration), and
1939			 * - Lets the exponential bleed away the velocity over a longer interval
1940			 * - Michael Herf, http://stereopsis.com/stopping/
1941			 */
1942			function pulse_(x) {
1943				var val, start, expx;
1944				// test
1945				x = x * options.pulseScale;
1946				if (x < 1) { // acceleartion
1947					val = x - (1 - Math.exp(-x));
1948				} else {     // tail
1949					// the previous animation ended here:
1950					start = Math.exp(-1);
1951					// simple viscous drag
1952					x -= 1;
1953					expx = 1 - Math.exp(-x);
1954					val = start + (expx * (1 - start));
1955				}
1956				return val * options.pulseNormalize;
1957			}
1958
1959			function pulse(x) {
1960				if (x >= 1) return 1;
1961				if (x <= 0) return 0;
1962
1963				if (options.pulseNormalize == 1) {
1964					options.pulseNormalize /= pulse_(1);
1965				}
1966				return pulse_(x);
1967			}
1968
1969			addEvent("mousedown", mousedown);
1970			addEvent("mousewheel", wheel);
1971			addEvent("load", init);
1972
1973		}
1974
1975	});
1976})(jQuery);
1977
1978
1979/** Datepicker v1.3.7
1980	https://github.com/dangrossman/bootstrap-daterangepicker
1981 **************************************************************** **/
1982/* moment.js */(function(a){function b(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function c(a,b){return function(c){return k(a.call(this,c),b)}}function d(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function e(){}function f(a){w(a),h(this,a)}function g(a){var b=q(a),c=b.year||0,d=b.month||0,e=b.week||0,f=b.day||0,g=b.hour||0,h=b.minute||0,i=b.second||0,j=b.millisecond||0;this._milliseconds=+j+1e3*i+6e4*h+36e5*g,this._days=+f+7*e,this._months=+d+12*c,this._data={},this._bubble()}function h(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function i(a){var b,c={};for(b in a)a.hasOwnProperty(b)&&qb.hasOwnProperty(b)&&(c[b]=a[b]);return c}function j(a){return 0>a?Math.ceil(a):Math.floor(a)}function k(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function l(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&db.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function m(a){return"[object Array]"===Object.prototype.toString.call(a)}function n(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function o(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&s(a[d])!==s(b[d]))&&g++;return g+f}
1982function p(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=Tb[a]||Ub[b]||b}return a}function q(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=p(c),b&&(d[b]=a[c]));return d}function r(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}db[b]=function(e,f){var g,h,i=db.fn._lang[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=db().utc().set(d,a);return i.call(db.fn._lang,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function s(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function t(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function u(a){return v(a)?366:365}function v(a){return a%4===0&&a%100!==0||a%400===0}function w(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[jb]<0||a._a[jb]>11?jb:a._a[kb]<1||a._a[kb]>t(a._a[ib],a._a[jb])?kb:a._a[lb]<0||a._a[lb]>23?lb:a._a[mb]<0||a._a[mb]>59?mb:a._a[nb]<0||a._a[nb]>59?nb:a._a[ob]<0||a._a[ob]>999?ob:-1,a._pf._overflowDayOfYear&&(ib>b||b>kb)&&(b=kb),a._pf.overflow=b)}
1982function x(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function y(a){return a?a.toLowerCase().replace("_","-"):a}function z(a,b){return b._isUTC?db(a).zone(b._offset||0):db(a).local()}function A(a,b){return b.abbr=a,pb[a]||(pb[a]=new e),pb[a].set(b),pb[a]}function B(a){delete pb[a]}function C(a){var b,c,d,e,f=0,g=function(a){if(!pb[a]&&rb)try{require("./lang/"+a)}catch(b){}return pb[a]};if(!a)return db.fn._lang;if(!m(a)){if(c=g(a))return c;a=[a]}for(;f<a.length;){for(e=y(a[f]).split("-"),b=e.length,d=y(a[f+1]),d=d?d.split("-"):null;b>0;){if(c=g(e.slice(0,b).join("-")))return c;if(d&&d.length>=b&&o(e,d,!0)>=b-1)break;b--}f++}return db.fn._lang}function D(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function E(a){var b,c,d=a.match(vb);for(b=0,c=d.length;c>b;b++)d[b]=Yb[d[b]]?Yb[d[b]]:D(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function F(a,b){return a.isValid()?(b=G(b,a.lang()),Vb[b]||(Vb[b]=E(b)),Vb[b](a)):a.lang().invalidDate()}function G(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(wb.lastIndex=0;d>=0&&wb.test(a);)a=a.replace(wb,c),wb.lastIndex=0,d-=1;return a}function H(a,b){var c,d=b._strict;switch(a){case"DDDD":return Ib;case"YYYY":case"GGGG":case"gggg":return d?Jb:zb;case"Y":case"G":case"g":return Lb;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?Kb:Ab;case"S":if(d)return Gb;case"SS":if(d)return Hb;case"SSS":if(d)return Ib;case"DDD":return yb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Cb;case"a":case"A":return C(b._l)._meridiemParse;case"X":return Fb;case"Z":case"ZZ":return Db;case"T":return Eb;case"SSSS":return Bb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Hb:xb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return xb;default:return c=new RegExp(P(O(a.replace("\\","")),"i"))}}function I(a){a=a||"";var b=a.match(Db)||[],c=b[b.length-1]||[],d=(c+"").match(Qb)||["-",0,0],e=+(60*d[1])+s(d[2]);return"+"===d[0]?-e:e}function J(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[jb]=s(b)-1);break;case"MMM":case"MMMM":d=C(c._l).monthsParse(b),null!=d?e[jb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[kb]=s(b));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=s(b));break;case"YY":e[ib]=s(b)+(s(b)>68?1900:2e3);break;case"YYYY":case"YYYYY":case"YYYYYY":e[ib]=s(b);break;case"a":case"A":c._isPm=C(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[lb]=s(b);break;case"m":case"mm":e[mb]=s(b);break;case"s":case"ss":e[nb]=s(b);break;case"S":case"SS":case"SSS":case"SSSS":e[ob]=s(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=I(b);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":a=a.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=b)}}function K(a){var b,c,d,e,f,g,h,i,j,k,l=[];if(!a._d){for(d=M(a),a._w&&null==a._a[kb]&&null==a._a[jb]&&(f=function(b){var c=parseInt(b,10);return b?b.length<3?c>68?1900+c:2e3+c:c:null==a._a[ib]?db().weekYear():a._a[ib]},g=a._w,null!=g.GG||null!=g.W||null!=g.E?h=Z(f(g.GG),g.W||1,g.E,4,1):(i=C(a._l),j=null!=g.d?V(g.d,i):null!=g.e?parseInt(g.e,10)+i._week.dow:0,k=parseInt(g.w,10)||1,null!=g.d&&j<i._week.dow&&k++,h=Z(f(g.gg),k,j,i._week.doy,i._week.dow)),a._a[ib]=h.year,a._dayOfYear=h.dayOfYear),a._dayOfYear&&(e=null==a._a[ib]?d[ib]:a._a[ib],a._dayOfYear>u(e)&&(a._pf._overflowDayOfYear=!0),c=U(e,0,a._dayOfYear),a._a[jb]=c.getUTCMonth(),a._a[kb]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=l[b]=d[b];for(;7>b;b++)a._a[b]=l[b]=null==a._a[b]?2===b?1:0:a._a[b];l[lb]+=s((a._tzm||0)/60),l[mb]+=s((a._tzm||0)%60),a._d=(a._useUTC?U:T).apply(null,l)}}function L(a){var b;a._d||(b=q(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],K(a))}function M(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function N(a){a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=C(a._l),h=""+a._i,i=h.length,j=0;for(d=G(a._f,g).match(vb)||[],b=0;b<d.length;b++)e=d[b],c=(h.match(H(e,a))||[])[0],c&&(f=h.substr(0,h.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),h=h.slice(h.indexOf(c)+c.length),j+=c.length),Yb[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),J(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=i-j,h.length>0&&a._pf.unusedInput.push(h),a._isPm&&a._a[lb]<12&&(a._a[lb]+=12),a._isPm===!1&&12===a._a[lb]&&(a._a[lb]=0),K(a),w(a)}function O(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function P(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(a){var c,d,e,f,g;
1982if(0===a._f.length)return a._pf.invalidFormat=!0,a._d=new Date(0/0),void 0;for(f=0;f<a._f.length;f++)g=0,c=h({},a),c._pf=b(),c._f=a._f[f],N(c),x(c)&&(g+=c._pf.charsLeftOver,g+=10*c._pf.unusedTokens.length,c._pf.score=g,(null==e||e>g)&&(e=g,d=c));h(a,d||c)}function R(a){var b,c,d=a._i,e=Mb.exec(d);if(e){for(a._pf.iso=!0,b=0,c=Ob.length;c>b;b++)if(Ob[b][1].exec(d)){a._f=Ob[b][0]+(e[6]||" ");break}for(b=0,c=Pb.length;c>b;b++)if(Pb[b][1].exec(d)){a._f+=Pb[b][0];break}d.match(Db)&&(a._f+="Z"),N(a)}else a._d=new Date(d)}function S(b){var c=b._i,d=sb.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?R(b):m(c)?(b._a=c.slice(0),K(b)):n(c)?b._d=new Date(+c):"object"==typeof c?L(b):b._d=new Date(c)}function T(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function U(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function V(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function W(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function X(a,b,c){var d=hb(Math.abs(a)/1e3),e=hb(d/60),f=hb(e/60),g=hb(f/24),h=hb(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",hb(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,W.apply({},i)}function Y(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=db(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function Z(a,b,c,d,e){var f,g,h=U(a,0,1).getUTCDay();return c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:u(a-1)+g}}function $(a){var b=a._i,c=a._f;
1982return null===b?db.invalid({nullInput:!0}):("string"==typeof b&&(a._i=b=C().preparse(b)),db.isMoment(b)?(a=i(b),a._d=new Date(+b._d)):c?m(c)?Q(a):N(a):S(a),new f(a))}function _(a,b){db.fn[a]=db.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),db.updateOffset(this),this):this._d["get"+c+b]()}}function ab(a){db.duration.fn[a]=function(){return this._data[a]}}function bb(a,b){db.duration.fn["as"+a]=function(){return+this/b}}function cb(a){var b=!1,c=db;"undefined"==typeof ender&&(a?(gb.moment=function(){return!b&&console&&console.warn&&(b=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")),c.apply(null,arguments)},h(gb.moment,c)):gb.moment=db)}for(var db,eb,fb="2.5.1",gb=this,hb=Math.round,ib=0,jb=1,kb=2,lb=3,mb=4,nb=5,ob=6,pb={},qb={_isAMomentObject:null,_i:null,_f:null,_l:null,_strict:null,_isUTC:null,_offset:null,_pf:null,_lang:null},rb="undefined"!=typeof module&&module.exports&&"undefined"!=typeof require,sb=/^\/?Date\((\-?\d+)/i,tb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,ub=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,vb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,wb=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,xb=/\d\d?/,yb=/\d{1,3}/,zb=/\d{1,4}/,Ab=/[+\-]?\d{1,6}/,Bb=/\d+/,Cb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Db=/Z|[\+\-]\d\d:?\d\d/gi,Eb=/T/i,Fb=/[\+\-]?\d+(\.\d{1,3})?/,Gb=/\d/,Hb=/\d\d/,Ib=/\d{3}/,Jb=/\d{4}/,Kb=/[+-]?\d{6}/,Lb=/[+-]?\d+/,Mb=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Nb="YYYY-MM-DDTHH:mm:ssZ",Ob=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],Pb=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Qb=/([\+\-]|\d\d)/gi,Rb="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),Sb={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Tb={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Ub={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Vb={},Wb="DDD w W M D d".split(" "),Xb="M D H h m s w W".split(" "),Yb={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return k(this.year()%100,2)},YYYY:function(){return k(this.year(),4)},YYYYY:function(){return k(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+k(Math.abs(a),6)},gg:function(){return k(this.weekYear()%100,2)},gggg:function(){return k(this.weekYear(),4)},ggggg:function(){return k(this.weekYear(),5)},GG:function(){return k(this.isoWeekYear()%100,2)},GGGG:function(){return k(this.isoWeekYear(),4)},GGGGG:function(){return k(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return s(this.milliseconds()/100)},SS:function(){return k(s(this.milliseconds()/10),2)},SSS:function(){return k(this.milliseconds(),3)},SSSS:function(){return k(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+k(s(a/60),2)+":"+k(s(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+k(s(a/60),2)+k(s(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Zb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Wb.length;)eb=Wb.pop(),Yb[eb+"o"]=d(Yb[eb],eb);for(;Xb.length;)eb=Xb.pop(),Yb[eb+eb]=c(Yb[eb],2);for(Yb.DDDD=c(Yb.DDD,3),h(e.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=db.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=db([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return Y(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),db=function(c,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=c,g._f=d,g._l=e,g._strict=f,g._isUTC=!1,g._pf=b(),$(g)},db.utc=function(c,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=c,g._f=d,g._strict=f,g._pf=b(),$(g).utc()},db.unix=function(a){return db(1e3*a)},db.duration=function(a,b){var c,d,e,f=a,h=null;return db.isDuration(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(f={},b?f[b]=a:f.milliseconds=a):(h=tb.exec(a))?(c="-"===h[1]?-1:1,f={y:0,d:s(h[kb])*c,h:s(h[lb])*c,m:s(h[mb])*c,s:s(h[nb])*c,ms:s(h[ob])*c}):(h=ub.exec(a))&&(c="-"===h[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},f={y:e(h[2]),M:e(h[3]),d:e(h[4]),h:e(h[5]),m:e(h[6]),s:e(h[7]),w:e(h[8])}),d=new g(f),db.isDuration(a)&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},db.version=fb,db.defaultFormat=Nb,db.updateOffset=function(){},db.lang=function(a,b){var c;return a?(b?A(y(a),b):null===b?(B(a),a="en"):pb[a]||C(a),c=db.duration.fn._lang=db.fn._lang=C(a),c._abbr):db.fn._lang._abbr},db.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),C(a)},db.isMoment=function(a){return a instanceof f||null!=a&&a.hasOwnProperty("_isAMomentObject")},db.isDuration=function(a){return a instanceof g},eb=Zb.length-1;eb>=0;--eb)r(Zb[eb]);for(db.normalizeUnits=function(a){return p(a)}
1982,db.invalid=function(a){var b=db.utc(0/0);return null!=a?h(b._pf,a):b._pf.userInvalidated=!0,b},db.parseZone=function(a){return db(a).parseZone()},h(db.fn=f.prototype,{clone:function(){return db(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=db(this).utc();return 0<a.year()&&a.year()<=9999?F(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):F(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return x(this)},isDSTShifted:function(){return this._a?this.isValid()&&o(this._a,(this._isUTC?db.utc(this._a):db(this._a)).toArray())>0:!1},parsingFlags:function(){return h({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=F(this,a||db.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?db.duration(+b,a):db.duration(a,b),l(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?db.duration(+b,a):db.duration(a,b),l(this,c,-1),this},diff:function(a,b,c){var d,e,f=z(a,this),g=6e4*(this.zone()-f.zone());return b=p(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-db(this).startOf("month")-(f-db(f).startOf("month")))/d,e-=6e4*(this.zone()-db(this).startOf("month").zone()-(f.zone()-db(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:j(e)},from:function(a,b){return db.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(db(),a)},calendar:function(){var a=z(db(),this).startOf("day"),b=this.diff(a,"days",!0),c=-6>b?"sameElse":-1>b?"lastWeek":0>b?"lastDay":1>b?"sameDay":2>b?"nextDay":7>b?"nextWeek":"sameElse";return this.format(this.lang().calendar(c,this))},isLeapYear:function(){return v(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=V(a,this.lang()),this.add({d:a-b})):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),db.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=p(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=p(a),this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+db(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+db(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+z(a,this).startOf(b)},min:function(a){return a=db.apply(null,arguments),this>a?this:a},max:function(a){return a=db.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=I(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&l(this,db.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?db(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return t(this.year(),this.month())},dayOfYear:function(a){var b=hb((db(this).startOf("day")-db(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},quarter:function(){return Math.ceil((this.month()+1)/3)},weekYear:function(a){var b=Y(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=Y(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=Y(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=p(a),this[a]()},set:function(a,b){return a=p(a),"function"==typeof this[a]&&this[a](b),this},lang:function(b){return b===a?this._lang:(this._lang=C(b),this)}}),eb=0;eb<Rb.length;eb++)_(Rb[eb].toLowerCase().replace(/s$/,""),Rb[eb]);_("year","FullYear"),db.fn.days=db.fn.day,db.fn.months=db.fn.month,db.fn.weeks=db.fn.week,db.fn.isoWeeks=db.fn.isoWeek,db.fn.toJSON=db.fn.toISOString,h(db.duration.fn=g.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,h=this._data;h.milliseconds=e%1e3,a=j(e/1e3),h.seconds=a%60,b=j(a/60),h.minutes=b%60,c=j(b/60),h.hours=c%24,f+=j(c/24),h.days=f%30,g+=j(f/30),h.months=g%12,d=j(g/12),h.years=d},weeks:function(){return j(this.days()/7)}
1982,valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*s(this._months/12)},humanize:function(a){var b=+this,c=X(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=db.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=db.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=p(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=p(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:db.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}});for(eb in Sb)Sb.hasOwnProperty(eb)&&(bb(eb,Sb[eb]),ab(eb.toLowerCase()));bb("Weeks",6048e5),db.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},db.lang("en",{ordinal:function(a){var b=a%10,c=1===s(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),rb?(module.exports=db,cb(!0)):"function"==typeof define&&define.amd?define("moment",function(b,c,d){return d.config&&d.config()&&d.config().noGlobal!==!0&&cb(d.config().noGlobal===a),db}):cb()}).call(this);
1983/* daterangepicker.js */!function(b,c){var a=function(g,f,d){this.parentEl="body";this.element=b(g);var e='<div class="daterangepicker dropdown-menu"><div class="calendar left"></div><div class="calendar right"></div><div class="ranges"><div class="range_inputs"><div class="daterangepicker_start_input"><label for="daterangepicker_start"></label><input class="input-mini" type="text" name="daterangepicker_start" value="" disabled="disabled" /></div><div class="daterangepicker_end_input"><label for="daterangepicker_end"></label><input class="input-mini" type="text" name="daterangepicker_end" value="" disabled="disabled" /></div><button class="applyBtn" disabled="disabled"></button>&nbsp;<button class="cancelBtn"></button></div></div></div>';if(typeof f!=="object"||f===null){f={}}this.parentEl=(typeof f==="object"&&f.parentEl&&b(f.parentEl).length)?b(f.parentEl):b(this.parentEl);this.container=b(e).appendTo(this.parentEl);this.setOptions(f,d);var h=this.container;b.each(this.buttonClasses,function(i,j){h.find("button").addClass(j)});this.container.find(".daterangepicker_start_input label").html(this.locale.fromLabel);this.container.find(".daterangepicker_end_input label").html(this.locale.toLabel);if(this.applyClass.length){this.container.find(".applyBtn").addClass(this.applyClass)}if(this.cancelClass.length){this.container.find(".cancelBtn").addClass(this.cancelClass)}this.container.find(".applyBtn").html(this.locale.applyLabel);this.container.find(".cancelBtn").html(this.locale.cancelLabel);this.container.find(".calendar").on("click.daterangepicker",".prev",b.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",b.proxy(this.clickNext,this)).on("click.daterangepicker","td.available",b.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",b.proxy(this.enterDate,this)).on("mouseleave.daterangepicker","td.available",b.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",b.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.monthselect",b.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.ampmselect",b.proxy(this.updateTime,this));this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",b.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",b.proxy(this.clickCancel,this)).on("click.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",b.proxy(this.showCalendars,this)).on("click.daterangepicker","li",b.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",b.proxy(this.enterRange,this)).on("mouseleave.daterangepicker","li",b.proxy(this.updateFormInputs,this));if(this.element.is("input")){this.element.on({"click.daterangepicker":b.proxy(this.show,this),"focus.daterangepicker":b.proxy(this.show,this),"ke
1983yup.daterangepicker":b.proxy(this.updateFromControl,this)})}else{this.element.on("click.daterangepicker",b.proxy(this.toggle,this))}};a.prototype={constructor:a,setOptions:function(n,m){this.startDate=c().startOf("day");this.endDate=c().endOf("day");this.minDate=false;this.maxDate=false;this.dateLimit=false;this.showDropdowns=false;this.showWeekNumbers=false;this.timePicker=false;this.timePickerIncrement=30;this.timePicker12Hour=true;this.singleDatePicker=false;this.ranges={};this.opens="right";if(this.element.hasClass("pull-right")){this.opens="left"}this.buttonClasses=["btn","btn-small"];this.applyClass="btn-success";this.cancelClass="btn-default";this.format="MM/DD/YYYY";this.separator=" - ";this.locale={applyLabel:"Apply",cancelLabel:"Cancel",fromLabel:"From",toLabel:"To",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:c()._lang._weekdaysMin.slice(),monthNames:c()._lang._monthsShort.slice(),firstDay:0};this.cb=function(){};if(typeof n.format==="string"){this.format=n.format}if(typeof n.separator==="string"){this.separator=n.separator}if(typeof n.startDate==="string"){this.startDate=c(n.startDate,this.format)}if(typeof n.endDate==="string"){this.endDate=c(n.endDate,this.format)}if(typeof n.minDate==="string"){this.minDate=c(n.minDate,this.format)}if(typeof n.maxDate==="string"){this.maxDate=c(n.maxDate,this.format)}if(typeof n.startDate==="object"){this.startDate=c(n.startDate)}if(typeof n.endDate==="object"){this.endDate=c(n.endDate)}if(typeof n.minDate==="object"){this.minDate=c(n.minDate)}if(typeof n.maxDate==="object"){this.maxDate=c(n.maxDate)}if(typeof n.applyClass==="string"){this.applyClass=n.applyClass}if(typeof n.cancelClass==="string"){this.cancelClass=n.cancelClass}if(typeof n.dateLimit==="object"){this.dateLimit=n.dateLimit}if(typeof n.locale==="object"){if(typeof n.locale.daysOfWeek==="object"){this.locale.daysOfWeek=n.locale.daysOfWeek.slice()}if(typeof n.locale.monthNames==="object"){this.locale.monthNames=n.locale.monthNames.slice()}if(typeof n.locale.firstDay==="number"){this.locale.firstDay=n.locale.firstDay;var h=n.locale.firstDay;while(h>0){this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());h--}}if(typeof n.locale.applyLabel==="string"){this.locale.applyLabel=n.locale.applyLabel}if(typeof n.locale.cancelLabel==="string"){this.locale.cancelLabel=n.locale.cancelLabel}if(typeof n.locale.fromLabel==="string"){this.locale.fromLabel=n.locale.fromLabel}if(typeof n.locale.toLabel==="string"){this.locale.toLabel=n.locale.toLabel}if(typeof n.locale.weekLabel==="string"){this.locale.weekLabel=n.locale.weekLabel}if(typeof n.locale.customRangeLabel==="string"){this.locale.customRangeLabel=n.locale.customRangeLabel}}if(typeof n.opens==="string"){this.opens=n.opens}if(typeof n.showWeekNumbers==="boolean"){this.showWeekNumbers=n.showWeekNumbers}if(typeof n.buttonClasses==="string"){this.buttonClasses=[n.buttonClasses]}if(typeof n.buttonClasses==="object"){this.buttonClasses=n.buttonClasses}if(typeof n.showDropdowns==="boolean"){this.showDropdowns=n.showDropdowns}if(typeof n.singleDatePicker==="boolean"){this.singleDatePicker=n.singleDatePicker}if(typeof n.timePicker==="boolean"){this.timePicker=n.timePicker}if(typeof n.timePickerIncrement==="number"){this.timePickerIncrement=n.timePickerIncrement}if(typeof n.timePicker12Hour==="boolean"){this.timePicker12Hour=n.timePicker12Hour}var d,g,i;if(typeof n.startDate==="undefined"&&typeof n.endDate==="undefined"){if(b(this.element).is("input[type=text]")){var e=b(this.element).val();var k=e.split(this.separator);d=g=null;if(k.length==2){d=c(k[0],this.format);g=c(k[1],this.format)}else{if(this.singleDatePicker){d=c(e,this.format);g=c(e,this.format)}}if(d!==null&&g!==null){this.startDate=d;this.endDate=g}}}if(typeof n.ranges==="object"){for(i in n.ranges){d=c(n.ranges[i][0]);g=c(n.ranges[i][1]);if(this.minDate&&d.isBefore(this.minDate)){d=c(this.minDate)}if(this.maxDate&&g.isAfter(this.maxDate)){g=c(this.maxDate)}if((this.minDate&&g.isBefore(this.minDate))||(this.maxDate&&d.isAfter(this.maxDate))){continue}this.ranges[i]=[d,g]}var j="<ul>";for(i in this.ranges){j+="<li>"+i+"</li>"}j+="<li>"+this.locale.customRangeLabel+"</li>";j+="</ul>";this.container.find(".ranges ul").remove();this.container.find(".ranges").prepend(j)}if(typeof m==="function"){this.cb=m}if(!this.timePicker){this.startDate=this.startDate.startOf("day");this.endDate=this.endDate.endOf("day")}if(this.singleDatePicker){this.opens="right";this.container.find(".calendar.right").show();this.container.find(".calendar.left").hide();this.container.find(".ranges").hide();if(!this.container.find(".calendar.right").hasClass("single")){this.container.find(".calendar.right").addClass("single")}}else{this.container.find(".calendar.right").removeClass("single");this.container.find(".ranges").show()}this.oldStartDate=this.startDate.clone();this.oldEndDate=this.endDate.clone();this.oldChosenLabel=this.chosenLabel;this.leftCalendar={month:c([this.startDate.year(),this.startDate.month(),1,this.startDate.hour(),this.startDate.minute()]),calendar:[]};this.rightCalendar={month:c([this.endDate.year(),this.endDate.month(),1,this.endDate.hour(),this.endDate.minute()]),calendar:[]};if(this.opens=="right"){var f=this.container.find(".calendar.left");var l=this.container.find(".calendar.right");f.removeClass("left").addClass("right");l.removeClass("right").addClass("left")}if(typeof n.ranges==="undefined"&&!this.singleDatePicker){this.container.addClass("show-calendar")}this.container.addClass("opens"+this.opens);this.updateView();this.updateCalendars()},setStartDate:function(d){if(typeof d==="string"){this.startDate=c(d,this.format)}if(typeof d==="object"){this.startDate=c(d)}if(!this.timePicker){this.startDate=this.startDate.startOf("day")}this.oldStartDate=this.startDate.clone();this.updateView();this.updateCalendars()},setEndDate:function(d){if(typeof d==="string"){this.endDate=c(d,this.format)}if(typeof d==="object"){this.endDate=c(d)}if(!this.timePicker){this.endDate=this.endDate.endOf("day")}this.oldEndDate=this.endDate.clone();this.updateView();this.updateCalendars()},updateView:function(){this.leftCalendar.month.month(this.startDate.month()).year
1983(this.startDate.year());this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());this.updateFormInputs()},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.format));this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.format));if(this.startDate.isSame(this.endDate)||this.startDate.isBefore(this.endDate)){this.container.find("button.applyBtn").removeAttr("disabled")}else{this.container.find("button.applyBtn").attr("disabled","disabled")}},updateFromControl:function(){if(!this.element.is("input")){return}if(!this.element.val().length){return}var e=this.element.val().split(this.separator),f=null,d=null;if(e.length===2){f=c(e[0],this.format);d=c(e[1],this.format)}if(this.singleDatePicker||f===null||d===null){f=c(this.element.val(),this.format);d=f}if(d.isBefore(f)){return}this.oldStartDate=this.startDate.clone();this.oldEndDate=this.endDate.clone();this.startDate=f;this.endDate=d;if(!this.startDate.isSame(this.oldStartDate)||!this.endDate.isSame(this.oldEndDate)){this.notify()}this.updateCalendars()},notify:function(){this.updateView();this.cb(this.startDate,this.endDate,this.chosenLabel)},move:function(){var d={top:0,left:0};if(!this.parentEl.is("body")){d={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()}}if(this.opens=="left"){this.container.css({top:this.element.offset().top+this.element.outerHeight()-d.top,right:b(window).width()-this.element.offset().left-this.element.outerWidth()-d.left,left:"auto"});if(this.container.offset().left<0){this.container.css({right:"auto",left:9})}}else{this.container.css({top:this.element.offset().top+this.element.outerHeight()-d.top,left:this.element.offset().left-d.left,right:"auto"});if(this.container.offset().left+this.container.outerWidth()>b(window).width()){this.container.css({left:"auto",right:0})}}},toggle:function(d){if(this.element.hasClass("active")){this.hide()}else{this.show()}},show:function(d){this.element.addClass("active");this.container.show();this.move();this._outsideClickProxy=b.proxy(function(f){this.outsideClick(f)},this);b(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy);this.element.trigger("show.daterangepicker",this)},outsideClick:function(f){var d=b(f.target);if(d.closest(this.element).length||d.closest(this.container).length||d.closest(".calendar-date").length){return}this.hide()},hide:function(d){b(document).off("mousedown.daterangepicker",this._outsideClickProxy).off("click.daterangepicker",this._outsideClickProxy).off("focusin.daterangepicker",this._outsideClickProxy);this.element.removeClass("active");this.container.hide();if(!this.startDate.isSame(this.oldStartDate)||!this.endDate.isSame(this.oldEndDate)){this.notify()}this.oldStartDate=this.startDate.clone();this.oldEndDate=this.endDate.clone();this.element.trigger("hide.daterangepicker",this)},enterRange:function(g){var d=g.target.innerHTML;if(d==this.locale.customRangeLabel){this.updateView()}else{var f=this.ranges[d];this.container.find("input[name=daterangepicker_start]").val(f[0].format(this.format));this.container.find("input[name=daterangepicker_end]").val(f[1].format(this.format))}},showCalendars:function(){this.container.addClass("show-calendar");this.move()},hideCalendars:function(){this.container.removeClass("show-calendar")},updateInputText:function(){if(this.element.is("input")&&!this.singleDatePicker){this.element.val(this.startDate.format(this.format)+this.separator+this.endDate.format(this.format))}else{if(this.element.is("input")){this.element.val(this.startDate.format(this.format))}}},clickRange:function(g){var d=g.target.innerHTML;this.chosenLabel=d;if(d==this.locale.customRangeLabel){this.showCalendars()}else{var f=this.ranges[d];this.startDate=f[0];this.endDate=f[1];if(!this.timePicker){this.startDate.startOf("day");this.endDate.endOf("day")}
1983this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute());this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute());this.updateCalendars();this.updateInputText();this.hideCalendars();this.hide();this.element.trigger("apply.daterangepicker",this)}},clickPrev:function(f){var d=b(f.target).parents(".calendar");if(d.hasClass("left")){this.leftCalendar.month.subtract("month",1)}else{this.rightCalendar.month.subtract("month",1)}this.updateCalendars()},clickNext:function(f){var d=b(f.target).parents(".calendar");if(d.hasClass("left")){this.leftCalendar.month.add("month",1)}else{this.rightCalendar.month.add("month",1)}this.updateCalendars()},enterDate:function(g){var i=b(g.target).attr("data-title");var h=i.substr(1,1);var d=i.substr(3,1);var f=b(g.target).parents(".calendar");if(f.hasClass("left")){this.container.find("input[name=daterangepicker_start]").val(this.leftCalendar.calendar[h][d].format(this.format))}else{this.container.find("input[name=daterangepicker_end]").val(this.rightCalendar.calendar[h][d].format(this.format))}},clickDate:function(l){var m=b(l.target).attr("data-title");var n=m.substr(1,1);var h=m.substr(3,1);var f=b(l.target).parents(".calendar");var g,k;if(f.hasClass("left")){g=this.leftCalendar.calendar[n][h];k=this.endDate;if(typeof this.dateLimit==="object"){var d=c(g).add(this.dateLimit).startOf("day");if(k.isAfter(d)){k=d}}}else{g=this.startDate;k=this.rightCalendar.calendar[n][h];if(typeof this.dateLimit==="object"){var j=c(k).subtract(this.dateLimit).startOf("day");if(g.isBefore(j)){g=j}}}if(this.singleDatePicker&&f.hasClass("left")){k=g.clone()}else{if(this.singleDatePicker&&f.hasClass("right")){g=k.clone()}}f.find("td").removeClass("active");if(g.isSame(k)||g.isBefore(k)){b(l.target).addClass("active");this.startDate=g;this.endDate=k;this.chosenLabel=this.locale.customRangeLabel}else{if(g.isAfter(k)){b(l.target).addClass("active");var i=this.endDate.diff(this.startDate);this.startDate=g;this.endDate=c(g).add("ms",i);this.chosenLabel=this.locale.customRangeLabel}}this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());this.updateCalendars();if(!this.timePicker){k.endOf("day")}if(this.singleDatePicker){this.clickApply()}},clickApply:function(d){this.updateInputText();this.hide();this.element.trigger("apply.daterangepicker",this)},clickCancel:function(d){this.startDate=this.oldStartDate;this.endDate=this.oldEndDate;this.chosenLabel=this.oldChosenLabel;this.updateView();this.updateCalendars();this.hide();this.element.trigger("cancel.daterangepicker",this)},updateMonthYear:function(h){var j=b(h.target).closest(".calendar").hasClass("left"),i=j?"left":"right",g=this.container.find(".calendar."+i);var f=parseInt(g.find(".monthselect").val(),10);var d=g.find(".yearselect").val();this[i+"Calendar"].month.month(f).year(d);this.updateCalendars()},updateTime:function(i){var h=b(i.target).closest(".calendar"),k=h.hasClass("left");var f=parseInt(h.find(".hourselect").val(),10);var j=parseInt(h.find(".minuteselect").val(),10);if(this.timePicker12Hour){var g=h.find(".ampmselect").val();if(g==="PM"&&f<12){f+=12}if(g==="AM"&&f===12){f=0}}if(k){var l=this.startDate.clone();l.hour(f);l.minute(j);this.startDate=l;this.leftCalendar.month.hour(f).minute(j)}else{var d=this.endDate.clone();d.hour(f);d.minute(j);this.endDate=d;this.rightCalendar.month.hour(f).minute(j)}this.updateCalendars()},updateCalendars:function(){this.leftCalendar.calendar=this.buildCalendar(this.leftCalendar.month.month(),this.leftCalendar.month.year(),this.leftCalendar.month.hour(),this.leftCalendar.month.minute(),"left");this.rightCalendar.calendar=this.buildCalendar(this.rightCalendar.month.month(),this.rightCalendar.month.year(),this.rightCalendar.month.hour(),this.rightCalendar.month.minute(),"right");this.container.find(".calendar.left").empty().html(this.renderCalendar(this.leftCalendar.calendar,this.startDate,this.minDate,this.maxDate));this.container.find(".calendar.right").empty().html(this.renderCalendar(this.rightCalendar.calendar,this.endDate,this.startDate,this.maxDate));this.container.find(".ranges li").removeClass("active");var d=true;var f=0;for(var e in this.ranges){if(this.timePicker){if(this.startDate.isSame(this.ranges[e][0])&&this.endDate.isSame(this.ranges[e][1])){d=false;this.chosenLabel=this.container.find(".ranges li:eq("+f+")").addClass("active").html()}}else{if(this.startDate.format("YYYY-MM-DD")==this.ranges[e][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[e][1].format("YYYY-MM-DD")){d=false;this.chosenLabel=this.container.find(".ranges li:eq("+f+")").addClass("active").html()}}f++}if(d){this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html()}},buildCalendar:function(p,r,j,h,q){var d=c([r,p,1]);var n=c(d).subtract("month",1).month();
1983var m=c(d).subtract("month",1).year();var s=c([m,n]).daysInMonth();var f=d.day();var l;var k=[];for(l=0;l<6;l++){k[l]=[]}var o=s-f+this.locale.firstDay+1;if(o>s){o-=7}if(f==this.locale.firstDay){o=s-6}var g=c([m,n,o,12,h]);var e,t;for(l=0,e=0,t=0;l<42;l++,e++,g=c(g).add("hour",24)){if(l>0&&e%7===0){e=0;t++}k[t][e]=g.clone().hour(j);g.hour(12)}return k},renderDropdowns:function(i,h,d){var l=i.month();var g='<select class="monthselect">';var e=false;var q=false;for(var f=0;f<12;f++){if((!e||f>=h.month())&&(!q||f<=d.month())){g+="<option value='"+f+"'"+(f===l?" selected='selected'":"")+">"+this.locale.monthNames[f]+"</option>"}}g+="</select>";var k=i.year();var j=(d&&d.year())||(k+5);var p=(h&&h.year())||(k-50);var o='<select class="yearselect">';for(var n=p;n<=j;n++){o+='<option value="'+n+'"'+(n===k?' selected="selected"':"")+">"+n+"</option>"}o+="</select>";return g+o},renderCalendar:function(n,l,k,e){var q='<div class="calendar-date">';q+='<table class="table-condensed">';q+="<thead>";q+="<tr>";if(this.showWeekNumbers){q+="<th></th>"}if(!k||k.isBefore(n[1][1])){q+='<th class="prev available"><i class="fa fa-arrow-left icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>'}else{q+="<th></th>"}var g=this.locale.monthNames[n[1][1].month()]+n[1][1].format(" YYYY");if(this.showDropdowns){g=this.renderDropdowns(n[1][1],k,e)}q+='<th colspan="5" class="month">'+g+"</th>";if(!e||e.isAfter(n[1][1])){q+='<th class="next available"><i class="fa fa-arrow-right icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>'}else{q+="<th></th>"}q+="</tr>";q+="<tr>";if(this.showWeekNumbers){q+='<th class="week">'+this.locale.weekLabel+"</th>"}b.each(this.locale.daysOfWeek,function(t,i){q+="<th>"+i+"</th>"});q+="</tr>";q+="</thead>";q+="<tbody>";for(var s=0;s<6;s++){q+="<tr>";if(this.showWeekNumbers){q+='<td class="week">'+n[s][0].week()+"</td>"}for(var h=0;h<7;h++){var p="available ";p+=(n[s][h].month()==n[1][1].month())?"":"off";if((k&&n[s][h].isBefore(k,"day"))||(e&&n[s][h].isAfter(e,"day"))){p=" off disabled "}else{if(n[s][h].format("YYYY-MM-DD")==l.format("YYYY-MM-DD")){p+=" active ";if(n[s][h].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")){p+=" start-date "}if(n[s][h].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")){p+=" end-date "}}else{if(n[s][h]>=this.startDate&&n[s][h]<=this.endDate){p+=" in-range ";if(n[s][h].isSame(this.startDate)){p+=" start-date "}if(n[s][h].isSame(this.endDate)){p+=" end-date "}}}}var r="r"+s+"c"+h;q+='<td class="'+p.replace(/\s+/g," ").replace(/^\s?(.*?)\s?$/,"$1")+'" data-title="'+r+'">'+n[s][h].date()+"</td>"}q+="</tr>"}q+="</tbody>";q+="</table>";q+="</div>";var m;if(this.timePicker){q+='<div class="calendar-time">';q+='<select class="hourselect">';var f=0;var j=23;var d=l.hour();if(this.timePicker12Hour){f=1;j=12;if(d>=12){d-=12}if(d===0){d=12}}for(m=f;m<=j;m++){if(m==d){q+='<option value="'+m+'" selected="selected">'+m+"</option>"}else{q+='<option value="'+m+'">'+m+"</option>"}}q+="</select> : ";q+='<select class="minuteselect">';for(m=0;m<60;m+=this.timePickerIncrement){var o=m;if(o<10){o="0"+o}if(m==l.minute()){q+='<option value="'+m+'" selected="selected">'+o+"</option>"}else{q+='<option value="'+m+'">'+o+"</option>"}}q+="</select> ";if(this.timePicker12Hour){q+='<select class="ampmselect">';if(l.hour()>=12){q+='<option value="AM">AM</option><option value="PM" selected="selected">PM</option>'}else{q+='<option value="AM" selected="selected">AM</option><option value="PM">PM</option>'}q+="</select>"}q+="</div>"}return q},remove:function(){this.container.remove();this.element.off(".daterangepicker");this.element.removeData("daterangepicker")}};b.fn.daterangepicker=function(e,d){this.each(function(){var f=b(this);if(f.data("daterangepicker")){f.data("daterangepicker").remove()}f.data("daterangepicker",new a(f,e,d))});return this}}(window.jQuery,window.moment);
1984
1985
1986/** Colorpicker v2.0
1987	http://mjolnic.github.io/bootstrap-colorpicker/
1988 **************************************************************** **/
1989!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):window.jQuery&&!window.jQuery.fn.colorpicker&&a(window.jQuery)}(function(a){"use strict";var b=function(a){this.value={h:0,s:0,b:0,a:1},this.origFormat=null,a&&(void 0!==a.toLowerCase?this.setColor(a):void 0!==a.h&&(this.value=a))};b.prototype={constructor:b,colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
1989almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_sanitizeNumber:function(a){return"number"==typeof a?a:isNaN(a)||null===a||""===a||void 0===a?1:void 0!==a.toLowerCase?parseFloat(a):1},setColor:function(a){a=a.toLowerCase(),this.value=this.stringToHSB(a)||{h:0,s:0,b:0,a:1}},stringToHSB:function(b){b=b.toLowerCase();var c=this,d=!1;return a.each(this.stringParsers,function(a,e){var f=e.re.exec(b),g=f&&e.parse.apply(c,[f]),h=e.format||"rgba";return g?(d=h.match(/hsla?/)?c.RGBtoHSB.apply(c,c.HSLtoRGB.apply(c,g)):c.RGBtoHSB.apply(c,g),c.origFormat=h,!1):!0}),d},setHue:function(a){this.value.h=1-a},setSaturation:function(a){this.value.s=a},setBrightness:function(a){this.value.b=1-a},setAlpha:function(a){this.value.a=parseInt(100*(1-a),10)/100},toRGB:function(a,b,c,d){a||(a=this.value.h,b=this.value.s,c=this.value.b),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-Math.abs(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],{r:Math.round(255*e),g:Math.round(255*f),b:Math.round(255*g),a:d||this.value.a}},toHex:function(a,b,c,d){var e=this.toRGB(a,b,c,d);return"#"+(1<<24|parseInt(e.r)<<16|parseInt(e.g)<<8|parseInt(e.b)).toString(16).substr(1)},toHSL:function(a,b,c,d){a=a||this.value.h,b=b||this.value.s,c=c||this.value.b,d=d||this.value.a;var e=a,f=(2-b)*c,g=b*c;return g/=f>0&&1>=f?f:2-f,f/=2,g>1&&(g=1),{h:isNaN(e)?0:e,s:isNaN(g)?0:g,l:isNaN(f)?0:f,a:isNaN(d)?0:d}},toAlias:function(a,b,c,d){var e=this.toHex(a,b,c,d);for(var f in this.colors)if(this.colors[f]==e)return f;return!1},RGBtoHSB:function(a,b,c,d){a/=255,b/=255,c/=255;var e,f,g,h;return g=Math.max(a,b,c),h=g-Math.min(a,b,c),e=0===h?null:g===a?(b-c)/h:g===b?(c-a)/h+2:(a-b)/h+4,e=(e+360)%6*60/360,f=0===h?0:h/g,{h:this._sanitizeNumber(e),s:f,b:g,a:this._sanitizeNumber(d)}},HueToRGB:function(a,b,c){return 0>c?c+=1:c>1&&(c-=1),1>6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a},HSLtoRGB:function(a,b,c,d){0>b&&(b=0);var e;e=.5>=c?c*(1+b):c+b-c*b;var f=2*c-e,g=a+1/3,h=a,i=a-1/3,j=Math.round(255*this.HueToRGB(f,e,g)),k=Math.round(255*this.HueToRGB(f,e,h)),l=Math.round(255*this.HueToRGB(f,e,i));return[j,k,l,this._sanitizeNumber(d)]},toString:function(a){switch(a=a||"rgba"){case"rgb":var b=this.toRGB();return"rgb("+b.r+","+b.g+","+b.b+")";case"rgba":var b=this.toRGB();return"rgba("+b.r+","+b.g+","+b.b+","+b.a+")";case"hsl":var c=this.toHSL();return"hsl("+Math.round(360*c.h)+","+Math.round(100*c.s)+"%,"+Math.round(100*c.l)+"%)";case"hsla":var c=this.toHSL();return"hsla("+Math.round(360*c.h)+","+Math.round(100*c.s)+"%,"+Math.round(100*c.l)+"%,"+c.a+")";case"hex":return this.toHex();case"alias":return this.toAlias()||this.toHex();default:return!1}},stringParsers:[{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16),1]}},{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(a){return[a[1],a[2],a[3],1]}},{re:/rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/^([a-z]{3,})$/,format:"alias",parse:function(a){var b=this.colorNameToHex(a[0])||"#000000",c=this.stringParsers[0].re.exec(b),d=c&&this.stringParsers[0].parse.apply(this,[c]);return d}}],colorNameToHex:function(a){return"undefined"!=typeof this.colors[a.toLowerCase()]?this.colors[a.toLowerCase()]:!1}};var c={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",
1989sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div></div>'},d=function(d,e){this.element=a(d).addClass("colorpicker-element"),this.options=a.extend({},c,this.element.data(),e),this.component=this.options.component,this.component=this.component!==!1?this.element.find(this.component):!1,this.component&&0===this.component.length&&(this.component=!1),this.container=this.options.container===!0?this.element:this.options.container,this.container=this.container!==!1?a(this.container):!1,this.input=this.element.is("input")?this.element:this.options.input?this.element.find(this.options.input):!1,this.input&&0===this.input.length&&(this.input=!1),this.color=new b(this.options.color!==!1?this.options.color:this.getValue()),this.format=this.options.format!==!1?this.options.format:this.color.origFormat,this.picker=a(this.options.template),this.picker.addClass(this.options.inline?"colorpicker-inline colorpicker-visible":"colorpicker-hidden"),this.options.horizontal&&this.picker.addClass("colorpicker-horizontal"),("rgba"===this.format||"hsla"===this.format)&&this.picker.addClass("colorpicker-with-alpha"),this.picker.on("mousedown.colorpicker",a.proxy(this.mousedown,this)),this.picker.appendTo(this.container?this.container:a("body")),this.input!==!1&&(this.input.on({"keyup.colorpicker":a.proxy(this.keyup,this)}),this.component===!1&&this.element.on({"focus.colorpicker":a.proxy(this.show,this)}),this.options.inline===!1&&this.element.on({"focusout.colorpicker":a.proxy(this.hide,this)})),this.component!==!1&&this.component.on({"click.colorpicker":a.proxy(this.show,this)}),this.input===!1&&this.component===!1&&this.element.on({"click.colorpicker":a.proxy(this.show,this)}),this.update(),a(a.proxy(function(){this.element.trigger("create")},this))};d.version="2.0.0-beta",d.Color=b,d.prototype={constructor:d,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker").off(".colorpicker"),this.input!==!1&&this.input.off(".colorpicker"),this.component!==!1&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(this.options.inline!==!1)return!1;var a=this.container&&this.container[0]!==document.body?"position":"offset",b=this.component?this.component[a]():this.element[a]();this.picker.css({top:b.top+(this.component?this.component.outerHeight():this.element.outerHeight()),left:b.left})},show:function(b){return this.isDisabled()?!1:(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),a(window).on("resize.colorpicker",a.proxy(this.reposition,this)),!this.hasInput()&&b&&b.stopPropagation&&b.preventDefault&&(b.stopPropagation(),b.preventDefault()),this.options.inline===!1&&a(window.document).on({"mousedown.colorpicker":a.proxy(this.hide,this)}),void this.element.trigger({type:"showPicker",color:this.color}))},hide:function(){this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),a(window).off("resize.colorpicker",this.reposition),a(document).off({"mousedown.colorpicker":this.hide}),this.update(),this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(a){return a=a||this.color.toString(this.format),this.element.data("color",a),a},updateInput:function(a){return a=a||this.color.toString(this.format),this.input!==!1&&this.input.prop("value",a),a},updatePicker:function(a){void 0!==a&&(this.color=new b(a));var c=this.options.horizontal===!1?this.options.sliders:this.options.slidersHorz,d=this.picker.find("i");return 0!==d.length?(this.options.horizontal===!1?(c=this.options.sliders,d.eq(1).css("top",c.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",c.alpha.maxTop*(1-this.color.value.a))):(c=this.options.slidersHorz,d.eq(1).css("left",c.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",c.alpha.maxLeft*(1-this.color.value.a))),d.eq(0).css({top:c.saturation.maxTop-this.color.value.b*c.saturation.maxTop,left
1989:this.color.value.s*c.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex()),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(this.format)),a):void 0},updateComponent:function(a){if(a=a||this.color.toString(this.format),this.component!==!1){var b=this.component.find("i").eq(0);b.length>0?b.css({backgroundColor:a}):this.component.css({backgroundColor:a})}return a},update:function(a){var b=this.updateComponent();return(this.getValue(!1)!==!1||a===!0)&&(this.updateInput(b),this.updateData(b)),this.updatePicker(),b},setValue:function(a){this.color=new b(a),this.update(),this.element.trigger({type:"changeColor",color:this.color,value:a})},getValue:function(a){a=void 0===a?"#000000":a;var b;return b=this.hasInput()?this.input.val():this.element.data("color"),(void 0===b||""===b||null===b)&&(b=a),b},hasInput:function(){return this.input!==!1},isDisabled:function(){return this.hasInput()?this.input.prop("disabled")===!0:!1},disable:function(){return this.hasInput()?(this.input.prop("disabled",!0),!0):!1},enable:function(){return this.hasInput()?(this.input.prop("disabled",!1),!0):!1},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(b){b.stopPropagation(),b.preventDefault();var c=a(b.target),d=c.closest("div"),e=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!d.is(".colorpicker")){if(d.is(".colorpicker-saturation"))this.currentSlider=a.extend({},e.saturation);else if(d.is(".colorpicker-hue"))this.currentSlider=a.extend({},e.hue);else{if(!d.is(".colorpicker-alpha"))return!1;this.currentSlider=a.extend({},e.alpha)}var f=d.offset();this.currentSlider.guide=d.find("i")[0].style,this.currentSlider.left=b.pageX-f.left,this.currentSlider.top=b.pageY-f.top,this.mousePointer={left:b.pageX,top:b.pageY},a(document).on({"mousemove.colorpicker":a.proxy(this.mousemove,this),"mouseup.colorpicker":a.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(a){a.stopPropagation(),a.preventDefault();var b=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((a.pageX||this.mousePointer.left)-this.mousePointer.left))),c=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((a.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=b+"px",this.currentSlider.guide.top=c+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,b/100),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,c/100),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(b){return b.stopPropagation(),b.preventDefault(),a(document).off({"mousemove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup}),!1},keyup:function(a){if(38===a.keyCode)this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0);else if(40===a.keyCode)this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0);else{var c=this.input.val();this.color=new b(c),this.getValue(!1)!==!1&&(this.updateData(),this.updateComponent(),this.updatePicker())}this.element.trigger({type:"changeColor",color:this.color,value:c})}},a.colorpicker=d,a.fn.colorpicker=function(b){var c=arguments;return this.each(function(){var e=a(this),f=e.data("colorpicker"),g="object"==typeof b?b:{};f||"string"==typeof b?"string"==typeof b&&f[b].apply(f,Array.prototype.slice.call(c,1)):e.data("colorpicker",new d(this,g))})},a.fn.colorpicker.constructor=d});
1990
1991/** Appear
1992	https://github.com/bas2k/jquery.appear/
1993 **************************************************************** **/
1994(function(a){a.fn.appear=function(d,b){var c=a.extend({data:undefined,one:true,accX:0,accY:0},b);return this.each(function(){var g=a(this);g.appeared=false;if(!d){g.trigger("appear",c.data);return}var f=a(window);var e=function(){if(!g.is(":visible")){g.appeared=false;return}var r=f.scrollLeft();var q=f.scrollTop();var l=g.offset();var s=l.left;var p=l.top;var i=c.accX;var t=c.accY;var k=g.height();var j=f.height();var n=g.width();var m=f.width();if(p+k+t>=q&&p<=q+j+t&&s+n+i>=r&&s<=r+m+i){if(!g.appeared){g.trigger("appear",c.data)}}else{g.appeared=false}};var h=function(){g.appeared=true;if(c.one){f.unbind("scroll",e);var j=a.inArray(e,a.fn.appear.checks);if(j>=0){a.fn.appear.checks.splice(j,1)}}d.apply(this,arguments)};if(c.one){g.one("appear",c.data,h)}else{g.bind("appear",c.data,h)}f.scroll(e);a.fn.appear.checks.push(e);(e)()})};a.extend(a.fn.appear,{checks:[],timeout:null,checkAll:function(){var b=a.fn.appear.checks.length;if(b>0){while(b--){(a.fn.appear.checks[b])()}}},run:function(){if(a.fn.appear.timeout){clearTimeout(a.fn.appear.timeout)}a.fn.appear.timeout=setTimeout(a.fn.appear.checkAll,20)}});
vendor: 4,890 bytes, lines 1994-2010
1994a.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(c,d){var b=a.fn[d];if(b){a.fn[d]=function(){var e=b.apply(this,arguments);a.fn.appear.run();return e}}})})(jQuery);
1995
1996
1997/** Parallax
1998	http://www.ianlunn.co.uk/plugins/jquery-parallax/
1999 **************************************************************** **/
2000(function(a){var b=a(window);var c=b.height();b.resize(function(){c=b.height()});a.fn.parallax=function(e,d,g){var i=a(this);var j;var h;var f=0;function k(){i.each(function(){h=i.offset().top});if(g){j=function(m){return m.outerHeight(true)}}else{j=function(m){return m.height()}}if(arguments.length<1||e===null){e="50%"}if(arguments.length<2||d===null){d=0.5}if(arguments.length<3||g===null){g=true}var l=b.scrollTop();i.each(function(){var n=a(this);var o=n.offset().top;var m=j(n);if(o+m<l||o>l+c){return}i.css("backgroundPosition",e+" "+Math.round((h-l)*d)+"px")})}b.bind("scroll",k).resize(k);k()}})(jQuery);
2001
2002
2003/** jQuery Easing v1.3
2004	http://gsgd.co.uk/sandbox/jquery/easing/
2005 **************************************************************** **/
2006jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
2007
2008/** Backstretch v2.0.4
2009	http://srobbin.com/jquery-plugins/backstretch/
2010 **************************************************************** **/
2011(function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHeight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window);

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.