$(function() { var a = ["http://i42.servimg.com/u/f42/09/02/13/94/bannia18.jpg", "http://i42.servimg.com/u/f42/09/02/13/94/humpba10.jpg"]; $("#pun-logo img,#i_logo,#logo img").attr("src", a[Math.floor(Math.random() * a.length)]) });