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.

172 lines
4.2 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. $(".nav-intro").addClass('animated-middle slideInUp').removeClass('opacity-0');
  30. $(".nav-arrows span").removeClass('opacity-0').addClass('show-arrows');
  31. },3000);
  32. setTimeout(function(){
  33. $("#loading").remove();
  34. },3300);
  35. setTimeout(function(){
  36. $(".text-intro").removeClass('animated-middle fadeInUp');
  37. },4000);
  38. });
  39. $(document).ready(function(){
  40. "use strict";
  41. $("#loading").removeClass('dark-back');
  42. $(".loading-text").addClass('animated-middle fadeIn').removeClass('opacity-0');
  43. /* ------------------------------------- */
  44. /* 2. Custom scroll bar ................ */
  45. /* ------------------------------------- */
  46. function scrollbar(){
  47. $('.content-slide').mCustomScrollbar({
  48. scrollInertia: 150,
  49. axis :"y"
  50. });
  51. }
  52. scrollbar();
  53. /* ------------------------------------- */
  54. /* 3. Newsletter / Pop-up .............. */
  55. /* ------------------------------------- */
  56. $("#notifyMe").notifyMe();
  57. (function() {
  58. var dlgtrigger = document.querySelector( '[data-dialog]' ),
  59. somedialog = document.getElementById( dlgtrigger.getAttribute( 'data-dialog' ) ),
  60. dlg = new DialogFx( somedialog );
  61. dlgtrigger.addEventListener( 'click', dlg.toggle.bind(dlg) );
  62. })();
  63. /* ------------------------------------- */
  64. /* 4. SlitSlider ....................... */
  65. /* ------------------------------------- */
  66. $('.bg-1 .sl-slide-inner , .bg-1 .sl-content-slice').css("background", "url('img/slide-1.jpg') center").css("background-size", "cover");
  67. $('.bg-2 .sl-slide-inner , .bg-1 .sl-content-slice').css("background", "url('img/slide-2.jpg') center").css("background-size", "cover");
  68. $('.bg-3 .sl-slide-inner , .bg-1 .sl-content-slice').css("background", "url('img/slide-3.jpg') center").css("background-size", "cover");
  69. $('.bg-4 .sl-slide-inner , .bg-1 .sl-content-slice').css("background", "url('img/slide-4.jpg') center").css("background-size", "cover");
  70. $('.bg-5 .sl-slide-inner , .bg-1 .sl-content-slice').css("background", "url('img/slide-5.jpg') center").css("background-size", "cover");
  71. $(function() {
  72. var Page = (function() {
  73. var $navArrows = $( '#nav-arrows' ),
  74. $nav = $( '#nav-multi-square > span' ),
  75. slitslider = $( '#slider' ).slitslider( {
  76. onBeforeChange : function( slide, pos ) {
  77. $nav.removeClass( 'nav-square-current' );
  78. $nav.eq( pos ).addClass( 'nav-square-current' );
  79. }
  80. } ),
  81. init = function() {
  82. initEvents();
  83. },
  84. initEvents = function() {
  85. // add navigation events
  86. $navArrows.children( ':last' ).on( 'click', function() {
  87. slitslider.next();
  88. return false;
  89. } );
  90. $navArrows.children( ':first' ).on( 'click', function() {
  91. slitslider.previous();
  92. return false;
  93. } );
  94. $nav.each( function( i ) {
  95. $( this ).on( 'click', function( event ) {
  96. var $dot = $( this );
  97. if( !slitslider.isActive() ) {
  98. $nav.removeClass( 'nav-square-current' );
  99. $dot.addClass( 'nav-square-current' );
  100. }
  101. slitslider.jump( i + 1 );
  102. return false;
  103. } );
  104. } );
  105. };
  106. return { init : init };
  107. })();
  108. Page.init();
  109. });
  110. });