/*
********************************
**	(c)2007 R3 WEBMOTION	  **
**	contact: info@r3.com.br	  **
********************************
*/

// CONFIG

$(document).ready(function(){
	
	$('a').click(function(){
		$(this).blur();
	});
	
	$('#menu li a').each(function(){
		baseUrl1 = 'http://www.ilustrabrasil.com.br/';
		baseUrl2 = 'http://www.sib.org.br/ilustrabrasil/';
		sufixoUrl = '/index.shtml';
		url_Sel = $(document).attr('URL').replace(baseUrl1,'').replace(baseUrl2,'').replace(sufixoUrl,'').replace('/','');
		if(url_Sel==$(this).attr('href').replace('../','').replace('#','')){
			$(this).addClass('selected');
		}
	});
	
	/*$('#expo li a').click(function(){
		var img = $(this).attr('href');
		dt = new Date;
		vazio = dt.getMilliseconds();
		tw = 500;
		th = 500;
		posx = (screen.width/2)-(tw/2);
		posy = (screen.height/2)-(th/2);
		features = "resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,width=" + tw + ",height=" + th + ",top=" + posy + ",left=" + posx;
		window.open('img.php?img='+img, vazio, features); void(0);
		return false;
	});*/
	
	$.superbox.settings = {
		boxId: "superbox", // Id attribute of the "superbox" element
		boxClasses: "", // Class of the "superbox" element
		overlayOpacity: .9, // Background opaqueness
		boxWidth: "650", // Default width of the box
		boxHeight: "650", // Default height of the box
		loadTxt: "Carregando...", // Loading text
		closeTxt: "Fechar", // "Close" button text
		prevTxt: "&laquo; Anterior &nbsp;", // "Previous" button text
		nextTxt: "&nbsp; Pr&oacute;ximo &raquo;" // "Next" button text
	};
	
	$.superbox();
	
	$("#pre_home p.video a").click(function(){
		$("p.video").html('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="600" height="405" id="player" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="player.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#b0c59d" /><embed src="player.swf" quality="high" bgcolor="#b0c59d" width="600" height="405" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
		return false;
	});
	
});