Paste the following before </style>
.flContainer { top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 998; position: fixed; top: expression( document.getElementsByTagName( 'body' )[0].scrollTop + "px" ); pointer-events: none; } .fl { width: 5000px; height: 5000px; position: absolute; overflow: hidden; z-index: 999; visibility = "visible"; } .flspot { background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 350, color-stop(25%, rgba(0, 0, 0, 0)), color-stop(100%, #000000)); background-image: -webkit-radial-gradient(center center, closest-side circle, rgba(0, 0, 0, 0) 25%, #000000 100%); background: radial-gradient(closest-side circle at center center, rgba(0,0,0,0) 0%,rgba(0,0,0,0.01) 25%,rgba(0,0,0,1) 100%); background-image: -moz-radial-gradient(center center, closest-side circle, rgba(0, 0, 0, 0) 25%, #000000 100%); background-image: -ms-radial-gradient(center center, closest-side circle, rgba(0, 0, 0, 0) 25%, #000000 100%); background-image: -o-radial-gradient(center center, closest-side circle, rgba(0, 0, 0, 0) 25%, #000000 100%); width: 900px; height: 900px; position: absolute; overflow: hidden; z-index: 999; visibility = "visible"; } #lightswitch { z-index:1001; position:fixed; top:15px; left:15px; padding:5px 5px 2px; background: black; } #lightswitch a:link { color: yellow; }
Paste the following before </head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type='text/javascript'> $(document).ready(function() { $(".flContainer").css({ display: 'block' }); $("#fl").css({ top: ($(window).height()/2 - 2500) + "px", left: ($(window).width()/2 - 2500) + "px" }); $(document).mousemove(function(e){ $("#fl").css({ top: (e.pageY - $(window).scrollTop() - 2500) + "px", left: (e.pageX - 2500) + "px" }); }); // fallback for IE $("#fl").click(function (event) { $(this).toggle(); var link = document.elementFromPoint(event.clientX, event.clientY); // IE & FF $(this).toggle(); if (link.tagName.toLowerCase() == 'a') { window.location.href = link.href; } $(link).trigger('click'); }); if ( getCookie("flashlight") != "on" ) ToggleLights(); }); function getCookie(name) { var parts = document.cookie.split(name + "="); if (parts.length == 2) return parts.pop().split(";").shift(); } function ToggleLights() { var fldiv = document.getElementById('fl'); if (fldiv.style.display !== 'none') { //Turn flashlight off document.cookie = 'flashlight=off; path=/' fldiv.style.display = 'none'; } else { //Turn flashlight on document.cookie = 'flashlight=on; path=/' fldiv.style.display = 'block'; } } </script>
Paste the following before </body>
<div class="flContainer"> <div class="fl" id="fl"> <div style="position:absolute; background: black; top:0px; left:0px; width:5000px; height:2050px; overflow:hidden;"></div> <div style="position:absolute; background: black; top:2050px; left:0px; width:2050px; height:900px; overflow:hidden;"></div> <div class="flspot" style="position:absolute; top:2050px; left:2050px; width:900px; height:900px; overflow:hidden;"></div> <div style="position:absolute; background: black; top:2050px; left:2950px; width:2050px; height:900px; overflow:hidden;"></div> <div style="position:absolute; background: black; top:2950px; left:0px; width:5000px; height:2050px; overflow:hidden;"></div> </div> </div> <div id="lightswitch"> <a href="javascript:void(0);" onclick="ToggleLights();" target="_self" >LIGHTS</a> </div>
More advanced stuff you can do: