jQuery(document).ready(function ($) {
	$(".user-profile-act").parent().parent().css("display", "block");
	//$('.user-profile-act').parent().parent().parent().css("display","block");
	$(".user-profile-act").closest(".accordion_body").css("display", "block");
	$(".accordion_head-2.set-module").parent().css("margin-bottom", "8px");
	$("#myelement").click(function () {
		$("#another-element").slideToggle();
		//$(".change-country").hide();
	});

	$("#myelement-hometop").click(function () {
		$("#another-element").slideToggle();
		$("#main-overlay").hide();
	});

	//$(".close-tip").click(function(){
	//$(".change-country").hide();
	//$('#another-element').slideToggle();
	//});
	$(document).ready(function () {
		$("#country_change").change(function () {
			$("#changeme").val($(this).val());
			document.getElementById("change_location").submit();
		});
	});
	//$(document).ready(function(){
	// $('#anchor_blank a').attr('target', '_blank');
	//});

	//$(document).ready(function () {
	//$('.list-single-main-wrapper h1:not(:nth-child(2))').each(function (i, el) {
	//$(el).replaceWith('<h2>' + $(el).html() +'</h2>')
	//});
	//});

	$(document).ready(function () {
		$("h1:not(:nth-child(-n+2))").addClass("title-secondary");

		document.querySelectorAll("h1.title-secondary").forEach((h1) => {
			const h2 = document.createElement("h2");
			h2.innerHTML = h1.innerHTML;
			h1.replaceWith(h2);
		});

		$(".link-new-tab a").attr("target", "_blank");
		$(".blog-link pre").replaceWith(function () {
			return $("<div/>", {
				html: this.innerHTML,
			});
		});

		$('.list-single-main-item.blog.full-view a[href*="#"]:not([href="#"])').click(function () {
			var offset = -100; // <-- change the value here
			if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) {
				var target = $(this.hash);
				target = target.length ? target : $("[name=" + this.hash.slice(1) + "]");
				if (target.length) {
					$("html, body").animate(
						{
							scrollTop: target.offset().top + offset,
						},
						1000
					);
					return false;
				}
			}
		});
	});

	//$('.list-single-main-item.blog-link img').wrap('<figure class="img-left"></figure>');
	//$('#article .list-single-main-item img').wrap('<figure class="img-left"></figure>');
	//$("p figure.img-left").parent().parent().contents().unwrap();

	//$("p a figure.img-left").parent().parent().contents().unwrap();
	$(".list-single-main-item.blog-link *").removeAttr("style");
	$("#article .list-single-main-item *").removeAttr("style");
	$("#article .list-single-main-item img").remove();
	$("#article .list-single-main-item").css("padding", "30px");
	//$(".list-single-main-item.blog-link p").removeAttr("style");
	//$(".list-single-main-item.blog-link span").removeAttr("style");
	//$("#article .list-single-main-item p").removeAttr("style");
	//$(".list-single-main-item.blog-link div").removeAttr("style");
	//$("#article .list-single-main-item span").removeAttr("style");
	//$("article.card-post .card-post-content p").removeAttr("style");
	//$("article.card-post .card-post-content h3").removeAttr("style");

	$(".list-single-main-item.blog-link.full-view h2 img").each(function () {
		$(this).insertAfter($(this).parent());
	});

	$(".list-single-main-item.blog-link.full-view h3 img").each(function () {
		$(this).insertAfter($(this).parent());
	});

	$(".list-single-main-wrapper.article *").removeAttr("style");

	$(".blog-img img").remove();
	$(".list-single-main-item.blog-link  p span").contents().unwrap().siblings("span").remove();
	$(".list-single-main-item.blog-link  a span").contents().unwrap().siblings("span").remove();

	$("#toogle-search").click(function () {
		$(".advanced-search").toggle();
	});

	$("#hours-bottom").click(function () {
		$("html, body").animate(
			{
				scrollTop: $("#working-hours").offset().top - 150,
			},
			1000
		);
	});

	$(".tab-link").click(function () {
		var tabID = $(this).attr("data-tab");
		$(this).addClass("active-tab").siblings().removeClass("active-tab");
		$("#tab-" + tabID)
			.addClass("active-tab")
			.siblings()
			.removeClass("active-tab");
	});

	$(".blog-link.full-view").each(function () {
		$(this).find("img:first").addClass("post-first-img");
	});

	$(".blog.full-view").each(function () {
		$(this).find("img:first").addClass("post-first-img");
	});

	$(".blog.full-view img").removeAttr("style");
});

jQuery(document).ready(function ($) {});

function initCitybook() {
	"use strict";
	$(".loader-wrap").fadeOut(300, function () {
		$("#main").animate({ opacity: "1" }, 300);
	}),
		$(".bg").each(function (e) {
			$(this).attr("data-bg") && $(this).css("background-image", "url(" + $(this).data("bg") + ")");
		}),
		$(".fixed-bar").scrollToFixed({
			minWidth: 1064,
			marginTop: 90,
			removeOffsets: !0,
			limit: function () {
				return $(".limit-box").offset().top - $(".fixed-bar").outerHeight() - 70;
			},
		}),
		$(".back-to-filters").scrollToFixed({
			minWidth: 1224,
			zIndex: 12,
			marginTop: 130,
			removeOffsets: !0,
			limit: function () {
				return $(".limit-box").offset().top - $(".back-to-filters").outerHeight(!0) - 10;
			},
		}),
		$(".scroll-nav-wrapper").scrollToFixed({
			minWidth: 768,
			zIndex: 12,
			marginTop: 80,
			removeOffsets: !0,
			limit: function () {
				return $(".limit-box").offset().top - $(".scroll-nav-wrapper").outerHeight(!0) - 10;
			},
		}),
		(function () {
			if ($(".gallery-items").length) {
				var e = $(".gallery-items").isotope({
					singleMode: !0,
					columnWidth: ".grid-sizer, .grid-sizer-second, .grid-sizer-three",
					itemSelector: ".gallery-item, .gallery-item-second, .gallery-item-three",
					transformsEnabled: !0,
					transitionDuration: "700ms",
					resizable: !0,
				});
				e.imagesLoaded(function () {
					e.isotope("layout");
				}),
					$(".gallery-filters").on("click", "a.gallery-filter", function (i) {
						var t = $(this).attr("data-filter");
						$(this).text(), i.preventDefault(), (t = $(this).attr("data-filter")), e.isotope({ filter: t }), $(".gallery-filters a.gallery-filter").removeClass("gallery-filter-active"), $(this).addClass("gallery-filter-active");
					});
			}
		})();
	var e = $(".swiper-button-prev"),
		i = $(".swiper-button-next");
	$(".fw-carousel").slick({ dots: !0, infinite: !0, speed: 600, slidesToShow: 1, centerMode: !1, arrows: !1, variableWidth: !0 }),
		e.on("click", function () {
			$(".fw-carousel").slick("slickPrev");
		}),
		i.on("click", function () {
			$(".fw-carousel").slick("slickNext");
		}),
		$(".slideshow-container").slick({ slidesToShow: 1, autoplay: !0, autoplaySpeed: 5e3, arrows: !1, fade: !0, cssEase: "ease-in", infinite: !0, speed: 1e3 }),
		$(".single-slider").slick({ infinite: !0, slidesToShow: 1, dots: !0, arrows: !1, adaptiveHeight: !0 }),
		e.on("click", function () {
			$(this).closest(".single-slider-wrapper").find(".single-slider").slick("slickPrev");
		}),
		i.on("click", function () {
			$(this).closest(".single-slider-wrapper").find(".single-slider").slick("slickNext");
		}),
		$(".slider-container").slick({ infinite: !0, slidesToShow: 1, dots: !0, arrows: !1 }),
		$(".slider-container").on("init", function (e, i) {
			initAutocomplete();
		}),
		e.on("click", function () {
			$(this).closest(".slider-container-wrap").find(".slider-container").slick("slickPrev");
		}),
		i.on("click", function () {
			$(this).closest(".slider-container-wrap").find(".slider-container").slick("slickNext");
		}),
		$(".single-carousel").slick({
			infinite: !0,
			slidesToShow: 3,
			dots: !0,
			arrows: !1,
			centerMode: !0,
			responsive: [
				{ breakpoint: 1224, settings: { slidesToShow: 2, centerMode: !1 } },
				{ breakpoint: 768, settings: { slidesToShow: 1, centerMode: !0 } },
			],
		}),
		e.on("click", function () {
			$(this).closest(".carousel ").find(".single-carousel").slick("slickPrev");
		}),
		i.on("click", function () {
			$(this).closest(".carousel").find(".single-carousel").slick("slickNext");
		}),
		$(".listing-carousel").slick({
			infinite: !0,
			slidesToShow: 5,
			dots: !0,
			loop: !1,
			arrows: !1,
			centerMode: !0,
			centerPadding: "0",
			responsive: [
				{ breakpoint: 1500, settings: { slidesToShow: 4 } },
				{ breakpoint: 1224, settings: { slidesToShow: 3 } },
				{ breakpoint: 1024, settings: { slidesToShow: 2 } },
				{ breakpoint: 800, settings: { slidesToShow: 1 } },
			],
		}),
		e.on("click", function () {
			$(this).closest(".list-carousel").find(".listing-carousel").slick("slickPrev");
		}),
		i.on("click", function () {
			$(this).closest(".list-carousel").find(".listing-carousel").slick("slickNext");
		}),
		$(".client-carousel").slick({
			infinite: !0,
			slidesToShow: 5,
			dots: !1,
			arrows: !1,
			centerMode: !0,
			responsive: [
				{ breakpoint: 1224, settings: { slidesToShow: 4, centerMode: !1 } },
				{ breakpoint: 768, settings: { slidesToShow: 2, centerMode: !0 } },
			],
		}),
		$(".sp-cont-prev").on("click", function () {
			$(this).closest(".spons-list").find(".client-carousel").slick("slickPrev");
		}),
		$(".sp-cont-next").on("click", function () {
			$(this).closest(".spons-list").find(".client-carousel").slick("slickNext");
		}),
		$('<div class="bubbles"></div>').appendTo(".bubble-bg");
	for (var t = [], n = [5, 10, 15, 20], o = 0; o < $(".bubbles").width(); o++) t.push(o);
	function a(e) {
		return e[Math.floor(Math.random() * e.length)];
	}
	setInterval(function () {
		var e = a(n);
		$(".bubbles").append('<div class="individual-bubble" style="left: ' + a(t) + "px; width: " + e + "px; height:" + e + 'px;"></div>'),
			$(".individual-bubble").fadeOut(5e3, function () {
				$(this).remove();
			});
	}, 350),
		$(".image-popup").lightGallery({ selector: "this", cssEasing: "cubic-bezier(0.25, 0, 0.25, 1)", download: !1, counter: !1 });
	var s = $(".lightgallery");
	s.data("looped");
	s.lightGallery({ selector: ".lightgallery a.popup-image", cssEasing: "cubic-bezier(0.25, 0, 0.25, 1)", download: !1, loop: !1, counter: !1 }),
		$(".stats").appear(function () {
			$(".num").countTo();
		}),
		$(".share-container").share({ networks: ["facebook", "pinterest", "googleplus", "twitter", "linkedin"] });
	var l = $(".share-container");
	if (
		($(".showshare").on("click", function () {
			$(this).toggleClass("vis-butsh"),
				$(this)
					.find("span")
					.text("Close" === $(this).text() ? "Share" : "Close"),
				$(".share-container").hasClass("isShare") ? (l.removeClass("isShare"), l.addClass("visshare")) : (l.addClass("isShare"), l.removeClass("visshare"));
		}),
			$(".accordion a.toggle").on("click", function (e) {
				e.preventDefault(),
					$(".accordion a.toggle").removeClass("act-accordion"),
					$(this).addClass("act-accordion"),
					$(this).next("div.accordion-inner").is(":visible") ? $(this).next("div.accordion-inner").slideUp() : ($(".accordion a.toggle").next("div.accordion-inner").slideUp(), $(this).next("div.accordion-inner").slideToggle());
			}),
			$(".tabs-menu a").on("click", function (e) {
				e.preventDefault(), $(this).parent().addClass("current"), $(this).parent().siblings().removeClass("current");
				var i = $(this).attr("href");
				$(".tab-content").not(i).css("display", "none"), $(i).fadeIn();
			}),
		$("#footer-twiit").length > 0)
	) {
		twitterFetcher.fetch({ profile: { screenName: "envatomarket" }, domId: "footer-twiit", maxTweets: 2, enableLinks: !0, showImages: !1 });
	}
	$(document).on("submit", "#contactform", function () {
		var e = $(this).attr("action");
		return (
			$("#message").slideUp(750, function () {
				$("#message").hide(),
					$("#submit").attr("disabled", "disabled"),
					$.post(e, { name: $("#name").val(), email: $("#email").val(), comments: $("#comments").val() }, function (e) {
						(document.getElementById("message").innerHTML = e), $("#message").slideDown("slow"), $("#submit").removeAttr("disabled"), null != e.match("success") && $("#contactform").slideDown("slow");
					});
			}),
				!1
		);
	}),
		$(document).on("keyup", "#contactform input, #contactform textarea", function () {
			$("#message").slideUp(1500);
		}),
		$("#subscribe").ajaxChimp({ language: "eng", url: "http://kwst.us18.list-manage.com/subscribe/post?u=42df802713d4826a4b137cd9e&id=815d11e811" }),
		($.ajaxChimp.translations.eng = {
			submit: "Submitting...",
			0: '<i class="fa fa-check"></i> We will be in touch soon!',
			1: '<i class="fa fa-warning"></i> You must enter a valid e-mail address.',
			2: '<i class="fa fa-warning"></i> E-mail address is not valid.',
			3: '<i class="fa fa-warning"></i> E-mail address is not valid.',
			4: '<i class="fa fa-warning"></i> E-mail address is not valid.',
			5: '<i class="fa fa-warning"></i> E-mail address is not valid.',
		});
	var r = $(".background-youtube-wrapper").data("vid"),
		d = $(".background-youtube-wrapper").data("mv");
	$(".background-youtube-wrapper").YTPlayer({
		fitToBackground: !0,
		videoId: r,
		pauseOnScroll: !0,
		mute: d,
		callback: function () {
			$(".background-youtube-wrapper").data("ytPlayer").player;
		},
	});
	var c = $(".background-vimeo").data("vim"),
		u = $(".background-vimeo"),
		h = $(".media-container"),
		f = $(".background-vimeo iframe "),
		m = $(".video-container");
	u.append('<iframe src="//player.vimeo.com/video/' + c + '?background=1"  frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),
		$(".video-holder").height(h.height()),
		$(window).width() > 1024
			? $(".video-holder").length > 0 &&
			((h.height() / 9) * 16 > h.width()
				? (f.height(h.height()).width((h.height() / 9) * 16), f.css({ "margin-left": (-1 * $("iframe").width()) / 2 + "px", top: "-75px", "margin-top": "0px" }))
				: (f.width($(window).width()).height(($(window).width() / 16) * 9), f.css({ "margin-left": (-1 * $("iframe").width()) / 2 + "px", "margin-top": (-1 * $("iframe").height()) / 2 + "px", top: "50%" })))
			: ($(window).width(), $(".video-holder").height(h.height()), f.height(h.height())),
		m.css("width", $(window).width() + "px"),
		m.css("height", 0.5625 * $(window).width()),
	m.height() < $(window).height() && (m.css("height", $(window).height() + "px"), m.css("width", (1280 / 720) * $(window).height())),
		$(".custom-scroll-link").on("click", function () {
			var e = 70 + $(".scroll-nav-wrapper").height();
			if (location.pathname.replace(/^\//, "") === this.pathname.replace(/^\//, "") || location.hostname === this.hostname) {
				var i = $(this.hash);
				if ((i = i.length ? i : $("[name=" + this.hash.slice(1) + "]")).length) return $("html,body").animate({ scrollTop: i.offset().top - e }, { queue: !1, duration: 1200, easing: "easeInOutExpo" }), !1;
			}
		}),
		$(".scroll-init  ul ").singlePageNav({ filter: ":not(.external)", updateHash: !1, offset: 110, threshold: 120, speed: 1200, currentClass: "act-scrlink" }),
		$(".to-top").on("click", function (e) {
			return e.preventDefault(), $("html, body").animate({ scrollTop: 0 }, 800), !1;
		}),
		$(window).on("scroll", function (e) {
			$(this).scrollTop() > 150 ? $(".to-top").fadeIn(500) : $(".to-top").fadeOut(500);
		}),
		$(".images-collage-item").each(function () {
			var e = $(this),
				i = e.data("position-left"),
				t = e.data("position-top"),
				n = e.data("zindex");
			e.css({ top: t + "%" }), e.css({ "z-index": n }), e.css({ left: i + "%" });
		});
	var p = {
		hide: function () {
			$(".modalsignin").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-signin").on("click", function (e) {
		e.preventDefault(), $(".modalsignin").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			p.hide();
		});
	var g = {
		hide: function () {
			$(".modalpaypal1").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-paypal1").on("click", function (e) {
		e.preventDefault(), $(".modalpaypal1").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			g.hide();
		});
	var b = {
		hide: function () {
			$(".modalpaypal2").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-paypal2").on("click", function (e) {
		e.preventDefault(), $(".modalpaypal2").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			b.hide();
		});
	var v = {
		hide: function () {
			$(".modalpaypal3").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-paypal3").on("click", function (e) {
		e.preventDefault(), $(".modalpaypal3").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			v.hide();
		});
	var h = {
		hide: function () {
			$(".modalpaypal4").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-paypal4").on("click", function (e) {
		e.preventDefault(), $(".modalpaypal4").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			h.hide();
		});
	var y = {
		hide: function () {
			$(".modalstripe1").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-stripe1").on("click", function (e) {
		e.preventDefault(), $(".modalstripe1").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			y.hide();
		});
	var w = {
		hide: function () {
			$(".modalstripe2").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-stripe2").on("click", function (e) {
		e.preventDefault(), $(".modalstripe2").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			w.hide();
		});
	var k = {
		hide: function () {
			$(".modalstripe3").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-stripe3").on("click", function (e) {
		e.preventDefault(), $(".modalstripe3").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			k.hide();
		});
	var C = {
		hide: function () {
			$(".modallistingsamp1").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-listingsample-1").on("click", function (e) {
		e.preventDefault(), $(".modallistingsamp1").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			C.hide();
		});
	var x = {
		hide: function () {
			$(".modallistingsamp2").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-listingsample-2").on("click", function (e) {
		e.preventDefault(), $(".modallistingsamp2").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			x.hide();
		});
	var I = {
		hide: function () {
			$(".modallistingsamp3").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-listingsample-3").on("click", function (e) {
		e.preventDefault(), $(".modallistingsamp3").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			I.hide();
		});
	var D = {
		hide: function () {
			$(".modalreseldeact").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-reseldeactive").on("click", function (e) {
		e.preventDefault(), $(".modalreseldeact").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			D.hide();
		});
	var T = {
		hide: function () {
			$(".signupwebsite").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".signup-website").on("click", function (e) {
		e.preventDefault(), $(".signupwebsite").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			T.hide();
		});
	var O = {
		hide: function () {
			$(".signupim").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".signup-im").on("click", function (e) {
		e.preventDefault(), $(".signupim").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			O.hide();
		});
	var S = {
		hide: function () {
			$(".signupem").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".signup-em").on("click", function (e) {
		e.preventDefault(), $(".signupem").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			S.hide();
		});
	var z = {
		hide: function () {
			$(".signupdbm").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".signup-dbm").on("click", function (e) {
		e.preventDefault(), $(".signupdbm").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			z.hide();
		});
	var M = {
		hide: function () {
			$(".modaljob").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".modal-job").on("click", function (e) {
		e.preventDefault(), $(".modaljob").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			M.hide();
		});
	var E = {
		hide: function () {
			$(".memvideo").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".mem-video").on("click", function (e) {
		e.preventDefault(), $(".memvideo").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			E.hide();
		});
	var B = {
		hide: function () {
			$(".memkeyword").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".mem-keyword").on("click", function (e) {
		e.preventDefault(), $(".memkeyword").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			B.hide();
		});
	var P = {
		hide: function () {
			$(".categorywise").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".category-wise").on("click", function (e) {
		e.preventDefault(), $(".categorywise").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			P.hide();
		});
	var _ = {
		hide: function () {
			$(".bizpreview").fadeOut(), $("html, body").removeClass("hid-body");
		},
	};
	$(".biz-preview").on("click", function (e) {
		e.preventDefault(), $(".bizpreview").fadeIn(), $("html, body").addClass("hid-body");
	}),
		$(".close-reg").on("click", function () {
			_.hide();
		}),
		$(".more-filter-option").on("click", function () {
			$(".hidden-listing-filter").slideToggle(500), $(this).find("span").toggleClass("mfilopact");
		}),
		$(".show-search-button").on("click", function () {
			$(".vis-header-search").slideToggle(500);
		}),
		$(".listing-view-layout li a.list").on("click", function (e) {
			e.preventDefault(), $(".listing-view-layout li a").removeClass("active"), $(".listing-item").addClass("list-layout"), $(this).addClass("active");
		}),
		$(".listing-view-layout li a.grid").on("click", function (e) {
			e.preventDefault(), $(".listing-view-layout li a").removeClass("active"), $(".listing-item").removeClass("list-layout"), $(this).addClass("active");
		}),
		$(document).on("change", ".leave-rating input", function () {
			var e = $(this);
			$(".leave-rating .selected").removeClass("selected"), e.closest("label").addClass("selected");
		}),
		$(".chosen-select").niceSelect(),
		$('input[type="range"].distance-radius').rangeslider({
			polyfill: !1,
			onInit: function () {
				this.output = $(".distance-title span").html(this.$element.val());
			},
			onSlide: function (e, i) {
				this.output.html(i);
			},
		}),
		$("input.datepicker").dateDropper(),
		$("input.timepicker").timeDropper({ setCurrentTime: !1, meridians: !0, primaryColor: "#4DB7FE", borderColor: "#4DB7FE", minutesInterval: "15" }),
		$(".eye").on("click touchstart", function () {
			var e = $(this).parent(".pass-input-wrap").find("input");
			"password" === e.attr("type") ? e.attr("type", "text") : e.attr("type", "password");
		});
	var A,
		j,
		q,
		N,
		H,
		W,
		F,
		U = $("#weather-widget").data("city");
	function L() {
		$(".height-emulator").css({ height: $(".fixed-footer").outerHeight(!0) }),
			$(".slideshow-container .slideshow-item").css({ height: $(".slideshow-container").outerHeight(!0) }),
			$(".slider-container .slider-item").css({ height: $(".slider-container").outerHeight(!0) }),
			$(".map-container.column-map").css({ height: $(window).outerHeight(!0) - 80 + "px" });
	}
	function Q() {
		$(window).width() < 1064
			? ($(".menusb").remove(), $(".main-menu").removeClass("nav-holder"), $(".main-menu nav").clone().addClass("menusb").appendTo(".main-menu"), $(".menusb").menu())
			: ($(".menusb").remove(), $(".main-menu").addClass("nav-holder"));
	}
	if (
		($("#weather-widget").ideaboxWeather({ location: U }),
		$("footer.main-footer").hasClass("fixed-footer") && $('<div class="height-emulator fl-wrap"></div>').appendTo("#main"),
			L(),
			$(".nav-button-wrap").on("click", function () {
				$(".main-menu").toggleClass("vismobmenu");
			}),
			Q(),
			$(window).on("resize", function () {
				L(), Q();
			}),
			$(".box-cat").on({
				mouseenter: function () {
					var e = $(this).data("bgscr");
					$(".bg-ser").css("background-image", "url(" + e + ")");
				},
			}),
			$(".header-user-name").on("click", function () {
				$(".header-user-menu ul").toggleClass("hu-menu-vis"), $(this).toggleClass("hu-menu-visdec");
			}),
		$(".counter-widget").length > 0)
	) {
		var G = $(".counter-widget").attr("data-countDate");
		$(".countdown").downCount({ date: G, offset: 0 });
	}
	$(".booking-modal-close , .bmw-overlay").on("click", function () {
		$(".booking-modal-wrap , .bmw-overlay").fadeOut(400), $("html, body").removeClass("hid-body");
	}),
		$(".book-btn").on("click", function (e) {
			e.preventDefault(), $(".booking-modal-wrap , .bmw-overlay").fadeIn(400), $("html, body").addClass("hid-body");
		}),
		$(".next-form").on("click", function (e) {
			if ((e.preventDefault(), F)) return !1;
			(F = !0),
				(A = $(this).parent()),
				(j = $(this).parent().next()),
				$("#progressbar li").eq($(".bookiing-form-wrap fieldset").index(j)).addClass("active"),
				j.show(),
				A.animate(
					{ opacity: 0 },
					{
						step: function (e, i) {
							(W = 1 - 0.2 * (1 - e)), (N = 50 * e + "%"), (H = 1 - e), A.css({ transform: "scale(" + W + ")", position: "absolute" }), j.css({ left: N, opacity: H, position: "relative" });
						},
						duration: 1200,
						complete: function () {
							A.hide(), (F = !1);
						},
						easing: "easeInOutBack",
					}
				);
		}),
		$(".back-form").on("click", function (e) {
			if ((e.preventDefault(), F)) return !1;
			(F = !0),
				(A = $(this).parent()),
				(q = $(this).parent().prev()),
				$("#progressbar li").eq($(".bookiing-form-wrap fieldset").index(A)).removeClass("active"),
				q.show(),
				A.animate(
					{ opacity: 0 },
					{
						step: function (e, i) {
							(W = 0.8 + 0.2 * (1 - e)), (N = 50 * (1 - e) + "%"), (H = 1 - e), A.css({ left: N, position: "absolute" }), q.css({ transform: "scale(" + W + ")", opacity: H, position: "relative" });
						},
						duration: 1200,
						complete: function () {
							A.hide(), (F = !1);
						},
						easing: "easeInOutBack",
					}
				);
		});
}
function initparallax() {
	var e = {
		Android: function () {
			return navigator.userAgent.match(/Android/i);
		},
		BlackBerry: function () {
			return navigator.userAgent.match(/BlackBerry/i);
		},
		iOS: function () {
			return navigator.userAgent.match(/iPhone|iPad|iPod/i);
		},
		Opera: function () {
			return navigator.userAgent.match(/Opera Mini/i);
		},
		Windows: function () {
			return navigator.userAgent.match(/IEMobile/i);
		},
		any: function () {
			return e.Android() || e.BlackBerry() || e.iOS() || e.Opera() || e.Windows();
		},
	};
	if (((trueMobile = e.any()), null === trueMobile)) {
		var i = new Scrollax();
		i.reload(), i.init();
	}
	trueMobile && $(".bgvid , .background-vimeo , .background-youtube-wrapper ").remove();
}
function cardRaining() {
	($.fn.duplicate = function (e, i) {
		for (var t = [], n = 0; n < e; n++) $.merge(t, this.clone(i).get());
		return this.pushStack(t);
	}),
		$(".card-popup-raining").each(function (e) {
			var i = $(this).attr("data-starrating");
			$("<i class='fa fa-star'></i>").duplicate(i).prependTo(this);
		});
}
cardRaining();
var cr2 = $(".card-popup-rainingvis");
function initAutocomplete() {
	var e = document.getElementById("autocomplete-input"),
		i = new google.maps.places.Autocomplete(e);
	i.addListener("place_changed", function () {
		var e = i.getPlace();
		e.geometry || window.alert("No details available for input: '" + e.name + "'");
	});
}
cr2.each(function (e) {
	var i = $(this).attr("data-starrating2");
	$("<i class='fa fa-star'></i>").duplicate(i).prependTo(this);
}),
	$(".location a , .loc-act").on("click", function (e) {
		e.preventDefault(),
			$.get(
				"http://ipinfo.io",
				function (e) {
					$(".location input , .qodef-archive-places-search").val(e.city);
				},
				"jsonp"
			);
	}),
	$(".quantity-item").each(function () {
		var e = jQuery(this),
			i = e.find('input[type="text"]'),
			t = e.find(".plus"),
			n = e.find(".minus"),
			o = i.attr("min"),
			a = i.attr("max");
		t.click(function () {
			var t = parseFloat(i.val());
			if (t >= a) var n = t;
			else n = t + 1;
			e.find("input.qty").val(n), e.find("input.qty").trigger("change");
		}),
			n.click(function () {
				var t = parseFloat(i.val());
				if (t <= o) var n = t;
				else n = t - 1;
				e.find("input.qty").val(n), e.find("input.qty").trigger("change");
			});
	}),
	$(".notification-close").on("click", function () {
		$(this).parent(".notification").slideUp(500);
	});
var chatwidwrap = $(".chat-widget_wrap"),
	cahtwidbutton = $(".chat-widget-button");
function showChat() {
	cahtwidbutton.addClass("closechat_btn"), chatwidwrap.fadeIn(500).removeClass("not-vis-chat");
}
function hideChat() {
	cahtwidbutton.removeClass("closechat_btn"), chatwidwrap.fadeOut(500).addClass("not-vis-chat");
}
function openNav() {
	document.getElementById("mySidenav").style.width = "100%";
}
function closeNav() {
	document.getElementById("mySidenav").style.width = "0";
}
cahtwidbutton.on("click", function () {
	chatwidwrap.hasClass("not-vis-chat") ? showChat() : hideChat();
}),
	$(function () {
		initCitybook(), initparallax();
	}),
	jQuery(document).ready(function (e) {
		e(window).width() < 640 &&
		(e(".listsearch-header h3").before(e(".listsearch-header .result_back")),
			e(".listsearch-header h3").before(e(".listsearch-header .result-panel")),
			e(".business-main #services").after(e(".business-main #contact-details")),
			e(".business-main #contact-details").after(e(".business-main #reviews")),
			e(".business-main #reviews").after(e(".business-main #workinghours")),
			e(".business-main #workinghours").after(e(".business-main #contact-this-biz")),
			e(".business-main #contact-this-biz").after(e(".business-main #faq")),
			e(".business-main #faq").after(e(".business-main #article")),
			e(".business-main #article").after(e(".business-main #video")),
			e(".business-main #video").after(e(".business-main #offers")),
			e(".business-main #offers").after(e(".business-main #jobs")),
			e(".business-main #jobs").after(e(".business-main #podcast")),
			e(".business-main #podcast").after(e(".business-main #recent-articles")),
			e(".business-main #recent-articles").after(e(".business-main #similar-business-near-by")));
	}),
	$(document).ready(function () {
		$(".accordion_head").click(function () {
			$(".accordion_body").is(":visible") && ($(".accordion_body").slideUp(300), $(".plusminus").html("<i class='fa fa-angle-down'></i>")),
				$(this).next(".accordion_body").is(":visible")
					? ($(this).next(".accordion_body").slideUp(300), $(this).children(".plusminus").html("<i class='fa fa-angle-down'></i>"))
					: ($(this).next(".accordion_body").slideDown(300), $(this).children(".plusminus").html("<i class='fa fa-angle-up'></i>"));
		});
	}),
	$(document).ready(function () {
		$(".accordion_head-2").click(function () {
			$(".accordion_body-2").is(":visible") && ($(".accordion_body-2").slideUp(300), $(".plusminus").html("<i class='fa fa-angle-down'></i>")),
				$(this).next(".accordion_body-2").is(":visible")
					? ($(this).next(".accordion_body-2").slideUp(300), $(this).children(".plusminus").html("<i class='fa fa-angle-down'></i>"))
					: ($(this).next(".accordion_body-2").slideDown(300), $(this).children(".plusminus").html("<i class='fa fa-angle-up'></i>"));
		});
	}),
	jQuery(document).ready(function (e) {
		e(window).width() < 1024 &&
		(e(".sliding-menu-wrapper").after(e(".show-reg-form.modal-signin")), e(".whylbn-btn").after(e(".whylbn-video")), e(".accordion_container").attr("id", "mySidenav"), e(".accordion_container").addClass("sidenav"));
	});

jQuery(document).ready(function ($) {
	//$(".menusb").removeClass("ui-widget-content");
	//$(".menusb").removeClass("ui-widget");
	//$('.menusb').removeClass('ui-menu');
	//$(".menusb").css("display","block");
	//$(".menusb").addClass("sliding-menu");
	//$(".menusb").removeAttr('id', 'ui-id-1');
	//$('.menusb').removeAttr('class');
	//$('.menusb').attr('class', '');
	//$('.menusb')[0].className = '';
	$("#ui-id-2").css("display", "block");
	//$("").css("display","block");
	//$('.ui-autocomplete .ui-menu-item').click(function() {
	//$('#auto_complete_area').css('display','none');
	//$('#auto_complete_area').css('z-index', '5');
	//});

	//$('#biz_name_search').click(function() {
	//$('#auto_complete_area').css('z-index', '11');
	//});

	//$("li").click(function() {
	//$("#auto_complete_area").css("display", "none");
	//$("#btn-search-biz").addClass("someClass");
	//});

	//$(".ui-autocomplete > li").on("focus",function() {
	//$("#auto_complete_area").hide();
	//});

	if ($(window).width() > 1025) {
		$(".featured-list-mobile").hide();
	}

	if ($(window).width() < 1024) {
		//$('.main-menu').append('<div class="reg-form"></div>');
		//$('.search-biz .main-menu nav.menusb').wrap('<div class="sliding-menu-wrapper"></div>');

		$(".featured-list-deskop").hide();
		$(".show-reg-form.modal-signin").insertAfter(".sliding-menu-wrapper");
		//$('.show-reg-form.signin').insertAfter('.sliding-menu-wrapper');
		$(".show-reg-form.signin").remove();
		//$('.search-biz .menusb').after($('.show-reg-form.modal-signin'));
		$("#biz_name_search").attr("placeholder", "Type in a Business Name or Keyword");
		$("#search").attr("placeholder", "Search In Event:");
		$(".search-event").removeClass("col-xs-offset-7");
		//$('#events .list-single-main-item.fl-wrap.events .list-single-main-item-title.fl-wrap:first-of-type').insertAfter('#events .list-single-main-item.fl-wrap.events .post-opt.business ul');

		$(".events .event-content .list-single-main-item-title").each(function () {
			$(this).parent().parent().prepend(this);
		});
		$("iframe.embedly-card").addClass("embedly-embed");
		$(".profile-content pre").addClass("more");
		$(".list-single-header-contacts").after($(".profile-logo"));
		$(".absolute-header").after($(".scroll-nav-wrapper"));
		$(".scroll-nav-wrapper .scroll-nav li:nth-child(-n+4)").remove();
		$(".scroll-nav-wrapper .scroll-nav li:nth-child(2)").remove();
		$(".scroll-nav-wrapper .scroll-nav li:last-of-type").after("<li><a href='#sec10'>Contact Details</a></li>");
		$(".scroll-nav-wrapper .scroll-nav li:last-of-type a").addClass("cont-dts");
		$(".review a").removeAttr("class");
		$(".blog-categories").insertBefore($(".mobi-blog-category"));
		$(".blog-search-widget").insertBefore($(".blog-categories"));
		$(".view-category").click(function () {
			$(".blog-toggle").toggleClass("main");
			var newText = $(this).text() == "Hide Blog Categories" ? "Show Blog Categories" : "Hide Blog Categories";
			$(this).text(newText);
		});
		//$('.mobile-hero').prepend($('.banner-circle'));

		$(".view-category").click(function () {
			$(this).toggleClass("bg-change");
		});

		$("footer").append("<div class='bg-overlay' id='overlay-bg'></div>");

		$(".nav-button-wrap").on("click", function () {
			$(".bg-overlay").toggle("slow");
			$(".vismobmenu").css("opacity", "1");
		});

		$(".bg-overlay").click(function () {
			$(".main-menu").removeClass("vismobmenu");
			$(".bg-overlay").css("display", "none");
		});

		$(".blog-link.full-view p br").remove();

		$(".card-post-content.blog-img p").each(function () {
			const $this = $(this);
			if ($this.html().replace(/\s|&nbsp;/g, "").length === 0) $this.remove();
		});
		$(".vismobmenu").on("swipe", function () {
			$(this).fadeOut(500);
		});
	}
});

$(document).ready(function () {
	function checkWidth() {
		var windowSize = $(window).width();

		if (windowSize <= 479) {
			console.log("screen width is less than 480");
			$(".scroll-nav-wrapper .scroll-nav li.review a").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec9").offset().top - 270,
					},
					2000
				);
			});

			$(".scroll-nav-wrapper .scroll-nav li.faq a").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec5").offset().top - 270,
					},
					2000
				);
			});

			$(".scroll-nav-wrapper .scroll-nav li.blog a").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec8").offset().top - 270,
					},
					2000
				);
			});

			$(".cont-dts").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec10").offset().top - 270,
					},
					2000
				);
			});
		} else if ((windowSize = 480 && windowSize <= 719)) {
			$(".scroll-nav-wrapper .scroll-nav li.review a").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec9").offset().top - 270,
					},
					2000
				);
			});

			$(".scroll-nav-wrapper .scroll-nav li.faq a").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec5").offset().top - 270,
					},
					2000
				);
			});

			$(".scroll-nav-wrapper .scroll-nav li.blog a").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec8").offset().top - 270,
					},
					2000
				);
			});

			$(".cont-dts").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec10").offset().top - 270,
					},
					2000
				);
			});
		} else if ((windowSize = 480 && windowSize <= 719)) {
			console.log("screen width is less than 720 but greater than or equal to 480");
		} else if ((windowSize = 720 && windowSize <= 959)) {
			$(".cont-dts").click(function () {
				$("html, body").animate(
					{
						scrollTop: $("#sec10").offset().top - 120,
					},
					2000
				);
			});
		} else if (windowSize >= 960) {
			console.log("screen width is greater than or equal to 960");
		}
	}

	// Execute on load
	checkWidth();
	// Bind event listener
	$(window).resize(checkWidth);
});
