$(document).ready(function(){
						   
	$("#wph_periodo_table tr:even").css("background-color", "#FFFFCC");
	$("#wph_periodo_table tr:odd").css("background-color", "#FFFFFF");
	
	$("input[name='wh_periodo']").change(function(){
		$('.wph_ahorro').hide();
		$("#wph_periodo_table tr:even").css("background-color", "#FFFFCC");
		$("#wph_periodo_table tr:odd").css("background-color", "#FFFFFF");
		var IDperiodo = $("input[name='wh_periodo']:checked").attr("periodo");
		$("#wph_"+IDperiodo+"_tr").css("background-color", "#D2FF6A");
		var Ahorro = FormatPrecio($("input[name='wh_periodo']:checked").attr("ahorro") / 1);
		if(Ahorro.indexOf(separadorDecimal+"00") > -1){
			Ahorro = Ahorro.substring(0,Ahorro.indexOf(separadorDecimal+"00"));
		} 
		if(Ahorro != '0'){
			$('.wph_ahorro span').html(Ahorro);
			$('.wph_ahorro').fadeIn("300");
		}
	});
						   
	$('#btComprarHosting').click(function(event){
		if($("input[name='wh_periodo']:checked").size() > 0){
			firstTracker._trackEvent('UA_WordPressHosting', 'click_int', 'Compra Plan');
			document.forms['ComprarProductosForm'].submit();
		}else{
			alert('Por favor, seleccione un período de pago para poder agregar este producto a sus compras.');
			event.preventDefault();
		}
	});
						   
	$('.wph_link_ver_hosting_detalles, #tab_linux').click(function(){
		firstTracker._trackEvent('UA_WordPressHosting', 'click_int', 'Ver Detalles de Hosting en Tabs');
	});
	
	$('.wph_link_ver_diseños, .wph_box_themes a').click(function(){
		firstTracker._trackEvent('UA_WordPressHosting', 'click_ext', 'Ver Diseños Disponibles');
	});
	
	$('.wph_link_ver_plugins').click(function(){
		firstTracker._trackEvent('UA_WordPressHosting', 'click_ext', 'Ver Plugins Disponibles');
	});
	
	$('.wph_link_ver_pack_amigo').click(function(){
		firstTracker._trackEvent('UA_WordPressHosting', 'click_ext', 'Ver Pack Amigo');
	});
	
	$('.wh_faqs_links, .wh_faqs_links_ppal').click(function(){
		firstTracker._trackEvent('UA_WordPressHosting', 'click_ext', 'Ver FAQs');
	});
	
	$('.wph_link_ir_wp_site').click(function(){
		firstTracker._trackEvent('UA_WordPressHosting', 'click_ext', 'Ir al sitio de WordPress');
	});
	
	$('.wph_box_tutoriales a').click(function(){
		firstTracker._trackEvent('UA_WordPressHosting', 'click_ext', 'Ver Tutoriales en DA');
	});
});