function spawnLink(link) { var url = link.href; return spawnURL(url); } function spawnURL(url) { var w = window.open(); w.opener = null; w.document.write(''); w.document.close(); return false; } function openContactList() { window.open("https://hostedtalkgadget.google.com/talkgadget/popout?nav=true#", "Buddy List", "menubar=0,resizable=0,width=320,height=360") } function openTodo() { window.open("http://www.rememberthemilk.com", "ToDo List", "menubar=0,resizable=0,width=870,height=450") } function openCalendar() { window.open("https://www.google.com/calendar/gp?hl=en", "Calendar", "menubar=0,resizable=0,width=320,height=360") } function openNotepad() { window.open("notepad.html", "Notepad", "menubar=0,resizable=0,width=320,height=360") } function openCalculator() { window.open("calculator.html", "Calc", "menubar=0,resizable=0,width=320,height=360") } var zIndex = 0; function make_draggable(elements) { /* Elements is a jquery object: */ elements.draggable({ snap:true, containment:'parent', start:function(e,ui){ ui.helper.css('z-index',++zIndex); }, stop:function(e,ui){ /* Sending the z-index and positon of the note to update_position.php via AJAX GET: */ $.get('ajax/update.php',{ x : ui.position.left, y : ui.position.top, id : ui.helper.attr('id') }); } }); } $(document).ready(function(){ $('a.popup').bind("click", function(e){ e.preventDefault(); var url = $(this).attr('href'); spawnURL(url); }); $('body').prepend(''); $('#menu-bar').prepend($('#config-menu')); $("#q").focus(); //focus sur la recherche //$('.iconlist').sortable(); $('#config-menu').fancybox({ 'zoomSpeedIn' : 600, 'zoomSpeedOut' : 500, 'easingIn' : 'easeOutBack', 'easingOut' : 'easeInBack', 'hideOnContentClick': false, 'padding' : 15 }); $('#blog-links-manager').fancybox({ 'zoomSpeedIn' : 600, 'zoomSpeedOut' : 500, 'easingIn' : 'easeOutBack', 'easingOut' : 'easeInBack', 'hideOnContentClick': false, 'padding' : 15 }); });