/// <reference path="jquery-1.4.1-vsdoc.js" />
/// <reference path="swfobject-vsdoc.js" />

$(document).ready(function() {

// get content height and set to 300
var contentHeight = $(".content-right").height();
var menuHeight = $(".content-left").height();

if(menuHeight < 300){
$(".content-right").height(300);
}
else{
	$(".content-right").height(menuHeight);
}

var fillerHeight = 300 - menuHeight;
$(".content-left").append("<div class='content-left-filler'></div>");
$(".content-left-filler").height(fillerHeight);

var gradientImageHeight = contentHeight - 300;
if(gradientImageHeight > 300){
$(".gradient-image").height(contentHeight - 300);
}



(function($) {
  $("#background").fullBg();
})(jQuery)

$('.frontpage-slider').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});

$(".menutop-li").each(function(){
	// first and last with white white/gray gray/white spacer
	var current = $(this);
	var prev = $(this).prev();
	var next = $(this).next();
		if(prev.children().size() == 0){
			current.children('.topmenu-left').css("background-image", "url(images/2011_menutop_wg.gif)");
		}
		if(next.children().size() == 0){
			current.children('.topmenu-left').css("background-image", "url(images/2011_menutop_gw.gif)").css("width", "15px");
		}
});

$(".menutop-li-active").each(function(){
	// first and last with white white/gray gray/white spacer
	var current = $(this);
	var prev = $(this).prev();
	var next = $(this).next();
		if(prev.children().size() == 0){
			current.children('.topmenu-left').css("background-image", "url(images/2011_menutop_wo.gif)");
		}
		else
		{
			current.children('.topmenu-left').css("background-image", "url(images/2011_menutop_go.gif)");
		}
		if(next.children().size() == 2){
			next.children('.topmenu-left').css("background-image", "url(images/2011_menutop_ow.gif)").css("width", "15px");
		}
		else
		{
			next.children('.topmenu-left').css("background-image", "url(images/2011_menutop_og.gif)").css("width", "15px");
		}
});


$(".menu-level2").hover(function(){
	$(this).addClass("menu-level2-active");	
},
function(){
	$(this).removeClass("menu-level2-active");
}
);



});


