$(document).ready(function(){
// this code is for parallax
$('.feature_area_parallax_bg').parallax("50%",0.3);
// this code is for venobox
$(".vide_area_venobox").venobox({
titleattr: 'data-title',
});
// this code is for creative team area
$(".creative_team_area_slides_lists").owlCarousel({
loop:true,
nav:true,
navText: ["", ""],
margin: 30,
responsive:{
1200:{
items: 4,
},
992:{
items: 3,
},
768:{
items: 3,
},
300:{
items: 1,
},
480:{
items: 2,
},
}
});
// this code is for customer_area
$(".customer_area_slides_lists").owlCarousel({
items:2,
loop:true,
nav:true,
navText: ["", ""],
autoplay:true,
margin: 30,
responsive:{
1200:{
items: 2,
},
992:{
items: 2,
},
768:{
items: 2,
},
300:{
items: 1,
},
480:{
items: 1,
}
},
});
// this code is for blog_area
$(".blog_area_slides_lists").owlCarousel({
items:2,
loop:true,
nav:true,
navText: ["", ""],
autoplay:true,
margin: 30,
responsive:{
1200:{
items: 2,
},
992:{
items: 2,
},
768:{
items: 2,
},
300:{
items: 1,
},
480:{
items: 1,
}
},
});
// this code is for brand_area
$(".brand_area_slider").owlCarousel({
loop: true,
autoplay: true,
autoplayTimeout: 3000,
margin: 50,
responsive:{
1200:{
items: 3,
},
992:{
items: 2,
},
768:{
items: 2,
},
300:{
items: 2,
},
480:{
items: 2,
},
}
});
// this code is for single portfolio page slider area
$(".single_portfolio_one .single_portfolio_slider_area_left").owlCarousel({
items:1,
loop: true,
autoplay: true,
autoplayTimeout: 3000,
});
$(".single_portfolio_two .single_portfolio_slider_area_left").owlCarousel({
items: 2,
loop: true,
autoplay: true,
autoplayTimeout: 3000,
margin: 10,
responsive:{
1200:{
items: 2,
},
992:{
items: 2,
},
768:{
items: 2,
},
300:{
items: 1,
},
480:{
items: 1,
},
}
});
// this code is for slider_one versiion
$(".slider_one_carousel").owlCarousel({
items:1,
loop: true,
autoplay: false,
autoplayTimeout: 3000,
nav:true,
navText: ["", ""],
smartSpeed: 2000,
animateIn: 'fadeIn',
animateOut: 'fadeOut'
});
$('.slider_one_carousel').on('translated.owl.carousel', function(){
$('.owl-item .hero_area_content h1').removeClass('animated fadeInLeft');
$('.owl-item .hero_area_content p').removeClass('animated fadeInLeft');
$('.owl-item .hero_area_content .hero_area_btn').removeClass('animate fadeInLeft');
});
$('.slider_one_carousel').on('translate.owl.carousel', function(){
$('.owl-item.active .hero_area_content h1').addClass('animated fadeInLeft').delay(100);
$('.owl-item.active .hero_area_content p').addClass('animated fadeInLeft').delay(100);
$('.owl-item.active .hero_area_content .hero_area_btn').addClass('animated fadeInLeft').delay(100);
});
// this code is for slider_two versiion
$(".slider_two_carousel").owlCarousel({
items:1,
loop: true,
autoplayTimeout: 3000,
nav:true,
navText: ["", ""],
smartSpeed: 2000,
animateOut: 'zoomOut',
animateIn: 'zoomIn',
});
//this code is for counter up
$('.counter').counterUp({
delay: 10,
time: 2000,
});
//this code is for scroll to top
$(".scroll_top").click(function(){
$("html,body").animate({scrollTop:0},1000);
});
//this code is for discover more button
$(".btn_bg").click(function() {
$('html,body').animate({
scrollTop: $(".provide_area").offset().top},
1000);
});
$(".btn_v_2").click(function() {
$('html,body').animate({
scrollTop: $(".about_area").offset().top},
1000);
});
//this code is for preloader
$("body").addClass("preloader_active");
//this code is for pricing_table hover effect for index-two
$(".index_two .single_table, .single_service_one .single_table").mouseenter(function(){
$(".index_two .single_table, .single_service_one .single_table").removeClass("active");
$(this).addClass("active");
});
$(".index_two .single_table, .single_service_one .single_table").mouseleave(function(){
$(this).removeClass("active");
$(".single_table_active").addClass("active");
});
// this code is for mobile drop-down menu
// this code is for slide down //
$('.dropdown').on('show.bs.dropdown', function(e){
$(this).find('.dropdown-menu').first().stop(true, true).slideDown();
});
// this code is for slide up //
$('.dropdown').on('hide.bs.dropdown', function(e){
$(this).find('.dropdown-menu').first().stop(true, true).slideUp();
});
// this code is for youtube video background
$(function(){
$(".player").YTPlayer();
});
});
// this code is for wow.js
new WOW().init();
// this code is for preloader
$(window).load(function() {
// makes sure the whole site is loaded
$('#preloader').fadeOut(); // will first fade out the loading animation
$('.preloader_spinner').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website.
$("body").removeClass("preloader_active");
})
// this code is for body height 100%
$(window).bind('resizeEnd', function () {
$(".menu_slider_wrapper").height($(window).height());
});
$(window).resize(function () {
if (this.resizeTO) clearTimeout(this.resizeTO);
this.resizeTO = setTimeout(function () {
$(this).trigger('resizeEnd');
}, 300);
}).trigger("resize");
// this code is for sticky menu
$(window).scroll(function () {
function sticky_relocate() {
var window_top = ($(window).scrollTop() >= 10);
var div_top = $('#sticky_anchor').offset().top;
if (window_top > div_top) {
$('.header_area').addClass('sticky');
$('#sticky_anchor').height($('.header_area').outerHeight());
} else {
$('.header_area').removeClass('sticky');
$('#sticky_anchor').height(0);
}
}
$(function() {
$(window).scroll(sticky_relocate);
sticky_relocate();
});
});