PageSourceSearch

https://www.poliupg.ac.id/templates/poliupg_front/js/script.js

js poliupg.ac.id collected 2026-10-02 06:10:18 UTC 43,672 bytes, 1,556 lines download raw bytes

1(function($){
2  "use strict";
3  
4$(document).ready(function() {
5
6  $('#openLogin').on('click', function() {
7    $('#login_pop').toggle("normal");
8  });
9
10  $('#closeLogin').on('click', function() {
11    $('#login_pop').toggle("normal");
12  });
13
14  $('.popView').on('click', function() {
15    $('#popup_wrap').toggle();
16  });
17
18  $('#closeView').on('click', function() {
19    $('#popup_wrap').toggle();
20  });
21
22});
23
24
25 $(document).ready(function(){
26  
27   if($.fn.fitVids)
28        // Basic FitVids Test
29        jQuery(".main-sldier").fitVids();
30        // Custom selector and No-Double-Wrapping Prevention Test
31   if($.fn.fitVids)     
32        jQuery(".main-sldier,.videoslider, .box-video ").fitVids({ customSelector: "iframe[src^='http://socialcam.com']"}); 
33      
34 })
35
36$(window).load(function(){
37
38
39        // Toggles
40        
41        $(".togglec").hide();
42      
43      $(".togglet").click(function(){     
44         $(this).toggleClass("toggleta").next(".togglec").slideToggle("normal").parent().toggleClass('active');
45         return true;        
46      }); 
47  
48
49        // Scroll to Top
50        
51    $(window).scroll(function() {
52      if($(this).scrollTop() > 450) {
53                $('#gotoTop').fadeIn();
54      } else {
55        $('#gotoTop').fadeOut();
56      }
57    });
58    
59    $('#gotoTop').click(function() {
60      $('body,html').animate({scrollTop:0},400);
61            return false;
62    });
63        
64    
65
66  
67  
68 if($.fn.tipsy) 
69  {
70    $('.social a').tipsy({ gravity: 'e'});
71    $('.list-social li a').tipsy({ gravity: 'se'});
72    $('.v_tool_up').tipsy({ gravity: 's'});
73    $('.v_tool_left').tipsy({ gravity: 'e'});
74    $('.v_tool_right').tipsy({ gravity: 'w'});
75    $('.v_tool_down').tipsy({ gravity: 'n'});
76  }
77
78
79 
80 $('.box-work figure a').append('<span />');
81 $('.box-work figure a').append('<b />');
82 $('.foto-carousel figure ').append('<span />');
83 $('.foto-carousel figure ').append('<b />');
84   
85  $('.accordeon_css3_video ul li .block-accordeon figure a ').append('<b />');
86   $('.accordeon_css3_video ul li .block-accordeon figure a ').append('<em />');    
87
88
89   $('.box-photo a').append('<span />'); 
90    $('.box-photo a').append('<strong />'); 
91   $('.process-nav div:last-child,.process_steps_v2 li:last-child').addClass('last'); 
92  
93  $('.btn-large.btn-shadow').wrapInner('<span></span>'); 
94
95
96  $(".block-team li").hover(
97     function(){$(this).addClass("z-hover");},
98     function(){$(this).removeClass("z-hover");   
99    });
100
101
102
103  
104/* $(".carousel").hover(
105     function(){$(this).addClass("z-hover");},
106     function(){$(this).removeClass("z-hover");   
107    });  
108  */
109/*     $(".carousel ").hover(
110     function(){$(this).parent().parent().parent().parent().addClass("li-z");},
111     function(){$(this).parent().parent().parent().parent().removeClass("li-z");   
112    });*/
113  
114  
115 $('.accordeon_css3_video ul li ').hover(
116  function(){$(this).find('b').stop().animate({opacity:'1',top:'50%'}, 300,'easeOutQuad')},
117  function(){$(this).find('b').stop().animate({opacity:'0',top:'20%'}, 300,'easeOutQuad')}
118  );
119  
120/*  $('.accordeon_css3_video ul li.last_accord ').hover(
121  function(){$(this).find('b').stop().animate({opacity:'1',top:'50%'})},
122  function(){$(this).find('b').stop().animate({opacity:'1',top:'50%'})}
123  );*/
124  
125 /*  $('.accordeon_css3_video li:hover + .last_accord ').hover(
126  function(){$(this).find('b').stop().animate({opacity:'0',top:'20%'})},
127  function(){$(this).find('b').stop().animate({opacity:'1',top:'50%'})}
128  );
129  
130  $('.accordeon_css3_video li:hover + li + .last_accord ').hover(
131  function(){$(this).find('b').stop().animate({opacity:'0',top:'20%'})},
132  function(){$(this).find('b').stop().animate({opacity:'1',top:'50%'})}
133  );*/
134  
135/*   $('.table_plan .footer_table td a ').hover(
136  function(){$(this).stop().animate({padding: '15px 0'}, 300,'easeOutQuad')},
137  function(){$(this).stop().animate({padding: '11px 0'}, 300,'easeOutQuad')}
138  );*/
139  
140  
141// -----------------------twitter  
142
143//--------------------- carousel
144
145 if($.fn.bxSlider)
146$('#carousel-1').bxSlider({ 
147   minSlides: 1,
148   maxSlides: 3,
149   move: 1,
150   slideWidth: 270,
151   slideMargin: 30,
152  infiniteLoop: true,
153  hideControlOnEnd: false,    
154   pager: false,
155   nextSelector: '.next',
156   prevSelector: '.prev'   
157
158}); 
159
160if($.fn.bxSlider)
161$('#v_carousel-1').bxSlider({ 
162   minSlides: 1,
163   maxSlides: 3,
164   move: 1,
165   slideWidth: 270,
166   slideMargin: 30,
167  infiniteLoop: true,
168  hideControlOnEnd: false,    
169   pager: false,
170   nextSelector: '.vnext',
171   prevSelector: '.vprev'   
172
173}); 
174
175
176 if($.fn.bxSlider){
177
178$('#carousel-2').bxSlider({ 
179   minSlides: 1,
180   maxSlides: 1,
181   moveSlides: 1,
182   infiniteLoop: true,
183   hideControlOnEnd: false, 
184   slideWidth: 0,
185   slideMargin: 30,   
186   pager: false,
187   nextSelector: '.next-1',
188   prevSelector: '.prev-1'   
189
190});
191$('#v_carousel-2').bxSlider({ 
192   minSlides: 1,
193   maxSlides: 1,
194   moveSlides: 1,
195   infiniteLoop: true,
196   hideControlOnEnd: false, 
197   slideWidth: 0,
198   slideMargin: 30,   
199   pager: false,
200   nextSelector: '.v_next-2',
201   prevSelector: '.v_prev-2'   
202
203});
204$('#v_carousel-3').bxSlider({ 
205   minSlides: 1,
206   maxSlides: 1,
207   moveSlides: 1,
208   infiniteLoop: true,
209   hideControlOnEnd: false, 
210   slideWidth: 0,
211   slideMargin: 30,   
212   pager: false,
213   nextSelector: '.v_next-3',
214   prevSelector: '.v_prev-3'   
215
216});
217}
218  
219
220 if($.fn.bxSlider)
221$('#carousel-3').bxSlider({ 
222   minSlides: 1,
223   maxSlides: 3,
224   moveSlides: 1,
225   infiniteLoop: true,
226   hideControlOnEnd: false, 
227   slideWidth: 370,
228   slideMargin: 30,   
229   pager: false,
230   nextSelector: '.next-2',
231   prevSelector: '.prev-2' 
232
233});
234
235 if($.fn.bxSlider)
236$('#carousel-3_3').bxSlider({ 
237   minSlides: 1,
238   maxSlides: 4,
239   moveSlides: 1,
240   infiniteLoop: true,
241   hideControlOnEnd: false, 
242   slideWidth: 270,
243   slideMargin: 30,   
244   pager: false,
245   nextSelector: '.next-2',
246   prevSelector: '.prev-2' 
247
248});
249
250if($.fn.bxSlider)
251$('#carousel-3_2').bxSlider({ 
252   minSlides: 1,
253   maxSlides: 1,
254   moveSlides: 1,
255   infiniteLoop: true,
256   hideControlOnEnd: false, 
257   slideWidth: 1170,
258   slideMargin: 30,   
259   pager: false,
260   nextSelector: '.v_next-2',
261   prevSelector: '.v_prev-2' 
262
263}); 
264
265
266 if($.fn.bxSlider)
267$('#carousel-4').bxSlider({ 
268    minSlides: 2,
269    maxSlides: 6,
270    moveSlides: 1,
271    infiniteLoop: true,
272    hideControlOnEnd: false,  
273    slideWidth: 180,
274    slideMargin: 16,    
275    pager: false,
276    nextSelector: '.next-4',
277    prevSelector: '.prev-4'  
278
279});
280
281
282 if($.fn.bxSlider)
283$('#carousel-5').bxSlider({ 
284    minSlides: 1,
285    maxSlides: 3,
286    moveSlides: 1,
287    infiniteLoop: true,
288    hideControlOnEnd: false,  
289    slideWidth: 370,
290    slideMargin: 30,    
291    pager: false,
292    nextSelector: '.next-5',
293    prevSelector: '.prev-5'  
294
295});
296
297 if($.fn.bxSlider)
298$('#carousel-6').bxSlider({ 
299    minSlides: 1,
300    maxSlides: 1,
301    moveSlides: 1,
302    infiniteLoop: true,
303    hideControlOnEnd: false,  
304    slideWidth: 0,
305    slideMargin: 0,   
306    pager: false,
307    nextSelector: '.next-6',
308    prevSelector: '.prev-6'  
309
310});
311
312
313 if($.fn.bxSlider)
314$('#carousel-7').bxSlider({ 
315    minSlides: 1,
316    maxSlides: 1,
317    moveSlides: 1,
318    infiniteLoop: true,
319    hideControlOnEnd: false,  
320    slideWidth: 0,
321    slideMargin: 0,   
322    pager: false,
323    nextSelector: '.next-7',
324    prevSelector: '.prev-7'  
325
326});
327
328
329 if($.fn.bxSlider)
330$('#carousel-8').bxSlider({ 
331    minSlides: 1,
332    maxSlides: 1,
333    moveSlides: 1,
334    infiniteLoop: true,
335    hideControlOnEnd: false,  
336    slideWidth: 0,
337    slideMargin: 30,    
338    pager: false,
339    nextSelector: '.next-8',
340    prevSelector: '.prev-8'  
341
342});
343
344 if($.fn.bxSlider)
345$('#carousel-9').bxSlider({ 
346    minSlides: 1,
347    maxSlides: 4,
348    moveSlides: 1,
349    infiniteLoop: true,
350    hideControlOnEnd: false,  
351    slideWidth: 270,
352    slideMargin: 30,    
353    pager: false,
354    nextSelector: '.next-9',
355    prevSelector: '.prev-9'  
356
357});
358
359 if($.fn.bxSlider)
360$('#carousel-10').bxSlider({  
361    minSlides: 1,
362    maxSlides: 4,
363    moveSlides: 1,
364    infiniteLoop: true,
365    hideControlOnEnd: false,  
366    slideWidth: 270,
367    slideMargin: 30,    
368    pager: false,
369    nextSelector: '.next-10',
370    prevSelector: '.prev-10'  
371
372});
373
374 if($.fn.bxSlider)
375$('#carousel-11').bxSlider({  
376    minSlides: 1,
377    maxSlides: 4,
378    moveSlides: 1,
379    infiniteLoop: true,
380    hideControlOnEnd: false,  
381    slideWidth: 270,
382    slideMargin: 30,    
383    pager: false,
384    nextSelector: '.next-11',
385    prevSelector: '.prev-11'  
386
387});
388
389
390 if($.fn.bxSlider)
391$('#carousel-12').bxSlider({  
392    minSlides: 1,
393    maxSlides: 1,
394    moveSlides: 1,
395    infiniteLoop: true,
396    hideControlOnEnd: false,
397  controls: false,  
398    slideWidth: 0,
399    slideMargin: 0,   
400    pager: false,
401    nextSelector: '',
402    prevSelector: '' ,
403  auto: true,
404    pause: 4000,
405    autoStart: true,  
406    autoHover: true
407
408})
409
410 if($.fn.flexslider)
411jQuery('.flexslider').flexslider({
412  animation: "fade",     
413  slideshow: false,      
414  slideshowSpeed: 7000,
415  animationDuration: 600,
416  prevText: "",
417  nextText: "",
418  controlNav: true ,
419  video: true   
420  })    
421
422
423 if($.fn.flexslider)
424jQuery('.flexslider1').flexslider({
425  animation: "fade",     
426  slideshow: false,      
427  slideshowSpeed: 7000,
428  animationDuration: 600,
429  prevText: "",
430  nextText: "",
431  controlNav: true ,
432   video: true    
433  }) 
434  
435  if($.fn.flexslider)
436jQuery('.flexslider2').flexslider({
437  animation: "fade",     
438  slideshow: false,      
439  slideshowSpeed: 7000,
440  animationDuration: 600,
441  prevText: "",
442  nextText: "",
443  controlNav: false ,
444   video: true    
445  }) 
446  
447 if($.fn.flexslider)
448jQuery('.flexslider3').flexslider({
449  animation: "fade",     
450  slideshow: false,      
451  slideshowSpeed: 7000,
452  animationDuration: 600,
453  prevText: "",
454  nextText: "",
455  controlNav: false ,
456   video: true    
457  })  
458  
459 if($.fn.flexslider)
460jQuery('.flexslider4').flexslider({
461  animation: "fade",     
462  slideshow: false,      
463  slideshowSpeed: 7000,
464  animationDuration: 600,
465  prevText: "",
466  nextText: "",
467  controlNav: false ,
468   video: true    
469  }) 
470   
471      
472   
473   
474   
475/*   $("#shop-cart #cart-dropdown ").fadeOut();   
476      
477     $('#shop-cart .btn-cart').toggle(
478    function(){
479    $(this).parent().find("#cart-dropdown ").fadeIn();
480    $(this).addClass("active");
481    },        
482     
483    function(){
484    $(this).parent().find("#cart-dropdown ").fadeOut();
485    $(this).removeClass("active");
486    })*/  
487 
488    
489   $("#shop-cart #cart-dropdown ").slideUp();   
490      
491     $('#shop-cart .btn-cart').toggle(
492    function(){
493    $(this).parent().find("#cart-dropdown ").slideDown();
494    $(this).addClass("active");
495    },        
496     
497    function(){
498    $(this).parent().find("#cart-dropdown ").slideUp();
499    $(this).removeClass("active");
500    })  
501 
502 
503});   
504
505//===================fixed header================
506 $(window).scroll(function () {
507    if (jQuery(this).scrollTop() > 130) {
508        jQuery('.header_top').addClass('scrolled');
509       } else {
510        jQuery('.header_top').removeClass('scrolled');
511       }
512    });
513
514//===================maxheight================
515/*console.log(gvcsingle);*/
516 if(typeof gvcsingle != 'undefined' && qvcsingle.length){
517  var qvcs = qvcsingle.owlCarousel({
518    itemsCustom : [[1199,3],[992,3],[768,3],[480,3],[300,3]],
519    autoPlay : false,
520    slideSpeed : 1000,
521    autoHeight : true
522  });
523
524  $('.qv_btn_single_prev').on('click',function(){
525    qvcs.trigger('owl.prev');
526  });
527
528  $('.qv_btn_single_next').on('click',function(){
529    qvcs.trigger('owl.next');
530  });
531}
532
533/*parsed HTML*/
534$(function(){
535  $(".maxheight").each(function(){
536    $(this).contents().wrapAll("<div class='box_inner'></div>");
537  })
538});
539/*add event*/
540// $(window).bind("resize", height_handler).bind("load", height_handler)
541// function height_handler(){
542
543 
544//     if($(window).width()>768){
545//     $(".maxheight").equalHeights()
546//     }else{
547//     $(".maxheight").css({'height':'auto'});
548//     }
549 
550// }
551/*glob function*/
552(function($){
553  $.fn.equalHeights=function(minHeight,maxHeight){
554    tallest=(minHeight)?minHeight:0;
555    this.each(function(){
556      if($(">.box_inner", this).outerHeight()>tallest){
557        tallest=$(">.box_inner", this).outerHeight()
558      }
559    });
560    if((maxHeight)&&tallest>maxHeight) tallest=maxHeight;
561    return this.each(function(){$(this).height(tallest)})
562  }
563})(jQuery)
564
565/*jQuery(document).ready(function(){
566  jQuery(function(){
567      jQuery('.sf-menu').mobileMenu();
568    });
569});*/
570
571$(function(){
572// IPad/IPhone
573  var viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]'),
574    ua = navigator.userAgent,
575 
576    gestureStart = function () {
577        viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
578    },
579 
580    scaleFix = function () {
581      if (viewportmeta && /iPhone|iPad/.test(ua) && !/Opera Mini/.test(ua)) {
582        viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
583        document.addEventListener("gesturestart", gestureStart, false);
584      }
585    };
586scaleFix();
587
588// Menu Android
589// if(window.orientation!=undefined){
590//  var regM = /ipod|ipad|iphone/gi,
591//   result = ua.match(regM)
592//  if(!result) {
593//   $('.sf-menu li').each(function(){
594
595//    if($(">ul", this)[0]){
596//     $(">a", this).toggle(
597//      function(){
598//       return false;
599//      },
600//      function(){
601//       window.location.href = $(this).attr("href");
602//      }
603//     );
604//    } 
605//   })
606//  }
607// }
608});
609/* ------ fi fixed position on Android -----*/
610// var ua=navigator.userAgent.toLocaleLowerCase(),
611//  regV = /ipod|ipad|iphone/gi,
612//  result = ua.match(regV),
613//  userScale="";
614// if(!result){
615//  userScale=",user-scalable=0"
616// }
617document.write('<meta name="viewport" content="width=device-width,initial-scale=1.0">');
618/*--------------*/
619
620jQuery(document).ready(function(){
621  
622jQuery('#accordion2 .accordion-body').prev().removeClass("active")
623jQuery('#accordion2 .accordion-body.in').prev().addClass("active")
624jQuery('#accordion2 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion2 .accordion-heading').removeClass("active")
625jQuery(this).addClass("active")}})
626
627jQuery('#accordion3 .accordion-body').prev().removeClass("active")
628jQuery('#accordion3 .accordion-body.in').prev().addClass("active")
629jQuery('#accordion3 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion3 .accordion-heading').removeClass("active")
630jQuery(this).addClass("active")}})
631
632jQuery('#accordion4 .accordion-body').prev().removeClass("active")
633jQuery('#accordion4 .accordion-body.in').prev().addClass("active")
634jQuery('#accordion4 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion4 .accordion-heading').removeClass("active")
635jQuery(this).addClass("active")}})
636
637jQuery('#accordion5 .accordion-body').prev().removeClass("active")
638jQuery('#accordion5 .accordion-body.in').prev().addClass("active")
639jQuery('#accordion5 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion5 .accordion-heading').removeClass("active")
640jQuery(this).addClass("active")}})
641
642
643jQuery('#accordion6 .accordion-body').prev().removeClass("active")
644jQuery('#accordion6 .accordion-body.in').prev().addClass("active")
645jQuery('#accordion6 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion6 .accordion-heading').removeClass("active")
646jQuery(this).addClass("active")}})
647
648jQuery('#accordion7 .accordion-body').prev().removeClass("active")
649jQuery('#accordion7 .accordion-body.in').prev().addClass("active")
650jQuery('#accordion7 .accordion-heading').click(function(){if(jQuery(this).hasClass('active')){jQuery(this).removeClass("active")}else{jQuery('#accordion7 .accordion-heading').removeClass("active")
651jQuery(this).addClass("active")}})
652
653
654});
655
656// custom select
657
658  jQuery(document).ready(function(){
659
660    $('.custom_select').each(function(){
661      var list = $(this).children('ul'),
662        select = $(this).find('select'),
663        title = $(this).find('.select_title');
664      title.css('',title.outerWidth());
665
666      // select items to list items
667
668      for(var i = 0,len = select.children('option').length;i < len;i++){
669        list.append('<li class="tr_delay_hover">'+select.children('option').eq(i).text()+'</li>')
670      }
671      select.hide();
672
673      // open list
674      
675      title.on('click',function(){
676        list.slideToggle(400);
677        $(this).toggleClass('active');
678      });
679
680      // selected option
681
682      list.on('click','li',function(){
683        var val = $(this).text();
684        title.text(val);
685        list.slideUp(400);
686        select.val(val);
687        title.toggleClass('active');
688      });
689
690    });
691
692    // main menu
693
694    window.responsiveMenu = function(){
695
696      var nav = $('.nav-collapse .nav'),
697        header = $('body>header');
698
699       $('<b class="sf-sub-indicator"></b>').appendTo(nav.find('.sub-menu').children('a'));
700
701       $('.nav-collapse_ .nav > li > a').append('<span />');
702
703      var rMenu = new Object();
704
705      rMenu.init = function(){
706        rMenu.checkWindowSize();
707        window.onresize = rMenu.checkWindowSize;
708      }
709
710      rMenu.checkWindowSize = function(){
711
712        if($(window).width() < 769){
713          rMenu.Activate();
714        }
715        else{
716          rMenu.Deactivate();
717        }
718
719      }
720      // add click events
721      rMenu.Activate = function(){
722        header.off('click').on('click.responsivemenu','#menu_button',rMenu.openClose);
723        header.on('click.responsivemenu','.sf-menu li a',rMenu.openCloseSubMenu);
724      }
725      // remove click events
726      rMenu.Deactivate = function(){
727        header.off('.responsivemenu');
728        nav.removeAttr('style').find('li').removeClass('current_click')
729          .end().find('ul').removeAttr('style');
730        $('#menu_button').removeClass('active');
731      }
732
733      rMenu.openClose = function(){
734        $(this).toggleClass('active');
735        nav.stop().slideToggle();
736      }
737
738      jQuery(function($) {
739        var open = false;
740
741        function resizeMenu() {
742          if ($(window).width() < 769) {
743            if (!open) {
744                $(".list-panel").hide();
745            }
746            $("#menu-button").show();               
747          }
748          else if ($(window).width() >= 768) {
749            if (!open) {
750                $(".list-panel").show();
751            }
752            $("#menu-button").hide();
753          }
754        }
755
756        function setupMenuButton() {
757          $("#menu-button").click(function(e) {
758            e.preventDefault();
759
760            if (open) {
761              $(".list-panel").fadeOut();
762              $("#menu-button").toggleClass("selected");
763            }
764            else {
765              $(".list-panel").fadeIn();
766              $("#menu-button").toggleClass("selected");
767            }
768            open = !open;
769          });
770        }
771
772
773        $(window).on(resizeMenu);
774
775        resizeMenu();
776        setupMenuButton();
777
778        $(".block-form #form-search ").fadeOut();   
779      
780         $('.block-form .btn-search').toggle(
781        function(){
782        $(this).parent().find("#form-search ").fadeIn();
783        $(this).addClass("active");
784        },        
785         
786        function(){
787        $(this).parent().find("#form-search ").fadeOut();
788        $(this).removeClass("active");
789        })
790    });
791
792    //============================== Drop Down Lists ============================
793    $(function(){
794      $('.slct').click(function(){
795        var dropBlock = $(this).parent().find('.drop');
796        if( dropBlock.is(':hidden') ) {
797          dropBlock.slideDown();
798          $(this).addClass('active');
799          $('.drop').find('li').click(function(){
800            var selectResult = $(this).html();
801            $(this).parent().parent().find('input').val(selectResult);
802            $('.slct').removeClass('active').html(selectResult);
803            dropBlock.slideUp();
804          });
805        } else {
806          $(this).removeClass('active');
807          dropBlock.slideUp();
808        }
809        return false;
810      });
811      $('.slct2').click(function(){
812        var dropBlock = $(this).parent().find('.drop2');
813        if( dropBlock.is(':hidden') ) {
814          dropBlock.slideDown();
815          $(this).addClass('active');
816          $('.drop2').find('li').click(function(){
817            var selectResult = $(this).html();
818            $(this).parent().parent().find('input').val(selectResult);
819            $('.slct2').removeClass('active').html(selectResult);
820            dropBlock.slideUp();
821          });
822        } else {
823          $(this).removeClass('active');
824          dropBlock.slideUp();
825        }
826        return false;
827      });
828
829    });
830
831      rMenu.openCloseSubMenu = function(e){
832        var self = $(this);
833
834        if(self.next('ul').length || self.next('.mega_menu_container').length){
835          self.parent()
836            .addClass('current_click')
837            .siblings()
838            .removeClass('current_click')
839            .children(':not(a)')
840            .slideUp();
841          self.next().stop().slideToggle();
842          self.parent().siblings().children('a').removeClass('prevented');
843          
844          if(!(self.hasClass('prevented'))){
845            e.preventDefault();
846            self.addClass('prevented');
847          }else{
848            self.removeClass('prevented');
849          }
850        }
851      }
852      rMenu.init();
853    }
854    responsiveMenu();
855
856    function getCount(element){
857      var len = element.length - 1,
858          parentWidth = element.parent().outerWidth(),
859          margin = parentWidth / len - element.outerWidth() - (len+1);
860      element.not(":last-child").css('margin-right',margin);
861
862    }
863    (function(){
864      var container,pag,track;
865      if($('.process-wrap').length){
866        $('.process-wrap').owlCarousel({
867          singleItem : true,
868          pagination:true,
869          autoHeight:true,
870          transitionStyle : "backSlide",
871          afterInit : function(){
872            container = $('.process-wrap').find('.owl-pagination').addClass('clearfix');
873            pag = container.children('div');
874            container.parent().append('<div class="track"><div class="fill last"></div></div>');
875            getCount(pag);
876            track = $('.process-wrap').find('.track').children('.fill');
877          },
878          afterMove : function(){
879            var currentSlide = container.children('.active').index();
880            pag.eq(currentSlide).prevAll().addClass('active');
881            pag = container.children('div');
882  
883             var offset = pag.eq(currentSlide).position().left;
884
885                track.stop().animate({
886                  'width':offset
887                },150);
888              
889          },
890          afterUpdate : function(){
891            pag = container.children('div');
892            getCount(pag);
893            var currentSlide = container.children('.active').index();
894            pag.eq(currentSlide).prevAll().addClass('active');
895            var offset = pag.eq(currentSlide).position().left;
896            track.css('width',offset);
897          }
898        });
899      }
900    })();
901    
902
903  });
904
905//quick preview popup
906    
907    (function(){
908      var pr = $('.popup_wrap .qv_preview > img');
909      $('.popup_wrap .qv_carousel .owl-item:first-child li').addClass('active');
910      $('.popup_wrap .qv_carousel').on('click','li:not(.active)',function(){
911        $(this).addClass('active').parent().siblings().children('li').removeClass('active');
912        var src = $(this).data('src');
913        if(!($('html').hasClass('ie9'))){
914          pr.addClass('hide');
915          setTimeout(function(){
916            pr.attr('src',src).removeClass('hide');
917          },400);
918        }else{
919          pr.attr('src',src);
920        }
921        $('.popup_wrap [class*="qv_carousel"]').each(function(){
922          var pr = $(this).closest('.qv_carousel_wrap').prev('.qv_preview').children('img');
923          $(this).on('click','li',function(){
924            var src = $(this).data('src');
925            if(!($('html').hasClass('ie9'))){
926              pr.addClass('hide');
927              setTimeout(function(){
928                pr.attr('src',src).removeClass('hide');
929              },400);
930            }else{
931            pr.attr('src',src);
932            }
933          });
934          });
935        });
936    
937      })();
938
939    //elevate zoom
940
941    (function(){
942
943      if($('[data-zoom-image]').length){
944
945        var button = $('.qv_preview [class*="button_type_"]');
946
947        $("#zoom_image").elevateZoom({
948          gallery:'qv_carousel_single',
949            zoomWindowFadeIn: 500,
950          zoomWindowFadeOut: 500
951        }); 
952
953        button.on("click", function(e){
954          var ez = $('#zoom_image').data('elevateZoom');
955          $.fancybox(ez.getGalleryList());
956            e.preventDefault();
957        });
958      }
959
960    })();
961
962    // quick view carousel
963
964    (function(){
965      var qvc = $('.qv_carousel'),
966        qvcsingle = $('.qv_carousel_single');
967      if(qvc.length){
968        var qv = qvc.owlCarousel({
969          items: 3,
970          autoPlay : false,
971          slideSpeed : 1000,
972          autoHeight : true
973        });
974
975        $('.qv_btn_prev').on('click',function(){
976          qv.trigger('owl.prev');
977        });
978
979        $('.qv_btn_next').on('click',function(){
980          qv.trigger('owl.next');
981        });
982      }
983      if(qvcsingle.length){
984        var qvcs = qvcsingle.owlCarousel({
985          itemsCustom : [[1199,3],[992,3],[768,3],[480,3],[300,3]],
986          autoPlay : false,
987          slideSpeed : 1000,
988          autoHeight : true
989        });
990
991        $('.qv_btn_single_prev').on('click',function(){
992          qvcs.trigger('owl.prev');
993        });
994
995        $('.qv_btn_single_next').on('click',function(){
996          qvcs.trigger('owl.next');
997        });
998      }
999
1000    })();
1001
1002    // quantity
1003
1004    $(document).ready(function() {
1005
1006      $('#q_up').click(function(){
1007
1008        var q_val_up=parseInt($("input#quantity_wanted").val());
1009        if(isNaN(q_val_up)){
1010          q_val_up=0;
1011        }
1012        $("input#quantity_wanted").val(q_val_up+1).keyup();
1013      });
1014
1015      $('#q_down').click(function(){
1016
1017        var q_val_up=parseInt($("input#quantity_wanted").val());
1018        if(isNaN(q_val_up)){
1019          q_val_up=0;
1020        }
1021        if(q_val_up>1){
1022          $("input#quantity_wanted").val(q_val_up-1).keyup();
1023        };
1024
1025      });
1026
1027
1028      $('#q_up2').click(function(){
1029
1030        var q_val_up=parseInt($("input#quantity_wanted2").val());
1031        if(isNaN(q_val_up)){
1032          q_val_up=0;
1033        }
1034        $("input#quantity_wanted2").val(q_val_up+1).keyup();
1035      });
1036
1037      $('#q_down2').click(function(){
1038
1039        var q_val_up=parseInt($("input#quantity_wanted2").val());
1040        if(isNaN(q_val_up)){
1041          q_val_up=0;
1042        }
1043        if(q_val_up>1){
1044          $("input#quantity_wanted2").val(q_val_up-1).keyup();
1045        };
1046
1047      });
1048
1049      $('#q_up3').click(function(){
1050
1051        var q_val_up=parseInt($("input#quantity_wanted3").val());
1052        if(isNaN(q_val_up)){
1053          q_val_up=0;
1054        }
1055        $("input#quantity_wanted3").val(q_val_up+1).keyup();
1056      });
1057
1058      $('#q_down3').click(function(){
1059
1060        var q_val_up=parseInt($("input#quantity_wanted3").val());
1061        if(isNaN(q_val_up)){
1062          q_val_up=0;
1063        }
1064        if(q_val_up>1){
1065          $("input#quantity_wanted3").val(q_val_up-1).keyup();
1066        };
1067
1068      });
1069
1070      $('#q_up4').click(function(){
1071
1072        var q_val_up=parseInt($("input#quantity_wanted4").val());
1073        if(isNaN(q_val_up)){
1074          q_val_up=0;
1075        }
1076        $("input#quantity_wanted4").val(q_val_up+1).keyup();
1077      });
1078
1079      $('#q_down4').click(function(){
1080
1081        var q_val_up=parseInt($("input#quantity_wanted4").val());
1082        if(isNaN(q_val_up)){
1083          q_val_up=0;
1084        }
1085        if(q_val_up>1){
1086          $("input#quantity_wanted4").val(q_val_up-1).keyup();
1087        };
1088
1089      });
1090
1091
1092
1093    });
1094
1095
1096    // contact form
1097
1098    (function(){
1099
1100      var cf = $('#contactform');
1101      cf.append('<div class="message_container d_none m_top_20"></div>');
1102
1103      cf.on("submit",function(event){
1104
1105        var self = $(this),text;
1106
1107        var request = $.ajax({
1108          url:"bat/mail.php",
1109          type : "post",
1110          data : self.serialize()
1111        });
1112
1113        request.then(function(data){
1114          if(data == "1"){
1115
1116            text = "Your message has been sent successfully!";
1117
1118            cf.find('input:not([type="submit"]),textarea').val('');
1119
1120            $('.message_container').html('<div class="alert_box r_corners color_green success"><i class="fa fa-smile-o"></i><p>'+text+'</p></div>')
1121              .delay(150)
1122              .slideDown(300)
1123              .delay(4000)
1124              .slideUp(300,function(){
1125                $(this).html("");
1126              });
1127
1128          }
1129          else{
1130            if(cf.find('textarea').val().length < 20){
1131              text = "Message must contain at least 20 characters!"
1132            }
1133            if(cf.find('input').val() == ""){
1134              text = "All required fields must be filled!";
1135            }
1136            $('.message_container').html('<div class="alert_box r_corners error"><i class="fa fa-exclamation-triangle"></i><p>'+text+'</p></div>')
1137              .delay(150)
1138              .slideDown(300)
1139              .delay(4000)
1140              .slideUp(300,function(){
1141                $(this).html("");
1142              });
1143          }
1144        },function(){
1145          $('.message_container').html('<div class="alert_box r_corners error"><i class="fa fa-exclamation-triangle"></i><p>Connection to server failed!</p></div>')
1146              .delay(150)
1147              .slideDown(300)
1148              .delay(4000)
1149              .slideUp(300,function(){
1150                $(this).html("");
1151              });
1152        });
1153
1154
1155        event.preventDefault();
1156      });
1157
1158    })();
1159    
1160   var isSmall;
1161
1162    $(document).ready(function() {
1163     checkResponcive();
1164     myAccordeon($('.accordeon_3'));
1165     myAccordeon($('.accordeon_4'));
1166    });
1167
1168    $(window).resize(checkResponcive);
1169
1170    function checkResponcive() {
1171     isSmall = $(window).width() <= 769;
1172     if(isSmall) {
1173      $('.last_accord').removeClass('last_accord');
1174     }
1175    }
1176
1177    function myAccordeon($cont) {
1178     
1179     var $list = $cont.find('li');
1180
1181     $list.on('mouseover', function(){
1182      if (isSmall) return;
1183      $list.removeClass('last_accord');
1184      $(this).addClass('last_accord');
1185     });
1186
1187     $cont.on('mouseout', function(){
1188      if (isSmall) return;
1189      $list.removeClass('last_accord');
1190      $list.first().addClass('last_accord');
1191     });
1192    }
1193
1194    // newsletter
1195
1196    (function(){
1197
1198      var subscribe = $('[id^="newsletter"]');
1199      subscribe.append('<div class="message_container_subscribe d_none m_top_20"></div>');
1200      var message = $('.message_container_subscribe'),text;
1201
1202      subscribe.on('submit',function(e){
1203        var self = $(this);
1204        
1205        if(self.find('input[type="email"]').val() == ''){
1206          text = "Please enter your e-mail!";
1207          message.html('<div class="alert_box r_corners error"><i class="fa fa-exclamation-triangle"></i><p>'+text+'</p></div>')
1208            .slideDown()
1209            .delay(4000)
1210            .slideUp(function(){
1211              $(this).html("");
1212            });
1213
1214        }else{
1215          self.find('span.error').hide();
1216          $.ajax({
1217            type: "POST",
1218            url: "bat/newsletter.php",
1219            data: self.serialize(), 
1220            success: function(data){
1221              if(data == '1'){
1222                text = "Your email has been sent successfully!";
1223                message.html('<div class="alert_box r_corners color_green success"><i class="fa fa-smile-o"></i><p>'+text+'</p></div>')
1224                  .slideDown()
1225                  .delay(4000)
1226                  .slideUp(function(){
1227                    $(this).html("");
1228                  })
1229                  .prevAll('input[type="email"]').val("");
1230              }else{
1231                text = "Invalid email address!";
1232                message.html('<div class="alert_box r_corners error"><i class="fa fa-exclamation-triangle"></i><p>'+text+'</p></div>')
1233                  .slideDown()
1234                  .delay(4000)
1235                  .slideUp(function(){
1236                    $(this).html("");
1237                  });
1238              }
1239            }
1240          });
1241        }
1242        e.preventDefault();
1243      });
1244
1245    })();
1246
1247    // ie9 placeholder
1248
1249    $(' .ie9 [placeholder]').each(function(){
1250
1251     var self = $(this),
1252      ph = self.attr('placeholder');
1253
1254     self.val(ph);
1255
1256     self.on('focus',function(){
1257      if($(this).val() == ph){
1258       $(this).val("");
1259      }
1260     }).on('blur',function(){
1261      if($(this).val() == ""){
1262       $(this).val(ph);
1263      }
1264     });
1265
1266    });
1267
1268    // Shop Accordion
1269
1270    jQuery(window).load(function() {
1271      jQuery('#accordion li.level0  ul').each(function(index) {jQuery(this).prev().addClass('idCatSubcat')});
1272      jQuery('#accordion li.level0 ul').css('display','none');
1273      jQuery('#accordion li.active').each(function() {
1274        jQuery('#accordion li.active > span').addClass('expanded');
1275      });
1276      jQuery('#accordion li.level0.active > ul').css('display','block');
1277      jQuery('#accordion li.level0.active > ul  li.active > ul').css('display','block');
1278      jQuery('#accordion li.level0.active > ul  li.active > ul li.active > ul').css('display','block');
1279      jQuery('#accordion li.level0 ul').each(function(index) {
1280        jQuery(this).prev().addClass('close').click(function() {
1281        if (jQuery(this).next().css('display') == 'none') {
1282         jQuery(this).next().slideDown(200, function () {
1283          jQuery(this).prev().removeClass('collapsed').addClass('expanded');
1284          });
1285        }else {
1286          jQuery(this).next().slideUp(200, function () {
1287          jQuery(this).prev().removeClass('expanded').addClass('collapsed');
1288          jQuery(this).find('ul').each(function() {
1289            jQuery(this).hide().prev().removeClass('expanded').addClass('collapsed');
1290          });
1291          });
1292        }
1293        return false;
1294        });
1295      });
1296    });
1297
1298    // Nav_List
1299
1300    jQuery(document).ready(function($) {
1301      $('.navigation_grid .hasTooltip , #product_list.v_grid .hasTooltip').tooltip('hide'); 
1302      // $('.Results select').styler();
1303      var cc = $('list_grid');
1304      if (cc == 'g') {
1305        $('#product_list').addClass('v_list');
1306        $('#product_list').removeClass('v_grid');
1307        $('.Clist').addClass('active');
1308        $('.Cgrid').removeClass('active');
1309      } else {
1310        $('#product_list').removeClass('v_list');
1311        $('#product_list').addClass('v_grid');
1312        $('.Cgrid').addClass('active');
1313        $('.Clist').removeClass('active');    
1314      }
1315
1316      $('.Cgrid').click(function() {
1317        console.log(1);
1318        $(this).addClass('active');
1319        $('.Clist').removeClass('active');
1320        $('#product_list').fadeOut(300, function() {
1321          $(this).addClass('v_grid').removeClass('v_list').fadeIn(300);
1322        });
1323        // $.cookie('list_grid', '1' , { expires: 7, path: vmSiteurl });
1324        return false;
1325      });
1326      
1327      $('.Clist').click(function() {
1328        console.log(2);
1329        $(this).addClass('active');
1330        $('.Cgrid').removeClass('active');              
1331        $('#product_list').fadeOut(300, function() {
1332          $(this).removeClass('v_grid').addClass('v_list').fadeIn(300);
1333        });
1334        // $.cookie('list_grid','g', { expires: 7, path: vmSiteurl });
1335        return false;
1336      }); 
1337
1338    });
1339
1340    // popup  
1341
1342      (function(){
1343
1344        $('.popup').on('popup/position',function(){
1345          var _this = $(this),
1346          pos = setTimeout(function(){
1347            var mt = _this.outerHeight() / -2,
1348              ml = _this.outerWidth() / -2;
1349            _this.css({
1350              'margin-left':ml,
1351              'margin-top':mt
1352            });
1353            clearTimeout(pos);
1354          },100);
1355        });
1356
1357        var close = $('.popup > .close');
1358        if($('[data-popup]').length){
1359          $("body").on('click','[data-popup]',function(e){
1360            var popup = $(this).data('popup'),
1361              pc = $(popup).find('.popup');
1362
1363            pc.trigger('popup/position');
1364
1365            $(popup).fadeIn(function(){
1366              var scroll = $('.custom_scrollbar');
1367              if(scroll.length){
1368                var isVisible = setInterval(function(){
1369                  if(scroll.is(':visible')){
1370                    scroll.customScrollbar({
1371                      preventDefaultScroll: true
1372                    });
1373                    clearInterval(isVisible);
1374                  }
1375                },100);
1376              }
1377
1378
1379              $(popup).on('click',function(e){
1380                if($(e.target).hasClass('popup_wrap')){
1381                  $(this).fadeOut();
1382                }
1383              });
1384            });
1385            e.preventDefault();
1386          });
1387        }
1388        close.on('click',function(){
1389          $(this).closest('.popup_wrap').fadeOut();
1390        });
1391      })();
1392
1393    // Quick View
1394
1395    /*jQuery.ias({
1396                   container :  ".loadmore #slider",
1397                   item: ".item",
1398                   pagination: ".pagination.vm",
1399                   next: ".pagination.vm .next a",
1400                   triggerPageThreshold: "99999",
1401         trigger: false,
1402         history : false,
1403                   loader: "<img src=\"/reviver/media/ajax_scroll/assets/ajax-loader.gif\"/>",
1404                   noneleft: false,
1405         onRenderComplete: function () {
1406           jQuery("#product_list.grid .hasTooltip").tooltip("hide");
1407           jQuery("#product_list .vmproduct li").each(function(indx, element){
1408              var my_product_id = jQuery(this).find(".quick_ids").val();
1409              jQuery(this).append("<div class=\"quick_btn\" onClick =\"quick_btn("+my_product_id+")\"><i class=\"icon-eye-open\"></i>"+show_quicktext+"</div>");
1410              jQuery(this).find(".quick_id").remove();
1411              Virtuemart.product(jQuery("form.product"));
1412              jQuery("form.js-recalculate").each(function(){
1413              if (jQuery(this).find(".product-fields").length) {
1414                var id= jQuery(this).find("input[name=\"virtuemart_product_id[]\"]").val();
1415                Virtuemart.setproducttype(jQuery(this),id);
1416              }
1417              });
1418          });
1419          
1420        }
1421    });*/
1422
1423    // Count Block
1424
1425    jQuery(document).ready(function() {
1426
1427      $('#product_list div.limitted_offer').each(function() {        
1428        var tip = $(this).find('div.count_holder_small');
1429        $(this).hover(
1430            function() { tip.appendTo('body'); },
1431            function() { tip.appendTo(this); }
1432        ).mousemove(function(e) {
1433            var x = e.pageX + 60,
1434                y = e.pageY - 50,
1435                w = tip.width(),
1436                h = tip.height(),
1437                dx = $(window).width() - (x + w),
1438                dy = $(window).height() - (y + h);
1439
1440            if ( dx < 50 ) x = e.pageX - w - 60;
1441            if ( dy < 50 ) y = e.pageY - h + 130;
1442
1443            tip.css({ left: x, top: y });
1444          });         
1445      });
1446
1447    });
1448
1449    // Page Reload
1450
1451    $(document).ready(function(){
1452      $(".menu_link").click(function(){
1453        setTimeout(function() {
1454         location.reload();
1455        }, 100);
1456      });
1457    });
1458
1459    // appear animation
1460    function animate(){
1461     $("[data-appear-animation]").each(function() {
1462
1463         var self = $(this);
1464
1465         self.addClass("appear-animation");
1466
1467         if($(window).width() > 800) {
1468          self.appear(function() {
1469
1470           var delay = (self.attr("data-appear-animation-delay") ? self.attr("data-appear-animation-delay") : 1);
1471
1472           if(delay > 1) self.css("animation-delay", delay + "ms");
1473           self.addClass(self.attr("data-appear-animation"));
1474
1475           setTimeout(function() {
1476            self.addClass("appear-animation-visible");
1477           }, delay);
1478
1479          }, {accX: 0, accY: -150});
1480         } else {
1481          self.addClass("appear-animation-visible");
1482         }
1483        });
1484    }
1485
1486    animate();
1487
1488    $(window).on('resize',animate);
1489
1490    // widgets
1491
1492    (function(){
1493      var slider;
1494      if($('#price').length){
1495        slider = $('#price').slider({ 
1496          orientation: "horizontal",
1497          range: true,
1498          values: [ 0, 237 ],
1499          min: 0,
1500          max: 250,
1501          slide : function(event ,ui){
1502            $(this).next().find('.first_limit').val('$' + ui.values[0]);
1503            $(this).next().find('.last_limit').val('$' + ui.values[1]);
1504          }
1505        });
1506      }
1507
1508      var color = $('.select_color').on('click',function(){
1509        $(this).addClass('active').parent().siblings().children('button').removeClass('active');
1510      });
1511
1512      $('.close_fieldset').on('click',function(){
1513        $(this).closest('fieldset').animate({
1514          'opacity':'0'
1515        },function(){
1516          $(this).slideUp();
1517        });
1518      });
1519
1520      $('button[type="reset"]:not(#styleswitcher button[type="reset"])').on('click',function(){
1521        color.eq(0).addClass('active').parent().siblings().children('button').removeClass('active');
1522        slider.slider( "option", "values", [ 0, 237 ] );
1523      });
1524
1525      $('.categories_list').on('click','a',function(e){
1526        if($(this).parent().children('ul').length){
1527          $(this).parent().toggleClass('active').end().next().slideToggle();
1528          e.preventDefault();
1529        }
1530      });
1531
1532      $('.categories_list > li > a').on('click',function(e){
1533        if($(this).parent().children('ul').length){
1534          $(this).toggleClass('scheme_color').toggleClass('color_dark');
1535          e.preventDefault();
1536        }
1537      });
1538
1539    })();
1540
1541    // StyleSwither BgImgSelect
1542
1543    $(function() {
1544         $("#selectBackgroundImg button").click(function() {
1545             $("#selectBackgroundImg button").removeClass("img_active");         
1546             $(this).toggleClass("img_active");
1547         })
1548    });
1549
1550
1551})(jQuery);
1552
1553
1554
1555
1556    

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.