|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/piltdweb1/js/ |
Upload File : |
/* ---------------------
CUSTOM JS DOCUMENT
--------------------- */
var appMaster = {
/* ---------------------
Page Loader
--------------------- */
pageLoader: function(){
$(".loader-item").delay(700).fadeOut();
$("#pageloader").delay(800).fadeOut("slow");
},
/* ---------------------
Navigation Menu
--------------------- */
navBar: function(){
/* ---------------------
Sticky
--------------------- */
if ($('#sticker').length) {
$("#sticker").sticky({topSpacing:0});
}
/* --------------------------
Home Background Super Slider
-------------------------- */
if ($('#slides').length) {
$('#slides').superslides({
});
}
},
/* --------------------------
HeaderSearch, Phone & Social Icons Toggle
-------------------------- */
toggleNav: function(){
/* header Contact (Phone) */
$( ".header-contact" ).click(function() {
$( ".header-contact-content" ).show( "fast", function() {});
$('.transparent-header .navbar').fadeIn().addClass('top-search-open');
$(".close").click(function() {
$(".header-contact-content").hide("fast", function() {});
$('.transparent-header .navbar').fadeIn().removeClass('top-search-open');
})
});
/* header Search (Search Form) */
$( ".header-search" ).click(function() {
$( ".header-search-content" ).show( "fast", function() {});
$('.transparent-header .navbar').fadeIn().addClass('top-search-open');
$(".close").click(function() {
$(".header-search-content").hide("fast", function() {});
$('.transparent-header .navbar').fadeIn().removeClass('top-search-open');
})
});
/* header Share (Search Form) */
$( ".header-share" ).click(function() {
$( ".header-share-content" ).show( "fast", function() {});
$('.transparent-header .navbar').fadeIn().addClass('top-search-open');
$(".close").click(function() {
$(".header-share-content").hide("fast", function() {});
$('.transparent-header .navbar').fadeIn().removeClass('top-search-open');
})
});
},
/* ---------------------
Owl Slider
/* --------------------- */
owlCarousel: function(){
(function($) {
"use strict";
if ($('.owl-carousel').length) {
$(".owl-carousel").each(function (index) {
var effect_mode = $(this).data('effect');
var autoplay = $(this).data('autoplay');
var navigation = $(this).data('navigation');
var pagination = $(this).data('pagination');
var singleitem = $(this).data('singleitem');
var items = $(this).data('items');
var itemsdesktop = $(this).data('desktop');
var itemsdesktopsmall = $(this).data('desktopsmall');
var itemstablet = $(this).data('tablet');
var itemsmobile = $(this).data('mobile');
if( itemsdesktop > 0 )
{
itemsdesktop = [1199, itemsdesktop];
}
if( itemsdesktopsmall > 0 )
{
itemsdesktopsmall = [979, itemsdesktopsmall];
}
if( itemstablet > 0 )
{
itemstablet = [479, itemstablet];
}
if( itemsmobile > 0 )
{
itemsmobile = [479, itemsmobile];
}
$(this).owlCarousel({
transitionStyle: effect_mode,
autoPlay : autoplay,
navigation : navigation,
pagination : pagination,
singleItem : singleitem,
items : items,
itemsDesktop : itemsdesktop,
itemsDesktopSmall : itemsdesktopsmall,
itemsTablet : itemstablet,
itemsMobile : itemsmobile,
navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
});
});
}
})(jQuery);
},
/* ---------------------
Animation
/* --------------------- */
dataAnimations: function() {
$('[data-animation]').each(function() {
var element = $(this);
element.addClass('animated');
element.appear(function() {
var delay = ( element.data('delay') ? element.data('delay') : 1 );
if( delay > 1 ) element.css('animation-delay', delay + 'ms');
element.addClass( element.data('animation') );
setTimeout(function() {
element.addClass('visible');
}, delay);
});
});
},
/* ---------------------
Owl Slider
/* --------------------- */
progressBar: function(){
if ($('.progress-bar').length) {
$('.progress-bar').each(function() {
$(this).appear(function(){
var datavl = $(this).attr('data-percentage');
$(this).animate({ "width" : datavl + "%"}, '1200');
});
});
}
},
/* ---------------------
Background Image Attribute
/* --------------------- */
bgImage: function(){
var pageSection = $(".image-bg, .parallax-bg");
pageSection.each(function(indx){
if ($(this).attr("data-background")){
$(this).css("background-image", "url(" + $(this).data("background") + ")");
}
});
},
/* ---------------------
Fun Factor / Counter
/* --------------------- */
funFactor: function(){
(function($){
$(".count-number").appear(function(){
$(this).each(function(){
datacount = $(this).attr('data-count');
$(this).find('.counter').delay(6000).countTo({
from: 10,
to: datacount,
speed: 3000,
refreshInterval: 50,
});
});
});
})(jQuery);
},
/* ---------------------
Parallax BG
/* --------------------- */
parallaxBg: function(){
if($('.image-bg').length != 0 && !navigator.userAgent.match(/iPad|iPhone|Android/i)){
$.stellar({
horizontalScrolling: false,
verticalOffset: 0,
horizontalOffset: 0,
responsive: true,
scrollProperty: 'scroll',
parallaxElements: false,
});
}
},
/* ---------------------
Portfolio
/* --------------------- */
portfolioFilter: function(){
if($('#mix-container').length != 0){
$('#mix-container').mixItUp();
}
},
/* ---------------------
Image Popup
/* --------------------- */
prettyPhoto: function(){
(function($) {
"use strict";
if( $("a[rel^='prettyPhoto'], a[data-rel^='prettyPhoto']").length != 0 ) {
$("a[rel^='prettyPhoto'], a[data-rel^='prettyPhoto']").prettyPhoto({hook: 'data-rel', theme: "dark_square", social_tools: false, deeplinking: false});
}
})(jQuery);
},
/* ---------------------
Background Video
/* --------------------- */
backgroundVideo: function(){
if (typeof $.fn.mb_YTPlayer != 'undefined' && $.isFunction($.fn
.mb_YTPlayer)) {
var m = false;
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(
navigator.userAgent)) {
m = true
}
var v = $('.player');
if (m == false) {
v.mb_YTPlayer();
$('#video-controls a')
.each(function() {
var t = $(this);
t.on('click', (function(e) {
e.preventDefault();
if (t.hasClass(
'fa-volume-off')) {
t.removeClass(
'fa-volume-off'
)
.addClass(
'fa-volume-down'
);
v.unmuteYTPVolume();
return false
}
if (t.hasClass(
'fa-volume-down')) {
t.removeClass(
'fa-volume-down'
)
.addClass(
'fa-volume-off'
);
v.muteYTPVolume();
return false
}
if (t.hasClass('fa-pause')) {
t.removeClass(
'fa-pause')
.addClass('fa-play');
v.pauseYTP();
return false
}
if (t.hasClass('fa-play')) {
t.removeClass('fa-play')
.addClass(
'fa-pause');
v.playYTP();
return false
}
}));
});
$('#video-controls')
.show();
}
}
},
/* --------------------------------------------
Scroll Navigation
-------------------------------------------- */
navMenu: function(){
jQuery('.scroll').bind('click', function(event) {
var $anchor = jQuery(this);
var headerH = jQuery('#navigation').outerHeight();
jQuery('html, body').stop().animate({
scrollTop : jQuery($anchor.attr('href')).offset().top - 60 + "px"
}, 1200, 'easeInOutExpo');
event.preventDefault();
});
/* Active When Scroll */
jQuery('body').scrollspy({
target: '#topnav',
offset: 95
})
/* Responsive Auto Close */
$('.one-page .nav li a').click(function () {
$('.navbar-collapse').removeClass('in');
});
/* Smooth Scroll Links */
jQuery('.page-scroll a')
.bind('click', function(event) {
var $anchor = jQuery(this);
jQuery('html, body')
.stop()
.animate({
scrollTop: jQuery($anchor.attr('href'))
.offset()
.top
}, 1500, 'easeInOutExpo');
event.preventDefault();
});
},
/* --------------------------------------------
Scroll Navigation
-------------------------------------------- */
/* Text Tying Slider */
typedSlider: function() {
jQuery(".element").each(function(){
var $this = jQuery(this);
$this.typed({
strings: $this.attr('data-elements').split(','),
typeSpeed: 100,
backDelay: 3000
});
});
},
/* --------------------------------------------
Day Counter
-------------------------------------------- */
countDown: function() {
$('.daycounter').each(function(){
var counter_id = $(this).attr('id');
var counter_type = $(this).data('counter');
var year = $(this).data('year');
var month = $(this).data('month');
var date = $(this).data('date');
var countDay = new Date();
countDay = new Date(year, month - 1, date);
if( counter_type == "down" ) {
$("#"+counter_id).countdown({
labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Mins', 'Secs'],
labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Min', 'Sec'],
until: countDay
});
} else if( counter_type == "up" ) {
$("#"+counter_id).countdown({
labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Mins', 'Secs'],
labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Min', 'Sec'],
since: countDay
});
}
});
},
/* --------------------------------------------
Price Range Slier
-------------------------------------------- */
priceRange: function() {
if( $(".range").length != 0 ) {
$('.range').nstSlider({
"left_grip_selector": ".leftGrip",
"right_grip_selector": ".rightGrip",
"value_bar_selector": ".bar",
"value_changed_callback": function(cause, leftValue, rightValue) {
var $container = $(this).parent();
$container.find('.leftLabel').text(leftValue);
$container.find('.rightLabel').text(rightValue);
},
"highlight": {
"grip_class": "gripHighlighted",
"panel_selector": ".highlightPanel"
}
});
$('#highlightRangeButton').click(function() {
var highlightMin = Math.random() * 20,
highlightMax = highlightMin + Math.random() * 80;
$('.nstSlider').nstSlider('highlight_range', highlightMin, highlightMax);
});
}
},
/*==========Navigation Menu============*/
sideNav: function() {
$("#navigation-menu").click(function(e) {
e.preventDefault();
$("#wrapper .toggle-menu").animate({ right: '0px' }, "slow");
return false;
});
$("#navigation-close").click(function(e) {
e.preventDefault();
$("#wrapper .toggle-menu").animate({ right: '-50%' }, "slow");
return false;
});
/* ----------- Menus hide after click -- mobile devices ----------- */
$('#wrapper .nav li a').click(function () {
$("#wrapper .toggle-menu").animate({ right: '-50%' }, "slow");
return false;
});
$('.scroll-2').bind('click', function(event) {
var $anchor = $(this);
var headerH = $('#navigation-menu').outerHeight();
$('html, body').stop().animate({
scrollTop : $($anchor.attr('href')).offset().top + 1 + "px"
}, 1200, 'easeInOutExpo');
event.preventDefault();
});
},
/* Background image height equal to the browser height. */
fullScreen: function() {
$('.full-screen').css({ 'height': $(window).height() });
$(window).on('resize', function() {
$('.full-screen').css({ 'height': $(window).height() });
});
},
fancySelect: function() {
"use strict";
if ( $( ".fancy-select" ).length !== 0 ) {
$('.fancy-select').fancySelect();
}
},
hiddenFooter: function() {
var footer_height = $(".hidden-footer").height();
$('#page').css({ 'margin-bottom': footer_height + "px" });
$('.hidden-footer').css({ 'height': footer_height + "px" });
$('.hidden-footer').css({ 'max-height': footer_height + "px" });
$(window).on('resize', function() {
$('#page').css({ 'margin-bottom': footer_height + "px" });
$('.hidden-footer').css({ 'height': footer_height + "px" });
$('.hidden-footer').css({ 'max-height': footer_height + "px" });
});
},
/* --------------------------------------------
Masonry Grid
-------------------------------------------- */
masonryGrid: function(){
$('.masonry-grid').each(function(){
var $port_container = $(this);
var filter_selector = $port_container.parent().find('.works-filters li.active').data('filter');
$port_container.imagesLoaded(function(){
$port_container.isotope({
itemSelector: '.grid-item',
filter: filter_selector,
animationEngine: "css",
masonry: {
columnWidth: '.grid-sizer'
}
});
});
/* Portfolio Filter Items */
$('.works-filters li').click(function(){
$(this).parents().find('.works-filters li.active').removeClass('active');
$(this).addClass('active');
var selector = $(this).parents().find('.works-filters li.active').attr('data-filter');
$(this).parents().find('.masonry-grid').isotope({ filter: selector, animationEngine : "css" });
return false;
});
});
},
/* --------------------------------------------
Product Zoom
-------------------------------------------- */
productZoom: function(){
if ( $( ".single-product" ).length !== 0 ) {
var zoomWindowWidth;
var zoomWindowHeight;
zoomWindowWidth : 400;
zoomWindowHeight : 470;
zoomType = 'window';
if ($(window).width() < 992) {
zoomWindowWidth : 0;
zoomWindowHeight : 0;
zoomType = 'inner';
}
$("#zoom-product").elevateZoom({
gallery:'zoom-product-thumb',
cursor: 'pointer',
galleryActiveClass: 'active',
imageCrossfade: true,
responsive: true,
scrollZoom: false,
zoomWindowWidth : zoomWindowWidth,
zoomWindowHeight : zoomWindowHeight,
zoomType : zoomType
});
$("#zoom-product").bind("click", function(e) {
var ez = $('#zoom-product').data('elevateZoom');
$.fancybox(ez.getGalleryList());
return false;
});
$('#plus').click(function() {
$('#output').html(function(i, val) { return val*1+1 });
});
$('#minus').click(function() {
$('#output').html(function(i, val) { return val*1-1 });
});
}
},
/* --------------------------------------------
Local Hosted Video Player
-------------------------------------------- */
gridRotator: function(){
if ( $( "#ri-grid" ).length !== 0 ) {
$( '#ri-grid' ).gridrotator( {
rows : 3,
columns : 8,
interval : 2000,
animType : 'random',
animSpeed : 1000,
step : 2,
w1024 : { rows : 4, columns : 6 },
w768 : {rows : 4,columns : 5 },
w480 : {rows : 4,columns : 3 },
w320 : {rows : 4,columns : 2 },
w240 : {rows : 4,columns : 2 },
});
}
},
/* --------------------------------------------
Local Hosted Video Player
-------------------------------------------- */
datePicker: function(){
if ( $( ".date-picker" ).length !== 0 ) {
$(function () {
$('.date-picker').datetimepicker({
format: 'DD/MM/YYYY'
});
});
}
},
timePicker: function(){
if ( $( ".time-picker" ).length !== 0 ) {
$(function () {
$('.time-picker').datetimepicker({
format: 'LT'
});
});
}
},
/* --------------------------------------------
Sticky Sidebar
-------------------------------------------- */
sidebarSticky: function(){
if( $("#sidebar").length != 0 ) {
$('#sidebar').stickit();
}
}
};
$(document).ready(function() {
appMaster.pageLoader();
appMaster.navBar();
appMaster.toggleNav();
appMaster.owlCarousel();
appMaster.progressBar();
appMaster.dataAnimations();
appMaster.bgImage();
appMaster.funFactor();
appMaster.parallaxBg();
appMaster.portfolioFilter();
appMaster.prettyPhoto();
appMaster.backgroundVideo();
//appMaster.simplecontactForm();
//appMaster.careerForm();
//appMaster.subscribeForm();
appMaster.navMenu();
appMaster.typedSlider();
//appMaster.videotextSlider();
appMaster.countDown();
//appMaster.socialPhotostream();
appMaster.priceRange();
//appMaster.allCharts();
appMaster.masonryGrid();
appMaster.productZoom();
appMaster.sideNav();
appMaster.fullScreen();
appMaster.fancySelect();
//appMaster.hostedVideo();
appMaster.gridRotator();
appMaster.datePicker();
appMaster.timePicker();
appMaster.sidebarSticky();
});
/*---------------STICKY NAVIGATION------------------*/
var header = jQuery('#slider-section'),
headerPos = header.offset();
$(window).scroll(function() {
if( $(".side-nav").length != 0 ) {
if( $(this).scrollTop() > headerPos.top+header.height() ) {
$('#sticky').addClass('nav-fixed').fadeIn('medium');
} else {
$('#sticky').removeClass('nav-fixed').fadeIn('medium');
}
}
});
$(window).load(function() {
appMaster.hiddenFooter();
appMaster.masonryGrid();
});
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})