// JavaScript Document

$(document).ready(function() {


    /// lightbox the language options
/*
	$('#lang-options').lightbox_me({
        centered: true,
		overlayCSS: 	{background: 'black', opacity: .5}
    });
	*/
	/* stuff for main menu 8*/
	
	$('.sf-menu li ').mouseenter(function(){
		$(this).children('ul').show();
	}).mouseleave(function(){
		$(this).children('ul').hide();
	});

	
	 // Create an array of images that you'd like to use
    var images = [
        "images/backgrounds/BRIX-4.jpg",
		"images/backgrounds/BRIX-5.jpg",
		"images/backgrounds/POWDERBRIX_AMB_01.jpg"
       
    ];
    // The index variable will keep track of which image is currently showing
    var index = 0;

    // Call backstretch for the first time,
    // In this case, I'm settings speed of 500ms for a fadeIn effect between images.
    $.backstretch(images[index], {speed: 2000});

    // Set an interval that increments the index and sets the new image
    // Note: The fadeIn speed set above will be inherited
    setInterval(function() {
        index = (index >= images.length - 1) ? 0 : index + 1;
        $.backstretch(images[index]);
    }, 7000);
	
	//$('ul.sf-menu').superfish();


});


