/*
 *
 * Code by Diffuse Interactive (c)2010
 * www.diffuse.nl
 *
 */

$(document).ready(function() {

    $('#aanbieding .overlay').mouseover(function(){
        $('#aanbieding .overlay-content div').slideDown();
    });
    $('#aanbieding .overlay').mouseout(function(){
        $('#aanbieding .overlay-content div').slideUp();
    });

   if($("#photoplayer").length != 0){
       $("#photoplayer").slideShow({
           speed: 500,
           controls: true
       });
   }

   if($("#photoplayer_small").length != 0){
       $("#photoplayer_small").slideShow({
           speed: 500
       });
   }

   $('.product .overlay').mouseover(function(){
        $(this).parent().find('.overlay-content div').slideDown();
    });
    
    $('.product .overlay').mouseout(function(){
        $(this).parent().find('.overlay-content div').slideUp();
    });

    if($("#slideshow").length != 0){
        $("#slideshow div").easySlider({
            controlsShow: false,
            auto: true,
		speed: 2000,
		pause: 3000,
            continuous: true
        });
    }

    $("a.image").fancybox({
        overlayOpacity: 0.8,
        overlayColor: '#f2e9d8'
    });

    $('.popup').click(function() {
        $(this).find('a').trigger('click');
    });

    if ($('a.open').length > 0) {
        $('a.open').fancybox({
            'overlayOpacity'	: 0.5,
            'transitionIn'		: 'fade',
            'transitionOut'		: 'fade',
            'overlayColor'		: '#000',
            'padding'			: 0,
            'width'             : 762,
            'height'            : 600
        });
    }

});
