$(document).ready(function(){

	$('#content').autoflow();
	
	$('.audio-info').tooltip({ 
    	effect: 'toggle',
    	position: ['center', 'left'],
    	offset:	[17, 26],
    	delay: 100,
    	opacity: 1 
	});
	
	replaceHeaderImage();
});

$(window).resize(function() {

	replaceHeaderImage();
	
	$('#content').autoflow(); 
	
}); 

function replaceHeaderImage() {
	var pageWidth = $(window).width();
	if (pageWidth >= 1652) {
		$('#header-img').attr('src', baseUrl + '/img/header-5.jpg');
	} else if (pageWidth < 1652 && pageWidth >= 1324) {
		$('#header-img').attr('src', baseUrl + '/img/header-4.jpg');
	} else if (pageWidth < 1324 && pageWidth >= 996) {
		$('#header-img').attr('src', baseUrl + '/img/header-3.jpg');
	} else if (pageWidth < 996 && pageWidth >= 668) {
		$('#header-img').attr('src', baseUrl + '/img/header-2.jpg');
	} else {
		$('#header-img').attr('src', baseUrl + '/img/header-1.jpg');
	}
}