!function (e) {
"use strict";
var n = window.TWP_JS || {};
n.stickyMenu = function () {
e(window).scrollTop() > 350 ? e("#masthead").addClass("sticky") : e("#masthead").removeClass("sticky")
},
n.mobileMenu = {
init: function () {
this.toggleMenu(), this.addClassParent(), this.addRemoveClasses()
},
toggleMenu: function () {
var n = this,
t = e("#masthead");
e("#nav-toggle").click(function (a) {
a.preventDefault(), t.hasClass("open") ? (t.removeClass("open"), e(".menu").find("li").removeClass("show")) : (t.addClass("open"), n.showSubmenu())
})
},
addClassParent: function () {
e(".menu").find("li > ul").each(function () {
e(this).parent().addClass("parent")
})
},
addRemoveClasses: function () {
var n = e(".menu");
e(window).width() < 992 ? n.addClass("mobile") : (e("body").removeClass("open"), n.removeClass("mobile").find("li").removeClass("show"))
},
showSubmenu: function () {
e(".menu").find("a").each(function () {
var n = e(this);
n.next("ul").length && n.one("click", function (n) {
n.preventDefault(), e(this).parent().addClass("show")
})
})
}
},
n.TwpSearch = function () {
e('.search-button').click(function () {
e(".search-box").addClass("show-me");
e(".navbar-brand").addClass("hide");
e(".navbar-nav").addClass("hide");
e(".navbar-nav").addClass("hide");
});
e('.close-search').click(function () {
e(".search-box").removeClass("show-me");
e(".navbar-brand").removeClass("hide");
e(".navbar-nav").removeClass("hide");
e(".navbar-nav").removeClass("hide");
});
},
n.DataBackground = function () {
var pageSection = e(".data-bg");
pageSection.each(function (indx) {
if (e(this).attr("data-background")) {
e(this).css("background-image", "url(" + e(this).data("background") + ")");
}
});
},
n.TwpSlider = function () {
e(".Modern-Slider").slick({
autoplay: true,
autoplaySpeed: 10000,
speed: 600,
slidesToShow: 1,
slidesToScroll: 1,
pauseOnHover: false,
dots: true,
pauseOnDotsHover: true,
cssEase: 'linear',
fade: true,
// draggable: true,
prevArrow: '',
nextArrow: '',
});
e(".twp-testmonial").owlCarousel({
items: 1,
slideSpeed: 350,
singleItem: true,
autoHeight: true,
nav: true,
navText: [
"",
""
]
});
e(".twp-portfolio").owlCarousel({
items: 2,
responsive:{
0:{
items:1
},
600:{
items:2
}
},
loop: true,
slideSpeed: 350,
nav: true,
navText: [
"",
""
]
});
},
n.Skillprogress = function () {
var progressBar = e(".progress-bar");
progressBar.each(function(indx){
e(this).css("width", e(this).attr("aria-valuenow") + "%");
});
},
n.MagnificPopup = function () {
e('.zoom-gallery').magnificPopup({
delegate: 'a',
type: 'image',
closeOnContentClick: false,
closeBtnInside: false,
mainClass: 'mfp-with-zoom mfp-img-mobile',
image: {
verticalFit: true,
titleSrc: function (item) {
return item.el.attr('title');
}
},
gallery: {
enabled: true
},
zoom: {
enabled: true,
duration: 300,
opener: function (element) {
return element.find('img');
}
}
});
},
n.googlemap = function () {
google.maps.event.addDomListener(window, 'load', initialize);
function initialize() {
var mapOptions = {
zoom: 14,
center: new google.maps.LatLng(27.702871, 85.318244), // Kathmandu (change Co-ordinates here)
scrollwheel: false,
styles: [{
"featureType": "all",
"elementType": "labels.text.fill",
"stylers": [{"saturation": 36}, {"color": "#000000"}, {"lightness": 40}]
}, {
"featureType": "all",
"elementType": "labels.text.stroke",
"stylers": [{"visibility": "on"}, {"color": "#000000"}, {"lightness": 16}]
}, {
"featureType": "all",
"elementType": "labels.icon",
"stylers": [{"visibility": "off"}]
}, {
"featureType": "administrative",
"elementType": "geometry.fill",
"stylers": [{"color": "#000000"}, {"lightness": 20}]
}, {
"featureType": "administrative",
"elementType": "geometry.stroke",
"stylers": [{"color": "#000000"}, {"lightness": 17}, {"weight": 1.2}]
}, {
"featureType": "landscape",
"elementType": "geometry",
"stylers": [{"color": "#000000"}, {"lightness": 20}]
}, {
"featureType": "poi",
"elementType": "geometry",
"stylers": [{"color": "#000000"}, {"lightness": 21}]
}, {
"featureType": "road.highway",
"elementType": "geometry.fill",
"stylers": [{"color": "#000000"}, {"lightness": 17}]
}, {
"featureType": "road.highway",
"elementType": "geometry.stroke",
"stylers": [{"color": "#000000"}, {"lightness": 29}, {"weight": 0.2}]
}, {
"featureType": "road.arterial",
"elementType": "geometry",
"stylers": [{"color": "#000000"}, {"lightness": 18}]
}, {
"featureType": "road.local",
"elementType": "geometry",
"stylers": [{"color": "#000000"}, {"lightness": 16}]
}, {
"featureType": "transit",
"elementType": "geometry",
"stylers": [{"color": "#000000"}, {"lightness": 19}]
}, {
"featureType": "water",
"elementType": "geometry",
"stylers": [{"color": "#000000"}, {"lightness": 17}]
}]
};
var mapElement = document.getElementById('map');
var map = new google.maps.Map(mapElement, mapOptions);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(27.702871, 85.318244),
map: map,
icon: map.marker,
title: 'Find us here!'
});
}
},
n.tooglemap = function () {
e(".map-container").click(function () {
e(this).toggleClass("js-active");
e(this).find(".map-toggle-open").toggle();
e(this).find(".map-toggle-close").toggle();
});
},
e(document).ready(function () {
n.mobileMenu.init(), n.TwpSearch(), n.DataBackground(), n.TwpSlider(), n.MagnificPopup(), /*n.googlemap(),*/ n.tooglemap()
}), e(window).scroll(function () {
n.stickyMenu(), n.Skillprogress()
}), e(window).resize(function () {
n.mobileMenu.addRemoveClasses()
})
}(jQuery);