// jQuery-operasjoner for Peteka

jQuery.noConflict();

jQuery(document).ready(function($){

$("table.contenttoc").css({position: "absolute", marginTop: "-20px"}).find("tr:not(:first)").hide().end().hover(

function () {

$(this).find("tr").show();

},

function () {

$(this).find("tr:not(:first)").hide();

}

 );

$("div#pathway").find("a:eq(1):contains('Hjem')").hide().find("~ img:eq(0)").hide();

$("div.faqs").find("div.svar").hide().end().find("h3").css({"cursor":"pointer"}).toggle(

      function () {

        $(this).next("div.svar").show("slow");

      },

      function () {

        $(this).next("div.svar").hide("slow");

      }



    );

/*$("tr.studievalg select").change(function () {
						  var opt = $(this).find("option:selected").attr("value");
						  if (opt == 1) {
							  $("tr.studievalg select").not(this).find("option[value='1']").remove();
						  }
						  if (opt == 2) {
							  $("tr.studievalg select").find("option[value='2']").remove();
						  }
						  if (opt == 3) {
							  $("tr.studievalg select").find("option[value='3']").remove();
						  }
						  if (opt == 4) {
							  $("tr.studievalg select").find("option[value='4']").remove();
						  }
						  if (opt == 5) {
							  $("tr.studievalg select").find("option[value='5']").remove();
						  }
										   });*/
$("form#ChronoContact_sok_opptak").submit( function () {
													 $(this).find("textarea").each( function () {
																			var value = $(this).attr("value");
																			var newvalue = value.replace(/\n/g, "<br />");
																			$(this).attr({ value: newvalue });
																					  });
													 return true
																			   });

});


