jQuery.preloadImages = function(){  for(var i = 0; i<arguments.length; i++){jQuery("<img>").attr("src", arguments[i]);}}

$(window).scroll(function(){ $('#arnyek').animate({top:0+$(window).scrollTop()+"px" },{queue: false, duration: 1}); });
$(window).scroll(function(){ $('#nav').animate({top:100+$(window).scrollTop()+"px" },{queue: false, duration: 350}); });
$(document).ready(function() {

if(jQuery.browser.msie){if(parseInt(jQuery.browser.version) < 7){$("#arnyek2").css('visibility', 'visible');$("#arnyek2").css('height', '2110px'); $("#arnyek2").css('opacity', '0');}}

$.preloadImages("images/munkak_2.png", "images/kontakt_2.png", "images/rolam_2.png", 'images/tovabb_2.png', 'images/elozo_2.png');

$(function(){$('#egyes').hover(function(){this.src ='images/rolam_2.png';},function(){this.src='images/rolam_1.png';});});
$(function(){$('#kettes').hover(function(){this.src='images/munkak_2.png';},function(){this.src='images/munkak_1.png';});});
$(function(){$('#harmas').hover(function(){this.src = 'images/kontakt_2.png';},function(){this.src='images/kontakt_1.png';});});

$("#jogi").click(function(){$("#jog").css('visibility','visible');});
$("#bezar").click(function(){$("#jog").fadeTo("slow", 0, function(){$(this).hide();});});

$("#slider").easySlider({ controlsBefore:'<p id="controls">', controlsAfter:'</p>',	prevId: 'prevBtn', nextId: 'nextBtn'});			
$("#slider2").easySlider({ controlsBefore:'<p id="controls2">', controlsAfter:'</p>', prevId: 'prevBtn2', nextId: 'nextBtn2' });			
$("#slider3").easySlider({controlsBefore:'<p id="controls3">', controlsAfter:'</p>', prevId: 'prevBtn3', nextId: 'nextBtn3' });	

$(function(){$('.eloz').hover(function(){this.src='images/vissza_2.png';},function(){this.src='images/vissza_1.png';});});
$(function(){$('.kovetk').hover(function(){this.src = 'images/tovabb_2.png';},function(){this.src='images/tovabb_1.png';});});

var $last = $([]);
$(window).attr({scrollTop:0,scrollLeft:0});
$.localScroll.hash({
target: $(window),
duration:2000,
axis:'y'
});
$.localScroll({
onBefore:function( e, anchor, $target ){
$last.removeClass('scrolling');
$last = $(this).addClass('scrolling');
if( this.blur )
this.blur();
},
onAfter:function( anchor ){
$last.removeClass('scrolling');
},
target: $(window),
axis:'y',
duration:2000,
hash:false
});
});


$(window).load(function(){
$("#arnyek").fadeTo("slow", 0, function(){
$(this).hide();
});});