$(document).ready(function() {
	resizeSidebar();
	resizeVideo();
	$(this).everyTime(5, 'resizeTimer', function() {
		resizeSidebar();
		resizeVideo();
		if($(window).width() > 1600) {
			
		}
		if($(window).width() < 960) {
		
		}
	});
});

function resizeSidebar() {
	$('#sidebar').height($('#introduction').height());
	$('#about hr').height($('#hero').height());
	
	/*var newHeight = ($('#introduction').width() * 0.5625);
	if(newHeight%22 > 0) {
		newHeight = newHeight + (22 - ($('#introduction object').height() %22));
	}*/
	//$('#introduction object').height( ($('#introduction').width() * 0.5625));
}

function resizeVideo() {
	var objects = $('object, embed');	
	var width = $('#recent').width();
	
	objects.each(function(i) {
		$(this).attr('width',width);
		$(this).attr('height',(width * 0.5625));
	});
	//objects.attr('width',$('.article').width());
	//objects.attr('height',(objects.height() * objRatio));
	
	//$('.article object').height(($('.article').width() * 0.5625) + (22 - $('.article object').height() % 22));
	//console.log($('.article object').width());
}