/**
 * @author Santiago Mamone
 */

$(document).ready(function() {
	
	function mostrarCartelCargando(cartel) {
		cartel.css('visibility', 'visible')
	}
	
	function ini() {
		$('#fileUpload').val('');
		
	    $('#fileUpload').change(function(){
	        mostrarCartelCargando(
					$(this).parent().find('.principal-CartelCargando'));
	        $(this).parent()[0].submit();
	    });
		
		$('.principal-botonRegistrate').hover(function() {
			$(this).addClass('principal-botonRegistrateMarcado');
		}, function() {
			$(this).removeClass('principal-botonRegistrateMarcado');
		});
		
		$('.principal-botonRegistrate').click(function() {
			var url = $(this).find('a').attr('href');
			window.location.href = url;
		});
		
		$('.principal-imagenEjemplo').hover(function() {
			$(this).css('backgroundPosition', $(this).css('backgroundPosition').split(' ')[0] + ' 50px');
		}, function() {
			$(this).css('backgroundPosition', $(this).css('backgroundPosition').split(' ')[0] + ' 0px');
		});
		
		/*$('.emoticon').find('.emoticonMarcoImagen').find('img').hover(function() {
			$(this).addClass('emoticonMarcado');
		}, function() {
			$(this).removeClass('emoticonMarcado');
		});*/
	}
	
	ini();
})
