$(document).ready(
	function(){
		$('#nav div.s').prepend('<div style="background:url(images/menuActiveL.png) right top no-repeat; float:left; margin:0;padding:0; width:19px; height:21px;"></div>').append('<div style="margin:0;padding:0;background:url(images/menuActiveR.png) right top no-repeat; float:left;width:11px; height:21px;"></div>');
		$('#nav div.s a').wrap('<div style="background:url(images/menuActiveC.png) left top repeat-x; height:18px; float:left;margin:0;padding:4px 0px 0px 0px;" />').css('color','white');
		
		upColot='#F90';
		simpleColot='#E0E4D5';
		simpleColot2='#ffffff';
		$('#thumbPhotos img').hover(
			function(){
				$(this).animate({ borderTopColor: upColot, borderLeftColor: upColot, borderRightColor: upColot, borderBottomColor: upColot }, 'medium');
			},
			function(){
				$(this).animate({ borderTopColor: simpleColot, borderLeftColor: simpleColot, borderRightColor: simpleColot, borderBottomColor: simpleColot }, 'medium');
			}
		)
		
		$('#thumbNamai img').hover(
			function(){
				$(this).animate({ borderTopColor: upColot, borderLeftColor: upColot, borderRightColor: upColot, borderBottomColor: upColot }, 'medium');
			},
			function(){
				$(this).animate({ borderTopColor: simpleColot2, borderLeftColor: simpleColot2, borderRightColor: simpleColot2, borderBottomColor: simpleColot2 }, 'medium');
			}
		)
		$('#thumbPhotos img').click(
			function(){
				oldImage=$(this).attr('src');
				$('#thumbPhotos img').removeClass('active');
				$(this).addClass('active').removeAttr('style');
				
				$('#mainPhoto div').fadeOut('slow',
					function(){
						var bigImage=oldImage.replace('_.jpg','.jpg');
						$(this).css('background-image','url('+bigImage+')').fadeIn('slow');
					}
				);
			}
		);
		$('#thumbNamai img').click(
			function(){
				oldImage=$(this).attr('src');
				$('#thumbNamai img').removeClass('active');
				$(this).addClass('active').removeAttr('style');
				
				$('#namaiPhotos img').fadeOut('slow',
					function(){
						var bigImage=oldImage.replace('_.jpg','.jpg');
						$(this).attr('src',bigImage).fadeIn('slow');
					}
				);
			}
		);
		
	}
);
