// <![CDATA[
	$(document).ready(
		function() {
			$('input.fieldNews, input.removeValue, textarea').each(function(){
		 // tomamos el valor actual del input
		 var currentValue = $(this).val();
		 // en el focus() comparamos si es el mismo por defecto, y si es asi lo vaciamos
		 $(this).focus(function(){
				if( $(this).val() == currentValue ) {
					 $(this).val('');
				};
		 });
		 // en el blur, si el usuario dejo el value vacio, lo volvemos a restablecer
		 $(this).blur(function(){
				if( $(this).val() == '' ) {
					 $(this).val(currentValue);
				};
			 });
			});
			
			// opacidad
			function opacidad(elemento, valor) {
				var valor_noie = valor / 100;
				$(elemento).css('filter', 'alpha(opacity=' + valor + ')');
				$(elemento).css('-moz-opacity', valor_noie);
				$(elemento).css('-khtml-opacity', valor_noie);
				$(elemento).css('opacity',valor_noie);
			}
			
// BEGIN :: AGREGADO PARA BUSQUEDAS
		
			$('.uploadingField').css('filter', 'alpha(opacity=' + 0 + ')');
			$('.uploadingField').css('-moz-opacity', 0);
			$('.uploadingField').css('-khtml-opacity', 0);
			$('.uploadingField').css('opacity', 0);
			/* upload files */
			$('.uploadingField').change(
				function() {
					$(this).parent().children('.fonTxtImg').children().text($(this).val());
				}
			);

			//Set default open/close settings
			$('.acc_container').hide(); //Hide/close all containers
			$('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container
			
			//On Click
			$('.acc_trigger').click(function(){
				if ($(this).hasClass('active'))
				{
						$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
				}
				else
				{
					if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
						$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
						$(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
					}
				}
				return false; //Prevent the browser jump to the link anchor
			});


		$('input, textarea').each(function(){
		 // tomamos el valor actual del input
		 var currentValue = $(this).val();
		 // en el focus() comparamos si es el mismo por defecto, y si es asi lo vaciamos
		 $(this).focus(function(){
				if( $(this).val() == currentValue ) {
					 $(this).val('');
				};
		 });
		 // en el blur, si el usuario dejo el value vacio, lo volvemos a restablecer
		 $(this).blur(function(){
				if( $(this).val() == '' ) {
					 $(this).val(currentValue);
				};
			 });
			});

// END :: AGREGADO PARA BUSQUEDAS

			
			//onmouseover
			$('.menu-principal ul.menu li.iten').hover(
					function() {
						$('.sub-menu').hide();
						$(this).find('.sub-menu').show();
						$(this).find('a:first').css('background-position', 'left bottom').css('color', '#FFF');
					},
					function() {
						$('.sub-menu').hide();
						$(this).find('a:first').css('background-position', 'left top').css('color', '#666');
					}
				);
				//				$('.sub-menu').hover(
				//					function() {
				//						$(this).parent().find('a:first').css('background-position', 'left bottom').css('color', '#FFF');;
				//					},
				//					function() {
				//						$(this).hide();
				//						$(this).parent().find('a:first').css('background-position', 'left top').css('color', '#666');
				//					}
				//				);
			// END DEFAULT //
		}
	);
// ]]>
