<!--
/* SCRIPT DIAPORAMA PARTENAIRES */
/*
Script by FPMC at http://jsarchive.8m.com
Submitted to JavaScript Kit (http://javascriptkit.com)
For this and 400+ free scripts, visit http://javascriptkit.com
*/

/*set image paths*/
src = [
"http://laciotat.info/wp-content/themes/ciotatFR/part/11saintjean.jpg", 
"http://laciotat.info/wp-content/themes/ciotatFR/part/1malte.jpg", 
"http://laciotat.info/wp-content/themes/ciotatFR/part/2rent.jpg", 
"http://laciotat.info/wp-content/themes/ciotatFR/part/3ceyreste.jpg", 
"http://laciotat.info/wp-content/themes/ciotatFR/part/5cal.jpg", 
"http://laciotat.info/wp-content/themes/ciotatFR/part/6soleil.jpg",
"http://laciotat.info/wp-content/themes/ciotatFR/part/14marina.jpg",
"http://laciotat.info/wp-content/themes/ciotatFR/part/12ca.jpg", 
"http://laciotat.info/wp-content/themes/ciotatFR/part/8rosethe.jpg", 
"http://laciotat.info/wp-content/themes/ciotatFR/part/13stest.jpg"]


/*set corresponding urls*/
url = [
"http://laciotat.info/chercher-un-lieu/services/agence-immobiliere/agence-de-saint-jean/", 
"http://laciotat.info/hotel/2-etoiles/hotel-la-croix-de-malte/", "http://laciotat.info/chercher-un-lieu/services/location-de-voiture/rent-a-car-la-ciotat/", "http://laciotat.info/campings/3-etoiles/camping-de-ceyreste/", "http://laciotat.info/chercher-un-lieu/nautisme/balades-en-mer-visite-de-calanques/", "http://laciotat.info/campings/2-etoiles/camping-du-soleil/", 
"http://laciotat.info/hotel/2-etoiles/hotel-le-marina-b/", "http://laciotat.info/chercher-un-lieu/services/banques/agence-credit-agricole-la-ciotat-vieux-port/", "http://laciotat.info/hotel/3-etoiles/hotel-rose-the/", 
"http://laciotat.info/residence/autres/residence-saint-esteve/" ]

/*set duration for each image*/
duration = 2;

/*Please do not edit below*/
ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
document["Ad_Image"].src = ads[ct=n].src;
}
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
setTimeout("switchAd()",duration*1000);
}
function doLink(){
location.href = url[ct];
} onload = function(){
if (document.images)
switchAd();
}
//-->
/* FIN SCRIPT DIAPORAMA PARTENAIRES */

/* SCRIPT ROTATION BACKGROUND */

var $j = jQuery.noConflict();
function slideSwitch() {
    var $active = $j('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    /*use this to pull the images in the order they appear in the markup*/
    var $next =  $active.next().length ? $active.next()
        : $j('#slideshow IMG:first');

    /* uncomment the 3 lines below to pull the images in random order
    
    var $sibs  = $active.siblings();
    var rndNum = Math.floor(Math.random() * $sibs.length );
    var $next  = $( $sibs[ rndNum ] ); 
	*/


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$j(function() {
    setInterval( "slideSwitch()", 7000 );
});

/* FIN SCRIPT ROTATION BACKGROUND */

