// JavaScript Document
var ideal = 1 / 1.4;

function setBottom(theid) {
	var theAspect = $(window).height() / $(window).width();
	if ( theAspect > ideal ) {
		backgroundBottom = Math.round( $(window).height() - $(window).width() * ideal )
		$('#'+theid).css( 'bottom', backgroundBottom + 40  );
	} else if ( theAspect < ideal ) {
		$('#'+theid).css( 'bottom',  40 );
	}
}

function setTeam(theid) {
	var theAspect = $(window).height() / $(window).width();
	if ( theAspect > ideal ) {
		theBottom = Math.round( $(window).width() * ideal );
		backgroundBottom = Math.round( $(window).height() - $(window).width() * ideal )
	} else if ( theAspect < ideal ) {
		theBottom = $(window).height();
		backgroundBottom = 0;
	}
	
	oneEighth = Math.round(theBottom /8 );
	finalBottom = backgroundBottom + oneEighth;
	
	$('#'+theid).css( 'bottom', finalBottom );
	
}

function setname() {
	
	var pos = $('#theteam').position();
	
	$('.name').css( 'bottom', pos.top + 20 );
	
}


function setProp(theid) {
	var theAspect = $(window).height() / $(window).width();
	if ( theAspect > ideal ) {
		theBottom = Math.round( $(window).width() * ideal );
		backgroundBottom = Math.round( $(window).height() - $(window).width() * ideal )
	} else if ( theAspect < ideal ) {
		theBottom = $(window).height();
		backgroundBottom = 0;
	}
	
	oneTenth = Math.round(theBottom /18 );
	finalBottom = backgroundBottom + oneTenth;
	
	$('#'+theid).css( 'bottom', finalBottom );
	
}

function set40(theid) {
	var theAspect = $(window).height() / $(window).width();
	if ( theAspect > ideal ) {
		theBottom = Math.round( $(window).width() * ideal );
		backgroundBottom = Math.round( $(window).height() - $(window).width() * ideal )
	} else if ( theAspect < ideal ) {
		theBottom = $(window).height();
		backgroundBottom = 0;
	}
	
	onefifth = Math.round(theBottom /5 );
	finalTop = theBottom - (onefifth * 3);
	
	$('#'+theid).css( 'top', finalTop );
	
}

function setMap(theid) {
	
	$('#'+theid).css( 'top', parseInt($('#flyoutanchor').css('top'), 10) + $('#flyoutanchor').height() + 20 );
	
}

