﻿function create_mail(naam, domain, tld) {
    var label = naam;
    label += '&#64;' + domain
    label += '.' + tld;

    var mail = '<a href="' + 'ma' + 'il' + 'to:' + naam;
    mail += '&#64;' + domain + '.' + tld;
    mail += '">' + label + '<' + '/a>';
    document.write(mail);
}

$(document).ready(function () {
    $('ul.menu li').hover(
                    function () {
                        $(this).addClass('hover');
                    }, function () {
                        $(this).removeClass('hover');
                    });

    // Load theme
    Galleria.loadTheme('/Content/Galleria/themes/classic/galleria.classic.js');

    // run galleria and add some options
    $('#galleria').galleria({
        image_crop: true, // crop all images to fit
        thumb_crop: true, // crop all thumbnails to fit
        transition: 'fade', // crossfade photos
        transition_speed: 250, // slow down the crossfade
        data_config: function (img) {
            // will extract and return image captions from the source:
            var $texts = $(img).parent().next('.text');
            return {
                title: $texts.children("h2").html(),
                description: $texts.children("div").html()
            };
        },
        extend: function () {
            this.bind(Galleria.IMAGE, function (e) {
                // bind a click event to the active image
                $(e.imageTarget).css('cursor', 'pointer').click(this.proxy(function () {
                    // open the image in a lightbox
                    this.openLightbox();
                }));
            });
        }
    });
});
