	var $jq = jQuery.noConflict();
	$jq(document).ready(function(){
		$jq('.galeria_de_fotos ul').bxCarousel({
			display_num: 1,       // number of elements to be visible
			move: 1,              // number of elements to the shift the slides
			speed: 500,           // number in milliseconds it takes to finish slide animation
			margin:0,             // right margin to be applied to each <li> element (in pixels, although do not include "px")
			auto: true,          // automatically play slides without a user click
			auto_interval: 4000,  // the amount of time in milliseconds between each auto animation
			auto_dir: 'next',     // direction of auto slideshow (options: 'next', 'prev')
			auto_hover: false,    // determines if the slideshow will stop when user hovers over slideshow
			next_text: siguiente,    // text to be used for the 'next' control
			next_image: '',       // image to be used for the 'next' control
			prev_text: anterior,    // text to be used for the 'prev' control
			prev_image: '',       // image to be used for the 'prev' control
			controls: true        // determines if controls will be displayed
		});
		
		
		//Eliminar Borde de la Ultima Oferta
		$jq(".lineofer:first").css("border-bottom","1px dotted #4D7AA4");
								 
		//Compartir
		$jq(".compartir").hide();

		$jq("#enviar").toggle(function() {
			$jq(".compartir").slideDown('slow');
		}, function() {
			$jq(".compartir").slideUp('slow');
		});

		
		//Mapa Privilege
		$jq(".mapa_privilege").hide();
		$jq("#buscar_mapa").toggle(function() {
			$jq(".indicador").hide();
			$jq(".mapa_privilege").slideDown('slow', function() {
				$jq(".indicador").fadeIn('fast');
			});
		}, function() {
			$jq(".indicador").hide();
			$jq(".mapa_privilege").slideUp('slow');
		});
		

            //Calendarios
			$jq('#fecha_entrada').datepicker({
				inline: true,
				minDate: new Date(),
				firstDay: 1,
				onSelect: function(date) {
					$jq('#fecha_salida').datepicker('option', 'minDate', $jq('#fecha_entrada').datepicker('getDate').addDays(1));
                    
                    var myDate = $jq('#fecha_entrada').datepicker('getDate').addDays(1);
                    var month = myDate.getMonth() + 1;
                    var dia = myDate.getDate();
                    
                    //0 Delante de los digitos (El SRW falla si no contiene dos digitos) 
                    if (month < 10) { month = "0"+month; }
                    if (dia < 10) { dia = "0"+dia; }
                    
                    var prettyDate = dia + '/' + month + '/' + myDate.getFullYear();
                    $jq("#fecha_salida").val(prettyDate);

                }
			});

			$jq('#fecha_salida').datepicker({
				dateFormat: 'dd/mm/yy',
				firstDay: 1,
				beforeShow: function(){
					return{ 
						minDate: $jq('#fecha_entrada').datepicker('getDate').addDays(1),
						maxDate: $jq('#fecha_entrada').datepicker('getDate').addDays(30)
					}
				}
			}).attr('readonly', 'readonly');           

			$jq('#fecha_entrada,#fecha_salida').datepicker('option', 'monthNames', [global["mes"]["enero"],global["mes"]["febrero"],global["mes"]["marzo"],global["mes"]["abril"],global["mes"]["mayo"],global["mes"]["junio"],global["mes"]["julio"],global["mes"]["agosto"],global["mes"]["septiembre"],global["mes"]["octubre"],global["mes"]["noviembre"],global["mes"]["diciembre"]]);
			$jq('#fecha_entrada,#fecha_salida').datepicker('option', 'dayNamesMin', [global["dias"]["domingo"],global["dias"]["lunes"],global["dias"]["martes"],global["dias"]["miércoles"],global["dias"]["jueves"],global["dias"]["viernes"],global["dias"]["sábado"]]);
            
			$jq('#fecha_entrada,#fecha_salida').datepicker({ firstDay: 1 });
			$jq('#fecha_entrada,#fecha_salida').datepicker('option', 'dateFormat', "dd/mm/yy");
	});
	
	//Agregar a Favoritos
	function favoritos(title,url){
		if(window.sidebar){
			window.sidebar.addPanel(title,url,""); 
		} else if(document.all){
			window.external.AddFavorite(url,title);
		}else{
			alert("Lo sentimos, su navegador no soporta esta opcion.");
		}
	}