/**
 * home
 * @author AK
 * 
 * @version 1.0.2
 */

var ixFadeTimer;

$(function(){
	/** 
	 * jquery 1.2.1
	 * @author AK
	 * 
	 */ 
	 
	 $('body').addClass('js');
	 
	 
	/**
	 * home flash
	 */
	 
	var so = new SWFObject("/flash/slideHome.swf", "mymovie", "899", "387", "0", "#FFFFFF");
	so.addParam("quality", "high");
	so.addParam("salign", "t");
	if(so.write("contentMenuContainer")) {
		$('#contentMenuContainer').css('padding-left', 0);
	}
	
	/**
	 * news attract
	 * jQuery 1.2.1
	 * @author AK
	 */

	if (typeof $('#reisHighlite li').get(0) != 'undefined') {
		var iInterval = 6000;
		var items = $('#reisHighlite li');
		$(items).not(items[0]).addClass('hide');
		/*
	 $(items).not(items[0]).hide();
	 $(items).not(items[0]).css({
	 position: 'absolute',
	 top: 0
	 });
	 */
		function xFade(){
			iCurrent = iNext;
			iNext = iCurrent + 1;
			if (iNext > iNumItems - 1) 
				iNext = 0;
			$(items[iCurrent]).animate({
				opacity: 'hide'
			}, iInterval / 2);
			$(items[iNext]).animate({
				opacity: 'show'
			}, iInterval / 2, '', setTimeout(xFade, iInterval));
		}
		
		iNumItems = $(items).length;
		iCurrent = -1;
		iNext = 0;
		ixFadeTimer = setTimeout(xFade, iInterval);
		
		addLoadEvent(function(){
			disableFxWithoutCSS('clearTimeout(' + ixFadeTimer + ')')
		});
	}
	
});

function disableFxWithoutCSS(fFunc) {
	if (document.styleSheets[0].disabled) {
		eval(fFunc);
	}
}

