var quotes=new Array();quotes[0]='אוכל זו אומנות.
אוכל זו מתנה.';quotes[1]='אנחנו אוהבים לאהוב.
אנחנו אוהבים לתת.';quotes[2]='אנחנו אוהבים לעשות אנשים שמחים.
אנחנו אוהבים לתת מתנות לאנשים.'; function rand( min, max ) { // http://kevin.vanzonneveld.net // + original by: Leslie Hoare // + bugfixed by: Onno Marsman // * example 1: rand(1, 1); // * returns 1: 1 var argc = arguments.length; if (argc == 0) { min = 0; max = 2147483647; } else if (argc == 1) { throw new Error('Warning: rand() expects exactly 2 parameters, 1 given'); } return Math.floor(Math.random() * (max - min + 1)) + min; } var qn=0; function change_qs(){ if(quotes.length > 1){ nqn = rand(0,(quotes.length-1)); while(qn == nqn){ nqn = rand(0,(quotes.length-1)); } qn = nqn; } new_quote = quotes[qn]; if(quotes.length > 1){ $('.quote').fadeOut('slow',function(){ $(this).css('z-index','1000'); $(this).remove(); }); } newq = $('
'); $(newq).addClass('quote'); $(newq).attr('id','tempq'+qn); $(newq).html(new_quote); $(newq).hide(); $('#left').append($(newq)); $('#tempq'+qn).fadeIn('slow'); tmo=setTimeout('change_qs()',8000); } $(document).ready(function(){ change_qs(); });