/**
 * @file main.js
 * @description Contains common code used inside this theme. 
 */
MAIN = function() {
	
	function adaptiveCSSToggle(){
		if ($(document).width() < 1021) {
			$('body').addClass('narrow');
		} else {
			$('body').removeClass('narrow');
		}
	}	
	
	$(document).ready(function(){
		adaptiveCSSToggle();
		if ($('#header div.menu ul li.current_page_item').length == 0) {
			$('#header div.menu ul li').first().addClass('current_page_item');
		}
		$(window).resize(adaptiveCSSToggle);
		$('div.entry p img').parent().addClass('image');
	});

	return {};

}();

