  
  var firsttime=0;
  
    $(document).ready(function() {
    
    
$('.nav img') 
    .livequery(function(){ 
        $(this) 
            .hover(function() { 
                $(this).addClass('hover'); 
                $(this).fadeTo("fast", 1.0); 
            }, function() { 
                $(this).removeClass('hover'); 
                $(this).fadeTo("fast", 0.6);
            }); 
    }, function() { 
        $(this) 
            .unbind('mouseover') 
            .unbind('mouseout'); 
    });




        $(".links").click(function(){
        
        $(".links").css('color', '#808285');
        $(this).css('color', 'black');
        });
        
        
        $(".links2").click(function(){
        
        $(".links").css('color', '#808285');
        
        });
        
        
        $("#home").click(function(){
       
      	
        
       
        });
       
    
    $("#ssp-prev").click(function(){
 		
 		
 		sspPreviousImage();
 		return false;
 		
 		});
 		
 		$("#ssp-next").click(function(){
 		
 		
 		sspNextImage();
 		return false;
 		});
 		
 		
 		
 		
 		
 		
		$(".circle0").hover(
			function()
			{
				this.src = this.src.replace("_off","_on");
			},
			function()
			{
				this.src = this.src.replace("_on","_off");
			}
		)
	
	
	$(".circleimgx").hide();
	


	jQuery(".circle").children("img").hide();
	

	
	$(".circle").hover(
			function()
			{
			
			if($.browser.msie){
     jQuery(this).children("img").show();
   }else{
      jQuery(this).children("img").fadeIn();
   }


				
			},
			function()
			{
				
				if($.browser.msie){
     jQuery(this).children("img").hide();
   }else{
      jQuery(this).children("img").fadeOut();
   }



				
			}
		)
		
		
		
        
        
        
     	$(".circle").click(function(){
     	
     	
       path='flash/'+this.id+'.txt';
    	sspid=this.id;
      
       if (firsttime==0){
       
  
       firstrun(path, sspid);
         return false;
        
       }
       else {  fout(path, sspid);
         return false;
        
      }
       
       
        });
        
      
        
       });
    
    
    
      function firstrun(path) 
  { firsttime=1;
    $("#flashcontainer").animate({height: "440px"}, 1000, function(){
    $.ajax({ 
type:"GET", 
url:path,
cache: false, 
success: callback,
complete: fin
}); 
    }
    ) 
  }
  










function fadein() {
$('#flashcontent').fadeIn(1000);
}

function fadeout() {
$('#flashcontent').fadeOut(1000);

}




 
  function callback(data, status) 
  { 
    $("#leftbar").html(data); 
  } 
  
  
   function fout(path, sspid) 
  { 
    $("#leftbar").fadeOut(400, function(){
    $.ajax({ 
type:"GET", 
url:path,
cache: false, 
success: callback,
complete: fin
}); 
    }
    ) 
  }
  
   function fin() 
  { 
  
  sspLoadAlbum(sspid);
    $("#leftbar").fadeIn(400);
    
      
        
  }






function sspNextImage() {
    thisMovie("ssp").sspNextImage();
      return false;
        
}

function sspPreviousImage() {
    thisMovie("ssp").sspPreviousImage();
      return false;
        
}



/*
Passes the ID of the album from the XML file
we want SlideShowPro inside the SWF to load
*/
function sspLoadAlbum(album) {
    thisMovie("ssp").sspLoadAlbum(album);
}

function thisMovie(movieName) {
   return swfobject.getObjectById(movieName);
}

  
