﻿/// <reference path="jquery-1.3.2-vsdoc2.js" />
var Narlivs = {};
var addthis_config =
{
//http://www.addthis.com/help/menu-api  http://www.addthis.com/services/list
//settings for addthis compact class:
//services_compact: 'print,email,favorites,facebook,twitter'
ui_header_color: "#000",
ui_header_background: "#f29527"
}

$(document).ready(function() {
    Narlivs.bannertooltip.init();
    Narlivs.overlay.init();
});

//jQuery Tools - Tooltip
Narlivs.bannertooltip = {
    init: function() {
        //tooltip for "banneritem" element.
        $("#divider .banneritem").tooltip({
            // effect: 'slide',
            // use div.tooltip as our tooltip 
            tip: 'div.tooltip',
            bounce: false,
            offset: [10, -5]
        });

        $("#divider .banneritem img").attr('title', ''); //hides fallback tooltip
    }
};


//jQuery Tools - "Lightbox"
Narlivs.overlay = {
    init: function() {
        // select one or more elements to be overlay triggers
        var links = $(".ImageArchiveList a");
        if (links != null && links.length > 0) {
            $(".ImageArchiveList a").overlay({
                color: '#ccc',
                left: 'center',
                //effect: 'apple',
                //top: '10%',
                expose: {
                    color: '#000',
                    loadSpeed: 400,
                    opacity: 0.3
                },
                target: '#gallery' // each trigger uses the same overlay with the id "gallery" 

            }).gallery({
                autohide: true, //Specifies whether the next/prev buttons and the info box are automatically hidden. If this is set to false then these elements are always shown.
                speed: 200, //The speed of how fast the overlay is resized when the image is changed.
                template: '<div class="imageinfo"><span class="photoby">Fotograf: ${rel}</span> <a href="${title}">Ladda ner högupplöst bild</a></div> <span>Bild ${index} av ${total}</span>'
            });
            
            
        }
    }
}; 

