/**
 * @author Freddybg
 */


function focus_search(){
	$('input.focus[type = "text"]').focus(function(){
		if(this.value == this.defaultValue)
		{
			this.value = '';
		}
		if(this.value != this.defaultValue)
		{
			this.select();
		}
	});
	$('input.focus[type = "text"]').blur(function(){
		if ($.trim(this.value) == '') {
			this.value = (this.defaultValue ? this.defaultValue : '');
		}
	});
}


function menu() {
	$('ul.menu_desplegable ul ').css({display: "none"});
	$('ul.menu_desplegable li').hover( function() {
		$(this).find('ul').css({display: "none"}).slideDown(400).show("slow");
	}), function() {
		$(this).find('ul').slideUp('slow');
	}
}

 function tabs(){
 	var tab = $('ul.topic > ul');
 	tab.hide().filter(':first').show();
 	
 	$('ul.topic li').click(function(){
 		tab.hide();
 		tab.filter(this.hash).show();
 		$('ul.topic li').removeClass('active');
 		$(this).addClass('active');
 		return false;
 	}).filter(':first').click();
 }


function gallery(){
	$('ul#expediciones li a').lightBox({
		imageLoading: 'http://127.0.0.1/guaicani/plugins/lightbox/images/loader.gif'
	});
	$('ul#pnn li a').lightBox({
		imageLoading: 'http://127.0.0.1/guaicani/plugins/lightbox/images/loader.gif'
	});
	$('ul#plantas-y-flores li a').lightBox({
		imageLoading: 'http://127.0.0.1/guaicani/plugins/lightbox/images/loader.gif'
	});
	$('ul#gente-de-la-region li a').lightBox({
		imageLoading: 'http://127.0.0.1/guaicani/plugins/lightbox/images/loader.gif'
	});
	$('ul#guican-y-cocuy li a').lightBox({
		imageLoading: 'http://127.0.0.1/guaicani/plugins/lightbox/images/loader.gif'
	});
	$('ul#actividades li a').lightBox({
		imageLoading: 'http://127.0.0.1/guaicani/plugins/lightbox/images/loader.gif'
	});
	
}


 $(document).ready( function() {
	menu();
	focus_search();
	gallery();
	tabs();	
}) 






    



		
		
		
		
		
		
