$(function(){
	$("#node-10 h2 a").click(function(){ $("#node-10 div.content").toggle("fast"); return false; });
	$("#photos").prependTo($("#sidebar-first-inner"));
	$("body.page-user #block-block-1").after('<div id="photos"><div class="ph"><div class="photo"><img src="/sites/default/files/Adam-Skate_America.gif" style="max-width: 160px;"><br><strong>Adam Rippon</strong></div></div></div>');
	$(".login_li").appendTo("#navigation #primary");
	//$("#edit-mail-wrapper").after($("#block-views-Registration-block_1"));
	//$("#edit-field-usfmbrtyp-value-wrapper").after($("#block-views-Registration-block_1"));
	
	$('.group-basic .field_member_type').prepend('<div class="expl"><strong>Competitive</strong> - Juvenile Free Skate thru Senior Free Skate test level. Includes one parent as SCNY member<br/><strong>Junior</strong> - No Test Through Pre-Juvenile Free Skate test level. Includes one parent as SCNY member<br/><strong>Adult</strong> - Age 18 or over and <strong>not</strong> competing at qualifying competitions<br /><strong>Introductory</strong> - For skaters who have never been member of US Figure Skating. Prior membership is a Basic Skills program is allowed. The introductory rate is good only for the first year of membership. SCNY membership for one parent is included<br /><strong>Test Only</strong> - No Test thru Senior test levels. No permission for competing or skating in exhibitions.<br /><strong>Collegiate</strong> - 4-Year Membership for college skaters; one time payment. No critiques.<br /><strong>Add&acute;l Family</strong> - For Parent or Non-Skating family Members who wish to be a member of US Figure Skating as well as The Skating Club of New York.</div>');
	
});

function googlecartWidgetLoaded(){
	$(".section-reg .field_member_type input").click(
		function(){
			//alert($(this).attr('checked')); 
			//googlecart.clear();
			//if ($(this).attr('selected')) {
			if ($(this).siblings("span.product").html()) {	
				//alert($(this).siblings("span.product").html());
				arrProduct = $(this).siblings("span.product").html().split('_');
				productID = arrProduct[0];
				productTitle = arrProduct[1];
				productPrice = arrProduct[2]; 
				firstName = $('.field_first_name input').val();
				lastName = $('.field_last_name input').val();
				skaterName = firstName + ' ' + lastName;
				formid = $("input[name=form_token]").val(); //alert(formid);
				googlecart.addItem(googlecart.makeItem({'title':productTitle,'price':productPrice},{'Skater Name':skaterName}));
				googlecartWidget.open();
			//Parent-SCNY only
			}
		}
	);
	

	
}
