Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. <script type="text/javascript">
  2. //<![CDATA[
  3.  
  4. jQuery(document).ready(function($){
  5.  
  6. $('a.lightbox').lightBox();
  7. theRotator();
  8.  
  9. $('div.rotator').fadeIn(1000);
  10. $('div.rotator ul li').fadeIn(1000); // tweek for IE
  11.  
  12. faroeReplace();
  13.  
  14. (function($) {
  15. $(function() { //on DOM ready
  16. $('#scroller').simplyScroll({
  17. speed: 5
  18. });
  19. });
  20. })(jQuery);
  21.  
  22. });
  23.  
  24. function faroeReplace() {
  25. var fhr = $('.heading_home');
  26. fhr.html(fhr.html().replace(/Faroe/ig, '<img src="/wp-content/themes/faroe/images/logo_faroe_header.png" />'));
  27. }
  28.  
  29. function theRotator() {
  30. $('div.rotator ul li').css({opacity: 0.0});
  31. $('div.rotator ul li:first').css({opacity: 1.0});
  32.  
  33. setInterval('rotate()',10000);
  34. }
  35.  
  36. function rotate() {
  37. var current = ($('div.rotator ul li.show')? $('div.rotator ul li.show') : $('div.rotator ul li:first'));
  38. if ( current.length == 0 ) current = $('div.rotator ul li:first');
  39. var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
  40.  
  41. next.css({opacity: 0.0})
  42. .addClass('show')
  43. .animate({opacity: 1.0}, 1000);
  44.  
  45. current.animate({opacity: 0.0}, 1000)
  46. .removeClass('show');
  47.  
  48. };
  49. //]]>
  50.  
  51. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement