$(document).ready(function() {

		$('#info').hide();
		$('a#show-info').click(function() {
		  $('#info').slideToggle(400);
		  $('#comment').hide(400);
		  return false;
		});
		$('#comment').hide();
		$('a#show-comment').click(function() {
		  $('#comment').slideToggle(400);
		  $('#info').hide(400);
		  return false;
		});
		$('#sidebar img.profile').css('opacity', 0.6); 
		$('#sidebar img.profile').hover(
  		function(){
		$(this).fadeTo('slow', 1);
		  },
  		function(){
		$(this).fadeTo('slow', 0.6);
		});

	$('a.photo span').css('opacity', 0); 
	$('a.photo span').css('display', 'block'); 
	
	$("a[rel='external nofollow'],a[rel='external']").click(function(){
	var oUrl = $(this).attr("href");
	window.open(oUrl);
	return false;
});
});

	$(function() {
		hiConfig = {
		sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)
		interval: 200, // number = milliseconds for onMouseOver polling interval
		timeout: 200, // number = milliseconds delay before onMouseOut
		over: function(){
		$(this).find('span').fadeTo('slow', 1);
				}

		, // function = onMouseOver callback (REQUIRED)
		out: function(){
		$(this).find('span').fadeTo('slow', 0);  } // function = onMouseOut callback (REQUIRED)
	}
	$('a.photo').hoverIntent(hiConfig)
});


		
function slideSwitch() {
var $active = $('#featured a.active');
if ( $active.length == 0 )
$active = $('#featured a:last');
var $next = $active.next().length ? $active.next()
: $('#featured a:first');
$active.addClass('last-active')
.animate({opacity : 0.0}, 1000);
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
	});
}

	function Validate(frm)
	{
	   if (frm.Name.value.length==0) {
		  alert('Du måste fylla i ditt Namn');
		  frm.Name.focus();
		  return false;
	   }
	   if (frm.Email.value.length==0) {
		  alert('Du måste fylla i din Email');
		  frm.Email.focus();
		  return false;
		  }
	   if (frm.Message.value.length==0) {
		  alert('Du måste skriva ett Meddelande');
		  frm.Message.focus();
	return false;
	}
	else
	{
	frm.submit.disabled = true;
	return true;
	}
	}
