
function trace(msg) {
	if (typeof(console) != 'undefined' && typeof(console.log) != 'undefined') { 
		console.log(msg);
		return;
		if ($('#errors').length > 0) {
			//trace('errors box found');
			$('#errors').append($('<p style="margin-left: 32px; font-weight: bold">[javascript] ' + msg + '</p>'));
		}
	}
}


$(document).ready(function() {
	
	//trace('** ready');
	
	//return;
	
//	$.scrollTo('#page');
	
	if ($.browser.msie) {
		DD_belatedPNG.fix('#text_de, #text_en, #gruss, #teaserbild');
	} else {
		//trace('no xploder');
	}
	
	$('#text_de, #text_en, #gruss, #teaserbild').hide();
	
	var $textDE = $('#text_de');
	var $textEN = $('#text_en');
	var $gruss = $('#gruss');
	var $teaserbild = $('#teaserbild');	
	
	$textDE.delay(250).fadeIn(250, function() {
		
		$textEN.delay(250).fadeIn(250, function() {
			$gruss.delay(250).fadeIn(250, function() {
				
				$teaserbild.delay(500).fadeIn(1000, function() {
					//$.scrollTo($teaserbild, 1000);
				});
				
			});
		});
	});

	initJumpyButtons();
	
});

function initJumpyButtons() {
	
	// -- Knöpfe hüpfen lassen
	
	$('.ezButtonWrapper, .ezAkkordeonButton').mousedown(function() {	
		$(this).offset({top: $(this).offset().top + 1});
	}).mouseup(function() {
		$(this).offset({top: $(this).offset().top - 1});
	});

}
