$(document).ready(function(){
	$(".head table td").click(function(){
		window.location.pathname = ($(this).find('a').attr('href'));
	//	alert($(this).find('a').attr('href'));
	}).css({
		cursor: 'hand'
	});
	$(".head table td").hover(
		function() {
			$(this).addClass('hover');
		},
		function() {
			$(this).removeClass('hover');
		}
	);
	$("#flash").flash({
		src: '/ind.swf',
		width: '550',
		height: '235'
	});
	$(".support tr:last td").css({
		border: 'none'
	});
	$("img.code").attr('src', '/img.php?'+Math.random()).click(function(){
		$(this).attr('src', '/img.php?'+Math.random());
	}).css({ cursor: 'hand' });
	$("#subscribe").load('/subscribe.php');
	$("#statistic").load('/user/statistic.php');
	$("#compound").load('/user/compound.php');
	$("#compound input[name='submit']").click(function(){
		
	});
	$("#invest-calc a").click(function(){
		$('#invest-calc').append('<div id="calc-window"><div id="calc-close">X&nbsp;&nbsp;</div><div id="calc" /></div>');
		$('#calc-window').css({
			position: 'absolute',
			width: '410px',
			height: '700px',
			background: '#eee',
			left: ($(window).width()-400)/2,
			top: 700
		});
		$('#calc-close').css({
			fontWeight: 'bold',
			textAlign: 'right',
			fontSize: '14px',
			color: 'black',
			mouse: 'hand',
			border: '1px solid black',
			borderBottom: 'none'
		}).click(function(){
			$('#calc-window').remove();
		});
		$('#calc').css({border: '1px solid black',textAlign: 'center', background: '#eee'}).load($(this).attr('href')).resizable().draggable();
		if ( $.browser.msie ) {
		//	recalculate();
		}
		return false;
	});
});
