/* TOURS- MAP CHANGING */
jQuery(document).ready(function(){
	jQuery(".tab li a").click(function(){switchTourStandardAndEuropeMap(this)});
});

jQuery(document).ready(function(){
	//select all links in ul with rel = lightbox
	jQuery("a[rel='lightbox']").nyroModal({contentError:'',type:'image',errorClass:'',resizeable:false,debug:false,css:{content:{overflow: 'hidden'}}, minWidth: 1, minHeight: 1, gallery:'lightbox'});

	//here you can alter data before output!
	jQuery.fn.nyroModal.settings.endFillContent = function(elts, settings) {
		if (elts.content[0].lastChild.nodeName == 'DIV'){
			var descDiv = elts.content[0].lastChild;
			descDiv.className = "lightboxPicDescription";
		}
	}

	//here you can alter data when everythins was shown
	jQuery.fn.nyroModal.settings.endShowContent = function(elts, settings) {
		jQuery("#nyroModalFull").css({'z-index' : 10000 });
	}
});

function switchTourStandardAndEuropeMap(self) {
	// Get id
	var id = self.getAttribute('id'); 
		
	// Hidden all tours maps
	jQuery('img.mapTour').addClass('hidden');
	
	// Show the one which was clicked
	jQuery('#img_'+id).removeClass('hidden');
	
	// Remove selected class from previous href
	jQuery(".tab li a").removeClass('tabSelected');
	
	// Move selected class to this class
	jQuery("#"+id).addClass('tabSelected');
}
