document.documentElement.className = 'js';

function elementsWidth () {
	var teaser = document.getElementById('teaser');
	var artwork = document.getElementById('artwork');
	
	
	if(document.body.className.indexOf('blog_layout')<0) {
			
			if(teaser) {
				teaser.style.width = Math.ceil(document.body.clientWidth/2-254) + 'px';
			}
			
			if(artwork) {
				artwork.style.width = Math.ceil(document.body.clientWidth/2-265) + 'px';
			}
	} else {
		
		if(teaser) {
			teaser.style.width = Math.ceil(document.body.clientWidth/2-128) + 'px';
		}
		
		
		if(artwork) {
			artwork.style.width = Math.ceil(document.body.clientWidth/2-231) + 'px';
		}
			
	}
	
	
}




$(document).ready(function() { 



elementsWidth();




Cufon.replace('#teaser ul a, #sidebar h2, #selected_projects h1, #comment_form .button span span', { fontFamily: 'Rotis Semi Sans Std Light', hover: true });
Cufon.replace('#teaser .title span', { fontFamily: 'Rotis Semi Sans Std Bold' });



var filteredLks = $('.blog_layout #main_menu a').filter(
	function () {
		return $(this).hasClass('selected') == false;
	}
);



if($(document.body).hasClass('blog_layout')) {
	Cufon.replace('#main_menu >li > a.selected', { fontFamily: 'Rotis Semi Sans Std Bold' });
	Cufon.replace(filteredLks, { fontFamily: 'Rotis Semi Sans Std Light', hover: true });
	Cufon.replace('#main_menu ul a', { fontFamily: 'Rotis Semi Sans Std Light', hover: true });
} else {
	Cufon.replace('#main_menu a', { fontFamily: 'Rotis Semi Sans Std Light', hover: true });
}


});



window.onresize = elementsWidth;
