$(document).ready(function() {

	$("ul#postal > li.post").hover(
		function () {
			$(this).find("div.comentos").animate({
				"top": "+=25px",
				opacity: "show"
			}, 500, "linear");
			$(this).find("div.more a").animate({
				opacity: "show"
			}, 500, "linear");
		}, 
		function () {
			$(this).find("div.comentos").animate({
				"top": "-=25px",
				opacity: "hide"
			}, 500, "linear");
			$(this).find("div.more a").animate({
				opacity: "hide"
			}, 500, "linear");
		}
	);
	
	$("ul#guncel > li.post").hover(
		function () {
			$(this).find("div.gunce_thumb").animate({
				"right": "+=50px"
			}, 500, "linear" );
			$(this).find("h2.post_title").animate({
				"right": "+=50px"
			}, 500, "linear" );
		},
		function () {
			$(this).find("div.gunce_thumb").animate({
				"right": "-=50px"
			}, 500, "linear");
			$(this).find("h2.post_title").animate({
				"right": "-=50px"
			}, 500, "linear" );
		}
	);
			
	$("div#breadcrumb > div.bread_cat").animate({
			"width": "20px"
		});
		
	$("div#breadcrumb > div.bread_cat").hover(
		function () {
			var bred = $(this).find("a");
			var brewidth = bred.width();
			$(this).animate({
				"width": brewidth + 10 +"px"
			}, 500, "linear" );
		},
		function () {
			$(this).animate({
				"width": "10px"
			}, 500, "linear" );
		}
	);
	
	$("div#quick_view > a").click( function() {
		var en_gen = $(document).width();
		var en_yuk = $(document).height();
		var gor_yuk = $(window).height();
		$("div#musbox").css("position", "relative");
		$("#maske").animate({
			"width": en_gen,
			"height": en_yuk,
			"opacity": 0.8
			}, 500, "linear", function() {
				$("div.comentos").css("display", "none");
				$("div#musbox > div.post_left").addClass("post_viewer");
				$("div#musbox > div.post_left > div#post_border").addClass("border_ver");
				$("div#musbox > div.post_left").animate({
					"top": "-200px",
					"left": "-100px",
					"height": gor_yuk - 70
				}, 500, "linear" );
				$("#post_kapat").fadeIn("slow");
			})
		});
		
	$("#maske").click( function() {
		$("#maske").fadeOut("slow");
		$("#post_kapat").fadeOut("slow");
		$("div#musbox > div.post_left").animate({
					"top": "0",
					"left": "0",
					"height": "100%"
				}, 500, "linear", function() {		
					$("div#musbox > div.post_left").removeClass("post_viewer");
					$("div#musbox > div.post_left > div#post_border").removeClass("border_ver");
				}
			)
		});
		
		$("#post_kapat").click( function() {
		$("#maske").fadeOut("slow");
		$("#post_kapat").fadeOut("slow");
		$("div#musbox > div.post_left").animate({
					"top": "0",
					"left": "0",
					"height": "100%",
					"width": "510px"
				}, 500, "linear", function() {		
					$("div#musbox > div.post_left").removeClass("post_viewer");
					$("div#musbox > div.post_left > div#post_border").removeClass("border_ver");
				}
			)
		});		
});
