/* 
 * TT : Einbinden in der general.js.php
 * 
 */

/******************** TT jquery begin ********************/    
    // Leftnavi
    $(function(){
        $("#leftnavi").accordion({
            autoHeight: false,
            active: 0,
            //active: false,
            collapsible: true,
            clearStyle: true,
            navigation: true,
            animated: 'bounceslide'
        });
    });
    
    // FAQ
    $(function(){
        $("#faq_product, #faq_sale, #faq_payment, #faq_order, #faq_shipping, #faq_return, #faq_care").accordion({
            active: false,
            collapsible: true,
            autoHeight: false
        });        
    });
    
    // Startseite-Button hover
    $(function(){
        $("#home").hover(function() {
            $("#home h3").addClass("ui-state-hover");
        }, function() {
            $("#home h3").removeClass("ui-state-hover");			
        });        
    });

    // Flaggen Toggle
    $(function(){
        $(".flagsToggle").hide();
        $("img.arrow").toggle(function() {
            $(".flagsToggle").show();
                $(this).attr({"src": "/store_files/1/themes/hhg_ms_r2/img/arrow_right.png", "alt": "flags collaps", "title": "flags collaps"});
        }, function() {
            $(".flagsToggle").hide();
                $(this).attr({"src": "/store_files/1/themes/hhg_ms_r2/img/arrow_left.png", "alt": "flags open", "title": "flags open"});
        });
    });
    
    // Produkte-Info Tabs
    $(function(){
		$('#product_info_tabs').tabs({
            selected: 0
        });
    }); 
    
    // Teppich Glossar
    $(function(){
		$('#glossary').tabs({
            // selected: -1
        });
    });
    
    //care&Fair Urkunde
    $(document).ready(function(){
        $("#certificateButton").click(function(){
            $("#carefairCertificate").dialog({
                title: 'Unsere CARE & FAIR Mitglieds-Urkunde',
                position: 'top',
                draggable: 'false',
                resizable: 'false',
                width: 420,
                height: 660,                
                modal: 'true',
                buttons: {                        
                    Schließen: function(){
                        $(this).dialog("close");
                    }
                }
            });
        });
    });
/******************** TT - jquery end ********************/

/******************** jquery image slider begin **************/
    <!-- Run the plugin -->
    $(window).load(function() {
        $('#featured').orbit({
            'bullets': true,
            'timer' : true,
            'animation' : 'fade',
            'advanceSpeed': 6000
        });
    });

    /* -- Default options: --
        animation: 'fade', //fade, horizontal-slide, vertical-slide  
        animationSpeed: 800, //how fast animations are 
        advanceSpeed: 4000, //if timer advance is enabled, time between transitions  
        startClockOnMouseOut: true, //if timer should restart on MouseOut  
        startClockOnMouseOutAfter: 3000, //how long after mouseout timer should start again  
        directionalNav: true, //manual advancing directional navs     
        captions: true, //if has a title, will be placed at bottom  
        captionAnimationSpeed: 800, //how quickly to animate in caption on load and between captioned and uncaptioned photos 
        timer: false //if the circular timer is wanted 
        bullets: false //true or false to activate the bullet navigation 
     */
/******************** jquery image slider end ********************/

/******************** JavaScript deaktivieren mit jquery behandeln begin ********************/
$(document).ready(function(){
    $('#nojs').hide();   //Display paragraph if JavaScript is enabled in the browser
    $('#hasjs').show();  //Display paragraph if JavaScript is disabled in the browser
});
/******************** noscript-show-hide-content-css-jquery end ********************/
