﻿
var a2a_color_main = "E4E1E0"; var a2a_color_border = "e1003f"; var a2a_color_link_text = "555555"; var a2a_color_link_text_hover = "333333"; var a2a_color_bg = "ffffff";
var a2a_num_services = 8; var a2a_prioritize = ["facebook", "hyves", "myspace", "netlog", "twitter", "windows_live_spaces"]; var a2a_orientation = "up"; var a2a_track_links = 'ga';

$(function() {
    $("a[rel='lightbox']").fancybox({});

    $('ul#top > li.first > a').hover(
        function() {
            $(this).parent().css("background-image", "url(/images/nav_left_red.png)");
        },
        function() {
            $(this).parent().css("background-image", "url(/images/nav_left.png)");
        }
    );
   $('ul#top > li.last > a').hover(
        function() {
            $(this).parent().css("background-image", "url(/images/nav_right_red.png)");
        },
        function() {
            $(this).parent().css("background-image", "url(/images/nav_right.png)");
        }
    );
    $('ul#top > li > a').hover(
        function() {
            $(this).parent().prev().children().css("background-position", "-50px");
        },
        function() {
            $(this).parent().prev().children().css("background-position", "right center");
        }
    );

});



function addBookmark(url, desc) {
    var bookmarkurl = url;
    var bookmarktitle = desc;
    var nonie = 'Sorry, only Mozilla Firefox and Internet Explorer support this method to add a bookmark/favourite\n But please feel free to visit the site\'s home page to add a bookmark manually';

    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
    } else if (document.all) { // IE Favourites
        window.external.AddFavorite(bookmarkurl, bookmarktitle);
    } else {
        alert(nonie);
    }
}




/* menu */
var menuTimeoutID;
var menuLast;
function show(elementid) {
    if (menuLast == elementid)
        clearTimeout(menuTimeoutID);
    else if (menuLast != null)
        $('#' + menuLast).hide();
    menuLast = elementid;
    $('#' + elementid).show();
}

function hide(elementid) {
    menuTimeoutID = setTimeout("$('#'+'" + elementid + "').hide();", 300);
}


