$(document).ready(function () {
							
	var oAlert = alert;
	function alert(txt, title) {
			try {
					jAlert(txt, title);
			} catch (e) {
					oAlert(txt);
			}
	}


	/*$('#clipboard').click(function(){
		$.copy($('#cajatexto').val());															 
	});*/
	
	$.clipboardReady(function(){
		$('#clipboard').click(function(){
			$.clipboard($('#cajatexto').val());
			return false;
		});
	});
	
	//gestion de evento - por select - change
	var msg = $('#notifier').val();
	
	if(msg) jAlert(msg, '');
	
	$('a.icon.cross').bind("click", function() {
		var url = $(this).attr('rel');
		jConfirm('Segur?', '',function(r) {
			if (r) {
				window.location.replace(url);
			}
		});
	});
	
	
	/* ZOOMS */
	$(document).ready(function(){
	var options = {
	    zoomWidth: 300,
	    zoomHeight: 250,
            xOffset: 0,
            yOffset: 0,
            position: "right" //and MORE OPTIONS
	};
	$('.zoom').jqzoom(options);
	});

});


