I have a jQuery script vertically an horizontally centering an image within a div. This works great for the first image loaded into the Pikachoose slider, but I need the script to reinitialize when Pikachoose changes slides--making the next image vertically and horizontally center.
Here's the vertical/center script working on the image:
$(window).load(function(){
var $img = $('img.galleryfull');
var h = $img.height();
$img.css('margin-top', +h / -2 + "px");
var w = $img.width();
$img.css('margin-left', +w / -2 + "px");
});
How do I reinitialize this when PikaChoose loads the next image in the gallery?