

var config1 = {
   slideshowGroup: 'group1',
   transitions: ['expand', 'crossfade']
};

var config2 = {
   slideshowGroup: 'group2',
   transitions: ['expand', 'crossfade']
};	


	hs.graphicsDir = 'scripts/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	hs.numberPosition = 'caption';
	hs.creditsHref = '/';	
	hs.lang = {
		loadingText :     'Chargement...',
		loadingTitle :    'Cliquer pour annuler',
		focusTitle :      'Cliquer pour amener au premier plan',
		fullExpandTitle : 'Afficher à la taille réelle',
		fullExpandText :  'Taille réelle',
		creditsText : 'Avis Immobilier St Brieuc',
		creditsTitle : 'Retour à la page d\'accueil',
		previousText :    'Précédent',
		previousTitle :   'Précédent (flèche gauche)',
		nextText :        'Suivant',
		nextTitle :       'Suivant (flèche droite)',
		moveTitle :       'Déplacer',
		moveText :        'Déplacer',
		closeText :       'Fermer',
		closeTitle :      'Fermer (esc ou Echap)',
		resizeTitle :     'Redimensionner',
		playText :        'Lancer',
		playTitle :       'Lancer le diaporama (barre d\'espace)',
		pauseText :       'Pause',
		pauseTitle :      'Suspendre le diaporama (barre d\'espace)',
		number :          'N° %1/%2',
		restoreTitle :    'Cliquer pour fermer l\'image, cliquer et faire glisser pour déplacer, utiliser les touches flèches droite et gauche pour suivant et précédent.'
	};	
	
	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		slideshowGroup: ['group1'],
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .75,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});



	function mycarousel_initCallback(carousel)
	{
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});

		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});

		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};


	
/* Create ImageFlow instances when the DOM structure has been loaded */
var instanceOne = new ImageFlow();
instanceOne.init({ ImageFlowID: 'myImageFlow',
                      circular: true,
                      glideToStartID: false,
                      slider: false,
											slideshow: true,
											captions: false,
                      slideshowAutoplay: true ,
											onClick : function() { return false; }
											});	
	
jQuery( document ).ready( function(){
	


		jQuery("#tabs").tabs().addClass('ui-tabs-vertical ui-helper-clearfix');
		jQuery("#tabs li").removeClass('ui-corner-top').addClass('ui-corner-left');
		jQuery("#tabs").tabs("select", "#tabs-2"); 


	


	if (document.getElementById("home_selection")!=null)
	{	
		jQuery('#home_selection').jcarousel({
			auto: 3,
			wrap: 'last',
			initCallback: mycarousel_initCallback,
			scroll: 1
		});
	}
	if (document.getElementById("home_selection_neuf")!=null)
	{	
		jQuery('#home_selection_neuf').jcarousel({
			auto: 3	,
			wrap: 'last',
			initCallback: mycarousel_initCallback,
			scroll: 1
		});
	}
	
		if (document.getElementById("information"))
		{
			jQuery('#information').cycle({
			fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			cleartypeNoBg: true,  // properties that define the initial state of the slide before transitioning in 
			timeout:4500,
			speed:  2500,
			pause: true 
			});
		}	

		
});




	function change_val (cid , val, form) 
	{		
	
		for ( var i = 0 ; i <  document.forms[form][cid.name].length ; i++)
		{
			var c_length = document.forms[form][cid.name][i].name.length;
			var c = document.forms[form][cid.name][i].name.substring ( 0, (c_length-8));		
		
			if (document.forms[form][cid.name][i].value != val)
			{
				document.forms[form][cid.name][i].checked = false;
			}
			else 
			{
				if (document.forms[form][cid.name][i].checked == true)
				{
					document.forms[form][c].value = val;
				}
				else
				{
					document.forms[form][cid.name][i].checked = false;
					document.forms[form][c].value = '';
				}			
			}
		}
	}
	
	
/** moteur de recherche */
function charge_manufacturers(dept_id, div_return, form){
	agent.call('','charge_depts_manufacturers','depts_manufacturers',dept_id, div_return, form);
}
function depts_manufacturers(str){
	var tab = str.split('|');
	document.getElementById(tab[0]).innerHTML = tab[1];
}
function affect_man(val, form)
{
	document.forms[form].manufacturers_id.value = val.value;
}
	
	

	
  curvyCorners.addEvent(window, 'load', initCorners);

  function initCorners() {

		
    var settings = {
          tl: { radius: 5 },
          tr: { radius: 5 },
          bl: { radius: 5 },
          br: { radius: 5 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
 curvyCorners(settings, ".box");
 curvyCorners(settings, ".corner");
 curvyCorners(settings, ".barre_navigation_container");
 curvyCorners(settings, ".bien");
 

		
  }		
