$(function() {

    $("ul#menu li a").click(function() {
         var className = $(this).attr('class');
        // Figure out current list via CSS class
        var curList = $("ul#menu li a.over").attr("rel");
        
        // List moving to
        var $newList = $(this);
        
        // Set outer wrapper height to height of current inner list
        var curListHeight = $("#left_content").height();
        $("#left_content").height(curListHeight);
        
        // Remove highlighting - Add to just-clicked tab
        $("ul#menu li a").removeClass("over");
        $(this).addClass("over");
	   
        
        // Figure out ID of new list
        var listID = $newList.attr("rel");
        
        if (listID != curList) {
            
            // Fade out current list
            $("#"+curList).fadeOut(300, function() {
                
                // Fade in new list on callback
                $("#"+listID).fadeIn();
                
                // Adjust outer wrapper to fit new list snuggly
                var newHeight = $("#"+listID).height();
                $("#left_content").animate({
                 
                });
            
            });
            
        }        
        
        // Don't behave like a regular link
        return false;
    });

});


$(function() {
		// set opacity to nill on page load
		$("ul#menu span").css("opacity","0");
		// on mouse over
		$("ul#menu span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, 300);
		},
		// on mouse out
		function () {
			// animate opacity to nill
			$(this).stop().animate({
				opacity: 0
			}, 'slow');
		});
	});


		$(document).ready(function() {
			$(".gallery_popup a").fancybox();
			
			
			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'fade',
				'transitionOut'		: 'fade'
			});
		});

// replaces target="_blank"
$(function() {
    $('a[href^=http]').click( function() {
        window.open(this.href);
        return false;
    });
	
	$("#press_pics a").click( function() {
        window.open(this.href);
        return false;
    });
});

