$(document).ready(function(){

	$("#mnu_0").hover(function(){
		$("#mnu_0").animate({opacity: 0.4}, 'fast' );
		},function(){$("#mnu_0").animate({opacity: 1}, 'fast' );
		});		

	$("#mnu_1").hover(function(){
		$("#mnu_1").animate({opacity: 0.4}, 'fast' );
		},function(){$("#mnu_1").animate({opacity: 1}, 'fast' );
		});		

	$("#mnu_2").hover(function(){
		$("#mnu_2").animate({opacity: 0.4}, 'fast');
		},function(){$("#mnu_2").animate({opacity: 1}, 'fast' );
	    	});	
	
	$("#mnu_3").hover(function(){
		$("#mnu_3").animate({opacity: 0.4}, 'fast' );
		},function(){$("#mnu_3").animate({opacity: 1}, 'fast' );
	    	});		
		
	$("#mnu_4").hover(function(){
      		$("#mnu_4").animate({opacity: 0.4}, 'fast' );
		},function(){$("#mnu_4").animate({opacity: 1}, 'fast' );
	    	});		
		
	$("#mnu_5").hover(function(){
		$("#mnu_5").animate({opacity: 0.4}, 'fast' );
		},function(){$("#mnu_5").animate({opacity: 1}, 'fast' );
    		});
		
	$("#order_now1").hover(function(){
		$("#order_now1").attr("src", "images/cps_order_now_act.png");
		},function(){
    		$("#order_now1").attr("src", "images/cps_order_now.png");
		});

	$("#order_now2").hover(function(){
		$("#order_now2").attr("src", "images/cps_order_now_act.png");
		},function(){
    		$("#order_now2").attr("src", "images/cps_order_now.png");
		});

	if($("#content_box0_td").height() > $("#content_box1_td").height())
		$("#content_box1_td").height($("#content_box0_td").height());
	else 
		$("#content_box0_td").height($("#content_box1_td").height());

	center = $("body").width()/2;

	pos = $("#order_wait").css("left",(center-300)+"px");


});

var selected_plan;

function moreips(licenses){

	if(licenses>1)$("#moreips").fadeIn("slow");
	else $("#moreips").fadeOut("slow");

	for(i=1;i<=30;i++){

		if(i <= licenses)$("#ip_"+i).fadeIn("fast");
		else $("#ip_"+i).fadeOut("fast");
		
	}
	
}

function rolloverplanout(plan){

	$(document).ready(function(){

		if(plan != selected_plan){

			$("#"+plan).animate({backgroundColor: '#414449'}, 300, 
			function (){$("#"+plan).css("background-color","")});

		}

	});

}

function rolloverplanover(plan){

	$(document).ready(function(){

		if(plan != selected_plan){

			$("#"+plan).css("background-color","#414449");

			$("#"+plan).animate({backgroundColor: '#5c6066'}, 300);

		}

	});

}

function selectplan(plan,radiob){

	$(document).ready(function(){

		$(".plans").css("background-color","");

		selected_plan = plan;

		$("#"+selected_plan).css("background-color","#787e85");

		$("#"+radiob).attr("checked",true);

	});

}

function HowDidYouFindUsChanged(){

	if (document.order && document.order.how_did_you_find_us){

		var bCheck = GetComboValue(document.order.how_did_you_find_us) == 'other';

    		if(bCheck)
			$("#how_did_you_find_us_other_layer").slideDown();
    		else $("#how_did_you_find_us_other_layer").slideUp();

    		return true;
  	}

}

function PaymentTypeChanged(){

	if (document.order && document.order.billing_type){

		var bCheck = GetComboIndex(document.order.billing_type) == 3;

    		if(bCheck)
	    		$("#credit_card").slideUp();
    		else $("#credit_card").slideDown();

		return true;

  	}

}

function orderwait(aform){
	
	if(aform.nextstep.value == 4)
		$("#order_wait").fadeIn();

}