		//-------------------------------------------------------------------------//
		//-This script was written by Zoltan Hosszu (http://www.zoltanhosszu.com/)-//
		//-------------------------------------------------------------------------//
		
		$(document).ready(function() {

			var index = 0;
			var indit;
			var tarolo = $('div.scroll ul.house');
			var next = index + 1;
			var prev = $(tarolo).children().size() - 1;
			var valtido = 8000;
			var animido;
			
			function Kepvalt(index) {
				clearInterval(indit);
				
				if (index >= $(tarolo).children().size()) {
					index = 0;
					next = index + 1;
					prev = $(tarolo).children().size() - 1;
				} else {
					if (index < 0) { index = $(tarolo).children().size() - 1; }
					prev = index - 1;
					next = index + 1;
				}
				
				
				var pos = index * 762;
				var maxpos = $(tarolo).children().size() * 762;
				
				if (pos < maxpos) { pos = (index * -762); animido = 1500; } else { pos = 0;  animido = 2000;}
				
				$(tarolo).fadeOut('normal', function() {$(this).css({'left' : pos})});
				$(tarolo).fadeIn('normal');
				
				indit = setInterval(function() { Kepvalt(next); }, valtido);
				
				$('ul.scroll li a').removeClass('aktualis');
				var link = index + 1;
				$('ul.scroll li a#w' + link).attr('class', 'aktualis');
				
			}
			
			indit = setInterval(function() { Kepvalt(next); }, valtido);
			
			$(tarolo).mouseover(function() { clearInterval(indit); }).mouseout(function() { indit = setInterval(function() { Kepvalt(next); }, 3000); });
			
			$('a#next').click(function () {
				clearInterval(indit);
				Kepvalt(next);
			});
			
			$('a#prev').click(function () {
				clearInterval(indit);
				Kepvalt(prev);
			});
			
			$('ul.scroll li a').click(function() {
				var href = $(this).attr("href").replace(/#work/g, '');
				href--;
				Kepvalt(href);
			});
			
			$('h2.toggle').click(function() {
				var id = 'ul.' + $(this).attr('id');
				if ($(id).css('display') != 'block') {
					$('ul.munkak').hide('slow');
					$(id).toggle('slow');
				}
			});
			
			var myFile = document.location.toString();
			if (myFile.match('#')) {
			  var myAnchor = '#' + myFile.split('#')[1];
			  $('h2 a[href="' + myAnchor + '"]').click();
			}

			
		});

