

$(document).ready(function(){
	
	var bkg = ($('.win.body').css('backgroundImage'));

	$('a.expand').livequery('click',function(){
                HideExpanded();
		//$('.win.body').css('backgroundImage','none');
		$(this).addClass('expanded').removeClass('expand');
		$(this).next().animate({height:'show'},'fast','linear',function(){ showWinBodyBkg(); } );
		return false;
	});
	
	$('a.expanded').livequery('click',function(){
		//$('.win.body').css('backgroundImage','none');
		$(this).addClass('expand').removeClass('expanded');
		$(this).next().animate({height:'hide'},'fast','linear',function(){ showWinBodyBkg(); } );
		return false;
	});
	
	function showWinBodyBkg(){
		//$('.win.body').css('backgroundImage',bkg);
	}

        function HideExpanded(){
            $('a.expanded').each(
                function(){
                   // $('.win.body').css('backgroundImage','none');
                    $(this).addClass('expand').removeClass('expanded');
                    $(this).next().animate({height:'hide'},'fast','linear',function(){ showWinBodyBkg(); } );
                }
            );
        }
});


