Letlabo Nature Reserve
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*global jQuery:false */
  2. jQuery(document).ready(function($) {
  3. "use strict";
  4. //add some elements with animate effect
  5. $(".big-cta").hover(
  6. function () {
  7. $('.cta a').addClass("animated shake");
  8. },
  9. function () {
  10. $('.cta a').removeClass("animated shake");
  11. }
  12. );
  13. $(".box").hover(
  14. function () {
  15. $(this).find('.icon').addClass("animated fadeInDown");
  16. $(this).find('p').addClass("animated fadeInUp");
  17. },
  18. function () {
  19. $(this).find('.icon').removeClass("animated fadeInDown");
  20. $(this).find('p').removeClass("animated fadeInUp");
  21. }
  22. );
  23. $('.accordion').on('show', function (e) {
  24. $(e.target).prev('.accordion-heading').find('.accordion-toggle').addClass('active');
  25. $(e.target).prev('.accordion-heading').find('.accordion-toggle i').removeClass('icon-plus');
  26. $(e.target).prev('.accordion-heading').find('.accordion-toggle i').addClass('icon-minus');
  27. });
  28. $('.accordion').on('hide', function (e) {
  29. $(this).find('.accordion-toggle').not($(e.target)).removeClass('active');
  30. $(this).find('.accordion-toggle i').not($(e.target)).removeClass('icon-minus');
  31. $(this).find('.accordion-toggle i').not($(e.target)).addClass('icon-plus');
  32. });
  33. // tooltip
  34. $('.social-network li a, .options_box .color a').tooltip();
  35. // fancybox
  36. $(".fancybox").fancybox({
  37. padding : 0,
  38. autoResize: true,
  39. beforeShow: function () {
  40. this.title = $(this.element).attr('title');
  41. this.title = '<h4>' + this.title + '</h4>' + '<p>' + $(this.element).parent().find('img').attr('alt') + '</p>';
  42. },
  43. helpers : {
  44. title : { type: 'inside' },
  45. }
  46. });
  47. //scroll to top
  48. $(window).scroll(function(){
  49. if ($(this).scrollTop() > 100) {
  50. $('.scrollup').fadeIn();
  51. } else {
  52. $('.scrollup').fadeOut();
  53. }
  54. });
  55. $('.scrollup').click(function(){
  56. $("html, body").animate({ scrollTop: 0 }, 1000);
  57. return false;
  58. });
  59. $('#post-slider').flexslider({
  60. // Primary Controls
  61. controlNav : false, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
  62. directionNav : true, //Boolean: Create navigation for previous/next navigation? (true/false)
  63. prevText : "Previous", //String: Set the text for the "previous" directionNav item
  64. nextText : "Next", //String: Set the text for the "next" directionNav item
  65. // Secondary Navigation
  66. keyboard : true, //Boolean: Allow slider navigating via keyboard left/right keys
  67. multipleKeyboard : false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
  68. mousewheel : false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
  69. pausePlay : false, //Boolean: Create pause/play dynamic element
  70. pauseText : 'Pause', //String: Set the text for the "pause" pausePlay item
  71. playText : 'Play', //String: Set the text for the "play" pausePlay item
  72. // Special properties
  73. controlsContainer : "", //{UPDATED} Selector: USE CLASS SELECTOR. Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be ".flexslider-container". Property is ignored if given element is not found.
  74. manualControls : "", //Selector: Declare custom control navigation. Examples would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
  75. sync : "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
  76. asNavFor : "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
  77. });
  78. $('#main-slider').flexslider({
  79. namespace : "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
  80. selector : ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
  81. animation : "fade", //String: Select your animation type, "fade" or "slide"
  82. easing : "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
  83. direction : "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
  84. reverse : false, //{NEW} Boolean: Reverse the animation direction
  85. animationLoop : true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
  86. smoothHeight : false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
  87. startAt : 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
  88. slideshow : true, //Boolean: Animate slider automatically
  89. slideshowSpeed : 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds
  90. animationSpeed : 600, //Integer: Set the speed of animations, in milliseconds
  91. initDelay : 0, //{NEW} Integer: Set an initialization delay, in milliseconds
  92. randomize : false, //Boolean: Randomize slide order
  93. // Usability features
  94. pauseOnAction : true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
  95. pauseOnHover : false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
  96. useCSS : true, //{NEW} Boolean: Slider will use CSS3 transitions if available
  97. touch : true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
  98. video : false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
  99. // Primary Controls
  100. controlNav : true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
  101. directionNav : true, //Boolean: Create navigation for previous/next navigation? (true/false)
  102. prevText : "Previous", //String: Set the text for the "previous" directionNav item
  103. nextText : "Next", //String: Set the text for the "next" directionNav item
  104. // Secondary Navigation
  105. keyboard : true, //Boolean: Allow slider navigating via keyboard left/right keys
  106. multipleKeyboard : false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
  107. mousewheel : false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
  108. pausePlay : false, //Boolean: Create pause/play dynamic element
  109. pauseText : 'Pause', //String: Set the text for the "pause" pausePlay item
  110. playText : 'Play', //String: Set the text for the "play" pausePlay item
  111. // Special properties
  112. controlsContainer : "", //{UPDATED} Selector: USE CLASS SELECTOR. Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be ".flexslider-container". Property is ignored if given element is not found.
  113. manualControls : "", //Selector: Declare custom control navigation. Examples would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
  114. sync : "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
  115. asNavFor : "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
  116. });
  117. });