$(function(){
	//load("home.php");
	init();
});

init=function(){
	$("ul.jd_menu").jdMenu();
	$(".newsitem").hover(
        function(){
			$(this).animate({"background":"#c2c2c2 url(img/sha1.png) top repeat-x","color":"white"},"normal");
        },
        function(){
			$(this).animate({"background":"","color":"#808080"},"normal");
        }
	);
	/*
	$("a.menu").hover(
        function(){
			$(this).animate({"borderBottom":"5px solid #555555","color":"#555555"},"normal");
        },
        function(){
			$(this).animate({"borderBottom":"0px solid #555555","color":"#000000"},"normal");
        }
	);
	*/
	$(".thumbsp").fadeTo("fast", 0.5);
	$(".thumbsp").hover(
		function(){
			$(this).fadeTo("fast", 1);
		},
		function(){
			$(this).fadeTo("slow", 0.5);
		}
	);
	$.ImageBox.init({
		loaderSRC: 'js/interface/loading.gif',
		closeHTML: '<img src="js/interface/close.jpg" />'
	});
}

var lastpage;
load=function(url, obj){
	lastpage=obj;
	if(!obj){obj="content"};
	if($("#"+obj).html()==""){
		$("#"+obj).hide().load(url, function(){
			$("#"+obj).fadeIn("normal");
			init();
		});
	}else{
		$("#"+obj).fadeOut("normal", function(){
			$("#"+obj).html('').load(url, function(){
				$("#"+obj).fadeIn("normal");
				init();
			});
		});
	}
}
