function makeScrollerBox(jQuery, inputClass){
	//Get info about inputs
	var radioCount = jQuery('input'+inputClass).length; //Number of radio buttons
	
	jQuery('input'+inputClass).hide(); //Hide radio inputs
	
	//Make slider box
	scrollerHTML = '';
	scrollerHTML += '<div class="param-selected-value fl">-</div>';
	scrollerHTML += '<div class="param-values fl">';
		scrollerHTML += '<div class="param-value-wrapper">';
			scrollerHTML += '<div class="param-value-lower param-value-button fl">&nbsp;</div>';
			scrollerHTML += '<div class="param-value fl"><div class="dragger"><div></div></div></div>';
			scrollerHTML += '<div class="param-value-higher param-value-button fl">&nbsp;</div>';
			scrollerHTML += '<div class="clr"><!-- --></div>';
		scrollerHTML += '</div>';
	scrollerHTML += '</div>';
	jQuery(inputClass).parent().append(scrollerHTML);
	
	var sliderObject = jQuery('.param-values .param-value-wrapper .param-value .dragger', jQuery(inputClass).parent());
	var paramLowerValue = jQuery('.param-values .param-value-wrapper .param-value-lower', jQuery(inputClass).parent());
	var paramHigherValue = jQuery('.param-values .param-value-wrapper .param-value-higher', jQuery(inputClass).parent());
	var selectedValue = jQuery('.param-selected-value', jQuery(inputClass).parent());
	
	var stepWidth = Math.floor(sliderObject.parent().width() / radioCount); //Width of one step on scroll trackin pixels
	var spareWidth = sliderObject.parent().width() - radioCount * stepWidth; //Spare space on scroller (will be added to the last step space)
	
	//Construct steps' array
	var step_arr = [];
	var next_step = 0;
	for(i = 0; i < radioCount; i++){
		step_arr[i] = next_step;
		next_step += stepWidth;
		if(i == (radioCount - 1)) step_arr[i] = sliderObject.parent().width() - sliderObject.width(); //If this is the last step, then make it's position at very end of scroll track
	}
	
	//Get current step
	var currStep = 0;
	jQuery('input'+inputClass).each(function(counter){
		if(jQuery(this).is(':checked')) currStep = counter;
	});
	//Initiate values
	jQuery('.param-value .dragger', jQuery('input'+inputClass).parent()).css('left', step_arr[currStep]+'px');
	if(jQuery('input'+inputClass+':checked').attr('title') != '') selectedValue.html(jQuery('input'+inputClass+':checked').attr('title'));
	else selectedValue.html('-');
	
	var mouseStart = 0;
	var SliderStart = 0;
	var dragClick = false;
	//Monitor mouse clicks
	sliderObject.mousedown(function(mouseEvent){
		dragClick = true;
		mouseStart = parseInt(mouseEvent.pageX);
		SliderStart = jQuery(this).parent().offset().left;
	});
	sliderObject.mouseup(function(mouseEvent){
		dragClick = false;
	});
	
	//Dragging function
	sliderObject.parent().mousemove(function(mouseEvent){
		if(dragClick == false) return;
		mouseOffset = mouseEvent.pageX - SliderStart - 5;
		if(mouseOffset >= 0 && mouseOffset <= (sliderObject.parent().width() - sliderObject.width())){
			sliderObject.css('left', mouseOffset+'px');
			for(i = 0; i < step_arr.length; i++){
				if(mouseOffset >= step_arr[i]) currStep = i;
			}
		}
		jQuery('input'+inputClass).each(function(counter){
			if(counter == currStep) jQuery(this).attr('checked', 'checked');
		});
		if(jQuery('input'+inputClass+':checked').attr('title') != '') selectedValue.html(jQuery('input'+inputClass+':checked').attr('title'));
		else selectedValue.html('-');
	});
	
	paramHigherValue.click(function(){
		if((currStep + 1) < step_arr.length){
			currStep++;
			jQuery('.param-value .dragger', jQuery(this).parent()).css('left', step_arr[currStep]+'px');
			jQuery('input'+inputClass).each(function(counter){
				if(counter == currStep) jQuery(this).attr('checked', 'checked');
			});
			if(jQuery('input'+inputClass+':checked').attr('title') != '') selectedValue.html(jQuery('input'+inputClass+':checked').attr('title'));
			else selectedValue.html('-');
		}
	});
	paramLowerValue.click(function(){
		if(currStep > 0){
			currStep--;
			jQuery('.param-value .dragger', jQuery(this).parent()).css('left', step_arr[currStep]+'px');
			jQuery('input'+inputClass).each(function(counter){
				if(counter == currStep) jQuery(this).attr('checked', 'checked');
			});
			if(jQuery('input'+inputClass+':checked').attr('title') != '') selectedValue.html(jQuery('input'+inputClass+':checked').attr('title'));
			else selectedValue.html('-');
		}
	});
	
	return true;
}

//Calculations scripts
function getRingWeight(size, weightUnit){ //function to get weight of the ring
	return parseFloat(size) * parseFloat(weightUnit);
}
function getRingPrice(hallmarkPrice, size, stoneCount, stonePrice){ //function to get price of the ring
	return (parseFloat(hallmarkPrice) * size) + (stoneCount * stonePrice);
}
function calculateShowParams($, weightContainerId, priceContainerId, weightUnits, hallmarks, stonePrice, handJobPrices){ //Function to calculate and show weight and price
	size1 = parseFloat($('input.param-scroll-size-1:checked').val());
	size2 = parseFloat($('input.param-scroll-size-2:checked').val());
	hallmarkPrice = hallmarks[$('input.param-scroll-hallmark:checked').val()];
	stoneCount1 = parseInt($('input.param-scroll-brilliants-1:checked').val());
	stoneCount2 = parseInt($('input.param-scroll-brilliants-2:checked').val());
	price1 = getRingPrice(hallmarkPrice, getRingWeight(size1, weightUnits[0]), stoneCount1, stonePrice);
	price2 = getRingPrice(hallmarkPrice, getRingWeight(size2, weightUnits[1]), stoneCount2, stonePrice);
	price = price1 + price2 + handJobPrices[0] + handJobPrices[1];
	weight = getRingWeight(size1, weightUnits[0]) + getRingWeight(size2, weightUnits[1]);
	//Display calculations
	$('#'+weightContainerId).html( weight.toFixed(1) + '&nbsp;g.' );
	$('#'+priceContainerId).html( Math.ceil(price) + '&nbsp;Lt' );
	return true;
}

//Printing scripts
function showPrintPreview(j, printContainerId, hideContentId){
	j('<style media="screen"> #'+hideContentId+' { display: none; } </style>').appendTo('head');
	j('<style media="screen"> #'+printContainerId+' { display: block; } </style>').appendTo('head');
	return false;
}
function hidePrintPreview(j, printContainerId, hideContentId){
	j('<style media="screen"> #'+hideContentId+' { display: block; } </style>').appendTo('head');
	j('<style media="screen"> #'+printContainerId+' { display: none; } </style>').appendTo('head');
	/*j('#'+hideContentId).attr('display', 'block');
	j('#'+printContainerId).attr('display', 'none');*/
	return false;
}
