Advertisement
Guest User

tt

a guest
Dec 3rd, 2016
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.53 KB | None | 0 0
  1. (function pulse() {
  2.     $(".pan").delay(200).animate({'opacity': 1}).delay(200).animate({'opacity': 0.8}, pulse);
  3. })();
  4.  
  5.  
  6. (function pulse2() {
  7.     $(".pan2").delay(200).animate({'opacity': 1}).delay(200).animate({'opacity': 0.4}, pulse2);
  8. })();
  9.  
  10.  
  11. var anim = (function () {
  12.     var i = 80;
  13.     var step = 5;
  14.     var up = true;
  15.     var timer = null;
  16.  
  17.     var next = function () {
  18.         if (up) {
  19.             i += step;
  20.         }
  21.         else {
  22.             i -= step;
  23.         }
  24.         if (i < 80) {
  25.             i = 80;
  26.             up = true;
  27.         }
  28.         if (i > 180) {
  29.             i = 180;
  30.             up = false;
  31.         }
  32.         update(i);
  33.     };
  34.  
  35.     var update = function (i) {
  36.         $(".st").css("border-color", 'rgb(' + i + ',' + 0 + ',' + 0 + ')');
  37.         $(".stt").css("color", 'rgb(' + i + ',' + 0 + ',' + 0 + ')');
  38.  
  39.     };
  40.  
  41.     var go = function () {
  42.         next();
  43.         timer = window.setTimeout(anim.go, 30);
  44.     };
  45.  
  46.     var stop = function () {
  47.         if (timer) {
  48.             window.clearTimeout(timer);
  49.             timer = null;
  50.         }
  51.     };
  52.  
  53.  
  54.     return {
  55.         go: go,
  56.         stop: stop
  57.     };
  58. }());
  59.  
  60.  
  61. $(document).ready(function () {
  62.    
  63.     setTimeout(redirect, 900000);
  64.     anim.go();
  65.  
  66.     $(".iframe").fancybox({
  67.         type: 'iframe',
  68.         autoSize: false,
  69.         autoDimensions: false,
  70.         scrolling: 'no',
  71.         width: 1400,
  72.         height: 920,
  73.  
  74.     });
  75.  
  76. });
  77.  
  78.  
  79. function redirect() {
  80.     window.location.href = "http://domain.com";
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement