about.js 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. new WOW().init();
  2. jQuery(document).ready(function($) {
  3. $(window).bind('load', function() {
  4. $('#loader').fadeOut(700);
  5. });
  6. $(function () {
  7. $('[data-toggle="tooltip"]').tooltip()
  8. })
  9. var person = localStorage.getItem('person');
  10. /*============================================
  11. Navigation
  12. ==============================================*/
  13. $('.nav-toggle').on('touchstart click', function(e) {
  14. e.preventDefault();
  15. $( this ).toggleClass( 'active' );
  16. });
  17. $('#nav').affix({
  18. //offset: {top: $('.intro').height()-$('.navbar').height()}
  19. });
  20. $(function dw_hidenav() {
  21. var headerHeight = $('.navbar').height();
  22. $(window).on('scroll', { previousTop: 0 },
  23. function() {
  24. var currentTop = $(window).scrollTop();
  25. if (currentTop < this.previousTop) {
  26. if (currentTop > 0 && $('.navbar').hasClass('fixed')) {
  27. $('.navbar').addClass('visible');
  28. $('.site-title a').removeClass('light');
  29. } else {
  30. $('.navbar').removeClass('visible fixed');
  31. $('.site-title a').addClass('light');
  32. }
  33. }
  34. else {
  35. $('.navbar').removeClass('visible');
  36. if (currentTop > headerHeight && !$('.navbar').hasClass('fixed')) $('.navbar').addClass('fixed');
  37. }
  38. this.previousTop = currentTop;
  39. }
  40. );
  41. });
  42. /*============================================
  43. Carousel
  44. ==============================================*/
  45. $('#caro-lead').carousel({
  46. interval: 5777,
  47. wrap: true,
  48. pause: false
  49. });
  50. function dw_caro(){
  51. $('#caro-lead').carousel({
  52. interval: 5777,
  53. wrap: true,
  54. pause: false
  55. });
  56. var vidout = document.getElementById('tv');
  57. vidout.play();
  58. }
  59. $('#caro-lead').on('slide.bs.carousel', function(event) {
  60. $('.carousel-caption').fadeIn(600);
  61. var consta = $(event.target);
  62. setTimeout(function() {
  63. if (consta.find('.item.active').data('id') === 1) {
  64. $('#tv').removeClass('unblur').addClass('blur');
  65. var anistars = new DrawFillSVG({elementId: 'sites'});
  66. anistars.replay();
  67. $('#tv').delay(100).queue(function(pauseit){
  68. var vidin = document.getElementById('tv');
  69. vidin.pause();
  70. pauseit();
  71. });
  72. }
  73. if (consta.find('.item.active').data('id') === 2) {
  74. $('#tv').removeClass('unblur').addClass('blur');
  75. var anibrain = new DrawFillSVG({elementId: 'brain'});
  76. anibrain.replay();
  77. $('#tv').delay(100).queue(function(pauseit){
  78. var vidin = document.getElementById('tv');
  79. vidin.pause();
  80. pauseit();
  81. });
  82. }
  83. if (consta.find('.item.active').data('id') === 3) {
  84. $('.leader').delay(100).queue(function(closeit){
  85. dw_caro_hide();
  86. closeit();
  87. });
  88. }
  89. }, 10);
  90. });
  91. function dw_caro_hide(){
  92. $('.leader').fadeTo(500,0, function() {
  93. $('#caro-lead').carousel('pause');
  94. })
  95. }
  96. $('#caro-lead').on('slid.bs.carousel', function() {
  97. $('.carousel-caption').fadeOut(600);
  98. $('#tv').delay(3200).queue(function(playit){
  99. $('#tv').addClass('unblur').removeClass('blur');
  100. var vidout = document.getElementById('tv');
  101. vidout.play();
  102. playit();
  103. });
  104. });
  105. $('.caro-grad').appear();
  106. $('.caro-grad').one('appear', dw_appear);
  107. function dw_appear() {
  108. $('#caro').carousel({
  109. interval: 5555,
  110. wrap: false,
  111. pause: false
  112. });
  113. var anima = new DrawFillSVG({elementId: 'sv'});
  114. anima.replay();
  115. };
  116. $(document).bind('keyup', function(e) {
  117. if(e.which === 39){
  118. //$('#caro-lead').carousel('next');
  119. $('#caro').carousel('next');
  120. }
  121. else if(e.which === 37){
  122. //$('#caro-lead').carousel('prev');
  123. $('#caro').carousel('prev');
  124. }
  125. });
  126. /*============================================
  127. SVG Animate
  128. ==============================================*/
  129. $('#caro').on('slid.bs.carousel', function() {
  130. $('.active .animac').removeClass('hide-svg fade-svg');
  131. var animac = new DrawFillSVG({elementId: 'svg-mac'});
  132. var animac1 = new DrawFillSVG({elementId: 'svg-imac'});
  133. var animac2 = new DrawFillSVG({elementId: 'svg'});
  134. animac.replay();
  135. animac1.replay();
  136. animac2.replay();
  137. });
  138. $('#caro').on('slide.bs.carousel', function() {
  139. $('.active #svg-imac.bg').attr('class', 'svg screen');
  140. $('.active .animac').addClass('fade-svg').delay(1000).queue(function(hideit){
  141. $(this).addClass('hide-svg');
  142. hideit();
  143. });
  144. });
  145. $('#caro').on('slid.bs.carousel', function() {
  146. $('.active #svg-imac.screen').delay(2500).queue(function(screenit){
  147. $(this).attr('class', 'bg');
  148. screenit();
  149. });
  150. });
  151. /*============================================
  152. Form
  153. ==============================================*/
  154. $('#commentform').validate({
  155. rules: {
  156. author: {
  157. required: true,
  158. minlength: 2
  159. },
  160. email: {
  161. required: true,
  162. email: true
  163. },
  164. comment: {
  165. required: true,
  166. minlength: 3
  167. }
  168. },
  169. messages: {
  170. author: 'Please enter in your name.',
  171. email: 'Please enter a valid email address.',
  172. comment: 'Nothing to Say?'
  173. },
  174. errorElement: 'div',
  175. errorPlacement: function(error, element) {
  176. element.before(error);
  177. }
  178. });
  179. /*============================================
  180. SmoothState
  181. ==============================================*/
  182. /*============================================
  183. Calendar
  184. ==============================================*/
  185. $('.calendar').fullCalendar ({
  186. firstDay : 1,
  187. height: 345,
  188. events: [
  189. {
  190. title: 'Holiday',
  191. start: '2015-12-22',
  192. end: '2016-01-05',
  193. borderColor: 'red'
  194. },
  195. {
  196. title: 'Project',
  197. start: '2016-01-05',
  198. end: '2016-02-05'
  199. },
  200. {
  201. title: 'Contract',
  202. start: '2016-02-06',
  203. end: '2016-02-13',
  204. borderColor: 'blue'
  205. },
  206. {
  207. title: 'Holiday',
  208. start: '2016-02-13',
  209. end: '2016-02-16',
  210. borderColor: 'red'
  211. },
  212. {
  213. title: 'Contract',
  214. start: '2016-02-16',
  215. end: '2016-04-01',
  216. borderColor: 'blue'
  217. },
  218. {
  219. title: 'Holiday',
  220. start: '2016-04-01',
  221. end: '2016-04-10',
  222. borderColor: 'red'
  223. },
  224. {
  225. title: 'Contract',
  226. start: '2016-04-12',
  227. end: '2016-06-01',
  228. borderColor: 'blue'
  229. },
  230. {
  231. title: 'Project',
  232. start: '2016-06-01',
  233. end: '2016-07-01'
  234. },
  235. {
  236. title: 'Holiday',
  237. start: '2016-07-01',
  238. end: '2016-07-06',
  239. borderColor: 'red'
  240. },
  241. {
  242. title: 'Project',
  243. start: '2016-08-01',
  244. end: '2016-09-01'
  245. },
  246. {
  247. title: 'Project',
  248. start: '2016-09-01',
  249. end: '2016-10-01'
  250. },
  251. {
  252. title: 'Project',
  253. start: '2016-10-01',
  254. end: '2016-11-01'
  255. },
  256. {
  257. title: 'Holiday',
  258. start: '2016-12-15',
  259. end: '2017-01-10',
  260. borderColor: 'red'
  261. },
  262. {
  263. title: 'Project',
  264. start: '2017-01-24',
  265. end: '2017-03-31',
  266. },
  267. {
  268. title: 'Contract',
  269. start: '2017-04-01',
  270. end: '2017-07-03',
  271. borderColor: 'blue'
  272. },
  273. {
  274. title: 'Holiday',
  275. start: '2017-07-04',
  276. end: '2017-07-15',
  277. borderColor: 'red'
  278. },
  279. {
  280. title: 'Project',
  281. start: '2017-07-18',
  282. end: '2017-09-30'
  283. },
  284. {
  285. title: 'Contract',
  286. start: '2017-10-02',
  287. end: '2017-10-18',
  288. borderColor: 'blue'
  289. },
  290. {
  291. title: 'Holiday',
  292. start: '2017-10-19',
  293. end: '2017-10-24',
  294. borderColor: 'red'
  295. },
  296. {
  297. title: 'Contract',
  298. start: '2017-10-25',
  299. end: '2017-11-21',
  300. borderColor: 'blue'
  301. },
  302. {
  303. title: 'Holiday',
  304. start: '2017-11-22',
  305. end: '2017-11-26',
  306. borderColor: 'red'
  307. },
  308. {
  309. title: 'Project',
  310. start: '2017-11-27',
  311. end: '2017-12-22',
  312. },
  313. {
  314. title: 'Holiday',
  315. start: '2017-12-23',
  316. end: '2018-01-05',
  317. borderColor: 'red'
  318. },
  319. {
  320. title: 'Contract',
  321. start: '2018-01-08',
  322. end: '2018-03-30',
  323. borderColor: 'blue'
  324. },
  325. {
  326. title: 'Contract',
  327. start: '2018-04-01',
  328. end: '2018-06-30',
  329. borderColor: 'blue'
  330. },
  331. {
  332. title: 'Project',
  333. start: '2018-05-01',
  334. end: '2018-07-30'
  335. },
  336. {
  337. title: 'Project',
  338. start: '2018-07-01',
  339. end: '2018-08-30'
  340. },
  341. {
  342. title: 'Contract',
  343. start: '2018-08-01',
  344. end: '2018-11-01',
  345. borderColor: 'blue'
  346. },
  347. {
  348. title: 'Project',
  349. start: '2018-10-01',
  350. end: '2018-12-23'
  351. },
  352. {
  353. title: 'Holiday',
  354. start: '2018-11-22',
  355. end: '2018-11-26',
  356. borderColor: 'red'
  357. },
  358. {
  359. title: 'Holiday',
  360. start: '2018-12-23',
  361. end: '2019-01-05',
  362. borderColor: 'red'
  363. },
  364. {
  365. title: 'Project',
  366. start: '2019-01-01',
  367. end: '2019-03-30'
  368. },
  369. {
  370. title: 'Project',
  371. start: '2019-03-05',
  372. end: '2019-04-29'
  373. },
  374. {
  375. title: 'Contract',
  376. start: '2019-05-01',
  377. end: '2019-08-01',
  378. borderColor: 'blue'
  379. },
  380. {
  381. title: 'Holiday',
  382. start: '2019-06-15',
  383. end: '2019-06-22',
  384. borderColor: 'red'
  385. },
  386. {
  387. title: 'Holiday',
  388. start: '2019-08-01',
  389. end: '2019-08-08',
  390. borderColor: 'red'
  391. },
  392. {
  393. title: 'Project',
  394. start: '2019-08-09',
  395. end: '2019-08-30'
  396. },
  397. {
  398. title: 'Project',
  399. start: '2019-09-03',
  400. end: '2019-09-28'
  401. },
  402. {
  403. title: 'Project',
  404. start: '2019-10-01',
  405. end: '2019-10-06'
  406. },
  407. {
  408. title: 'Project',
  409. start: '2019-10-01',
  410. end: '2019-11-01'
  411. },
  412. {
  413. title: 'Contract',
  414. start: '2019-11-01',
  415. end: '2020-01-31',
  416. borderColor: 'blue'
  417. },
  418. {
  419. title: 'Holiday',
  420. start: '2019-11-26',
  421. end: '2019-12-01',
  422. borderColor: 'red'
  423. },
  424. {
  425. title: 'Holiday',
  426. start: '2019-12-23',
  427. end: '2020-01-05',
  428. borderColor: 'red'
  429. },
  430. {
  431. title: 'Contract',
  432. start: '2020-02-01',
  433. end: '2020-03-31',
  434. borderColor: 'blue'
  435. }
  436. ]
  437. });
  438. });