You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
3.4 KiB

1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /* TABLE OF CONTENTS
  2. ---------------------------
  3. 1. Loading / Opening
  4. 2. Custom scroll bar
  5. 3. Newsletter / Pop-up
  6. 4. SlitSlider
  7. */
  8. /* ------------------------------------- */
  9. /* 1. Loading / Opening ................ */
  10. /* ------------------------------------- */
  11. $(window).load(function(){
  12. "use strict";
  13. setTimeout(function(){
  14. $("#loading").addClass('animated-middle fadeOut');
  15. },2000);
  16. setTimeout(function(){
  17. setTimeout(function() {
  18. $('.text-intro').each(function(i) {
  19. (function(self) {
  20. setTimeout(function() {
  21. $(self).addClass('animated-middle fadeInUp').removeClass('opacity-0');
  22. },(i*150)+150);
  23. })(this);
  24. });
  25. }, 0);
  26. },2000);
  27. setTimeout(function(){
  28. $(".bar-intro").addClass('animated-middle slideInDown').removeClass('opacity-0');
  29. },3000);
  30. setTimeout(function(){
  31. $("#loading").remove();
  32. },3300);
  33. setTimeout(function(){
  34. $(".text-intro").removeClass('animated-middle fadeInUp');
  35. },4000);
  36. });
  37. $(document).ready(function(){
  38. "use strict";
  39. $("#loading").removeClass('dark-back');
  40. $(".loading-text").addClass('animated-middle fadeIn').removeClass('opacity-0');
  41. /* ------------------------------------- */
  42. /* 2. Custom scroll bar ................ */
  43. /* ------------------------------------- */
  44. function scrollbar(){
  45. $('.content-slide').mCustomScrollbar({
  46. scrollInertia: 150,
  47. axis :"y"
  48. });
  49. }
  50. scrollbar();
  51. /* ------------------------------------- */
  52. /* 3. Newsletter / Pop-up .............. */
  53. /* ------------------------------------- */
  54. $("#notifyMe").notifyMe();
  55. (function() {
  56. var dlgtrigger = document.querySelector( '[data-dialog]' ),
  57. somedialog = document.getElementById( dlgtrigger.getAttribute( 'data-dialog' ) ),
  58. dlg = new DialogFx( somedialog );
  59. dlgtrigger.addEventListener( 'click', dlg.toggle.bind(dlg) );
  60. })();
  61. /* ------------------------------------- */
  62. /* 4. SlitSlider ....................... */
  63. /* ------------------------------------- */
  64. $(function() {
  65. var Page = (function() {
  66. var $navArrows = $( '#nav-arrows' ),
  67. $nav = $( '#nav-multi-square > span' ),
  68. slitslider = $( '#slider' ).slitslider( {
  69. onBeforeChange : function( slide, pos ) {
  70. $nav.removeClass( 'nav-square-current' );
  71. $nav.eq( pos ).addClass( 'nav-square-current' );
  72. }
  73. } ),
  74. init = function() {
  75. initEvents();
  76. },
  77. initEvents = function() {
  78. // add navigation events
  79. $navArrows.children( ':last' ).on( 'click', function() {
  80. slitslider.next();
  81. return false;
  82. } );
  83. $navArrows.children( ':first' ).on( 'click', function() {
  84. slitslider.previous();
  85. return false;
  86. } );
  87. $nav.each( function( i ) {
  88. $( this ).on( 'click', function( event ) {
  89. var $dot = $( this );
  90. if( !slitslider.isActive() ) {
  91. $nav.removeClass( 'nav-square-current' );
  92. $dot.addClass( 'nav-square-current' );
  93. }
  94. slitslider.jump( i + 1 );
  95. return false;
  96. } );
  97. } );
  98. };
  99. return { init : init };
  100. })();
  101. Page.init();
  102. });
  103. });