//============ Default Vars
dafaultURL = 'http://dev2.algarweb.pt/infralobo/images/infralobo/pannels/';
imageDefault = 'default.jpg';
mainPannel = '.hoverPannels .span3';
fadeAnimation = 500;
sideDefault = '.span1.default';
// ===========coloca os paineis a 100% de altura
function sizeContent(){
if ($(mainPannel).height() < $(document).height()){
$(mainPannel).css('height', $(document).height()+'px'); }
if ($(sideDefault).height() < $(document).height()){
$(sideDefault).css('height', $(document).height()+'px'); }
}
// ========== em DOM READY coloca os apineis a 100% e ainda o backogrund 100%
$(document).ready(function(){
// ====== coloca a imagem no fundo default - funcção com os defaults
function setDefaultSetting(){
$.vegas({ src: dafaultURL+imageDefault ,fade:fadeAnimation });
$('.logo.defaultLogo ').css('opacity','1');}
// ======= on domn ready poe os defaults
setDefaultSetting();
// ===== coloca um ORVERLAY, ou seja, uma imagem por cima do backgroud
$.vegas('overlay', {src:'http://vegas.jaysalvat.com/js/vegas/overlays/06.png' });
// ===== paineis a 100%
sizeContent();
// ===== rollover Activa o Painel Actual e altera o fundo
$(mainPannel).live({
mouseover: function(){
$.vegas({ src: dafaultURL + this.id + ".jpg" , fade:fadeAnimation });
// ====== valida se o logo está o 1 painel se sim mantem visivel
if(this.id != "pannel1" ){
$('.logo.defaultLogo ').css('opacity','0');}
else{
$('.logo.defaultLogo ').css('opacity','1'); }
// ========= volta ao horiginal no rollout
}, mouseout: function(){
setDefaultSetting();
}
});
});
// ========= em rezise reajusta os paineis
$(window).resize(sizeContent);
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.