jQuery().ready(function(){

	jQuery('#mycarousel').jcarousel({
        vertical: true,
		auto:3,
		scroll:2,
		wrap:"both"

    });

	$('a.lightbox').lightBox({
					fixedNavigation:true,
					imageBtnNext:'/javascript/jquery/pi/lightbox/lightbox-btn-next.gif',
					imageBtnPrev:'/javascript/jquery/pi/lightbox/lightbox-btn-prev.gif',
					imageBtnClose:'/javascript/jquery/pi/lightbox/lightbox-btn-close.gif',
					imageBtnClose:'/javascript/jquery/pi/lightbox/lightbox-btn-close.gif',
					imageLoading:'/javascript/jquery/pi/lightbox/loading.gif'
					});
	$("dd").hide();
		$("dt a").click(function(){
			$("dd:visible").slideUp("fast");
			$(this).parent().next().slideDown("fast");
			return false;
		});
		
		//alert(lni);
	//if(lni) { $("#"+lni+")").click(); }
});


$(function(){

			$(".vertMenu").buildMenu(
			{
				template:"menuVoices.html",
				menuWidth:350,
				openOnRight:true,
				menuSelector: ".menuContainer",
				iconPath:"/images/icons/",
				hasImages:false,
				fadeInTime:00,
				fadeOutTime:200,
				adjustLeft:0,
				adjustTop:0,
				opacity:.95,
				openOnClick:false,
				minZindex:200,
				shadow:true,
				shadowColor:"black",							
				shadowOpacity:.2,								
				
				closeOnMouseOut:true
			});

});


						// JavaScript Document
jQuery(function() {

	//==================== Search With all plugins =================================================
	// Unbind form submit
	$('.home_searchEngine').bind('submit', function() {return false;} ) ;

	// Set autosuggest options with all plugins activated
	var options = {
		script:"/fr/search.cfm?json=true&limit=8&",
		varname:"input",
		json:true,						// Returned response type
		shownoresults:true,				// If disable, display nothing if no results
		noresults:"No Results",			// String displayed when no results
		maxresults:3,					// Max num results displayed
		cache:false,					// To enable cache
		minchars:2,						// Start AJAX request with at leat 2 chars
		timeout:5000,					// AutoHide in XX ms
		callback: function (obj) { 		// Callback after click or selection
			// For example use :
			
			document.location = unescape(obj.id);
			return true;
						
			// Build HTML
			var html = "ID : " + obj.id + "<br>Main Text : " + obj.value + "<br>Info : " + obj.info;
			$('#input_search_all_response').html(html).show() ;
			
			// => TO submit form (general use)
			//$('#search_all_value').val(obj.id); 
			//$('#form_search_country').submit(); 
		}
	};
	// Init autosuggest
	var as_json = new bsn.AutoSuggest('searchfield', options);
	
	// Display a little watermak
	$("#searchfield").Watermark("e.g. Snap davit, repair etc.");
	
});
