// JavaScript Document

var opencontent = true;

$(document).ready(function(){	
		   		   
		    //$(document).pngFix(); 
						
			$("#footer a").hover(
			 function(){
			 	$(this).animate({ color: "#35200F" }, 400);
		  	 },
			 function(){
				 $(this).animate({ color: "#D8B57E" }, 400);
			 });
			
			$(".menu_box a, #footer ul a").click(function(){
				if(opencontent){
					$(".menu_box li").removeClass('current');
					$(this).parent().addClass('current');
				}
			});
			
			$('.decor_box').cycle({
				timeout: 6000,
				speed: 2000
			});
			
			function gallery(){
				$(".urna").fancybox(
						{
							'padding'			: 1,
							'zoomOpacity'			: true,
							'overlayShow'			: false,
							'zoomSpeedIn'			: 1000,
							'zoomSpeedOut'			: 1000
				}); 
			}
			
			gallery();
			
			
			$('.paging a, .menu_box a, #footer ul a, .main_gallery a, .small_buttons a, #logo_box a, #urnak').live('click',function() {											
				var obj = $(this).attr('href');
				if(opencontent){
					opencontent = false;	
					$('.content_inner').toggle('blind', 2000, function(){
						$('#ajax_loader').show();
						$.ajax({
							url: obj,
							type: "GET",
							cache: false,
							success: function(data){
								$('#ajax_loader').hide();
								$('.content_inner').html(data).toggle('blind', 2000, function(){ opencontent = true; });
								gallery();
							}
						});
					});
				}
				
				return false;
			});
			
			
			

});
