// on va détecter le browser var ie = (jQuery.browser.msie) ? true : false; var firefox = (jQuery.browser.firefox) ? true : false; var opera = (jQuery.browser.opera) ? true : false; var safari = (jQuery.browser.safari) ? true : false; jQuery.fn.corner = function(o) { function hex2(s) { var s = parseInt(s).toString(16); return ( s.length < 2 ) ? '0'+s : s; }; function gpc(node) { for ( ; node && node.nodeName.toLowerCase() != 'html'; node = node.parentNode ) { var v = jQuery.css(node, 'backgroundColor'); if ( v.indexOf('rgb') >= 0 ) { rgb = v.match(/\d+/g); return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]); } if ( v && v != 'transparent' ) return v; } return '#ffffff'; }; function getW(i) { switch(fx) { case 'round': return Math.round(width * (1 - Math.cos(Math.asin(i / width)))); case 'cool': return Math.round(width * (1 + Math.cos(Math.asin(i / width)))); case 'sharp': return Math.round(width * (1 - Math.cos(Math.acos(i / width)))); case 'bite': return Math.round(width * (Math.cos(Math.asin((width - i - 1) / width)))); case 'slide': return Math.round(width * (Math.atan2(i, width / i))); case 'jut': return Math.round(width * (Math.atan2(width,(width-i-1)))); case 'curl': return Math.round(width * (Math.atan(i))); case 'tear': return Math.round(width * (Math.cos(i))); case 'wicked': return Math.round(width * (Math.tan(i))); case 'long': return Math.round(width * (Math.sqrt(i))); case 'sculpt': return Math.round(width * (Math.log((width-i-1),width))); case 'dog': return (i & 1) ? (i + 1) : width; case 'dog2': return (i & 2) ? (i + 1) : width; case 'dog3': return (i & 3) ? (i + 1) : width; case 'fray': return (i % 2)*width; case 'notch': return width; case 'bevel': return i + 1; } }; o = (o || "").toLowerCase(); var keep = /keep/.test(o); // keep borders? var cc = ((o.match(/cc:(#[0-9a-f]+)/) || [])[1]); // corner color var sc = ((o.match(/sc:(#[0-9a-f]+)/) || [])[1]); // strip color var width = parseInt((o.match(/(\d+)px/) || [])[1]) || 10; // corner width var re = /round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/; var fx = ((o.match(re) || ['round'])[0]); var edges = { T:0, B:1 }; var opts = { TL: /top|tl/.test(o), TR: /top|tr/.test(o), BL: /bottom|bl/.test(o), BR: /bottom|br/.test(o) }; if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR ) opts = { TL:1, TR:1, BL:1, BR:1 }; var strip = document.createElement('div'); strip.style.overflow = 'hidden'; strip.style.height = '1px'; strip.style.backgroundColor = sc || 'transparent'; strip.style.borderStyle = 'solid'; return this.each(function(index) { var pad = { T: parseInt(jQuery.css(this,'paddingTop')) || 0, R: parseInt(jQuery.css(this,'paddingRight')) || 0, B: parseInt(jQuery.css(this,'paddingBottom')) || 0, L: parseInt(jQuery.css(this,'paddingLeft')) || 0 }; if (jQuery.browser.msie) this.style.zoom = 1; // force 'hasLayout' in IE if (!keep) this.style.border = 'none'; strip.style.borderColor = cc || gpc(this.parentNode); var cssHeight = jQuery.curCSS(this, 'height'); for (var j in edges) { var bot = edges[j]; strip.style.borderStyle = 'none ' + (opts[j + 'R'] ? 'solid' : 'none') + ' none ' + (opts[j + 'L'] ? 'solid' : 'none'); var d = document.createElement('div'); var ds = d.style; bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild); if (bot && cssHeight != 'auto') { if (jQuery.css(this,'position') == 'static') this.style.position = 'relative'; ds.position = 'absolute'; ds.bottom = ds.left = ds.padding = ds.margin = '0'; if (jQuery.browser.msie) ds.setExpression('width', 'this.parentNode.offsetWidth'); else ds.width = '100%'; } else { ds.margin = !bot ? '-' + pad.T + 'px -' + pad.R + 'px ' + (pad.T - width) + 'px -' + pad.L + 'px' : (pad.B - width) + 'px -' + pad.R + 'px -' + pad.B + 'px -' + pad.L + 'px'; } for (var i = 0 ; i < width ; i++) { var w = Math.max(0, getW(i)); var e = strip.cloneNode(false); e.style.borderWidth = '0 ' + (opts[j + 'R'] ? w : 0) + 'px 0 ' + (opts[j + 'L'] ? w : 0) + 'px'; bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild); } } }); }; function hidecompat(){ div = document.getElementById('hideonmenufired'); if(div) div.style.visibility="hidden"; } function showcompat(){ div = document.getElementById('hideonmenufired'); if(div) div.style.visibility=""; } $(document).ready(function() { $("#menu_image_1").mouseover ( function(){hidecompat();menuopen(1);} ); $("#menu_image_2").mouseover ( function(){hidecompat();menuopen(2);} ); $("#menu_image_3").mouseover ( function(){hidecompat();menuopen(3);} ); $("#menu_image_4").mouseover ( function(){hidecompat();menuopen(4);} ); $("#dummy_menu").mouseover ( function() { menuclose(1); menuclose(2); menuclose(3); menuclose(4); showcompat(); } ); $("#carrieres_menu_image").mouseover ( function() { menuclose(1); menuclose(2); menuclose(3); menuclose(4); showcompat(); } ); $("#contact_menu_image").mouseover ( function() { menuclose(1); menuclose(2); menuclose(3); menuclose(4); showcompat(); } ); $("#logo_image").mouseover ( function() { menuclose(1); menuclose(2); menuclose(3); menuclose(4); showcompat(); } ); $("#espace_abo_image").mouseover ( function() { menuclose(1); menuclose(2); menuclose(3); menuclose(4); showcompat(); } ); $("#contenu").mouseover ( function() { menuclose(1); menuclose(2); menuclose(3); menuclose(4); showcompat(); } ); $("#pagedecideurs").mouseover ( function() { menuclose(1); menuclose(2); menuclose(3); menuclose(4); showcompat(); } ); $("#sous_menu_1").mouseover ( function(){sousmenuopen(1);} ); $("#sous_menu_2").mouseover ( function(){sousmenuopen(2);} ); $("#sous_menu_3").mouseover ( function(){sousmenuopen(3);} ); $("#sous_menu_4").mouseover ( function(){sousmenuopen(4);} ); $("#espacedecideurs").click ( function () { document.location.href = 'http://www.nomination.fr/decideurs/mouvement-dirigeant/espacedecideurs.php'; } ); $("#cp_bouton").click ( function () { document.location.href = 'http://www.nomination.fr/communication/relations-publiques/communiquepresse.php'; } ); /*$("#testgratuit").click ( function () { document.location.href = 'http://www.nomination.fr/marketing/strategie-commerciale/test.php'; } );*/ $("#espaceentreprises").click ( function () { document.location.href = 'http://www.nomination.fr/marketing/relation-clients/espaceentreprises.php'; } ); $("#carrieres_menu_image").click ( function () { document.location.href = 'http://www.nomination.fr/information/btob/carrieres.php'; } ); $("#contact_menu_image").click ( function () { document.location.href = 'http://www.nomination.fr/dirigeants/commercial-marketing/contact.php'; } ); $("#logo_image").click ( function () { document.location.href = 'http://www.nomination.fr/relation-client/mouvements-decideurs/pageaccueil.php'; } ); $("#espace_abo_image").click ( function () { document.location.href = '../../modules/nomination/accueil.php'; } ); $("#etes_vous").click ( function () { document.location.href = 'http://www.nomination.fr/decideurs/entreprises-institutions-CAC40/inscrit.php'; } ); $("#fpnomiimage").click ( function () { document.location.href = 'http://www.nomination.fr/mouvement/information-btob/nomi.php'; } ); $("#fpfonctionimage").click ( function () { document.location.href = 'http://www.nomination.fr/nominations/organigramme-decideurs/fpfonction.php'; } ); $("#inscription_nominews").click ( function () { window.open('http://www.nomination.fr/html/nominews/1/index.php?viral=1', 'viral', 'width=400, height=290, scrollbars=1'); } ); $("#ok_inscrit").click ( function () { var val = document.getElementById('email_inscrit').value; if (val.indexOf('@') > -1) document.location.href = 'http://www.nomination.fr/decideurs/entreprises-institutions-CAC40/inscrit.php-'+val; else { alert('La syntaxe de votre courriel est incorrecte.'); document.getElementById('email_inscrit').value = ''; document.getElementById('email_inscrit').focus(); } } ); } ); jQuery.fn.fadeToggle = function(speed, easing, callback) { return this.animate({opacity: 'toggle'}, speed, easing, callback); }; function menuopen(num) { var val = (document.getElementById('sous_menu_'+num).style.display == 'block') ? 1 : 0; for (var i = 1 ; i <= 4 ; i++) { if (i == num) { if (val < 1) { $('#sous_menu_'+i).fadeIn("fast"); $('#sous_menu_'+i).show(''); } } else menuclose(i); } } function menuclose(num) { var val = (document.getElementById('sous_menu_'+num).style.display == 'block') ? 1 : 0; if (val > 0) { $('#sous_menu_'+num).fadeOut("fast"); $('#sous_menu_'+num).hide(''); } } function sousmenuclose(num) { setTimeout("menuclose("+num+")", 1000); } function sousmenuopen(num) { document.getElementById('input_menu_'+num).value = 0; } window.onload = function() { $('#sous_menu_1').corner("bl br"); $('#sous_menu_2').corner("bl br"); $('#sous_menu_3').corner("bl br"); $('#sous_menu_4').corner("bl br"); if (ie) { if (document.getElementById('contenu')) { document.getElementById('contenu').style.zIndex = -1; $('#contenu').width(948); } $('#sous_menu_1').width(155); $('#sous_menu_3').width(161); } }; function openPopup(url, nom, w, h, t, l) { var num; var pos1, pos2; if(!h) h=700; if(!w) w=1000; if (!l){ if(screen.availWidth) l=(screen.availWidth-w)/2; else l = 10; } if (!t){ if(screen.availHeight) t=(screen.availHeight-h)/2; else t=10; } if(l<0) l = 10; if(t<0) t = 10; if (document.all || document.getElementById) options = "scrollbars=yes, resizable=yes, width="+w+", height="+h+", left="+l+", top="+t+""; if (document.layers) options = 'scrollbars=yes,resizable=yes,outerWidth='+w+',outerHeight='+h+',screenX='+l+',screenY='+t; id = window.open(url, nom, options); id.focus(); }