$(document).ready(function() {
if($(".H-HmainL")){$('<div class="H-imgAlt"></div>').insertBefore(".H-HmainL>ul>li>.CSL_picture>a");}


  $("ul.sf-menu").superfish({ 
            animation: {height:'show'},   // slide-down effect without fade-in 
            delay:     1200               // 1.2 second delay on mouseout 
        });
	
	
//lapozos bemutatkozas
if($("#ADlapozo").length){
		$('#ADlapozo .navlist').cycle({
			fx:'fade', 
			speedIn:  200, 
			speedOut:  200, 
			timeout: 8000,
			next: '#NextBut',
			prev: '#PrevBut',
			cleartype:  true,
			pause:  1,
			cleartypeNoBg:  true,
    		pager:  '#nav'
	});
	$('#pause').click(function() { $('#ADlapozo .navlist').cycle('pause'); return false; });
	$('#play').click(function() { $('#ADlapozo .navlist').cycle('resume'); return false; });
	$('#PlayBut').click(function() { $('#ADlapozo .navlist').cycle('resume'); return false; });
	$('#StopBut').click(function() { $('#ADlapozo .navlist').cycle('pause'); return false; });
	$('#next').click(function() { $('#ADlapozo .navlist').cycle('next'); return false; });
	$('#prev').click(function() { $('#ADlapozo .navlist').cycle('prev'); return false; });
    $('#ADlapozo').hover(
        function() { $('#controls').fadeIn(); },
        function() { $('#controls').fadeOut(); }
    );
}
if($("#ADlapozo2").length){
		$('#ADlapozo2 .navlist').cycle({
			fx:'fade', 
			speedIn:  1500, 
			speedOut:  1500, 
			timeout: 8000,
			cleartype:  true,
			pause:  1,
			cleartypeNoBg:  true,
    		pager:  '#nav2'
	});
}
	$("#imglist a").css({'display':'block','width':'160px','height':'120px','overflow':'hidden','float':'left','margin':'1px'});
	$("#imglist>a>img").css({'width':'170px','height':'auto'});
	
	
/*	if($("#imglist>a>img").height()<120){$("#imglist>a>img").delay("1000").css({'width':'240px','height':'auto'});}*/

////////////////////////////////////////////
//lapozos bemutatkozas
$(document).pngFix();

if(screen.width>1045){
$(".Wrapper") .css({'width': '1045px', 'margin-left': '-522px','min-width':'1045px','background-position':'left top','overflow':'auto','padding-left':'4px'})	
	}
});
