﻿//Cufon.replace("", { fontFamily: "HelveticaNeueBold" });

$(document).ready(function () {
    $(".stardekk a").fancybox({
        width: 520,
        height: 500,
        'hideOnContentClick': true
    });

    $("#bannercontainer #banners").cycle({
        random: true
    });

    $(".bookPopup").fancybox({
        width: 520,
        height: 500,
        centerOnScroll: true,
        type: 'iframe',
        padding: 2,
        overlayColor: "#000000",
        overlayOpacity: 0.8,
        titleShow: false
    });

    $(".slideshow a").fancybox({
        'zoomSpeedIn': 0,
        'zoomSpeedOut': 0,
        'overlayShow': true,
        padding: 2
    });
    $("a.images").fancybox({
        'zoomSpeedIn': 0,
        'zoomSpeedOut': 0,
        'overlayShow': true,
        overlayOpacity: 0.8,
        overlayColor: "#000000",
        padding: 2,
        titleShow: false,
        centerOnScroll: true
    });

    $("a.familypic").fancybox({
        'zoomSpeedIn': 0,
        'zoomSpeedOut': 0,
        'overlayShow': true,
        overlayOpacity: 0.8,
        overlayColor: "#000000",
        titleShow: false,
        padding: 2
    });

    /*$("#eyecatcherscontainer li, #logocontainer, #eyecatcher1, #eyecatcher2").css({ "cursor": "pointer" }).click(function () {
        window.location = $("a:first", $(this)).attr("href");
    }).hover(function () {
        $(this).addClass("active");
    }, function () {
        $(this).removeClass("active");
    });*/

    $("#bannersTitle").css({ "cursor": "pointer" }).click(function () {
        $("a", $(this)).trigger("click");
    });

    setFooterPos();
});

$(window).resize(function () {
    setFooterPos();
});

function setFooterPos() {
    if ($(window).height() > $("body").height()) {
        $("#splash_footercontainer").css({ "top": ($(window).height() - $("body").height()) + "px" });
    }
}

