$(document).ready(function(){
	/* The code here is executed on page load */
	
	/* Converting the slide handles to draggables, constrained by their parent slider divs: */
	
	$('.slider-handle').draggable({
		containment:'parent',
		axis:'y',
		drag:function(e,ui){
			
			/* The drag function is called on every drag movement, no matter how minute */
			
			if(!this.par)
			{
				/* Initializing the variables only on the first drag move for performance */
				
				this.par = $(this).parent();
				this.parHeight = this.par.height();
				this.height = $(this).height();
			}
			
			var ratio = 0-(ui.position.top)/(this.parHeight-this.height);
			
			resizeBar(ratio);
		}
	});
});

function resizeBar(ratio)
{
	obj=document.getElementById('forms_polzunok_info');
	
	obj.style.marginTop=obj.offsetHeight*ratio-145*ratio;
	//$('#forms_polzunok_info').style.width(200*ratio)
	
};


