$(document).ready(function(){
	$('#agree').click(function(){
		$('#modal').fadeOut('slow');
		$.cookie('region_selected', 1, { expires: 365, path: '/' });
	});
	$('#disagree').click(function(){
		//window.location.replace("http://www.google.com");
		$('#modal').fadeOut('slow');
		$.cookie('region_selected', 1, { expires: 365, path: '/' });
	});
	$('#reg').click(function(){
		$.cookie('region_selected', 1, { expires: 365, path: '/' });
	});
	$("#login-register").click(function() {
		$('#login-register-form form').slideToggle('slow');
		return false;
	});
	$('input.text').click(function() {
			if (this.value == this.defaultValue) {
				this.value = '';
			}
	});
	$('input.text').blur(function() {
			if (this.value == '') {
				this.value = this.defaultValue;
			}
	});
	$('#right table tr:odd').addClass('odd');
	if($.browser.msie && parseInt($.browser.version) <= 6)
	{
		var zIndexNumber = 1000;
		$('div').each(function() {
			$(this).css('zIndex', zIndexNumber);
			zIndexNumber -= 10;
		});
		$('img.login-register').attr('src','/assets/images/ie6/login-register.gif')
	}
});
$(window).load(function() {
	if(!$.cookie('region_selected'))
	{
		$('#modal').fadeIn('slow');		
	}
});
function validate(form) { if(!document.loginform.agree.checked){alert("Please read the terms and conditions and check the box below"); return false; } return true; }
