		$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true,
				continuous: true 
			});
			$("#slider").css("height","448px");
			$('.csoport_1').jwSlider({
				transition : 'slide'
			})
			$('.csoport_2').jwSlider2({
				transition : 'slide'
			})
			$("#datum").datepicker({
				showOn: 'both',
				minDate: 0,
				maxDate: "+52W +8D",
				showAnim: "show",
				hideIfNoPrevNext: true,
				buttonImage: "kepek/icon.png",
				buttonImageOnly: false,
				dateFormat: 'yy-mm-dd'
			});
			$(".quantityMinus").live("click", function() {
				var qInput = $(this).parents(".quantityInput");
				var qText = qInput.find(".quantityText");
				var qValue = parseInt((qText.val())? qText.val() : 0);
				qText.val(Math.max(qValue - 1, (qInput.attr("min"))? qInput.attr("min") : 1));
			});
			$(".Minus_tobbi").live("click", function() {
				var qInput = $(this).parents(".quantityInput");
				var qText = qInput.find(".quantityText");
				var qValue = parseInt((qText.val())? qText.val() : 0);
				qText.val(Math.max(qValue - 1, (qInput.attr("min"))? qInput.attr("min") : 0));
			});
			$(".quantityPlus").live("click", function() {
				var qInput = $(this).parents(".quantityInput");
				var qText = qInput.find(".quantityText");
				var qValue = parseInt((qText.val())? qText.val() : 0);
				qText.val(Math.min(qValue + 1, (qInput.attr("max"))? qInput.attr("max") : 0xffff));
			});
			$("a[rel=kepek]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Képek ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
			$("a.kepek_old").fancybox();
				/* set variables locally for increased performance */
	var scroll_timer;
	var displayed = false;
	var $message = $('#message a');
	var $window = $(window);
	/*var top = $(document.body).children(0).position().top;*/
	var top = 550;
 
	/* react to scroll event on window */
	$window.scroll(function () {
		window.clearTimeout(scroll_timer);
		scroll_timer = window.setTimeout(function () { // use a timer for performance
			if($window.scrollTop() <= top) // hide if at the top of the page
			{
				displayed = false;
				$message.fadeOut(500);
			}
			else if(displayed == false) // show if scrolling down
			{
				displayed = true;
				$message.stop(true, true).show().click(function () { $message.fadeOut(500); });
			}
		}, 100);
	});
		});
