	$(document).ready(function() {
	$("div#img-hover").mouseover(function() {
		$(this).css('background-position','0px 0px');		
		}).mouseout(function() {
			var cssCode = $(this).attr('ref');
			$(this).css('background-position',cssCode);
		});
		
		
	$("#bnt-archiv").mouseover(function() {
		$("#archiv-info").show();
		var archivLink = $(this).attr('webLink');
			$(this).click(function() {
				window.location = archivLink;
			});
		}).mouseleave(function() {
			$("#archiv-info").hide();
		});
		
	// $("div#postes").live("click",function() {
		
		// $(".post-entry").removeClass('background-hell').removeClass('post-abstand-2').removeClass('post-activ').addClass('background-post-older').addClass('post-abstand');

		
		// $(this).removeClass('background-post-older').removeClass('post-abstand');
		// $(this).addClass('background-hell').addClass('post-abstand-2').addClass('post-activ');
		// var id = $(this).attr('postid');

		
		// });
		
		$("div#postes").click(function() {
			var archivLink = $(this).attr('webLink');
			window.location = archivLink;
		
		});
		
		$("#bnt-archiv-back").mouseover(function() {
		$(".text-001").hide();
		$(".text-002").show();
		var archivLink = $(this).attr('webLink');
			$(this).click(function() {
				window.location = archivLink;
			});
		}).mouseleave(function() {
			$(".text-002").hide();
			$(".text-001").show();
		});
	
	$("div#post-more").live("mouseover",function() {
		var toggleID = $(this).attr('toggleID');
		$("span#toggle"+toggleID).toggle();
		}).live("mouseout",function() {
		var toggleID = $(this).attr('toggleID');
		$("span#toggle"+toggleID).toggle();
	});
		
	$("#bnt-archiv-back").mouseover(function() {
		$(".text-001").hide();
		$(".text-002").show();
		var archivLink = $(this).attr('webLink');
			$(this).click(function() {
				window.location = archivLink;
			});
		}).mouseleave(function() {
			$(".text-002").hide();
			$(".text-001").show();
		});
	
	/* jQuery Tools */
	
		$(".post-scroll").scrollable({ circular: true }).click(function() {
			$(this).data("scrollable").next();
			var indexNum = $(this).data("scrollable").getIndex();
			var imgRef = $("#p"+indexNum).attr("ref");
			$("#xxl-view").attr("href",imgRef);		
		});	
		
		$("a[rel='xxl-view']").colorbox();

		
	});
	
