123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- $(window).load(function() {
- 'use strict';
- $(".pageloader").delay(1000).fadeOut("slow");
- InitcssFix();
- });
- jQuery( document ).ready(function($) {
- 'use strict';
- InitcssFix();
-
- /* ===================
- Animated Items
- =================== */
- $('.animated').appear(function() {
- var elem = $(this);
- var animation = elem.data('animation');
- if ( !elem.hasClass('visible') ) {
- var animationDelay = elem.data('animation-delay');
- if ( animationDelay ) {
-
- setTimeout(function(){
- elem.addClass( animation + " visible" );
- }, animationDelay);
-
- } else {
- elem.addClass( animation + " visible" );
- }
- }
- });
-
- /* =============================
- Carousel Slider
- ============================= */
- $("#app-screenshot").owlCarousel({
- items : 3,
- lazyLoad : true,
- autoPlay: false,
- navigation : true,
- navigationText: ['<i class="fa fa-chevron-left color-grey"></i>','<i class="fa fa-chevron-right color-grey"></i>'],
- pagination: false,
- itemsCustom : false,
- itemsDesktop : [1199, 3],
- itemsDesktopSmall : [980, 3],
- itemsTablet : [768, 2],
- itemsTabletSmall : false,
- itemsMobile : [479, 1]
- });
-
- /* =============================
- Services Carousel Slider
- ============================= */
- $("#awesome-services").owlCarousel({
- items : 3,
- lazyLoad : true,
- autoPlay: true,
- navigation : false,
- pagination: false,
- itemsCustom : false,
- itemsDesktop : [1199, 3],
- itemsDesktopSmall : [980, 3],
- itemsTablet : [768, 2],
- itemsTabletSmall : false,
- itemsMobile : [480, 1]
- });
-
- /* ===================
- Scroll Navigation
- =================== */
- $('.scroll').bind('click', function(event) {
- var $anchor = $(this);
-
- $('html, body').stop().animate({
- scrollTop : $($anchor.attr('href')).offset().top + 2 + "px"
- }, 1200, 'easeInOutExpo');
- event.preventDefault();
- return false;
- });
-
- // Menus hide after click on mobile devices
- $('.nav li a').click(function () {
- $('.navbar-collapse').removeClass('in');
- return false;
- });
-
- /* ===================
- Fixed Menu on Scroll
- =================== */
- $("#sticky-menu").sticky({topSpacing:0});
-
- /* =============================
- Active Scrollspy Navigation
- ============================= */
- $('body').scrollspy({
- target: '#topnav',
- offset: 95
- });
-
- /* =============================
- Contact Form Validation
- ============================= */
- $('#contactform').bootstrapValidator({
- message: '',
- feedbackIcons: {
- valid: 'fa fa-check',
- invalid: 'fa fa-times',
- validating: 'fa fa-refresh'
- },
- fields: {
- contact_name: {
- validators: {
- notEmpty: {
- message: ''
- }
- }
- },
- contact_email: {
- validators: {
- notEmpty: {
- message: ''
- },
- emailAddress: {
- message: ''
- }
- }
- },
- contact_message: {
- validators: {
- notEmpty: {
- message: ''
- }
- }
- }
- },
- submitHandler: function(validator, form, submitButton) {
-
- var data = $('#contactform').serialize();
-
- $.ajax({
- type: "POST",
- url: "process.php",
- data: $('#contactform').serialize(),
- success: function(msg){
- $('.gk-form-message').html(msg);
- $('.gk-form-message').show();
- submitButton.removeAttr("disabled");
- resetForm($('#contactform'));
- },
- error: function(msg){
- $('.gk-form-message').html(msg);
- $('.gk-form-message').show();
- submitButton.removeAttr("disabled");
- resetForm($('#contactform'));
- }
- });
-
- return false;
- },
- });
-
- $('#subscribe').bootstrapValidator({
- message: '',
- feedbackIcons: {
- valid: 'fa fa-check',
- invalid: 'fa fa-times',
- validating: 'fa fa-refresh'
- },
- fields: {
- subscribe_email: {
- validators: {
- notEmpty: {
- message: ''
- }
- }
- }
- },
- submitHandler: function(validator, form, submitButton) {
-
- var data = $('#subscribe').serialize();
-
- $.ajax({
- type: "POST",
- url: "subscribe.php",
- data: $('#subscribe').serialize(),
- success: function(msg){
- $('.gk-form-message-subscribe').html(msg);
- $('.gk-form-message-subscribe').show();
- submitButton.removeAttr("disabled");
- resetForm($('#subscribe'));
- },
- error: function(msg){
- $('.gk-form-message-subscribe').html(msg);
- $('.gk-form-message-subscribe').show();
- submitButton.removeAttr("disabled");
- resetForm($('#subscribe'));
- }
- });
-
- return false;
- },
- });
-
- function resetForm($form) {
- $form.find('input:text, input:password, input, input:file, select, textarea').val('');
- $form.find('input:radio, input:checkbox').removeAttr('checked').removeAttr('selected');
- $form.find('input:text, input:password, input, input:file, select, textarea, input:radio, input:checkbox').parent().find('.form-control-feedback').hide();
- }
-
- /* =============================
- Color Panel
- ============================= */
- // Theme Panel Open/Close
- $( "#theme-panel .panel-button" ).click(function(){
- $( "#theme-panel" ).toggleClass( "close-theme-panel", "open-theme-panel", 1000 );
- $( "#theme-panel" ).toggleClass( "open-theme-panel", "close-theme-panel", 1000 );
- return false;
- });
-
- /* =============================
- Count Section
- ============================= */
- $(".count-number").appear(function(){
- $(this).each(function(){
- var datacount = $(this).attr('data-count');
- $(this).find('.counter').delay(6000).countTo({
- from: 10,
- to: datacount,
- speed: 3000,
- refreshInterval: 50,
- });
- });
- });
-
- /* ===================
- Video Script
- =================== */
- $(".player").mb_YTPlayer();
-
- });
- $(window).resize(function() {
- 'use strict';
- InitcssFix();
- });
- /* ===============================
- CSS Fix for Background Shapes
- =============================== */
- function InitcssFix() {
- var width = $(window).width();
-
- if( width >= 1480 && width < 1600 ) {
- $('.wrapper-class').addClass('after-1500');
- $('.wrapper-class').removeClass('after-1600');
- } else if( width >= 1600 && width < 1800 ) {
- $('.wrapper-class').addClass('after-1600');
- $('.wrapper-class').removeClass('after-1500');
- $('.wrapper-class').removeClass('after-2000');
- } else if( width >= 1800 && width < 2000 ) {
- $('.wrapper-class').addClass('after-1800');
- $('.wrapper-class').removeClass('after-1600');
- $('.wrapper-class').removeClass('after-2000');
- } else if( width >= 2000 && width < 2600 ) {
- $('.wrapper-class').addClass('after-2000');
- $('.wrapper-class').removeClass('after-1600');
- $('.wrapper-class').removeClass('after-1800');
- $('.wrapper-class').removeClass('after-2600');
- } else if( width >= 2600 && width < 3000 ) {
- $('.wrapper-class').addClass('after-2600');
- $('.wrapper-class').removeClass('after-2000');
- $('.wrapper-class').removeClass('after-3000');
- } else if( width >= 3000 ) {
- $('.wrapper-class').addClass('after-3000');
- $('.wrapper-class').removeClass('after-2600');
- } else if( width <= 1480 ) {
- $('.wrapper-class').removeClass('after-1500');
- }
-
- }
|