// JavaScript Document
jQuery.fn.delay = function(time,func){
	return this.each(function(){
		setTimeout(func,time);
	});
};

var profiles =
	{

		window800:
		{
			height:800,
			width:800,
			status:1
		},

		window200:
		{
			height:200,
			width:200,
			status:1,
			resizable:0
		},

		windowCenter:
		{
			height:700,
			width:700,
			center:1,
			scrollbars:1
		},
		
		windowNotNew:
		{
			height:300,
			width:400,
			center:1,
			createnew:0
		}

	};

    function do_sIFR(){
sIFR.replace(garamond, {
    selector: 'h3'
    ,css: '.sIFR-root {color:#583e26}'
    ,selectable: false
    ,wmode: 'transparent'
        
  });
};
    

$(document).ready(function() {
	 $(this).delay(3000,function(){
   $("#footer2").animate({ height: 'show', opacity: 'show' }, 'slow');
   $("#footer1").animate({ height: 'show', opacity: 'show' }, 'slow');
   	 });
	 

$('#tilaat').click(function() {
$('#kirjaudupalveluun').hide('slow');
    $('#tilaatunnukset').slideToggle('slow');
    return false;
  });


$('#kirjaudup').click(function() {
$('#tilaatunnukset').hide('slow');
    $('#kirjaudupalveluun').slideToggle('slow');
    return false;
  });


  	$(function()
	{
   		$(".popupwindow").popupwindow(profiles);
   	});
	 

        
    $('#accordion2').cycle({
		fx: 'fade',
                speed: 900,// choose your transition type, ex: fade, scrollUp, shuffle, etc...
                after: do_sIFR,
                timeout: 6000
	});

  
        
 });
