Google maps like scrolling for divs and all
container.css('overflow','hidden'); // hide browser scrollbars
dragStart = {}; // variable to store starting position
container.bind('mousedown',function(e){
dragStart.offsetX = e.offsetX;
dragStart.offsetY = e.offsetY;
}).bind('mousemove',function(e){
if(dragStart.offsetX != null){
var diffX = dragStart.offsetX - e.offsetX;
var diffY = dragStart.offsetY - e.offsetY;
container.scrollLeft(container.scrollLeft()+diffX);
container.scrollTop(container.scrollTop()+diffY);
}
}).bind('mouseup',function(e){
dragStart = {};
}).bind('mouseout',function(e){
dragStart = {};
});