Initial commit

This commit is contained in:
sHa
2018-05-24 01:25:12 +03:00
commit 7bc5a373fb
38 changed files with 7303 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
(function ($) {
'use strict';
// ISO-693-1 Language codes: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
// Submit Message
// 'submit': 'Submitting...'
// Mailchimp Responses
// 0: 'We have sent you a confirmation email'
// 1: 'Please enter a value'
// 2: 'An email address must contain a single @'
// 3: 'The domain portion of the email address is invalid (the portion after the @: )'
// 4: 'The username portion of the email address is invalid (the portion before the @: )'
// 5: 'This email address looks fake or invalid. Please enter a real email address'
$.ajaxChimp.translations = {
// Translation via https://github.com/lifeisfoo
'it': {
'submit': 'Registrazione in corso...',
0: 'Ti abbiamo inviato una mail di conferma',
1: 'Per favore inserisci una mail',
2: 'Un indirizzo valido contiene una sola @',
3: 'Il dominio della tua mail non è valido (la porzione dopo la @: )',
4: 'Il nome della mail non è valido (la porzione prima della @: )',
5: 'L\'indirizzo email sembra finto o non valido: per favore inseriscine uno reale'
},
// Translation via https://github.com/Cube42
'de': {
'submit': 'Senden...',
0: 'Wir haben Ihnen eine Bestätigungs-E-Mail geschickt',
1: 'Bitte geben Sie Ihre E-Mail-Adresse ein',
2: 'Eine E-Mail-Adresse muss ein @ enthalten',
3: 'Der Domain-Teil der E-Mail-Adresse ist ungültig (der Teil nach dem @)',
4: 'Der Benutzername der E-Mail-Adresse ist ungültig (der Teil vor dem @)',
5: 'Diese E-Mail-Adresse scheint gefälscht oder ungültig zu sein. Bitte geben Sie eine echte E-Mail-Adresse an!'
},
// Translation via https://github.com/designorant
'pl': {
'submit': 'Wysyłanie...',
0: 'Email z potwierdzeniem został wysłany',
1: 'Proszę podać adres email',
2: 'Adres email musi zawierać jeden znak @',
3: 'Część adresu z domeną jest niepoprawna (część po znaku @: )',
4: 'Część adresu z użytkownikiem jest niepoprawna (część przed znakiem @: )',
5: 'Ten adres wygląda na nieprawdziwy lub niepoprawny. Proszę podać prawdziwy adres email.'
},
// The translations below are from google translate, and may not be accurate.
// Pull requests with translations for other languages as well as corrections are welcome.
'es': {
'submit': 'Grabación en curso...',
0: 'Te hemos enviado un email de confirmación',
1: 'Por favor, introduzca un valor',
2: 'Una dirección de correo electrónico debe contener una sola @',
3: 'La parte de dominio de la dirección de correo electrónico no es válida (la parte después de la @:)',
4: 'La parte de usuario de la dirección de correo electrónico no es válida (la parte antes de la @:)',
5: 'Esta dirección de correo electrónico se ve falso o no válido. Por favor, introduce una dirección de correo electrónico real'
},
'fr': {
'submit': 'Enregistrement en cours...',
0: 'Nous vous avons envoyé un e-mail de confirmation',
1: 'S\'il vous plaît entrer une valeur',
2: 'Une adresse e-mail doit contenir un seul @',
3: 'La partie domaine de l\'adresse e-mail n\'est pas valide (la partie après le @:)',
4: 'La partie nom d\'utilisateur de l\'adresse email n\'est pas valide (la partie avant le signe @:)',
5: 'Cette adresse e-mail semble faux ou non valides. S\'il vous plaît entrer une adresse email valide'
}
};
})(jQuery);

1
js/jquery.ajaxchimp.min.js vendored Normal file
View File

@@ -0,0 +1 @@
(function($){"use strict";$.ajaxChimp={responses:{"We have sent you a confirmation email":0,"Please enter a value":1,"An email address must contain a single @":2,"The domain portion of the email address is invalid (the portion after the @: )":3,"The username portion of the email address is invalid (the portion before the @: )":4,"This email address looks fake or invalid. Please enter a real email address":5},translations:{en:null},init:function(selector,options){$(selector).ajaxChimp(options)}};$.fn.ajaxChimp=function(options){$(this).each(function(i,elem){var form=$(elem);var email=form.find("input[type=email]");var label=form.find("label[for="+email.attr("id")+"]");var settings=$.extend({url:form.attr("action"),language:"en"},options);var url=settings.url.replace("/post?","/post-json?").concat("&c=?");form.attr("novalidate","true");email.attr("name","EMAIL");form.submit(function(){function successCallback(resp){if(resp.result==="success"){msg="We have sent you a confirmation email";label.removeClass("error").addClass("valid");email.removeClass("error").addClass("valid")}else{email.removeClass("valid").addClass("error");label.removeClass("valid").addClass("error");var index=-1;var msg;try{var parts=resp.msg.split(" - ",2);if(parts[1]===undefined){msg=resp.msg}else{var i=parseInt(parts[0],10);if(i.toString()===parts[0]){index=parts[0];msg=parts[1]}else{index=-1;msg=resp.msg}}}catch(e){index=-1;msg=resp.msg}}if(settings.language!=="en"&&$.ajaxChimp.responses[msg]&&$.ajaxChimp.translations&&$.ajaxChimp.translations[settings.language]&&$.ajaxChimp.translations[settings.language][$.ajaxChimp.responses[msg]]){msg=$.ajaxChimp.translations[settings.language][$.ajaxChimp.responses[msg]]}label.html(msg);label.show(2e3);if(settings.callback){settings.callback(resp)}}var data={};var dataArray=form.serializeArray();$.each(dataArray,function(index,item){data[item.name]=item.value});$.ajax({url:url,data:data,success:successCallback,dataType:"jsonp",error:function(resp,text){console.log("mailchimp ajax submit error: "+text)}});var submitMsg="Submitting...";if(settings.language!=="en"&&$.ajaxChimp.translations&&$.ajaxChimp.translations[settings.language]&&$.ajaxChimp.translations[settings.language]["submit"]){submitMsg=$.ajaxChimp.translations[settings.language]["submit"]}label.html(submitMsg).show(2e3);return false})});return this}})(jQuery);

8
js/jquery.counterup.min.js vendored Normal file
View File

@@ -0,0 +1,8 @@
/*!
* jquery.counterup.js 1.0
*
* Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
* Released under the GPL v2 License
*
* Date: Nov 26, 2013
*/(function(e){"use strict";e.fn.counterUp=function(t){var n=e.extend({time:400,delay:10},t);return this.each(function(){var t=e(this),r=n,i=function(){var e=[],n=r.time/r.delay,i=t.text(),s=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");var o=/^[0-9]+$/.test(i),u=/^[0-9]+\.[0-9]+$/.test(i),a=u?(i.split(".")[1]||[]).length:0;for(var f=n;f>=1;f--){var l=parseInt(i/n*f);u&&(l=parseFloat(i/n*f).toFixed(a));if(s)while(/(\d+)(\d{3})/.test(l.toString()))l=l.toString().replace(/(\d+)(\d{3})/,"$1,$2");e.unshift(l)}t.data("counterup-nums",e);t.text("0");var c=function(){t.text(t.data("counterup-nums").shift());if(t.data("counterup-nums").length)setTimeout(t.data("counterup-func"),r.delay);else{delete t.data("counterup-nums");t.data("counterup-nums",null);t.data("counterup-func",null)}};t.data("counterup-func",c);setTimeout(t.data("counterup-func"),r.delay)};t.waypoint(i,{offset:"100%",triggerOnce:!0})})}})(jQuery);

83
js/jquery.fitvids.js Normal file
View File

@@ -0,0 +1,83 @@
/*global jQuery */
/*jshint browser:true */
/*!
* FitVids 1.1
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
*/
;(function( $ ){
'use strict';
$.fn.fitVids = function( options ) {
var settings = {
customSelector: null,
ignore: null
};
if(!document.getElementById('fit-vids-style')) {
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
var head = document.head || document.getElementsByTagName('head')[0];
var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
var div = document.createElement("div");
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
head.appendChild(div.childNodes[1]);
}
if ( options ) {
$.extend( settings, options );
}
return this.each(function(){
var selectors = [
'iframe[src*="player.vimeo.com"]',
'iframe[src*="youtube.com"]',
'iframe[src*="youtube-nocookie.com"]',
'iframe[src*="kickstarter.com"][src*="video.html"]',
'object',
'embed'
];
if (settings.customSelector) {
selectors.push(settings.customSelector);
}
var ignoreList = '.fitvidsignore';
if(settings.ignore) {
ignoreList = ignoreList + ', ' + settings.ignore;
}
var $allVideos = $(this).find(selectors.join(','));
$allVideos = $allVideos.not('object object'); // SwfObj conflict patch
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
$allVideos.each(function(){
var $this = $(this);
if($this.parents(ignoreList).length > 0) {
return; // Disable FitVids on this video.
}
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
{
$this.attr('height', 9);
$this.attr('width', 16);
}
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
aspectRatio = height / width;
if(!$this.attr('id')){
var videoID = 'fitvid' + Math.floor(Math.random()*999999);
$this.attr('id', videoID);
}
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
$this.removeAttr('height').removeAttr('width');
});
});
};
// Works with either jQuery or Zepto
})( window.jQuery || window.Zepto );

View File

@@ -0,0 +1,73 @@
/*
Plugin: jQuery Parallax
Version 1.1.3
Author: Ian Lunn
Twitter: @IanLunn
Author URL: http://www.ianlunn.co.uk/
Plugin URL: http://www.ianlunn.co.uk/plugins/jquery-parallax/
Dual licensed under the MIT and GPL licenses:
http://www.opensource.org/licenses/mit-license.php
http://www.gnu.org/licenses/gpl.html
*/
(function( $ ){
var $window = $(window);
var windowHeight = $window.height();
$window.resize(function () {
windowHeight = $window.height();
});
$.fn.parallax = function(xpos, speedFactor, outerHeight) {
var $this = $(this);
var getHeight;
var firstTop;
var paddingTop = 0;
//get the starting position of each element to have parallax applied to it
function update (){
$this.each(function(){
firstTop = $this.offset().top;
});
if (outerHeight) {
getHeight = function(jqo) {
return jqo.outerHeight(true);
};
} else {
getHeight = function(jqo) {
return jqo.height();
};
}
// setup defaults if arguments aren't specified
if (arguments.length < 1 || xpos === null) xpos = "50%";
if (arguments.length < 2 || speedFactor === null) speedFactor = 0.5;
if (arguments.length < 3 || outerHeight === null) outerHeight = true;
// function to be called whenever the window is scrolled or resized
var pos = $window.scrollTop();
$this.each(function(){
var $element = $(this);
var top = $element.offset().top;
var height = getHeight($element);
// Check if totally above or totally below viewport
if (top + height < pos || top > pos + windowHeight) {
return;
}
$this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px");
});
}
$window.bind('scroll', update).resize(update);
update();
};
})(jQuery);

7
js/jquery.prettyPhoto.js Normal file

File diff suppressed because one or more lines are too long

1512
js/owl.carousel.js Normal file

File diff suppressed because it is too large Load Diff

312
js/script.js Normal file
View File

@@ -0,0 +1,312 @@
//LOADER/SPINNER
$(window).bind("load", function() {
"use strict";
$(".spn_hol").fadeOut(1000);
});
//MENU APPEAR AND HIDE
$(document).ready(function() {
"use strict";
$(window).scroll(function() {
"use strict";
if ($(window).scrollTop() > 80) {
$(".navbar").css({
'margin-top': '0px',
'opacity': '1'
})
$(".navbar-nav>li>a").css({
'padding-top': '15px'
});
$(".navbar-brand img").css({
'height': '35px'
});
$(".navbar-brand img").css({
'padding-top': '0px'
});
$(".navbar-default").css({
'background-color': 'rgba(10, 102, 9, 0.91)'
});
} else {
$(".navbar").css({
'margin-top': '-100px',
'opacity': '0'
})
$(".navbar-nav>li>a").css({
'padding-top': '45px'
});
$(".navbar-brand img").css({
'height': '45px'
});
$(".navbar-brand img").css({
'padding-top': '20px'
});
$(".navbar-default").css({
'background-color': 'rgba(59, 59, 59, 0)'
});
}
});
});
// MENU SECTION ACTIVE
$(document).ready(function() {
"use strict";
$(".navbar-nav li a").click(function() {
"use strict";
$(".navbar-nav li a").parent().removeClass("active");
$(this).parent().addClass("active");
});
});
// Hilight MENU on SCROLl
$(document).ready(function() {
"use strict";
$(window).scroll(function() {
"use strict";
$(".page").each(function() {
"use strict";
var bb = $(this).attr("id");
var hei = $(this).outerHeight();
var grttop = $(this).offset().top - 70;
if ($(window).scrollTop() > grttop - 1 && $(window).scrollTop() < grttop + hei - 1) {
var uu = $(".navbar-nav li a[href='#" + bb + "']").parent().addClass("active");
} else {
var uu = $(".navbar-nav li a[href='#" + bb + "']").parent().removeClass("active");
}
});
});
});
//SMOOTH MENU SCROOL
$(function() {
"use strict";
$('a[href*=#]:not([href=#])').click(function() {
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
}, 1000);
return false;
}
}
});
});
// FIX HOME SCREEN HEIGHT
$(document).ready(function() {
"use strict";
setInterval(function() {
"use strict";
var widnowHeight = $(window).height();
var containerHeight = $(".home-container").height();
var padTop = widnowHeight - containerHeight;
$(".home-container").css({
'padding-top': Math.round(padTop / 2) + 'px',
'padding-bottom': Math.round(padTop / 2) + 'px'
});
}, 10)
});
//PARALLAX
$(document).ready(function() {
"use strict";
$(window).bind('load', function() {
"use strict";
parallaxInit();
});
function parallaxInit() {
"use strict";
$('.home-parallax').parallax("30%", 0.1);
$('.subscribe-parallax').parallax("30%", 0.1);
$('.testimonial').parallax("10%", 1);
/*add as necessary*/
}
});
//OWL CAROSEL
$(document).ready(function() {
"use strict";
$("#owl-demo").owlCarousel({
autoPlay: 3000,
items: 4, //10 items above 1000px browser width
itemsDesktop: [1370, 3], //5 items between 1000px and 901px
itemsDesktopSmall: [900, 2], // betweem 900px and 601px
itemsTablet: [600, 1], //2 items between 600 and 0
});
});
//PRETTYPHOTO
$(document).ready(function() {
"use strict";
$("a[rel^='prettyPhoto']").prettyPhoto({
show_title: false,
/* true/false */
});
});
//WOW JS
$(document).ready(function() {
"use strict";
new WOW().init();
});
//RESPONSIVE VIDEO
$(document).ready(function() {
"use strict";
// Basic FitVids Test
$(".video").fitVids();
});
//CONTACT FORM VALIDATION
$(document).ready(function() {
"use strict";
$(".form_submit").click(function() {
"use strict";
var name = $("#name").val();
var emaild = $("#email").val();
var subject = $("#subject").val();
var message = $("#message").val();
var testEmail = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
if (!name) {
$(".form_error .name_error").addClass("show").removeClass("hide");
return false;
} else {
$(".form_error .name_error").addClass("hide").removeClass("show");
}
if (!emaild) {
$(".form_error .email_error").addClass("show").removeClass("hide");
return false;
} else {
$(".form_error .email_error").addClass("hide").removeClass("show");
if (testEmail.test(emaild)) {
$(".form_error .email_val_error").addClass("hide").removeClass("show");
} else {
$(".form_error .email_val_error").addClass("show").removeClass("hide");
return false;
}
}
if (!message) {
$(".form_error .message_error").addClass("show").removeClass("hide");
return false;
} else {
$(".form_error .message_error").addClass("hide").removeClass("show");
}
if (name && emaild && message) {
$.ajax({
url: 'contact.php',
data: {
name: name,
emaild: emaild,
subject: subject,
message: message
},
type: 'POST',
success: function(data) {
$(".Sucess").show();
$(".Sucess").fadeIn(2000);
$(".Sucess").html("<i class='fa fa-check'></i> Dear <b>" + name + "</b> Thank you for your inquiry we will respond to you as soon as possible!");
$("#Name").val("");
$("#Email").val("");
$("#Subject").val("");
$("#Message").val("");
$(".form_error .name_error, .form_error .email_error, .form_error .email_val_error, .form_error .message_error").addClass("hide").removeClass("show");
$("#name").val("");
$("#email").val("");
$("#subject").val("");
$("#message").val("");
}
});
}
return false;
});
});
/// SMOOTH SCROLL
$(document).ready(function() {
"use strict";
var scrollAnimationTime = 1200,
scrollAnimation = 'easeInOutExpo';
$('a.scrollto').bind('click.smoothscroll', function(event) {
event.preventDefault();
var target = this.hash;
$('html, body').stop().animate({
'scrollTop': $(target).offset().top
}, scrollAnimationTime, scrollAnimation, function() {
window.location.hash = target;
});
});
//COUNTER
$('.counter_num').counterUp({
delay: 10,
time: 2000
});
});

304
js/smoothscroll.js Normal file
View File

@@ -0,0 +1,304 @@
// SmoothScroll v0.9.9
// Licensed under the terms of the MIT license.
// People involved
// - Balazs Galambosi: maintainer (CHANGELOG.txt)
// - Patrick Brunner (patrickb1991@gmail.com)
// - Michael Herf: ssc_pulse Algorithm
function ssc_init() {
if (!document.body) return;
var e = document.body;
var t = document.documentElement;
var n = window.innerHeight;
var r = e.scrollHeight;
ssc_root = document.compatMode.indexOf("CSS") >= 0 ? t : e;
ssc_activeElement = e;
ssc_initdone = true;
if (top != self) {
ssc_frame = true
} else if (r > n && (e.offsetHeight <= n || t.offsetHeight <= n)) {
ssc_root.style.height = "auto";
if (ssc_root.offsetHeight <= n) {
var i = document.createElement("div");
i.style.clear = "both";
e.appendChild(i)
}
}
if (!ssc_fixedback) {
e.style.backgroundAttachment = "scroll";
t.style.backgroundAttachment = "scroll"
}
if (ssc_keyboardsupport) {
ssc_addEvent("keydown", ssc_keydown)
}
}
function ssc_scrollArray(e, t, n, r) {
r || (r = 1e3);
ssc_directionCheck(t, n);
ssc_que.push({
x: t,
y: n,
lastX: t < 0 ? .99 : -.99,
lastY: n < 0 ? .99 : -.99,
start: +(new Date)
});
if (ssc_pending) {
return
}
var i = function () {
var s = +(new Date);
var o = 0;
var u = 0;
for (var a = 0; a < ssc_que.length; a++) {
var f = ssc_que[a];
var l = s - f.start;
var c = l >= ssc_animtime;
var h = c ? 1 : l / ssc_animtime;
if (ssc_pulseAlgorithm) {
h = ssc_pulse(h)
}
var p = f.x * h - f.lastX >> 0;
var d = f.y * h - f.lastY >> 0;
o += p;
u += d;
f.lastX += p;
f.lastY += d;
if (c) {
ssc_que.splice(a, 1);
a--
}
}
if (t) {
var v = e.scrollLeft;
e.scrollLeft += o;
if (o && e.scrollLeft === v) {
t = 0
}
}
if (n) {
var m = e.scrollTop;
e.scrollTop += u;
if (u && e.scrollTop === m) {
n = 0
}
}
if (!t && !n) {
ssc_que = []
}
if (ssc_que.length) {
setTimeout(i, r / ssc_framerate + 1)
} else {
ssc_pending = false
}
};
setTimeout(i, 0);
ssc_pending = true
}
function ssc_wheel(e) {
if (!ssc_initdone) {
ssc_init()
}
var t = e.target;
var n = ssc_overflowingAncestor(t);
if (!n || e.defaultPrevented || ssc_isNodeName(ssc_activeElement, "embed") || ssc_isNodeName(t, "embed") && /\.pdf/i.test(t.src)) {
return true
}
var r = e.wheelDeltaX || 0;
var i = e.wheelDeltaY || 0;
if (!r && !i) {
i = e.wheelDelta || 0
}
if (Math.abs(r) > 1.2) {
r *= ssc_stepsize / 120
}
if (Math.abs(i) > 1.2) {
i *= ssc_stepsize / 120
}
ssc_scrollArray(n, -r, -i);
e.preventDefault()
}
function ssc_keydown(e) {
var t = e.target;
var n = e.ctrlKey || e.altKey || e.metaKey;
if (/input|textarea|embed/i.test(t.nodeName) || t.isContentEditable || e.defaultPrevented || n) {
return true
}
if (ssc_isNodeName(t, "button") && e.keyCode === ssc_key.spacebar) {
return true
}
var r, i = 0,
s = 0;
var o = ssc_overflowingAncestor(ssc_activeElement);
var u = o.clientHeight;
if (o == document.body) {
u = window.innerHeight
}
switch (e.keyCode) {
case ssc_key.up:
s = -ssc_arrowscroll;
break;
case ssc_key.down:
s = ssc_arrowscroll;
break;
case ssc_key.spacebar:
r = e.shiftKey ? 1 : -1;
s = -r * u * .9;
break;
case ssc_key.pageup:
s = -u * .9;
break;
case ssc_key.pagedown:
s = u * .9;
break;
case ssc_key.home:
s = -o.scrollTop;
break;
case ssc_key.end:
var a = o.scrollHeight - o.scrollTop - u;
s = a > 0 ? a + 10 : 0;
break;
case ssc_key.left:
i = -ssc_arrowscroll;
break;
case ssc_key.right:
i = ssc_arrowscroll;
break;
default:
return true
}
ssc_scrollArray(o, i, s);
e.preventDefault()
}
function ssc_mousedown(e) {
ssc_activeElement = e.target
}
function ssc_setCache(e, t) {
for (var n = e.length; n--;) ssc_cache[ssc_uniqueID(e[n])] = t;
return t
}
function ssc_overflowingAncestor(e) {
var t = [];
var n = ssc_root.scrollHeight;
do {
var r = ssc_cache[ssc_uniqueID(e)];
if (r) {
return ssc_setCache(t, r)
}
t.push(e);
if (n === e.scrollHeight) {
if (!ssc_frame || ssc_root.clientHeight + 10 < n) {
return ssc_setCache(t, document.body)
}
} else if (e.clientHeight + 10 < e.scrollHeight) {
overflow = getComputedStyle(e, "").getPropertyValue("overflow");
if (overflow === "scroll" || overflow === "auto") {
return ssc_setCache(t, e)
}
}
} while (e = e.parentNode)
}
function ssc_addEvent(e, t, n) {
window.addEventListener(e, t, n || false)
}
function ssc_removeEvent(e, t, n) {
window.removeEventListener(e, t, n || false)
}
function ssc_isNodeName(e, t) {
return e.nodeName.toLowerCase() === t.toLowerCase()
}
function ssc_directionCheck(e, t) {
e = e > 0 ? 1 : -1;
t = t > 0 ? 1 : -1;
if (ssc_direction.x !== e || ssc_direction.y !== t) {
ssc_direction.x = e;
ssc_direction.y = t;
ssc_que = []
}
}
function ssc_pulse_(e) {
var t, n, r;
e = e * ssc_pulseScale;
if (e < 1) {
t = e - (1 - Math.exp(-e))
} else {
n = Math.exp(-1);
e -= 1;
r = 1 - Math.exp(-e);
t = n + r * (1 - n)
}
return t * ssc_pulseNormalize
}
function ssc_pulse(e) {
if (e >= 1) return 1;
if (e <= 0) return 0;
if (ssc_pulseNormalize == 1) {
ssc_pulseNormalize /= ssc_pulse_(1)
}
return ssc_pulse_(e)
}
var ssc_framerate = 150;
var ssc_animtime = 500;
var ssc_stepsize = 150;
var ssc_pulseAlgorithm = true;
var ssc_pulseScale = 6;
var ssc_pulseNormalize = 1;
var ssc_keyboardsupport = true;
var ssc_arrowscroll = 50;
var ssc_frame = false;
var ssc_direction = {
x: 0,
y: 0
};
var ssc_initdone = false;
var ssc_fixedback = true;
var ssc_root = document.documentElement;
var ssc_activeElement;
var ssc_key = {
left: 37,
up: 38,
right: 39,
down: 40,
spacebar: 32,
pageup: 33,
pagedown: 34,
end: 35,
home: 36
};
var ssc_que = [];
var ssc_pending = false;
var ssc_cache = {};
setInterval(function () {
ssc_cache = {}
}, 10 * 1e3);
var ssc_uniqueID = function () {
var e = 0;
return function (t) {
return t.ssc_uniqueID || (t.ssc_uniqueID = e++)
}
}();
var ischrome = /chrome/.test(navigator.userAgent.toLowerCase());
if (ischrome) {
ssc_addEvent("mousedown", ssc_mousedown);
ssc_addEvent("mousewheel", ssc_wheel);
ssc_addEvent("load", ssc_init)
}

8
js/waypoints.min.js vendored Normal file

File diff suppressed because one or more lines are too long