﻿// JScript File
var isIE6;
var splat="<div class='splat'></div>";
$(document).ready(function(){
    
   
    $('a').hover(function(e){
   
        if (Math.round(Math.random()*18) == 1){ 
        
         var soundIndex=Math.round(Math.random()*3) + 1;
    
    soundFlash = $.flash.create(   {   swf: '/video/player_mp3_mini.swf', flashvars: { mp3 : '/sounds/' + soundIndex + '.mp3', autoplay: '1', bgcolor : 'FEFBF2', loadingcolor : 'cccccc', buttoncolor : 'cccccc' }, height: 1,   width: 1, hasVersion: 9 } );
   
    $('#footernav').prepend(soundFlash);
    }
    
    });
    
     if (Math.round(Math.random()*20) == 1){
         $("#overlay").css('visibility','visible');     
    }  

    $().mousemove(function(e){
      if(!isIE6){  
      var backx = e.pageX-1000;
      var backy = e.pageY-1000;
      var backpos = backx+'px '+backy+'px';
        $("#overlay").css('background-position',backpos);
        }
    });
    /*
    $('a').click(function(e){
       	if(!isIE6){    	
                var toLoad = $(this).attr('href');  
                
                var relLink = $(this).attr('rel');
                
                
               // alert(relLink);
                
            	
    	        var thisSplat = $( document.createElement('div') )    	
		        thisSplat.addClass('splat');
    	        thisSplat.css('left', e.pageX-30 + 'px');    	    	    	
    	        thisSplat.css('top', e.pageY-23 + 'px');    	
		        thisSplat.css('background-image', 'url(/graphics/fx/splat' +Math.round(Math.random()*3)+'.png)');		
		        $("body").prepend(thisSplat);
    	       thisSplat.animate({opacity:0}, {duration:500, complete:function(){
    	            if (toLoad!="#"){
    	                if (relLink.indexOf('box')==-1){
    	                    window.location = toLoad;
    	                    //alert(relLink.indexOf('box'));
    	                    };
    	                    $(this).remove();
    	                    
    	                } 
    	        }});

        	     	  
                return false;    	
    	    }    	
    	});        
    */
    $("#overlay").click(function(e){
       	$("#overlay").css('visibility','hidden');    	
    });    
    $("#logo").click(function(e){
    	if(!isIE6){    	
    	      $("#overlay").css('visibility','visible'); 
    	}   	
    });     
    $(document).pngFix(); 
    
  });

 