function send_popup()
{
    $.ajax({
   type: "POST",
   url: "/popup.php",
   data: "",
   success: function(msg){
    if(msg ==1)
    {
    $("#popup").html('<a href="/theme/share/images/popup/popup.jpg">popup</a>');
    $('#popup a').nyroModalManual();
    }
   }
 });

}


function slide_dynamique(occ){var nb=occ;for(i=0;i<nb;i++){$('#P_'+i).cycle({fx:'fade',speed:1000,timeout:3000,pause:1})}}function over_jeanne(iddiv){toto=document.getElementById(iddiv);fond=new Image();arrondi=new Image();if(iddiv=='ojeanne'){toto.className='round_firstover'}else if(iddiv=='oloire'){toto.className='round_lastover'}}function out_jeanne(iddiv){toto=document.getElementById(iddiv);if(iddiv=='ojeanne'){toto.className='round_first'}else if(iddiv=='oloire'){toto.className='round_last'}}

$(document).ready(function()
{
    
fond=new Image();fond.src="../../theme/kapweb/images/ot/fond_jeanne_selec.jpg";arrondi=new Image();arrondi.src="../../theme/kapweb/images/ot/deb_jeanne_selec.jpg";arrondi2=new Image();arrondi2.src="../../theme/kapweb/images/ot/fin_jeanne_selec.jpg";$('#jgroupe').click(function(){$('#shadowx').toggle('slow')});$('#marqeurs img').tooltip({track:true,delay:0,showURL:false,showBody:" TOTO ",fade:250});$("#marqeurs img").css({opacity:0.3,border:'1px solid white'});$("#marqeurs img").mouseover(function(){if($(this).hasClass(".not_actif")){$(this).css({opacity:1,border:'1px solid red'})}});$("#marqeurs img").mouseout(function(){if($(this).hasClass(".not_actif")){$(this).css({opacity:0.3,border:'1px solid white'})}});$(".not_actif").click(function(){if($(this).hasClass(".not_actif")){$(this).animate({opacity:1},300);$(this).removeClass("not_actif").addClass("is_actif")}else{$(this).animate({opacity:0.3,border:0},300);$(this).removeClass("is_actif").addClass("not_actif")}return false});$('#s3').cycle({fx:'fade',speed:1000,timeout:3000,pause:1});$('#stm').cycle({fx:'fade',speed:1000,timeout:3000,pause:1});$('#s4').cycle({fx:'fade',speed:1000,pause:1});$('#s5').cycle({fx:'fade',speed:1000,timeout:3000,pause:1});$('#s9').cycle({fx:'fade',speed:1000,timeout:3000,next:'#s9',pause:1});$('#s10').cycle({fx:'fade',speed:1000,timeout:3000,next:'#s10',pause:1});$("ul.menuone").supersubs({minWidth:12,maxWidth:27,extraWidth:1}).superfish();$('#menu_ot_autre').toggle();$('#button_ot').click(function(){$('#menu_ot_autre').toggle('slow')});
  this.defaults = {
     scroller: {
       interval:  0,    // Dont touch !
       refresh:   30,  // Refresh Time in ms
       direction: "up", // down,right,left,up
       speed:     1,    // Set the Scroller Speed
       id:        "#scroller",
       cont_id:   "#scroller_container"
     }
   }
var jscroller_config=$.extend(this.defaults),jscroller_scroller=$(jscroller_config.scroller.id),jscroller_scroller_cont=$(jscroller_config.scroller.cont_id);if(jscroller_scroller&&jscroller_scroller_cont){jscroller_scroller.css({position:'absolute',left:0,top:0});jscroller_init()}function jscroller_startScroll(){if(!jscroller_config.scroller.interval){jscroller_config.scroller.interval=window.setInterval(jscroller_doScroll,jscroller_config.scroller.refresh)}}function jscroller_stopScroll(){if(jscroller_config.scroller.interval){window.clearInterval(jscroller_config.scroller.interval);jscroller_config.scroller.interval=0}}function jscroller_init(){$("#scroller a").click(function(){window.open(this.href);return false});jscroller_scroller_cont.css('overflow','hidden');if(!jscroller_config.scroller.interval){if(window.attachEvent){window.attachEvent("onfocus",jscroller_startScroll);window.attachEvent("onblur",jscroller_stopScroll);window.attachEvent("onresize",jscroller_startScroll);window.attachEvent("onscroll",jscroller_startScroll)}else if(window.addEventListener){window.addEventListener("focus",jscroller_startScroll,false);window.addEventListener("blur",jscroller_stopScroll,false);window.addEventListener("resize",jscroller_startScroll,false);window.addEventListener("scroll",jscroller_startScroll,false)}jscroller_startScroll();if($.browser.msie){window.focus()}}}function jscroller_getElem(Elem){return(typeof Elem=="string"&&document.getElementById)?document.getElementById(Elem):Elem}function jscroller_doScroll(){if(scroller_dom=jscroller_getElem(jscroller_scroller.attr("id"))){var p_top=Number((/[0-9-,.]+/.exec(jscroller_scroller.css('top'))||0)),p_left=Number((/[0-9-,.]+/.exec(jscroller_scroller.css('left'))||0)),min_height=jscroller_scroller_cont.height(),min_width=jscroller_scroller_cont.width(),speed=jscroller_config.scroller.speed,p_height=scroller_dom.offsetHeight,p_width=scroller_dom.offsetWidth,direction=jscroller_config.scroller.direction,jscroller=jscroller_scroller;switch(direction){case'up':if(p_top<=-1*p_height){p_top=min_height}jscroller.css('top',p_top-speed+'px');break;case'right':if(p_left>=min_width){p_left=-1*p_width}jscroller.css('left',p_left+speed+'px');break;case'left':if(p_left<=-1*p_width){p_left=min_width}jscroller.css('left',p_left-speed+'px');break;case'down':if(p_top>=min_height){p_top=-1*p_height}jscroller.css('top',p_top+speed+'px');break}}}nb_player=1;$("object embed").each(function(i){type=this.type;if(type=='video/x-flv'){src=this.src;$(this).parent().before('<div id="player_'+nb_player+'" style="z-index:5">');var nih=new SWFObject('../../theme/share/player/player.swf','mpl',this.width,this.height,'9');nih.addParam('allowscriptaccess','always');nih.addParam('bgcolor','#ffffff');nih.addParam('allowfullscreen','true');nih.addParam('WMODE','Transparent');nih.addParam('flashvars','file='+src+'&amp;controlbar=over&amp;autostart=true');nih.write('player_'+nb_player);nb_player++;$(this).parent().remove()}});$("object").each(function(i){type=this.type;if(type=='application/x-shockwave-flash'){$(this).parent().before('<div id="flash_'+nb_player+'" style="z-index:5">');var nih=new SWFObject(this.data,'mpl',this.width,this.height,'9');nih.addParam('allowscriptaccess','always');nih.addParam('bgcolor','#ffffff');nih.addParam('allowfullscreen','true');nih.addParam('WMODE','Transparent');nih.write('flash_'+nb_player);nb_player++;$(this).remove()}});

});

function selectNav(){$(this).parents('ul:first').find('a').removeClass('selected').end().end().addClass('selected')}$('#slider .navigation').find('a').click(selectNav);function trigger(data){var el=$('#slider .navigation').find('a[href$="'+data.id+'"]').get(0);selectNav.call(el)}function Coda_Slider($panels,$container,$scroll,$stopTriggers,$appli_scroll,$var_timer,$var_delais){var $panels;var $container;if($panels[0]){var horizontal=true;if(horizontal){$panels.css({'float':'left','position':'relative'});$container.css('width',$panels[0].offsetWidth*$panels.length)}var $scroll;if(window.location.hash){trigger({id:window.location.hash.substr(1)})}else{$('ul.navigation a:first').click()}var offset=parseInt((horizontal?$container.css('paddingTop'):$container.css('paddingLeft'))||0)*-1;var scrollOptions={target:$scroll,items:$panels,navigation:'.navigation a',prev:'img.left',next:'img.right',axis:'xy',onAfter:trigger,offset:offset,duration:500,easing:'swing'};$($appli_scroll).serialScroll(scrollOptions);$.localScroll(scrollOptions);scrollOptions.duration=1;$.localScroll.hash(scrollOptions);var cycleTimer=setInterval(function(){$scroll.trigger('next')},$var_timer);var $stopTriggers;function stopCycle(){$stopTriggers.unbind('click.cycle');clearInterval(cycleTimer)}$stopTriggers.bind('click.cycle',stopCycle)}}var map=null;var geocoder=null;function loadgmap(){if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));map.setCenter(new GLatLng(48.9,2.3),7);map.addControl(new GMapTypeControl());map.setUIToDefault();map.addControl(new GLargeMapControl3D())}}function chargerCarteAvecMarqueur(points){var icon=new GIcon();icon.shadow="http://labs.google.com/ridefinder/images/mm_20_shadow.png";icon.iconSize=new GSize(24,24);icon.shadowSize=new GSize(24,24);icon.iconAnchor=new GPoint(6,20);icon.infoWindowAnchor=new GPoint(5,1);var latCenter=calculerLatCenter(points);var longCenter=calculerLongCenter(points);for(var i=0;i<points.length;i++){var point=new GLatLng(points[i]['lat'],points[i]['long']);icon.image=points[i]['icon'];points[i]['afficher']=1;points[i]['object']=new GMarker(point,{icon:icon,title:points[i]['id_base']});map.addOverlay(points[i]['object'])}return points}function cacher_marker(points){for(var i=0;i<points.length;i++){if(points[i]['object'].isHidden()){points[i]['object'].show()}else{points[i]['object'].hide()}}}function calculerLatCenter(points){var buf=0;var len=points.length;for(var i=0;i<len;i++){buf=buf+points[i]['lat']}return(buf/len)}function calculerLongCenter(points){var buf=0;var len=points.length;for(var i=0;i<len;i++){buf=buf+points[i]['long']}return(buf/len)}function afficherAdresse_CB(gm_lat,gm_long){point=new GLatLng(gm_lat,gm_long);if(!point){alert(" introuvable")}else{map.setCenter(point,14);var marker=new GMarker(point);var titre=document.getElementById("gmap_titre");titre.style.display='block';map.addOverlay(marker);marker.openInfoWindowHtml(titre);GEvent.addListener(marker,'click',function(){marker.openInfoWindowHtml(titre)})}}function afficherAdresse_CB_AJAX(gm_lat,gm_long,html){point=new GLatLng(gm_lat,gm_long);if(!point){alert(" introuvable")}else{map.setCenter(point,14);var marker=new GMarker(point);map.addOverlay(marker);marker.openInfoWindowHtml(html);GEvent.addListener(marker,'click',function(){marker.openInfoWindowHtml(html)})}}function change_prod_list(valeur){$.ajax({type:"POST",url:"/prod.php",data:"name=John&location="+valeur,success:function(msg){$("#cat_prod").html(msg)}})}