$(document).ready(function()
{
	/**
	*
	*	CUFON
	*
	**/

	Cufon.replace('#main-home > h2, .section-main > h2, .features li > h2, #secondary-nav .demostracion, #secondary-nav .presupuesto, .access-demo, .slide > .important span, #destacados > li h2, #slideshow .slide .title-information, .slide .title-information-design-two, .slide .title-information-design-three, .view-demo,  #request-quotation > h2, #request-quotation #solicitar span, #method-work > h3, .highlighted-text, #casos-exito li > h2, #information-entity li > span, #points-study li .name-item, #send-qoutation > span, #warranties > li > h2, .demo_button a, .link-request-quotation > a span, .worker_information_container h2, .testimony_text p, #testomony_sheet .titulo, #send-contact, .info_container p, #highlighted-text-opinions', {fontFamily: 'rockwell'});
	Cufon.replace('h1, #main-home .subtitle,  #site-map > li > a, #more-info, .phone, .contact, #main-nav, .site-information > p, .site-information > div, #method-work > h2, #steps > li > p,  #our-customers > h2, #testimonios > h2, .section-main .section-parent, #warranties-info > p, #section-quotation #title-section, #buttom_seo_sem_container span, #opinions #title-subsection, #title-section-opinions', {fontFamily: 'abel'});

	/**
	*
	*	Grupo de Herramientas
	*
	**/

	/*********************
	**	Animación del menú
	**********************/
	$('#main-nav li a').hover(function(){
		 if($(this).parent().hasClass('active'))
			return false;

		 var topActual	=	"6px";
		 var actual	=	$(this).parent();
		 actual.stop(true, true).animate({top:'-='+topActual},'fast');
	},
	function(){
		if($(this).parent().hasClass('active'))
			return false;
		var actual	=	$(this).parent();

		actual.stop(true,true).animate({top:'6px'},'fast');
		Cufon.refresh("#main-nav");
	});

	/*if ( !$('.tools').length){
		return;
	}*/
	var defa	=	$('.features > li').not('.currentTool');
	var parg	=	defa.find('p').not('.more');
	parg.hide();

	// Valores por defecto.
	var heigL	=	46;
	var heigH	= 	176;

	$('.closeTool, .features li > h2').click( function(e){
		e.preventDefault();
		var actual;
		if( $(this).attr('class') != 'closeTool')
			actual	=	$(this).parent();
		else
			actual	=	$(this).parent().parent();

		if( actual.height() != heigH ){
			actual.stop().animate({"height": heigH + 'px'},"slow", function(){

				$(this).find('p, .more').not('.openTool').fadeIn('slow').parent().addClass('currentTool');

			}).css('overflow', 'visible');
		}
		else{

			if(!actual.hasClass('currentTool'))
				return false;

			actual.find('p').not('.openTool').fadeOut(200);
			actual.find('p.more').hide();
			actual.stop().animate({"height": heigL + 'px'},'slow', function(){
				$(this).find('.openTool').show();

			}).css('overflow', 'visible');
			actual.removeAttr('class');
		}
	});



	/*********************
	**	Animación de videos
	**  testimonios
	**********************/
	/*if( !$('#testimonios').length )
		return;
	*/
	$('#testimonios > a').hover(function(e){
		e.preventDefault();
		$(this).children('img').stop(true, true).animate({opacity:1}, 200);
	},function(){
		$(this).children('img').stop(true, true).animate({opacity:0}, 200);
	});


	/*$('.tools li').each(function(i,el){
		$el = $(el);
		$el.prepend("<a class='arrow' href='#'></a>");
		$el.find('p').hide();
	});
	$('ul.tools li a.arrow').click(function() {
		$this = $(this);
		$p = $this.parent().find("p");
		if ( $p.visible() )
		{
			$p.slideDown();
			$(this).attr("class", "arrow up");
		}
		else
		{
			$p.slideUp();
			$(this).attr("class", "arrow");
		}
	});*/

	if( $('#casos-exito').length ){
		$('#casos-exito').easyPaginate({
			step: 3,
			delay: 'fast',
			numeric: true,
			nextprev: true,
			auto:false,
			controls: 'pagination',
			current: 'currentPage'
		});
	}
	//=======================================
	//	Add image to block: request-quotation
	//=======================================
	$('#request-quotation').prepend("<div class='eficaz'></div>");
	$('#method-work ul > li:lt(2)').append('<p class="signal"></p>');
	$('#method-work ul > li:eq(2)').append('<p class="bi-signal"></p>')

	//=======================================
	//	tooltip information - método de trabajo
	//=======================================
	$('#steps > li').hover(
		function(e){
			var description	=	$(this).find('.description-step');
			if( !description.length )
				return;
			description.fadeIn('fast').stop(true,true).animate({'top': -165 + 'px','opacity': '1'},'fast');
		},
		function(e){
			$(this).find('.description-step').stop(true,true).animate({'top': -140 +'px', 'opacity': '0'},'fast', function(){$(this).fadeOut('fast');});
		}
	);

	//=======================================
	//	Slider home y restantes.
	//=======================================
	if( $('#slideshow').length ){

		$('#slideshow').cycle({
			fx:	  	'scrollHorz',
			timeout:  	5000,
			pause:		1,
			prev:		'#prev',
			next:		'#next',
			cleartypeNoBg: true
		});

	};

	//=======================================
	//	slider and windows modal (lightbox) de
	//	case studies
	//=======================================
	if ( $('#gallery').length ){

		Shadowbox.init();

		function pagerFactory(idx, slide) {
			var s = idx > 10 ? ' style="display:none"' : '';
			return '<li'+s+'><a href=&quot;#&quot;>'+(idx+1)+'</a></li>';
		};

		function getImage(){
			var pathImg	 =	$('#gallery a').not('a:hidden').attr('href');
			$('#open-zoom > a').attr('href', pathImg);
			var link = $('#open-zoom > a');
			Shadowbox.setup(link, {
				handleOversize: "drag" });
		};

		$('#gallery').cycle({
			fx:	  'scrollHorz',
			timeout:  0,
			prev:	'#left',
			next:	'#right',
			pager:   '#control-nav',
			pagerAnchorBuilder: pagerFactory,
			after:	  getImage
		});


	}
	//=======================================
	//	Swap image: Del apartado de clientes.
	//=======================================
	if( $('#clientes').length ){

		$('#clientes > li > a').hover(
			function(){
				//Obtenemos la referencia a la imagen
				var elementCurrent	=	$(this).find('img');
				//Capturamos el src de la imagen perteneciente a ese link
				var pathCurrent		=	$(this).find('img').attr('src');

				var newSrc			=		pathCurrent.replace('off.jpg', 'on.jpg');
				elementCurrent.attr('src',newSrc);

			},
			function(){
				//Obtenemos la referencia a la imagen
				var elementCurrent	=	$(this).find('img');
				//Capturamos el src de la imagen perteneciente a ese link
				var pathCurrent		=	$(this).find('img').attr('src');


				var newSrc			=		pathCurrent.replace('on.jpg', 'off.jpg');
				elementCurrent.attr('src',newSrc);

			});
	}

	//=======================================
	//	Add image to block: request-quotation
	//=======================================
	if( $('#button_seo').length ){
		$('#button_seo').hover(
		function(){

			var imageActive		= "/static/images/buscador_seo.jpg";
			$('#image_seo_sem').attr('src', imageActive);

		},
		function(){

			var imageDesactive		="/static/images/buscador.jpg";
			$('#image_seo_sem').attr('src', imageDesactive);

		});

		$('#button_sem').hover(
		function(){

			var imageActive		= "/static/images/buscador_sem.jpg";
			$('#image_seo_sem').attr('src', imageActive);

		},
		function(){

			var imageDesactive		="/static/images/buscador.jpg";
			$('#image_seo_sem').attr('src', imageDesactive);

		});
	}

	//=======================================
	//	Swap image: Del apartado de testimonios.
	//=======================================
	$('.testimony_image img').hover
	(
		function()
		{

			var photoActive		=	$(this).attr('src').replace("_off\.jpg", "_on\.jpg");
			$(this).attr('src', photoActive);
		},
		function(){

			var photoDesactive		=	$(this).attr('src').replace("_on\.jpg", "_off\.jpg");
			$(this).attr('src', photoDesactive);
		}
	);

	//=======================================
	//	Plugin para ventanas modal. (lightbox)
	//=======================================
	if( $('#testimonios').length || $('#testimonies').length || $('#opinions').length ){
		Shadowbox.init({
			overlayColor: "#21252E",
			overlayOpacity: "0.6",
			troubleElements:[""],
			onClose: cerrarShadowBox
		});
	}

	//=======================================
	//	Error de contacto / presupuesto
	//=======================================
	if (window.location.href.search("\\?ko") > 0)
	{
		alert("Se ha producido un error al recibir su solicitud.\nPor favor, inténtelo de nuevo o escribanos a:\ninfo@neobookings.com");
	}

	//=======================================
	//	validación formularios
	//=======================================
	if( $('#contact_form').length )
		  $("#contact_form").validate();

	if( $('#form-quotation').length )
		  $("#form-quotation").validate();

	//=======================================
	//	fijar pie en la parte inferior cuando la resolucion es mayor al body
	//=======================================
	$(window).bind("load", function() {

		var footerHeight = 0,
		footerTop = 0,
		$footer = $("#footer");
		$header = $("#header");
		$wrapper = $("#wrapper");
		positionFooter();

		function positionFooter() {

			footerHeight = $footer.height();
			footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";

			if ( ($header.height()+$wrapper.height()+$footer.height()) < $(window).height()) {

				$footer.css({
					position: "absolute",
					top: footerTop,
					width:"100%"
				})

			} else {

				$footer.css({
				position: "static"
				})

			}

		}

		$(window)
		.scroll(positionFooter)
		.resize(positionFooter)

	});

	//=======================================
	//	Analytics Events
	//=======================================

	//funciones para crear y leer cookies
	function setCookie(c_name,value,exdays){
		var exdate=new Date();
		exdate.setDate(exdate.getDate() + exdays);
		var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
		document.cookie=c_name + "=" + c_value;
	}

	function getCookie(c_name){
		var i,x,y,ARRcookies=document.cookie.split(";");
		for (i=0;i<ARRcookies.length;i++){
			  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
			  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
			  x=x.replace(/^\s+|\s+$/g,"");
			  if (x==c_name){
					return unescape(y);
			  }
		}
		return null;
	}

	//control de accesos a los links
	$("a").each(function(i,el){
		if ( ($(el).attr("href")+"").substring(0,27) == 'http://demo.neobookings.com' ){
			$(el).click(
				function () {
					if(getCookie("demo_vista")==null){
						setCookie("demo_vista","si",1);
						_gaq.push(['_trackEvent', 'accesos', 'demo', 'Accesos a la Demo', 1]);
					}
				}
			);
		}
		if (
			($(el).attr("href")+"").substring(0,48) == 'http://www.neobookings.com/solicitar-presupuesto'
			|| ($(el).attr("href")+"").substring(0,22) == '/solicitar-presupuesto'
			|| ($(el).attr("href")+"").substring(0,35) == 'http://www.neobookings.com/contacto'
			|| ($(el).attr("href")+"").substring(0,9) == '/contacto'
			){

				$(el).click(
					function () {
						if(getCookie("formulario_visto")==null){
							setCookie("formulario_visto","si",1);
							_gaq.push(['_trackEvent', 'accesos', 'formulario', 'Accesos al formulario', 1]);
						}
					}
				);

			}
	});

	//control de formulario de contacto
	if( $('#contact_form').length ){

		//miramos si el formulario ya se ha visto anteriormente
		if(getCookie("form_contact_enviado")==null){

			//control de visualizacion de formulario
			if($('#contact_form').ready){
				if(getCookie("form_contact_visto")==null){
					setCookie("form_contact_visto","si",1);
					_gaq.push(['_setCustomVar', 2, 'contact_form', 'visto']);
					_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
				}
			}

			//miramos si el formulario sya se ha rellenado
			if(getCookie("form_contact_rellenado")==null){

				//control de campos
				$("#contact_form input").each(function(i,el){
					if ( $(el).attr("name") == 'nombre' ){
						$(el).click(
							function () {
								if(getCookie("form_contact_rellenado")==null){
									setCookie("form_contact_rellenado","si",1);
									_gaq.push(['_setCustomVar', 2, 'contact_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'apellidos' ){
						$(el).click(
							function () {
								if(getCookie("form_contact_rellenado")==null){
									setCookie("form_contact_rellenado","si",1);
									_gaq.push(['_setCustomVar', 2, 'contact_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'empresa' ){
						$(el).click(
							function () {
								if(getCookie("form_contact_rellenado")==null){
									setCookie("form_contact_rellenado","si",1);
									_gaq.push(['_setCustomVar', 2, 'contact_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'ciudad' ){
						$(el).click(
							function () {
								if(getCookie("form_contact_rellenado")==null){
									setCookie("form_contact_rellenado","si",1);
									_gaq.push(['_setCustomVar', 2, 'contact_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'telf' ){
						$(el).click(
							function () {
								if(getCookie("form_contact_rellenado")==null){
									setCookie("form_contact_rellenado","si",1);
									_gaq.push(['_setCustomVar', 2, 'contact_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'email' ){
						$(el).click(
							function () {
								if(getCookie("form_contact_rellenado")==null){
									setCookie("form_contact_rellenado","si",1);
									_gaq.push(['_setCustomVar', 2, 'contact_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
				});
				$("#contact_form textarea").click(
					function () {
						if(getCookie("form_contact_rellenado")==null){
							setCookie("form_contact_rellenado","si",1);
							_gaq.push(['_setCustomVar', 2, 'contact_form', 'rellenando']);
							_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
						}
					}
				);
			}
			//control del boton de submit
			$('#contact_form').submit(
				function () {

					//miramos si el formulario es correcto
					if($('#contact_form').valid()){
						setCookie("form_contact_enviado","si",1);
						//obtenemos el numero de envios incorrecto
						if(getCookie("contact_form_submit")==null){
							errores="_inc_0";
						}else{
							contador=parseInt(getCookie("contact_form_submit"));
							if(contador<3){
								errores="_inc_1_2";
							}else if(contador>=3 && contador<=5){
								errores="_inc_3_5";
							}else{
								errores="_mas_5";
							}
						}
						//mandamos variables
						_gaq.push(['_setCustomVar', 2, 'contact_form', 'envio_correcto'+errores]);
						_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
					}else{
						//miramos si anteriormente ya se habia modificado la cookie
						var contador;
						if(getCookie("contact_form_submit")==null){
							contador=1;
						}else{
							contador=parseInt(getCookie("contact_form_submit"));
							contador=contador+1;
						}
						setCookie("contact_form_submit",contador,1);
					}
				}
			);

		}

	}

	//control de formulario de presupuesto
	if( $('#form-quotation').length ){

		//miramos si el formulario ya se ha enviado antes
		if(getCookie("form_quotation_enviado")==null){

			//control de visualizacion de formulario
			if($('#form-quotation').ready){
				if(getCookie("form_quotation_visto")==null){
					setCookie("form_quotation_visto","si",1);
					_gaq.push(['_setCustomVar', 3, 'quotation_form', 'visto']);
					_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
				}
			}

			//miramos si el formulario sya se ha rellenado
			if(getCookie("form_quotation_rellenado")==null){

				//control de campos
				$("#form-quotation input").each(function(i,el){
					if ( $(el).attr("name") == 'nombre' ){
						$(el).click(
							function () {
								if(getCookie("form_quotation_rellenado")==null){
									setCookie("form_quotation_rellenado","si",1);
									_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'empresa' ){
						$(el).click(
							function () {
								if(getCookie("form_quotation_rellenado")==null){
									setCookie("form_quotation_rellenado","si",1);
									_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'cargo' ){
						$(el).click(
							function () {
								if(getCookie("form_quotation_rellenado")==null){
									setCookie("form_quotation_rellenado","si",1);
									_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'habitaciones' ){
						$(el).click(
							function () {
								if(getCookie("form_quotation_rellenado")==null){
									setCookie("form_quotation_rellenado","si",1);
									_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'telf' ){
						$(el).click(
							function () {
								if(getCookie("form_quotation_rellenado")==null){
									setCookie("form_quotation_rellenado","si",1);
									_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'email' ){
						$(el).click(
							function () {
								if(getCookie("form_quotation_rellenado")==null){
									setCookie("form_quotation_rellenado","si",1);
									_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'web' ){
						$(el).click(
							function () {
								if(getCookie("form_quotation_rellenado")==null){
									setCookie("form_quotation_rellenado","si",1);
									_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
					if ( $(el).attr("name") == 'newsletter' ){
						$(el).click(
							function () {
								if(getCookie("form_quotation_rellenado")==null){
									setCookie("form_quotation_rellenado","si",1);
									_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
									_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
								}
							}
						);
					}
				});
				$("#form-quotation select").click(
					function () {
						if(getCookie("form_quotation_rellenado")==null){
							setCookie("form_quotation_rellenado","si",1);
							_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
							_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
						}
					}
				);
				$("#form-quotation textarea").click(
					function () {
						if(getCookie("form_quotation_rellenado")==null){
							setCookie("form_quotation_rellenado","si",1);
							_gaq.push(['_setCustomVar', 3, 'quotation_form', 'rellenando']);
							_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
						}
					}
				);
			}

			//control del boton de submit
			$('#form-quotation').submit(
				function () {

					//miramos si el formulario es correcto
					if($('#form-quotation').valid()){
						setCookie("form_quotation_enviado","si",1);
						//obtenemos el numero de envios incorrecto
						if(getCookie("form_quotation_submit")==null){
							errores="_inc_0";
						}else{
							contador=parseInt(getCookie("form_quotation_submit"));
							if(contador<3){
								errores="_inc_1_2";
							}else if(contador>=3 && contador<=5){
								errores="_inc_3_5";
							}else{
								errores="_mas_5";
							}
						}
						//mandamos variables
						_gaq.push(['_setCustomVar', 3, 'quotation_form', 'envio_correcto'+errores]);
						_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
					}else{
						//miramos si anteriormente ya se habia modificado la cookie
						if(getCookie("form_quotation_submit")==null){
							contador=1;
						}else{
							contador=parseInt(getCookie("form_quotation_submit"));
							contador=contador+1;
						}
						setCookie("form_quotation_submit",contador,1);
					}
				}
			);

		}

	}

	//control de videos
	$("a").each(function(i,el){
		momentoActual = new Date() ;

		//	control de acceso a la pagina de testimonio
		if ( $(el).attr("href") == '/nuestros-clientes/testimonios/hotel-royal-plaza' ){
			$(el).click(function () {
				setCookie("url_video",$(el).attr("href"),1);
				setCookie("tiempo_ini",momentoActual.getTime(),1);
				setCookie("visto_vid_hot_roy_plz","si",1);
				_gaq.push(['_setCustomVar', 4, 'videos', 'acceso_hot_roy_plaza']);
				_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
			});
		}
		if ( $(el).attr("href") == '/nuestros-clientes/testimonios/azuline-hotels' ){
			$(el).click(function () {
				setCookie("url_video",$(el).attr("href"),1);
				setCookie("tiempo_ini",momentoActual.getTime(),1);
				setCookie("visto_vid_azu_hot","si",1);
				_gaq.push(['_setCustomVar', 4, 'videos', 'acceso_azuline_hot']);
				_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
			});
		}
		if ( $(el).attr("href") == '/nuestros-clientes/testimonios/hoteles-virtuales' ){
			$(el).click(function () {
				setCookie("url_video",$(el).attr("href"),1);
				setCookie("tiempo_ini",momentoActual.getTime(),1);
				_gaq.push(['_setCustomVar', 4, 'videos', 'acceso_hot_virt']);
				_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
			});
		}
	});

	//	control de salida de la pagina de testimonios
	function cerrarShadowBox(){

		//variables para el momento actual
		momentoActual = new Date();
		//variables para la diferencia de tiempo
		difsegundos=momentoActual.getTime() - parseInt(getCookie("tiempo_ini"));
		minutos=difsegundos/60000;
		//definimos rango de tiempo
		if(minutos<3){
			tiempo="_men_3_min";
		}else if(minutos>=3 && minutos<6){
			tiempo="_entre_3_6_min";
		}else{
			tiempo="_mas_6_min";
		}

		var url=getCookie("url_video");
		if(url.indexOf("hotel-royal-plaza") !=-1){
			_gaq.push(['_setCustomVar', 4, 'videos', 'tiempo_hot_roy_plaza'+tiempo]);
			_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
		}
		if(url.indexOf("azuline-hotels") !=-1){
			_gaq.push(['_setCustomVar', 4, 'videos', 'tiempo_azuline_hot'+tiempo]);
			_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
		}
		if(url.indexOf("hoteles-virtuales") !=-1){
			_gaq.push(['_setCustomVar', 4, 'videos', 'tiempo_hot_virt'+tiempo]);
			_gaq.push(['_trackEvent', 'refresco trackEvent', 'refresco']);
		}

	}
	
	//=======================================
	//	guardamos referrer
	//=======================================

	if(getCookie("pagina_anterior")==null){
		setCookie("pagina_anterior",document.referrer,1);
	}
	
});
