// +++++++++++++++++++++++++++++++++++++++++++++++++++
// Allgemeine Popup Funktion
// +++++++++++++++++++++++++++++++++++++++++++++++++++
function popup(pname, width, height, scrollbars)
{
    msg=open(pname,"pname","width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,scrollbars=" + scrollbars + ",resizeable=no,menubar=no");
}
function popup_online_special() {
 popup('http://www.deichmann.com/website/schuhfashion/', 990, 700, 'no');
}

function animation_finished() {
    $('#header> *,#product-stage> *,#footer> *').fadeIn("normal");
    $("#autostart").fancybox();
    $("#autostart").click();

}
// +++++++++++++++++++++++++++++++++++++++++++++++++++
// JQuery Initialisierungen
// +++++++++++++++++++++++++++++++++++++++++++++++++++
function jquery_init_accordeon_menu() {
    $('#header ul').accordion({
        active: false,
        header: '.head',
        navigation: true,
        event: 'mouseover'
    });
$("a.fancybox").fancybox({
            'hideOnContentClick': true,
            'zoomSpeedIn': 0,
            'zoomSpeedOut': 0,
            'frameWidth': 423,
            'frameHeight': 246
        });

$('#header ul').css("height", "auto"); 
}
function jquery_init_slideshow() {
    //slideshow bob ;o)
    $.easing.easeOutQuart = function (x, t, b, c, d) {
        return -c * ((t=t/d-1)*t*t*t - 1) + b;
    };
    //combine slideshow and tab container
    $('.slideshow')
        .serialScroll({
        items:'li',
        prev:'.buttons a.prev',
        next:'.buttons a.next',
        axis:'x',
        offset:-1, //when scrolling to photo, stop 230 before reaching it (from the left)
        start:0, //as we are centering it, start at the 2nd
        step:4,
        duration:1200,
        force:true,
        stop:true,
        lock:false,
        cycle:false, //don't pull back once you reach the end
        easing:'easeOutQuart', //use this easing equation for a funny effect
        jump: false //click on the images to scroll to them
    });
}

function jquery_init_slideshow_twostep() {
    //slideshow bob ;o)
    $.easing.easeOutQuart = function (x, t, b, c, d) {
        return -c * ((t=t/d-1)*t*t*t - 1) + b;
    };
    //combine slideshow and tab container
    $('#item1 .slideshow')
        .serialScroll({
        target: '',
        items:'li',
        prev:'#item1 .buttons a.prev',
        next:'#item1 .buttons a.next',
        axis:'x',
        offset:-1, //when scrolling to photo, stop 230 before reaching it (from the left)
        start:0, //as we are centering it, start at the 2nd
        step:2,
        duration:1200,
        force:true,
        stop:true,
        lock:false,
        cycle:false, //don't pull back once you reach the end
        easing:'easeOutQuart', //use this easing equation for a funny effect
        jump: false //click on the images to scroll to them
    });
}

function jquery_init_slideshow_twostep_part2() {
    //slideshow bob ;o)
    $.easing.easeOutQuart = function (x, t, b, c, d) {
        return -c * ((t=t/d-1)*t*t*t - 1) + b;
    };
    $('#item2 .slideshow')
        .serialScroll({
        items:'li',
        prev:'#item2 .buttons a.prev',
        next:'#item2 .buttons a.next',
        axis:'x',
        offset:-1, //when scrolling to photo, stop 230 before reaching it (from the left)
        start:0, //as we are centering it, start at the 2nd
        step:2,
        duration:1200,
        force:true,
        stop:true,
        lock:false,
        cycle:false, //don't pull back once you reach the end
        easing:'easeOutQuart', //use this easing equation for a funny effect
        jump: false //click on the images to scroll to them
    });
}



function jquery_init_standard() {
    $(document).ready(function() {
        jquery_init_accordeon_menu();
    });
}
function jquery_init_home() {
    $(document).ready(function() {
        jquery_init_accordeon_menu();
        $('#header> *,#product-stage> *,#footer> *').hide();

    });
}
function jquery_init_collection() {
    $(document).ready(function() {
        jquery_init_accordeon_menu();
        jquery_init_slideshow();
        $('.slideshow > ul').tabs({
            cache: true,
            fx: { opacity: 'toggle', duration: 'fast' }
        });
        // add round corners
        $('.reflect').each(function(i) {
            $(this).wrap("<span class=\"curvy-wrap\"><span style=\"height:"+this.height+"px; width:"+this.width+"px;\" class=\"curvy-corners\"></span></span>");
        });
        $('.curvy-corners').each(function(i) {
            $(this).append("<span class=\"corner-top-left\"></span><span class=\"corner-top-right\"></span><span class=\"corner-bottom-left\"></span><span class=\"corner-bottom-right\"></span>");
        });
    });
}
function jquery_init_features_marketing() {
    $(document).ready(function() {
        jquery_init_accordeon_menu();
        jquery_init_slideshow_twostep();
        jquery_init_slideshow_twostep_part2();  
      $("li.dropshaddow a.fancybox").fancybox({
            'hideOnContentClick': true
        });
        $("#autostart").fancybox();
        $("#autostart").click();
    });
}
function jquery_init_features_tvspots() {
    $(document).ready(function() {
        jquery_init_accordeon_menu();
        jquery_init_slideshow_twostep();
        jquery_init_slideshow_twostep_part2();
        
        $("li.dropshaddow a.fancybox").fancybox({
            'hideOnContentClick': true,
            'zoomSpeedIn': 0,
            'zoomSpeedOut': 0,
            'frameWidth': 423,
            'frameHeight': 246
        });
    })
 }
