﻿$(document).ready(function(){
		
	slogen();
	
	var lef = $('.left').height()+23;
	var con = $('.content').height()+254;
	
	offset = (lef > con)?lef:con;
	
	$('.footer').css('top',offset+150);

	
});

function slogen(){
	$('#slogen').animate({
    	opacity: 0.7,
	    top: '+=310'
	}, 2000);	
}

function closeme(){
	document.getElementById('popup').className='rh';
	document.getElementById('modal').className='rh';
}



function jumpto(line) {
	clearTimeout(t);
	rotator(line);
}
	
function rotator(line){
	var maxi = rotaObject.length;
	var timer = (rotaObject[line][1]*1000);
	
	if ($('#rotimage').html() != '&nbsp;'){
		$('#rotimage').animate({
			opacity: 0
		}, 400);		
	}

	setTimeout(function() {$('#rotimage').html(rotaObject[line][3])} , 400);	
	
	$('#rotimage').animate({
    	opacity: 1
	}, 1000);	

	if (maxi > 1) {
		if (line < (maxi-1)) 
			t = setTimeout ( "rotator("+(line+1)+")", timer ); 
		else 
			t = setTimeout ( "rotator("+(0)+")", timer ); 
	}
}
