function Blog(where){
$.ajax({
type: 'GET',
url: "/loja/scripts/blogRSS_WP.asp",
async: false,
contentType: "text/html",
beforeSend : function(){
$('.col-custom-'+where).html('
');
},
success: function(txtRetorno) {
$('.col-custom-'+where).html(txtRetorno)
},
error: function(e) {
// console.log(e.message);
$('.col-custom-'+where).html();
}
});
}
function Video(where,idVideo){
$('.col-custom-'+where).html(
'');
if($(".yt-info").length){
var url = 'http://gdata.youtube.com/feeds/api/videos/'+($(".yt-info").attr("id"))+'?v=2&alt=jsonc&callback=?';
$.ajax({
type: 'GET',
url: url,
async: false,
jsonpCallback: 'jsonCallback',
contentType: "application/json",
dataType: 'jsonp',
beforeSend : function(){
$(".yt-info").html('
');
},
success: function(json) {
//console.dir(json);
html = "";
html += ""+(json.data.title)+"
";
html += ""+(json.data.description.replace(/\n/g,"
"))+"
";
$(".yt-info").html(html)
},
error: function(e) {
// console.log(e.message);
$(".yt-info").html();
}
});
}
}
function Facebook(where, srcLikeBox) {
srcLikeBox = escape("https://www.facebook.com/midiograf");
var iframe = '';
$('.col-custom-' + where).html('Facebook
' + iframe);
}
function Depoimento(where){
$('.col-custom-'+where).html("");
/*
if(typeof(sessionStorage)=="object"){
if(typeof(sessionStorage)=="object"){ if(typeof(sessionStorage.getItem("objCategorias"))=="object" || typeof(sessionStorage.getItem("objCategorias"))=="string"){ if(sessionStorage.getItem("objCategorias")!=null){ objJSON = sessionStorage.getItem("objCategorias"); }}}}
if(typeof(sessionStorage.getItem("bitCarregandoListaCategorias"))=="string") if(sessionStorage.getItem("bitCarregandoListaCategorias")=="1") return false;
sessionStorage.setItem("bitCarregandoListaCategorias","1");
if(typeof(sessionStorage.getItem("txtDepoimentos"))=="string") txtUrl = sessionStorage.getItem("txtLojaURLAlias") + "jsons/lojaCategoriasSubcategorias.asp";
}
*/
$.ajax({
type: "GET",
url: "/loja/inc/comp_depoimentos.asp?sD=1&nV=2&numRegistros=5",
success: function (txtHTML) {
$('.col-custom-'+where).html(txtHTML);
var swpObj = new Swiper("DIV#innerDepoimentos DIV.swiper-container", {
paginationClickable: true,
loop: true,
autoplay: 6000
});
$("DIV#innerDepoimentos A.arrow-left").on("click", function (e) { e.preventDefault(); swpObj.swipePrev(); });
$("DIV#innerDepoimentos A.arrow-right").on("click", function (e) { e.preventDefault(); swpObj.swipeNext(); });
},
error: function (objError) {
$('.col-custom-'+where).html("");
}
});
}
function BibliotecaImagens(where,callback){
$(".col-custom-"+where).attr('id','box-depoimentos').html("");
$.ajax({
type: "GET",
url: "/loja/inc/comp_bibliotecaImagens.asp?sD=1&nV=2",
success: function (txtHTML) {
$(".col-custom-"+where).html(txtHTML);
if(typeof(callback)=="function")callback();
var swpObj = new Swiper(".col-custom-"+where+" DIV.swiper-container", {
paginationClickable: true,
loop: true,
autoplay: 6000,
slidesPerView : parseInt($("#main").width()/140)
});
$(".col-custom-"+where+" A.arrow-left").on("click", function (e) { e.preventDefault(); swpObj.swipePrev(); });
$(".col-custom-"+where+" A.arrow-right").on("click", function (e) { e.preventDefault(); swpObj.swipeNext(); });
$(".col-custom-"+where+" A.bibliotecaIMG-A").colorbox({rel:'bibliotecaIMG-A'});
},
error: function (objError) {
$(".col-custom-"+where).html("");
}
});
}