$(function(){

  if(match = document.location.pathname.match(/\/([A-z]{2})\//)){
	language = match[1];
	$.cookie('language', language, {expires: 365, path: '/'});
  }

  if(((document.location.pathname == '/') || (document.location.pathname == '/index.html')) && ($.cookie('language'))){
	$('body').text('').attr('id', '');
	document.location.href = '/' + $.cookie('language') + '/index.html';
  }
});


