// JavaScript Document

//var regFunc = new function() { executeActionSendAll("yc_registerFreeTrial"); };
//var altFunc = new function() { alert("You must agree to the Terms of Service and Privacy policy."); };
  
  

jQuery(document).ready(function(){
jQuery('.extra').attr('disabled','disabled');
var zeroPlanID = jQuery(":radio[name=planGrouph]").filter(":checked").attr('id');
jQuery('#resellerID').keyup(function(e){ 
	executeActionSendAll('yc_reCalcTotal');
});

jQuery(':radio[name=planGrouph]').click(function()
{    
    var selectedPlanID = jQuery(":radio[name=planGrouph]").filter(":checked").attr('id');
	var isMonth = false;

	if(selectedPlanID == zeroPlanID)
	{
         jQuery('.extra').attr('disabled','disabled');
		 jQuery('select.extra').each(function(){
              this.selectedIndex = 0;											  
		 });
	}else 
	{
         jQuery('.extra').removeAttr('disabled');
	}
	executeActionSendAll('yc_reCalcTotal');
	
	var selectedPlanID = jQuery(":radio[name=planGrouph]").filter(":checked").attr('value');
	executeAction('yc_checkPlanCustomSolution', selectedPlanID);
});
  	//jQuery('#send').bind('click', altFunc);
});

//Here we check if we need to install solution for selected plan
var selectedPlanID = jQuery(":radio[name=planGrouph]").filter(":checked").attr('value');
executeAction('yc_checkPlanCustomSolution', selectedPlanID);

/*function agreement()
{
	if( !jQuery('#agree_check').attr('checked') ){
		jQuery('#registerBtn').attr('src','/imgs/younicycle_com/younicycle.com/buttons/register_now_active.gif');
		//jQuery('#send').attr('disabled','disabled');
	  	//jQuery('#send').unbind('click', regFunc);
	  	//jQuery('#send').bind('click', altFunc);
	  	//jQuery('#send').unbind('click', registerFunc);	
	  	//jQuery('#send').bind('click', alertFunc);
	  	
	} else{
		jQuery('#registerBtn').attr('src','/imgs/younicycle_com/younicycle.com/buttons/register_now.gif');
		//jQuery('#send').removeAttr('disabled');
	  	jQuery('#send').unbind('click', altFunc);
	  	jQuery('#send').bind('click', regFunc);
	  	jQuery('#send').unbind('click', alertFunc);	
	  	jQuery('#send').bind('click', registerFunc);
	}
}*/


