var show_time = new Array();var out_time = new Array();var in_time = new Array();var fade_timer = new Array();var TickerOptions = new Array();var TicBox = new Array();var rahmen = new Array();var startet = new Array(); function moveTicker(id, moverange, speed){if (TickerOptions["ticker_content_inner_"+id].direction == 1) TicBox[id].animate({left: '-='+ moverange}, speed, "linear", function(){TicBox[id].children().last().after(TicBox[id].children().first()); var first=TicBox[id].children().first(); var width=first.outerWidth(true); var newspeed=width/TickerOptions["ticker_content_inner_"+id].laufweite; TicBox[id].css("left", '0'); moveTicker(id, width, newspeed);}); else TicBox[id].animate({right: '-='+ moverange}, speed, "linear", function(){TicBox[id].children().last().after(TicBox[id].children().first()); var first=TicBox[id].children().first(); var width=first.outerWidth(true); var newspeed=width/TickerOptions["ticker_content_inner_"+id].laufweite; TicBox[id].css("right", '0'); moveTicker(id, width, newspeed);});} function jTickerStartEndless(id) {if(typeof(rahmen[id])=="undefined") {var speed = show_time[id]/100000; jQuery("#ticker_content_"+id).css({'position': 'relative', 'margin': '0', 'padding': '0', 'overflow': 'hidden'}); if(typeof(tic_separator)!="undefined" && typeof(tic_separator[id])!="undefined") {jQuery("#ticker_content_"+id+" div").after("
"+tic_separator[id]+"
");} jQuery("#ticker_content_"+id+" div").css({'float': 'left', 'margin': '0', 'padding-right': '15px', 'line-height': '20px', 'display': 'block'}); jQuery("#ticker_content_"+id).removeAttr("onmouseover"); jQuery("#ticker_content_"+id).removeAttr("onmouseout"); jQuery("#ticker_content_"+id).attr("id","ticker_content_inner_"+id); var settings = jQuery.extend({ laufweite: speed, direction: 1 }, settings ); TickerOptions["ticker_content_inner_"+id] = settings; TicBox[id] = jQuery("#ticker_content_inner_"+id); TicBox[id].removeClass("ticker_content"); var first = TicBox[id].children().first(); var travel = first.outerWidth(true); var timing = travel/settings.laufweite; rahmen[id] = TicBox[id].wrap("
"); rahmen[id].after("  "); var wrapcode="
"; TicBox[id].parent().wrap(wrapcode); var TicBoxWidth=0; jQuery("#ticker_content_inner_"+id+" div").each(function(index) {TicBoxWidth += parseInt(jQuery(this).outerWidth(true), 10);}); TicBox[id].width(TicBoxWidth+500); moveTicker(id, travel, timing); TicBox[id].hover(function(){jQuery(this).stop();}, function(){moveTicker(id, travel, timing);});}} function jTickerEndEndless(id) {} function jTickerResetEndless(id) { if(typeof(TicBox[id])!="undefined") {TicBox[id].stop();} rahmen[id]=undefined; TicBox[id]=undefined; TickerOptions["ticker_content_inner_"+id]=undefined;} var kids_content = new Array();var exp_count_item = new Array();var explode_stop = new Array();var implode_stop = new Array();var stop_animation = new Array();function jTickerStartExplode(id) {if(typeof kids_content[id]==='undefined') {kids_content[id]=new Array();}if(typeof exp_count_item[id]==='undefined') {exp_count_item[id]=0;}if(typeof explode_stop[id]==='undefined') {explode_stop[id]=false;}if(typeof implode_stop[id]==='undefined') {implode_stop[id]=false;}stop_animation[id]=false;if(kids_content[id].length<=0) jQuery('#ticker_content_'+id+' div').each(function() {kids_content[id].push(jQuery(this).text())});fade_timer[id]=window.setInterval('jTickerExplode('+id+')', show_time[id] );} function jTickerEndExplode(id) {window.clearInterval(fade_timer[id]);stop_animation[id]=true;} function jTickerExplode(id) {window.clearInterval(fade_timer[id]);var k=0;var $ex=jQuery('#ticker_content_'+id+' div:first');var fontsize=$ex.css('font-size');$ex.html(kids_content[id][exp_count_item[id]].replace(/([\S])/g, '$1'));$ex.css('position', 'relative');var content_length=jQuery('span', $ex).length;if(stop_animation[id]==false) {jQuery('span', $ex).each(function(i) {k++;var newTop = Math.floor(Math.random()*500)*((i%2)?1:-1);var newLeft = Math.floor(Math.random()*500)*((i%2)?1:-1);jQuery(this).css({position: 'relative',opacity: 1,fontSize: fontsize,top: 0,left: 0}).animate({opacity: 0,fontSize: '84',top: newTop,left:newLeft},out_time[id], function() {if(explode_stop[id]==false) {explode_stop[id]=true;implode_stop[id]=false;if(k==content_length ) {var $im=jQuery('#ticker_content_'+id+' div:first');exp_count_item[id] ++;if(exp_count_item[id]>=kids_content[id].length) exp_count_item[id]=0;$im.html(kids_content[id][exp_count_item[id]].replace(/([\S])/g,'$1'));$im.css('position','relative');jQuery('span',$im).stop().css({position:'relative',opacity:0,fontSize:'84',top:function(i){return Math.floor(Math.random()*500)*((i%2)?1:-1);},left:function(i){return Math.floor(Math.random()*500)*((i%2)?1:-1);}}).animate({opacity:1,fontSize:fontsize,top:0,left:0},in_time[id],function (){if(implode_stop[id]==false){implode_stop[id]=true;explode_stop[id]=false;if(stop_animation[id]==false) fade_timer[id]=window.setInterval('jTickerExplode('+id+')',show_time[id]);}});}}});})}} function jTickerFading(id){jQuery('#ticker_content_'+id+' div:first').fadeOut(out_time[id],function(){jQuery(this).remove().appendTo('#ticker_content_'+id);jQuery('#ticker_content_'+id+' div:first').fadeIn(in_time[id]);});}function jTickerStartFader(id){fade_timer[id]=window.setInterval('jTickerFading('+id+')',show_time[id]);}function jTickerEndFader(id){window.clearInterval(fade_timer[id]);} function jTickerHOIScroller(id){ var ticker_width = jQuery('#ticker_content_'+id).width(); var scroll_width = ticker_width + parseInt(jQuery('#ticker_content_'+id).css('paddingRight'))+5+'px'; jQuery('#ticker_content_'+id+' div:first').css({'width':ticker_width}); jQuery('#ticker_content_'+id+' div:first').animate({marginLeft: '+='+scroll_width}, out_time[id],function(){ jQuery(this).css({'display':'none'}); jQuery(this).remove().appendTo('#ticker_content_'+id); jQuery('#ticker_content_'+id+' div:first').css({'width':ticker_width,'marginLeft':scroll_width,'display':'block'}); jQuery('#ticker_content_'+id+' div:first').animate({marginLeft: '-='+scroll_width}, in_time[id]); }); } function jTickerStartHOIScroller(id) { fade_timer[id] = window.setInterval('jTickerHOIScroller('+id+')', show_time[id] ); } function jTickerEndHOIScroller(id) { window.clearInterval(fade_timer[id]); } function jTickerHScrollerLR(id){ var ticker_width = jQuery('#ticker_content_'+id).width(); var scroll_width = ticker_width + parseInt(jQuery('#ticker_content_'+id).css('paddingRight'))+5+'px'; var left_start_pos = (ticker_width + 5 + parseInt(jQuery('#ticker_content_'+id).css('paddingLeft')))*(-1)+'px'; jQuery('#ticker_content_'+id+' div:first').css({'width':ticker_width}); jQuery('#ticker_content_'+id+' div:first').css({'position': 'relative'}); jQuery('#ticker_content_'+id+' div:first').animate({left: '+='+scroll_width}, out_time[id],function(){ jQuery(this).css({'display':'none'}); jQuery(this).remove().appendTo('#ticker_content_'+id); jQuery('#ticker_content_'+id+' div:first').css({'position': 'relative','width':ticker_width,'left':left_start_pos,'display':'block'}); jQuery('#ticker_content_'+id+' div:first').animate({left: '+='+scroll_width}, in_time[id]); });}function jTickerHScrollerRL(id){ var ticker_width = jQuery('#ticker_content_'+id).width(); var scroll_width = ticker_width + parseInt(jQuery('#ticker_content_'+id).css('paddingRight'))+5+'px'; var left_start_pos = (ticker_width + 5 + parseInt(jQuery('#ticker_content_'+id).css('paddingLeft')))+'px'; jQuery('#ticker_content_'+id+' div:first').css({'width':ticker_width}); jQuery('#ticker_content_'+id+' div:first').css({'position': 'relative'}); jQuery('#ticker_content_'+id+' div:first').animate({left: '-='+scroll_width}, out_time[id],function(){ jQuery(this).css({'display':'none'}); jQuery(this).remove().appendTo('#ticker_content_'+id); jQuery('#ticker_content_'+id+' div:first').css({'position': 'relative','width':ticker_width,'left':left_start_pos,'display':'block'}); jQuery('#ticker_content_'+id+' div:first').animate({left: '-='+scroll_width}, in_time[id]); });}function jTickerStartHScroller(id) { if(show_time[id]<0) { show_time[id] = show_time[id]*(-1); fade_timer[id] = window.setInterval('jTickerHScrollerRL('+id+')', show_time[id] ); } else fade_timer[id] = window.setInterval('jTickerHScrollerLR('+id+')', show_time[id] );}function jTickerEndHScroller(id) { window.clearInterval(fade_timer[id]);} function jTickerRoller(id){jQuery('#ticker_content_'+id+' div:first').slideUp(out_time[id],function(){jQuery('#ticker_content_'+id+' div:first').remove().appendTo('#ticker_content_'+id);jQuery('#ticker_content_'+id+' div:first').slideDown(in_time[id]);});}function jTickerStartRoller(id){fade_timer[id]=window.setInterval('jTickerRoller('+id+')',show_time[id]);}function jTickerEndRoller(id){window.clearInterval(fade_timer[id]);} function jTickerVOIScroller(id){ var ticker_height = jQuery('#ticker_content_'+id).height(); var scroll_height = ticker_height + parseInt(jQuery('#ticker_content_'+id).css('paddingBottom'))+5+'px'; jQuery('#ticker_content_'+id+' div:first').css({'height':ticker_height}); jQuery('#ticker_content_'+id+' div:first').animate({marginTop: '+='+scroll_height}, out_time[id],function(){ jQuery(this).css({'display':'none'}); jQuery(this).remove().appendTo('#ticker_content_'+id); jQuery('#ticker_content_'+id+' div:first').css({'height':ticker_height,'marginTop':scroll_height,'display':'block'}); jQuery('#ticker_content_'+id+' div:first').animate({marginTop: '-='+scroll_height}, in_time[id]); }); } function jTickerStartVOIScroller(id) { fade_timer[id] = window.setInterval('jTickerVOIScroller('+id+')', show_time[id] ); } function jTickerEndVOIScroller(id) { window.clearInterval(fade_timer[id]); } function jTickerVScrollerTB(id){ var ticker_height = jQuery('#ticker_content_'+id).height(); var scroll_height = ticker_height + parseInt(jQuery('#ticker_content_'+id).css('paddingBottom'))+5+'px'; var top_start_pos = (ticker_height + 5 + parseInt(jQuery('#ticker_content_'+id).css('paddingBottom')))*(-1)+'px'; jQuery('#ticker_content_'+id+' div:first').css({'height':ticker_height}); jQuery('#ticker_content_'+id+' div:first').css({'position': 'relative'}); jQuery('#ticker_content_'+id+' div:first').animate({top: '+='+scroll_height}, out_time[id],function(){ jQuery(this).css({'display':'none'}); jQuery(this).remove().appendTo('#ticker_content_'+id); jQuery('#ticker_content_'+id+' div:first').css({'position': 'relative','height':ticker_height,'top':top_start_pos,'display':'block'}); jQuery('#ticker_content_'+id+' div:first').animate({top: '+='+scroll_height}, in_time[id]); });}function jTickerVScrollerBT(id){ var ticker_height = jQuery('#ticker_content_'+id).height(); var scroll_height = ticker_height + parseInt(jQuery('#ticker_content_'+id).css('paddingBottom'))+5+'px'; var top_start_pos = (ticker_height + 5 + parseInt(jQuery('#ticker_content_'+id).css('paddingBottom')))+'px'; jQuery('#ticker_content_'+id+' div:first').css({'height':ticker_height}); jQuery('#ticker_content_'+id+' div:first').css({'position': 'relative'}); jQuery('#ticker_content_'+id+' div:first').animate({top: '-='+scroll_height}, out_time[id],function(){ jQuery(this).css({'display':'none'}); jQuery(this).remove().appendTo('#ticker_content_'+id); jQuery('#ticker_content_'+id+' div:first').css({'position': 'relative','height':ticker_height,'top':top_start_pos,'display':'block'}); jQuery('#ticker_content_'+id+' div:first').animate({top: '-='+scroll_height}, in_time[id]); });}function jTickerStartVScroller(id) { if(show_time[id]<0) { show_time[id] = show_time[id]*(-1); fade_timer[id] = window.setInterval('jTickerVScrollerBT('+id+')', show_time[id] ); } else fade_timer[id] = window.setInterval('jTickerVScrollerTB('+id+')', show_time[id] );}function jTickerEndVScroller(id) { window.clearInterval(fade_timer[id]);}