$(function(){
	
	// More info - Less info toggle thingie PS 081023.
	$('div.less').hide();

	$("div.infocontainer a.moreinfo").bind("click", function(){
		$(this).parents("div.infocontainer").children("div.more").hide();
		$(this).parents("div.infocontainer").children("div.less").show();
		$(this).parents("div.infocontainer").next("div.infodetails").slideDown("slow");
	});
	
	$("div.infocontainer a.lessinfo").bind("click", function(){
		$(this).parents("div.infocontainer").next("div.infodetails").slideUp("slow");
		$(this).parents("div.infocontainer").children("div.less").hide();
		$(this).parents("div.infocontainer").children("div.more").show();
	});
	
	$("div.infodetails a.lessinfo").bind("click", function(){
		$(this).parents("div.infodetails").slideUp("slow");
		$(this).parents("div.infodetails").prev("div.infocontainer").children("div.less").hide();
		$(this).parents("div.infodetails").prev("div.infocontainer").children("div.more").show();
	});
	

	// Map Link Hover - to replace MM code extravaganza PS 081029.
	$('a.map').hover(function() {

		var getLan = "/pics/sweden_map_"+this.id+".gif";
	
		$('img#swemap').attr("src", getLan);
			}, function() {
		$('img#swemap').attr("src","/pics/sweden_map.gif");
	});
	
	
	// Always submit the payment form right away.
	// We don't need this any more.
	//$("form#paymentform").submit();	
	
	// Add zebra striping to tables that wants it.
	$("table.zebra tbody tr:odd").addClass("udda");

	// The tabber 
	$("div.tabber").addClass("tabberlive");
	// Add the tab list and store in a variable to speed things up a notch
	$("div.tabberlive").prepend("<ul class=\"tabbernav\"></ul>");
	var ul = $("div.tabber ul");
	// Add the tabs
	$("div.tabberlive div.tabbertab").each(function(){ul.append("<li><a href=\"#\">" + $("h2", this).html() + "</a></li>");});
	$("div.tabberlive ul.tabbernav li a").click(function(){
		$("div.tabberlive div.tabbertab").addClass("tabbertabhide");
		$("div.tabberlive ul.tabbernav li").removeClass("tabberactive");
		$(this).parent().addClass("tabberactive");
		$($("div.tabberlive div.tabbertab").get($(this).parents("li").prevAll().length)).removeClass("tabbertabhide");
	});
	$("div.tabberlive ul.tabbernav li:first a").click();
	

    $('a.lightbox').lightBox();
	
	$("#toTop").scrollToTop({speed:1000,ease:"easeOutBounce"});



});