﻿function TextChanger(i) {
    //alert("text changer call");
    $$ = $(".target li");
    if (i >= $$.length)
        i = 0;
        
    $$.hide().eq(/*Math.floor(Math.random() * $$.length)*/i).fadeIn("slow");
    i++;
    t = setTimeout('TextChanger(' + i +')', 10000);
}

function Slide(index) {
    $$ = $(".target li");
    $$.hide();
    var len = $$.length;

    if (index == null) {
        index = 1;
        $(".target li:nth-child(" + index + ")").show();
    }
    else if (index > len) {
        index = 1;
        $(".target li:nth-child(" + index + ")").fadeIn("slow"); ;
    }
    else {
        $(".target li:nth-child(" + index + ")").fadeIn("slow"); ;
    }
    index += 1;
    t = setTimeout('Slide(' + index + ')', 5000);
}
