/* + Authorization + */
function showPopup() {
	$('#popup-under').show();
	$('#popup-out').fadeTo("slow", 1);
}
$(function(){
	$('#popup-out .close').click(function(){
		$('#popup-under').fadeOut("slow");
		$('#popup-out').fadeOut("slow");
	});
});
/* - Authorization - */

$(function(){
/* + custom radio buttons +  */
	var radio = '<img src="' + siteUrl + '/images/buttons/radio.png" class="radio-img" alt="" />';
	var radioActive = '<img src="' + siteUrl + '/images/buttons/radio-checked.png" class="radio-img radio-active" alt="" />';
	var radioSrc = siteUrl + "/images/buttons/radio.png";
	var radioActiveSrc = siteUrl + "/images/buttons/radio-checked.png";
	$('input.radio').each(function(n, element) {
		if ($(element).siblings('.radio-img').length) {
			return true;
		}
		$(element).css('display', 'none');
		var el = null;
		if ($(element).attr('checked') == true) {
			el = $(radioActive);
		} else {
			el = $(radio);
		}
		el.insertBefore(element);
		el.click(function() {
			$(this).next('input').click();
		});
	});
	$('.radio-img').click(function() {
		if ($(this).attr('src') == radioSrc) {
			$(this).siblings('input.radio').attr('checked', true);
		} else {
			$(this).siblings('input.radio').attr('checked', false);
		}
		$('.radio-img').each(function(n, element) {
			if ($(element).siblings('input.radio').attr('checked') == true) {
				$(element).attr('src', radioActiveSrc);
				$(element).addClass("radio-active");
			} else {
				$(element).attr('src', radioSrc);
				$(element).removeClass("radio-active");
			}
		});
	}); 
/* - custom radio buttons - */
});


// leadcupturemaster.com (c) 2011
function calcthis()
{ 
var planperc=0;
var depo = document.getElementById("deposit").value;
var perc = document.getElementById("percent").value;


if (perc == "perc1") {
	if (depo < 5)
		{
			alert ("Minimal investment for this plan is $5");
		}
	else
		{
		planperc=120;
		document.getElementById("inpvar1").innerHTML = planperc;
		document.getElementById("inpvar2").innerHTML = planperc * depo / 100;
	  	}
	};

if (perc == "perc2") {
	if (depo < 100)
		{
			alert ("Minimal investment for this plan is $100");
		}
	else
		{
		planperc=145;
		document.getElementById("inpvar1").innerHTML = planperc;
		document.getElementById("inpvar2").innerHTML = planperc * depo / 100;
	  	}
	};
}