Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Ola, estou com problemas de desempenho em meu site, em relação as animações feitas em javascript na parte do Portifólio > Albuns do mesmo.
Ele da umas travadas na troca de quadros e gostaria de saber se alguém sabe o que poderia estar ocasionando isso.(No caso testei com o IE10,Chrome e Firefox e somento o IE não teve problemas quanto a isso.)
o site é este:
www.noehosokawafotografia.com.br
Obrigado desde já.
jsbook.js
$(document).ready(function() {
//Variaveis de CallBack/Chave de Ligação(ON/OFF):
slidebot=0;
imageBGL=0;
backgroundCB=0;
backgroundbot=0;
menubot=0;
MenuOnClickbot=0;
//Variaveis de Busca:
BODY=$("body");
BACK=$("#BACK");
BACKaudiobottonLeft=$("#BACKaudiobottonLeft");
BACKaudiobottonRight=$("#BACKaudiobottonRight");
BACKMedia=$("#BACKMedia");
BACKMediaEffect=$("#BACKMediaEffect");
TOPLogo=$(".TOPLogo");
TOPMenu=$(".TOPMenu");
BSubMenu=$("#BSubMenu");
BMenu=$(".BMenu");
LoadPage=$("#LoadPage");
SubBGLoad=$("#SubBGLoad");
SubBGImg=$("#SubBGImg");
//MediaPlayer()
BACKaudioplayer=$("#BACKaudioplayer");
BACKaudiobottonLeft=$("#BACKaudiobottonLeft");
BACKaudiobottonRight=$("#BACKaudiobottonRight");
BACKaudiotitle=$("#BACKaudiotitle");
//Pb2()
});
jsaction.js:
$(document).ready(function() {
CheckMobile();
//--------------Media Player----------------------------------
BACKaudiobottonLeft.animate({opacity: 0.55},0);
BACKaudiobottonLeft.mouseover(function(){ BACKaudiobottonLeft.animate({opacity: 1},210) });
BACKaudiobottonLeft.mouseout(function(){ BACKaudiobottonLeft.animate({opacity: 0.55},210) });
BACKaudiobottonRight.animate({opacity: 0.55},0);
BACKaudiobottonRight.mouseover(function(){ BACKaudiobottonRight.animate({opacity: 1},210) });
BACKaudiobottonRight.mouseout(function(){ BACKaudiobottonRight.animate({opacity: 0.55},210) });
//---------------HOME----------------------------------------
BACKMedia.hide();
BACKMediaEffect.mouseover(function(){
BACKMediaEffect.fadeOut(210,function(){
BACKMedia.fadeIn(210);
});
});
BACKMedia.mouseleave(function(){
BACKMedia.fadeOut(210,function(){
BACKMediaEffect.delay(420).fadeIn(210);
});
});
//--------------Ocultar/Mostrar Menu e Barra de Fundo-------------
TOPLogo.click(function(){
if(backgroundCB==1){ return }
$.vegas('stop');
if(menubot==0){
TOPMenu.fadeOut("slow");
BACK.fadeOut("slow");
menubot=1;
}else{
TOPMenu.fadeIn("slow");
BACK.fadeIn("slow");
menubot=0;
};
});
//--------------Botões do Menu--------------
DefaultColor=TOPMenu.find('ul li').css("backgroundColor");
TOPMenu.find("ul li").mouseover(function(){
$(this).animate({color: 'rgba(255,255,255,0.89)', backgroundColor: 'rgba(51,51,51,0.42)'},250);
});
TOPMenu.find("ul li").mouseleave(function(){
$(this).animate({color: 'rgba(0,0,0, 0.68);', backgroundColor: DefaultColor},160);
});
//-------Ações dos Botões do Menu---------
//HOME
TOPMenu.find("ul #H").click(function(){
if(backgroundCB==1 || MenuOnClickbot==0){ return }
backgroundCB=1;
MenuOnClickbot=0;
$.vegas('stop');
vegasbg(1);
BODY.find('#MIDP')
.fadeOut(1100)
.end()
.find('#MIDF')
.fadeOut(1100)
.end()
.find('#MIDC')
.fadeOut(1100)
.end()
.find("#SubBGLoad img")
.remove()
.end()
.find("#SubBGImg div")
.fadeOut(1100, function(){
$("#SubBGImg div").remove();
backgroundbot=0;
backgroundCB=0;
});
if(slidebot==1){ Pb2Slideshow(); };
});
//PORTIFOLIO
TOPMenu.find("ul #P").click(function(){
if(backgroundCB==1 || MenuOnClickbot==1){ return }
backgroundCB=1;
MenuOnClickbot=1;
$.vegas('stop');
vegasbg(2,bgpages[0],2);
});
//O FOTOGRAFO
TOPMenu.find("ul #F").click(function(){
if(backgroundCB==1 || MenuOnClickbot==2){ return }
backgroundCB=1;
MenuOnClickbot=2;
$.vegas('stop');
vegasbg(2,bgpages[1],3);
});
//CONTATO
TOPMenu.find("ul #C").click(function(){
if(backgroundCB==1 || MenuOnClickbot==3){ return }
backgroundCB=1;
MenuOnClickbot=3;
$.vegas('stop');
vegasbg(2,bgpages[2],4);
});
//BLOG SubMenu
BSubMenu.hide().css({"visibility":"visible"});
BMenu.mouseover(function(){
var H=BMenu.find("#B").css("height");
var ObjTop=parseInt(BMenu.find("#B").offset().top) + parseInt(TOPMenu.css("height"));
var ObjLeft=BMenu.find("#B").offset().left;
BMenu.find('#BSubMenu')
.css({"top": ObjTop , "left": ObjLeft})
.end()
.animate({color: 'rgba(255,255,255,0.89)', backgroundColor: 'rgba(51,51,51,0.42)'},250)
.end()
.find('#BSubMenu')
.show();
});
BMenu.mouseleave(function(){
BMenu.find('#BSubMenu').hide();
});
});
jsfunction.js
function vegasbg(type,bgpages,option) {
$.vegas('stop');
if(type==1){
$.vegas( 'slideshow', {
delay: 5000,
backgrounds: [
homebg[0],homebg[1],homebg[2],homebg[3],homebg[4],homebg[5],homebg[6],homebg[7],homebg[8],homebg[9],homebg[10],
homebg[11],homebg[12],homebg[13],homebg[14],homebg[15],homebg[16],homebg[17],homebg[18],homebg[19],homebg[20],
homebg[21],homebg[22],homebg[23],homebg[24],homebg[25],homebg[26],homebg[27],homebg[28],homebg[29],homebg[30],
homebg[31],homebg[32],homebg[33],homebg[34],homebg[35],homebg[36],homebg[37],homebg[38],homebg[39],homebg[40],
homebg[41],homebg[42],homebg[43],homebg[44],homebg[45],homebg[46],homebg[47],homebg[48],homebg[49],homebg[50],
homebg[51],homebg[52],homebg[53],homebg[54],homebg[55],homebg[56],homebg[57],homebg[58],homebg[59],homebg[60],
homebg[61],homebg[62],homebg[63],homebg[64],homebg[65],homebg[66],homebg[67],homebg[68],homebg[69],homebg[70],
homebg[71],homebg[72],homebg[73],homebg[74],homebg[75],homebg[76],homebg[77],homebg[78],homebg[79],homebg[80],
homebg[81],homebg[82],homebg[83],homebg[84],homebg[85],homebg[86],homebg[87],homebg[88],homebg[89],homebg[90],
homebg[91],homebg[92],homebg[93],homebg[94],homebg[95],homebg[96],homebg[97],homebg[98],homebg[99],homebg[100]
],
walk:function(step) {
imageBGL++;
if(imageBGL==1){ LoadPage.fadeOut(1000);
//audio[0].play();
}
}
});
return
};
if(type==2){pagein.html('<img id="loading" src="image/loading.gif" width="16" height="16" style="margin-top: 21px; margin-left: 21px; " />').show()
SubBGLoad.html('<img src="" width="32" height="32" style="visibility:hidden" />')
.find("img")
.attr({'src': bgpages })
.load(function(){ buscapage() });
function buscapage(){
$.ajax({
type:"POST",
url: page,
data:{ Na:"Na" },
success: function(r){
var obj=SubBGLoad;
var obj2=SubBGImg;
resizeBG();
if(backgroundbot==0){
SubBGImg.css({"visibility":"visible"})
.html('<div style="background-position:center; background-size:'+value+'; background-repeat:no-repeat; position:fixed; width:'+valuew+'; height:'+valueh+'"></div>')
.find("div")
.hide()
.css({'background-image':'url('+bgpages+')'})
.fadeIn(1100,function(){
$("#SubBGLoad img").remove();
pagein.hide()
.html(r)
.fadeIn(1100,function(){
backgroundCB=0;
if(option<=2){
ChangeWindowSize();
setTimeout(function() { ChangeWindowSize(); },7); //Devido ao atraso dos Codigos do Media Player
}
});
});
backgroundbot=1;
}else{
var info=SubBGImg.html();
BODY.find("#SubBGImg")
.html(info+'<div style="background-position:center; background-size:'+value+'; background-repeat:no-repeat; position:fixed; width:'+valuew+'; height:'+valueh+'"></div>')
.end()
.find("#SubBGImg div").next()
.hide()
.css({'background-image':'url('+bgpages+')'})
.fadeIn(1100,function(){
$("#SubBGImg div").first().remove();
$("#SubBGLoad img").remove();
pagein.hide().html(r).fadeIn(1100,function(){
backgroundCB=0;
if(option<=2){
ChangeWindowSize();
setTimeout(function() { ChangeWindowSize(); },7); //Devido ao atraso dos Codigos do Media Player
}
});
});
}
}
});
if(slidebot==1){ Pb2Slideshow(); };
};
return
};
};
//--------------Media Player----------------------------------
function MediaPlayer() {
$("#BACKaudioplayer").mediaelementplayer({
alwaysShowControls: true,
features: ['playpause'] ,
audioWidth: 13,
audioHeight: 21
});
audio = $('#BACKaudioplayer');
numtracks=numtracksdb;//audio[0].play();
$("#BACKaudiobottonLeft").click(function(){
var L=$("#BACKaudiobottonLeft").attr("class");
var R=$("#BACKaudiobottonRight").attr("class");
var medianame=$("#BACKplaylist #"+L+" a").html();
$("#BACKaudiotitle").html(medianame);
audio[0].src = $("#BACKplaylist #"+L+" a").attr("href");
if(L>1){ $("#BACKaudiobottonLeft").attr({'class': parseInt(L)-1}) }else{ $("#BACKaudiobottonLeft").attr({'class': numtracks}) };
if(R>1){ $("#BACKaudiobottonRight").attr({'class': parseInt®-1}) }else{ $("#BACKaudiobottonRight").attr({'class': numtracks}) };
audio[0].load();
audio[0].play();
});
$("#BACKaudiobottonRight").click(function(){
var L=$("#BACKaudiobottonLeft").attr("class");
var R=$("#BACKaudiobottonRight").attr("class");
var medianame=$("#BACKplaylist #"+R+" a").html();
$("#BACKaudiotitle").html(medianame);
audio[0].src = $("#BACKplaylist #"+R+" a").attr("href");
if(L<numtracks){ $("#BACKaudiobottonLeft").attr({'class': parseInt(L)+1}) }else{ $("#BACKaudiobottonLeft").attr({'class': 1}) };
if(R<numtracks){ $("#BACKaudiobottonRight").attr({'class': parseInt®+1}) }else{ $("#BACKaudiobottonRight").attr({'class': 1}) };
audio[0].load();
audio[0].play();
});
audio[0].addEventListener('ended',function(){
L=$("#BACKaudiobottonLeft").attr("class");
R=$("#BACKaudiobottonRight").attr("class");
var medianame=$("#BACKplaylist #"+R+" a").html();
$("#BACKaudiotitle").html(medianame);
audio[0].src = $("#BACKplaylist #"+R+" a").attr("href");
if(L<numtracks){ $("#BACKaudiobottonLeft").attr({'class': parseInt(L)+1}) }else{ $("#BACKaudiobottonLeft").attr({'class': 1}) };
if(R<numtracks){ $("#BACKaudiobottonRight").attr({'class': parseInt®+1}) }else{ $("#BACKaudiobottonRight").attr({'class': 1}) };
audio[0].load();
audio[0].play();
});
audio[0].addEventListener('play',function(){
for (x=1; x<=5; x++){
var gif = x+".gif";
var dir = "./image/media/mediaON/";
var arqtype = ".gif";
$("#BACKMediaEffect #"+x).attr({"src": dir+x+arqtype});
};
});
audio[0].addEventListener('pause',function(){
for (x=1; x<=5; x++){
var gif = x+".gif";
var dir = "./image/media/mediaOFF/";
var arqtype = ".gif";
$("#BACKMediaEffect #"+x).attr({ "src": dir+x+arqtype });
};
});
};
//--------Funções de Eventos ajax()/POST-------------
//PORTIFOLIO
function P() {
Pag1CordenadaX=0;
Pag2CordenadaX=0;
//--------Pagina 1--------
//$(".MIDPortifolioAlbunsContainerG").css({ width: AlbunsW+"px" }) //567px cada quadro
//--------Menu---------
$(".MIDPortifolioMenuAlbuns div").mouseover(function(){
$(this).animate({ backgroundColor: 'rgba(255,255,255,0.08)' }, 250);
});
$(".MIDPortifolioMenuAlbuns div").mouseleave(function(){
$(this).animate({ backgroundColor: 'rgba(255,255,255,0.0)' }, 160);
});
//-------Botões Album---------------
$("#MIDPortifolioAlbunsBotL img").click(function(){
var divwidth=parseInt($("#MIDPortifolioAlbunsContainer").css('width'));
var divwidthlimit=parseInt($(".MIDPortifolioAlbunsContainerG").first().css('width'));
if(Pag1CordenadaX+divwidth >= 0){ Pag1CordenadaX=0; }else{ Pag1CordenadaX=Pag1CordenadaX+divwidth; };
$(".MIDPortifolioAlbunsContainerG").animate({ marginLeft: Pag1CordenadaX+"px" }, 550);
})
$("#MIDPortifolioAlbunsBotR img").click(function(){
var divwidth=parseInt($("#MIDPortifolioAlbunsContainer").css('width'));
var divwidthlimit=-parseInt($(".MIDPortifolioAlbunsContainerG").first().css('width'));
if(Pag1CordenadaX-divwidth <= divwidthlimit+divwidth) { Pag1CordenadaX=divwidthlimit+divwidth; }else{ Pag1CordenadaX=Pag1CordenadaX-divwidth; }
$(".MIDPortifolioAlbunsContainerG").animate({ marginLeft: Pag1CordenadaX+"px" }, 550);
})
//---
Pb1();
//---
$(".MIDPortifolioMenuAlbuns div").click(function(){
var id=$(this).attr('id');
$.ajax({
type:"POST",
url:"Pb1.php",
data:{ Album:id },
beforeSend: function(){
$('#MIDPortifolioAlbunsContainer').html('<img id="loading" src="image/loading.gif" width="21" height="21" style="margin-top: 25%" />');
},
success: function(r){
$('#MIDPortifolioAlbunsContainer').hide().html(r);
},
complete: function(){
$('#MIDPortifolioAlbunsContainer').fadeIn(550);
}
});
});
};
//#MIDPortifolioAlbunsContainerBook
function Pb1() {
$(".MIDPortifolioAlbunsContainerG").css({ width: AlbunsW+"px" });
$(".MIDPortifolioAlbunsContainerG").find("#MIDPortifolioAlbunsContainerBookImg img").load(function(){ $(this).hide().css({"visibility":"visible"}).fadeIn("slow"); });
$(".MIDPortifolioAlbunsContainerG #MIDPortifolioAlbunsContainerBook").mouseover(function(){
$(this).animate({ opacity: 1 }, 250);
});
$(".MIDPortifolioAlbunsContainerG #MIDPortifolioAlbunsContainerBook").mouseleave(function(){
$(this).animate({ opacity: 0.55 }, 160);
});
//---
$("#MIDPortifolioAlbunsContainerG #MIDPortifolioAlbunsContainerBook").click(function(){
var albumname=$(this).attr('albumname');
$.ajax({
type:"POST",
url:"Pb2.php",
data:{ Album:albumname },
beforeSend: function(){
$('#MIDPortifolioPag2').html('<img id="loading" src="image/loading.gif" width="16" height="16" style="margin-top: 21px; margin-left: 21px" />').show();
},
success: function(r){
$('#MIDPortifolioPag2').hide().html(r);
$('.MIDPortifolio').animate({backgroundColor:'rgba(4,2,4,0)'},550);
$('#MIDPortifolioPag1').fadeOut(550,function(){
$('#MIDPortifolioPag2').fadeIn(550);
ChangeWindowSize();
setTimeout(function() { ChangeWindowSize(); },7); //Devido ao atraso dos Codigos do Media Player
});
}
});
});
};
//#MIDPortifolioPag2
function Pb2() {
MIDPortifolioImageMenuAlbumBookSmallG=$(".MIDPortifolioImageMenuAlbumBookSmallG");
MIDPortifolioImageMenuAlbumBookSmallImgLoading=$(".MIDPortifolioImageMenuAlbumBookSmallImgLoading");
MIDPortifolioImageMidMenuImgBot=$(".MIDPortifolioImageMidMenuImgBot");
MIDPortifolioImageMenuAlbumBookSmall=$("#MIDPortifolioImageMenuAlbumBookSmall");
var obj=$("#MIDPortifolioImageMenuAlbumBookSmallG .MIDPortifolioImageMenuAlbumBookSmallImgLoading");
var obj2=$("#MIDPortifolioImageMenuAlbumBookSmallG2 .MIDPortifolioImageMenuAlbumBookSmallImgLoading");
var limit=parseInt(obj.length + obj2.length);
var imagefile=Array(0);
var imageobj=Array(0);
imagefile[0]=limit;
imageobj[0]=limit;
for(x=1; limit >= x; x++){
if(x%2 != 0){
imagefile[x]= obj.attr('file');
imageobj[x]= obj;
var obj=obj.next();imagefile[x]= obj2.attr('file');
imageobj[x]= obj2;
var obj2=obj2.next();
};
};
var jump=1;
ImageLoad();
function ImageLoad() {
if(jump <= limit){
imageobj[jump].find("img").first().attr({'src': imagefile[jump] }).load(function(){
if(jump==1){
resizeBG();
var info=SubBGImg.html();.find("#SubBGImg div").next()
.hide()
.css({'background-image':'url('+imagefile[jump]+')'})
.fadeIn(1100,function(){
SubBGImg.find("div")
.first()
.remove()
.end()
.find("img")
.remove();
ImgAnimedCallBack01=0;
});
imageobj[jump]
.animate({ opacity: 1 })
.end()
.find("#"+jump)
.hide()
.css({'background-image':'url('+imagefile[jump]+')'})
.fadeIn(300, function(){
imageobj[jump].first().attr({'class':'MIDPortifolioImageMenuAlbumBookSmallImg', 'type':'On'});
jump++;
ImageLoad();
});imageobj[jump]
.animate({ opacity: 0.55 })
.end()
.find("#"+jump)
.hide()
.css({'background-image':'url('+imagefile[jump]+')'})
.fadeIn(300, function(){
imageobj[jump].first().attr({'class':'MIDPortifolioImageMenuAlbumBookSmallImg'});
jump++;
ImageLoad();
});
};
});
};
};
//--------Book Images---------
MIDPortifolioImageMenuAlbumBookSmallImgLoading.mouseover(function(){
var typeimg=$(this).attr('type');
if(typeimg!="On"){
$(this).animate({ opacity: 1 }, 250);
};
});
MIDPortifolioImageMenuAlbumBookSmallImgLoading.mouseleave(function(){
var typeimg=$(this).attr('type')
if(typeimg!="On"){
$(this).animate({ opacity: 0.55 }, 160);
};
});
ImgAnimedCallBack01=0;
MIDPortifolioImageMidMenuImgBot.find("#L").click(function(){
if(ImgAnimedCallBack01!=1){
ImgAnimedCallBack01=1;
var imgidloop=$(".MIDPortifolioImageMenuUnit span").attr("id");
if(imgidloop <= 1){ var imgidloop=maximgloop; }else{ var imgidloop=parseInt(imgidloop)-1; };
var imagecheck=MIDPortifolioImageMenuAlbumBookSmallG.find("#"+imgidloop).attr('class');
if(imagecheck=="MIDPortifolioImageMenuAlbumBookSmallImgLoading"){ ImgAnimedCallBack01=0; return};
var file=MIDPortifolioImageMenuAlbumBookSmallG.find("#"+imgidloop).attr('file');
AnimationPb2(imgidloop,file,1);
};
});
MIDPortifolioImageMidMenuImgBot.find("#R").click(function(){
if(ImgAnimedCallBack01!=1){
ImgAnimedCallBack01=1;
var imgidloop=$(".MIDPortifolioImageMenuUnit span").attr("id");
if(imgidloop >= maximgloop){ var imgidloop=parseInt(1); }else{ var imgidloop=parseInt(imgidloop)+1; };
var imagecheck=MIDPortifolioImageMenuAlbumBookSmallG.find("#"+imgidloop).attr('class');
if(imagecheck=="MIDPortifolioImageMenuAlbumBookSmallImgLoading"){ ImgAnimedCallBack01=0; return};
var file=MIDPortifolioImageMenuAlbumBookSmallG.find("#"+imgidloop).attr('file');
AnimationPb2(imgidloop,file,1);
};
});
//-------Botões Book---------------
$("#MIDPortifolioImageMenuAlbumBookBot #L").click(function(){
var divwidth=parseInt(MIDPortifolioImageMenuAlbumBookSmall.css('width'));
var divwidthlimit=parseInt(MIDPortifolioImageMenuAlbumBookSmallG.first().css('width'));
if(Pag2CordenadaX+divwidth >= 0){ Pag2CordenadaX=0; }else{ Pag2CordenadaX=Pag2CordenadaX+divwidth; };
MIDPortifolioImageMenuAlbumBookSmallG.animate({ marginLeft: Pag2CordenadaX+"px" }, 550);
});
$("#MIDPortifolioImageMenuAlbumBookBot #R").click(function(){
var divwidth=parseInt(MIDPortifolioImageMenuAlbumBookSmall.css('width'));
var divwidthlimit=-parseInt(MIDPortifolioImageMenuAlbumBookSmallG.first().css('width'));
if(Pag2CordenadaX-divwidth <= divwidthlimit+divwidth) { Pag2CordenadaX=divwidthlimit+divwidth; }else{ Pag2CordenadaX=Pag2CordenadaX-divwidth; };
MIDPortifolioImageMenuAlbumBookSmallG.animate({ marginLeft: Pag2CordenadaX+"px" }, 550);
});
//-------Ações das Imagens do Book-------
MIDPortifolioImageMenuAlbumBookSmallImgLoading.click(function(){ //.MIDPortifolioImageMenuAlbumBookSmallImg com busca pelo primeiro nome setado
var typeimg=$(this).attr('type');
var imagecheck=$(this).attr('class');
if(imagecheck=="MIDPortifolioImageMenuAlbumBookSmallImgLoading"){return};
if(typeimg!="On" && ImgAnimedCallBack01!=1){
ImgAnimedCallBack01=1;
var file=$(this).attr('file');
var imgidloop=$(this).attr('id');
$(this).attr({ class:"MIDPortifolioImageMenuAlbumBookSmallImgOn",type:"On" })
.css({ opacity:"1"});
AnimationPb2(imgidloop,file,2)
};
});
//-----Desliguar/Ligar SlideShow-------
slidebot=1;
slideshow=setInterval("Pb2Slideshow(1)", 5000);
$("#MIDPortifolioImageMidMenuSlideshowBot").click(KeySlideShow);
//-----Botão 'Voltar'-------
$("#MIDPortifolioImageMidMenuVoltarP1").click(function(){
if(ImgAnimedCallBack01==1){ return }
resizeBG();
var info=SubBGImg.html();
BODY.find("#SubBGImg")
.html(info+'<div style="background-position:center; background-size:'+value+'; background-repeat:no-repeat; position:fixed; width:'+valuew+'; height:'+valueh+'"></div>')
.end()
.find("#SubBGImg div").next()
.hide()
.css({'background-image':'url('+bgpages[0]+')'})
.fadeIn(890,function(){
SubBGImg.find("div")
.first()
.remove()
.end()
.find("img")
.remove();
$(".MIDPortifolio")
.find("#MIDPortifolioPag1")
.fadeIn(890)
.end()
.animate({backgroundColor:'rgba(4,2,4,1)'},890);
ImgAnimedCallBack01=0;
});
$("#MIDPortifolioPag2").fadeOut(550);
if(slidebot==1){ Pb2Slideshow(); };
});
};
//Chave do SlideShow
function KeySlideShow() {
if(slidebot==1){
$(this).text("SlideShow: Desligado");
clearInterval(slideshow);
slidebot=0;$(this).text("SlideShow: Ligado");
slideshow=setInterval("Pb2Slideshow(1)", 5000);
slidebot=1;};
};
//Animação de Quadros do Pb2()
function AnimationPb2(imgidloop,file,type){
if(type==1){.find(".MIDPortifolioImageMenuAlbumBookSmallImg")
.attr({ type:"Off" })
.animate({ opacity: 0.55 }, 160)
.end()
.find(".MIDPortifolioImageMenuAlbumBookSmallImgOn")
.attr({ class:"MIDPortifolioImageMenuAlbumBookSmallImg" });
resizeBG();
var info=SubBGImg.html();.find("#SubBGImg div").next()
.hide()
.css({'background-image':'url('+file+')'})
.fadeIn(1100,function(){
SubBGImg.find("div")
.first()
.remove()
.end()
.find("img")
.remove();
ImgAnimedCallBack01=0;
});
$(".MIDPortifolioImageMenuUnit span").text(imgidloop).attr({id:imgidloop});
return
}else
if(type==2){
MIDPortifolioImageMenuAlbumBookSmallG.find(".MIDPortifolioImageMenuAlbumBookSmallImg")
.attr({ type:"Off" }).animate({ opacity: 0.55 }, 160)
.end()
.find(" .MIDPortifolioImageMenuAlbumBookSmallImgOn")
.attr({ class:"MIDPortifolioImageMenuAlbumBookSmallImg" });
resizeBG();
var info=SubBGImg.html();.find("#SubBGImg div").next()
.hide()
.css({'background-image':'url('+file+')'})
.fadeIn(1100,function(){
SubBGImg.find("div")
.first()
.remove()
.end()
.find("img")
.remove();
ImgAnimedCallBack01=0;
});
$(".MIDPortifolioImageMenuUnit span").text(imgidloop).attr({id:imgidloop})
return
}else return
}
//Loop Pb2 de Imagens - SlideShow
function Pb2Slideshow(type){
if(type==1){
if(ImgAnimedCallBack01!=1){
ImgAnimedCallBack01=1;
var imgidloop=$(".MIDPortifolioImageMenuUnit span").attr("id");
if(imgidloop >= maximgloop){ var imgidloop=parseInt(1); }else{ var imgidloop=parseInt(imgidloop)+1; };
var imagecheck=MIDPortifolioImageMenuAlbumBookSmallG.find("#"+imgidloop).attr('class');
if(imagecheck=="MIDPortifolioImageMenuAlbumBookSmallImgLoading"){ ImgAnimedCallBack01=0; return};
var file=MIDPortifolioImageMenuAlbumBookSmallG.find("#"+imgidloop).attr('file');
AnimationPb2(imgidloop,file,1);};
};
function resizeBG() {
if(screen.width-9 == $(window).width()){ var w = screen.width; }else{ var w = $(window).width(); }; if(w<1025){var w = 1025;};
var h = $(window).height(); if(h<653){var h = 653;};{ value='auto '+h+'px'; valuew = w+'px'; valueh= h+'px';};
}
function CheckMobile(){
var a=navigator.userAgent||navigator.vendor||window.opera;
var b='mobile.php';
if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))window.location=b};Já resolvi. Obrigado pelo suporte maykonm.
Pode Fechar o Tópico.
Se possível poderiam estar excluindo este tópico?
Tópicos não duplicados e não caracterizados como SPAM não são excluídos.
Atenciosamente
Mostra ai o código da página. Aparentemente tem algum problema no load das imagens.