
/* -- SEO LINK -- (under the document.ready is the close event*/

var boxshown = false;

function ShowSEO() {
    if (!boxshown) {
        // Display the seoLinks in the middle of the screen.

        //var bodyMiddle = $('Body')[0].clientWidth / 2;
        //$('#seoLinks').css("left", bodyMiddle - 504);
        $('#seoLinks').fadeIn("slow");
        boxshown = true;
    }
    else {
        $('#seoLinks').fadeOut("slow");
        boxshown = false;
    }
}

$(document).ready(function () {

    /*-- Servives Form --*/
    $(document).ready(function () {
        //hide the all of the element with class .article
        $(".article").hide();
        //When an element with the class .headline is clicked.
        $(".headline").click(function () {
            //toggle the next element found with the class .article
            $(this).nextAll(".article:first").slideToggle(800);
        });
    });

    /* -- SERVICES HOMEPAGE --*/
    $('#homepageDiensten ul li').each(function (index) {
        $(this).addClass('service' + index)
        $(this).mouseover(function () {
            $('div.serviceImg').css("background", "url(/app_themes/vbt/images/service" + index + ".jpg)");
        });
    });

    /* -- SEO LINK -- */
    $('#seoClose').click(function () {
        $('#seoLinks').fadeOut("slow");
        boxshown = false;
    });

    


    /* -- TAGCLOUD -- */
    $('#tagCloud').tagcloud({ centrex: 110, centrey: 110 });


    /* -- LABEL IN INPUT -- */
    /*
    $("input, textarea").labelify({
    text: "label"
    });
    */

    /* -- SELECTBOXES -- */
    $('#portalSelectBox').selectbox({
        inputClass: 'portalSelectBox'
    });

    /* -- SLIDESHOWS -- */
    $('.portalSlideshow').cycle({
        fx: 'scrollLeft',
        speed: 6000,
        random: 0,
        cleartype: 1
    });

    $('.slideshow').cycle({
        fx: 'none',

        speed: 350,
        timeout: 5000,
        random: 1,
        cleartype: 1
    });
    $('.slideshowStart').cycle({
        fx: 'none',
        speed: 6000,
        random: 1,
        cleartype: 1
    });

    $('.partnersSlideshow').cycle({
        fx: 'fade',
        speed: 5000,
        random: 1,
        cleartype: 1
    });

    /* -- HOMEPAGE PANELS -- */
    /* -- Panel 2 -- */
    $('.wrapperPanel2').mouseover(function () {
        $('.pnlContents2').slideDown('fast');
        $('.pnl2').css('background-image', 'url(/App_Themes/VBT/images/pnlButton_Up_Hover.png)');
    });
    $('.wrapperPanel2').mouseleave(function () {
        $('.pnlContents2').fadeOut();
        $('.pnl2').css('background-image', 'url(/App_Themes/VBT/images/pnlButton_Down.png)');
    });

    /* -- Panel 3 -- */
    $('.wrapperPanel3').mouseover(function () {
        $('.pnlContents3').slideDown('fast');
        $('.pnl3').css('background-image', 'url(/App_Themes/VBT/images/pnlButton_Up_Hover.png)');
    });
    $('.wrapperPanel3').mouseleave(function () {
        $('.pnlContents3').fadeOut();
        $('.pnl3').css('background-image', 'url(/App_Themes/VBT/images/pnlButton_Down.png)');
    });

    /* -- Panel 4 -- */
    $('.wrapperPanel4').mouseover(function () {
        $('.pnlContents4').slideDown('fast');
        $('.pnl4').css('background-image', 'url(/App_Themes/VBT/images/pnlButton_Up_Hover.png)');
    });
    $('.wrapperPanel4').mouseleave(function () {
        $('.pnlContents4').fadeOut();
        $('.pnl4').css('background-image', 'url(/App_Themes/VBT/images/pnlButton_Down.png)');
    });

    /* -- HOMEPAGE PANELS OLD 
    $("div#openBlockOne").click(function () {
    $("div.pnlJQueryOne").animate({
    height: "300px"
    })
    .animate({
    height: "200px"
    }, "fast");

    $("div.panel_buttonOne").toggle();
    });

    $("div#closeBlockOne").click(function () {
    $("div.pnlJQueryOne").animate({
    height: "62px"
    }, "slow");

    $("div.panel_buttonOne").toggle();
    });

    $("div#openBlockTwo").click(function () {
    $("div.pnlJQueryTwo").animate({
    height: "350px"
    })
    .animate({
    height: "250px"
    }, "fast");

    $("div.panel_buttonTwo").toggle();
    });

    $("div#closeBlockTwo").click(function () {
    $("div.pnlJQueryTwo").animate({
    height: "62px"
    }, "slow");

    $("div.panel_buttonTwo").toggle();
    });

    $("div#openBlockThree").click(function () {
    $("div.pnlJQueryThree").animate({
    height: "300px"
    })
    .animate({
    height: "200px"
    }, "fast");

    $("div.panel_buttonThree").toggle();
    });

    $("div#closeBlockThree").click(function () {
    $("div.pnlJQueryThree").animate({
    height: "62px"
    }, "slow");

    $("div.panel_buttonThree").toggle();
    });

    $("div#openBlockFour").click(function () {
    $("div.pnlJQueryFour").animate({
    height: "325"
    })
    .animate({
    height: "325"
    }, "fast");

    $("div.panel_buttonFour").toggle();
    });

    $("div#closeBlockFour").click(function () {
    $("div.pnlJQueryFour").animate({
    height: "62"
    }, "slow");

    $("div.panel_buttonFour").toggle();
    });--*/

});

