$(document).ready(function(){
	$('#l_switch img').click(function() {
		var	lang = 1;
		if($(this).attr("alt") == '1') lang = 2;
		else lang = 1;
		$(this).load('/lang.php?lang='+lang);
		return false;
	});
	
	$("#blogin").focus();

	$("#menu li").click(function(){
		window.location=$(this).find("a").attr("href");
		return false;
	});
	$("#menu-en li").click(function(){
		window.location=$(this).find("a").attr("href");
		return false;
	});
	
	$("#blogout").click(function(){
		$.ajax({ url: "business.php?logout=yes", context: document.body, success: function(){
			window.location="business.php";
		}});
	});
	
	$("#applist div").hover(function() {
		if($(this).attr("id") == "") {
			$(this).attr({ style : 'background:url(\'../i/appbutt.png\') center center no-repeat; width:120px; height:102px;' });
			$(this).find("img").attr({ style : 'position:relative; top:5px; width:85px; height:88px;' });
		}
    }, function() {
		if($(this).attr("id") == "") {
			$(this).attr({ style : 'background:url(\'../i/appbutti.png\') center center no-repeat; width:120px; height:102px;' });
			$(this).find("img").attr({ style : 'position:relative; top:13px; width:71px; height:74px;' });
		}
    });
});

function popup(url) {
	newWindow = window.open(url,'name','height=465,width=720');
	if (window.focus) {
		newWindow.focus();
	}
	return false;
}
