
$(document).ready(function() {

    // Vis / skjul undermenyer:
    $(".toppMenyImg").click(function(event) { 
 		$(event.target.parentNode.parentNode).find("ul").slideToggle("fast", function () {
			if (event.target.className == 'toppMenyImg pluss') {
				event.target.className='toppMenyImg minus';
			} else {
				event.target.className='toppMenyImg pluss';
			}
		});
    });

	
	// Vis / skjul menytips.
	$("#meny li h3").mouseover(function(event) {
		$(this).parent().find('p').fadeIn(200);
		//$(this).parent().find('p').slideDown("fast");
	});
	
	$("#meny li h3").mouseout(function(event) {
		$(this).parent().find('p').fadeOut(200);
	});
	
	
	$("#meny li p").mouseover(function(event) {
		$(this).stop(true, false);
		$(this).css({"opacity": "1"});
	});
	
	$("#meny li p").mouseout(function(event) {
		$(this).fadeOut(200);
	});


  $("a").each(function(){
    var src = $(this).attr("href");
    //src = src.replace("http://kundesider.kvasir.local:8080", "http://kundesider.kvasir.no");
    //alert("replaced src " + src);
    src = src.replace("http://localhost","http://kundesider.kvasir.no");
    $(this).attr("href", src);
  });

});

