$(document).ready(function() {
	setInterval( "slideShow()", 5000 );
	$("#header #logo").ifixpng();
	$("#footer #box2 img");
	$("#bg_submenu").css("opacity", "0.6");
	$("#menu span").click(function() {
		if ( $(this).siblings().length > 0 ) {
			$obj = $(this);
			$(".submenu").animate({marginTop: "0px"}, 300)
			$(this).siblings(".submenu").animate({marginTop: "-24px"}, 300);
			$("#bg_submenu").animate({marginTop: "0px"}, 300)
			.animate({marginTop: "-24px"}, 300);
		}
		else {
			$(".submenu").animate({marginTop: "0px"}, 300);
			$("#bg_submenu").animate({marginTop: "0px"}, 300);
		}
	});
	$("#footer #box2 a").hover(function() {
		$(this).stop().find(".normal").fadeOut(500);
		$(this).stop().find(".hover").fadeIn(500);},
		function(){
		$(this).stop().find(".normal").fadeIn(500);
		$(this).stop().find(".hover").fadeOut(500);
	});
});

function slideShow() {
	var $active = $('#slideshow img.active');
	if ( $active.length == 0 ) $active = $('#slideshow img:last');
	var $next =  $active.next('img').length ? $active.next('img') : $('#slideshow img:first');
	$next.addClass('active');
	$active.fadeOut(1000);
	$next.fadeIn(1000);
	$active.removeClass('active');
}