// JavaScript Document
var $j = jQuery.noConflict();
	$j(document).ready(function(){
		/*
		Rollers
		**/
		
		$j('.topDestinations li').mouseenter(function(){
			img = $j(this).attr('id');
			$j('.nacionales').css('background-image','url(_lib/images/'+img+'.jpg)');
			//alert('/_lib/images/'+img+'.jpg');
		});
		
		$j('.topAtracciones li').mouseenter(function(){
			img = $j(this).attr('id');
			$j('.atracciones').css('background-image','url(_lib/images/'+img+'.jpg)');
		});
	
actual = $j('.cambiaImg:eq(0)');

actual.html('<img src="_lib/images/dot_activo.gif"/>');

$j('.cambiaImg').click(function(){
															
	laImg = $j(this).attr('href');
	
	actual.html('<img src="_lib/images/dot_inactivo.gif"/>');
	
	//PONER IMAGEN ACTIVADA
	$j(this).html('<img src="_lib/images/dot_activo.gif"/>');
	
	
	//CAMBIAR IMAGEN DEL PAQUETE
	$j('.Pack_Img').html('<img src="_lib/images/'+ laImg +'.jpg" />');
	
	$j('.PackageInfo').css('display','none');
	
	$j('.'+laImg).css('display','block');
	
	actual = $j(this);
	
	return false;

});


$j('.productos_slide').css('margin-left','0px');
conteo_prods = 0;
ab_switch = 0;

/*BOTON IZQ*/
$j('.prod_der').click(function(){

	if(conteo_prods<3 && ab_switch == 0){
		
		ab_switch = 1;
		conteo_prods++
		
		$j('.texto_lnk a').css('display','none');
		$j('.texto_lnk a:eq('+conteo_prods+')').css('display','inline');
				
		$j('.productos_slide').animate({
			marginLeft: parseInt($j('.productos_slide').css('margin-left'))-195
		},500,function(){
				ab_switch = 0;
		});
	}else if(conteo_prods==3 &&  ab_switch == 0){
		conteo_prods = 0;
		ab_switch = 1
		$j('.texto_lnk a').css('display','none');
		$j('.texto_lnk a:eq('+conteo_prods+')').css('display','inline');
		
		$j('.productos_slide').animate({
			marginLeft: 0
		},500,function(){
				ab_switch = 0;
		});
	}
});

/*BOTON DER*/
$j('.prod_izq').click(function(){
	//alert($j('.productos_slide').css('margin-left'));
	if(conteo_prods>0 &&  ab_switch == 0){
		
		conteo_prods--
		ab_switch = 1
		$j('.texto_lnk a').css('display','none');
		$j('.texto_lnk a:eq('+conteo_prods+')').css('display','inline');
		
		$j('.productos_slide').animate({
			marginLeft: parseInt($j('.productos_slide').css('margin-left'))+195
		},500,function(){
			ab_switch = 0;
		});
	}else if(conteo_prods==0 && ab_switch == 0 ){
		conteo_prods = 3
		ab_switch = 1
		$j('.texto_lnk a').css('display','none');
		$j('.texto_lnk a:eq('+conteo_prods+')').css('display','inline');
		
		$j('.productos_slide').animate({
			marginLeft: -585
		},500,function(){
			ab_switch = 0;	
		});
	}
});
/**/

});