
function destacadoON(i){
		var nom = '#ficha_destacado'+i;
		var destacado = $(nom);
			destacado.find('.img_gris').hide();			
			destacado.find('#texto_imagengris').hide();	
			destacado.find('#texto_vermas').show();
	
	}
	
function destacadoOUT(i){
	var nom = '#ficha_destacado'+i;
	var destacado = $(nom);
		destacado.find('.img_gris').show();	
		destacado.find('#texto_imagengris').show();	
		destacado.find('#texto_vermas').hide();				

}

function listadoON(i){
	var nom = '#ficha_listado'+i;
	var listado = $(nom);
		listado.find('.img_gris').hide();			
		listado.find('#texto_imagengris').hide();	
		listado.find('#texto_vermas').show();

}

function listadoOUT(i){
var nom = '#ficha_listado'+i;
var listado = $(nom);
	listado.find('.img_gris').show();	
	listado.find('#texto_imagengris').show();	
	listado.find('#texto_vermas').hide();				

}

stepcarousel.setup({
	galleryid: 'mygallery', //id of carousel DIV
	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'panel', //class of panel DIVs each holding content
	autostep: {enable:true, moveby:1, pause:4000},
	panelbehavior: {speed:500, wraparound:true, wrapbehavior:'slide', persist:true},
	defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://www.vallesfinques.com/images/web/prev.png', -35, 50], rightnav: ['http://www.vallesfinques.com/images/web/next.png', 10, 50]},
//	defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://localhost:8093/images/web/prev.png', -35, 50], rightnav: ['http://localhost:8093/images/web/next.png', 10, 50]},
	statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
	contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
})

jQuery(function() {
//    $('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.<br>And it contains <strong>H</strong>ow <strong>T</strong>o <strong>M</strong>eet <strong>L</strong>adies... <em>What?</em> That aint what HTML stands for? Man...');
//    $('img.image1').data('ad-title', 'Title through $.data');
//    $('img.image4').data('ad-desc', 'This image is wider than the wrapper, so it has been scaled down');
//    $('img.image5').data('ad-desc', 'This image is higher than the wrapper, so it has been scaled down');
    var galleries = jQuery('.ad-gallery').adGallery();
    jQuery('#switch-effect').change(
      function() {
        galleries[0].settings.effect = jQuery(this).val();
        return false;
      }
    );
    jQuery('#toggle-slideshow').click(
      function() {
        galleries[0].slideshow.toggle();
        return false;
      }
    );
    jQuery('#toggle-description').click(
      function() {
        if(!galleries[0].settings.description_wrapper) {
          galleries[0].settings.description_wrapper = jQuery('#descriptions');
        } else {
          galleries[0].settings.description_wrapper = false;
        }
        return false;
      }
    );
  });

//jQuery(function() {
//	jQuery('#banners').crossSlide({
//		  sleep: 3,
//		  fade: 1
//		}, [
//		  {
//		    src:  '/images/web/banner_1.jpg',
////		    alt:  'Sand Castle',
////		    from: '100% 80% 1x',
////		    to:   '100% 0% 1.7x',
////		    time: 5
//		  }, {
//		    src:  '/images/web/banner_2.jpg',
////		    alt:  'Sunflower',
////		    from: 'bottom right',
////		    to:   'bottom left 1.5x',
////		    time: 5
//		  }
//		], function(idx, img, idxOut, imgOut) {
//		  if (idxOut == undefined)
//		  {
//		    // starting single image phase, put up caption
//			  jQuery('div.caption').text(img.alt).animate({ opacity: .7 })
//		  }
//		  else
//		  {
//		    // starting cross-fade phase, take out caption
//			  jQuery('div.caption').fadeOut()
//		  }
//		});	
//});

