/** * HEX COOKIES 1.1 * by Oriol Tendero - oriol[at]kasualstudios[dot]com - kasualstudios[dot]com * July 2014 * * Insert the script befor tag: * **/ /*CONFIGURATION*/ var hexcookieBase = "/HexCookies"; //Default root directory domain, or use full addres directory http://apps.hexderp.com/HexCookies var hexcookieLang = "es"; /*Default lang*/ var hexcookieLink = "/pag/pagina/?id=2114"; /*Default policy link*/ var hexcookieLinkLegal = "/pag/pagina/?id=2113"; /*Default policy link*/ var hexcookieMode = "confirm"; /*Default behaivour*/ var hexcookieLinkTarget = ""; function HexInit() { /** * Test if a element is empty */ jQuery.extend( { empty: function(o) { if( !jQuery.isFunction(o) && ( o == null || o == undefined || o == "" || o.length == 0) ) { return true; } return false } }); /*Get ARGS*/ if(jQuery("script#hexcookie").length > 0){ if( !jQuery.empty(jQuery("script#hexcookie").attr("data-mode")) ){ hexcookieMode = jQuery("script#hexcookie").attr("data-mode"); } if( !jQuery.empty(jQuery("script#hexcookie").attr("data-lang")) ){ hexcookieLang = jQuery("script#hexcookie").attr("data-lang"); } if( !jQuery.empty(jQuery("script#hexcookie").attr("data-link")) ){ hexcookieLink = jQuery("script#hexcookie").attr("data-link"); hexcookieLinkTarget = 'target="_blank"'; } } /*HEXCOOKIE cookie*/ if(jQuery.cookie("HexCookieSeed") != "1" && jQuery.cookie("HexCookieSeed") != "2"){ /*Button text*/ var hexcookieButton = ""; var hexcookieButtonRechazar = ""; if(hexcookieMode=="auto"){ if(hexcookieLang=="es"){ hexcookieButton = "Continuar navegando"; } else if(hexcookieLang=="ca"){ hexcookieButton = "Continuar navegant"; } else if(hexcookieLang=="en"){ hexcookieButton = "Continue browsing"; } else if(hexcookieLang=="pt"){ hexcookieButton = "Continuar a navegação"; } else{ hexcookieButton = "Continue browsing"; } }else{ if(hexcookieLang=="es"){ hexcookieButton = "Aceptar"; hexcookieButtonRechazar = "Rechazar"; hexcookieButtonSelec = "Aceptar selección";} else if(hexcookieLang=="ca"){ hexcookieButton = "Acceptar"; hexcookieButtonRechazar = "Rechazar"; hexcookieButtonSelec = "Aceptar selección";} else if(hexcookieLang=="en"){ hexcookieButton = "Accept"; hexcookieButtonRechazar = "Rechazar"; hexcookieButtonSelec = "Aceptar selección";} else if(hexcookieLang=="pt"){ hexcookieButton = "Aceita"; hexcookieButtonRechazar = "Rechazar"; hexcookieButtonSelec = "Aceptar selección";} else{ hexcookieButton = "Accept cookies"; } } if(hexcookieLang=="es"){ jQuery.hcDisclaimer = '
Esta página web utiliza cookies tanto propias como de terceros con el fin de obtener automáticamente el mínimo de información técnica imprescindible para darle un buen servicio y con finesestadísticos del uso de la misma. Las cookies técnicas son imprescindibles para la navegación por la web.

El titular de la web, responsable del tratamiento de las cookies, y sus datos de contacto son accesibles en el Aviso Legal.

Puede aceptar todas las cookies pulsando el botón “Aceptar”, rechazarlas en el botón “Rechazar” o configurarlas en “Opciones de Cookies”. Puede consultar más información en nuestra Política de Cookies.

AceptarRechazar

Cookies técnicas (obligatorias para seguir navegando)

Cookies de análisis estadístico (opcionales)


Aceptar selección



'; jQuery.hcLegalNote = '

Cookies propias

El sitio web utiliza cookies (archivos de información que se guardan en el ordenador de quien accede a la página) en la medida imprescindible para el correcto funcionamiento y visualización del sitio web por parte del usuario. Las cookies utilizadas tienen una vigencia temporal limitada y en ningún caso se usan para recoger información de carácter personal.

Cookies de terceros

Google Analytics (_utma, _utmb, _utmc, _utmz)
Estas cookies se usan para recopilar información acerca del uso. Utilizamos esta información para mejorar el sitio web. Las cookies recopilan información en un formulario anónimo, incluyendo el numero de visitantes del sitio, desde donde vienen entre otros.

'; }else if(hexcookieLang=="ca"){ jQuery.hcDisclaimer = ''; jQuery.hcLegalNote = '

Cookies pròpies

El lloc web utilitza cookies (arxius d\'informació que es guarden a l\'ordinador de qui accedeix a la página) en la mesura imprescindible per al correcte funcionament i visualització del lloc web per part de l\'usuari. Les cookies utilitzades tenen una vigència temporal limitada i en cap cas es fan servir per recollir informació de carácter personal.

Cookies de tercers

Google Analytics (_utma, _utmb, _utmc, _utmz)
Aquestes cookies es fan servir per recopilar informació sobre de l\'ús. Utilitzem aquesta informació per millorar el lloc web. Les cookies recopilen informació en un formulari anònim, incloent el nombre de visitants del lloc, des d\'on vénen entre altres.

'; }else if(hexcookieLang=="en"){ jQuery.hcDisclaimer = ''; jQuery.hcLegalNote = '

Own Cookies

The site uses cookies (files of information stored in the computer of the person accessing the page) to the extent necessary for the correct operation and representation of the website by the user. These cookies have a limited temporal validity and in no case are used to collect personal information.

Third party cookies

Google Analytics ( _utma, _utmb, _utmc, _utmz)
These cookies are used to gather information about use. We use this information to improve the website. The cookies collect information in an anonymous form, including the number of visitors to the site, where they come from others.

'; }else if(hexcookieLang=="pt"){ jQuery.hcDisclaimer = ''; jQuery.hcLegalNote = '

Own Cookies

The site uses cookies (files of information stored in the computer of the person accessing the page) to the extent necessary for the correct operation and representation of the website by the user. These cookies have a limited temporal validity and in no case are used to collect personal information.

Third party cookies

Google Analytics ( _utma, _utmb, _utmc, _utmz)
These cookies are used to gather information about use. We use this information to improve the website. The cookies collect information in an anonymous form, including the number of visitors to the site, where they come from others.

'; }else{ jQuery.hcDisclaimer = ''; jQuery.hcLegalNote = '

Own Cookies

The site uses cookies (files of information stored in the computer of the person accessing the page) to the extent necessary for the correct operation and representation of the website by the user. These cookies have a limited temporal validity and in no case are used to collect personal information.

Third party cookies

Google Analytics ( _utma, _utmb, _utmc, _utmz)
These cookies are used to gather information about use. We use this information to improve the website. The cookies collect information in an anonymous form, including the number of visitors to the site, where they come from others.

'; } /*Load styles*/ jQuery("body").append(''); /*Load html disclaimer*/ jQuery("body").append(jQuery.hcDisclaimer); /*Wait for CSS loaded*/ var hcCssListener = setInterval(function(){ if(jQuery("body #hexcookies").css("position")==="fixed"){ clearInterval(hcCssListener); /*FX IN*/ jQuery("body #hexcookies").attr("style",""); jQuery("body #hexcookies").css({ "margin-bottom":"-50px" }); jQuery("body #hexcookies").animate({ "margin-bottom":"0px" }, { duration: 250, queue: false }); /*Close button*/ jQuery("#hexcookies .hcOK").click(function(){ /*Accept cookies*/ jQuery.cookie("HexCookieSeed","1",{ expires: 365, path: '/' }); /*Hide disclaimer*/ jQuery("body #hexcookies").animate({ "margin-bottom":"-1000px" }, { duration: 250, queue: false, complete:function(){ jQuery("body #hexcookies").remove(); } }); }); jQuery("#hexcookies .hcKO").click(function(){ /*Reject cookies*/ jQuery.removeCookie('PHPSESSID'); jQuery.removeCookie('HexCookieSeed'); /*Hide disclaimer*/ jQuery("body #hexcookies").animate({ "margin-bottom":"-1000px" }, { duration: 250, queue: false, complete:function(){ jQuery("body #hexcookies").remove(); } }); }); jQuery("#hexcookies .hcSEL").click(function(){ /*Accept cookies selected*/ if(document.getElementById("cookies_tecnicas").checked){ if(document.getElementById("cookies_estadisticas").checked){ jQuery.cookie("HexCookieSeed","1",{ expires: 365, path: '/' }); } else { jQuery.cookie("HexCookieSeed","2",{ expires: 365, path: '/' }); } } else { jQuery.removeCookie('PHPSESSID'); jQuery.removeCookie('HexCookieSeed'); } /*Hide disclaimer*/ jQuery("body #hexcookies").animate({ "margin-bottom":"-1000px" }, { duration: 250, queue: false, complete:function(){ jQuery("body #hexcookies").remove(); } }); }); /*Show legal note*/ jQuery("#hexcookies .hcLegal").click(function(){ if(hexcookieLink.indexOf("#None") >= 0){ if(jQuery("#hexcookies .hcInfo").length == 0){ jQuery("#hexcookies .hcContent").append('
'+jQuery.hcLegalNote+'
'); } } }); /*Auto confirmation by following the navigation*/ if(hexcookieMode=="auto"){ /*Accept cookies after 5 seconds*/ setTimeout(function(){ jQuery.cookie("HexCookieSeed","1",{ expires: 365, path: '/' }); }, 5000); /*Auto fade out after 10 seconds*/ //setTimeout(function(){ jQuery("body #hexcookies").fadeOut(500); }, 10000); } } },50); } } /*jQuery loaded on DOM check*/ if(typeof jQuery=='undefined') { var TAG = document.getElementsByTagName("body")[0]; var jqTag = document.createElement('script'); jqTag.type = 'text/javascript'; jqTag.src = hexcookieBase+'/libs.hexcookies.js'; TAG.appendChild(jqTag); if(navigator.appName.indexOf("Internet Explorer")!=-1){ /*If IE*/ setTimeout(function(){ HexInit(); }, 1000); }else{ jqTag.onload = HexInit; } } else { var TAG = document.getElementsByTagName("body")[0]; var jqTag = document.createElement('script'); jqTag.type = 'text/javascript'; jqTag.src = hexcookieBase+'/libs.cookie.js'; TAG.appendChild(jqTag); jqTag.onload = HexInit; if(navigator.appName.indexOf("Internet Explorer")!=-1){ /*If IE*/ setTimeout(function(){ HexInit(); }, 1000); }else{ jqTag.onload = HexInit; } }