		$(document).ready(function() {
			$("#menu li:has(a)").hover(function() {
				$(this).stop().animate({backgroundColor: "#801548"}, 500);
        $('.submenu', $(this)).show();
			}, 
			function() {
				$(this).stop().css({background: "none"});
        $('.submenu', $(this)).hide();
			})	
						
			$('.reference-slider a').click(function() {
				ndx = $(this).index();
				$('.reference-image img').hide();
				$('.reference-image img').eq(ndx).show();				
			})

      $('#search-submit-button').live('click', function() {
        $('#search-submit').click();
      })

      $('#s').live('focus', function() {
        $(this).val('');
      })
		})

    $('#image-search-select').click(function() {
      $('.image-search-field').toggleClass('open');
      $('#image-tags').toggle();
      return false;
    })
     
    $(window).load(function() {
				imgtitles = new Array('Lakberendezés','Belsőépítészet','Lakberendezés felsőfokon','Tervezés - kivitelezés');
				step = 1;
        $('#slider').nivoSlider({
					beforeChange: function(){
						$('.stepper-inner').text(imgtitles[step])
						step++;
					},
					lastSlide: function(){
						step = 0;
					}
				});
    });
		Cufon.replace('h1');
		Cufon.replace('.blck h2')
