var $j = jQuery.noConflict(); $j(document).ready(function(){ $j('#btn_login').click(function (){ $j('#login_wrap').slideToggle('slow'); if( $j('#btn_login span').text() == 'Close' ) { $j('#btn_login span').text('Login'); $j('.moduletable-aec').fadeOut('fast'); $j('#uddeim-module').fadeOut('fast'); $j('#recherche').animate({top: "-=50"}, 'slow'); $j('#slogan').animate({top: "-=50"}, 'slow'); }else{ $j('#btn_login span').text('Close'); $j('.moduletable-aec').fadeIn('slow'); $j('#uddeim-module').fadeIn('slow'); $j('#recherche').animate({top: "+=50"}, 'slow'); $j('#slogan').animate({top: "+=50"}, 'slow'); } }); $j('.btn_search').click(function (){ if( $j('#btn_login span').text() == 'Close') { $j('#recherche').animate({top: "195"}, 'slow'); } if ($j('#recherche').is(":hidden")) { $j('#recherche').fadeIn('slow'); $j('#info').fadeOut('slow'); }else { $j('#recherche').fadeOut('slow'); $j('#info').fadeIn('slow'); } }); $j('#search_back').click(function (){ $j('#recherche').fadeOut('slow'); $j('#info').fadeIn('slow'); }); $j('.voir').click(function (){ $j(this).next('div').slideToggle('slow'); }); $j('.detail').click(function (){ $j(this).parent().next('.group').slideToggle('slow'); }); $j('html').click( function() { // Show/hide on click if(!$j('.multiSelectOptions').find('LABEL').hasClass('hover')){ $j('.multiSelectOptions').prev('.multiSelect').multiSelectOptionsHide(); } }); $j('#uddeim-modulenew').click(function (){ $j(location).attr('href','index.php?option=com_uddeim&task=inbox'); }); $j('#pfriends').click(function (){ $j(location).attr('href','index.php?option=com_comprofiler&task=manageConnections&Itemid=39'); }); }); function copyAddress(){ var adresse1 = document.getElementById('Adresse1').value; if( document.getElementById('Adresse2').value != ''){ adresse1 = adresse1 +', '+document.getElementById('Adresse2').value; } var cp = document.getElementById('cp').value; var ville = document.getElementById('Ville').value; var state = document.getElementById('cb_state').value; document.getElementById('address').value = adresse1; document.getElementById('postcode').value = cp; document.getElementById('city').value = ville; document.getElementById('state').value = state; } function getXMLHTTP() { //fuction to return the xml http object var xmlhttp=false; try{ xmlhttp=new XMLHttpRequest(); } catch(e) { try{ xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e1){ xmlhttp=false; } } } return xmlhttp; } function calendrier(date) { var strURL="index.php?option=com_jcalpro&extmode=cal&tmpl=component&date="+date; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('prochain').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } function getState(zone) { var strURL="index.php?option=com_jumi&fileid=3&tmpl=raw&zone="+zone; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('affpays').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } function getCity(country) { var strURL="index.php?option=com_jumi&fileid=4&tmpl=raw&country="+country; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('affville').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } function getDest1(desta, nb) { var strURL="index.php?option=com_jumi&fileid=7&tmpl=raw&desta="+desta+"&nb="+nb; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('affdest'+nb+'b').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } function getDest2(destb, nb) { var strURL="index.php?option=com_jumi&fileid=8&tmpl=raw&destb="+destb+"&nb="+nb; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('affdest'+nb+'c').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } function recherche(requete) { window.location.href = "index.php?option=com_jumi&fileid=10&"+requete; } /* function recherche(requete) { var strURL="index.php?option=com_jumi&fileid=10&tmpl=compsearch&"+requete; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('annonces').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } jQuery('#loader').fadeOut('slow'); req.open("GET", strURL, true); req.send(null); } }*/ function hackcss(){ var content = document.getElementById('content'); var footer = document.getElementById('footer-module'); var htmlheight = document.body.parentNode.scrollHeight; var windowheight = window.innerHeight; if ( htmlheight > windowheight ) { content.style.height = (htmlheight-125) + "px"; } }