|
@@ -1,16 +1,23 @@
|
|
|
-jQuery(document).ready(function($) {
|
|
|
+new WOW().init();
|
|
|
|
|
|
-$(window).bind("load", function () {
|
|
|
+jQuery(document).ready(function($) {
|
|
|
+
|
|
|
+$(window).bind('load', function() {
|
|
|
$('#loader').fadeOut(700);
|
|
|
});
|
|
|
|
|
|
-$(function cookieset(){
|
|
|
+
|
|
|
+/*============================================
|
|
|
+ Welcome Cookies
|
|
|
+==============================================*/
|
|
|
+
|
|
|
+$(function dw_set_cookie() {
|
|
|
var COOKIE = 'windhamdavid-cookie';
|
|
|
- $go = $.cookie(COOKIE);
|
|
|
- if ($go == null) {
|
|
|
- $.cookie(COOKIE, 'yum-cookies', { expires: 7, path: '/', expires: 6 });
|
|
|
- $(".welcome").typed({
|
|
|
- strings: ["Hey,", "Hello,\n^10Welcome to ^10my domain ^10...^10", "Hello, \nWelcome to my little corner of the internet. \n^10It's nice to ", "Hello, \nWelcome to my little corner of the internet. \nIt's very nice to have you here!^10\n"],
|
|
|
+ var dwcookie = $.cookie(COOKIE);
|
|
|
+ if (dwcookie == null) {
|
|
|
+ $.cookie(COOKIE, 'yum-cookies', { expires: 7, path: '/'});
|
|
|
+ $('.welcome').typed({
|
|
|
+ strings: ['Hey,', 'Hello,\n^10Welcome to ^10my domain ^10...^10', 'Hello, \nWelcome to my little corner of the internet. \n^10It is nice to ', 'Hello, \nWelcome to my little corner of the internet. \nIt is very nice to have you here!^10\n'],
|
|
|
typeSpeed: -40,
|
|
|
backSpeed: -70,
|
|
|
startDelay: 0,
|
|
@@ -19,15 +26,15 @@ $(function cookieset(){
|
|
|
loopCount: false,
|
|
|
attr: null,
|
|
|
callback: function(){
|
|
|
- shift();
|
|
|
+ dw_shift();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
else {
|
|
|
$('.intro').collapse('hide');
|
|
|
$('.terminal').modal('show');
|
|
|
- $(".welcome-back").typed({
|
|
|
- strings: ["Hey...", "Welcome back..."],
|
|
|
+ $('.welcome-back').typed({
|
|
|
+ strings: ['Hey...', 'Welcome back...'],
|
|
|
typeSpeed: -40,
|
|
|
backSpeed: -70,
|
|
|
startDelay: 0,
|
|
@@ -36,178 +43,204 @@ $(function cookieset(){
|
|
|
loopCount: false,
|
|
|
attr: null,
|
|
|
callback: function(){
|
|
|
- thecollapse();
|
|
|
+ dw_collapse();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-function shift(){
|
|
|
+function dw_shift() {
|
|
|
+ var collapseh = $('.intro').height();
|
|
|
$('.leader').ScrollTo({
|
|
|
+ offset: -(collapseh),
|
|
|
duration: 1500,
|
|
|
easing: 'linear',
|
|
|
- durationMode: 'all',
|
|
|
callback: function(){
|
|
|
- thecollapse();
|
|
|
+ dw_collapse();
|
|
|
}
|
|
|
});
|
|
|
-};
|
|
|
+ $('.intro').slideToggle({
|
|
|
+ duration: 1000,
|
|
|
+ easing: 'linear'
|
|
|
+ });
|
|
|
+}
|
|
|
|
|
|
-function thecollapse(){
|
|
|
- $('.intro').collapse('hide')
|
|
|
- $('.terminal').modal('hide')
|
|
|
-};
|
|
|
+function dw_collapse() {
|
|
|
+ //$('.intro').collapse('hide');
|
|
|
+ $('.terminal').modal('hide');
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/*============================================
|
|
|
+ Navigation
|
|
|
+==============================================*/
|
|
|
+
|
|
|
+$('.nav-toggle').on('touchstart click', function(e) {
|
|
|
+ e.preventDefault();
|
|
|
+ $( this ).toggleClass( 'active' );
|
|
|
+});
|
|
|
|
|
|
$('#nav').affix({
|
|
|
- offset: {top: $('.intro').height()-$('#nav').height()}
|
|
|
+ offset: {top: $('.intro').height()-$('.navbar').height()}
|
|
|
});
|
|
|
|
|
|
-$('.nav-toggle').on( 'click', function() {
|
|
|
- $( this ).toggleClass( 'active' );
|
|
|
+$(function dw_hidenav() {
|
|
|
+ var headerHeight = $('.navbar').height();
|
|
|
+ $(window).on('scroll', { previousTop: 0 },
|
|
|
+ function() {
|
|
|
+ var currentTop = $(window).scrollTop();
|
|
|
+ if (currentTop < this.previousTop) {
|
|
|
+ if (currentTop > 0 && $('.navbar').hasClass('fixed')) {
|
|
|
+ $('.navbar').addClass('visible');
|
|
|
+ } else {
|
|
|
+ $('.navbar').removeClass('visible fixed');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $('.navbar').removeClass('visible');
|
|
|
+ if (currentTop > headerHeight && !$('.navbar').hasClass('fixed')) $('.navbar').addClass('fixed');
|
|
|
+ }
|
|
|
+ this.previousTop = currentTop;
|
|
|
+ }
|
|
|
+ );
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+/*============================================
|
|
|
+ Carousel
|
|
|
+==============================================*/
|
|
|
+
|
|
|
$('.carousel').carousel({
|
|
|
interval: 4200
|
|
|
});
|
|
|
|
|
|
-$('.carousel').on('slide.bs.carousel', function () {
|
|
|
- $('.carousel-caption').fadeIn(600)
|
|
|
+$('.carousel').on('slide.bs.carousel', function() {
|
|
|
+ $('.carousel-caption').fadeIn(600);
|
|
|
//$('#tv').removeClass('invert');
|
|
|
-})
|
|
|
+});
|
|
|
|
|
|
-$('.carousel').on('slid.bs.carousel', function () {
|
|
|
- $('.carousel-caption').fadeOut(600)
|
|
|
+$('.carousel').on('slid.bs.carousel', function() {
|
|
|
+ $('.carousel-caption').fadeOut(600);
|
|
|
//$('#tv').addClass('invert');
|
|
|
-})
|
|
|
-
|
|
|
-$(function(){
|
|
|
- $('.calendar').fullCalendar ({
|
|
|
- firstDay : 1,
|
|
|
- height: 345,
|
|
|
- events: [
|
|
|
- {
|
|
|
- title: 'Project',
|
|
|
- start: '2014-09-27',
|
|
|
- end: '2014-10-02'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Conf',
|
|
|
- start: '2014-10-11',
|
|
|
- end: '2014-10-13',
|
|
|
- borderColor: 'red'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'off',
|
|
|
- start: '2014-10-13',
|
|
|
- end: '2014-10-16'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Contract',
|
|
|
- start: '2014-10-16',
|
|
|
- end: '2014-10-31'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Contract',
|
|
|
- start: '2014-11-03',
|
|
|
- end: '2014-11-22'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Project',
|
|
|
- start: '2014-12-01',
|
|
|
- end: '2014-12-06'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Project',
|
|
|
- start: '2014-12-08',
|
|
|
- end: '2014-12-13'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Holiday',
|
|
|
- start: '2014-12-22',
|
|
|
- end: '2015-01-05',
|
|
|
- borderColor: 'red'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Project',
|
|
|
- start: '2015-01-06',
|
|
|
- end: '2015-01-25'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Project',
|
|
|
- start: '2015-02-02',
|
|
|
- end: '2015-02-14'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'Holiday',
|
|
|
- start: '2015-02-14',
|
|
|
- end: '2015-02-19',
|
|
|
- borderColor: 'red'
|
|
|
- },
|
|
|
- ]
|
|
|
- })
|
|
|
});
|
|
|
|
|
|
|
|
|
-;(function ($) {
|
|
|
- 'use strict';
|
|
|
- var content = $('.transit').smoothState({
|
|
|
- onStart : {
|
|
|
- duration: 250,
|
|
|
- render: function () {
|
|
|
- content.toggleAnimationClass('is-exiting');
|
|
|
- }
|
|
|
- }
|
|
|
- }).data('smoothState');
|
|
|
-})(jQuery);
|
|
|
-
|
|
|
-
|
|
|
-var headerHeight = $('.navbar').height();
|
|
|
-$(window).on('scroll', { previousTop: 0 },
|
|
|
-function() {
|
|
|
- var currentTop = $(window).scrollTop();
|
|
|
- if (currentTop < this.previousTop) {
|
|
|
- if (currentTop > 0 && $('.navbar').hasClass('fixed')) {
|
|
|
- $('.navbar').addClass('visible');
|
|
|
- } else {
|
|
|
- $('.navbar').removeClass('visible fixed');
|
|
|
- }
|
|
|
- } else {
|
|
|
- $('.navbar').removeClass('visible');
|
|
|
- if (currentTop > headerHeight && !$('.navbar').hasClass('fixed')) $('.navbar').addClass('fixed');
|
|
|
- }
|
|
|
- this.previousTop = currentTop;
|
|
|
+/*============================================
|
|
|
+ Comments
|
|
|
+==============================================*/
|
|
|
+
|
|
|
+$('#comments').hide();
|
|
|
+
|
|
|
+$('.toggle-comments').on('touchstart click', function(e) {
|
|
|
+ e.preventDefault();
|
|
|
+ $('#comments').toggle('slow', function() {
|
|
|
+ var anchor = $('.toggle-comments');
|
|
|
+ var anchorText = anchor.text() === 'Hide Comments' ? 'Show Comments' : 'Hide Comments';
|
|
|
+ $(anchor).text(anchorText);
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
-var commentsDiv = $('#comments');
|
|
|
- if (commentsDiv.length) {
|
|
|
- $(commentsDiv).hide();
|
|
|
- $('.toggle-comments').on('click', function(e) {
|
|
|
- e.preventDefault();
|
|
|
- $(commentsDiv).toggle('slow', function() {
|
|
|
- var anchor = $('.toggle-comments');
|
|
|
- var anchorText = anchor.text() === 'Hide Comments' ? 'Show Comments' : 'Hide Comments';
|
|
|
- $(anchor).text(anchorText);
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
+$('#commentform').validate({
|
|
|
+ rules: {
|
|
|
+ author: {
|
|
|
+ required: true,
|
|
|
+ minlength: 2
|
|
|
+ },
|
|
|
+ email: {
|
|
|
+ required: true,
|
|
|
+ email: true
|
|
|
+ },
|
|
|
+ comment: {
|
|
|
+ required: true,
|
|
|
+ minlength: 20
|
|
|
+ }
|
|
|
+ },
|
|
|
+ messages: {
|
|
|
+ author: "Please enter in your name.",
|
|
|
+ email: "Please enter a valid email address.",
|
|
|
+ comment: "Message box can't be empty!"
|
|
|
+ },
|
|
|
+ errorElement: "div",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ element.before(error);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
-;(function ($) {
|
|
|
- 'use strict';
|
|
|
- var $body = $('html, body'),
|
|
|
- content = $('#big-top').smoothState({
|
|
|
- prefetch: true,
|
|
|
- pageCacheSize: 4,
|
|
|
- onStart: {
|
|
|
- duration: 250,
|
|
|
- render: function (url, $container) {
|
|
|
- content.toggleAnimationClass('is-exiting');
|
|
|
- $body.animate({
|
|
|
- scrollTop: 0
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }).data('smoothState');
|
|
|
-})(jQuery);
|
|
|
-
|
|
|
-new WOW().init();
|
|
|
+/*============================================
|
|
|
+ SmoothState
|
|
|
+==============================================*/
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*============================================
|
|
|
+ Calendar
|
|
|
+==============================================*/
|
|
|
+
|
|
|
+$('.calendar').fullCalendar ({
|
|
|
+ firstDay : 1,
|
|
|
+ height: 345,
|
|
|
+ events: [
|
|
|
+ {
|
|
|
+ title: 'Project',
|
|
|
+ start: '2014-09-27',
|
|
|
+ end: '2014-10-02'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Conf',
|
|
|
+ start: '2014-10-11',
|
|
|
+ end: '2014-10-13',
|
|
|
+ borderColor: 'red'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'off',
|
|
|
+ start: '2014-10-13',
|
|
|
+ end: '2014-10-16'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Contract',
|
|
|
+ start: '2014-10-16',
|
|
|
+ end: '2014-10-31'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Contract',
|
|
|
+ start: '2014-11-03',
|
|
|
+ end: '2014-11-22'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Project',
|
|
|
+ start: '2014-12-01',
|
|
|
+ end: '2014-12-06'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Project',
|
|
|
+ start: '2014-12-08',
|
|
|
+ end: '2014-12-13'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Holiday',
|
|
|
+ start: '2014-12-22',
|
|
|
+ end: '2015-01-05',
|
|
|
+ borderColor: 'red'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Project',
|
|
|
+ start: '2015-01-06',
|
|
|
+ end: '2015-01-25'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Project',
|
|
|
+ start: '2015-02-02',
|
|
|
+ end: '2015-02-14'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Holiday',
|
|
|
+ start: '2015-02-14',
|
|
|
+ end: '2015-02-19',
|
|
|
+ borderColor: 'red'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+});
|