jQuery(document).ready(function(){
     
	 jQuery( ".member" ).click(function() {
        jQuery(".member").css('z-index','1');
        jQuery(this).css('z-index','9');
       jQuery('.member-hoverbox').hide();
       jQuery(this).find('.member-hoverbox').show();
    });
    
     jQuery(document).on('click',".closeicn a",function(event) {
        jQuery(".member").css('z-index','1');
       jQuery('.member-hoverbox').hide();
        event.preventDefault();
    });
	  
	 jQuery('.servicelogo-slider,.servicediamnd-slider,.servicestantez-slider,.servicecd-slider').slick({
		  dots: true,
		  infinite: true,
		  speed: 500,
		  fade: false,
		  autoplay: true,
		  autoplaySpeed: 4000,
		  focusOnSelect: true,
		  swipeToSlide:true,
		  touchMove:true,
		  lazyLoad: 'ondemand',
		  infinite: true
		});
    });


    jQuery(document).ready(function(){
     jQuery('.service-fact').slick({
		  dots: false,
		  infinite: true,
		  speed: 500,
		  fade: false,
		  autoplay: true,
		  autoplaySpeed: 15000,
		  focusOnSelect: true,
		  swipeToSlide:true,
		  touchMove:true,
		  lazyLoad: 'ondemand',
		  infinite: true
		});
    });
	 jQuery(document).ready(function(){
		jQuery('.work-slide').each( function( ){
			if (jQuery(this).css("visibility")=="visible" && jQuery(this).attr("data-wow-animation-name")!="") {
				 jQuery(this).slick({
				  dots: false,
				  infinite: true,
				  speed: 500,
				  fade: false,
				  autoplay: true,
				  autoplaySpeed: 4000,
				  focusOnSelect: true,
				  swipeToSlide:true,
				  touchMove:true,
				  lazyLoad: 'ondemand',
				  infinite: true,
				  prevArrow: false,
				  nextArrow: false
				});
			}
		});
	});
	jQuery(window).on('resize scroll', function() {
		 setTimeout(function(){ 

			jQuery('.work-slide').each( function( ){
				if (jQuery(this).css("visibility")=="visible") {
					 jQuery(this).slick({
					  dots: false,
					  infinite: true,
					  speed: 500,
					  fade: false,
					  autoplay: true,
					  autoplaySpeed: 4000,
					  focusOnSelect: true,
					  swipeToSlide:true,
					  touchMove:true,
					  lazyLoad: 'ondemand',
					  infinite: true,
					  prevArrow: false,
					  nextArrow: false
					});
				}
				else{
				jQuery(this).slick("unslick");
				}
			});
		 }, 200);
		
	});
	
jQuery(document).ready(function($) {
    var cards = jQuery(".random_divs .member");
    for (var i = 0; i < cards.length; i++) {
        var target = Math.floor(Math.random() * cards.length - 1) + 1;
        var target2 = Math.floor(Math.random() * cards.length - 1) + 1;
        cards.eq(target).before(cards.eq(target2));
    }
    'use strict';
    jQuery('.pagescroll_me a').click(function(e) {
     //   e.preventDefault();
   //     $.scrollify.next();
    });
    jQuery('.pagescroll a').click(function() {
        var topoffset = 60;
        jQuery('html, body').animate({
            scrollTop: jQuery(jQuery.attr(this, 'href')).offset().top - topoffset + 2
        }, 1000, 'easeInOutExpo');
        return false;
    });
    jQuery(window).scroll(function() {
        if (jQuery(this).scrollTop() > 1) {
            jQuery('header').addClass("sticky");
        } else {
            jQuery('header').removeClass("sticky");
        }
    });
    jQuery(window).load(function() {
        if (jQuery(".portfolioContainer").length) {
            var $container = jQuery('.portfolioContainer');
            $container.isotope({
                filter: '*',
                animationOptions: {
                    duration: 750,
                    easing: 'linear',
                    queue: false
                }
            });
        }
        jQuery('.portfolioFilter a').click(function() {
            jQuery('.portfolioFilter .current').removeClass('current');
            jQuery(this).addClass('current');
            if (jQuery(".portfolioContainer").length) {
                var selector = jQuery(this).attr('data-filter');
                $container.isotope({
                    filter: selector,
                    animationOptions: {
                        duration: 750,
                        easing: 'linear',
                        queue: false
                    }
                });
            }
            return false;
        });
    });
	
	jQuery(window).load(function() {
        if (jQuery(".clientContainer").length) {
            var $container = jQuery('.clientContainer');
            $container.isotope({
                filter: '*',
                animationOptions: {
                    duration: 750,
                    easing: 'linear',
                    queue: false
                }
            });
        }
        jQuery('.clietnFilter a').click(function() {
            jQuery('.clietnFilter .current').removeClass('current');
            jQuery(this).addClass('current');
            if (jQuery(".clientContainer").length) {
                var selector = jQuery(this).attr('data-filter');
                $container.isotope({
                    filter: selector,
                    animationOptions: {
                        duration: 750,
                        easing: 'linear',
                        queue: false
                    }
                });
            }
            return false;
        });
    });
	
	
    (function(jQuery) {
        var controller = new slidebars();
        controller.init();
        jQuery('.toggle-left').on('click', function(event) {
            event.preventDefault();
            event.stopPropagation();
            controller.toggle('sb-1');
            jQuery('.toggle-left').toggleClass("active");
        });
        jQuery('.toggle-right').on('click', function(event) {
            event.preventDefault();
            event.stopPropagation();
            controller.toggle('sb-2');
            jQuery('.toggle-right').toggleClass("active");
        });
        jQuery('.close-any').on('click', function(event) {
            if (controller.active('slidebar')) {
                event.preventDefault();
                event.stopPropagation();
                jQuery('.toggle-left').removeClass("active");
                jQuery('.toggle-right').removeClass("active");
                controller.close();
            }
        });
    })(jQuery);
    /*jQuery(".accordion_example2").smk_Accordion({
        closeAble: true,
    });*/
    jQuery('.menuslider').slick({
        dots: false,
        infinite: true,
        autoplay: true,
        speed: 1000,
        slidesToShow: 6,
        slidesToScroll: 6,
        pauseOnHover: true,
    });
    if (jQuery('div').hasClass('thmubnail')) {
        setInterval(function() {
            jQuery('.thmubnail').slick({
                autoplay: true,
                infinite: true,
                fade: true,
                cssEase: 'linear',
                arrows: false,
                slidesToShow: 1,
                slidesToScroll: 1,
                speed: 500
            })
        }, 1000);
    }
    if (jQuery('div').hasClass('thmubnail-1')) {
        setInterval(function() {
            jQuery('.thmubnail-1').slick({
                autoplay: true,
                infinite: true,
                fade: true,
                cssEase: 'linear',
                arrows: false,
                slidesToShow: 1,
                slidesToScroll: 1,
                speed: 500
            })
        }, 2000);
    }
    if (jQuery('div').hasClass('thmubnail-2')) {
        setInterval(function() {
            jQuery('.thmubnail-2').slick({
                autoplay: true,
                infinite: true,
                fade: true,
                cssEase: 'linear',
                arrows: false,
                slidesToShow: 1,
                slidesToScroll: 1,
                speed: 500
            })
        }, 3000);
    }
    if (jQuery('div').hasClass('thmubnail-3')) {
        setInterval(function() {
            jQuery('.thmubnail-3').slick({
                autoplay: true,
                infinite: true,
                fade: true,
                cssEase: 'linear',
                arrows: false,
                slidesToShow: 1,
                slidesToScroll: 1,
                speed: 500
            })
        }, 4000);
    }
    jQuery('.thmubnail-4').slick({
        autoplay: true,
        infinite: true,
        fade: true,
        cssEase: 'linear',
        arrows: false,
        slidesToShow: 1,
        slidesToScroll: 1,
        speed: 500
    });
    jQuery('.servicescontent').slick({
        autoplay: true,
        dots: true,
        infinite: true,
        arrows: false,
        slidesToShow: 3,
        slidesToScroll: 3,
        speed: 1000,
        autoplaySpeed: 12000,
        responsive: [{
            breakpoint: 850,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 2,
                infinite: true,
                dots: true
            }
        }, {
            breakpoint: 650,
            settings: {
                slidesToShow: 1,
                slidesToScroll: 1,
                dots: false
            }
        }]
    });
});
jQuery(document).ready(function() {
    new WOW().init();
    jQuery(".sticky-div").css("width", jQuery(".sticky-div ul").outerWidth() + 20);
});
if (jQuery('div').hasClass('thmubnail')) {
    jQuery('.thmubnail').slick({
        autoplay: true,
        infinite: true,
        fade: true,
        cssEase: 'linear',
        arrows: false,
        slidesToShow: 1,
        slidesToScroll: 1,
        speed: 500
    });
}
if (jQuery('div').hasClass('thmubnail-1')) {
    jQuery('.thmubnail-1').slick({
        autoplay: true,
        infinite: true,
        fade: true,
        cssEase: 'linear',
        arrows: false,
        slidesToShow: 1,
        slidesToScroll: 1,
        speed: 500
    });
}
if (jQuery('div').hasClass('thmubnail-2')) {
    jQuery('.thmubnail-2').slick({
        autoplay: true,
        infinite: true,
        fade: true,
        cssEase: 'linear',
        arrows: false,
        slidesToShow: 1,
        slidesToScroll: 1,
        speed: 500
    });
}
if (jQuery('div').hasClass('thmubnail-3')) {
    jQuery('.thmubnail-3').slick({
        autoplay: true,
        infinite: true,
        fade: true,
        cssEase: 'linear',
        arrows: false,
        slidesToShow: 1,
        slidesToScroll: 1,
        speed: 500
    });
}
jQuery("#show_map_1").click(function(event) {
    event.preventDefault();
    jQuery("#map_1").animate({
        right: "0%"
    }, 500, "linear");
    jQuery("#map_2").animate({
        right: "-100%"
    }, 500, "linear");
    jQuery("#map_3").animate({
        left: "-100%"
    }, 500, "linear");
    event.stopPropagation();
});
jQuery("#show_map_2").click(function(event) {
    event.preventDefault();
    jQuery("#map_2").animate({
        right: "0%"
    }, "slow", "linear");
    jQuery("#map_1").animate({
        right: "-100%"
    }, 500, "linear");
    jQuery("#map_3").animate({
        left: "-100%"
    }, 500, "linear");
    event.stopPropagation();
});
jQuery('.rev-rightarrow').click(function() {
    var temp = jQuery('#rev_slider_72_1_wrapper').revcurrentslide() + 1;
    var temp1 = parseInt(jQuery(".caption-slide").children().length) - 1;
    if (temp > temp1) {
        temp = 1;
    }
    jQuery(".caption-slide").attr("data-index", temp);
    setTimeout(function() {
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-caption").clearQueue().stop().slideUp(100, function() {});
    }, 400);
    setTimeout(function() {
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-action").html(jQuery(".caption-slide").find(".slider-info-div:eq(" + (temp) + ")").find(".slider-action").html());
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-caption").html(jQuery(".caption-slide").find(".slider-info-div:eq(" + (temp) + ")").find(".slider-caption").html());
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-action").html(jQuery(".caption-slide").find(".slider-info-div:eq(" + (temp) + ")").find(".slider-action").html());
    }, 900);
    setTimeout(function() {
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-caption").delay(300).slideDown(300, function() {});
    }, 2000);
    jQuery('#rev_slider_72_1_wrapper').revnext();
});
jQuery("#show_map_3").click(function(event) {
    event.preventDefault();
    jQuery("#map_3").animate({
        left: "0%"
    }, "slow", "linear");
    jQuery("#map_1").animate({
        right: "-100%"
    }, 500, "linear");
    jQuery("#map_2").animate({
        right: "-100%"
    }, 500, "linear");
    event.stopPropagation();
});
jQuery('.rev-leftarrow').click(function() {
    var temp = jQuery('#rev_slider_72_1_wrapper').revcurrentslide() - 1;
    if (temp == 0) temp = parseInt(jQuery(".caption-slide").children().length) - 1;
    jQuery(".caption-slide").attr("data-index", temp);
    setTimeout(function() {
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-caption").clearQueue().stop().slideUp(100, function() {});
    }, 400);
    setTimeout(function() {
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-caption").html(jQuery(".caption-slide").find(".slider-info-div:eq(" + (temp) + ")").find(".slider-caption").html());
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-action").html(jQuery(".caption-slide").find(".slider-info-div:eq(" + (temp) + ")").find(".slider-action").html());
    }, 900);
    setTimeout(function() {
        jQuery(".caption-slide").find(".slider-info-div:eq(0)").find(".slider-caption").delay(300).slideDown(300, function() {});
    }, 2000);
    jQuery('#rev_slider_72_1_wrapper').revprev();
});
jQuery("body").click(function(event) {
    jQuery("#map_1").animate({
        right: "-100%"
    }, 500, "linear");
    jQuery("#map_2").animate({
        right: "-100%"
    }, 500, "linear");
    jQuery("#map_3").animate({
        left: "-100%"
    }, 500, "linear");
});
jQuery(function() {
    jQuery("#typed").typed({
        stringsElement: jQuery('#typed-strings'),
        typeSpeed: 100,
        backDelay: 800,
        backSpeed: 30,
        loop: true,
        contentType: 'html',
        loopCount: true,
        callback: function() {
            foo();
        },
        resetCallback: function() {
            newTyped();
        }
    });
    jQuery(".reset").click(function() {
        jQuery("#typed").typed('reset');
    });
});

function newTyped() {}

function foo() {
    console.log("Callback");
}
var isMobile = false;
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4))) isMobile = true;
if (isMobile == 'true') {
    jQuery(document).ready(function() {
        jQuery("#filterby").click(function(event) {
            event.preventDefault();
            jQuery(".portfolioFilter").slideToggle(500);
        });
    });
} else {
    jQuery(document).ready(function() {
        jQuery("#filterby").hover(function() {
            jQuery(".portfolioFilter").stop().slideDown(500);
            jQuery(".portfolioFilter1").stop().slideDown(500);
        }, function() {
            jQuery(".portfolioFilter").stop().slideUp(500);
            jQuery(".portfolioFilter1").stop().slideUp(500);
        });
    });
}(function() {
    "use strict";
    var video, $output;
    var scale = 0.25;
    var initialize = function() {
        captureImage();
    };
    jQuery('.video-preview a').find('video')[0];
    jQuery('.video-preview a video').on("ended", function() {
        jQuery('.video-preview').css('background-color', 'rgba(0, 0, 0, 0.1))');
        jQuery('.video-preview a video').addClass('hide');
        jQuery('.in_active').removeClass('hide');
    });

    function captureImage() {
        jQuery('.video-preview a').each(function() {
            var video = jQuery(this).find('video')[0];
            var canvas = document.createElement("canvas");
            canvas.width = video.videoWidth * scale;
            canvas.height = video.videoHeight * scale;
            canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);
            var img = document.createElement("img");
            img.src = canvas.toDataURL();
        });
    };
    jQuery(initialize);
}());
jQuery('.video-preview a').on("click", '.video-box', function() {
    jQuery('.video-box').addClass('in_active').addClass('hide');
    jQuery('.video-box').removeClass('active_is');
    jQuery('.video').addClass('in_active_v');
    jQuery('.video').removeClass('active_v');
    jQuery(this).parent('a').find('video').get(0).play();
    jQuery(this).parent('a').find('video').removeClass('in_active_v').removeClass('hide').addClass('active_v');
    jQuery(this).parent('a').find('.video-box').addClass('active_is').removeClass('in_active');
});

jQuery(document).scroll(function() {
	var y = jQuery(this).scrollTop();
	if (y > 300) {
		jQuery('.show-policy-block').fadeIn();
		jQuery(".policy-block").removeClass("show-policy-block");
	} else {
		//jQuery('.signupfix').fadeOut();
	}
});

jQuery('.hide-policy-block').click(function(e){
	e.preventDefault();
	//$(".fixsignupfrm").hide();
	//$(".signupfront").show();
	document.cookie = "showPolicyBlockFooter=no";
	jQuery('.policy-block').fadeOut();
});