String.prototype.trim = function() { 
	//return this.replace(/^\s+|\s+$/g, ''); 
	return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '')
}
$(document).ready(function() {
	setupZoom();
	
	$('.photos > div:even').addClass('even'); 
	
	$('a.popup').click(function(e) {
		e.preventDefault();
		window.open($(this).attr('href'), 'popup', '');
	});
	
	// Removing empty paragraphs in beginning of document
	$('#main_content .inner_inner p').each(function() {
		var str = $(this).html().trim();
		if(str == '&nbsp;' || str.length < 2) {
			$(this).remove();
		} else {
			return false;
		}
		
	});
});
