$(document).ready(function() {
	$("#"+ $("body").attr('id') +"_m a").addClass('active');
	
	$(".partner_box").hover(function(){
		$(this).children(".partner_img").stop().animate({opacity: 0.2});
		$(this).children(".text_wrapper").stop().animate({
			'margin-top' : 10
		});
	}, function() {
		$(this).children(".partner_img").stop().animate({opacity: 1.0});
		$(this).children(".text_wrapper").stop().animate({
			'margin-top' : 150
		});
	});
	
	$(".twofouroneeight:not(.noanim), .foureightthreesix:not(.noanim), .threetwotwozero:not(.noanim)").hover(function(){
		$(this).children(".acc_img,").stop().animate({opacity: 0.2});
		$(this).children(".text_wrapper").children(".acc_title, .acc_title_b").children("img").stop().animate({opacity: 0.0});
		$(this).children(".text_wrapper").stop().animate({
			'bottom' : $(this).height()-$(this).children(".text_wrapper").height()-30
		});
		if($(this).children(".text_wrapper").children().hasClass("acc_title_b")) {
			$(this).children(".text_wrapper").children(".acc_title_b").css('color', 'white');
			$(this).children(".text_wrapper").children(".acc_title_b").children().css('color', 'white');
			Cufon.refresh();
		}
	}, function() {
		$(this).children(".acc_img").stop().animate({opacity: 1.0});
		$(this).children(".text_wrapper").stop().animate({
			'bottom' : -70
		});
		$(this).children(".text_wrapper").children(".acc_title, .acc_title_b").children("img").stop().animate({opacity: 1.0});
		if($(this).children(".text_wrapper").children().hasClass("acc_title_b")) {
			$(this).children(".text_wrapper").children(".acc_title_b").css('color', 'black');
			$(this).children(".text_wrapper").children(".acc_title_b").children().css('color', 'black');
			Cufon.refresh();
		}
	});
});

function showNews(url) {
	$("#ajaxnews").html("");
	$("#overlay").fadeIn();
	$("#ajaxnews").load(url, {ajax: 1});
	$(".newsclose").click(function(){
		$("#overlay").fadeOut();
	});
}
