﻿$(function(){
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    
    //Dit is een oplossing om het mogelijk te maken om tot 10 panels te voorzien van een spry.widget
    for (var i=1; i<=10; i++) {
        if ($("#CollapsiblePanel" + i).length != 0) {    
            eval('var CollapsiblePanel' + i + ' = new Spry.Widget.CollapsiblePanel("CollapsiblePanel' + i + '", {contentIsOpen:false});');
        }
    }
    
    //initialiseer ONZE panels
    initSliders();
    
    if ($("#TabbedPanels1").length != 0) {
        var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    }
    
    $(".getBigPDF").click(function () {
        window.open(this.href, 'Brochure', 'width=' + screen.width +', height=' + screen.height +', menubar=no, toolbar=no, location=no ');
        return false;
    });
});

function initSliders() {
    $(".PanelTrigger").unbind("click");
    $(".PanelTrigger").click(function () {
         $(this).parent().find(".PanelContent").animate({
            height: 'toggle'
         }, 500);
    });
}
