document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. var idleTime = 0;
  2. var standby = false;
  3.  
  4. function CheckInactivity() {
  5.     idleTime += 10;
  6.     if (idleTime > 60) {
  7.         InitializeStandBy();
  8.     }
  9. }
  10. function InitializeStandBy() {
  11.     if (!standby) {
  12.         var h = 0;
  13.         h = jQuery(window).height();
  14.         jQuery("#energysaving").show().css({
  15.             height: "0",
  16.             width: "0",
  17.             left: "50%",
  18.             top: "50%"
  19.         }).animate({
  20.             width: "100%",
  21.             height: h,
  22.             left: "0",
  23.             top: "0",
  24.             opacity: "1"
  25.         }, 1000);
  26.         standby = true;
  27.     }
  28. }
  29. function StopStandBy() {
  30.     if (standby) {
  31.         jQuery("#energysaving").animate({
  32.             width: "0",
  33.             height: "0",
  34.             opacity: "0",
  35.             left: "50%",
  36.             top: "50%"
  37.         }, 500);
  38.         setTimeout(\'jQuery("#energysaving").hide();\', 800);
  39.         standby = false;
  40.     }
  41. }
  42. document.write(\'<link rel="stylesheet" href="http://www.onlineleaf.com/savetheenvironment.css" type="text/css">\');
  43. if (typeof (jQuery) == "undefined") {
  44.     document.write(\'<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>\');
  45. }
  46. function InitJQuery() {
  47.     if (typeof (jQuery) == "undefined") {
  48.         setTimeout("InitJQuery();", 50);
  49.     } else {
  50.         jQuery(function () {
  51.             jQuery(document).ready(function () {
  52.                 setInterval("CheckInactivity();", 10000);
  53.                 jQuery(this).mousemove(function (e) {
  54.                     idleTime = 0;
  55.                     StopStandBy();
  56.                 });
  57.                 jQuery(document).keypress(function (e) {
  58.                     idleTime = 0;
  59.                     StopStandBy();
  60.                 });
  61.                 jQuery("body").append(\'<div id="energysaving"><p>Energy saving mode<br /><span>Move your mouse to go back to the page.</span></p><div id="copyrightOnlineLeaf">Follow <font style="color: #666666; size: 14px;">twitter.com/OnlineLeaf</font><br />Copyright 2011 <font style="color: #666666;">OnlineLeaf.com</font> - All rights reserved</div></div>\');
  62.                 jQuery("#energysaving").hide();
  63.             });
  64.         });
  65.     }
  66. }
  67. InitJQuery();
  68.  
');