// JavaScript Document

$(document).ready(function(){

$(".news-latest-container a:last-child .news-latest-item ").addClass("last-news-element");
$("#left-menu li:last-child").hide();

$("#greeterRight li").mouseenter( 
	function () {

			var thisElement = $(this);
			var toHide = $(".active").attr("id");
			var toShowCenter = $("#greeterLeft"+thisElement.attr("id"))
			var toHideCenter = $("#greeterLeft"+toHide)

			$(":animated").stop(true,true);
			$("#greeterRight li.active").removeClass("active");
			$("#greeterRight li").addClass("inactive");
			$("#greeterRight ul>div").removeClass("arrow");
			$("#greeterRight>ul>div").addClass("noarrow");
			thisElement.removeClass("inactive");
			thisElement.addClass("active");
			thisElement.parent().removeClass("noarrow");
			thisElement.parent().addClass("arrow");

			if (toHide != thisElement.attr("id")){
				toHideCenter.animate({
						left:"-1000px"
						},600,function () {
							toHideCenter.addClass("hide");
							toHideCenter.css({"left":"1000px","opacity":"0"});
						});

					
					toShowCenter.animate({
						opacity: 1,
						left:"0px"
						
					},600, function () {
						toShowCenter.removeClass("hide");

					})
					
				
					

			}
		
		
	});


$.bookmark.setDefaults({icons: 'fileadmin/templates/images/bookmarks.png'});
$.bookmark.addSite('twitter','Twitter this!', 45,'http://twitter.com/home?status={t}&nbsp;:&nbsp;{u}');
$("#socialbookmarks").bookmark({sites: ['delicious', 'facebook', 'twitter', 'stumbleupon','yigg','yahoo',
'slashdot','linkedin','google','digg'], url: 'http://www.vswarm.com',title: 'vSwarm - open free render farm'});

});
