loadScript('https://privatedeal.com/admin-dashboard-new/button-slider/js/webfont.js'); window.addEventListener("load", function() { addCss('https://privatedeal.com/admin-dashboard-new/button-slider/css/button-slider.css'); var pvdHtml='
' pvdHtml+='
keyboard_arrow_up

Nouveauté exclusive !

FAITES VOTRE OFFRE

Proposez votre prix
pour une chambre !

Meilleur tarif disponible !

'; appendHtml(document.body, pvdHtml); pvdPerform(); setTimeout(function(){ if (document.documentElement.clientWidth < 767) { var exist = document.querySelector(".material-icons"); if (!exist.classList.contains('down')) { exist.classList.add('down'); } } }, 700); }); function outerHeight(el) { var height = el.offsetHeight; var style = getComputedStyle(el); height += parseInt(style.marginTop) + parseInt(style.marginBottom); return height; } function loadScript(url) { var head = document.head , script = document.createElement("script"); script.type = "text/javascript"; script.src = url; script.onload = function(){ WebFont.load({ google: { families: ['Material+Icons'] } }); }; head.appendChild(script); } function addCss(fileName) { var head = document.head , link = document.createElement("link"); link.type = "text/css"; link.rel = "stylesheet"; link.href = fileName; head.appendChild(link); } function appendHtml(el, str) { var div = document.createElement('div'); div.innerHTML = str; while (div.children.length > 0) { el.appendChild(div.children[0]); } } function convertHex(hex,opacity){ var hex = hex.replace('#',''); var r = parseInt(hex.substring(0,2), 16); var g = parseInt(hex.substring(2,4), 16); var b = parseInt(hex.substring(4,6), 16); result = 'rgba('+r+','+g+','+b+','+opacity/100+')'; return result; } var hide = function (elem) { setTimeout(function(){ elem.style.display = 'none'; elem.classList.add('is-hide'); elem.classList.remove('is-visible'); },100); }; var toggle = function (elem) { if (elem.classList.contains('is-visible')) { hide(elem); return; } show(elem); }; var show = function (elem) { var getHeight = function () { elem.style.display = 'block'; var height = elem.scrollHeight + 'px'; return height; }; var height = getHeight(); elem.classList.remove('is-hide'); elem.classList.add('is-visible'); }; function pvdPerform() { var pvdButton=document.querySelector(".pvd-button"); pvdButton.style.fontSize='15px'; pvdButton.style.backgroundColor='#83D0F5'; pvdButton.style.color='#FFFFFF'; pvdButton.style.padding='5px 14px'; pvdButton.style.border='1px solid #FFFFFF'; pvdButton.style.borderRadius ='1px'; var shadow = convertHex('#FFFFFF',40); var position = document.querySelector(".pvd-container"); position.style.fontFamily = 'Lato'; if (0) { position.style.left = '0%'; } if (0) { position.style.right = '0%'; } var pvdOffer=document.querySelector(".offer-bottom"); if(pvdOffer) { var carret=pvdOffer.querySelector("i.material-icons"); var pvdContainer=pvdOffer.parentNode.parentNode; var pvdHeight=outerHeight(pvdContainer); var offerHeight=outerHeight(pvdOffer); var bottom=pvdHeight-offerHeight; pvdContainer.style.bottom = '0px'; pvdContainer.style.backgroundColor = convertHex('#FFFFFF', '80'); pvdContainer.style.color = '#373737'; pvdOffer.nextSibling.style.color = '#373737'; pvdOffer.style.backgroundColor = '#83D0F5'; pvdOffer.style.color = '#FFFFFF'; carret.classList.remove('down'); var pvdExplanation=pvdOffer.parentNode.querySelector(".pvd-explanation"); pvdExplanation.classList.add('pvd-open'); pvdOffer.addEventListener("click", function(event) { event.preventDefault(); if ( pvdContainer.classList.contains("extent-width") ) { event.preventDefault(); setTimeout(function(){ toggle(pvdExplanation); }, 200); setTimeout(function(){ pvdContainer.classList.remove('extent-width'); }, 900); carret.classList.add('down'); } else { setTimeout(function(){ pvdContainer.classList.add('extent-width'); }, 100); setTimeout(function(){ toggle(pvdExplanation); }, 600); carret.classList.remove('down'); } }); } var pvdOfferTop=document.querySelector(".offer-top"); if(pvdOfferTop) { var pvdContainerTop=pvdOfferTop.parentNode.parentNode; var carretTop=pvdOfferTop.querySelector("i.material-icons"); var pvdHeightTop=outerHeight(pvdContainerTop); var offerHeightTop=outerHeight(pvdOfferTop); var top=pvdHeightTop-offerHeightTop; pvdContainerTop.style.top = '0px'; pvdContainerTop.style.backgroundColor = convertHex('#FFFFFF','80'); pvdContainerTop.style.color = '#373737'; pvdOfferTop.previousSibling.style.color = '#373737'; pvdOfferTop.style.backgroundColor = '#83D0F5'; pvdOfferTop.style.color = '#FFFFFF'; carretTop.classList.remove('down'); var pvdExplanationTop=pvdOfferTop.parentNode.querySelector(".pvd-explanation"); pvdExplanationTop.classList.add('pvd-open'); pvdOfferTop.addEventListener("click", function(event) { event.preventDefault(); if ( pvdContainerTop.classList.contains("extent-width") ) { toggle(pvdExplanationTop); setTimeout(function(){ pvdContainerTop.classList.remove('extent-width'); }, 600); carretTop.classList.add('down'); } else { setTimeout(function(){ pvdContainerTop.classList.add('extent-width'); }, 100); setTimeout(function(){ toggle(pvdExplanationTop); }, 600); carretTop.classList.remove('down'); } }); } var pvdOfferRight=document.querySelector(".offer-right"); if(pvdOfferRight) { var pvdExplanation=pvdOfferRight.parentNode.querySelector(".pvd-explanation"); var carretRight=pvdOfferRight.querySelector("i.material-icons"); pvdExplanation.classList.add('pvd-open'); var pvdContainer=pvdOfferRight.parentNode.parentNode; pvdContainer.style.backgroundColor = convertHex('#FFFFFF','80'); pvdContainer.style.color = '#373737'; pvdOfferRight.nextSibling.style.color = '#373737'; pvdOfferRight.style.backgroundColor = '#83D0F5'; pvdOfferRight.style.color = '#FFFFFF'; pvdOfferRight.addEventListener("click", function(event) { event.preventDefault(); if (pvdExplanation.classList) { if ( pvdContainer.classList.contains("extent-width") ) { setTimeout(function(){ pvdExplanation.classList.toggle('pvd-open'); }, 100); setTimeout(function(){ pvdContainer.classList.remove('extent-width'); }, 500); } else { setTimeout(function(){ pvdContainer.classList.add('extent-width'); }, 100); setTimeout(function(){ pvdExplanation.classList.toggle('pvd-open'); }, 500); } carretRight.classList.toggle('down'); } }); } var pvdOfferLeft=document.querySelector(".offer-left"); if(pvdOfferLeft) { var pvdExplanationLeft=pvdOfferLeft.parentNode.querySelector(".pvd-explanation"); var carretLeft=pvdOfferLeft.querySelector("i.material-icons"); pvdExplanationLeft.classList.add('pvd-open'); var pvdContainer=pvdOfferLeft.parentNode.parentNode; pvdContainer.style.backgroundColor = convertHex('#FFFFFF','80'); pvdContainer.style.color = '#373737'; pvdOfferLeft.nextSibling.style.color = '#373737'; pvdOfferLeft.style.backgroundColor = '#83D0F5'; pvdOfferLeft.style.color = '#FFFFFF'; pvdOfferLeft.addEventListener("click", function(event) { event.preventDefault(); if (pvdExplanationLeft.classList) { if ( pvdContainer.classList.contains("extent-width") ) { setTimeout(function(){ pvdExplanationLeft.classList.toggle('pvd-open'); }, 100); setTimeout(function(){ pvdContainer.classList.remove('extent-width'); }, 500); } else { setTimeout(function(){ pvdContainer.classList.add('extent-width'); }, 100); setTimeout(function(){ pvdExplanationLeft.classList.toggle('pvd-open'); }, 500); } carretLeft.classList.toggle('down'); } }); } }