$(document).ready(function (){
	if($("img.currentMenu").length > 0){
		var currentMenuSrc = $("img.currentMenu").attr("src").replace("-no-", "-over-");
		$("img.currentMenu").attr("src", currentMenuSrc);
	}
	$("img.mouseover").bind("mouseover", function(event){
		if (!$(this).hasClass("currentMenu")) {
			var src = $(this).attr("src").replace("-no-", "-over-");
			$(this).attr("src", src);
		}
	}).bind("mouseout", function(event){
		if (!$(this).hasClass("currentMenu")) {
			var src = $(this).attr("src").replace("-over-", "-no-");
			$(this).attr("src", src);
		}
	});
	$("div.mousemovemenet").bind('mousemove', function(event) {
		var delegate_x = event.pageX - $(this).offset().left;
		var delegate_y = event.pageY - $(this).offset().top;
		var xx = (delegate_x / $("div#container").width());
		var yy = (delegate_y / $("div#container").height());
		var target_x = ( ($("div.background").width() - $("div#container").width()) * xx) * -1;
		var target_y = ( ($("div.background").height() - $("div#container").height()) * yy) * -1;
		$("div.background").css("left", target_x+"px");
		$("div.background").css("top", target_y+"px");
	});
	$("a.contact-detail").toggle(function() {
		$("div.address-box").slideDown("slow");
		return false;
	}, function() {
		$("div.address-box").slideUp("slow");
		return false;
	});
	
	$("div.kascope-logo").toggle(function() {
		$("div.kascope-logo > img").attr("src", "/lookandfeel/images/developer.png");
		$(this).animate({
		    top: '555',
		  }, 500);
	}, function(){
		$(this).animate({
		    top: '615',
		  }, 500, function(){
			$("div.kascope-logo > img").attr("src", "/lookandfeel/images/kascape-logo.png");
		});
	});
});
