﻿

$(document).ready(function() {
    $('.printPage').click(function() { printPage(); return false; });
    $('.bookmark').click(function() { fnAddBookmark($(this).attr('href')); return false; })
    $('#hpNewsSlideshow').cycle({ timeout: 4000, speed: 750, delay:-2000});
});


function printPage() { print(); }

function fnAddBookmark(url) {
    if (url.length == 0) {
        url = window.location;
    }
    if ($.browser.safari) {
        alert("Press Ctrl+D to bookmark this page in Chrome or Safari");
        return false;
    }
    var title = document.title;
    if (window.sidebar)
    {
        //Mozilla
        window.sidebar.addPanel(title, url, "");
    }
    else if (document.all)
    {
        //IE
        window.external.AddFavorite(url, title);
    }
    else if (window.opera && window.print)
    {
        //Opera
        alert("Press Ctrl+D to bookmark this page in Opera");
        return false;
        //do nothing
        //return true;
    }           
} 
