/*-------------------------------------------------------------

Javascript File (Genes Reunited)
version:   1.0
author:    Airlock
website:   http://www.airlock.com/

-------------------------------------------------------------*/

$(function () {
    function fav() {
        var newT = document.createTextNode('Add to favourites');
        var s = document.getElementById('fav');
        if (window.sidebar && s != null) {
            s.appendChild(newT);
            s.style.color = '#345857';
            s.style.cursor = 'pointer';
            s.onclick = function () { window.sidebar.addPanel(document.title, self.location, '') };
        } else if (window.external && s != null) {
            s.appendChild(newT);
            s.style.color = '#345857';
            s.style.cursor = 'pointer';
            s.onclick = function () { window.external.AddFavorite(self.location, document.title) };
        } else if (window.opera && s != null) {
            s.appendChild(newT);
            s.style.color = '#345857';
            s.style.cursor = 'pointer';
            s.onclick = function () {
                var e = document.createElement('a');
                e.setAttribute('href', self.location);
                e.setAttribute('title', document.title);
                e.setAttribute('rel', 'sidebar');
                e.click();
            }
        }

    }

    fav();
});

