// JavaScript Document
$.fn.randomImage = function (){
var $imageNumber = 2,
// Set the amount of images in the Sprite
$height = $('> div', this).innerHeight(),
$random_num = Math.random() * $imageNumber - 1,
$multiple = Math.round($random_num),
$random = $height * $multiple
jQuery('.homeimage').css(
{'background-position' : '0px -' + $random + 'px',  'display' : 'block' }
)};