
function popupcentree(page,largeur,hauteur,options)
{
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}


function popupie6() {
	window.open("popupie6.php", "", "toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, width=320, height=320");
}


$(document).ready(function(){
        
        
        if ($.browser.msie) {
                
	    if(parseInt($.browser.version) < 8){
	        //popupie6();
		popupcentree("popupie6.php",320,320,"");
	    }
            
	}
	
	if( $('#slideHome') ){
		
		
		// Set up our options for the slideshow...
		var myOptions = {
		    noImages: 7, // Number of images
		    path: "/img/slide/", // Relative path with trailing slash.
		    timerInterval: 5500, // 6500 = 6.5 seconds
		    randomise: true // Start with random image? true=yes/false=no
		};

		// Initiate the Easy Slides plugin, assigning it to your contaner DIV...
		$('#slideHome').easySlides(myOptions);
		
		
		
		/*		
		$('#slideHome').coinslider({
			width: 555,
			height:130,
			navigation: false,
			links:false,
			delay: 3000,
			hoverPause:true
		});*/
		
		/*
			var flashvars = {};
			var params = {};
			var attributes = {};
			attributes.id = "slide";
			swfobject.embedSWF("themes/feeling-cooking/flash/home.swf", "slideHome", "555", "130", "9.0.0", "themes/feeling-cooking/flash/expressInstall.swf", flashvars, params, attributes);
		*/
	}
	
        
        if( $('#blockNews') ){
                
                //alert('Scrollpane');
                
                //ScrollPane Actus
                $('#blockNews div.block_content').jScrollPane({showArrows:true});
        }
        
                
        $("#special_block_right h4 span").hover(
                
                function(){
                        
                        $("#special_block_right h4 span").each(function(){
                          $(this).removeClass("current");      
                        });
                       
                        $(this).addClass("current");
                        
                        if( $(this).attr('id') == 'forblockNewProduct' ){
                                
                                $('#blockNewProduct').show();
                                $('#blockSpecial').hide();
                                $('#blockBestProduct').hide();
                                
                        } else if( $(this).attr('id') == 'forblockBestProduct' ) {
                                
                                $('#blockBestProduct').show();
                                $('#blockNewProduct').hide();
                                $('#blockSpecial').hide();
                                
                                
                        } else {
                                
                                $('#blockSpecial').show();
                                $('#blockNewProduct').hide();
                                $('#blockBestProduct').hide();
                                
                                
                        }
                        
                },
                function(){
                
                }
        );
        
        //alert( $("li#boutique").hasClass("current")  );
        
        if( $("li#boutique").hasClass("current") ){
                
                //alert("Ici");
                
                //J'affiche le sous menu
                $("div.niv2").css("display","block");
                
        } else {
                
                //alert("La");
                //Je cache le sous menu et active le survol
                $("div.niv2").css("display","none");
                
                $("li#boutique").hover(
                        
                        function(){
                                
                                $("div.niv2").css("display","block");     
                                
                        },
                        function(){
                                $("div.niv2").css("display","none");
                        }                       
                                       
                );
        }
        
        
        
        
        
        
        
        $("ul.niv2 li").hover(
                
                function(){
                        
                        $("#ul.niv2 li").each(function(){
                          $(this).removeClass("current");      
                        });
                       
                        $(this).addClass("current");
                        
                        if( $(this).children("div").size() > 0 )
                                $(this).children("div").css("display","block");
                        
                },
                function(){
                        
                        $(this).removeClass("current");
                        if( $(this).children("div").size() > 0 )
                                $(this).children("div").css("display","hidden");
                        
                }
        );
        
        
        
});
