/*!
 * jQuery custom Function calls
 *
 *
 * Includes innerfade, search value field, toggle
 * @author Christopher Eggert
 */
 
$(document).ready(
    function() { 
        $('#portfolio').innerfade({ speed: 'slow', timeout: 9000, type: 'sequence', containerheight: '378px' }); 

        $('h3.trigger').toggleClass('active');
        $('h3.trigger').click(function(){
            idelem = $(this).attr('id');
            idelemdiv = idelem.replace('boxhead_', 'box_');
            $('#'+idelemdiv).slideToggle('slow');
            $('#'+idelem).toggleClass('active');
            return false;
        });
        
        
        
        /*
        $(".toggle_container").show();
        $("h3.trigger").toggleClass("active");

        $("h3.trigger").click(function(){
            $(this).toggleClass("active").next().slideToggle("slow");
        });
        */
        
        $(".toggle_containerAccordion").hide();
        $("h3.triggerAccordion").click(function(){
            $(this).toggleClass("active").next().slideToggle("slow");
            return false;
        });
        
        $('.suche').click(
            function() {
                if (this.value == this.defaultValue) {
                    this.value = '';
                }
              }
        );
        $('.suche').blur(
            function() {
                if (this.value == '') {
                    this.value = this.defaultValue;
                }
            }
        );
                    
     } 
);
