jQuery(".news_image:empty").text("Was empty!").css('background', 'rgb(255,220,200)');

function fader() {
	jQuery("#jksc-maindiv").queue( function () {
		if (pos != vorher) {
			jQuery("#tx_jksc_pi1_short_"+vorher).removeClass("jksc_short_active");
			jQuery("#tx_jksc_pi1-content-"+vorher).fadeOut(speed);
			jQuery("#tx_jksc_pi1_short_"+pos).addClass("jksc_short_active");
			jQuery("#tx_jksc_pi1-content-"+pos).fadeIn(speed);
			jQuery("#jksc-maindiv").dequeue();
		}
	});
}

function slideinltr() {
	jQuery("#jksc-maindiv").queue( function () {
		if (pos != vorher) {
			jQuery("#tx_jksc_pi1_short_"+vorher).removeClass("jksc_short_active");
			jQuery("#tx_jksc_pi1_short_"+pos).addClass("jksc_short_active");
			// zu zeigendes DIV auf Startposition setzen
			if (pos) hoehe = jQuery(".jksc-subpart").height(); else hoehe = 0;
			jQuery("#tx_jksc_pi1-content-"+pos).css({
				"left":"-"+jQuery(".jksc-subpart").width(),
				"marginTop":"-"+hoehe
			});
			jQuery("#tx_jksc_pi1-content-"+vorher).animate({
				// raussliden ... (nach rechts)
				left:"+="+jQuery("#jksc-maindiv").width()
			},speed,function () { 
				// nach beenden -> zurück auf Startpos
				jQuery(this).css("left","-"+jQuery("#jksc-maindiv").width());
			});
			jQuery("#tx_jksc_pi1-content-"+pos).animate({
				// reinsliden ... (von links)
				left:"+="+jQuery("#jksc-maindiv").width()
			},speed);
			jQuery("#jksc-maindiv").dequeue();
		}
	});
}

function slideinrtl() {
	jQuery("#jksc-maindiv").queue( function () {
		if (pos != vorher) {
			jQuery("#tx_jksc_pi1_short_"+vorher).removeClass("jksc_short_active");
			jQuery("#tx_jksc_pi1_short_"+pos).addClass("jksc_short_active");
			// zu zeigendes DIV auf Startposition setzen
			if (pos) hoehe = jQuery(".jksc-subpart").height(); else hoehe = 0;
			jQuery("#tx_jksc_pi1-content-"+pos).css({
				"left":jQuery(".jksc-subpart").width(),
				"marginTop":"-"+hoehe
			});
			jQuery("#tx_jksc_pi1-content-"+vorher).animate({
				// raussliden ... (nach links)
				left:"-="+jQuery("#jksc-maindiv").width()
			},speed,function () { 
				// nach beenden -> zurück auf Startpos
				jQuery(this).css("left",jQuery("#jksc-maindiv").width());
			});
			jQuery("#tx_jksc_pi1-content-"+pos).animate({
				// reinsliden ... (von rechts)
				left:"-="+jQuery("#jksc-maindiv").width()
			},speed);
			jQuery("#jksc-maindiv").dequeue();
		}
	});
}

function stop() {
	jQuery("#jksc-maindiv").queue("fx",[]);
	jQuery("#jksc-maindiv").stop();
}

function stopTimer() {
	stop();
	clearTimeout(t);
	running = 0;
}

function startTimer() {
	if (!running) {
		running = 1;
		timedEvent();
	}
}
