Refactoring jQuery slider code suggestions
Some minor improvements you can make:


Cache your DOM lookups (e.g. $('.slider img')) to prevent having to parse the DOM multiple times. That's as simple as making a new variable:

var sliderImages = $('.slider img');

Use a ternary statement for setting your z-index:

$(this).css('z-index', zindex &lt; count ? zindex + 1 : zindex - count - 1);


That'll remove 4 lines and remove unnecessary repetition.
Add the var keyword to your count variable so it's not global (it should remain accessible to all the functions within your function scope anyway).
Add some simple comments to explain why you're changing the z-index in the first place.