// cufon

Cufon.replace('h1', { fontFamily: 'interface' });
Cufon.replace('h2', { fontFamily: 'interfacelight' });
Cufon.replace('h3.quote ', { fontFamily: 'interfacelight' });
Cufon.replace('h3.quote ', { fontFamily: 'interfacelight' });
Cufon.replace('h2.sidequote ', { fontFamily: 'interfacelight' });






/*------------Dropdown navi-------------*/

/*
var timeout    = 0;
var closetimer = 0;
var ddmenuitem = 0;

function dropdmenu_open(){
	dropdmenu_canceltimer();
   	dropdmenu_close();
   	ddmenuitem = $(this).find('ul').css('visibility', 'visible');
}

function dropdmenu_close(){
	if(ddmenuitem){
		ddmenuitem.css('visibility', 'hidden');
	}
}

function dropdmenu_timer() {  
	closetimer = window.setTimeout(dropdmenu_close, timeout);
}

function dropdmenu_canceltimer() {  
	if(closetimer){  
		window.clearTimeout(closetimer);
      closetimer = null;
	}
}

$(document).ready(function()
{  $('#dropdmenu > li').bind('mouseover', dropdmenu_open)
   $('#dropdmenu > li').bind('mouseout',  dropdmenu_timer)
});

document.onclick = dropdmenu_close;

*/


/*------------Page Scroll-------------*/
$(document).ready(function() {
	$('.top').click(function(){
		$('html, body').animate({scrollTop:0},'1500');
	});
});

/*------------Ihmiset Page Scroll-------------*/
function goToByScroll(id){
   
	$('html,body').animate( { scrollTop: $("#"+id).offset().top},{
			duration: '1000',
			easing: 'easeOutQuad'
		}
		
	);
}
/*	
$(document).ready(function () {  
  var top = $('#augustfix').offset().top - parseFloat($('#augustfix').css('marginTop').replace(/auto/, 0));
  $(window).scroll(function (event) {
    // what the y position of the scroll is
    var y = $(this).scrollTop();
  
    // whether that's below the form
    if (y >= top) {
      // if so, ad the fixed class
      $('#augustfix').addClass('fixed');
    } else {
      // otherwise remove it
      $('#augustfix').removeClass('fixed');
    }
  });
});
*/

//Toggle stuff on ihmiset page
function toggleText(element)
{
$("#"+element).slideToggle(300);
}





