JQuery recalculate css on window resize

JQuery recalculate css on window resize

On this site: http://houston.aiga.org/

Although the slider is full width / variable on browser window size, the Title of each slider item is always indented to line up with the content.

I've tried setting this up: http://jsfiddle.net/topiman/xS7vn/5/

$(window).resize(function() { $('#item').css("padding-left",$(window).width()/2); });

The function is working but the calculation pushes the item too far in on decreasing window size and too far out on increase.

The line in the working slider example is:

$('.layout-feature .box-section-image-gallery-controls-title, .layout-feature .box-section-image-gallery-title').css('paddingLeft', 60 + extraSpace/2);

where extraSpace is the $(window).width()

Any help gratefully received - thanks in advance