//FancyBox Js

$(function()
    { // Select all links that contains lightbox in the attribute rel
    $("a[rel^='lightbox']").fancybox(
        {
        'zoomOpacity': true,
        'overlayShow': true,
        'zoomSpeedIn': 500,
        'zoomSpeedOut': 500
        });

    $("a[id^='destination-descr-']").each(function()
        {
        $(this).fancybox(
            {
            'hideOnContentClick': false,
            'frameWidth': 640,
            'frameHeight': 480
            });
        });
    $("a[id^='room-disp-']").each(function()
        {
        $(this).fancybox(
            {
            'hideOnContentClick': false,
            'frameWidth': 800,
            'frameHeight': 600
            });
        });

    var newsletter_input = $('#inp-newsletter-email');
    var newsletter_link = $("a[id='newsletter-pop']");
    newsletter_input.blur(function()
        {
        newsletter_link.attr('href',
            newsletter_link.attr('href') + '&email=' + $('#inp-newsletter-email').attr('value') + '&iframe');
        });

    $("a[id='newsletter-pop']").fancybox(
        {
        'hideOnContentClick': false,
        'frameWidth': 640,
        'frameHeight': 480
        });
    
    
    $("a[id='intres-pop']").each(function()
        {
        $(this).fancybox(
            {
            'hideOnContentClick': false,
            'frameWidth': 405,
            'frameHeight': 300
            });
        });    
    });