123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- new WOW().init();
- jQuery(document).ready(function($) {
-
- $(window).bind('load', function() {
- $('#loader').fadeOut(700);
- });
- $(function () {
- $('[data-toggle="tooltip"]').tooltip()
- })
- var person = localStorage.getItem('person');
- /*============================================
- Navigation
- ==============================================*/
- $('.nav-toggle').on('touchstart click', function(e) {
- e.preventDefault();
- $( this ).toggleClass( 'active' );
- });
- $('#nav').affix({
- //offset: {top: $('.intro').height()-$('.navbar').height()}
- });
- $(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');
- $('.site-title a').removeClass('light');
- } else {
- $('.navbar').removeClass('visible fixed');
- $('.site-title a').addClass('light');
- }
- }
- else {
- $('.navbar').removeClass('visible');
- if (currentTop > headerHeight && !$('.navbar').hasClass('fixed')) $('.navbar').addClass('fixed');
- }
- this.previousTop = currentTop;
- }
- );
- });
- /*============================================
- Carousel
- ==============================================*/
- $('#caro-lead').carousel({
- interval: 5777,
- wrap: true,
- pause: false
- });
- function dw_caro(){
- $('#caro-lead').carousel({
- interval: 5777,
- wrap: true,
- pause: false
- });
- var vidout = document.getElementById('tv');
- vidout.play();
- }
- $('#caro-lead').on('slide.bs.carousel', function(event) {
- $('.carousel-caption').fadeIn(600);
- var consta = $(event.target);
- setTimeout(function() {
- if (consta.find('.item.active').data('id') === 1) {
- $('#tv').removeClass('unblur').addClass('blur');
- var anistars = new DrawFillSVG({elementId: 'sites'});
- anistars.replay();
- $('#tv').delay(100).queue(function(pauseit){
- var vidin = document.getElementById('tv');
- vidin.pause();
- pauseit();
- });
- }
- if (consta.find('.item.active').data('id') === 2) {
- $('#tv').removeClass('unblur').addClass('blur');
- var anibrain = new DrawFillSVG({elementId: 'brain'});
- anibrain.replay();
- $('#tv').delay(100).queue(function(pauseit){
- var vidin = document.getElementById('tv');
- vidin.pause();
- pauseit();
- });
- }
- if (consta.find('.item.active').data('id') === 3) {
- $('.leader').delay(100).queue(function(closeit){
- dw_caro_hide();
- closeit();
- });
- }
- }, 10);
- });
- function dw_caro_hide(){
- $('.leader').fadeTo(500,0, function() {
- $('#caro-lead').carousel('pause');
- })
- }
- $('#caro-lead').on('slid.bs.carousel', function() {
- $('.carousel-caption').fadeOut(600);
- $('#tv').delay(3200).queue(function(playit){
- $('#tv').addClass('unblur').removeClass('blur');
- var vidout = document.getElementById('tv');
- vidout.play();
- playit();
- });
- });
- $('.caro-grad').appear();
- $('.caro-grad').one('appear', dw_appear);
- function dw_appear() {
- $('#caro').carousel({
- interval: 5555,
- wrap: false,
- pause: false
- });
- var anima = new DrawFillSVG({elementId: 'sv'});
- anima.replay();
- };
- $(document).bind('keyup', function(e) {
- if(e.which === 39){
- //$('#caro-lead').carousel('next');
- $('#caro').carousel('next');
- }
- else if(e.which === 37){
- //$('#caro-lead').carousel('prev');
- $('#caro').carousel('prev');
- }
- });
- /*============================================
- SVG Animate
- ==============================================*/
- $('#caro').on('slid.bs.carousel', function() {
- $('.active .animac').removeClass('hide-svg fade-svg');
- var animac = new DrawFillSVG({elementId: 'svg-mac'});
- var animac1 = new DrawFillSVG({elementId: 'svg-imac'});
- var animac2 = new DrawFillSVG({elementId: 'svg'});
- animac.replay();
- animac1.replay();
- animac2.replay();
- });
- $('#caro').on('slide.bs.carousel', function() {
- $('.active #svg-imac.bg').attr('class', 'svg screen');
- $('.active .animac').addClass('fade-svg').delay(1000).queue(function(hideit){
- $(this).addClass('hide-svg');
- hideit();
- });
- });
- $('#caro').on('slid.bs.carousel', function() {
- $('.active #svg-imac.screen').delay(2500).queue(function(screenit){
- $(this).attr('class', 'bg');
- screenit();
- });
- });
- /*============================================
- Form
- ==============================================*/
- $('#commentform').validate({
- rules: {
- author: {
- required: true,
- minlength: 2
- },
- email: {
- required: true,
- email: true
- },
- comment: {
- required: true,
- minlength: 3
- }
- },
- messages: {
- author: 'Please enter in your name.',
- email: 'Please enter a valid email address.',
- comment: 'Nothing to Say?'
- },
- errorElement: 'div',
- errorPlacement: function(error, element) {
- element.before(error);
- }
- });
- /*============================================
- SmoothState
- ==============================================*/
-
- /*============================================
- Calendar
- ==============================================*/
- $('.calendar').fullCalendar ({
- firstDay : 1,
- height: 345,
- events: [
- {
- title: 'Holiday',
- start: '2015-12-22',
- end: '2016-01-05',
- borderColor: 'red'
- },
- {
- title: 'Project',
- start: '2016-01-05',
- end: '2016-02-05'
- },
- {
- title: 'Contract',
- start: '2016-02-06',
- end: '2016-02-13',
- borderColor: 'blue'
- },
- {
- title: 'Holiday',
- start: '2016-02-13',
- end: '2016-02-16',
- borderColor: 'red'
- },
- {
- title: 'Contract',
- start: '2016-02-16',
- end: '2016-04-01',
- borderColor: 'blue'
- },
- {
- title: 'Holiday',
- start: '2016-04-01',
- end: '2016-04-10',
- borderColor: 'red'
- },
- {
- title: 'Contract',
- start: '2016-04-12',
- end: '2016-06-01',
- borderColor: 'blue'
- },
- {
- title: 'Project',
- start: '2016-06-01',
- end: '2016-07-01'
- },
- {
- title: 'Holiday',
- start: '2016-07-01',
- end: '2016-07-06',
- borderColor: 'red'
- }
- ]
- });
-
- });
|