$jQuery(document).ready(function() {

	
    
/*	$('#mainMenu li:not(.active)').hover(
		function () {
			$('.background a', this).animate({backgroundPosition: "0 0"}, 
			{duration:500});
		}, 
		function () {
			$('.background a', this).animate({backgroundPosition: "0 51px"}, 
			{duration:500});
		}
	);*/

	var border = RUZEE.ShadedBorder.create({ corner:6, shadow:12 });
	border.render($('.roundedshadow'));
	var bordernoright = RUZEE.ShadedBorder.create({ corner:6, shadow:12,  border:0, edges: 'tlb'});
	bordernoright.render($('.roundedshadownoright'));


	
	$('div#toggleContact').click().toggle(function() {
		$('#contactBox').animate({
			width: 'show',
			opacity: 'show'
		}, 'slow');
		$('#toggleContact').animate({
			marginRight: '-3px'
			});
	}, function() {
		$('#contactBox').animate({
			width: 'hide'
		}, 'slow');
		$('#toggleContact').animate({
			marginRight: '0px'
		});
	});

	
	$("#kontakt").validate({
			errorElement: "div",
			errorPlacement: function(error, element) {
				 error.appendTo( element.parent() ).hide().fadeIn('slow');
			},
			success: function(label) {
				label.text("OK!").addClass("success").hide().fadeIn('slow');
			}
		});
		
	$("#agentur-kontakt").validate({
			errorElement: "div",
			errorPlacement: function(error, element) {
				 error.appendTo( element.parent() ).hide().fadeIn('slow');
			},
			success: function(label) {
				label.text("OK!").addClass("success").hide().fadeIn('slow');
			}
	});
	
	
	function loadContent(url) {
		$('.highlightBox .content').fadeTo('1000', 0, function () {
			$('.highlightBox .content').load($(url).attr("href") + " .content", '' , function () {
				$('.highlightBox .content').fadeTo('1000', 1);
			}
			);
			}
		);
	}
});

