removed unwanted js file inside of public folder

This commit is contained in:
Alaguraj0361 2025-10-07 22:11:49 +05:30
parent 68732a0000
commit 229153b9e5
16 changed files with 0 additions and 26756 deletions

View File

@ -1,151 +0,0 @@
/*
* jQuery.appear
* https://github.com/bas2k/jquery.appear/
* http://code.google.com/p/jquery-appear/
* http://bas2k.ru/
*
* Copyright (c) 2009 Michael Hixson
* Copyright (c) 2012-2014 Alexander Brovikov
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
*/
(function($) {
$.fn.appear = function(fn, options) {
var settings = $.extend({
//arbitrary data to pass to fn
data: undefined,
//call fn only on the first appear?
one: true,
// X & Y accuracy
accX: 0,
accY: 0
}, options);
return this.each(function() {
var t = $(this);
//whether the element is currently visible
t.appeared = false;
if (!fn) {
//trigger the custom event
t.trigger('appear', settings.data);
return;
}
var w = $(window);
//fires the appear event when appropriate
var check = function() {
//is the element hidden?
if (!t.is(':visible')) {
//it became hidden
t.appeared = false;
return;
}
//is the element inside the visible window?
var a = w.scrollLeft();
var b = w.scrollTop();
var o = t.offset();
var x = o.left;
var y = o.top;
var ax = settings.accX;
var ay = settings.accY;
var th = t.height();
var wh = w.height();
var tw = t.width();
var ww = w.width();
if (y + th + ay >= b &&
y <= b + wh + ay &&
x + tw + ax >= a &&
x <= a + ww + ax) {
//trigger the custom event
if (!t.appeared) t.trigger('appear', settings.data);
} else {
//it scrolled out of view
t.appeared = false;
}
};
//create a modified fn with some additional logic
var modifiedFn = function() {
//mark the element as visible
t.appeared = true;
//is this supposed to happen only once?
if (settings.one) {
//remove the check
w.unbind('scroll', check);
var i = $.inArray(check, $.fn.appear.checks);
if (i >= 0) $.fn.appear.checks.splice(i, 1);
}
//trigger the original fn
fn.apply(this, arguments);
};
//bind the modified fn to the element
if (settings.one) t.one('appear', settings.data, modifiedFn);
else t.bind('appear', settings.data, modifiedFn);
//check whenever the window scrolls
w.scroll(check);
//check whenever the dom changes
$.fn.appear.checks.push(check);
//check now
(check)();
});
};
//keep a queue of appearance checks
$.extend($.fn.appear, {
checks: [],
timeout: null,
//process the queue
checkAll: function() {
var length = $.fn.appear.checks.length;
if (length > 0) while (length--) ($.fn.appear.checks[length])();
},
//check the queue asynchronously
run: function() {
if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);
$.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20);
}
});
//run checks when these methods are called
$.each(['append', 'prepend', 'after', 'before', 'attr',
'removeAttr', 'addClass', 'removeClass', 'toggleClass',
'remove', 'css', 'show', 'hide'], function(i, n) {
var old = $.fn[n];
if (old) {
$.fn[n] = function() {
var r = old.apply(this, arguments);
$.fn.appear.run();
return r;
}
}
});
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(function(e){var t,n={hasPreview:true,defaultThemeId:"jssDefault",fullPath:"css/",cookie:{expires:30,isManagingLoad:true}},r="jss_selected",i={};i={getItem:function(e){if(!e){return null}return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(e,t,n,r,i,s){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e)){return false}var o="";if(n){switch(n.constructor){case Number:o=n===Infinity?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:o="; expires="+n;break;case Date:o="; expires="+n.toUTCString();break}}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+o+(i?"; domain="+i:"")+(r?"; path="+r:"")+(s?"; secure":"");return true},removeItem:function(e,t,n){if(!this.hasItem(e)){return false}document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:"");return true},hasItem:function(e){if(!e){return false}return(new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=")).test(document.cookie)},keys:function(){var e=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/);for(var t=e.length,n=0;n<t;n++){e[n]=decodeURIComponent(e[n])}return e}};t=function(e,t){return this.init(e,t)};t.prototype={$root:null,config:{},$themeCss:null,defaultTheme:null,init:function(e,t){this.$root=e;this.config=t?t:{};this.setDefaultTheme();if(this.defaultTheme){if(this.config.cookie){this.checkCookie()}if(this.config.hasPreview){this.addHoverEvents()}this.addClickEvents()}else{this.$root.addClass("jssError error level0")}},setDefaultTheme:function(){this.$themeCss=e("link[id="+this.config.defaultThemeId+"]");if(this.$themeCss.length){this.defaultTheme=this.$themeCss.attr("href")}},resetStyle:function(){this.updateStyle(this.defaultTheme)},updateStyle:function(e){this.$themeCss.attr("href",e)},getFullAssetPath:function(e){return this.config.fullPath+e+".css"},checkCookie:function(){var e;if(this.config.cookie&&this.config.cookie.isManagingLoad){e=i.getItem(r);if(e){newStyle=this.getFullAssetPath(e);this.updateStyle(newStyle);this.defaultTheme=newStyle}}},addHoverEvents:function(){var t=this;this.$root.find("a").hover(function(){var n=e(this).data("theme"),r=t.getFullAssetPath(n);t.updateStyle(r)},function(){t.resetStyle()})},addClickEvents:function(){var t=this;this.$root.find("a").click(function(){var n=e(this).data("theme"),s=t.getFullAssetPath(n);t.updateStyle(s);t.defaultTheme=s;if(t.config.cookie){i.setItem(r,n,t.config.cookie.expires)}})}};e.fn.styleSwitcher=function(r){return new t(this,e.extend(true,n,r))}})(jQuery)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
/* jQuery Nice Select - v1.0
https://github.com/hernansartorio/jquery-nice-select
Made by Hernán Sartorio */
!function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);

View File

@ -1,138 +0,0 @@
"use strict"; // Start of use strict
// 7. google map
function gMap () {
if ($('.google-map').length) {
$('.google-map').each(function () {
// getting options from html
var mapName = $(this).attr('id');
var mapLat = $(this).data('map-lat');
var mapLng = $(this).data('map-lng');
var iconPath = $(this).data('icon-path');
var mapZoom = $(this).data('map-zoom');
var mapTitle = $(this).data('map-title');
// defined default style
var styles = [
{
"featureType": "administrative",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#444444"
}
]
},
{
"featureType": "landscape",
"elementType": "all",
"stylers": [
{
"color": "#000"
}
]
},
{
"featureType": "poi",
"elementType": "all",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "road",
"elementType": "all",
"stylers": [
{
"saturation": -100
},
{
"lightness": 45
}
]
},
{
"featureType": "road.highway",
"elementType": "all",
"stylers": [
{
"visibility": "simplified"
}
]
},
{
"featureType": "road.arterial",
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "transit",
"elementType": "all",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "water",
"elementType": "all",
"stylers": [
{
"color": "#f1f1f1"
},
{
"visibility": "on"
}
]
}
];
// if zoom not defined the zoom value will be 15;
if (!mapZoom) {
var mapZoom = 11;
};
// init map
var map;
map = new GMaps({
div: '#'+mapName,
scrollwheel: false,
lat: mapLat,
lng: mapLng,
styles: styles,
zoom: mapZoom
});
// if icon path setted then show marker
if(iconPath) {
map.addMarker({
icon: iconPath,
lat: mapLat,
lng: mapLng,
title: mapTitle
});
map.addMarker({
icon: iconPath,
lat: 40.700843, //you can
lng: 40.700843,
title: "New York"
});
}
});
};
}
// instance of fuction while Document ready event
jQuery(document).on('ready', function () {
(function ($) {
gMap();
})(jQuery);
});

View File

@ -1 +0,0 @@
"use strict";jQuery,jQuery(document).ready(function(o){0<o(".offset-side-bar").length&&o(".offset-side-bar").on("click",function(e){e.preventDefault(),e.stopPropagation(),o(".cart-group").addClass("isActive")}),0<o(".close-side-widget").length&&o(".close-side-widget").on("click",function(e){e.preventDefault(),o(".cart-group").removeClass("isActive")}),0<o(".navSidebar-button").length&&o(".navSidebar-button").on("click",function(e){e.preventDefault(),e.stopPropagation(),o(".info-group").addClass("isActive")}),0<o(".close-side-widget").length&&o(".close-side-widget").on("click",function(e){e.preventDefault(),o(".info-group").removeClass("isActive")}),o("body").on("click",function(e){o(".info-group").removeClass("isActive"),o(".cart-group").removeClass("isActive")}),o(".xs-sidebar-widget").on("click",function(e){e.stopPropagation()}),0<o(".xs-modal-popup").length&&o(".xs-modal-popup").magnificPopup({type:"inline",fixedContentPos:!1,fixedBgPos:!0,overflowY:"auto",closeBtnInside:!1,callbacks:{beforeOpen:function(){this.st.mainClass="my-mfp-slide-bottom xs-promo-popup"}}})});

File diff suppressed because it is too large Load Diff

View File

@ -1,223 +0,0 @@
/*
* jQuery One Page Nav Plugin
* http://github.com/davist11/jQuery-One-Page-Nav
*
* Copyright (c) 2010 Trevor Davis (http://trevordavis.net)
* Dual licensed under the MIT and GPL licenses.
* Uses the same license as jQuery, see:
* http://jquery.org/license
*
* @version 3.0.0
*
* Example usage:
* $('#nav').onePageNav({
* currentClass: 'current',
* changeHash: false,
* scrollSpeed: 750
* });
*/
(function($, window, document, undefined){
// our plugin constructor
var OnePageNav = function(elem, options){
this.elem = elem;
this.$elem = $(elem);
this.options = options;
this.metadata = this.$elem.data('plugin-options');
this.$win = $(window);
this.sections = {};
this.didScroll = false;
this.$doc = $(document);
this.docHeight = this.$doc.height();
};
// the plugin prototype
OnePageNav.prototype = {
defaults: {
navItems: 'a',
currentClass: 'current',
changeHash: false,
easing: 'swing',
filter: '',
scrollSpeed: 50,
scrollThreshold: 0.5,
begin: false,
end: false,
scrollChange: false
},
init: function() {
// Introduce defaults that can be extended either
// globally or using an object literal.
this.config = $.extend({}, this.defaults, this.options, this.metadata);
this.$nav = this.$elem.find(this.config.navItems);
//Filter any links out of the nav
if(this.config.filter !== '') {
this.$nav = this.$nav.filter(this.config.filter);
}
//Handle clicks on the nav
this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this));
//Get the section positions
this.getPositions();
//Handle scroll changes
this.bindInterval();
//Update the positions on resize too
this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this));
return this;
},
adjustNav: function(self, $parent) {
self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass);
$parent.addClass(self.config.currentClass);
},
bindInterval: function() {
var self = this;
var docHeight;
self.$win.on('scroll.onePageNav', function() {
self.didScroll = true;
});
self.t = setInterval(function() {
docHeight = self.$doc.height();
//If it was scrolled
if(self.didScroll) {
self.didScroll = false;
self.scrollChange();
}
//If the document height changes
if(docHeight !== self.docHeight) {
self.docHeight = docHeight;
self.getPositions();
}
}, 250);
},
getHash: function($link) {
return $link.attr('href').split('#')[1];
},
getPositions: function() {
var self = this;
var linkHref;
var topPos;
var $target;
self.$nav.each(function() {
linkHref = self.getHash($(this));
$target = $('#' + linkHref);
if($target.length) {
topPos = $target.offset().top;
self.sections[linkHref] = Math.round(topPos);
}
});
},
getSection: function(windowPos) {
var returnValue = null;
var windowHeight = Math.round(this.$win.height() * this.config.scrollThreshold);
for(var section in this.sections) {
if((this.sections[section] - windowHeight) < windowPos) {
returnValue = section;
}
}
return returnValue;
},
handleClick: function(e) {
var self = this;
var $link = $(e.currentTarget);
var $parent = $link.parent();
var newLoc = '#' + self.getHash($link);
if(!$parent.hasClass(self.config.currentClass)) {
//Start callback
if(self.config.begin) {
self.config.begin();
}
//Change the highlighted nav item
self.adjustNav(self, $parent);
//Removing the auto-adjust on scroll
self.unbindInterval();
//Scroll to the correct position
self.scrollTo(newLoc, function() {
//Do we need to change the hash?
if(self.config.changeHash) {
window.location.hash = newLoc;
}
//Add the auto-adjust on scroll back in
self.bindInterval();
//End callback
if(self.config.end) {
self.config.end();
}
});
}
e.preventDefault();
},
scrollChange: function() {
var windowTop = this.$win.scrollTop();
var position = this.getSection(windowTop);
var $parent;
//If the position is set
if(position !== null) {
$parent = this.$elem.find('a[href$="#' + position + '"]').parent();
//If it's not already the current section
if(!$parent.hasClass(this.config.currentClass)) {
//Change the highlighted nav item
this.adjustNav(this, $parent);
//If there is a scrollChange callback
if(this.config.scrollChange) {
this.config.scrollChange($parent);
}
}
}
},
scrollTo: function(target, callback) {
var offset = $(target).offset().top-70;
$('html, body').animate({
scrollTop: offset
}, this.config.scrollSpeed, this.config.easing, callback);
},
unbindInterval: function() {
clearInterval(this.t);
this.$win.unbind('scroll.onePageNav');
}
};
OnePageNav.defaults = OnePageNav.prototype.defaults;
$.fn.onePageNav = function(options) {
return this.each(function() {
new OnePageNav(this, options).init();
});
};
})( jQuery, window , document );

View File

@ -1,185 +0,0 @@
jQuery(function() {
ParallaxScroll.init();
});
var ParallaxScroll = {
/* PUBLIC VARIABLES */
showLogs: false,
round: 1000,
/* PUBLIC FUNCTIONS */
init: function() {
this._log("init");
if (this._inited) {
this._log("Already Inited");
this._inited = true;
return;
}
this._requestAnimationFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(/* function */ callback, /* DOMElement */ element){
window.setTimeout(callback, 1000 / 60);
};
})();
this._onScroll(true);
},
/* PRIVATE VARIABLES */
_inited: false,
_properties: ['x', 'y', 'z', 'rotateX', 'rotateY', 'rotateZ', 'scaleX', 'scaleY', 'scaleZ', 'scale'],
_requestAnimationFrame:null,
/* PRIVATE FUNCTIONS */
_log: function(message) {
if (this.showLogs) console.log("Parallax Scroll / " + message);
},
_onScroll: function(noSmooth) {
var scroll = jQuery(document).scrollTop();
var windowHeight = jQuery(window).height();
this._log("onScroll " + scroll);
jQuery("[data-parallax]").each(jQuery.proxy(function(index, el) {
var jQueryel = jQuery(el);
var properties = [];
var applyProperties = false;
var style = jQueryel.data("style");
if (style == undefined) {
style = jQueryel.attr("style") || "";
jQueryel.data("style", style);
}
var datas = [jQueryel.data("parallax")];
var iData;
for(iData = 2; ; iData++) {
if(jQueryel.data("parallax"+iData)) {
datas.push(jQueryel.data("parallax-"+iData));
}
else {
break;
}
}
var datasLength = datas.length;
for(iData = 0; iData < datasLength; iData ++) {
var data = datas[iData];
var scrollFrom = data["from-scroll"];
if (scrollFrom == undefined) scrollFrom = Math.max(0, jQuery(el).offset().top - windowHeight);
scrollFrom = scrollFrom | 0;
var scrollDistance = data["distance"];
var scrollTo = data["to-scroll"];
if (scrollDistance == undefined && scrollTo == undefined) scrollDistance = windowHeight;
scrollDistance = Math.max(scrollDistance | 0, 1);
var easing = data["easing"];
var easingReturn = data["easing-return"];
if (easing == undefined || !jQuery.easing|| !jQuery.easing[easing]) easing = null;
if (easingReturn == undefined || !jQuery.easing|| !jQuery.easing[easingReturn]) easingReturn = easing;
if (easing) {
var totalTime = data["duration"];
if (totalTime == undefined) totalTime = scrollDistance;
totalTime = Math.max(totalTime | 0, 1);
var totalTimeReturn = data["duration-return"];
if (totalTimeReturn == undefined) totalTimeReturn = totalTime;
scrollDistance = 1;
var currentTime = jQueryel.data("current-time");
if(currentTime == undefined) currentTime = 0;
}
if (scrollTo == undefined) scrollTo = scrollFrom + scrollDistance;
scrollTo = scrollTo | 0;
var smoothness = data["smoothness"];
if (smoothness == undefined) smoothness = 30;
smoothness = smoothness | 0;
if (noSmooth || smoothness == 0) smoothness = 1;
smoothness = smoothness | 0;
var scrollCurrent = scroll;
scrollCurrent = Math.max(scrollCurrent, scrollFrom);
scrollCurrent = Math.min(scrollCurrent, scrollTo);
if(easing) {
if(jQueryel.data("sens") == undefined) jQueryel.data("sens", "back");
if(scrollCurrent>scrollFrom) {
if(jQueryel.data("sens") == "back") {
currentTime = 1;
jQueryel.data("sens", "go");
}
else {
currentTime++;
}
}
if(scrollCurrent<scrollTo) {
if(jQueryel.data("sens") == "go") {
currentTime = 1;
jQueryel.data("sens", "back");
}
else {
currentTime++;
}
}
if(noSmooth) currentTime = totalTime;
jQueryel.data("current-time", currentTime);
}
this._properties.map(jQuery.proxy(function(prop) {
var defaultProp = 0;
var to = data[prop];
if (to == undefined) return;
if(prop=="scale" || prop=="scaleX" || prop=="scaleY" || prop=="scaleZ" ) {
defaultProp = 1;
}
else {
to = to | 0;
}
var prev = jQueryel.data("_" + prop);
if (prev == undefined) prev = defaultProp;
var next = ((to-defaultProp) * ((scrollCurrent - scrollFrom) / (scrollTo - scrollFrom))) + defaultProp;
var val = prev + (next - prev) / smoothness;
if(easing && currentTime>0 && currentTime<=totalTime) {
var from = defaultProp;
if(jQueryel.data("sens") == "back") {
from = to;
to = -to;
easing = easingReturn;
totalTime = totalTimeReturn;
}
val = jQuery.easing[easing](null, currentTime, from, to, totalTime);
}
val = Math.ceil(val * this.round) / this.round;
if(val==prev&&next==to) val = to;
if(!properties[prop]) properties[prop] = 0;
properties[prop] += val;
if (prev != properties[prop]) {
jQueryel.data("_" + prop, properties[prop]);
applyProperties = true;
}
}, this));
}
if (applyProperties) {
if (properties["z"] != undefined) {
var perspective = data["perspective"];
if (perspective == undefined) perspective = 800;
var jQueryparent = jQueryel.parent();
if(!jQueryparent.data("style")) jQueryparent.data("style", jQueryparent.attr("style") || "");
jQueryparent.attr("style", "perspective:" + perspective + "px; -webkit-perspective:" + perspective + "px; "+ jQueryparent.data("style"));
}
if(properties["scaleX"] == undefined) properties["scaleX"] = 1;
if(properties["scaleY"] == undefined) properties["scaleY"] = 1;
if(properties["scaleZ"] == undefined) properties["scaleZ"] = 1;
if (properties["scale"] != undefined) {
properties["scaleX"] *= properties["scale"];
properties["scaleY"] *= properties["scale"];
properties["scaleZ"] *= properties["scale"];
}
var translate3d = "translate3d(" + (properties["x"] ? properties["x"] : 0) + "px, " + (properties["y"] ? properties["y"] : 0) + "px, " + (properties["z"] ? properties["z"] : 0) + "px)";
var rotate3d = "rotateX(" + (properties["rotateX"] ? properties["rotateX"] : 0) + "deg) rotateY(" + (properties["rotateY"] ? properties["rotateY"] : 0) + "deg) rotateZ(" + (properties["rotateZ"] ? properties["rotateZ"] : 0) + "deg)";
var scale3d = "scaleX(" + properties["scaleX"] + ") scaleY(" + properties["scaleY"] + ") scaleZ(" + properties["scaleZ"] + ")";
var cssTransform = translate3d + " " + rotate3d + " " + scale3d + ";";
this._log(cssTransform);
jQueryel.attr("style", "transform:" + cssTransform + " -webkit-transform:" + cssTransform + " " + style);
}
}, this));
if(window.requestAnimationFrame) {
window.requestAnimationFrame(jQuery.proxy(this._onScroll, this, false));
}
else {
this._requestAnimationFrame(jQuery.proxy(this._onScroll, this, false));
}
}
};

View File

@ -1,615 +0,0 @@
(function($) {
"use strict";
//Hide Loading Box (Preloader)
function handlePreloader() {
if($('.loader-wrap').length){
$('.loader-wrap').delay(1000).fadeOut(500);
}
}
if ($(".preloader-close").length) {
$(".preloader-close").on("click", function(){
$('.loader-wrap').delay(200).fadeOut(500);
})
}
//Update Header Style and Scroll to Top
function headerStyle() {
if($('.main-header').length){
var windowpos = $(window).scrollTop();
var siteHeader = $('.main-header');
var scrollLink = $('.scroll-top');
if (windowpos >= 110) {
siteHeader.addClass('fixed-header');
scrollLink.addClass('open');
} else {
siteHeader.removeClass('fixed-header');
scrollLink.removeClass('open');
}
}
}
headerStyle();
//Submenu Dropdown Toggle
if($('.main-header li.dropdown ul').length){
$('.main-header .navigation li.dropdown').append('<div class="dropdown-btn"><span class="fas fa-angle-down"></span></div>');
}
//Mobile Nav Hide Show
if($('.mobile-menu').length){
var mobileMenuContent = $('.main-header .menu-area .main-menu').html();
$('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent);
$('.sticky-header .main-menu').append(mobileMenuContent);
//Dropdown Button
$('.mobile-menu li.dropdown .dropdown-btn').on('click', function() {
$(this).toggleClass('open');
$(this).prev('ul').slideToggle(500);
});
//Dropdown Button
$('.mobile-menu li.dropdown .dropdown-btn').on('click', function() {
$(this).prev('.megamenu').slideToggle(900);
});
//Menu Toggle Btn
$('.mobile-nav-toggler').on('click', function() {
$('body').addClass('mobile-menu-visible');
});
//Menu Toggle Btn
$('.mobile-menu .menu-backdrop,.mobile-menu .close-btn').on('click', function() {
$('body').removeClass('mobile-menu-visible');
});
}
// Elements Animation
if($('.wow').length){
var wow = new WOW({
mobile: false
});
wow.init();
}
//Contact Form Validation
if($('#contact-form').length){
$('#contact-form').validate({
rules: {
username: {
required: true
},
email: {
required: true,
email: true
},
phone: {
required: true
},
subject: {
required: true
},
message: {
required: true
}
}
});
}
//Fact Counter + Text Count
if($('.count-box').length){
$('.count-box').appear(function(){
var $t = $(this),
n = $t.find(".count-text").attr("data-stop"),
r = parseInt($t.find(".count-text").attr("data-speed"), 10);
if (!$t.hasClass("counted")) {
$t.addClass("counted");
$({
countNum: $t.find(".count-text").text()
}).animate({
countNum: n
}, {
duration: r,
easing: "linear",
step: function() {
$t.find(".count-text").text(Math.floor(this.countNum));
},
complete: function() {
$t.find(".count-text").text(this.countNum);
}
});
}
},{accY: 0});
}
//LightBox / Fancybox
if($('.lightbox-image').length) {
$('.lightbox-image').fancybox({
openEffect : 'fade',
closeEffect : 'fade',
helpers : {
media : {}
}
});
}
//Tabs Box
if($('.tabs-box').length){
$('.tabs-box .tab-buttons .tab-btn').on('click', function(e) {
e.preventDefault();
var target = $($(this).attr('data-tab'));
if ($(target).is(':visible')){
return false;
}else{
target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn');
$(this).addClass('active-btn');
target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0);
target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab');
$(target).fadeIn(100);
$(target).addClass('active-tab');
}
});
}
//Accordion Box
if($('.accordion-box').length){
$(".accordion-box").on('click', '.acc-btn', function() {
var outerBox = $(this).parents('.accordion-box');
var target = $(this).parents('.accordion');
if($(this).hasClass('active')!==true){
$(outerBox).find('.accordion .acc-btn').removeClass('active');
}
if ($(this).next('.acc-content').is(':visible')){
return false;
}else{
$(this).addClass('active');
$(outerBox).children('.accordion').removeClass('active-block');
$(outerBox).find('.accordion').children('.acc-content').slideUp(300);
target.addClass('active-block');
$(this).next('.acc-content').slideDown(300);
}
});
}
// banner-carousel
if ($('.banner-carousel').length) {
$('.banner-carousel').owlCarousel({
loop:true,
margin:0,
nav:true,
animateOut: 'fadeOut',
animateIn: 'fadeIn',
active: true,
smartSpeed: 1000,
autoplay: 6000,
navText: [ '<span class="icon-6"></span>', '<span class="icon-7"></span>' ],
responsive:{
0:{
items:1
},
600:{
items:1
},
800:{
items:1
},
1024:{
items:1
}
}
});
}
// single-item-carousel
if ($('.single-item-carousel').length) {
$('.single-item-carousel').owlCarousel({
loop:true,
margin:30,
nav:true,
smartSpeed: 500,
autoplay: 1000,
navText: [ '<span class="icon-6"></span>', '<span class="icon-7"></span>' ],
responsive:{
0:{
items:1
},
480:{
items:1
},
600:{
items:1
},
800:{
items:1
},
1200:{
items:1
}
}
});
}
// two-item-carousel
if ($('.two-item-carousel').length) {
$('.two-item-carousel').owlCarousel({
loop:true,
margin:30,
nav:true,
smartSpeed: 500,
autoplay: 1000,
navText: [ '<span class="icon-6"></span>', '<span class="icon-7"></span>' ],
responsive:{
0:{
items:1
},
480:{
items:1
},
600:{
items:1
},
800:{
items:2
},
1200:{
items:2
}
}
});
}
// three-item-carousel
if ($('.three-item-carousel').length) {
$('.three-item-carousel').owlCarousel({
loop:true,
margin:30,
nav:true,
smartSpeed: 500,
autoplay: 1000,
navText: [ '<span class="icon-6"></span>', '<span class="icon-7"></span>' ],
responsive:{
0:{
items:1
},
480:{
items:1
},
600:{
items:2
},
800:{
items:2
},
1200:{
items:3
}
}
});
}
// four-item-carousel
if ($('.four-item-carousel').length) {
$('.four-item-carousel').owlCarousel({
loop:true,
margin:30,
nav:true,
smartSpeed: 500,
autoplay: 1000,
navText: [ '<span class="fal fa-angle-left"></span>', '<span class="fal fa-angle-right"></span>' ],
responsive:{
0:{
items:1
},
480:{
items:1
},
600:{
items:2
},
800:{
items:3
},
1200:{
items:4
}
}
});
}
// five-item-carousel
if ($('.five-item-carousel').length) {
$('.five-item-carousel').owlCarousel({
loop:true,
margin:30,
nav:true,
smartSpeed: 500,
autoplay: 1000,
navText: [ '<span class="fal fa-angle-left"></span>', '<span class="fal fa-angle-right"></span>' ],
responsive:{
0:{
items:1
},
480:{
items:2
},
600:{
items:3
},
800:{
items:4
},
1200:{
items:5
}
}
});
}
//Add One Page nav
if($('.scroll-nav').length) {
$('.scroll-nav').onePageNav();
}
//nice select
$(document).ready(function() {
$('select:not(.ignore)').niceSelect();
});
//Sortable Masonary with Filters
function enableMasonry() {
if($('.sortable-masonry').length){
var winDow = $(window);
// Needed variables
var $container=$('.sortable-masonry .items-container');
var $filter=$('.filter-btns');
$container.isotope({
filter:'*',
masonry: {
columnWidth : '.masonry-item.small-column'
},
animationOptions:{
duration:500,
easing:'linear'
}
});
// Isotope Filter
$filter.find('li').on('click', function(){
var selector = $(this).attr('data-filter');
try {
$container.isotope({
filter : selector,
animationOptions: {
duration: 500,
easing : 'linear',
queue : false
}
});
} catch(err) {
}
return false;
});
winDow.on('resize', function(){
var selector = $filter.find('li.active').attr('data-filter');
$container.isotope({
filter : selector,
animationOptions: {
duration: 500,
easing : 'linear',
queue : false
}
});
});
var filterItemA = $('.filter-btns li');
filterItemA.on('click', function(){
var $this = $(this);
if ( !$this.hasClass('active')) {
filterItemA.removeClass('active');
$this.addClass('active');
}
});
}
}
enableMasonry();
// Progress Bar
if ($('.count-bar').length) {
$('.count-bar').appear(function(){
var el = $(this);
var percent = el.data('percent');
$(el).css('width',percent).addClass('counted');
},{accY: -50});
}
//Search Popup
if($('#search-popup').length){
//Show Popup
$('.search-toggler').on('click', function() {
$('#search-popup').addClass('popup-visible');
});
$(document).keydown(function(e){
if(e.keyCode === 27) {
$('#search-popup').removeClass('popup-visible');
}
});
//Hide Popup
$('.close-search,.search-popup .overlay-layer').on('click', function() {
$('#search-popup').removeClass('popup-visible');
});
}
// Scroll top button
$('.scroll-top-inner').on("click", function () {
$('html, body').animate({scrollTop: 0}, 500);
return false;
});
function handleScrollbar() {
const bHeight = $('body').height();
const scrolled = $(window).innerHeight() + $(window).scrollTop();
let percentage = ((scrolled / bHeight) * 100);
if (percentage > 100) percentage = 100;
$('.scroll-top-inner .bar-inner').css( 'width', percentage + '%');
}
// color switcher
function swithcerMenu () {
if ($('.switch_menu').length) {
$('.switch_btn button').on('click', function(){
$('.switch_menu').toggle(500)
});
$('#styleOptions').styleSwitcher({
hasPreview: true,
fullPath: 'assets/css/color/',
cookie: {
expires: 30,
isManagingLoad: true
}
});
};
}
// page direction
function directionswitch() {
if ($('.page_direction').length) {
$('.direction_switch button').on('click', function() {
$('.boxed_wrapper').toggleClass(function(){
return $(this).is('.rtl, .ltr') ? 'rtl ltr' : 'rtl';
})
});
};
}
// Scroll to a Specific Div
if($('.scroll-to-target').length){
$(".scroll-to-target").on('click', function() {
var target = $(this).attr('data-target');
// animate
$('html, body').animate({
scrollTop: $(target).offset().top
}, 1000);
});
}
// Date picker
function datepicker () {
if ($('#datepicker').length) {
$('#datepicker').datepicker();
};
}
// Time picker
function timepicker () {
if ($('input[name="time"]').length) {
$('input[name="time"]').ptTimeSelect();
}
}
/* =========================================================================
When document is on ready, do
========================================================================== */
jQuery(document).on('ready', function () {
(function ($) {
// add your functions
swithcerMenu ();
directionswitch();
datepicker ();
timepicker ();
})(jQuery);
});
/* ==========================================================================
When document is Scrollig, do
========================================================================== */
$(window).on('scroll', function() {
headerStyle();
handleScrollbar();
if ($(window).scrollTop() > 200) {
$('.scroll-top-inner').addClass('visible');
} else {
$('.scroll-top-inner').removeClass('visible');
}
});
/* ==========================================================================
When document is loaded, do
========================================================================== */
$(window).on('load', function() {
handlePreloader();
enableMasonry();
});
})(window.jQuery);

View File

@ -1,535 +0,0 @@
/**
* FILE: jQuery.ptTileSelect.js
*
* @fileOverview
* jQuery plugin for displaying a popup that allows a user
* to define a time and set that time back to a form's input
* field.
*
* @version 0.8
* @author Paul Tavares, www.purtuga.com
* @see http://pttimeselect.sourceforge.net
*
* @requires jQuery {@link http://www.jquery.com}
*
*
* LICENSE:
*
* Copyright (c) 2007 Paul T. (purtuga.com)
* Dual licensed under the:
*
* - MIT
* <http://www.opensource.org/licenses/mit-license.php>
*
* - GPL
* <http://www.opensource.org/licenses/gpl-license.php>
*
* User can pick whichever one applies best for their project
* and doesn not have to contact me.
*
*
* INSTALLATION:
*
* There are two files (.css and .js) delivered with this plugin and
* that must be included in your html page after the jquery.js library
* and the jQuery UI style sheet (the jQuery UI javascript library is
* not necessary).
* Both of these are to be included inside of the 'head' element of
* the document. Example below demonstrates this along side the jQuery
* libraries.
*
* | <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
* | <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/themes/redmond/jquery-ui.css" />
* |
* | <link rel="stylesheet" type="text/css" href="jquery.ptTimeSelect.css" />
* | <script type="text/javascript" src="jquery.ptTimeSelect.js"></script>
* |
*
* USAGE:
*
* - See <$(ele).ptTimeSelect()>
*
*
*
* LAST UPDATED:
*
* - $Date: 2012/08/05 19:40:21 $
* - $Author: paulinho4u $
* - $Revision: 1.8 $
*
*/
(function($){
/**
* jQuery definition
*
* @see http://jquery.com/
* @name jQuery
* @class jQuery Library
*/
/**
* jQuery 'fn' definition to anchor all public plugin methods.
*
* @see http://jquery.com/
* @name fn
* @class jQuery Library public method anchor
* @memberOf jQuery
*/
/**
* Namespace for all properties and methods
*
* @namespace ptTimeSelect
* @memberOf jQuery
*/
jQuery.ptTimeSelect = {};
jQuery.ptTimeSelect.version = "__BUILD_VERSION_NUMBER__";
/**
* The default options for all calls to ptTimeSelect. Can be
* overwriten with each individual call to {@link jQuery.fn.ptTimeSelect}
*
* @type {Object} options
* @memberOf jQuery.ptTimeSelect
* @see jQuery.fn.ptTimeSelect
*/
jQuery.ptTimeSelect.options = {
containerClass: undefined,
containerWidth: '22em',
hoursLabel: 'Hour',
minutesLabel: 'Minutes',
setButtonLabel: 'Set',
popupImage: undefined,
onFocusDisplay: true,
zIndex: 10,
onBeforeShow: undefined,
onClose: undefined
};
/**
* Internal method. Called when page is initialized to add the time
* selection area to the DOM.
*
* @private
* @memberOf jQuery.ptTimeSelect
* @return {undefined}
*/
jQuery.ptTimeSelect._ptTimeSelectInit = function () {
jQuery(document).ready(
function () {
//if the html is not yet created in the document, then do it now
if (!jQuery('#ptTimeSelectCntr').length) {
jQuery("body").append(
'<div id="ptTimeSelectCntr" class="">'
+ ' <div class="ui-widget ui-widget-content ui-corner-all">'
+ ' <div class="ui-widget-header ui-corner-all">'
+ ' <div id="ptTimeSelectCloseCntr" style="float: right;">'
+ ' <a href="javascript: void(0);" onclick="jQuery.ptTimeSelect.closeCntr();" '
+ ' onmouseover="jQuery(this).removeClass(\'ui-state-default\').addClass(\'ui-state-hover\');" '
+ ' onmouseout="jQuery(this).removeClass(\'ui-state-hover\').addClass(\'ui-state-default\');"'
+ ' class="ui-corner-all ui-state-default">'
+ ' <span class="ui-icon ui-icon-circle-close">X</span>'
+ ' </a>'
+ ' </div>'
+ ' <div id="ptTimeSelectUserTime" style="float: left;">'
+ ' <span id="ptTimeSelectUserSelHr">1</span> : '
+ ' <span id="ptTimeSelectUserSelMin">00</span> '
+ ' <span id="ptTimeSelectUserSelAmPm">AM</span>'
+ ' </div>'
+ ' <br style="clear: both;" /><div></div>'
+ ' </div>'
+ ' <div class="ui-widget-content ui-corner-all">'
+ ' <div>'
+ ' <div class="ptTimeSelectTimeLabelsCntr">'
+ ' <div class="ptTimeSelectLeftPane" style="width: 50%; text-align: center; float: left;" class="">Hour</div>'
+ ' <div class="ptTimeSelectRightPane" style="width: 50%; text-align: center; float: left;">Minutes</div>'
+ ' </div>'
+ ' <div>'
+ ' <div style="float: left; width: 50%;">'
+ ' <div class="ui-widget-content ptTimeSelectLeftPane">'
+ ' <div class="ptTimeSelectHrAmPmCntr">'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);" '
+ ' style="display: block; width: 45%; float: left;">AM</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);" '
+ ' style="display: block; width: 45%; float: left;">PM</a>'
+ ' <br style="clear: left;" /><div></div>'
+ ' </div>'
+ ' <div class="ptTimeSelectHrCntr">'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">1</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">2</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">3</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">4</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">5</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">6</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">7</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">8</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">9</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">10</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">11</a>'
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">12</a>'
+ ' <br style="clear: left;" /><div></div>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ ' <div style="width: 50%; float: left;">'
+ ' <div class="ui-widget-content ptTimeSelectRightPane">'
+ ' <div class="ptTimeSelectMinCntr">'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">00</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">05</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">10</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">15</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">20</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">25</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">30</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">35</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">40</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">45</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">50</a>'
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">55</a>'
+ ' <br style="clear: left;" /><div></div>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ ' <div style="clear: left;"></div>'
+ ' </div>'
+ ' <div id="ptTimeSelectSetButton">'
+ ' <a href="javascript: void(0);" onclick="jQuery.ptTimeSelect.setTime()"'
+ ' onmouseover="jQuery(this).removeClass(\'ui-state-default\').addClass(\'ui-state-hover\');" '
+ ' onmouseout="jQuery(this).removeClass(\'ui-state-hover\').addClass(\'ui-state-default\');"'
+ ' class="ui-corner-all ui-state-default">'
+ ' SET'
+ ' </a>'
+ ' <br style="clear: both;" /><div></div>'
+ ' </div>'
+ ' <!--[if lte IE 6.5]>'
+ ' <iframe style="display:block; position:absolute;top: 0;left:0;z-index:-1;'
+ ' filter:Alpha(Opacity=\'0\');width:3000px;height:3000px"></iframe>'
+ ' <![endif]-->'
+ ' </div></div>'
);
var e = jQuery('#ptTimeSelectCntr');
// Add the events to the functions
e.find('.ptTimeSelectMin')
.bind("click", function(){
jQuery.ptTimeSelect.setMin($(this).text());
});
e.find('.ptTimeSelectHr')
.bind("click", function(){
jQuery.ptTimeSelect.setHr($(this).text());
});
$(document).mousedown(jQuery.ptTimeSelect._doCheckMouseClick);
}//end if
}
);
}();// jQuery.ptTimeSelectInit()
/**
* Sets the hour selected by the user on the popup.
*
* @private
* @param {Integer} h - Interger indicating the hour. This value
* is the same as the text value displayed on the
* popup under the hour. This value can also be the
* words AM or PM.
* @return {undefined}
*
*/
jQuery.ptTimeSelect.setHr = function(h) {
if ( h.toLowerCase() == "am"
|| h.toLowerCase() == "pm"
) {
jQuery('#ptTimeSelectUserSelAmPm').empty().append(h);
} else {
jQuery('#ptTimeSelectUserSelHr').empty().append(h);
}
};// END setHr() function
/**
* Sets the minutes selected by the user on the popup.
*
* @private
* @param {Integer} m - interger indicating the minutes. This
* value is the same as the text value displayed on the popup
* under the minutes.
* @return {undefined}
*/
jQuery.ptTimeSelect.setMin = function(m) {
jQuery('#ptTimeSelectUserSelMin').empty().append(m);
};// END setMin() function
/**
* Takes the time defined by the user and sets it to the input
* element that the popup is currently opened for.
*
* @private
* @return {undefined}
*/
jQuery.ptTimeSelect.setTime = function() {
var tSel = jQuery('#ptTimeSelectUserSelHr').text()
+ ":"
+ jQuery('#ptTimeSelectUserSelMin').text()
+ " "
+ jQuery('#ptTimeSelectUserSelAmPm').text();
var i = jQuery(".isPtTimeSelectActive");
if(i.attr('type') == 'time'){
i.val(jQuery.ptTimeSelect.convertFromAMPM(tSel));
}else{
i.val(tSel);
}
i.trigger('change');
this.closeCntr();
};// END setTime() function
/**
* Converts a 24 hours formated time into a 12 hours formated time
*
*
* @private
* @return {undefined}
*/
jQuery.ptTimeSelect.convertFrom24 = function(time) {
// Check correct time format and split into components
time = time.toString ().match (/^([01]\d|2[0-3])(:)([0-5]\d)(:[0-5]\d)?$/) || [time];
if (time.length > 1) { // If time format correct
time = time.slice (1); // Remove full string match value
time[5] = +time[0] < 12 ? ' AM' : ' PM'; // Set AM/PM
time[0] = +time[0] % 12 || 12; // Adjust hours
}
return time.join (''); // return adjusted time or original string
};// END convertFrom24() function
/**
* Converts a 12 hours formated time into a 24 hours formated time
*
*
* @private
* @return {undefined}
*/
jQuery.ptTimeSelect.convertFromAMPM = function(time){
var hours = Number(time.match(/^(\d+)/)[1]);
var minutes = Number(time.match(/:(\d+)/)[1]);
var AMPM = time.match(/\s(.*)$/)[1];
if(AMPM == "PM" && hours<12) hours = hours+12;
if(AMPM == "AM" && hours==12) hours = hours-12;
var sHours = hours.toString();
var sMinutes = minutes.toString();
if(hours<10) sHours = "0" + sHours;
if(minutes<10) sMinutes = "0" + sMinutes;
return sHours + ":" + sMinutes;
};// END convertFromAMPM() function
/**
* Displays the time definition area on the page, right below
* the input field. Also sets the custom colors/css on the
* displayed area to what ever the input element options were
* set with.
*
* @private
* @param {String} uId - Id of the element for whom the area will
* be displayed. This ID was created when the
* ptTimeSelect() method was called.
* @return {undefined}
*
*/
jQuery.ptTimeSelect.openCntr = function (ele) {
jQuery.ptTimeSelect.closeCntr();
jQuery(".isPtTimeSelectActive").removeClass("isPtTimeSelectActive");
var cntr = jQuery("#ptTimeSelectCntr");
var i = jQuery(ele).eq(0).addClass("isPtTimeSelectActive");
var opt = i.data("ptTimeSelectOptions");
var style = i.offset();
var time = '';
style['z-index'] = opt.zIndex;
style.top = (style.top + i.outerHeight());
if (opt.containerWidth) {
style.width = opt.containerWidth;
}
if (opt.containerClass) {
cntr.addClass(opt.containerClass);
}
cntr.css(style);
if(i.attr('type') == 'time'){
time = jQuery.ptTimeSelect.convertFrom24(i.val());
}else{
time = i.val();
}
var hr = 1;
var min = '00';
var tm = 'AM';
if (time) {
var re = /([0-9]{1,2}).*:.*([0-9]{2}).*(PM|AM)/i;
var match = re.exec(time);
if (match) {
hr = match[1] || 1;
min = match[2] || '00';
tm = match[3] || 'AM';
}
}
cntr.find("#ptTimeSelectUserSelHr").empty().append(hr);
cntr.find("#ptTimeSelectUserSelMin").empty().append(min);
cntr.find("#ptTimeSelectUserSelAmPm").empty().append(tm);
cntr.find(".ptTimeSelectTimeLabelsCntr .ptTimeSelectLeftPane")
.empty().append(opt.hoursLabel);
cntr.find(".ptTimeSelectTimeLabelsCntr .ptTimeSelectRightPane")
.empty().append(opt.minutesLabel);
cntr.find("#ptTimeSelectSetButton a").empty().append(opt.setButtonLabel);
if (opt.onBeforeShow) {
opt.onBeforeShow(i, cntr);
}
cntr.slideDown("fast");
};// END openCntr()
/**
* Closes (hides it) the popup container.
* @private
* @param {Object} i - Optional. The input field for which the
* container is being closed.
* @return {undefined}
*/
jQuery.ptTimeSelect.closeCntr = function(i) {
var e = $("#ptTimeSelectCntr");
if (e.is(":visible") == true) {
// If IE, then check to make sure it is realy visible
if (jQuery.support.tbody == false) {
if (!(e[0].offsetWidth > 0) && !(e[0].offsetHeight > 0) ) {
return;
}
}
jQuery('#ptTimeSelectCntr')
.css("display", "none")
.removeClass()
.css("width", "");
if (!i) {
i = $(".isPtTimeSelectActive");
}
if (i) {
var opt = i.removeClass("isPtTimeSelectActive")
.data("ptTimeSelectOptions");
if (opt && opt.onClose) {
opt.onClose(i);
}
}
}
return;
};//end closeCntr()
/**
* Closes the timePicker popup if user is not longer focused on the
* input field or the timepicker
*
* @private
* @param {jQueryEvent} ev - Event passed in by jQuery
* @return {undefined}
*/
jQuery.ptTimeSelect._doCheckMouseClick = function(ev){
if (!$("#ptTimeSelectCntr:visible").length) {
return;
}
if ( !jQuery(ev.target).closest("#ptTimeSelectCntr").length
&& jQuery(ev.target).not("input.isPtTimeSelectActive").length ){
jQuery.ptTimeSelect.closeCntr();
}
};// jQuery.ptTimeSelect._doCheckMouseClick
/**
* FUNCTION: $().ptTimeSelect()
* Attaches a ptTimeSelect widget to each matched element. Matched
* elements must be input fields that accept a values (input field).
* Each element, when focused upon, will display a time selection
* popoup where the user can define a time.
*
* @memberOf jQuery
*
* PARAMS:
*
* @param {Object} [opt] - An object with the options for the time selection widget.
*
* @param {String} [opt.containerClass=""] - A class to be associated with the popup widget.
*
* @param {String} [opt.containerWidth=""] - Css width for the container.
*
* @param {String} [opt.hoursLabel="Hours"] - Label for the Hours.
*
* @param {String} [opt.minutesLabel="Minutes"] - Label for the Mintues container.
*
* @param {String} [opt.setButtonLabel="Set"] - Label for the Set button.
*
* @param {String} [opt.popupImage=""] - The html element (ex. img or text) to be appended next to each
* input field and that will display the time select widget upon
* click.
*
* @param {Integer} [opt.zIndex=10] - Integer for the popup widget z-index.
*
* @param {Function} [opt.onBeforeShow=undefined] - Function to be called before the widget is made visible to the
* user. Function is passed 2 arguments: 1) the input field as a
* jquery object and 2) the popup widget as a jquery object.
*
* @param {Function} [opt.onClose=undefined] - Function to be called after closing the popup widget. Function
* is passed 1 argument: the input field as a jquery object.
*
* @param {Bollean} [opt.onFocusDisplay=true] - True or False indicating if popup is auto displayed upon focus
* of the input field.
*
*
* RETURN:
* @return {jQuery} selection
*
*
*
* EXAMPLE:
* @example
* $('#fooTime').ptTimeSelect();
*
*/
jQuery.fn.ptTimeSelect = function (opt) {
return this.each(function(){
if(this.nodeName.toLowerCase() != 'input') return;
var e = jQuery(this);
if (e.hasClass('hasPtTimeSelect')){
return this;
}
var thisOpt = {};
thisOpt = $.extend(thisOpt, jQuery.ptTimeSelect.options, opt);
e.addClass('hasPtTimeSelect').data("ptTimeSelectOptions", thisOpt);
//Wrap the input field in a <div> element with
// a unique id for later referencing.
if (thisOpt.popupImage || !thisOpt.onFocusDisplay) {
var img = jQuery('<span>&nbsp;</span><a href="javascript:" onclick="' +
'jQuery.ptTimeSelect.openCntr(jQuery(this).data(\'ptTimeSelectEle\'));">' +
thisOpt.popupImage + '</a>'
)
.data("ptTimeSelectEle", e);
e.after(img);
}
if (thisOpt.onFocusDisplay){
e.focus(function(){
jQuery.ptTimeSelect.openCntr(this);
});
}
return this;
});
};// End of jQuery.fn.ptTimeSelect
})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long