$(document).ready(function(){	

	//Cufon font replacement
	Cufon.replace('#menu, h1, h2, h3, #footer .header', {fontFamily:'Museo', hover:true});

	//menu 
	/*
	var $apartat = $('body').attr('class');
	$('#menu .' + $apartat).addClass('current');
	*/

	
	$("#slider").easySlider({
		auto: true, 
		continuous: true,
		controlsShow: false
	});


	//external link in new window
	var h = window.location.host.toLowerCase();
	$("a[href^='http']:not([href^='http://" + h + "']):not([href^='http://www." + h + "']), a[href$='.pdf']").attr("target", "_blank");


	//smooth scroll
	$('a[href*=#]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {        
			var $target = $(this.hash);            
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');            
			if ($target.length) {            
				var targetOffset = $target.offset().top;                
				$('html,body').animate({scrollTop: targetOffset}, 850);                    
				return false;                
			}            
		}        
	});

});	



