Iam trying to get a floating side bar which floates between header and footer on scrolling.

Iam trying to get a floating side bar which floates between header and footer on scrolling.

but it is flickering at some points.pls check this fiddle, 
http://jsfiddle.net/ec4wjs48/10/