PageSourceSearch

http://bayalagbuteegch.mn/js/main.js

js bayalagbuteegch.mn collected 2026-10-04 13:29:08 UTC 49,160 bytes, 1,524 lines download raw bytes

1
2
3/*$.when(
4    $.getScript( "javascripts/easing.js" ),
5    $.getScript( "javascripts/portBox.slimscroll.min.js" ),
6    $.Deferred(function( deferred ){
7        $( deferred.resolve );
8    })
9).done(function(){
10    
11    //place your code here, the scripts are all loaded
12    if (typeof jQuery.ui !== 'undefined') console.log('jQuery UI is loaded');
13    if (typeof swfobject !== 'undefined') console.log('swfObject is loaded');
14    
15});*/
16
17/*$(function(){
18    "use strict";
19    $('.minimal-checkbox-2 input').iCheck({
20		
21		checkboxClass: 'icheckbox_minimal-green',
22		radioClass: 'iradio_minimal-green',
23		increaseArea: '20%' // optional
24		
25    });
26});*/
27
28
29
30
31$(function (){
32	var current = jQuery(".server-sent li a:first");
33	jQuery(".server-sent li").click(function(e){
34		 e.preventDefault();
35		 $(".number-box").fadeIn(500).addClass('get-in');
36		
37		current = $(this);
38		var value = current.text();
39			
40		current.change(function () {
41			var str = "";
42			current.each(function() {
43			  str += $( this ).text() + " ";
44			});
45			$(".number-get").text( str );
46		  })
47		  .change();
48		});
49	
50	
51	})
52
53
54
55$(function() {
56
57			/*var $this = this,
58				previewParClosedHeight = 25;
59
60			$("section.toggle.active > p").addClass("preview-active");
61			$("section.toggle.active > div.toggle-content").slideDown(350, function() {});
62
63			$("section.toggle > label").click(function(e) {
64
65				var parentSection = $(this).parent(),
66					parentWrapper = $(this).parents("div.toogle"),
67					previewPar = false,
68					isAccordion = parentWrapper.hasClass("toogle-accordion");
69
70				if(isAccordion && typeof(e.originalEvent) != "undefined") {
71					parentWrapper.find("section.toggle.active > label").trigger("click");
72				}
73
74				parentSection.toggleClass("active");
75
76				// Preview Paragraph
77				if(parentSection.find("> p").get(0)) {
78
79					previewPar = parentSection.find("> p");
80					var previewParCurrentHeight = previewPar.css("height");
81					previewPar.css("height", "auto");
82					var previewParAnimateHeight = previewPar.css("height");
83					previewPar.css("height", previewParCurrentHeight);
84
85				}
86
87				// Content
88				var toggleContent = parentSection.find("> div.toggle-content");
89
90				if(parentSection.hasClass("active")) {
91
92					$(previewPar).animate({
93						height: previewParAnimateHeight
94					}, 350, function() {
95						$(this).addClass("preview-active");
96					});
97
98					toggleContent.slideDown(350, function() {});
99
100				} else {
101
102					$(previewPar).animate({
103						height: previewParClosedHeight
104					}, 350, function() {
105						$(this).removeClass("preview-active");
106					});
107
108					toggleContent.slideUp(350, function() {});
109
110				}
111
112			});*/
113
114		})
115
116$(function(e){  
117
118	   <!--var first = $('.portfolioFilter a:first').attr('data-filter');-->
119	   $('.portfolioFilter a:first').addClass('active');
120	   var $container = $('.portfolioContainer');
121	  
122	  $container.imagesLoaded(function() {
123
124
125	   $container.isotope({
126		    
127            filter: '*',
128            animationOptions: {
129                duration: 750,
130               
131                queue: true,
132				
133            }
134         });
135		
136		});
137	   
138
139
140    $('.portfolioFilter a').click(function(){
141		var $container = $('.portfolioContainer');
142        $('.portfolioFilter .active').removeClass('active');
143        $(this).addClass('active');
144
145        var selector = $(this).attr('data-filter');
146        $container.isotope({
147            filter: selector,
148            animationOptions: {
149                duration: 750,
150               
151                queue: false
152            }
153         });
154         return false;
155    }); 
156	
157	
158	
159});
160
161
162/* =========================================================
163***********************Background animate ******************
164
165
166.big-itemm{height:556px;}
167.small-height{height:273px;}
168.long-height{height:273px;}
169
170==========================================================*/
171$(document).ready(function() {
172	
173	
174	/*var $window = $(window)
175    var $body   = $(document.body)
176
177    var navHeight = $('.navbar').outerHeight(true) + 10
178
179    $body.scrollspy({
180      target: '.bs-sidebar',
181      offset: navHeight
182    })
183
184    $window.on('load', function () {
185      $body.scrollspy('refresh')
186    })
187
188    $('.bs-docs-container [href=#]').click(function (e) {
189      e.preventDefault()
190    })
191
192    // back to top
193    setTimeout(function () {
194      var $sideBar = $('.bs-sidebar')
195
196      $sideBar.affix({
197        offset: {
198          top: function () {
199            var offsetTop      = $sideBar.offset().top
200            var sideBarMargin  = parseInt($sideBar.children(0).css('margin-top'), 10)
201            var navOuterHeight = $('.bs-docs-nav').height()
202
203            return (this.top = offsetTop - navOuterHeight - sideBarMargin)
204          }
205        , bottom: function () {
206            return (this.bottom = $('.bs-footer').outerHeight(true))
207          }
208        }
209      })
210    }, 100)
211
212    setTimeout(function () {
213      $('.bs-top').affix()
214    }, 100)*/
215	
216		
217	
218	 $('.slide-height').each(function(){
219        $(this).height($('.slide-img').height());
220    });
221	// Search
222  $("#searchopen").click(function(){
223      $('#search').stop(true, true).slideDown(500);
224      $('#searchclose span').stop(true, true).fadeIn(500);
225      $('#searchopen span').stop(true, true).fadeOut(500);
226      $('#search input[type=text]').select();
227  });
228  
229  $("#featured, #portfolio_featured, .content, #searchclose span").click(function(){
230      $('#search').stop(true, true).slideUp(500);
231      $('#searchclose span').stop(true, true).fadeOut(500);
232      $('#searchopen span').stop(true, true).fadeIn(500);
233  });
234	
235	
236	//itemWidth = $(this);
237	 $('.service-item').each(function(){
238        $(this).height($(this).width());
239    });
240	$('.service-long-item').each(function(){
241        $(this).height($(this).width() / 2 - 5);
242    });
243	
244    
245	/*$('.big-itemm').css('height', '556px');
246  $('.small-height').css('height', '273px');
247  $('.long-height').css('height', '273px');*/
248
249   $('.big-itemm').each(function(){
250        $(this).height(330);
251    });
252	
253	$('.big-p-itemm').each(function(){
254        $(this).height($(this).width() + 164);
255    });
256	$('.small-h-itemm').each(function(){
257        $(this).height($(this).width()-144, function(){
258			$(this).animate({overflow: hidden});
259			
260			});
261    });
262	
263	
264	$('.small-uram-itemm').each(function(){
265        $(this).height($(this).width()+50, function(){
266			$(this).animate({overflow: hidden});
267			
268			});
269    });
270	
271	
272   $('.itemm').addClass('fl-none');
273	/*var newWidth = $(this);
274	$('.big-itemm').delay(100).animate({height: newWidth}, 100);
275	var sliderHeight = $('.slider').height();
276	var loginheight = sliderHeight;
277	$('.login-height').delay(100).animate({height: loginheight}, 100);*/
278
279});
280
281
282var scrollSpeed = 50;
283// set the default position
284var current = 1;
285// set the direction, direction can be either "v", "h" (vertical or horizontal)
286var direction = 'h';
287var scrollBg = function(){
288    // 1 pixel row at a time, change to -1 for other direction
289    current -= 1;
290    // set div
291    jQuery('#content5').css("backgroundPosition", (direction == 'h') ? current+"px 0" : "0 " + current+"px");
292}
293setInterval(scrollBg, scrollSpeed);
294
295/*
296# =============================================================================
297#   Sparkline Linechart JS
298# =============================================================================
299*/
300$(window).resize(function() {
301    $('.big-itemm').each(function(){
302        $(this).height(330);
303    });
304
305 $('.slide-height').each(function(){
306        $(this).height($('.slide-img').height());
307    });
308
309 	if($(window).width() < 768 || $(window).width() < 350 || $(window).width() < 550){
310  $('.slide-height').each(function(){
311        $(this).height($('.slide-img').height());
312    });
313	//$('.itemm').removeClass('col-xs-6');
314	//$('.itemm').addClass('col-xs-12');
315
316	/*$new_width = $('.small-height').width();
317	$('.small-height').height($new_width);*/
318	
319	$('.content-slide').addClass('padding-del');
320	$('.mobile-service').removeClass('padd-del');
321	
322	/*var divNw = 150; 
323	$('.play-proccess').delay(100).animate({width: divNw}, 500);
324 	$('.rightframe').addClass('full');
325	frame.animate({"right": '-100%'},{queue:false,duration:1000});*/
326 	}else{
327		$('.content-slide').removeClass('padding-del');
328		$('.mobile-service').addClass('padd-del');
329		/*$('#content').show();	
330	    $('#baraa').show();
331 		$('.rightframe').removeClass('full');
332 		$('#portfolio').find('.rightframe').addClass('full');*/
333 	}
334
335});
336
337
338
339
340
341(function() {
342  var linechartResize;
343
344  linechartResize = function() {
345    $("#linechart-1").sparkline([160, 240, 120, 200, 180, 350, 230, 200, 280, 380, 400, 360, 300, 220, 200, 150, 40, 70, 180, 110, 200, 160, 200, 220], {
346      type: "line",
347      width: "100%",
348      height: "226",
349      lineColor: "#a5e1ff",
350      fillColor: "rgba(241, 251, 255, 0.9)",
351      lineWidth: 2,
352      spotColor: "#a5e1ff",
353      minSpotColor: "#bee3f6",
354      maxSpotColor: "#a5e1ff",
355      highlightSpotColor: "#80cff4",
356      highlightLineColor: "#cccccc",
357      spotRadius: 6,
358      chartRangeMin: 0
359    });
360    $("#linechart-1").sparkline([100, 280, 150, 180, 220, 180, 130, 180, 180, 280, 260, 260, 200, 120, 200, 150, 100, 100, 180, 180, 200, 160, 180, 120], {
361      type: "line",
362      width: "100%",
363      height: "226",
364      lineColor: "#cfee74",
365      fillColor: "rgba(244, 252, 225, 0.5)",
366      lineWidth: 2,
367      spotColor: "#b9e72a",
368      minSpotColor: "#bfe646",
369      maxSpotColor: "#b9e72a",
370      highlightSpotColor: "#b9e72a",
371      highlightLineColor: "#cccccc",
372      spotRadius: 6,
373      chartRangeMin: 0,
374      composite: true
375    });
376    $("#linechart-2").sparkline([160, 240, 250, 280, 300, 250, 230, 200, 280, 380, 400, 360, 300, 220, 200, 150, 100, 100, 180, 180, 200, 160, 220, 140], {
377      type: "line",
378      width: "100%",
379      height: "226",
380      lineColor: "#a5e1ff",
381      fillColor: "rgba(241, 251, 255, 0.9)",
382      lineWidth: 2,
383      spotColor: "#a5e1ff",
384      minSpotColor: "#bee3f6",
385      maxSpotColor: "#a5e1ff",
386      highlightSpotColor: "#80cff4",
387      highlightLineColor: "#cccccc",
388      spotRadius: 6,
389      chartRangeMin: 0
390    });
391    $("#linechart-3").sparkline([100, 280, 150, 180, 220, 180, 130, 180, 180, 280, 260, 260, 200, 120, 200, 150, 100, 100, 180, 180, 200, 160, 220, 140], {
392      type: "line",
393      width: "100%",
394      height: "226",
395      lineColor: "#cfee74",
396      fillColor: "rgba(244, 252, 225, 0.5)",
397      lineWidth: 2,
398      spotColor: "#b9e72a",
399      minSpotColor: "#bfe646",
400      maxSpotColor: "#b9e72a",
401      highlightSpotColor: "#b9e72a",
402      highlightLineColor: "#cccccc",
403      spotRadius: 6,
404      chartRangeMin: 0
405    });
406    $("#linechart-4").sparkline([100, 220, 150, 140, 200, 180, 130, 180, 180, 210, 240, 200, 170, 120, 200, 150, 100, 100], {
407      type: "line",
408      width: "100",
409      height: "30",
410      lineColor: "#adadad",
411      fillColor: "rgba(244, 252, 225, 0.0)",
412      lineWidth: 2,
413      spotColor: "#909090",
414      minSpotColor: "#909090",
415      maxSpotColor: "#909090",
416      highlightSpotColor: "#666",
417      highlightLineColor: "#666",
418      spotRadius: 0,
419      chartRangeMin: 0
420    });
421    $("#linechart-5").sparkline([100, 220, 150, 140, 200, 180, 130, 180, 180, 210, 240, 200, 170, 120, 200, 150, 100, 100], {
422      type: "line",
423      width: "100",
424      height: "30",
425      lineColor: "#adadad",
426      fillColor: "rgba(244, 252, 225, 0.0)",
427      lineWidth: 2,
428      spotColor: "#909090",
429      minSpotColor: "#909090",
430      maxSpotColor: "#909090",
431      highlightSpotColor: "#666",
432      highlightLineColor: "#666",
433      spotRadius: 0,
434      chartRangeMin: 0
435    });
436    $("#barchart-2").sparkline([160, 220, 260, 120, 320, 260, 300, 160, 240, 100, 240, 120], {
437      type: "bar",
438      height: "226",
439      barSpacing: 8,
440      barWidth: 18,
441      barColor: "#8fdbda"
442    });
443    $("#composite-chart-1").sparkline([160, 220, 260, 120, 320, 260, 300, 160, 240, 100, 240, 120], {
444      type: "bar",
445      height: "226",
446      barSpacing: 8,
447      barWidth: 18,
448      barColor: "#8fdbda"
449    });
450    return $("#composite-chart-1").sparkline([100, 280, 150, 180, 220, 180, 130, 180, 180, 280, 260, 260], {
451      type: "line",
452      width: "100%",
453      height: "226",
454      lineColor: "#cfee74",
455      fillColor: "rgba(244, 252, 225, 0.5)",
456      lineWidth: 2,
457      spotColor: "#b9e72a",
458      minSpotColor: "#bfe646",
459      maxSpotColor: "#b9e72a",
460      highlightSpotColor: "#b9e72a",
461      highlightLineColor: "#cccccc",
462      spotRadius: 6,
463      chartRangeMin: 0,
464      composite: true
465    });
466  };
467
468  $(document).ready(function() {
469    /*
470    # =============================================================================
471    #   Sparkline Linechart JS
472    # =============================================================================
473    */
474
475    var $alpha, $container, $container2, addEvent, buildMorris, checkin, checkout, d, date, handleDropdown, initDrag, m, now, nowTemp, timelineAnimate, y;
476    $("#barcharts").sparkline([190, 220, 210, 220, 220, 260, 300, 220, 240, 240, 220, 200, 240, 260, 210], {
477      type: "bar",
478      height: "100",
479      barSpacing: 4,
480      barWidth: 13,
481      barColor: "#cbcbcb",
482      highlightColor: "#89D1E6"
483    });
484    $("#pie-chart").sparkline([2, 8, 6, 10], {
485      type: "pie",
486      height: "220",
487      width: "220",
488      offset: "+90",
489      sliceColors: ["#a0eeed", "#81e970", "#f5af50", "#f46f50"]
490    });
491    $(".sparkslim").sparkline('html', {
492      type: "line",
493      width: "100",
494      height: "30",
495      lineColor: "#adadad",
496      fillColor: "rgba(244, 252, 225, 0.0)",
497      lineWidth: 2,
498      spotColor: "#909090",
499      minSpotColor: "#909090",
500      maxSpotColor: "#909090",
501      highlightSpotColor: "#666",
502      highlightLineColor: "#666",
503      spotRadius: 0,
504      chartRangeMin: 0
505    });
506    /*
507    # =============================================================================
508    #   Easy Pie Chart
509    # =============================================================================
510    */
511
512    $(".pie-chart1").easyPieChart({
513      size: 200,
514      lineWidth: 12,
515      lineCap: "square",
516      barColor: "#81e970",
517      animate: 800,
518      scaleColor: false
519    });
520    $(".pie-chart2").easyPieChart({
521      size: 200,
522      lineWidth: 12,
523      lineCap: "square",
524      barColor: "#f46f50",
525      animate: 800,
526      scaleColor: false
527    });
528    $(".pie-chart3").easyPieChart({
529      size: 200,
530      lineWidth: 12,
531      lineCap: "square",
532      barColor: "#fab43b",
533      animate: 800,
534      scaleColor: false
535    });
536    /*
537    # =============================================================================
538    #   Navbar scroll animation
539    # =============================================================================
540    */
541
542    $(".navbar.scroll-hide").mouseover(function() {
543      $(".navbar.scroll-hide").removeClass("closed");
544      return setTimeout((function() {
545        return $(".navbar.scroll-hide").css({
546          overflow: "visible"
547        });
548      }), 150);
549    });
550    $(function() {
551      var delta, lastScrollTop;
552      lastScrollTop = 0;
553      delta = 150;
554      return $(window).scroll(function(event) {
555        var st;
556        st = $(this).scrollTop();
557        if (Math.abs(lastScrollTop - st) <= delta) {
558          return;
559        }
560        if (st > lastScrollTop) {
561          $('.navbar.scroll-hide').addClass("closed");
562        } else {
563          $('.navbar.scroll-hide').removeClass("closed");
564        }
565        return lastScrollTop = st;
566      });
567    });
568    /*var lastScroll = 0;
569    var scrollUpStart = 0;
570    $(window).on('scroll',function() {
571
572    var scroll = $(window).scrollTop();
573    if(scroll === 0){
574        // we are at the top
575        $(".navbar.scroll-hide").removeClass("closed");
576    } else if(lastScroll > scroll) {
577        // we are scrolling up
578
579        // we check if we have started scrolling up already
580        if (scrollUpStart < scroll) {
581            // if we just started scrolling up, we set 
582            // the scrollUpStart to the current scroll value
583            scrollUpStart = scroll;
584        }
585
586        // if we continue scrolling up, the difference between 
587        // scrollUpStart and scroll will eventually reach a 100px
588        if (scrollUpStart - scroll > 100) {
589            $(".navbar.scroll-hide").addClass("closed");
590        }
591
592    } else {
593        // we are scrolling down
594        // reset scrollUpStart
595        scrollUpStart = 0;
596        $(".navbar.scroll-hide").removeClass("closed");
597    }
598    lastScroll = scroll;
599    });*/
600    /*
601    # =============================================================================
602    #   Mobile Nav
603    # =============================================================================
604    */
605
606    $('.navbar-toggle').click(function() {
607      return $('body, html').toggleClass("nav-open");
608    });
609    /*
610    # =============================================================================
611    #   Sparkline Resize Script
612    # =============================================================================
613    */
614
615    linechartResize();
616    $(window).resize(function() {
617      return linechartResize();
618    });
619    /*
620    # =============================================================================
621    #   Form wizard
622    # =============================================================================
623    */
624
625    $("#wizard").bootstrapWizard({
626      nextSelector: ".btn-next",
627      previousSelector: ".btn-previous",
628      onNext: function(tab, navigation, index) {
629        var $current, $percent, $total;
630        if (index === 1) {
631          if (!$("#name").val()) {
632            $("#name").focus();
633            $("#name").addClass("has-error");
634            return false;
635          }
636        }
637        $total = navigation.find("li").length;
638        $current = index + 1;
639        $percent = ($current / $total) * 100;
640        return $("#wizard").find(".progress-bar").css("width", $percent + "%");
641      },
642      onPrevious: function(tab, navigation, index) {
643        var $current, $percent, $total;
644        $total = navigation.find("li").length;
645        $current = index + 1;
646        $percent = ($current / $total) * 100;
647        return $("#wizard").find(".progress-bar").css("width", $percent + "%");
648      },
649      onTabShow: function(tab, navigation, index) {
650        var $current, $percent, $total;
651        $total = navigation.find("li").length;
652        $current = index + 1;
653        $percent = ($current / $total) * 100;
654        return $("#wizard").find(".progress-bar").css("width", $percent + "%");
655      }
656    });
657    /*
658    # =============================================================================
659    #   DataTables
660    # =============================================================================
661    */
662
663    $("#dataTable1").dataTable({
664      "sPaginationType": "full_numbers",
665      aoColumnDefs: [
666        {
667          bSortable: false,
668          aTargets: [0, -1]
669        }
670      ]
671    });
672    $('.table').each(function() {
673      return $(".table #checkAll").click(function() {
674        if ($(".table #checkAll").is(":checked")) {
675          return $(".table input[type=checkbox]").each(function() {
676            return $(this).prop("checked", true);
677          });
678        } else {
679          return $(".table input[type=checkbox]").each(function() {
680            return $(this).prop("checked", false);
681          });
682        }
683      });
684    });
685    /*
686    # =============================================================================
687    #   jQuery UI Sliders
688    # =============================================================================
689    */
690
691    $(".slider-basic").slider({
692      range: "min",
693      value: 50,
694      slide: function(event, ui) {
695        return $(".slider-basic-amount").html("$" + ui.value);
696      }
697    });
698    $(".slider-basic-amount").html("$" + $(".slider-basic").slider("value"));
699    $(".slider-increments").slider({
700      range: "min",
701      value: 30,
702      step: 10,
703      slide: function(event, ui) {
704        return $(".slider-increments-amount").html("$" + ui.value);
705      }
706    });
707    $(".slider-increments-amount").html("$" + $(".slider-increments").slider("value"));
708    $(".slider-range").slider({
709      range: true,
710      values: [15, 70],
711      slide: function(event, ui) {
712        return $(".slider-range-amount").html("$" + ui.values[0] + " - $" + ui.values[1]);
713      }
714    });
715    $(".slider-range-amount").html("$" + $(".slider-range").slider("values", 0) + " - $" + $(".slider-range").slider("values", 1));
716    /*
717    # =============================================================================
718    #   Bootstrap Tabs
719    # =============================================================================
720    */
721
722    /*$("#myTab a:last").tab("show");*/
723    /*
724    # =============================================================================
725    #   Bootstrap Popover
726    # =============================================================================
727    */
728
729    $("#popover").popover();
730    $("#popover-left").popover({
731      placement: "left"
732    });
733    $("#popover-top").popover({
734      placement: "top"
735    });
736    $("#popover-right").popover({
737      placement: "right"
738    });
739    $("#popover-bottom").popover({
740      placement: "bottom"
741    });
742    /*
743    # =============================================================================
744    #   Bootstrap Tooltip
745    # =============================================================================
746    */
747
748    $("#tooltip").tooltip();
749    $("#tooltip-left").tooltip({
750      placement: "left"
751    });
752    $(".tooltip-top").tooltip({
753      placement: "top"
754    });
755    $("#tooltip-right").tooltip({
756      placement: "right"
757    });
758    $("#tooltip-bottom").tooltip({
759      placement: "bottom"
760    });
761    /*
762    # =============================================================================
763    #   jQuery VMap
764    # =============================================================================
765    */
766
767    if ($("#vmap").length) {
768      $("#vmap").vectorMap({
769        map: "world_en",
770        backgroundColor: null,
771        color: "#fff",
772        hoverOpacity: 0.2,
773        selectedColor: "#fff",
774        enableZoom: true,
775        showTooltip: true,
776        values: sample_data,
777        scaleColors: ["#59cdfe", "#0079fe"],
778        normalizeFunction: "polynomial"
779      });
780    }
781    /*
782    # =============================================================================
783    #   Full Calendar
784    # =============================================================================
785    */
786
787    date = new Date();
788    d = date.getDate();
789    m = date.getMonth();
790    y = date.getFullYear();
791    initDrag = function(el) {
792      /*
793      # create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
794      # it doesn't need to have a start or end
795      */
796
797      var eventObject;
798      eventObject = {
799        title: $.trim(el.text())
800      };
801      /*
802      # store the Event Object in the DOM element so we can get to it later
803      */
804
805      el.data("eventObject", eventObject);
806      /*
807      # make the event draggable using jQuery UI
808      */
809
810      return el.draggable({
811        zIndex: 999,
812        revert: true,
813        revertDuration: 0
814      });
815    };
816    addEvent = function(title, priority) {
817      var html;
818      title = (title.length === 0 ? "Untitled Event" : title);
819      priority = (priority.length === 0 ? "default" : priority);
820      html = $("<div data-class=\"label label-" + priority + "\" class=\"external-event label label-" + priority + "\">" + title + "</div>");
821      jQuery("#event_box").append(html);
822      return initDrag(html);
823    };
824    $("#external-events div.external-event").each(function() {
825      return initDrag($(this));
826    });
827    $("#event_add").click(function() {
828      var priority, title;
829      title = $("#event_title").val();
830      priority = $("#event_priority").val();
831      return addEvent(title, priority);
832    });
833    /*
834    # modify chosen options
835    */
836
837    handleDropdown = function() {
838      $("#event_priority_chzn .chzn-search").hide();
839      $("#event_priority_chzn_o_1").html("<span class=\"label label-default\">" + $("#event_priority_chzn_o_1").text() + "</span>");
840      $("#event_priority_chzn_o_2").html("<span class=\"label label-success\">" + $("#event_priority_chzn_o_2").text() + "</span>");
841      $("#event_priority_chzn_o_3").html("<span class=\"label label-info\">" + $("#event_priority_chzn_o_3").text() + "</span>");
842      $("#event_priority_chzn_o_4").html("<span class=\"label label-warning\">" + $("#event_priority_chzn_o_4").text() + "</span>");
843      return $("#event_priority_chzn_o_5").html("<span class=\"label label-important\">" + $("#event_priority_chzn_o_5").text() + "</span>");
844    };
845    $("#event_priority_chzn").click(handleDropdown);
846    /*
847    # predefined events
848    */
849
850    addEvent("My Event 1", "primary");
851    addEvent("My Event 2", "success");
852    addEvent("My Event 3", "info");
853    addEvent("My Event 4", "warning");
854    addEvent("My Event 5", "danger");
855    addEvent("My Event 6", "default");
856    $("#calendar").fullCalendar({
857      header: {
858        left: "prev,next today",
859        center: "title",
860        right: "month,agendaWeek,agendaDay"
861      },
862      editable: true,
863      droppable: true,
864      drop: function(date, allDay) {
865        /*
866        # retrieve the dropped element's stored Event Object
867        */
868
869        var copiedEventObject, originalEventObject;
870        originalEventObject = $(this).data("eventObject");
871        /*
872        # we need to copy it, so that multiple events don't have a reference to the same object
873        */
874
875        copiedEventObject = $.extend({}, originalEventObject);
876        /*
877        # assign it the date that was reported
878        */
879
880        copiedEventObject.start = date;
881        copiedEventObject.allDay = allDay;
882        copiedEventObject.className = $(this).attr("data-class");
883        /*
884        # render the event on the calendar
885        # the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
886        */
887
888        $("#calendar").fullCalendar("renderEvent", copiedEventObject, true);
889        /*
890        # is the "remove after drop" checkbox checked?
891        # if so, remove the element from the "Draggable Events" list
892        */
893
894        if ($("#drop-remove").is(":checked")) {
895          return $(this).remove();
896        }
897      },
898      events: [
899        {
900          title: "All Day Event",
901          start: new Date(y, m, 1),
902          className: "label label-default"
903        }, {
904          title: "Long Event",
905          start: new Date(y, m, d - 5),
906          end: new Date(y, m, d - 2),
907          className: "label label-success"
908        }, {
909          id: 999,
910          title: "Repeating Event",
911          start: new Date(y, m, d - 3, 16, 0),
912          allDay: false,
913          className: "label label-default"
914        }, {
915          id: 999,
916          title: "Repeating Event",
917          start: new Date(y, m, d + 4, 16, 0),
918          allDay: false,
919          className: "label label-important"
920        }, {
921          title: "Meeting",
922          start: new Date(y, m, d, 10, 30),
923          allDay: false,
924          className: "label label-info"
925        }, {
926          title: "Lunch",
927          start: new Date(y, m, d, 12, 0),
928          end: new Date(y, m, d, 14, 0),
929          allDay: false,
930          className: "label label-warning"
931        }, {
932          title: "Birthday Party",
933          start: new Date(y, m, d + 1, 19, 0),
934          end: new Date(y, m, d + 1, 22, 30),
935          allDay: false,
936          className: "label label-success"
937        }, {
938          title: "Click for Google",
939          start: new Date(y, m, 28),
940          end: new Date(y, m, 29),
941          url: "http://google.com/",
942          className: "label label-warning"
943        }
944      ]
945    });
946    /*
947    # =============================================================================
948    #   Isotope
949    # =============================================================================
950    */
951
952    $container = $(".gallery-container");
953    $container.isotope({});
954    $(".gallery-filters a").click(function() {
955      var selector;
956      selector = $(this).attr("data-filter");
957      $(".gallery-filters a.selected").removeClass("selected");
958      $(this).addClass("selected");
959      $container.isotope({
960        filter: selector
961      });
962      return false;
963    });
964    /*
965    # =============================================================================
966    #   Popover JS
967    # =============================================================================
968    */
969
970    $('#popover').popover();
971    /*
972    # =============================================================================
973    #   Fancybox Modal
974    # =============================================================================
975    */
976
977    $(".fancybox").fancybox({
978      maxWidth: 700,
979      height: 'auto',
980      fitToView: false,
981      autoSize: true,
982      padding: 15,
983      nextEffect: 'fade',
984      prevEffect: 'fade',
985      helpers: {
986        title: {
987          type: "outside"
988        }
989      }
990    });
991
992    $("a[rel=group]").fancybox({
993      'transitionIn'    : 'none',
994      'transitionOut'   : 'none',
995      'titlePosition'   : 'over',
996      'titleFormat'   : function(title, currentArray, currentIndex, currentOpts) {
997        return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
998      }
999    });  
1000    /*
1001    # =============================================================================
1002    #   Morris Chart JS
1003    # =============================================================================
1004    */
1005
1006    $(window).resize(function(e) {
1007      var morrisResize;
1008      clearTimeout(morrisResize);
1009      return morrisResize = setTimeout(function() {
1010        return buildMorris(true);
1011      }, 500);
1012    });
1013    $(function() {
1014      return buildMorris();
1015    });
1016    buildMorris = function($re) {
1017      var tax_data;
1018      if ($re) {
1019        $(".graph").html("");
1020      }
1021      tax_data = [
1022        {
1023          period: "2011 Q3",
1024          licensed: 3407,
1025          sorned: 660
1026        }, {
1027          period: "2011 Q2",
1028          licensed: 3351,
1029          sorned: 629
1030        }, {
1031          period: "2011 Q1",
1032          licensed: 3269,
1033          sorned: 618
1034        }, {
1035          period: "2010 Q4",
1036          licensed: 3246,
1037          sorned: 661
1038        }, {
1039          period: "2009 Q4",
1040          licensed: 3171,
1041          sorned: 676
1042        }, {
1043          period: "2008 Q4",
1044          licensed: 3155,
1045          sorned: 681
1046        }, {
1047          period: "2007 Q4",
1048          licensed: 3226,
1049          sorned: 620
1050        }, {
1051          period: "2006 Q4",
1052          licensed: 3245,
1053          sorned: null
1054        }, {
1055          period: "2005 Q4",
1056          licensed: 3289,
1057          sorned: null
1058        }
1059      ];
1060      if ($('#hero-graph').length) {
1061        Morris.Line({
1062          element: "hero-graph",
1063          data: tax_data,
1064          xkey: "period",
1065          ykeys: ["licensed", "sorned"],
1066          labels: ["Licensed", "Off the road"],
1067          lineColors: ["#5bc0de", "#60c560"]
1068        });
1069      }
1070      if ($('#hero-donut').length) {
1071        Morris.Donut({
1072          element: "hero-donut",
1073          data: [
1074            {
1075              label: "Development",
1076              value: 25
1077            }, {
1078              label: "Sales & Marketing",
1079              value: 40
1080            }, {
1081              label: "User Experience",
1082              value: 25
1083            }, {
1084              label: "Human Resources",
1085              value: 10
1086            }
1087          ],
1088          colors: ["#f0ad4e"],
1089          formatter: function(y) {
1090            return y + "%";
1091          }
1092        });
1093      }
1094      if ($('#hero-area').length) {
1095        Morris.Area({
1096          element: "hero-area",
1097          data: [
1098            {
1099              period: "2010 Q1",
1100              iphone: 2666,
1101              ipad: null,
1102              itouch: 2647
1103            }, {
1104              period: "2010 Q2",
1105              iphone: 2778,
1106              ipad: 2294,
1107              itouch: 2441
1108            }, {
1109              period: "2010 Q3",
1110              iphone: 4912,
1111              ipad: 1969,
1112              itouch: 2501
1113            }, {
1114              period: "2010 Q4",
1115              iphone: 3767,
1116              ipad: 3597,
1117              itouch: 5689
1118            }, {
1119              period: "2011 Q1",
1120              iphone: 6810,
1121              ipad: 1914,
1122              itouch: 2293
1123            }, {
1124              period: "2011 Q2",
1125              iphone: 5670,
1126              ipad: 4293,
1127              itouch: 1881
1128            }, {
1129              period: "2011 Q3",
1130              iphone: 4820,
1131              ipad: 3795,
1132              itouch: 1588
1133            }, {
1134              period: "2011 Q4",
1135              iphone: 15073,
1136              ipad: 5967,
1137              itouch: 5175
1138            }, {
1139              period: "2012 Q1",
1140              iphone: 10687,
1141              ipad: 4460,
1142              itouch: 2028
1143            }, {
1144              period: "2012 Q2",
1145              iphone: 8432,
1146              ipad: 5713,
1147              itouch: 1791
1148            }
1149          ],
1150          xkey: "period",
1151          ykeys: ["iphone", "ipad", "itouch"],
1152          labels: ["iPhone", "iPad", "iPod Touch"],
1153          hideHover: "auto",
1154          lineWidth: 2,
1155          pointSize: 4,
1156          lineColors: ["#a0dcee", "#f1c88e", "#a0e2a0"],
1157          fillOpacity: 0.5,
1158          smooth: true
1159        });
1160      }
1161      if ($('#hero-bar').length) {
1162        return Morris.Bar({
1163          element: "hero-bar",
1164          data: [
1165            {
1166              device: "iPhone",
1167              geekbench: 136
1168            }, {
1169              device: "iPhone 3G",
1170              geekbench: 137
1171            }, {
1172              device: "iPhone 3GS",
1173              geekbench: 275
1174            }, {
1175              device: "iPhone 4",
1176              geekbench: 380
1177            }, {
1178              device: "iPhone 4S",
1179              geekbench: 655
1180            }, {
1181              device: "iPhone 5",
1182              geekbench: 1571
1183            }
1184          ],
1185          xkey: "device",
1186          ykeys: ["geekbench"],
1187          labels: ["Geekbench"],
1188          barRatio: 0.4,
1189          xLabelAngle: 35,
1190          hideHover: "auto",
1191          barColors: ["#5bc0de"]
1192        });
1193      }
1194    };
1195    /*
1196    # =============================================================================
1197    #   Select2
1198    # =============================================================================
1199    */
1200
1201    /*$('.select2able').select2();*/
1202    /*
1203    # =============================================================================
1204    #   Isotope with Masonry
1205    # =============================================================================
1206    */
1207
1208    $alpha = $('#hidden-items');
1209    $container2 = $('#social-container');
1210    $(window).load(function() {
1211      /*
1212      # init isotope, then insert all items from hidden alpha
1213      */
1214
1215      $container2.isotope({
1216        itemSelector: '.item'
1217      }).isotope('insert', $alpha.find('.item'));
1218      return $("#load-more").html("Load more").find("i").hide();
1219    });
1220    $('#load-more').click(function() {
1221      var item1, item2, item3, items, tmp;
1222      items = $container2.find('.social-entry');
1223      item1 = $(items[Math.floor(Math.random() * items.length)]).clone();
1224      item2 = $(items[Math.floor(Math.random() * items.length)]).clone();
1225      item3 = $(items[Math.floor(Math.random() * items.length)]).clone();
1226      tmp = $().add(item1).add(item2).add(item3);
1227      return $container2.isotope('insert', tmp);
1228    });
1229    /*
1230    # =============================================================================
1231    #   WYSIWYG Editor
1232    # =============================================================================
1233    */
1234
1235    if ($('#summernote').length) {
1236      $('#summernote').summernote({
1237        height: 300,
1238        focus: true,
1239        toolbar: [['style', ['style']], ['style', ['bold', 'italic', 'underline', 'clear']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']], ['insert', ['picture', 'link']], ['table', ['table']], ['fullscreen', ['fullscreen']]]
1240      });
1241    }
1242    /*
1243    # =============================================================================
1244    #   Typeahead
1245    # =============================================================================
1246    */
1247
1248    if ($('.typeahead').length) {
1249      $(".states.typeahead").typeahead({
1250        name: "states",
1251        local: ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Dakota", "North Carolina", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"]
1252      });
1253      $(".countries.typeahead").typeahead({
1254        name: "countries",
1255        local: ["Andorra", "United Arab Emirates", "Afghanistan", "Antigua and Barbuda", "Anguilla", "Albania", "Armenia", "Angola", "Antarctica", "Argentina", "American Samoa", "Austria", "Australia", "Aruba", "Åland", "Azerbaijan", "Bosnia and Herzegovina", "Barbados", "Bangladesh", "Belgium", "Burkina Faso", "Bulgaria", "Bahrain", "Burundi", "Benin", "Saint Barthélemy", "Bermuda", "Brunei", "Bolivia", "Bonaire", "Brazil", "Bahamas", "Bhutan", "Bouvet Island", "Botswana", "Belarus", "Belize", "Canada", "Cocos [Keeling] Islands", "Congo", "Central African Republic", "Republic of the Congo", "Switzerland", "Ivory Coast", "Cook Islands", "Chile", "Cameroon", "China", "Colombia", "Costa Rica", "Cuba", "Cape Verde", "Curacao", "Christmas Island", "Cyprus", "Czechia", "Germany", "Djibouti", "Denmark", "Dominica", "Dominican Republic", "Algeria", "Ecuador", "Estonia", "Egypt", "Western Sahara", "Eritrea", "Spain", "Ethiopia", "Finland", "Fiji", "Falkland Islands", "Micronesia", "Faroe Islands", "France", "Gabon", "United Kingdom", "Grenada", "Georgia", "French Guiana", "Guernsey", "Ghana", "Gibraltar", "Greenland", "Gambia", "Guinea", "Guadeloupe", "Equatorial Guinea", "Greece", "South Georgia and the South Sandwich Islands", "Guatemala", "Guam", "Guinea-Bissau", "Guyana", "Hong Kong", "Heard Island and McDonald Islands", "Honduras", "Croatia", "Haiti", "Hungary", "Indonesia", "Ireland", "Israel", "Isle of Man", "India", "British Indian Ocean Territory", "Iraq", "Iran", "Iceland", "Italy", "Jersey", "Jamaica", "Jordan", "Japan", "Kenya", "Kyrgyzstan", "Cambodia", "Kiribati", "Comoros", "Saint Kitts and Nevis", "North Korea", "South Korea", "Kuwait", "Cayman Islands", "Kazakhstan", "Laos", "Lebanon", "Saint Lucia", "Liechtenstein", "Sri Lanka", "Liberia", "Lesotho", "Lithuania", "Luxembourg", "L
1255atvia", "Libya", "Morocco", "Monaco", "Moldova", "Montenegro", "Saint Martin", "Madagascar", "Marshall Islands", "Macedonia", "Mali", "Myanmar [Burma]", "Mongolia", "Macao", "Northern Mariana Islands", "Martinique", "Mauritania", "Montserrat", "Malta", "Mauritius", "Maldives", "Malawi", "Mexico", "Malaysia", "Mozambique", "Namibia", "New Caledonia", "Niger", "Norfolk Island", "Nigeria", "Nicaragua", "Netherlands", "Norway", "Nepal", "Nauru", "Niue", "New Zealand", "Oman", "Panama", "Peru", "French Polynesia", "Papua New Guinea", "Philippines", "Pakistan", "Poland", "Saint Pierre and Miquelon", "Pitcairn Islands", "Puerto Rico", "Palestine", "Portugal", "Palau", "Paraguay", "Qatar", "Réunion", "Romania", "Serbia", "Russia", "Rwanda", "Saudi Arabia", "Solomon Islands", "Seychelles", "Sudan", "Sweden", "Singapore", "Saint Helena", "Slovenia", "Svalbard and Jan Mayen", "Slovakia", "Sierra Leone", "San Marino", "Senegal", "Somalia", "Suriname", "South Sudan", "São Tomé and Príncipe", "El Salvador", "Sint Maarten", "Syria", "Swaziland", "Turks and Caicos Islands", "Chad", "French Southern Territories", "Togo", "Thailand", "Tajikistan", "Tokelau", "East Timor", "Turkmenistan", "Tunisia", "Tonga", "Turkey", "Trinidad and Tobago", "Tuvalu", "Taiwan", "Tanzania", "Ukraine", "Uganda", "U.S. Minor Outlying Islands", "United States", "Uruguay", "Uzbekistan", "Vatican City", "Saint Vincent and the Grenadines", "Venezuela", "British Virgin Islands", "U.S. Virgin Islands", "Vietnam", "Vanuatu", "Wallis and Futuna", "Samoa", "Kosovo", "Yemen", "Mayotte", "South Africa", "Zambia", "Zimbabwe"]
1256      });
1257    }
1258    /*
1259    # =============================================================================
1260    #   Form Input Masks
1261    # =============================================================================
1262    */
1263
1264    $(":input").inputmask();
1265    /*
1266    # =============================================================================
1267    #   Validation
1268    # =============================================================================
1269    */
1270
1271    $("#validate-form").validate({
1272      rules: {
1273        firstname: "required",
1274        lastname: "required",
1275        username: {
1276          required: true,
1277          minlength: 2
1278        },
1279        password: {
1280          required: true,
1281          minlength: 5
1282        },
1283        confirm_password: {
1284          required: true,
1285          minlength: 5,
1286          equalTo: "#password"
1287        },
1288        email: {
1289          required: true,
1290          email: true
1291        }
1292      },
1293      messages: {
1294        firstname: "Please enter your first name",
1295        lastname: "Please enter your last name",
1296        username: {
1297          required: "Please enter a username",
1298          minlength: "Your username must consist of at least 2 characters"
1299        },
1300        password: {
1301          required: "Please provide a password",
1302          minlength: "Your password must be at least 5 characters long"
1303        },
1304        confirm_password: {
1305          required: "Please provide a password",
1306          minlength: "Your password must be at least 5 characters long",
1307          equalTo: "Please enter the same password"
1308        },
1309        email: "Please enter a valid email address"
1310      }
1311    });
1312    /*
1313    # =============================================================================
1314    #   Drag and drop files
1315    # =============================================================================
1316    */
1317
1318    $(".single-file-drop").each(function() {
1319      var $dropbox;
1320      $dropbox = $(this);
1321      if (typeof window.FileReader === "undefined") {
1322        $("small", this).html("File API & FileReader API not supported").addClass("text-danger");
1323        return;
1324      }
1325      this.ondragover = function() {
1326        $dropbox.addClass("hover");
1327        return false;
1328      };
1329      this.ondragend = function() {
1330        $dropbox.removeClass("hover");
1331        return false;
1332      };
1333      return this.ondrop = function(e) {
1334        var file, reader;
1335        e.preventDefault();
1336        $dropbox.removeClass("hover").html("");
1337        file = e.dataTransfer.files[0];
1338        reader = new FileReader();
1339        reader.onload = function(event) {
1340          return $dropbox.append($("<img>").attr("src", event.target.result));
1341        };
1342        reader.readAsDataURL(file);
1343        return false;
1344      };
1345    });
1346    /*
1347    # =============================================================================
1348    #   File upload buttons
1349    # =============================================================================
1350    */
1351
1352    $('.fileupload').fileupload();
1353    /*
1354    # =============================================================================
1355    #   Datepicker
1356    # =============================================================================
1357    */
1358
1359    $('.datepicker').datepicker();
1360    nowTemp = new Date();
1361    now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
1362    checkin = $("#dpd1").datepicker({
1363      onRender: function(date) {
1364        if (date.valueOf() < now.valueOf()) {
1365          return "disabled";
1366        } else {
1367          return "";
1368        }
1369      }
1370    }).on("changeDate", function(ev) {
1371      var newDate;
1372      if (ev.date.valueOf() > checkout.date.valueOf()) {
1373        newDate = new Date(ev.date);
1374        newDate.setDate(newDate.getDate() + 1);
1375        checkout.setValue(newDate);
1376      }
1377      checkin.hide();
1378      return $("#dpd2")[0].focus();
1379    }).data("datepicker");
1380    checkout = $("#dpd2").datepicker({
1381      onRender: function(date) {
1382        if (date.valueOf() <= checkin.date.valueOf()) {
1383          return "disabled";
1384        } else {
1385          return "";
1386        }
1387      }
1388    }).on("changeDate", function(ev) {
1389      return checkout.hide();
1390    }).data("datepicker");
1391    /*
1392    # =============================================================================
1393    #   Daterange Picker
1394    # =============================================================================
1395    */
1396
1397    $(".date-range").daterangepicker({
1398      format: "MM/dd/yyyy",
1399      separator: " to ",
1400      startDate: Date.today().add({
1401        days: -29
1402      }),
1403      endDate: Date.today(),
1404      minDate: "01/01/2012",
1405      maxDate: "12/31/2014"
1406    });
1407    /*
1408    # =============================================================================
1409    #   Timepicker
1410    # =============================================================================
1411    */
1412
1413    $("#timepicker-default").timepicker();
1414    $("#timepicker-24h").timepicker({
1415      minuteStep: 1,
1416      showSeconds: true,
1417      showMeridian: false
1418    });
1419    $("#timepicker-noTemplate").timepicker({
1420      template: false,
1421      showInputs: false,
1422      minuteStep: 5
1423    });
1424    $("#timepicker-modal").timepicker({
1425      minuteStep: 1,
1426      secondStep: 5,
1427      showInputs: false,
1428      modalBackdrop: true,
1429      showSeconds: true,
1430      showMeridian: false
1431    });
1432    $("#cp1").colorpicker({
1433      format: "hex"
1434    });
1435    $("#cp2").colorpicker();
1436    $("#cp3").colorpicker();
1437    /*
1438    # =============================================================================
1439    #   Skycons
1440    # =============================================================================
1441    */
1442
1443    $('.skycons-element').each(function() {
1444      var canvasId, skycons, weatherSetting;
1445      skycons = new Skycons({
1446        color: "white"
1447      });
1448      canvasId = $(this).attr('id');
1449      weatherSetting = $(this).data('skycons');
1450      skycons.add(canvasId, Skycons[weatherSetting]);
1451      return skycons.play();
1452    });
1453    /*
1454    # =============================================================================
1455    #   Login/signup animation
1456    # =============================================================================
1457    */
1458
1459    $(window).load(function() {
1460      return $(".login-container").addClass("active");
1461    });
1462    /*
1463    # =============================================================================
1464    #   FitVids
1465    # =============================================================================
1466    */
1467
1468    $(".timeline-content").fitVids();
1469    /*
1470    # =============================================================================
1471    #   Timeline animation
1472    # =============================================================================
1473    */
1474
1475    timelineAnimate = function(elem) {
1476      return $(".timeline.animated li").each(function(i) {
1477        var bottom_of_object, bottom_of_window;
1478        bottom_of_object = $(this).position().top + $(this).outerHeight();
1479        bottom_of_window = $(window).scrollTop() + $(window).height();
1480        if (bottom_of_window > bottom_of_object) {
1481          return $(this).addClass("active");
1482        }
1483      });
1484    };
1485    timelineAnimate();
1486    $(window).scroll(function() {
1487      return timelineAnimate();
1488    });
1489    /*
1490    # =============================================================================
1491    #   Input placeholder fix
1492    # =============================================================================
1493    */
1494
1495    if (!Modernizr.input.placeholder) {
1496      $("[placeholder]").focus(function() {
1497        var input;
1498        input = $(this);
1499        if (input.val() === input.attr("placeholder")) {
1500          input.val("");
1501          return input.removeClass("placeholder");
1502        }
1503      }).blur(function() {
1504        var input;
1505        input = $(this);
1506        if (input.val() === "" || input.val() === input.attr("placeholder")) {
1507          input.addClass("placeholder");
1508          return input.val(input.attr("placeholder"));
1509        }
1510      }).blur();
1511      return $("[placeholder]").parents("form").submit(function() {
1512        return $(this).find("[placeholder]").each(function() {
1513          var input;
1514          input = $(this);
1515          if (input.val() === input.attr("placeholder")) {
1516            return input.val("");
1517          }
1518        });
1519      });
1520    }
1521  });
1522
1523}).call(this);
1524

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.