this.randomtip=function(){var pause=30000;var length=$("#tips li").length;var temp=-1;this.getRan=function(){var ran=Math.floor(Math.random()*length)+1;return ran};this.show=function(){var ran=getRan();while(ran==temp){ran=getRan()};temp=ran;$("#tips li").hide();$("#tips li:nth-child("+ran+")").fadeIn("fast")};show();setInterval(show,pause)};$(document).ready(function(){randomtip()});