$(document).ready(function() { 

	/*
	FremhÃ¦ver billeder og reducerer transparens pÃ¥ Ã¸vrige
	*/
	$('[rel*=hoverout]').mouseenter(
		function() {
			if(swipeLoaded) {
				$(this).attr("rel","current");
				$("[rel=hoverout][rel!=current] .inner").stop().animate({opacity:0.2}, 200);
				$("[rel=current] .inner").css({
					'border':'2px solid #000',
					'margin':'-2px'
				});
			}
		}
	).mouseleave(
		function() {
			if(swipeLoaded) {
				$(this).attr("rel","hoverout");
				$("[rel=hoverout] .inner").delay(100).stop().animate({opacity:1}, 200);
				$("[rel=hoverout] .inner").css({
					'border':'0',
					'margin':'0'
				});
			}
		}
	);

	$("[rel*=hoverout]:has(.caption.box)").mouseenter(
		function() {
			if($(this).attr("id")=="newsletter") {
				$(".caption.box",this).animate({bottom:6,opacity:1}, 200);
			}else {
				$(".caption.box",this).animate({bottom:20,opacity:1}, 200);
			}
		}
	).mouseleave(
		function() {
			$(".caption.box",this).animate({bottom:-100,opacity:0}, 200);
		}
	);	
	
	$('#navi ul li').mouseenter(function(){
			$(this).addClass("hover");
			$(this).children("ul").slideDown("fast");
			
		}).mouseleave(function(){
			$(this).children("ul").slideUp("fast");	
			$(this).removeClass("hover");				
		}
	);
	
});




