That code looks oddly familiar....
You aren't calling the mousewheel function - I'm assuming you're using Brandon Aaron's plugin? Your code needs to be within a function like this:
Code:
$('#mydiv').mousewheel(function(event,delta){
...your code....
});