First thing: you have an error with your markup, the UL closing tag is malformed.
You need to iterate over each thumb and individually work out the height and the difference like this:
$(window).load(function() {
var images = $('.rslides ').find('img');
images.each(function(){ // jQuery each loops over a jQuery obj
var h = $(this).outerHeight(true); // $(this) is the current image
if( h<290)
{
var m = 290-h;
m = m/2;
$(this).css('margin-top', +m + "px");
}
});
$("#slider1").responsiveSlides({
auto: false,
pager: true,
nav: true,
speed: 500,
maxwidth: 540,
namespace: "transparent-btns"
});
});
Here's a JSFiddle, notice how each image now has a margin at the top: