/* 

    Document   : funcoes.js
    Created on : 09/03/2009, 16:07:15
    Author     : Vagner - Acao Direta Web Studio
    Description: Funcoes - Content Construtora ADeschamps
	
*/

$(document).ready(function(){

	// Link Externo - não use target="_blank" (Y)
	$("a[@rel=externo]").attr('target','_blank');
	
	//Larger thumbnail preview 
	$("ul.thumbs_view li").hover(function() {
		$(this).css({'z-index' : '10'});
		$(this).find('img').addClass("hover").stop()
			.animate({
				marginTop: '-65px', 
				marginLeft: '-84px', 
				top: '50%', 
				left: '50%', 
				width: '140px', 
				height: '105px',
				padding: '10px' 
			}, 200);
		
		} , function() {
		$(this).css({'z-index' : '0'});
		$(this).find('img').removeClass("hover").stop()
			.animate({
				marginTop: '0', 
				marginLeft: '0',
				top: '0', 
				left: '0', 
				width: '100px', 
				height: '75px', 
				padding: '5px'
			}, 400);
	});

	//Swap Image on Click
	$("ul.thumbs_view li a").click(function() {		
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#fotos_view img").attr({ src: mainImage });
		return false;		
	});

});