$(document).ready(function(){
	$('.newsticker').jCarouselLite({
		vertical: true,
		visible: 3,
		speed: 1000,
		btnNext: '.vnext',
		btnPrev: '.vprev'
	});
	$('.sticker').jCarouselLite({
		visible: 4,
		auto: 100,
		speed: 4000,
		btnNext: '.hnext',
		btnPrev: '.hprev'
	});
	setInterval('doFading();', 10000);
});

function doFading() {
      $('#buttons #contact').delay(1000).fadeOut('slow').fadeIn('slow');
    }

var oldprod = null;
var plast = null;

function gfocus() {
	window.clearTimeout(plast);

	if ( oldprod != null ) {
		if ( this == oldprod ) {
			return;
		} else {
			oldprod.gblur();
		}
	}

	if ( this.s ) {
		this.style.paddingLeft = '20px';

	} else {
		this.style.paddingRight = '20px';
	}

	this.inf.style.visibility = 'visible';
	document.getElementById("gi").style.visibility = 'hidden';
	oldprod = this;
}



function gblur() {

	if ( this.s ) {
		this.style.paddingLeft = '0px';
	} else {
		this.style.paddingRight = '0px';
	}

	this.inf.style.visibility = 'hidden';
	document.getElementById("gi").style.visibility = 'visible';
	window.clearTimeout(plast);
	oldprod = null;
}



function tm_gblur() {
	plast = window.setTimeout("oldprod.gblur()", 50);
}


function init_gfocus() {
	col = document.getElementById('gamm_list').getElementsByTagName('li');
	for ( i=0; i<col.length; i++ ) {
		if ( col[i].className=='' ) {
			col[i].s = 1;
		} else {
			col[i].s = 0;
		}

		if (document.getElementById('gi'+i) != null) {
			col[i].inf = document.getElementById('gi'+i);
			col[i].gfocus = gfocus;
			col[i].gblur = gblur;
			col[i].onmouseover = gfocus;
			col[i].onmouseout = tm_gblur;
		}
	}
}
