$(document).ready(function() {


                //################################
                // load superfish
                //################################

                $("#menutop ul").superfish();

                //################################
                // states menu top
                //################################

                jQuery("#menutop ul li.menutop-link").mouseover(function(){
                    	jQuery(this).css("backgroundImage", "url(/fileadmin/template/img/menutop_bg_active.jpg)");
            	});

            	jQuery("#menutop ul li.menutop-link").mouseout(function(){
            		if (!($(this).hasClass("ui-tabs-selected ui-state-active"))) {
	                    	jQuery(this).css("backgroundImage", "url(/fileadmin/template/img/menutop_bg_center.jpg)");
	                }
            	});


            	//################################
            	// states red box homepage
            	//################################

            	jQuery(".box-container-top").mouseover(function(){
                    	jQuery(this).css("backgroundImage", "url(/fileadmin/template/img/bg_boxtop_red.jpg)");
            	});

            	jQuery(".box-container-top").mouseout(function(){
                    	jQuery(this).css("backgroundImage", "none");
            	});


            	//################################
            	// show level-2-slidemenu on homepage
            	//################################

            	function mover() {
                    jQuery('> div.level-two-container', this).show();
            	}

            	function mout() {
                    jQuery("div.level-two-container").hide();
            	}


            	var config = {
                    sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)
                    interval: 75, // number = milliseconds for onMouseOver polling interval
                    over: mover, // function = onMouseOver callback (REQUIRED)
                    timeout: 100, // number = milliseconds delay before onMouseOut
                    out: mout // function = onMouseOut callback (REQUIRED)
                };

            	jQuery(".box-container-top").hoverIntent(config);


                //################################
            	// tabs states                                     
            	//################################


                // default active state 
                
                jQuery("ul#product-detail-menu li a:first").addClass("active");



                jQuery("ul#product-detail-menu li a").click(function(){

    		              $("#tabs ul li a").removeClass("active");
    		              $(this).addClass("active");

    		    });
    		    
    		    
    		    //################################
            	// 2 tabs hover
            	//################################
            	
            	$("ul.tabs_2 li.product-detail-menu-first").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-2-lact.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });

                $("ul.tabs_2 li.product-detail-menu-last").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-2-ract.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });



                //################################
            	// 3 tabs hover
            	//################################
                   
                $("ul.tabs_3 li").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-3-act.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });

            	$("ul.tabs_3 li.product-detail-menu-first").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-3-lact.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });

                $("ul.tabs_3 li.product-detail-menu-last").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-3-ract.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });
                
                
                
                //################################
            	// 4 tabs hover
            	//################################

                $("ul.tabs_4 li").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-4-act.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });

            	$("ul.tabs_4 li.product-detail-menu-first").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-4-lact.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });

                $("ul.tabs_4 li.product-detail-menu-last").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-4-ract.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });
                
                
                //################################
            	// 5 tabs hover
            	//################################

                $("ul.tabs_5 li").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-5-act.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });

            	$("ul.tabs_5 li.product-detail-menu-first").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-5-lact.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });

                $("ul.tabs_5 li.product-detail-menu-last").mouseover(function(){
                  jQuery(this).css("backgroundImage", "url(/typo3conf/ext/t3m_gbm/pi2/img/tab-5-ract.jpg)");
                }).mouseout(function(){
                  jQuery(this).css("backgroundImage", "none");
                });



    		    
    		    
    		    
    		    
    		    
    		    
        });
