﻿// JavaScript Document
$(window).load(function() {
    $('#eyecatcherscontainer').cycle({
        fx: 'scrollLeft',
        timeout: 6000,
        next: '.eyecatchersControl'
    });

    $('#sponsorContainer').cycle({
        fx: 'fade',
        timeout: 6000
    });
        
var loadSecondAfb = true;
$('#rightBottomContainer ul li a').mouseover(function() {
    var img = new Image();
    var targetImg = $(this).attr('rel');
    if (loadSecondAfb) {
        $('#horecaZaakImg').load(function() {
            $('#horecaZaakImg').stop().fadeTo('fast', 1);
        }).attr('src', targetImg);

        loadSecondAfb = false;
    } else {
        $('#horecaZaakImg2').load(function() {
            $('#horecaZaakImg').stop().fadeTo('fast', 0);
        }).attr('src', targetImg);

        loadSecondAfb = true;
    }
});

$('.resultItemContainer').hover(function() {
    $('.resultItemContainer').not(this).stop().fadeTo('fast', 0.5);
    $(this).css({ 'background-color': '#9ba1a5' });
}, function() {
    $('.resultItemContainer').not(this).stop().fadeTo('fast', 1);
    $(this).css({ 'background-color': '#b7bec2' });
});

$('.resultItemContainer').click(function() {
    window.location = $('a', this).attr('href');
});

$("a.fancylink").fancybox({
    'speedIn': 300,
    'speedOut': 300,
    'overlayShow': true,
    'overlayOpacity': 0.7,
    'overlayColor': '#000000',
    'padding': 2
});

$("#rightTopContainerLeft select").msDropDown();

$("a.artFancyFoto").fancybox();

$("a.zoekFancy").fancybox({
    'type': 'iframe',
    'width': 800,
    'height': 490
});
});
