			function interpolateColor(minColor,maxColor,maxDepth,depth){
 				function d2h(d) {return d.toString(16);}
    			function h2d(h) {return parseInt(h,16);}
 
			    if(depth == 0){
        			return minColor;
    			}
    		
			    if(depth == maxDepth){
        			return maxColor;
    			}
 
		    	var color = "#";
 
			    for(var i=0; i <= 5; i+=2){
    	    		var minVal = new Number(h2d(minColor.substr(i,2)));
	        		var maxVal = new Number(h2d(maxColor.substr(i,2)));
        			var nVal = minVal + (maxVal-minVal) * (depth/maxDepth);
        			var val = d2h(Math.floor(nVal));
        			while(val.length < 2){
    	        		val = "0"+val;
	        		}
        			color += val;
    			}
    			return color;
			}
			
			function showImage(file) {
				
				$('#image').children('img').attr('src', '/'+file);
				
				setTimeout(function() {
					$('#image').slideDown('slow');
				}, 500);
				
			}
			
			$(document).ready(function () {
				$(document).mousemove(function(e) {
					var width = $(document).width();
					
					var pos = Math.round(Math.abs(width/2-e.pageX));

					var color = interpolateColor('fbf4ef', 'f1f7f0', width/2, pos);
					$('body').css('background', color);
					$('#header').css('background', color);
				});
				
				$('#menu ul li').mouseover(function () {
					if ($('#'+$(this).attr('id')+'Content').is(":visible")) return;
					
					$('.menu').hide();
						
					var offset	= $(this).offset();
					var width	= $(this).width();
					var obj		= $('#'+$(this).attr('id')+'Content'); 
						
					obj.css('left', offset.left+width/2-obj.width()/2);
					obj.slideDown(300);
				});
				
				$('.menu').mouseleave(function(event) {						
					$('.menu').hide()
				});
					
				if (doNews) {
					$("#news").slideDown("slow", function() {
						$("#news .boxText").fadeIn('slow');				
					});

					$("#news").animate({ 
						top: "80px"
					}, { queue:true, duration:500 } );
				}
					
				$(".boxClose").click(function() {
					$(this).parents(".box").fadeOut();
				});
				
				$("#logo").click(function() {
					window.location = "/"+lng+"/";
				});
				
				$('.thumbs').mouseover(function() {
					if ($(this).parent().nextAll('.thumbLegend').get() == '') {
						$(this).parent().parent().nextAll('.thumbLegend').html('&mdash; '+$(this).attr('title'));					
					} else {
						$(this).parent().nextAll('.thumbLegend').html('&mdash; '+$(this).attr('title'));
					}
				});
				
				$('.imageClose').click(function() {
					$("#image").slideUp("slow");
				});
				
				$('#image').click(function() {
					$("#image").slideUp("slow");
				});

				$('.file').mouseover(function() {
					$(this).parent().nextAll('.fileLegend').html($(this).attr('alt'));
				}).mouseout(function() {
					$(this).parent().nextAll('.fileLegend').html("&nbsp;");				
				});
			});

