$( document ).ready( function() { 
	getTagline();
} );

function get_random( maxNum ) {
  if (Math.random && Math.round) {
    var ranNum= Math.round(Math.random()*(maxNum-1));
    ranNum+=1;
    return ranNum;
  } else {
	  today = new Date();
	  hours = today.getHours();
	  mins =   today.getMinutes();
	  secn =  today.getSeconds();
	  if ( hours == 19 ) hours = 18;
	  var ranNum= (( (hours+1) * (mins+1) * secn)%maxNum) + 1;
	  return ranNum;
  }
}

function getTagline() {
    if (document.images) {
    	var lastTagline = $( '#citation li.cite' ).length;
        var choose_one = get_random(lastTagline);
        var choose_one = "c" + choose_one;
        $( '#citation li.cite' ).hide();
        r = document.getElementById(choose_one);
        r.style.display = "block";
    }
}