function spots01(){
    $(document).ready( function() {
    $('div#spot_articulos_interes').load('/Nebula/api/presentation_spot?category_id=3&cut=80');
    } );
}

function spots02(){
    $(document).ready( function() {
    $('div#spot_testimonios').load('/Nebula/api/presentation_spot?category_id=1&cut=120');
    } );
}

/**
 * esta funcion marca las opciones por defecto para el usuario actual
 * al ingresar una nueva ficha
 */
function ficha_paso1(ficha){
    var elemento1 = ficha.Circunferencia;
    var elemento2 = ficha.actividad;
    var elemento3 = ficha.descenso_deseado;

    $('#Circunferencia_' + elemento1).attr('checked', 'true');
    $('#actividad_' + elemento2).attr('checked', 'true');
    $('#descenso_deseado_' + elemento3).attr('checked', 'true');
}

/**
 * esta funcion marca las opciones por defecto para el usuario actual
 * al ingresar una nueva ficha
 */
function ficha_paso2(ficha_perfil){

    if(isset(ficha_perfil.actividad_fisica)){
        $('#actividad_fisica_' + ficha_perfil.actividad_fisica).attr('checked', 'true');
    }

    //lactancia_si,lactancia_no
//    if(isset(ficha_perfil.lactancia)){
//        $('#lactancia_' + ficha_perfil.lactancia).attr('checked', 'true');
//    }

    if(isset(ficha_perfil.embarazo)){
        $('#embarazo').attr('checked', 'true');
    }

    if(isset(ficha_perfil.lactancia)){
        $('#lactancia').attr('checked', 'true');
    }

    if(isset(ficha_perfil.vegetariano)){
        $('#vegetariano_' + ficha_perfil.vegetariano).attr('checked', 'true');
    }

    // Sufres algo de lo siguiente
    if(isset(ficha_perfil.Colesterol)){
        $('#Colesterol').attr('checked', 'true');
    }
    if(isset(ficha_perfil.Trigliceridos)){
        $('#Trigliceridos').attr('checked', 'true');
    }
    if(isset(ficha_perfil.Hipertension)){
        $('#Hipertension').attr('checked', 'true');
    }
    if(isset(ficha_perfil.Estrenimiento)){
        $('#Estrenimiento').attr('checked', 'true');
    }
    if(isset(ficha_perfil.Diabetes1)){
        $('#Diabetes1').attr('checked', 'true');
    }
    if(isset(ficha_perfil.Diabetes2)){
        $('#Diabetes2').attr('checked', 'true');
    }
    if(isset(ficha_perfil.Osteoporosis)){
        $('#Osteoporosis').attr('checked', 'true');
    }
    if(isset(ficha_perfil.Depresion)){
        $('#Depresion').attr('checked', 'true');
    }
    if(isset(ficha_perfil.Cardiaco)){
        $('#Cardiaco').attr('checked', 'true');
    }
    if(isset(ficha_perfil.ninguna_de_anteriores)){
        $('#ninguna_de_anteriores').attr('checked', 'true');
    }

    // Necesitas una dieta especial combinada con tu dieta de adelgazamiento:
    if(isset(ficha_perfil.dieta_rica_en_fibras)){
        $('#dieta_rica_en_fibras').attr('checked', 'true');
    }
    if(isset(ficha_perfil.dieta_baja_en_sal)){
        $('#dieta_baja_en_sal').attr('checked', 'true');
    }
    if(isset(ficha_perfil.dieta_baja_en_colesterol)){
        $('#dieta_baja_en_colesterol').attr('checked', 'true');
    }
    if(isset(ficha_perfil.dieta_baja_en_azucar)){
        $('#dieta_baja_en_azucar').attr('checked', 'true');
    }
    if(isset(ficha_perfil.dieta_no)){
        $('#dieta_no').attr('checked', 'true');
    }

    // Indica tus preferencias (marca los alimentos que no deseas en tu dieta):
    if(isset(ficha_perfil.noendieta_carnes_rojas)){
        $('#noendieta_carnes_rojas').attr('checked', 'true');
    }
    if(isset(ficha_perfil.noendieta_pescado)){
        $('#noendieta_pescado').attr('checked', 'true');
    }
    if(isset(ficha_perfil.noendieta_lacteos)){
        $('#noendieta_lacteos').attr('checked', 'true');
    }
    if(isset(ficha_perfil.noendieta_cerdo)){
        $('#noendieta_cerdo').attr('checked', 'true');
    }
    if(isset(ficha_perfil.noendieta_aves)){
        $('#noendieta_aves').attr('checked', 'true');
    }
    if(isset(ficha_perfil.noendieta_mariscos)){
        $('#noendieta_mariscos').attr('checked', 'true');
    }
    if(isset(ficha_perfil.noendieta_leche)){
        $('#noendieta_leche').attr('checked', 'true');
    }
    if(isset(ficha_perfil. noendieta_cordero)){
        $('#noendieta_cordero').attr('checked', 'true');
    }
    if(isset(ficha_perfil.noendieta_huevos)){
        $('#noendieta_huevos').attr('checked', 'true');
    }
    if(isset(ficha_perfil.noendieta_trigo)){
        $('#noendieta_trigo').attr('checked', 'true');
    }
}

function message_to(uid){
    //var src = '/NebulaChat/front/chat?uid=' + uid;
    var src = '/Members/Chat/index?uid=' + uid;
    var width = '420';
    var height = '400';
    orion_box.css_contenedor.height = '340px';
    //orion_box.css_over[background-color] = 'gray';
    orion_box.css_contenedor.top = '30%';
    orion_box.botonera = 0;
    orion_box.iframe(src, width, height);
}


