function hoverElement()
{
  if (document.getElementById)
  {
    var x = document.getElementsByTagName('li');
  }
  else if (document.all)
  {
    var x = document.all.tags('li');
  }
  else
  {
    return;
  }
  for (var i=0;i<x.length;i++)
  {
    x[i].onmouseover = function () { if (this.className == 'li-up')
                                     this.className = 'li-over'; }
    x[i].onmouseout = function () { if (this.className == 'li-over')
                                    this.className = 'li-up'; }
  }
}

// When the document loads do everything inside here ...
$(document).ready(function(){
	// When a link is clicked
	$("a.menutab").click(function () {
			// switch all tabs off
			$(".active").removeClass("active");
			// switch this tab on
			$(this).addClass("active");
			// slide all content up
			$(".navigation").slideUp();
			// slide this content up
			var content_show = $(this).attr("title");
			$("#"+content_show).slideDown();
	});

  
  // komentar
	$().ajaxStart(function() {
		$('#loading').show();
	}).ajaxStop(function() {
		$('#loading').hide();
	});

	$('#myForm').submit(function() {
		$.ajax({
			type: 'POST',
			url: $(this).attr('action'),
			data: $(this).serialize(),
			success: function(data) {
				$('#komentardata').html(data);
			}
		})
		return false;
	});
  
});

