// JavaScript Document

function resize(){
	//$('.flowBackground').bgFlow({image:'images/background.jpg'});
	var w=$(window).width();
	var h=$(window).height();
	var d=0;
	if((w-h)>0){
		d=h;
		$('#img_background').css('height','');
		$('#img_background').css('width',w+'px');
	}
	else{
		d=w;
		$('#img_background').css('width','');
		$('#img_background').css('height',h+'px');
	}
	var margin=(d/100)*5;
	d=d-margin;
	$('.console').css('width',d);
	$('.console').css('height',d);
	$('.console').css('margin-top',((h-d)/2)+'px');
	$('.console').css('margin-left',((w-d)/2)+'px');
}

function start(){		
	var w=$(window).width();
	var h=$(window).height();
	
	var d=0;
	if((w-h)>0){
		d=h;
		$('#img_background').css('width',w+'px');
	}
	else{
		d=w;
		$('#img_background').css('height',h+'px');
	}
	var margin=(d/100)*5;
	d=d-margin;
	$('#movieFrame').attr('width',d);
	$('#movieFrame').attr('height',d/1.778);
	$('.console').css('width',d);
	$('.console').css('height',d);
	$('.console').css('margin-top',((h-d)/2)+'px');
	$('.console').css('margin-left',((w-d)/2)+'px');
	$('.btn_bubble').not('.hover').fadeTo('fast',0.5);
	
	$('.btn_bubble').bind('mouseover',function() {		
		$(this).fadeTo('fast',1);
	});
	$('.btn_bubble').bind('mouseout',function() {
		$(this).fadeTo('fast',0.8);
	});
}
