$(document).ready(function(){

   var src = $("div.logo-image2 > a > img").attr("src");
   $("div.logo-image2").css("background-image","url('"+src+"')");
   $("div.logo-image2 > a > img").remove();
});

$(document).ready(function(){
	//$(".lol").css({'padding-bottom': '5px', 'background-position':'0px 0px', 'margin-top':'0px'})

	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	
	//Remove outline from links
	$("a").click(function(){
		$(this).blur();
	});
	
	//When mouse rolls over
	$(".rolka").mouseenter(function(){
		if ($(this).children(".submenu").html()) {
		
		
			$(this).children(".submenu").stop().animate({
				height: '0px'
			}, {
				queue: false,
				duration: 600,
				easing: 'easeOutBounce'
			})
			x = $(this).children(".submenu").css("height", "auto");
			
			y = x.height();
			
			wys = (y + 10) + 'px';
			//$(".input-wrapper").html(wys);
			
			$(this).children(".submenu").stop().animate({
				height: wys
			}, {
				queue: false,
				duration: 600,
				easing: 'easeOutBounce'
			})
			//$(this).children(".roker").stop().animate({height:'20px'},{queue:false, duration:100, easing: 'easeOutQuad'})
			$(this).children(".lol").css({
				'padding-bottom': '10px',
				'background-position': '0px 9px',
				'margin-top': '-9px'
			})
		}
		$(this).children(".submenu").css({'top': '30px'})
	});
	
	//When mouse is removed
	$(".rolka").mouseleave(function(){
		
		$(this).children(".submenu").stop().animate({height:'0px'},{queue:false, duration:600, easing: 'easeOutBounce'})
		//$(this).children(".roker").stop().animate({height:'29px'},{queue:false, duration:100, easing: 'easeOutQuad'})
		$(this).children(".lol").css({'padding-bottom': '5px', 'background-position':'0px 0px', 'margin-top':'0px'})
		$(this).children(".submenu").css({'top': '34px'})
	});
	
	/*$(".submenu > li > a").mouseenter(function(){
		//alert($(this).parent().children(".submenu2").html());
			$(this).parent().children(".submenu2").stop().show()	;
			//alert($(this).html());
			x = $(this).parent().parent(".submenu").css("height","auto");
			y = x.height();
			wys = (y + 20)+'px';
			$(this).parent().parent(".submenu").css("height",wys);
			
		
		});
	$(".submenu > li").mouseleave(function(){
			$(this).children(".submenu2").slideUp()	;
			//alert($(this).html());
			//alert($(this).parent(".subpage").html());
		
		});*/
	
});











