

var BertaHomePage = new Class({
	
	shoppingCart: null,
	reservation: null,
	pageScroller: null,
	
	initialize: function() {
		window.addEvent('domready', this.onDOMReady.bind(this));
		
		BertaGallery.implement({
			layout_update: function() {
				if(this.type == 'row') {
					var totalHeight = 0, maxWidth = 0, itmSize;
					this.imageContainer.getChildren('.xGalleryItem').each(function(item) {
						itmSize = item.getSize();
						totalHeight += itmSize.y;
						if(itmSize.x > maxWidth) maxWidth = itmSize.x;
					});
					this.imageContainer.setStyle('height', totalHeight + 'px');
					this.imageContainer.setStyle('width', maxWidth + 'px');
				}
			}
		});
		
		
	},
	
	onDOMReady: function() {
		if(bertaGlobalOptions.environment == 'engine') {
			bertaEditor.tinyMCESettings.full = new bertaEditor.tinyMCESettings.Base({
				content_css : bertaGlobalOptions.paths.template + 'mce.css',
				theme_advanced_buttons1_add : "|,styleselect"
			});
			
		}
	},
	
	
	
	

	


	
	
});


var bertaHomePage = new BertaHomePage();