var isTouch = window.DocumentTouch && document instanceof DocumentTouch; function scrollHeader() { // Has scrolled class on header var zvalue = $(this).scrollTop(); if (zvalue > 75) $("#header").addClass("scrolled"); else $("#header").removeClass("scrolled"); } // ON SCROLL EVENTS if (!isTouch) { jQuery(document).scroll(function () { scrollHeader(); }); } ; // TOUCH SCROLL jQuery(document).on({ 'touchmove': function (e) { scrollHeader(); // Replace this with your code. } }); jQuery(document).ready(function ($) { //Smooth scroll to top $('#toTop').click(function () { $("html, body").animate({scrollTop: 0}, 500); return false; }); // Responsive Menu // lazycoder.pro : added to align text on right side var lang = $('html').attr('lang'); var meta = $("meta[name=language]").attr("content"); //alert(lang + meta); if (lang == "ur" || meta=="urdu") { //alert("in if"); $("#body").css('text-align', 'right', 'important'); $('.modular-row.bottom').css('text-align', 'right', 'important'); $('.modular.features').css('text-align', 'right', 'important'); } }); $('div.modal').on('show.bs.modal', function () { var modal = this; var hash = modal.id; window.location.hash = hash; window.onhashchange = function () { if (!location.hash) { $(modal).modal('hide'); } } }); // Minified Bootstrap Modal Function +function (a) { "use strict"; function b(b, d) { return this.each(function () { var e = a(this), f = e.data("bs.modal"), g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b); f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d) }) } var c = function (b, c) { this.options = c, this.$body = a(document.body), this.$element = a(b), this.$backdrop = this.isShown = null, this.scrollbarWidth = 0, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function () { this.$element.trigger("loaded.bs.modal") }, this)) }; c.VERSION = "3.2.0", c.DEFAULTS = {backdrop: !0, keyboard: !0, show: !0}, c.prototype.toggle = function (a) { return this.isShown ? this.hide() : this.show(a) }, c.prototype.show = function (b) { var c = this, d = a.Event("show.bs.modal", {relatedTarget: b}); this.$element.trigger(d), this.isShown || d.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.$body.addClass("modal-open"), this.setScrollbar(), this.escape(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.backdrop(function () { var d = a.support.transition && c.$element.hasClass("fade"); c.$element.parent().length || c.$element.appendTo(c.$body), c.$element.show().scrollTop(0), d && c.$element[0].offsetWidth, c.$element.addClass("in").attr("aria-hidden", !1), c.enforceFocus(); var e = a.Event("shown.bs.modal", {relatedTarget: b}); d ? c.$element.find(".modal-dialog").one("bsTransitionEnd", function () { c.$element.trigger("focus").trigger(e) }).emulateTransitionEnd(300) : c.$element.trigger("focus").trigger(e) })) }, c.prototype.hide = function (b) { b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.$body.removeClass("modal-open"), this.resetScrollbar(), this.escape(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal()) }, c.prototype.enforceFocus = function () { a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) { this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus") }, this)) }, c.prototype.escape = function () { this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.bs.modal", a.proxy(function (a) { 27 == a.which && this.hide() }, this)) : this.isShown || this.$element.off("keyup.dismiss.bs.modal") }, c.prototype.hideModal = function () { var a = this; this.$element.hide(), this.backdrop(function () { a.$element.trigger("hidden.bs.modal") }) }, c.prototype.removeBackdrop = function () { this.$backdrop && this.$backdrop.remove(), this.$backdrop = null }, c.prototype.backdrop = function (b) { var c = this, d = this.$element.hasClass("fade") ? "fade" : ""; if (this.isShown && this.options.backdrop) { var e = a.support.transition && d; if (this.$backdrop = a('