var placeThumb = false;
var dataImages = [
{ url: 'spectacles/AudreyVernon-2006-LeSpectacleLePlusDroleDuMonde-1.jpg', width: 720, height: 404,
  video: 'spectacles/AudreyVernon-2006-LeSpectacleLePlusDroleDuMonde-1.avi',
  label: 'Le spectacle le plus drôle du monde / Partie 1' },
{ url: 'spectacles/AudreyVernon-2006-LeSpectacleLePlusDroleDuMonde-2.jpg', width: 720, height: 404,
  video: 'spectacles/AudreyVernon-2006-LeSpectacleLePlusDroleDuMonde-2.avi',
  label: 'Le spectacle le plus drôle du monde / Partie 2'  },
{ url: 'spectacles/AudreyVernon-2006-LeSpectacleLePlusDroleDuMonde-3.jpg', width: 720, height: 404,
  video: 'spectacles/AudreyVernon-2006-LeSpectacleLePlusDroleDuMonde-3.avi',
  label: 'Le spectacle le plus drôle du monde / Partie 3'  },
{ url: 'spectacles/AudreyVernon-2006-LeSpectacleLePlusDroleDuMonde-4.jpg', width: 720, height: 404,
  video: 'spectacles/AudreyVernon-2006-LeSpectacleLePlusDroleDuMonde-4.avi',
  label: 'Le spectacle le plus drôle du monde / Partie 4'  },
{ videotype: 'dailymotion', width: 608, height: 459,
  video: 'http://www.dailymotion.com/swf/xapacp',
  label: 'Le spectacle le plus drôle du monde - Bonus : Scorpions'  },
{ videotype: 'dailymotion', width: 608, height: 459,
  video: 'http://www.dailymotion.com/swf/xapagf',
  label: 'Le spectacle le plus drôle du monde - Bonus : Michel Drucker'  },
{ videotype: 'youtube', width: 608, height: 459,
  video: 'http://www.youtube.com/v/tEcScn9Kt68',
  label: 'France 3 - Invitée de Ce soir ou jamais'  },
{ videotype: 'dailymotion', width: 720, height: 404,
  video: 'http://www.dailymotion.com/swf/video/xhowbx?width=720&theme=none&foreground=%23AE3131&highlight=%23BE4141&background=%23000000',
  label: 'Ce soir ou jamais - 16 mars 2011' },
{ url: 'divers/AudreyVernon@J.tCanalPlus-20111220midi-ByRozebud.jpg', width:500, height:281,
  video: 'divers/AudreyVernon@J.tCanalPlus-20111220midi-ByRozebud.avi' ,
  label: 'Canal plus - Journal'  }
];

var lslpddm = new Array('lslpddm1','lslpddm2','lslpddm3','lslpddm4');
var sendToFrontLock = false;
function updateZIndex( id, refId ) {
  Ext.fly(id).setStyle('z-index',id == refId ? '10' : '1');
}
function sendToFront(event, element, config) {
  if (!sendToFrontLock) {
    sendToFrontLock = true;
    for (i in lslpddm) {
      if (typeof lslpddm[i] == 'string') {
        updateZIndex(lslpddm[i], element.id);
      }
    }
    sendToFrontLock = false;
  }
}
Ext.onReady(function() {
  for (i in lslpddm) {
    if (typeof lslpddm[i] == 'string') {
      Ext.fly(lslpddm[i]).on('mouseover',sendToFront);
    }
  }
});
