jQuery.noConflict();

(function($){
	$(function(){

	$('.widget_delicious a, .widget_links a').attr("rel","external");

	// INI: Javascript Hack For link with rel='external'

		if (!document.getElementsByTagName) return;

		var anchors = document.getElementsByTagName("a");

		for (var i=0; i<anchors.length; i++){
			var anchor = anchors[i];
			if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external"){
				anchor.target = "_blank";
			};
		};
	// END: Javascript Hack For link with rel='external' 

		
		$("li.gallery-item").each(function(index){
			var numCol = 4;
			if ((index+1)%numCol == 0){
				$(this).css("margin","8px 0px 0px 0px");
			}
		});

	$('#back, #notaLegal').hide();

	$('#back').css({
			zIndex		: 10,
			position	: 'absolute',
			top			: '0',
			left		: '0',
			width		: $(window).width(),
			height		: $(document).height(),
			background	: '#000',
			opacity		: 0.4,
			filter		: 'alpha(opacity=20)'
		});

	$('#notaLegal').css({
		zIndex		: 11,
		top			: '75',
		position	: 'absolute',
		left		: ($(window).width()/2) - ($('#notaLegal').width()/2),
		opacity		: 1
	});
	
	$(".showNotaLegal").click(function(){
		$('#notaLegal').css('top',( 75 + $(document).scrollTop() ) + 'px')
		$('#back, #notaLegal').show();
	});
	$('#back, a.notaLegalCerrar').click(function(){
		$('#back, #notaLegal').hide();
		return false;
	});
});
})(jQuery);
 
 