123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- ;(function () {
- 'use strict';
- var owlCarousel = function(){
- $('#slider1').owlCarousel({
- loop: false,
- margin: 10,
- dots: false,
- nav: true,
- navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
- responsive: {
- 0: {
- items: 1
- },
- 600: {
- items: 3
- },
- 1000: {
- items: 4
- }
- }
- });
- $('#slider2').owlCarousel({
- loop: false,
- margin: 10,
- dots: false,
- nav: true,
- navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
- responsive: {
- 0: {
- items: 1
- },
- 600: {
- items: 2
- },
- 1000: {
- items: 3
- }
- }
- });
- $('#slider3').owlCarousel({
- loop: false,
- margin: 10,
- dots: false,
- nav: true,
- navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
- responsive: {
- 0: {
- items: 1
- },
- 600: {
- items: 2
- },
- 1000: {
- items: 3
- }
- }
- });
- };
- var videos = function() {
- $(document).ready(function () {
- $('#play-video').on('click', function (ev) {
- $(".fh5co_hide").fadeOut();
- $("#video")[0].src += "&autoplay=1";
- ev.preventDefault();
- });
- });
- $(document).ready(function () {
- $('#play-video_2').on('click', function (ev) {
- $(".fh5co_hide_2").fadeOut();
- $("#video_2")[0].src += "&autoplay=1";
- ev.preventDefault();
- });
- });
- $(document).ready(function () {
- $('#play-video_3').on('click', function (ev) {
- $(".fh5co_hide_3").fadeOut();
- $("#video_3")[0].src += "&autoplay=1";
- ev.preventDefault();
- });
- });
- $(document).ready(function () {
- $('#play-video_4').on('click', function (ev) {
- $(".fh5co_hide_4").fadeOut();
- $("#video_4")[0].src += "&autoplay=1";
- ev.preventDefault();
- });
- });
- };
- var googleTranslateFormStyling = function() {
- $(window).on('load', function () {
- $('.goog-te-combo').addClass('form-control');
- });
- };
- var contentWayPoint = function() {
- var i = 0;
- $('.animate-box').waypoint( function( direction ) {
- if( direction === 'down' && !$(this.element).hasClass('animated-fast') ) {
- i++;
- $(this.element).addClass('item-animate');
- setTimeout(function(){
- $('body .animate-box.item-animate').each(function(k){
- var el = $(this);
- setTimeout( function () {
- var effect = el.data('animate-effect');
- if ( effect === 'fadeIn') {
- el.addClass('fadeIn animated-fast');
- } else if ( effect === 'fadeInLeft') {
- el.addClass('fadeInLeft animated-fast');
- } else if ( effect === 'fadeInRight') {
- el.addClass('fadeInRight animated-fast');
- } else {
- el.addClass('fadeInUp animated-fast');
- }
- el.removeClass('item-animate');
- }, k * 50, 'easeInOutExpo' );
- });
- }, 100);
- }
- } , { offset: '85%' } );
- // }, { offset: '90%'} );
- };
- var goToTop = function() {
- $('.js-gotop').on('click', function(event){
-
- event.preventDefault();
- $('html, body').animate({
- scrollTop: $('html').offset().top
- }, 500, 'swing');
-
- return false;
- });
- $(window).scroll(function(){
- var $win = $(window);
- if ($win.scrollTop() > 200) {
- $('.js-top').addClass('active');
- } else {
- $('.js-top').removeClass('active');
- }
- });
-
- };
-
- $(function(){
- owlCarousel();
- videos();
- contentWayPoint();
- goToTop();
- googleTranslateFormStyling();
- });
- }());
- function googleTranslateElementInit() {
- new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
- }
|