$(function () {
    $('#basicBookmark').bookmark({
        icons: 'js/bookmarks.gif',
        compact: true,
        favoriteText: 'Favourite',
        sites: ['_comment', 'facebook', 'myspace', 'twitter', 'tumblr', 'google'],
        onSelect: function(id, display, url) {
            window.open(url, '_blank');

            var f = function(e) {
                if (this.ourgaqpush) {
                    ourgaqpush([ '_trackEvent', 'Bookmark', 'Share', id, null]);
                }
                else {
                    _gaq.push([ '_trackEvent', 'Bookmark', 'Share', id, null]);
                }
                if (window.addEventListener) {
                    window.removeEventListener('focus', f, false);
                }
                else {
                    window.onfocus = null;
                }
            };

            if (window.addEventListener) {
                window.addEventListener('focus', f, false);
            }
            else {
                window.onfocus = f;
            }

            return false;
        }
    });
});



