// JavaScript Document
jjj=jQuery.noConflict();
jjj(document).ready(function(){
/** site map*/

jjj("body").addClass('jsOn');	
					   
jjj("#site-map:first").clone().prependTo("#sitemap");
jjj(".site-map:last").remove();
var header = jjj("#header");
var sitemap = jjj("#site-map");
var sitemapH = -sitemap.outerHeight();
sitemap.css("margin-top", sitemapH + "px").hide();
jjj("a[href=#site-map]").click(function()
{
	if (sitemap.is(":animated"))
		return false;
	if (sitemap.is(":visible")){
		sitemap.stop(true).animate({ marginTop: sitemapH + "px" }, 750, "swing", function() { jjj(this).hide(); jjj("#content").removeClass("openBorder"); });
	}
	else{
		jjj("#content").addClass("openBorder");
		sitemap.show().stop(true).animate({ marginTop: "0px" }, 750, "swing");
	}
	return false;
});

jjj("#closeButton").click(function()
{
	if (sitemap.is(":animated"))
		return false;
	if (sitemap.is(":visible")){
		sitemap.stop(true).animate({ marginTop: sitemapH + "px" }, 750, "swing", function() { jjj(this).hide(); jjj("#content").removeClass("openBorder"); });
	}
	else{
		jjj("#content").addClass("openBorder");
		sitemap.show().stop(true).animate({ marginTop: "0px" }, 750, "swing");
	}
	return false;
});
/*----tool tip-----*/


/*var tooltip = null;


function tooltipShow(element, text)
{
	tooltip.find("span").text(text);

	var IEOffset = { left: 0 };
	if (jjj.browser.msie)
		IEOffset = jjj("body").offset();
	var offset = element.offset();

	tooltip.css({ left: (offset.left + element.width() - IEOffset.left - 10) + "px", top: (offset.top + (element.outerHeight() - tooltip.outerHeight()) / 2) + "px" }).show();
}


var tooltipAlt = null;


function tooltipAltShow(element, text)
{
	var i = text.indexOf(":");
	tooltipAlt.find("span").empty().append("<strong>" + text.substring(0, i + 1) + "</strong> " + text.substring(i + 1));

	var IEOffset = { left: 0 };
	if (jjj.browser.msie)
		IEOffset = jjj("body").offset();
	var offset = element.offset();

	tooltipAlt.css({ left: (offset.left + element.width() - IEOffset.left) + "px", top: (offset.top + (element.outerHeight() - tooltipAlt.outerHeight()) / 2) + "px" }).show();
}

if (0)//jjj(".tooltip").length)
{
	jjj("body").append("<p id=\"tooltip\"><span></span></p>");
	tooltip = jjj("#tooltip").hide();
	jjj(".clients > li").hover(function() { tooltipShow(jjj(this), jjj(this).find("img").attr("alt")); }, function() { tooltip.hide(); });
}

if (jjj("img").attr("alt").length)
{
	jjj("body").append("<p id=\"tooltip-alt\"><span></span></p>");
	tooltipAlt = jjj("#tooltip-alt").hide();
	jjj("img").hover(function() { tooltipAltShow(jjj(this), jjj(this).attr("alt"));}, function() { tooltipAlt.hide(); });
}
*/


});



