
$('.bloc1', window.parent.document).css('background', 'url(_images/drop_shadow1.png)'); // blocs 300x130
$('.bloc2', window.parent.document).css('background', 'url(_images/drop_shadow2.png)'); // blocs 620x130
$('.bloc3', window.parent.document).css('background', 'url(_images/drop_shadow3.png)'); // blocs 940x260
$('.bloc1,.bloc2', window.parent.document).css('height','130px'); // tous les blocs sauf carrousel
$('.bloc3', window.parent.document).css({height: '300px', width: '947px'}); // carrousel
$('iframe', window.parent.document).css({height: '130px', border: '0'}); // tous les blocs
$('iframe', window.parent.document).eq(0).css({height: '300px', width: '947px'}); // carrousel
/* $('iframe', window.parent.document).attr('frameBorder','0'); // hack IE */
$(document).ready(function(){
var active=6; // vignette à afficher au chargement de la page
var trans=0.1; // durée de l'animation en secondes lors du rollover
var timer=2; // durée de la pause entre 2 bannières en mode slideshow
// contient les informations sur les bannières (titre, légende, lien)
var banners = new Array(6);
banners[0] = ['Leads Management','le meilleur Retour sur Investissement','leadsmachine.com/leads-management.php'];
banners[1] = ['Animation de canaux','Votre réseau de partenaires Renforcé','leadsmachine.com/developpement-canaux-ventes.php'];
banners[2] = ['Qualification','Votre fichier marketing toujours qualifié','leadsmachine.com/societe.php'];
banners[3] = ['Prise de rendez-vous','Vos force de vente galvanisées','leadsmachine.com/prise-rendez-vous.php'];
banners[4] = ['Détection de projets','Pour une croissance de vos parts de marché ','leadsmachine.com/detection-projets.php'];
banners[5] = ['Leads Machine','Votre prospection externalisée, en toute confiance','leadsmachine.com/societe.php'];
$('#arrow_slide').show();
for (i=0; i<banners.length; ++i ){
// fonctions qui s'éxécutent au lancement
$('.btn .title_ss').eq(i).html(banners[i][0]);
$('.btn .caption').eq(i).html(banners[i][1]);
$('#arrow_slide').css('top', 52*(active-1)-5);
$('#arrow_slide .title_ss').html(banners[active-1][0]);
//$('#arrow .caption').html(banners[active-1][1]);
$('#arrow_slide,#ad,#banner,#bannerButton').attr('href','http://'+banners[active-1][2]);
$('#ad').css('background', 'url(_images/'+active+'.png)');
//$('#bannerTitle').html(banners[i][0]);
$('#bannerCaption').html(banners[i][1]);
// fonctions qui s'éxécutent au mouseover
$('.btn').eq(i).mouseover(function () {
$('#arrow_slide').stop()
$('#arrow_slide').animate({top: 52*(this.id-1)-5}, trans*1000,'linear');
$('#arrow_slide .title_ss').html(banners[this.id-1][0]);
$('#arrow_slide,#ad,#banner,#bannerButton').attr('href','http://'+banners[this.id-1][2]);
//$('#bannerTitle').html(banners[this.id-1][0]);
$('#bannerCaption').html(banners[this.id-1][1]);

//var twitterURL='https://twitter.com/share?text='+encodeURI(banners[this.id-1][0]+' : '+banners[this.id-1][1])+'&url=http://'+banners[this.id-1][2];
//$('#twitter').attr('href','javascript:window.open(\''+twitterURL+'\',\'window\',\'width=550,height=220\')');
/* $('#gplus').attr('href','http://www.facebook.com/sharer/sharer.php?u='+banners[this.id-1][2]); */
oldUrl=$('#ad img').attr('src');
newUrl='_images/'+this.id+'.png';
$('#ad').css('background', 'url('+oldUrl+')');
$('#ad img').hide();
$('#ad').html('<img src="'+newUrl+'" alt="'+banners[this.id-1][0].toUpperCase()+' - '+banners[this.id-1][1]+'">');
$('#ad img').fadeIn();
});
}
}); 
