// JavaScript Document
var mycarousel_itemList = [
					    {link:'votre-dossier-dans-fauteuil',titre:'Consultez votre <br/><strong>Dossier personnel !</strong>',para:'Restez informé de <br/>l’avancée de votre projet',url: '/img/dossier.jpg', title: 'Dossier personnel'},
					    {link:'la-charte-la-parisienne',titre:'Agir pour les autres.<br/><strong>C’est possible !</strong>',para:'La charte <br/>La Parisienne Immobilier',url: '/img/charte.jpg', title: 'La charte '},
					    {link:'contact',titre:'Un projet immobilier ?<br/><strong>Parlons-en ensemble</strong>',para:'Notre formulaire de contact <br/>est à votre disposition',url: '/img/contact.jpg', title: 'Nous contacter'}
					   
					];

					function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt)
					{
					    // The index() method calculates the index from a
					    // given index who is out of the actual item range.
					    var idx = carousel.index(i, mycarousel_itemList.length);
					    carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
					};

					function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
					{
					    carousel.remove(i);
					};

					/**
					 * Item html creation helper.
					 */
					function mycarousel_getItemHTML(item)
					{
									//return '<h3>' + item.url + '</h3><p>' + item.title + '</p>'
					    return '<a href="'+item.link+'"><h3>' + item.titre + '</h3><img src="' + item.url + '" width="151" height="151" alt="' + item.title + '" />'+'<p>' + item.para + '</p></a>';
					};

					jQuery(document).ready(function() {
					    jQuery('#mycarousel').jcarousel({
					        wrap: 'circular',scroll:1,
													        auto: 6,
					        itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
					        itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback}
					    });
					});	