Example code so I can start explaining this problem:
5 2
You can always test against jQuery(".yourDivs").css("z-index") once you've added the class on all your divs.
jQuery(".yourDivs").css("z-index")