$(document).ready(function(){
	$(".platforms > a").click(function() {
		t = $(this);
		p = t.parent();
		if (t.attr("innerHTML") != "close[x]")
		{
				t.attr("innerHTML","close[x]");
		}
		else
		{
				t.attr("innerHTML","read more");
		}
		p.children(":last-child").slideToggle("normal");
		return false;
	});
	
	// bottom blocks with country info
	
	//init
	$("#canada").css('background','url(../images/canada_a.gif) no-repeat 0% 0%');
	$("#usa").css('background','url(../images/usa.gif) no-repeat 0% 0%');
	$("#inff_1").css("display","block");
	$("#inff_2").css("display","none");
	
	$("#country_bg > a").click(function(){
		if( $("#inff_1").css("display") == "none")
		{
			$("#canada").css('background','url(../images/canada_a.gif) no-repeat 0% 0%');
			$("#usa").css('background','url(../images/usa.gif) no-repeat 0% 0%');
			$("#inff_1").css("display","block");
			$("#inff_2").css("display","none");
		}
		else
		{
			$("#canada").css('background','url(../images/canada.gif) no-repeat 0% 0%');
			$("#usa").css('background','url(../images/usa_a.gif) no-repeat 0% 0%');
			$("#inff_1").css("display","none");
			$("#inff_2").css("display","block");
		}
		return false;
	});

	$("#canada").hover(function(){
		if( $("#inff_1").css("display") == "none")
		{
			$("#canada").css('background','url(../images/canada_a.gif) no-repeat 0% 0%');
		}
	},function(){
		if( $("#inff_1").css("display") == "none")
		{
			$("#canada").css('background','url(../images/canada.gif) no-repeat 0% 0%');
		}
	});

	$("#usa").hover(function(){
		if( $("#inff_2").css("display") == "none")
		{
			$("#usa").css('background','url(../images/usa_a.gif) no-repeat 0% 0%');
		}
	},function(){
		if( $("#inff_2").css("display") == "none")
		{
			$("#usa").css('background','url(../images/usa.gif) no-repeat 0% 0%');
		}
	});
});