﻿//NOTICIAS
//Esta funcion se encarga de obtener las noticias
jQuery.fn.ObtenerUltimaNoticia = function(destino,lan) {

SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetLastNew', "enlace=noticiadetalle.html&lan="+lan, '#' + destino, 'bien', 'mal');

};


//Esta funcion se encarga de obtener las noticias
jQuery.fn.ObtenerNoticias = function(destino,lan) {

SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetNews', 'url=noticiadetalle.html&lan='+lan, '#' + destino, 'bien', 'mal');

};

//Esta funcion se encarga de obtener las categorias de noticias
jQuery.fn.ObtenerCategoriasNoticias = function(destino) {
SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetNewsCategories', 'urlNoticias=categoria-noticias.html', '#' + destino, 'bien', 'mal');
};

//Esta funcion se encarga de obtener las categorias de noticias
jQuery.fn.ObtenerNoticia = function(destino,id) {
    SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetNew', 'id='+ id, '#' + destino, 'bien', 'mal');
};

jQuery.fn.ObtenerNoticiasPorCategoria = function(destino, lan, categoria) {

SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetNewsByCategory', 'url=noticiadetalle.html&urlNoticias=noticias.html&lan=' + lan + '&categoria=' + categoria, '#' + destino, 'bien', 'mal');

};


jQuery.fn.ObtenerNombreCategoria = function(destino, id) {
SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetCategoryName', 'id=' + id, '#' + destino, 'bien', 'mal');
};


//RECETAS


//Esta funcion se encarga de obtener las RECETAS
jQuery.fn.ObtenerUltimaReceta = function(destino, lan) {

    SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetLastRecipe', "enlace=recetadetalle.html&lan=" + lan, '#' + destino, 'bien', 'mal');

};


//Esta funcion se encarga de obtener las recetas
jQuery.fn.ObtenerRecetas = function(destino, lan) {

    SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetRecipes', 'url=recetadetalle.html&lan=' + lan, '#' + destino, 'bien', 'mal');

};

//Esta funcion se encarga de obtener las categorias de recetas
jQuery.fn.ObtenerCategoriasRecetas = function(destino) {
    SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetRecipeCategories', 'urlRecetas=categoria-recetas.html', '#' + destino, 'bien', 'mal');
};



//Esta funcion se encarga de obtener las categorias de noticias
jQuery.fn.ObtenerReceta = function(destino, id) {
    SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetRecipe', 'id=' + id, '#' + destino, 'bien', 'mal');
};


jQuery.fn.ObtenerRecetasPorCategoria = function(destino, lan, categoria) {

SendRequest('http://basecook.pacifica.co/AjaxManager.asmx/GetRecipesByCategory', 'url=recetadetalle.html&urlRecetas=recetas.html&lan=' + lan + '&categoria=' + categoria, '#' + destino, 'bien', 'mal');

};
