$(document).ready(function() {

	// a-img problem
	$('.content a > img').parent().addClass('linkedImage');


	
	
	resizeTheMotherFucker = function()
	{
		// equal height columns

		var height_left = $('#left-col').height();
		var height_right = $('#right-col').height();

		var height_max = Math.max(height_left, height_right);

		$('#left-col').css({height:(height_max)+"px"});
		$('#right-col').css({height:(height_max)+"px"});
	}
	
	
	setTimeout("resizeTheMotherFucker()", 2000);
	
	
	// $('.orbit-bullets').css({left:(465-width)+"px"});
	

	// p-img problem
	$('.content p img').each(function(i)
	{
		// get parent (p)
		var parent = $(this).parents('p').get(0);

		// copy of parent
		parentCopy = parent.clone();

		// get all images inside parent
		parentCopy.find('img').each(function()
		{
			if($(this).hasClass('alignLeft') || $(this).hasClass('alignRight'))
			{
				if($(this).parent('a').length) $(this).parent('a').remove();
				else $(this).remove();
			}
		});

		// no more content left = only images so we'll add a class to the container
		if(!parentCopy.html().replace(/\s*/g, '')) parent.addClass('floatedImage');
	});

});
