/* Prida stranku do oblibenych, resp. otevre v browseru okno, ktere umozni ulozit do oblibenych */
function ce_bookmark() {
	title = document.title; 
	url = document.URL;
	
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title,url,"");
	} else if (window.external) { // IE Favorite
		window.external.AddFavorite(url,title);
	} else if(window.opera && window.print) { // Opera Hotlist
		return true;
	}
}

function ce_setAsHomepage(address, text) {
	// If it's Internet Explorer, use automatic link
	// Be sure to change the "http://www.YourWebSiteHere.com\"
	// to the URL you want them to bookmark.
	if (document.all){
	  document.write('<a href="#" title="Nastavit jako domovskou stránku" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\''+address+'\');">');
	  document.write(text+'</a>');
	}
	// If it's Netscape 6, tell user to drag link onto Home button
	// Be sure to change the "http://www.YourWebSiteHere.com\"
	// to the URL you want them to bookmark.
	else if (document.getElementById){
		document.write('<a onclick="return false;" href="'+address+'" title="Pro nastavení domovské stránky tuto ikonku přetáhněte na ikonku Domů ve Vašem prohlížeči">'+text+'</a>');
	}
	else {
		document.write('<a onclick="return false;" href="'+address+'" title="Pro nastavení domovské stránky tuto ikonku přetáhněte na ikonku Domů ve Vašem prohlížeči">'+text+'</a>');
	}
}

function ce_startShortcuts() {
	
	// vlozeni obsahu, galerky a formular
	$.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+o',
        handler: function() {
        	$(".CE_SC_CONTENT").click();
        }
    });
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+g',
        handler: function() {
        	$(".CE_SC_GALERIE").click();
        }
    });
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+f',
        handler: function() {
        	$(".CE_SC_FORMULAR").click();
        }
    });
    // vstupy do administrace
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+1',
        handler: function() {
        	$(".CE_SC_PAGES").click();
        }
    });
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+2',
        handler: function() {
        	$(".CE_SC_DOCUMENTS").click();
        }
    });
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+3',
        handler: function() {
        	$(".CE_SC_NODE").click();
        }
    });
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+4',
        handler: function() {
        	$(".CE_SC_GROUP").click();
        }
    });
    // prihlaseni / odhlaseni
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+Up',
        handler: function() {
        	$(".CE_SC_LOGIN").click();
        }
    });
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+Down',
        handler: function() {
        	$(".CE_SC_LOGOUT").click();
        }
    });
    // stranky
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Alt+s',
        handler: function() {
        	$(".CE_SC_NEWPAGE").click();
        }
    });
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Shift+s',
        handler: function() {
        	$(".CE_SC_EDITPAGE").click();
        }
    });
    // uzivatel
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Shift+u',
        handler: function() {
        	$(".CE_SC_EDITUSER").click();
        }
    });
    $.Shortcuts.add({
        type: 'hold',
        mask: 'Shift+p',
        handler: function() {
        	$(".CE_SC_PRESENTATION").click();
        }
    });
    
    $.Shortcuts.start();
    
}
