function menuHeight() {
	if ($('#content').height()>$('#menu').height()) {
		$('#menu').css({
			'height' : $('#content').height() + 11
		});
	}		
}
$(document).ready(function(){

	
	$('.price').append(' Ft');
	/* multipe cycle instances setup */
	function cycleGallery(pl) {
		setTimeout(function(){
			var allInstances = $('#content').find('.gallery');
			if (allInstances.length > 0) {
				for (var i = 1; i<=allInstances.length; i++) {
					var uniqueName = allInstances.eq(i-1).attr('name');
					var firstCaption = $(".gallery[name*='"+ uniqueName +"'] .cycle"+pl).find('img').eq(0).attr('alt');
					$(".gallery[name*='"+ uniqueName +"'] .cycle"+pl+" .label"+pl).html(firstCaption);
					$(".gallery[name*='"+ uniqueName +"'] .cycle"+pl).cycle({ 
						fx: 'fade', 
						next: $(".gallery[name*='"+ uniqueName +"']").find('.next'), 
						prev: $(".gallery[name*='"+ uniqueName +"']").find('.prev'),
						slideExpr: 'img',
						before: function(){
							$(this).parent().find('.label').animate({
								bottom:-50
							}, 'swing');
						},
						after: function(curr, next, opts){
							// console.log($(this).attr('alt'));
							var caption = $(this).parent().find('img').eq(opts.currSlide).attr('alt');
							if (caption) {
								$(this).parent().find('.label').html(caption);
								$(this).parent().find('.label').css({
									'visibility':'visible'
								}).animate({
									bottom: 0
								}, 'swing');
							}
						}
					});
					
				}
			}		
		}, 3000);
		
	}
	menuHeight();
//	cycleGallery('');
//	cycleGallery('Large');
	$("[rel*='prettyPhoto']").prettyPhoto();
	createDatePicker();	
});
