first commit
This commit is contained in:
7
wp-content/themes/cyber/assets/js/bootstrap.min.js
vendored
Normal file
7
wp-content/themes/cyber/assets/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
43
wp-content/themes/cyber/assets/js/customizer.js
Normal file
43
wp-content/themes/cyber/assets/js/customizer.js
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* File customizer.js.
|
||||
*
|
||||
* Theme Customizer enhancements for a better user experience.
|
||||
*
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
'use strict';
|
||||
|
||||
// Site title and description.
|
||||
wp.customize( 'blogname', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-title a' ).text( to );
|
||||
} );
|
||||
} );
|
||||
wp.customize( 'blogdescription', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-description' ).text( to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Header text color.
|
||||
wp.customize( 'header_textcolor', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
if ( 'blank' === to ) {
|
||||
$( '.site-title a, .site-description' ).css( {
|
||||
'clip': 'rect(1px, 1px, 1px, 1px)',
|
||||
'position': 'absolute'
|
||||
} );
|
||||
} else {
|
||||
$( '.site-title a, .site-description' ).css( {
|
||||
'clip': 'auto',
|
||||
'position': 'relative'
|
||||
} );
|
||||
$( '.site-title a, .site-description' ).css( {
|
||||
'color': to
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
} )( jQuery );
|
||||
30
wp-content/themes/cyber/assets/js/cyber_uploader.js
Normal file
30
wp-content/themes/cyber/assets/js/cyber_uploader.js
Normal file
@@ -0,0 +1,30 @@
|
||||
(function( $ ) {
|
||||
'use strict';
|
||||
function media_upload(button_class) {
|
||||
var _custom_media = true,
|
||||
_orig_send_attachment = wp.media.editor.send.attachment;
|
||||
|
||||
$('body').on('click', button_class, function(e) {
|
||||
var button_id ='#'+$(this).attr('id');
|
||||
var self = $(button_id);
|
||||
var send_attachment_bkp = wp.media.editor.send.attachment;
|
||||
var button = $(button_id);
|
||||
var id = button.attr('id').replace('_button', '');
|
||||
_custom_media = true;
|
||||
wp.media.editor.send.attachment = function(props, attachment){
|
||||
if ( _custom_media ) {
|
||||
$('.custom_media_id').val(attachment.id);
|
||||
$('.custom_media_url').val(attachment.url);
|
||||
$('.custom_media_image').attr('src',attachment.url).css('display','block');
|
||||
} else {
|
||||
return _orig_send_attachment.apply( button_id, [props, attachment] );
|
||||
}
|
||||
}
|
||||
wp.media.editor.open(button);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
media_upload('.custom_media_button.button');
|
||||
|
||||
|
||||
})( jQuery );
|
||||
227
wp-content/themes/cyber/assets/js/headline.js
Normal file
227
wp-content/themes/cyber/assets/js/headline.js
Normal file
File diff suppressed because one or more lines are too long
7
wp-content/themes/cyber/assets/js/headroom.min.js
vendored
Normal file
7
wp-content/themes/cyber/assets/js/headroom.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12
wp-content/themes/cyber/assets/js/isotope.pkgd.min.js
vendored
Normal file
12
wp-content/themes/cyber/assets/js/isotope.pkgd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
wp-content/themes/cyber/assets/js/jquery-scrolltofixed-min.js
vendored
Normal file
1
wp-content/themes/cyber/assets/js/jquery-scrolltofixed-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
wp-content/themes/cyber/assets/js/jquery.counterup.min.js
vendored
Normal file
1
wp-content/themes/cyber/assets/js/jquery.counterup.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function($){"use strict";$.fn.counterUp=function(options){var settings=$.extend({time:400,delay:10,offset:100,beginAt:0,formatter:false,context:"window",callback:function(){}},options),s;return this.each(function(){var $this=$(this),counter={time:$(this).data("counterup-time")||settings.time,delay:$(this).data("counterup-delay")||settings.delay,offset:$(this).data("counterup-offset")||settings.offset,beginAt:$(this).data("counterup-beginat")||settings.beginAt,context:$(this).data("counterup-context")||settings.context};var counterUpper=function(){var nums=[];var divisions=counter.time/counter.delay;var num=$(this).attr("data-num")?$(this).attr("data-num"):$this.text();var isComma=/[0-9]+,[0-9]+/.test(num);num=num.replace(/,/g,"");var decimalPlaces=(num.split(".")[1]||[]).length;if(counter.beginAt>num)counter.beginAt=num;var isTime=/[0-9]+:[0-9]+:[0-9]+/.test(num);if(isTime){var times=num.split(":"),m=1;s=0;while(times.length>0){s+=m*parseInt(times.pop(),10);m*=60}}for(var i=divisions;i>=counter.beginAt/num*divisions;i--){var newNum=parseFloat(num/divisions*i).toFixed(decimalPlaces);if(isTime){newNum=parseInt(s/divisions*i);var hours=parseInt(newNum/3600)%24;var minutes=parseInt(newNum/60)%60;var seconds=parseInt(newNum%60,10);newNum=(hours<10?"0"+hours:hours)+":"+(minutes<10?"0"+minutes:minutes)+":"+(seconds<10?"0"+seconds:seconds)}if(isComma){while(/(\d+)(\d{3})/.test(newNum.toString())){newNum=newNum.toString().replace(/(\d+)(\d{3})/,"$1"+","+"$2")}}if(settings.formatter){newNum=settings.formatter.call(this,newNum)}nums.unshift(newNum)}$this.data("counterup-nums",nums);$this.text(counter.beginAt);var f=function(){if(!$this.data("counterup-nums")){settings.callback.call(this);return}$this.html($this.data("counterup-nums").shift());if($this.data("counterup-nums").length){setTimeout($this.data("counterup-func"),counter.delay)}else{$this.data("counterup-nums",null);$this.data("counterup-func",null);settings.callback.call(this)}};$this.data("counterup-func",f);setTimeout($this.data("counterup-func"),counter.delay)};$this.waypoint(function(direction){counterUpper();this.destroy()},{offset:counter.offset+"%",context:counter.context})})}})(jQuery);
|
||||
1
wp-content/themes/cyber/assets/js/jquery.directional-hover.min.js
vendored
Normal file
1
wp-content/themes/cyber/assets/js/jquery.directional-hover.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(a){a.fn.directionalHover=function(b){function c(a,b,c,e,f,g,h,i){var n=0;g/2>=e-i&&(n^=j),c-h>=f/2&&(n^=k),e-i>g/2&&(n^=l),f/2>c-h&&(n^=m),d(n,a,b,c-h,e-i,f/2,g/2)}function d(a,b,c,d,i,j,k){e(a,n)?f(d,i,j,k)?h(b,c,0,2*-j):h(b,c,2*-k,0):e(a,o)?g(d,i,j,k)?h(b,c,2*-k,0):h(b,c,0,2*j):e(a,p)?g(d,i,j,k)?h(b,c,0,2*-j):h(b,c,2*k,0):e(a,q)&&(f(d,i,j,k)?h(b,c,2*k,0):h(b,c,0,2*j))}function e(a,b){return(a&b)===b}function f(a,b,c,d){return 0>d*a-c*b}function g(a,b,c,d){return 0>c*(b-d)+d*a-c*d}function h(a,b,c,d){"in"===b?a.animate({top:c,left:d},0,function(){a.stop().animate({top:0,left:0},i.speed,i.easing)}):"out"===b&&a.animate({top:0,left:0},0,function(){a.stop().animate({top:c,left:d},i.speed,i.easing)})}var i=a.extend({},a.fn.directionalHover.defaults,b),j=1,k=2,l=4,m=8,n=j|m,o=j|k,p=l|m,q=l|k;return this.css({position:"relative",overflow:"hidden"}),this.find("."+i.overlay).css({position:"absolute",top:"-100%"}),this.each(function(){var b=a(this);b.hover(function(a){c(b.find("."+i.overlay),"in",a.pageX,a.pageY,b.width(),b.height(),Math.floor(b.offset().left),b.offset().top)},function(a){c(b.find("."+i.overlay),"out",a.pageX,a.pageY,b.width(),b.height(),Math.floor(b.offset().left),b.offset().top)})})},a.fn.directionalHover.defaults={overlay:"dh-overlay",easing:"swing",speed:400}}(jQuery);
|
||||
285
wp-content/themes/cyber/assets/js/jquery.meanmenu.js
Normal file
285
wp-content/themes/cyber/assets/js/jquery.meanmenu.js
Normal file
@@ -0,0 +1,285 @@
|
||||
/*!
|
||||
* jQuery meanMenu v2.0.8
|
||||
* @Copyright (C) 2012-2014 Chris Wharton @ MeanThemes (https://github.com/meanthemes/meanMenu)
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
|
||||
* HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR
|
||||
* FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE
|
||||
* OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
|
||||
* COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.COPYRIGHT HOLDERS WILL NOT
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL
|
||||
* DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://gnu.org/licenses/>.
|
||||
*
|
||||
* Find more information at http://www.meanthemes.com/plugins/meanmenu/
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
$.fn.meanmenu = function (options) {
|
||||
var defaults = {
|
||||
meanMenuTarget: jQuery(this), // Target the current HTML markup you wish to replace
|
||||
meanMenuContainer: '.mobile-menu-area .container', // Choose where meanmenu will be placed within the HTML
|
||||
meanMenuClose: "X", // single character you want to represent the close menu button
|
||||
meanMenuCloseSize: "18px", // set font size of close button
|
||||
meanMenuOpen: "<span /><span /><span />", // text/markup you want when menu is closed
|
||||
meanRevealPosition: "right", // left right or center positions
|
||||
meanRevealPositionDistance: "0", // Tweak the position of the menu
|
||||
meanRevealColour: "", // override CSS colours for the reveal background
|
||||
meanScreenWidth: "767", // set the screen width you want meanmenu to kick in at
|
||||
meanNavPush: "", // set a height here in px, em or % if you want to budge your layout now the navigation is missing.
|
||||
meanShowChildren: true, // true to show children in the menu, false to hide them
|
||||
meanExpandableChildren: true, // true to allow expand/collapse children
|
||||
meanExpand: "+", // single character you want to represent the expand for ULs
|
||||
meanContract: "-", // single character you want to represent the contract for ULs
|
||||
meanRemoveAttrs: false, // true to remove classes and IDs, false to keep them
|
||||
onePage: false, // set to true for one page sites
|
||||
meanDisplay: "block", // override display method for table cell based layouts e.g. table-cell
|
||||
removeElements: "" // set to hide page elements
|
||||
};
|
||||
options = $.extend(defaults, options);
|
||||
|
||||
// get browser width
|
||||
var currentWidth = window.innerWidth || document.documentElement.clientWidth;
|
||||
|
||||
return this.each(function () {
|
||||
var meanMenu = options.meanMenuTarget;
|
||||
var meanContainer = options.meanMenuContainer;
|
||||
var meanMenuClose = options.meanMenuClose;
|
||||
var meanMenuCloseSize = options.meanMenuCloseSize;
|
||||
var meanMenuOpen = options.meanMenuOpen;
|
||||
var meanRevealPosition = options.meanRevealPosition;
|
||||
var meanRevealPositionDistance = options.meanRevealPositionDistance;
|
||||
var meanRevealColour = options.meanRevealColour;
|
||||
var meanScreenWidth = options.meanScreenWidth;
|
||||
var meanNavPush = options.meanNavPush;
|
||||
var meanRevealClass = ".meanmenu-reveal";
|
||||
var meanShowChildren = options.meanShowChildren;
|
||||
var meanExpandableChildren = options.meanExpandableChildren;
|
||||
var meanExpand = options.meanExpand;
|
||||
var meanContract = options.meanContract;
|
||||
var meanRemoveAttrs = options.meanRemoveAttrs;
|
||||
var onePage = options.onePage;
|
||||
var meanDisplay = options.meanDisplay;
|
||||
var removeElements = options.removeElements;
|
||||
|
||||
//detect known mobile/tablet usage
|
||||
var isMobile = false;
|
||||
if ( (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i)) || (navigator.userAgent.match(/Blackberry/i)) || (navigator.userAgent.match(/Windows Phone/i)) ) {
|
||||
isMobile = true;
|
||||
}
|
||||
|
||||
if ( (navigator.userAgent.match(/MSIE 8/i)) || (navigator.userAgent.match(/MSIE 7/i)) ) {
|
||||
// add scrollbar for IE7 & 8 to stop breaking resize function on small content sites
|
||||
jQuery('html').css("overflow-y" , "scroll");
|
||||
}
|
||||
|
||||
var meanRevealPos = "";
|
||||
var meanCentered = function() {
|
||||
if (meanRevealPosition === "center") {
|
||||
var newWidth = window.innerWidth || document.documentElement.clientWidth;
|
||||
var meanCenter = ( (newWidth/2)-22 )+"px";
|
||||
meanRevealPos = "left:" + meanCenter + ";right:auto;";
|
||||
|
||||
if (!isMobile) {
|
||||
jQuery('.meanmenu-reveal').css("left",meanCenter);
|
||||
} else {
|
||||
jQuery('.meanmenu-reveal').animate({
|
||||
left: meanCenter
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var menuOn = false;
|
||||
var meanMenuExist = false;
|
||||
|
||||
|
||||
if (meanRevealPosition === "right") {
|
||||
meanRevealPos = "right:" + meanRevealPositionDistance + ";left:auto;";
|
||||
}
|
||||
if (meanRevealPosition === "left") {
|
||||
meanRevealPos = "left:" + meanRevealPositionDistance + ";right:auto;";
|
||||
}
|
||||
// run center function
|
||||
meanCentered();
|
||||
|
||||
// set all styles for mean-reveal
|
||||
var $navreveal = "";
|
||||
|
||||
var meanInner = function() {
|
||||
// get last class name
|
||||
if (jQuery($navreveal).is(".meanmenu-reveal.meanclose")) {
|
||||
$navreveal.html(meanMenuClose);
|
||||
} else {
|
||||
$navreveal.html(meanMenuOpen);
|
||||
}
|
||||
};
|
||||
|
||||
// re-instate original nav (and call this on window.width functions)
|
||||
var meanOriginal = function() {
|
||||
jQuery('.mean-bar,.mean-push').remove();
|
||||
jQuery(meanContainer).removeClass("mean-container");
|
||||
jQuery(meanMenu).css('display', meanDisplay);
|
||||
menuOn = false;
|
||||
meanMenuExist = false;
|
||||
jQuery(removeElements).removeClass('mean-remove');
|
||||
};
|
||||
|
||||
// navigation reveal
|
||||
var showMeanMenu = function() {
|
||||
var meanStyles = "background:"+meanRevealColour+";color:"+meanRevealColour+";"+meanRevealPos;
|
||||
if (currentWidth <= meanScreenWidth) {
|
||||
jQuery(removeElements).addClass('mean-remove');
|
||||
meanMenuExist = true;
|
||||
// add class to body so we don't need to worry about media queries here, all CSS is wrapped in '.mean-container'
|
||||
jQuery(meanContainer).addClass("mean-container");
|
||||
jQuery('.mean-container').prepend('<div class="mean-bar"><a href="#nav" class="meanmenu-reveal" style="'+meanStyles+'">Show Navigation</a><nav class="mean-nav"></nav></div>');
|
||||
|
||||
//push meanMenu navigation into .mean-nav
|
||||
var meanMenuContents = jQuery(meanMenu).html();
|
||||
jQuery('.mean-nav').html(meanMenuContents);
|
||||
|
||||
// remove all classes from EVERYTHING inside meanmenu nav
|
||||
if(meanRemoveAttrs) {
|
||||
jQuery('nav.mean-nav ul, nav.mean-nav ul *').each(function() {
|
||||
// First check if this has mean-remove class
|
||||
if (jQuery(this).is('.mean-remove')) {
|
||||
jQuery(this).attr('class', 'mean-remove');
|
||||
} else {
|
||||
jQuery(this).removeAttr("class");
|
||||
}
|
||||
jQuery(this).removeAttr("id");
|
||||
});
|
||||
}
|
||||
|
||||
// push in a holder div (this can be used if removal of nav is causing layout issues)
|
||||
jQuery(meanMenu).before('<div class="mean-push" />');
|
||||
jQuery('.mean-push').css("margin-top",meanNavPush);
|
||||
|
||||
// hide current navigation and reveal mean nav link
|
||||
jQuery(meanMenu).hide();
|
||||
jQuery(".meanmenu-reveal").show();
|
||||
|
||||
// turn 'X' on or off
|
||||
jQuery(meanRevealClass).html(meanMenuOpen);
|
||||
$navreveal = jQuery(meanRevealClass);
|
||||
|
||||
//hide mean-nav ul
|
||||
jQuery('.mean-nav ul').hide();
|
||||
|
||||
// hide sub nav
|
||||
if(meanShowChildren) {
|
||||
// allow expandable sub nav(s)
|
||||
if(meanExpandableChildren){
|
||||
jQuery('.mean-nav ul ul').each(function() {
|
||||
if(jQuery(this).children().length){
|
||||
jQuery(this,'li:first').parent().append('<a class="mean-expand" href="#" style="font-size: '+ meanMenuCloseSize +'">'+ meanExpand +'</a>');
|
||||
}
|
||||
});
|
||||
jQuery('.mean-expand').on("click",function(e){
|
||||
e.preventDefault();
|
||||
if (jQuery(this).hasClass("mean-clicked")) {
|
||||
jQuery(this).text(meanExpand);
|
||||
jQuery(this).prev('ul').slideUp(300, function(){});
|
||||
} else {
|
||||
jQuery(this).text(meanContract);
|
||||
jQuery(this).prev('ul').slideDown(300, function(){});
|
||||
}
|
||||
jQuery(this).toggleClass("mean-clicked");
|
||||
});
|
||||
} else {
|
||||
jQuery('.mean-nav ul ul').show();
|
||||
}
|
||||
} else {
|
||||
jQuery('.mean-nav ul ul').hide();
|
||||
}
|
||||
|
||||
// add last class to tidy up borders
|
||||
jQuery('.mean-nav ul li').last().addClass('mean-last');
|
||||
$navreveal.removeClass("meanclose");
|
||||
jQuery($navreveal).click(function(e){
|
||||
e.preventDefault();
|
||||
if( menuOn === false ) {
|
||||
$navreveal.css("text-align", "center");
|
||||
$navreveal.css("text-indent", "0");
|
||||
$navreveal.css("font-size", meanMenuCloseSize);
|
||||
jQuery('.mean-nav ul:first').slideDown();
|
||||
menuOn = true;
|
||||
} else {
|
||||
jQuery('.mean-nav ul:first').slideUp();
|
||||
menuOn = false;
|
||||
}
|
||||
$navreveal.toggleClass("meanclose");
|
||||
meanInner();
|
||||
jQuery(removeElements).addClass('mean-remove');
|
||||
});
|
||||
|
||||
// for one page websites, reset all variables...
|
||||
if ( onePage ) {
|
||||
jQuery('.mean-nav ul > li > a:first-child').on( "click" , function () {
|
||||
jQuery('.mean-nav ul:first').slideUp();
|
||||
menuOn = false;
|
||||
jQuery($navreveal).toggleClass("meanclose").html(meanMenuOpen);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
meanOriginal();
|
||||
}
|
||||
};
|
||||
|
||||
if (!isMobile) {
|
||||
// reset menu on resize above meanScreenWidth
|
||||
jQuery(window).resize(function () {
|
||||
currentWidth = window.innerWidth || document.documentElement.clientWidth;
|
||||
if (currentWidth > meanScreenWidth) {
|
||||
meanOriginal();
|
||||
} else {
|
||||
meanOriginal();
|
||||
}
|
||||
if (currentWidth <= meanScreenWidth) {
|
||||
showMeanMenu();
|
||||
meanCentered();
|
||||
} else {
|
||||
meanOriginal();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
// get browser width
|
||||
currentWidth = window.innerWidth || document.documentElement.clientWidth;
|
||||
|
||||
if (!isMobile) {
|
||||
meanOriginal();
|
||||
if (currentWidth <= meanScreenWidth) {
|
||||
showMeanMenu();
|
||||
meanCentered();
|
||||
}
|
||||
} else {
|
||||
meanCentered();
|
||||
if (currentWidth <= meanScreenWidth) {
|
||||
if (meanMenuExist === false) {
|
||||
showMeanMenu();
|
||||
}
|
||||
} else {
|
||||
meanOriginal();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// run main menuMenu function on load
|
||||
showMeanMenu();
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
19
wp-content/themes/cyber/assets/js/jquery.nav.js
Normal file
19
wp-content/themes/cyber/assets/js/jquery.nav.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* 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(t,i,n,s){var e=function(s,e){this.elem=s,this.$elem=t(s),this.options=e,this.metadata=this.$elem.data("plugin-options"),this.$win=t(i),this.sections={},this.didScroll=!1,this.$doc=t(n),this.docHeight=this.$doc.height()};e.prototype={defaults:{navItems:"a",currentClass:"current",changeHash:!1,easing:"swing",filter:"",scrollSpeed:750,scrollThreshold:.5,begin:!1,end:!1,scrollChange:!1},init:function(){return this.config=t.extend({},this.defaults,this.options,this.metadata),this.$nav=this.$elem.find(this.config.navItems),""!==this.config.filter&&(this.$nav=this.$nav.filter(this.config.filter)),this.$nav.on("click.onePageNav",t.proxy(this.handleClick,this)),this.getPositions(),this.bindInterval(),this.$win.on("resize.onePageNav",t.proxy(this.getPositions,this)),this},adjustNav:function(t,i){t.$elem.find("."+t.config.currentClass).removeClass(t.config.currentClass),i.addClass(t.config.currentClass)},bindInterval:function(){var t,i=this;i.$win.on("scroll.onePageNav",function(){i.didScroll=!0}),i.t=setInterval(function(){t=i.$doc.height(),i.didScroll&&(i.didScroll=!1,i.scrollChange()),t!==i.docHeight&&(i.docHeight=t,i.getPositions())},250)},getHash:function(t){return t.attr("href").split("#")[1]},getPositions:function(){var i,n,s,e=this;e.$nav.each(function(){i=e.getHash(t(this)),s=t("#"+i),s.length&&(n=s.offset().top,e.sections[i]=Math.round(n))})},getSection:function(t){var i=null,n=Math.round(this.$win.height()*this.config.scrollThreshold);for(var s in this.sections)this.sections[s]-n<t&&(i=s);return i},handleClick:function(n){var s=this,e=t(n.currentTarget),o=e.parent(),a="#"+s.getHash(e);o.hasClass(s.config.currentClass)||(s.config.begin&&s.config.begin(),s.adjustNav(s,o),s.unbindInterval(),s.scrollTo(a,function(){s.config.changeHash&&(i.location.hash=a),s.bindInterval(),s.config.end&&s.config.end()})),n.preventDefault()},scrollChange:function(){var t,i=this.$win.scrollTop(),n=this.getSection(i);null!==n&&(t=this.$elem.find('a[href$="#'+n+'"]').parent(),t.hasClass(this.config.currentClass)||(this.adjustNav(this,t),this.config.scrollChange&&this.config.scrollChange(t)))},scrollTo:function(i,n){var s=t(i).offset().top;t("html, body").animate({scrollTop:s-this.config.scrollOffset},this.config.scrollSpeed,this.config.easing,n)},unbindInterval:function(){clearInterval(this.t),this.$win.unbind("scroll.onePageNav")}},e.defaults=e.prototype.defaults,t.fn.onePageNav=function(t){return this.each(function(){new e(this,t).init()})}}(jQuery,window,document);
|
||||
10
wp-content/themes/cyber/assets/js/jquery.nivo.slider.pack.js
Normal file
10
wp-content/themes/cyber/assets/js/jquery.nivo.slider.pack.js
Normal file
File diff suppressed because one or more lines are too long
162
wp-content/themes/cyber/assets/js/jquery.scrollUp.js
Normal file
162
wp-content/themes/cyber/assets/js/jquery.scrollUp.js
Normal file
@@ -0,0 +1,162 @@
|
||||
(function ($, window, document) {
|
||||
'use strict';
|
||||
|
||||
// Main function
|
||||
$.fn.scrollUp = function (options) {
|
||||
|
||||
// Ensure that only one scrollUp exists
|
||||
if (!$.data(document.body, 'scrollUp')) {
|
||||
$.data(document.body, 'scrollUp', true);
|
||||
$.fn.scrollUp.init(options);
|
||||
}
|
||||
};
|
||||
|
||||
// Init
|
||||
$.fn.scrollUp.init = function (options) {
|
||||
|
||||
// Define vars
|
||||
var o = $.fn.scrollUp.settings = $.extend({}, $.fn.scrollUp.defaults, options),
|
||||
triggerVisible = false,
|
||||
animIn, animOut, animSpeed, scrollDis, scrollEvent, scrollTarget, $self;
|
||||
|
||||
// Create element
|
||||
if (o.scrollTrigger) {
|
||||
$self = $(o.scrollTrigger);
|
||||
} else {
|
||||
$self = $('<a/>', {
|
||||
id: o.scrollName,
|
||||
href: '#top'
|
||||
});
|
||||
}
|
||||
|
||||
// Set scrollTitle if there is one
|
||||
if (o.scrollTitle) {
|
||||
$self.attr('title', o.scrollTitle);
|
||||
}
|
||||
|
||||
$self.appendTo('body');
|
||||
|
||||
// If not using an image display text
|
||||
if (!(o.scrollImg || o.scrollTrigger)) {
|
||||
$self.html(o.scrollText);
|
||||
}
|
||||
|
||||
// Minimum CSS to make the magic happen
|
||||
$self.css({
|
||||
display: 'none',
|
||||
position: 'fixed',
|
||||
zIndex: o.zIndex
|
||||
});
|
||||
|
||||
// Active point overlay
|
||||
if (o.activeOverlay) {
|
||||
$('<div/>', {
|
||||
id: o.scrollName + '-active'
|
||||
}).css({
|
||||
position: 'absolute',
|
||||
'top': o.scrollDistance + 'px',
|
||||
width: '100%',
|
||||
borderTop: '1px dotted' + o.activeOverlay,
|
||||
zIndex: o.zIndex
|
||||
}).appendTo('body');
|
||||
}
|
||||
|
||||
// Switch animation type
|
||||
switch (o.animation) {
|
||||
case 'fade':
|
||||
animIn = 'fadeIn';
|
||||
animOut = 'fadeOut';
|
||||
animSpeed = o.animationSpeed;
|
||||
break;
|
||||
|
||||
case 'slide':
|
||||
animIn = 'slideDown';
|
||||
animOut = 'slideUp';
|
||||
animSpeed = o.animationSpeed;
|
||||
break;
|
||||
|
||||
default:
|
||||
animIn = 'show';
|
||||
animOut = 'hide';
|
||||
animSpeed = 0;
|
||||
}
|
||||
|
||||
// If from top or bottom
|
||||
if (o.scrollFrom === 'top') {
|
||||
scrollDis = o.scrollDistance;
|
||||
} else {
|
||||
scrollDis = $(document).height() - $(window).height() - o.scrollDistance;
|
||||
}
|
||||
|
||||
// Scroll function
|
||||
scrollEvent = $(window).scroll(function () {
|
||||
if ($(window).scrollTop() > scrollDis) {
|
||||
if (!triggerVisible) {
|
||||
$self[animIn](animSpeed);
|
||||
triggerVisible = true;
|
||||
}
|
||||
} else {
|
||||
if (triggerVisible) {
|
||||
$self[animOut](animSpeed);
|
||||
triggerVisible = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (o.scrollTarget) {
|
||||
if (typeof o.scrollTarget === 'number') {
|
||||
scrollTarget = o.scrollTarget;
|
||||
} else if (typeof o.scrollTarget === 'string') {
|
||||
scrollTarget = Math.floor($(o.scrollTarget).offset().top);
|
||||
}
|
||||
} else {
|
||||
scrollTarget = 0;
|
||||
}
|
||||
|
||||
// To the top
|
||||
$self.click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('html, body').animate({
|
||||
scrollTop: scrollTarget
|
||||
}, o.scrollSpeed, o.easingType);
|
||||
});
|
||||
};
|
||||
|
||||
// Defaults
|
||||
$.fn.scrollUp.defaults = {
|
||||
scrollName: 'scrollUp', // Element ID
|
||||
scrollDistance: 300, // Distance from top/bottom before showing element (px)
|
||||
scrollFrom: 'top', // 'top' or 'bottom'
|
||||
scrollSpeed: 300, // Speed back to top (ms)
|
||||
easingType: 'linear', // Scroll to top easing (see http://easings.net/)
|
||||
animation: 'fade', // Fade, slide, none
|
||||
animationSpeed: 200, // Animation in speed (ms)
|
||||
scrollTrigger: false, // Set a custom triggering element. Can be an HTML string or jQuery object
|
||||
scrollTarget: false, // Set a custom target element for scrolling to. Can be element or number
|
||||
scrollText: 'Scroll to top', // Text for element, can contain HTML
|
||||
scrollTitle: false, // Set a custom <a> title if required. Defaults to scrollText
|
||||
scrollImg: false, // Set true to use image
|
||||
activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
|
||||
zIndex: 2147483647 // Z-Index for the overlay
|
||||
};
|
||||
|
||||
// Destroy scrollUp plugin and clean all modifications to the DOM
|
||||
$.fn.scrollUp.destroy = function (scrollEvent) {
|
||||
$.removeData(document.body, 'scrollUp');
|
||||
$('#' + $.fn.scrollUp.settings.scrollName).remove();
|
||||
$('#' + $.fn.scrollUp.settings.scrollName + '-active').remove();
|
||||
|
||||
// If 1.7 or above use the new .off()
|
||||
if ($.fn.jquery.split('.')[1] >= 7) {
|
||||
$(window).off('scroll', scrollEvent);
|
||||
|
||||
// Else use the old .unbind()
|
||||
} else {
|
||||
$(window).unbind('scroll', scrollEvent);
|
||||
}
|
||||
};
|
||||
|
||||
$.scrollUp = $.fn.scrollUp;
|
||||
|
||||
})(jQuery, window, document);
|
||||
216
wp-content/themes/cyber/assets/js/jquery.waitforimages.js
Normal file
216
wp-content/themes/cyber/assets/js/jquery.waitforimages.js
Normal file
@@ -0,0 +1,216 @@
|
||||
;(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// CommonJS / nodejs module
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
// Namespace all events.
|
||||
var eventNamespace = 'waitForImages';
|
||||
|
||||
// CSS properties which contain references to images.
|
||||
$.waitForImages = {
|
||||
hasImageProperties: [
|
||||
'backgroundImage',
|
||||
'listStyleImage',
|
||||
'borderImage',
|
||||
'borderCornerImage',
|
||||
'cursor'
|
||||
],
|
||||
hasImageAttributes: ['srcset']
|
||||
};
|
||||
|
||||
// Custom selector to find all `img` elements with a valid `src` attribute.
|
||||
$.expr[':']['has-src'] = function (obj) {
|
||||
// Ensure we are dealing with an `img` element with a valid
|
||||
// `src` attribute.
|
||||
return $(obj).is('img[src][src!=""]');
|
||||
};
|
||||
|
||||
// Custom selector to find images which are not already cached by the
|
||||
// browser.
|
||||
$.expr[':'].uncached = function (obj) {
|
||||
// Ensure we are dealing with an `img` element with a valid
|
||||
// `src` attribute.
|
||||
if (!$(obj).is(':has-src')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !obj.complete;
|
||||
};
|
||||
|
||||
$.fn.waitForImages = function () {
|
||||
|
||||
var allImgsLength = 0;
|
||||
var allImgsLoaded = 0;
|
||||
var deferred = $.Deferred();
|
||||
|
||||
var finishedCallback;
|
||||
var eachCallback;
|
||||
var waitForAll;
|
||||
|
||||
// Handle options object (if passed).
|
||||
if ($.isPlainObject(arguments[0])) {
|
||||
|
||||
waitForAll = arguments[0].waitForAll;
|
||||
eachCallback = arguments[0].each;
|
||||
finishedCallback = arguments[0].finished;
|
||||
|
||||
} else {
|
||||
|
||||
// Handle if using deferred object and only one param was passed in.
|
||||
if (arguments.length === 1 && $.type(arguments[0]) === 'boolean') {
|
||||
waitForAll = arguments[0];
|
||||
} else {
|
||||
finishedCallback = arguments[0];
|
||||
eachCallback = arguments[1];
|
||||
waitForAll = arguments[2];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Handle missing callbacks.
|
||||
finishedCallback = finishedCallback || $.noop;
|
||||
eachCallback = eachCallback || $.noop;
|
||||
|
||||
// Convert waitForAll to Boolean
|
||||
waitForAll = !! waitForAll;
|
||||
|
||||
// Ensure callbacks are functions.
|
||||
if (!$.isFunction(finishedCallback) || !$.isFunction(eachCallback)) {
|
||||
throw new TypeError('An invalid callback was supplied.');
|
||||
}
|
||||
|
||||
this.each(function () {
|
||||
// Build a list of all imgs, dependent on what images will
|
||||
// be considered.
|
||||
var obj = $(this);
|
||||
var allImgs = [];
|
||||
// CSS properties which may contain an image.
|
||||
var hasImgProperties = $.waitForImages.hasImageProperties || [];
|
||||
// Element attributes which may contain an image.
|
||||
var hasImageAttributes = $.waitForImages.hasImageAttributes || [];
|
||||
// To match `url()` references.
|
||||
// Spec: http://www.w3.org/TR/CSS2/syndata.html#value-def-uri
|
||||
var matchUrl = /url\(\s*(['"]?)(.*?)\1\s*\)/g;
|
||||
|
||||
if (waitForAll) {
|
||||
|
||||
// Get all elements (including the original), as any one of
|
||||
// them could have a background image.
|
||||
obj.find('*').addBack().each(function () {
|
||||
var element = $(this);
|
||||
|
||||
// If an `img` element, add it. But keep iterating in
|
||||
// case it has a background image too.
|
||||
if (element.is('img:has-src') &&
|
||||
!element.is('[srcset]')) {
|
||||
allImgs.push({
|
||||
src: element.attr('src'),
|
||||
element: element[0]
|
||||
});
|
||||
}
|
||||
|
||||
$.each(hasImgProperties, function (i, property) {
|
||||
var propertyValue = element.css(property);
|
||||
var match;
|
||||
|
||||
// If it doesn't contain this property, skip.
|
||||
if (!propertyValue) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Get all url() of this element.
|
||||
while (match = matchUrl.exec(propertyValue)) {
|
||||
allImgs.push({
|
||||
src: match[2],
|
||||
element: element[0]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$.each(hasImageAttributes, function (i, attribute) {
|
||||
var attributeValue = element.attr(attribute);
|
||||
var attributeValues;
|
||||
|
||||
// If it doesn't contain this property, skip.
|
||||
if (!attributeValue) {
|
||||
return true;
|
||||
}
|
||||
|
||||
allImgs.push({
|
||||
src: element.attr('src'),
|
||||
srcset: element.attr('srcset'),
|
||||
element: element[0]
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// For images only, the task is simpler.
|
||||
obj.find('img:has-src')
|
||||
.each(function () {
|
||||
allImgs.push({
|
||||
src: this.src,
|
||||
element: this
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
allImgsLength = allImgs.length;
|
||||
allImgsLoaded = 0;
|
||||
|
||||
// If no images found, don't bother.
|
||||
if (allImgsLength === 0) {
|
||||
finishedCallback.call(obj[0]);
|
||||
deferred.resolveWith(obj[0]);
|
||||
}
|
||||
|
||||
$.each(allImgs, function (i, img) {
|
||||
|
||||
var image = new Image();
|
||||
var events =
|
||||
'load.' + eventNamespace + ' error.' + eventNamespace;
|
||||
|
||||
// Handle the image loading and error with the same callback.
|
||||
$(image).one(events, function me (event) {
|
||||
// If an error occurred with loading the image, set the
|
||||
// third argument accordingly.
|
||||
var eachArguments = [
|
||||
allImgsLoaded,
|
||||
allImgsLength,
|
||||
event.type == 'load'
|
||||
];
|
||||
allImgsLoaded++;
|
||||
|
||||
eachCallback.apply(img.element, eachArguments);
|
||||
deferred.notifyWith(img.element, eachArguments);
|
||||
|
||||
// Unbind the event listeners. I use this in addition to
|
||||
// `one` as one of those events won't be called (either
|
||||
// 'load' or 'error' will be called).
|
||||
$(this).off(events, me);
|
||||
|
||||
if (allImgsLoaded == allImgsLength) {
|
||||
finishedCallback.call(obj[0]);
|
||||
deferred.resolveWith(obj[0]);
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if (img.srcset) {
|
||||
image.srcset = img.srcset;
|
||||
}
|
||||
image.src = img.src;
|
||||
});
|
||||
});
|
||||
|
||||
return deferred.promise();
|
||||
|
||||
};
|
||||
}));
|
||||
4
wp-content/themes/cyber/assets/js/modernizr.custom.79639.js
vendored
Normal file
4
wp-content/themes/cyber/assets/js/modernizr.custom.79639.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
|
||||
* Build: http://www.modernizr.com/download/#-cssanimations-csstransforms-csstransforms3d-csstransitions-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes
|
||||
*/
|
||||
;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["­","<style>",a,"</style>"].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e});var G=function(a,c){var d=a.join(""),f=c.length;w(d,function(a,c){var d=b.styleSheets[b.styleSheets.length-1],g=d?d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"":"",h=a.childNodes,i={};while(f--)i[h[f].id]=h[f];e.csstransforms3d=(i.csstransforms3d&&i.csstransforms3d.offsetLeft)===9&&i.csstransforms3d.offsetHeight===3},f,c)}([,["@media (",m.join("transform-3d),("),h,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join("")],[,"csstransforms3d"]);q.cssanimations=function(){return F("animationName")},q.csstransforms=function(){return!!F("transform")},q.csstransforms3d=function(){var a=!!F("perspective");return a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d),a},q.csstransitions=function(){return F("transition")};for(var H in q)y(q,H)&&(v=H.toLowerCase(),e[v]=q[H](),t.push((e[v]?"":"no-")+v));return z(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document);
|
||||
108
wp-content/themes/cyber/assets/js/navigation.js
Normal file
108
wp-content/themes/cyber/assets/js/navigation.js
Normal file
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* File navigation.js.
|
||||
*
|
||||
* Handles toggling the navigation menu for small screens and enables TAB key
|
||||
* navigation support for dropdown menus.
|
||||
*/
|
||||
( function() {
|
||||
"use strict";
|
||||
|
||||
var container, button, menu, links, i, len;
|
||||
|
||||
container = document.getElementById( 'site-navigation' );
|
||||
if ( ! container ) {
|
||||
return;
|
||||
}
|
||||
|
||||
button = container.getElementsByTagName( 'button' )[0];
|
||||
if ( 'undefined' === typeof button ) {
|
||||
return;
|
||||
}
|
||||
|
||||
menu = container.getElementsByTagName( 'ul' )[0];
|
||||
|
||||
// Hide menu toggle button if menu is empty and return early.
|
||||
if ( 'undefined' === typeof menu ) {
|
||||
button.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
menu.setAttribute( 'aria-expanded', 'false' );
|
||||
if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
|
||||
menu.className += ' nav-menu';
|
||||
}
|
||||
|
||||
button.onclick = function() {
|
||||
if ( -1 !== container.className.indexOf( 'toggled' ) ) {
|
||||
container.className = container.className.replace( ' toggled', '' );
|
||||
button.setAttribute( 'aria-expanded', 'false' );
|
||||
menu.setAttribute( 'aria-expanded', 'false' );
|
||||
} else {
|
||||
container.className += ' toggled';
|
||||
button.setAttribute( 'aria-expanded', 'true' );
|
||||
menu.setAttribute( 'aria-expanded', 'true' );
|
||||
}
|
||||
};
|
||||
|
||||
// Get all the link elements within the menu.
|
||||
links = menu.getElementsByTagName( 'a' );
|
||||
|
||||
// Each time a menu link is focused or blurred, toggle focus.
|
||||
for ( i = 0, len = links.length; i < len; i++ ) {
|
||||
links[i].addEventListener( 'focus', toggleFocus, true );
|
||||
links[i].addEventListener( 'blur', toggleFocus, true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets or removes .focus class on an element.
|
||||
*/
|
||||
function toggleFocus() {
|
||||
var self = this;
|
||||
|
||||
// Move up through the ancestors of the current link until we hit .nav-menu.
|
||||
while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
|
||||
|
||||
// On li elements toggle the class .focus.
|
||||
if ( 'li' === self.tagName.toLowerCase() ) {
|
||||
if ( -1 !== self.className.indexOf( 'focus' ) ) {
|
||||
self.className = self.className.replace( ' focus', '' );
|
||||
} else {
|
||||
self.className += ' focus';
|
||||
}
|
||||
}
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles `focus` class to allow submenu access on tablets.
|
||||
*/
|
||||
( function( container ) {
|
||||
var touchStartFn, i,
|
||||
parentLink = container.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' );
|
||||
|
||||
if ( 'ontouchstart' in window ) {
|
||||
touchStartFn = function( e ) {
|
||||
var menuItem = this.parentNode, i;
|
||||
|
||||
if ( ! menuItem.classList.contains( 'focus' ) ) {
|
||||
e.preventDefault();
|
||||
for ( i = 0; i < menuItem.parentNode.children.length; ++i ) {
|
||||
if ( menuItem === menuItem.parentNode.children[i] ) {
|
||||
continue;
|
||||
}
|
||||
menuItem.parentNode.children[i].classList.remove( 'focus' );
|
||||
}
|
||||
menuItem.classList.add( 'focus' );
|
||||
} else {
|
||||
menuItem.classList.remove( 'focus' );
|
||||
}
|
||||
};
|
||||
|
||||
for ( i = 0; i < parentLink.length; ++i ) {
|
||||
parentLink[i].addEventListener( 'touchstart', touchStartFn, false );
|
||||
}
|
||||
}
|
||||
}( container ) );
|
||||
})(jQuery);
|
||||
7
wp-content/themes/cyber/assets/js/owl.carousel.min.js
vendored
Normal file
7
wp-content/themes/cyber/assets/js/owl.carousel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
169
wp-content/themes/cyber/assets/js/parallax.min.js
vendored
Normal file
169
wp-content/themes/cyber/assets/js/parallax.min.js
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
! function (t, i, e) {
|
||||
"use strict";
|
||||
|
||||
function s(t, i) {
|
||||
this.element = t, this.layers = t.getElementsByClassName("layer");
|
||||
var e = {
|
||||
calibrateX: this.data(this.element, "calibrate-x"),
|
||||
calibrateY: this.data(this.element, "calibrate-y"),
|
||||
invertX: this.data(this.element, "invert-x"),
|
||||
invertY: this.data(this.element, "invert-y"),
|
||||
limitX: this.data(this.element, "limit-x"),
|
||||
limitY: this.data(this.element, "limit-y"),
|
||||
scalarX: this.data(this.element, "scalar-x"),
|
||||
scalarY: this.data(this.element, "scalar-y"),
|
||||
frictionX: this.data(this.element, "friction-x"),
|
||||
frictionY: this.data(this.element, "friction-y"),
|
||||
originX: this.data(this.element, "origin-x"),
|
||||
originY: this.data(this.element, "origin-y")
|
||||
};
|
||||
for (var s in e) null === e[s] && delete e[s];
|
||||
this.extend(this, r, i, e), this.calibrationTimer = null, this.calibrationFlag = !0, this.enabled = !1, this.depths = [], this.raf = null, this.bounds = null, this.ex = 0, this.ey = 0, this.ew = 0, this.eh = 0, this.ecx = 0, this.ecy = 0, this.erx = 0, this.ery = 0, this.cx = 0, this.cy = 0, this.ix = 0, this.iy = 0, this.mx = 0, this.my = 0, this.vx = 0, this.vy = 0, this.onMouseMove = this.onMouseMove.bind(this), this.onDeviceOrientation = this.onDeviceOrientation.bind(this), this.onOrientationTimer = this.onOrientationTimer.bind(this), this.onCalibrationTimer = this.onCalibrationTimer.bind(this), this.onAnimationFrame = this.onAnimationFrame.bind(this), this.onWindowResize = this.onWindowResize.bind(this), this.initialise()
|
||||
}
|
||||
var n = "Parallax",
|
||||
o = 30,
|
||||
r = {
|
||||
relativeInput: !1,
|
||||
clipRelativeInput: !1,
|
||||
calibrationThreshold: 100,
|
||||
calibrationDelay: 500,
|
||||
supportDelay: 500,
|
||||
calibrateX: !1,
|
||||
calibrateY: !0,
|
||||
invertX: !0,
|
||||
invertY: !0,
|
||||
limitX: !1,
|
||||
limitY: !1,
|
||||
scalarX: 10,
|
||||
scalarY: 10,
|
||||
frictionX: .1,
|
||||
frictionY: .1,
|
||||
originX: .5,
|
||||
originY: .5
|
||||
};
|
||||
s.prototype.extend = function () {
|
||||
if (arguments.length > 1)
|
||||
for (var t = arguments[0], i = 1, e = arguments.length; e > i; i++) {
|
||||
var s = arguments[i];
|
||||
for (var n in s) t[n] = s[n]
|
||||
}
|
||||
}, s.prototype.data = function (t, i) {
|
||||
return this.deserialize(t.getAttribute("data-" + i))
|
||||
}, s.prototype.deserialize = function (t) {
|
||||
return "true" === t ? !0 : "false" === t ? !1 : "null" === t ? null : !isNaN(parseFloat(t)) && isFinite(t) ? parseFloat(t) : t
|
||||
}, s.prototype.camelCase = function (t) {
|
||||
return t.replace(/-+(.)?/g, function (t, i) {
|
||||
return i ? i.toUpperCase() : ""
|
||||
})
|
||||
}, s.prototype.transformSupport = function (s) {
|
||||
for (var n = i.createElement("div"), o = !1, r = null, a = !1, h = null, l = null, p = 0, c = this.vendors.length; c > p; p++)
|
||||
if (null !== this.vendors[p] ? (h = this.vendors[p][0] + "transform", l = this.vendors[p][1] + "Transform") : (h = "transform", l = "transform"), n.style[l] !== e) {
|
||||
o = !0;
|
||||
break
|
||||
}
|
||||
switch (s) {
|
||||
case "2D":
|
||||
a = o;
|
||||
break;
|
||||
case "3D":
|
||||
if (o) {
|
||||
var m = i.body || i.createElement("body"),
|
||||
u = i.documentElement,
|
||||
y = u.style.overflow;
|
||||
i.body || (u.style.overflow = "hidden", u.appendChild(m), m.style.overflow = "hidden", m.style.background = ""), m.appendChild(n), n.style[l] = "translate3d(1px,1px,1px)", r = t.getComputedStyle(n).getPropertyValue(h), a = r !== e && r.length > 0 && "none" !== r, u.style.overflow = y, m.removeChild(n)
|
||||
}
|
||||
}
|
||||
return a
|
||||
}, s.prototype.ww = null, s.prototype.wh = null, s.prototype.wcx = null, s.prototype.wcy = null, s.prototype.wrx = null, s.prototype.wry = null, s.prototype.portrait = null, s.prototype.desktop = !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i), s.prototype.vendors = [null, ["-webkit-", "webkit"], ["-moz-", "Moz"], ["-o-", "O"], ["-ms-", "ms"]], s.prototype.motionSupport = !!t.DeviceMotionEvent, s.prototype.orientationSupport = !!t.DeviceOrientationEvent, s.prototype.orientationStatus = 0, s.prototype.transform2DSupport = s.prototype.transformSupport("2D"), s.prototype.transform3DSupport = s.prototype.transformSupport("3D"), s.prototype.propertyCache = {}, s.prototype.initialise = function () {
|
||||
this.transform3DSupport && this.accelerate(this.element);
|
||||
var i = t.getComputedStyle(this.element);
|
||||
"static" === i.getPropertyValue("position") && (this.element.style.position = "relative"), this.updateLayers(), this.updateDimensions(), this.enable(), this.queueCalibration(this.calibrationDelay)
|
||||
}, s.prototype.updateLayers = function () {
|
||||
this.layers = this.element.getElementsByClassName("layer"), this.depths = [];
|
||||
for (var t = 0, i = this.layers.length; i > t; t++) {
|
||||
var e = this.layers[t];
|
||||
this.transform3DSupport && this.accelerate(e), e.style.position = t ? "absolute" : "relative", e.style.display = "block", e.style.left = 0, e.style.top = 0, this.depths.push(this.data(e, "depth") || 0)
|
||||
}
|
||||
}, s.prototype.updateDimensions = function () {
|
||||
this.ww = t.innerWidth, this.wh = t.innerHeight, this.wcx = this.ww * this.originX, this.wcy = this.wh * this.originY, this.wrx = Math.max(this.wcx, this.ww - this.wcx), this.wry = Math.max(this.wcy, this.wh - this.wcy)
|
||||
}, s.prototype.updateBounds = function () {
|
||||
this.bounds = this.element.getBoundingClientRect(), this.ex = this.bounds.left, this.ey = this.bounds.top, this.ew = this.bounds.width, this.eh = this.bounds.height, this.ecx = this.ew * this.originX, this.ecy = this.eh * this.originY, this.erx = Math.max(this.ecx, this.ew - this.ecx), this.ery = Math.max(this.ecy, this.eh - this.ecy)
|
||||
}, s.prototype.queueCalibration = function (t) {
|
||||
clearTimeout(this.calibrationTimer), this.calibrationTimer = setTimeout(this.onCalibrationTimer, t)
|
||||
}, s.prototype.enable = function () {
|
||||
this.enabled || (this.enabled = !0, this.orientationSupport ? (this.portrait = null, t.addEventListener("deviceorientation", this.onDeviceOrientation), setTimeout(this.onOrientationTimer, this.supportDelay)) : (this.cx = 0, this.cy = 0, this.portrait = !1, t.addEventListener("mousemove", this.onMouseMove)), t.addEventListener("resize", this.onWindowResize), this.raf = requestAnimationFrame(this.onAnimationFrame))
|
||||
}, s.prototype.disable = function () {
|
||||
this.enabled && (this.enabled = !1, this.orientationSupport ? t.removeEventListener("deviceorientation", this.onDeviceOrientation) : t.removeEventListener("mousemove", this.onMouseMove), t.removeEventListener("resize", this.onWindowResize), cancelAnimationFrame(this.raf))
|
||||
}, s.prototype.calibrate = function (t, i) {
|
||||
this.calibrateX = t === e ? this.calibrateX : t, this.calibrateY = i === e ? this.calibrateY : i
|
||||
}, s.prototype.invert = function (t, i) {
|
||||
this.invertX = t === e ? this.invertX : t, this.invertY = i === e ? this.invertY : i
|
||||
}, s.prototype.friction = function (t, i) {
|
||||
this.frictionX = t === e ? this.frictionX : t, this.frictionY = i === e ? this.frictionY : i
|
||||
}, s.prototype.scalar = function (t, i) {
|
||||
this.scalarX = t === e ? this.scalarX : t, this.scalarY = i === e ? this.scalarY : i
|
||||
}, s.prototype.limit = function (t, i) {
|
||||
this.limitX = t === e ? this.limitX : t, this.limitY = i === e ? this.limitY : i
|
||||
}, s.prototype.origin = function (t, i) {
|
||||
this.originX = t === e ? this.originX : t, this.originY = i === e ? this.originY : i
|
||||
}, s.prototype.clamp = function (t, i, e) {
|
||||
return t = Math.max(t, i), t = Math.min(t, e)
|
||||
}, s.prototype.css = function (t, i, s) {
|
||||
var n = this.propertyCache[i];
|
||||
if (!n)
|
||||
for (var o = 0, r = this.vendors.length; r > o; o++)
|
||||
if (n = null !== this.vendors[o] ? this.camelCase(this.vendors[o][1] + "-" + i) : i, t.style[n] !== e) {
|
||||
this.propertyCache[i] = n;
|
||||
break
|
||||
}
|
||||
t.style[n] = s
|
||||
}, s.prototype.accelerate = function (t) {
|
||||
this.css(t, "transform", "translate3d(0,0,0)"), this.css(t, "transform-style", "preserve-3d"), this.css(t, "backface-visibility", "hidden")
|
||||
}, s.prototype.setPosition = function (t, i, e) {
|
||||
i += "px", e += "px", this.transform3DSupport ? this.css(t, "transform", "translate3d(" + i + "," + e + ",0)") : this.transform2DSupport ? this.css(t, "transform", "translate(" + i + "," + e + ")") : (t.style.left = i, t.style.top = e)
|
||||
}, s.prototype.onOrientationTimer = function () {
|
||||
this.orientationSupport && 0 === this.orientationStatus && (this.disable(), this.orientationSupport = !1, this.enable())
|
||||
}, s.prototype.onCalibrationTimer = function () {
|
||||
this.calibrationFlag = !0
|
||||
}, s.prototype.onWindowResize = function () {
|
||||
this.updateDimensions()
|
||||
}, s.prototype.onAnimationFrame = function () {
|
||||
this.updateBounds();
|
||||
var t = this.ix - this.cx,
|
||||
i = this.iy - this.cy;
|
||||
(Math.abs(t) > this.calibrationThreshold || Math.abs(i) > this.calibrationThreshold) && this.queueCalibration(0), this.portrait ? (this.mx = this.calibrateX ? i : this.iy, this.my = this.calibrateY ? t : this.ix) : (this.mx = this.calibrateX ? t : this.ix, this.my = this.calibrateY ? i : this.iy), this.mx *= this.ew * (this.scalarX / 100), this.my *= this.eh * (this.scalarY / 100), isNaN(parseFloat(this.limitX)) || (this.mx = this.clamp(this.mx, -this.limitX, this.limitX)), isNaN(parseFloat(this.limitY)) || (this.my = this.clamp(this.my, -this.limitY, this.limitY)), this.vx += (this.mx - this.vx) * this.frictionX, this.vy += (this.my - this.vy) * this.frictionY;
|
||||
for (var e = 0, s = this.layers.length; s > e; e++) {
|
||||
var n = this.layers[e],
|
||||
o = this.depths[e],
|
||||
r = this.vx * o * (this.invertX ? -1 : 1),
|
||||
a = this.vy * o * (this.invertY ? -1 : 1);
|
||||
this.setPosition(n, r, a)
|
||||
}
|
||||
this.raf = requestAnimationFrame(this.onAnimationFrame)
|
||||
}, s.prototype.onDeviceOrientation = function (t) {
|
||||
if (!this.desktop && null !== t.beta && null !== t.gamma) {
|
||||
this.orientationStatus = 1;
|
||||
var i = (t.beta || 0) / o,
|
||||
e = (t.gamma || 0) / o,
|
||||
s = this.wh > this.ww;
|
||||
this.portrait !== s && (this.portrait = s, this.calibrationFlag = !0), this.calibrationFlag && (this.calibrationFlag = !1, this.cx = i, this.cy = e), this.ix = i, this.iy = e
|
||||
}
|
||||
}, s.prototype.onMouseMove = function (t) {
|
||||
var i = t.clientX,
|
||||
e = t.clientY;
|
||||
!this.orientationSupport && this.relativeInput ? (this.clipRelativeInput && (i = Math.max(i, this.ex), i = Math.min(i, this.ex + this.ew), e = Math.max(e, this.ey), e = Math.min(e, this.ey + this.eh)), this.ix = (i - this.ex - this.ecx) / this.erx, this.iy = (e - this.ey - this.ecy) / this.ery) : (this.ix = (i - this.wcx) / this.wrx, this.iy = (e - this.wcy) / this.wry)
|
||||
}, t[n] = s
|
||||
}(window, document),
|
||||
function () {
|
||||
for (var t = 0, i = ["ms", "moz", "webkit", "o"], e = 0; e < i.length && !window.requestAnimationFrame; ++e) window.requestAnimationFrame = window[i[e] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[i[e] + "CancelAnimationFrame"] || window[i[e] + "CancelRequestAnimationFrame"];
|
||||
window.requestAnimationFrame || (window.requestAnimationFrame = function (i) {
|
||||
var e = (new Date).getTime(),
|
||||
s = Math.max(0, 16 - (e - t)),
|
||||
n = window.setTimeout(function () {
|
||||
i(e + s)
|
||||
}, s);
|
||||
return t = e + s, n
|
||||
}), window.cancelAnimationFrame || (window.cancelAnimationFrame = function (t) {
|
||||
clearTimeout(t)
|
||||
})
|
||||
}();
|
||||
31
wp-content/themes/cyber/assets/js/skip-link-focus-fix.js
Normal file
31
wp-content/themes/cyber/assets/js/skip-link-focus-fix.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* File skip-link-focus-fix.js.
|
||||
*
|
||||
* Helps with accessibility for keyboard only users.
|
||||
*
|
||||
* Learn more: https://git.io/vWdr2
|
||||
*/
|
||||
(function() {
|
||||
var isIe = /(trident|msie)/i.test( navigator.userAgent );
|
||||
|
||||
if ( isIe && document.getElementById && window.addEventListener ) {
|
||||
window.addEventListener( 'hashchange', function() {
|
||||
var id = location.hash.substring( 1 ),
|
||||
element;
|
||||
|
||||
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
element = document.getElementById( id );
|
||||
|
||||
if ( element ) {
|
||||
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
|
||||
element.tabIndex = -1;
|
||||
}
|
||||
|
||||
element.focus();
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
})();
|
||||
1
wp-content/themes/cyber/assets/js/slick.min.js
vendored
Normal file
1
wp-content/themes/cyber/assets/js/slick.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
490
wp-content/themes/cyber/assets/js/theme.js
Normal file
490
wp-content/themes/cyber/assets/js/theme.js
Normal file
@@ -0,0 +1,490 @@
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
// 6.EM MOBILE MENU
|
||||
$('.mobile-menu nav').meanmenu({
|
||||
meanScreenWidth: "990",
|
||||
meanMenuContainer: ".mobile-menu",
|
||||
onePage: true,
|
||||
});
|
||||
// top quearys menu
|
||||
var emsmenu = $(".em-quearys-menu i.t-quearys");
|
||||
var emscmenu = $(".em-quearys-menu i.t-close");
|
||||
var emsinner = $(".em-quearys-inner");
|
||||
emsmenu.on('click', function () {
|
||||
emsinner.addClass('em-s-open').fadeToggle(1000);
|
||||
$(this).addClass('em-s-hidden');
|
||||
emscmenu.removeClass('em-s-hidden');
|
||||
});
|
||||
emscmenu.on('click', function () {
|
||||
emsinner.removeClass('em-s-open').fadeToggle(1000);
|
||||
$(this).addClass('em-s-hidden');
|
||||
emsmenu.removeClass('em-s-hidden');
|
||||
});
|
||||
// 6.HOME 2 HERO CAROUSEL
|
||||
$('.em-slick-slider-new').slick({
|
||||
dots: false,
|
||||
speed: 900,
|
||||
arrows: true,
|
||||
autoplay: true,
|
||||
fade: false,
|
||||
autoplaySpeed: 6000,
|
||||
responsive: [{
|
||||
breakpoint: 769,
|
||||
settings: {
|
||||
arrows: false,
|
||||
}
|
||||
}]
|
||||
});
|
||||
//* Parallaxmouse js
|
||||
function parallaxMouse() {
|
||||
if ($('#parallax').length) {
|
||||
var scene = document.getElementById('parallax');
|
||||
var parallax = new Parallax(scene);
|
||||
};
|
||||
};
|
||||
parallaxMouse();
|
||||
// 6.EM SLICK SLIDER
|
||||
$('.em-slick-testi-description').slick({
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
arrows: false,
|
||||
dots: true,
|
||||
fade: true,
|
||||
asNavFor: '.em-slick-testi-wraper'
|
||||
});
|
||||
// 6.HOME 2 HERO CAROUSEL
|
||||
$('.em-image-sliderslick').slick({
|
||||
dots: true,
|
||||
speed: 900,
|
||||
arrows: false,
|
||||
autoplay: true,
|
||||
slidesToShow: 4,
|
||||
fade: false,
|
||||
autoplaySpeed: 6000,
|
||||
responsive: [{
|
||||
breakpoint: 769,
|
||||
settings: {
|
||||
arrows: false,
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
// 6.EM WOW ACTIVE JS
|
||||
new WOW().init();
|
||||
// 6.EM NIVO SLIDER
|
||||
$('#mainSlider').nivoSlider({
|
||||
directionNav: true,
|
||||
animSpeed: 1000,
|
||||
slices: 18,
|
||||
autoplay: true,
|
||||
randomStart: true,
|
||||
pauseTime: 800000,
|
||||
pauseOnHover: false,
|
||||
controlNav: true,
|
||||
prevText: '<i class="fa fa-angle-left nivo-prev-icon"></i>',
|
||||
nextText: '<i class="fa fa-angle-right nivo-next-icon"></i>'
|
||||
});
|
||||
// 6.SERVICES CAROUSEL
|
||||
$('.service_cursousel_slider').slick({
|
||||
dots: false,
|
||||
speed: 900,
|
||||
arrows: false,
|
||||
autoplay: true,
|
||||
fade: false,
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 1,
|
||||
autoplaySpeed: 6000,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1920,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 1200,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
breakpoint: 991,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 600,
|
||||
settings: {
|
||||
arrows: false,
|
||||
slidesToShow: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// 6.SCROLLUP JS
|
||||
$.scrollUp({
|
||||
scrollText: '<i class="fa fa-angle-up"></i>',
|
||||
easingType: 'linear',
|
||||
scrollSpeed: 900,
|
||||
animation: 'fade'
|
||||
});
|
||||
// VenuboX
|
||||
$('.venobox').venobox({
|
||||
numeratio: true,
|
||||
infinigall: true
|
||||
|
||||
});
|
||||
// 6.ONEPAGE MENU
|
||||
var top_offset = $('.one_page').height() + 0;
|
||||
$('.one_page .cyber_menu .nav_scroll').onePageNav({
|
||||
currentClass: 'current',
|
||||
changeHash: false,
|
||||
scrollSpeed: 1000,
|
||||
scrollOffset: top_offset,
|
||||
scrollThreshold: 0.5,
|
||||
filter: '',
|
||||
easing: 'swing',
|
||||
});
|
||||
|
||||
$(".nav_scroll li:first-child").addClass("current");
|
||||
/* sticky nav 1 */
|
||||
$('.one_page').scrollToFixed({
|
||||
preFixed: function () {
|
||||
$(this).find('.scroll_fixed').addClass('prefix');
|
||||
},
|
||||
postFixed: function () {
|
||||
$(this).find('.scroll_fixed').addClass('postfix').removeClass('prefix');
|
||||
}
|
||||
});
|
||||
|
||||
// 6.EM STIKY NAV
|
||||
var headers1 = $('.trp_nav_area');
|
||||
$(window).on('scroll', function () {
|
||||
|
||||
if ($(window).scrollTop() > 200) {
|
||||
headers1.addClass('hbg2');
|
||||
} else {
|
||||
headers1.removeClass('hbg2');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 6.EM COUNTARUP
|
||||
$('.countr_text h1').counterUp({
|
||||
delay: 10,
|
||||
time: 1000
|
||||
});
|
||||
// 6.EM PORTFOLIO
|
||||
$('.em_load').imagesLoaded(function () {
|
||||
|
||||
if ($.fn.isotope) {
|
||||
|
||||
var $portfolio = $('.em_load');
|
||||
|
||||
$portfolio.isotope({
|
||||
|
||||
itemSelector: '.grid-item',
|
||||
|
||||
filter: '*',
|
||||
|
||||
resizesContainer: true,
|
||||
|
||||
layoutMode: 'masonry',
|
||||
|
||||
transitionDuration: '0.8s'
|
||||
|
||||
});
|
||||
$('.filter_menu li').on('click', function () {
|
||||
|
||||
$('.filter_menu li').removeClass('current_menu_item');
|
||||
|
||||
$(this).addClass('current_menu_item');
|
||||
|
||||
var selector = $(this).attr('data-filter');
|
||||
|
||||
$portfolio.isotope({
|
||||
|
||||
filter: selector,
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
});
|
||||
// 6.EM BLOG MASONARY
|
||||
$('.bgimgload').imagesLoaded(function () {
|
||||
if ($.fn.isotope) {
|
||||
var $blogmassonary = $('.blog-messonary');
|
||||
$blogmassonary.isotope({
|
||||
itemSelector: '.grid-item',
|
||||
filter: '*',
|
||||
resizesContainer: true,
|
||||
layoutMode: 'masonry',
|
||||
transitionDuration: '0.8s'
|
||||
});
|
||||
|
||||
};
|
||||
});
|
||||
// 6.EM TESTIMONIAL
|
||||
$('.testimonial_list').owlCarousel({
|
||||
loop: true,
|
||||
autoplay: false,
|
||||
autoplayTimeout: 10000,
|
||||
dots: true,
|
||||
nav: false,
|
||||
navText: ["<i class='fa fa-angle-left-1'></i>", "<i class='flaticon-next'></i>"],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
768: {
|
||||
items: 1
|
||||
},
|
||||
992: {
|
||||
items: 1
|
||||
},
|
||||
1000: {
|
||||
items: 1
|
||||
},
|
||||
1920: {
|
||||
items: 1,
|
||||
}
|
||||
}
|
||||
})
|
||||
// 6.EM TESTIMONIAL
|
||||
$('.testimonial_list2').owlCarousel({
|
||||
loop: true,
|
||||
autoplay: false,
|
||||
autoplayTimeout: 10000,
|
||||
dots: true,
|
||||
nav: false,
|
||||
navText: ["<i class='fa fa-angle-left-1'></i>", "<i class='flaticon-next'></i>"],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
768: {
|
||||
items: 2
|
||||
},
|
||||
992: {
|
||||
items: 3
|
||||
},
|
||||
1000: {
|
||||
items: 3
|
||||
},
|
||||
1920: {
|
||||
items: 3,
|
||||
}
|
||||
}
|
||||
})
|
||||
// 6.EM COACHING CUOROSEL
|
||||
$('.case_study_carousel').owlCarousel({
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
autoplayTimeout: 10000,
|
||||
dots: true,
|
||||
nav: false,
|
||||
navText: ["<i class='fa fa-angle-left-1'></i>", "<i class='flaticon-next'></i>"],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
768: {
|
||||
items: 2
|
||||
},
|
||||
992: {
|
||||
items: 4
|
||||
},
|
||||
1000: {
|
||||
items: 4
|
||||
},
|
||||
1920: {
|
||||
items: 5
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 6.EM COACHING CUOROSEL
|
||||
$('.case_study_carousel_main').owlCarousel({
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
autoplayTimeout: 10000,
|
||||
dots: true,
|
||||
nav: false,
|
||||
navText: ["<i class='fa fa-angle-left-1'></i>", "<i class='flaticon-next'></i>"],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
768: {
|
||||
items: 2
|
||||
},
|
||||
992: {
|
||||
items: 4
|
||||
},
|
||||
1000: {
|
||||
items: 3
|
||||
},
|
||||
1920: {
|
||||
items: 4
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
/* Blog Curousel */
|
||||
$('.blog_carousel').owlCarousel({
|
||||
dots: true,
|
||||
nav: true,
|
||||
autoplayTimeout: 10000,
|
||||
navText: ["<i class='fa fa-long-arrow-left'></i>", "<i class='fa fa-long-arrow-right''></i>"],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
768: {
|
||||
items: 2
|
||||
},
|
||||
992: {
|
||||
items: 3
|
||||
},
|
||||
1920: {
|
||||
items: 3
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/* Brand Curousel */
|
||||
$('.brand_carousel').owlCarousel({
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
autoplayTimeout: 4000,
|
||||
dots: false,
|
||||
nav: false,
|
||||
navText: ["<i class='fa fa-long-arrow-left'></i>", "<i class='fa fa-long-arrow-right''></i>"],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
768: {
|
||||
items: 4
|
||||
},
|
||||
992: {
|
||||
items: 4
|
||||
},
|
||||
1920: {
|
||||
items: 5
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/*--
|
||||
Screenshot Center Active Slider
|
||||
------------------------------------*/
|
||||
var sliderScreenshotActive = $('.slider-screenshot-active');
|
||||
sliderScreenshotActive.slick({
|
||||
arrows: false,
|
||||
autoplay: true,
|
||||
dots: false,
|
||||
autoplaySpeed: 2000,
|
||||
infinite: true,
|
||||
centerMode: true,
|
||||
centerPadding: '30px',
|
||||
slidesToShow: 3,
|
||||
focusOnSelect: true,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1920,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
centerPadding: '60px',
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 1200,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
centerPadding: '90px',
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
breakpoint: 991,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
centerPadding: '50px',
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
centerPadding: '45px',
|
||||
slidesToShow: 3
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 480,
|
||||
settings: {
|
||||
arrows: false,
|
||||
centerMode: true,
|
||||
centerPadding: '0px',
|
||||
slidesToShow: 3
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('.single_gallery').owlCarousel({
|
||||
nav: true,
|
||||
dots: false,
|
||||
navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
768: {
|
||||
items: 1
|
||||
},
|
||||
992: {
|
||||
items: 1
|
||||
},
|
||||
1920: {
|
||||
items: 1
|
||||
}
|
||||
}
|
||||
})
|
||||
$('.portfolio_gallery_post').owlCarousel({
|
||||
nav: true,
|
||||
dots: false,
|
||||
navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
768: {
|
||||
items: 1
|
||||
},
|
||||
992: {
|
||||
items: 1
|
||||
},
|
||||
1920: {
|
||||
items: 1
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
})(jQuery);
|
||||
|
||||
4
wp-content/themes/cyber/assets/js/vendor/modernizr-2.8.3.min.js
vendored
Normal file
4
wp-content/themes/cyber/assets/js/vendor/modernizr-2.8.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
wp-content/themes/cyber/assets/js/waypoints.min.js
vendored
Normal file
7
wp-content/themes/cyber/assets/js/waypoints.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
wp-content/themes/cyber/assets/js/wow.js
Normal file
2
wp-content/themes/cyber/assets/js/wow.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user