$(function() {

	//rounded corners on main content block 
	DD_roundies.addRule('#main', '5px', true);
	DD_roundies.addRule('#menu', '5px', true);
	DD_roundies.addRule('#objective', '5px', true);
	DD_roundies.addRule('.servicemenu li', '5px', true);
	DD_roundies.addRule('.servicebox', '5px', true);
	DD_roundies.addRule('#contactform', '5px', true);
	DD_roundies.addRule('.itemdesc', '5px', true);
	
	//dropshadow on main
	$('#main').dropShadow({ left: 0, top:0, opacity: 0.5, blur:4 }); 

	//redraw dropshadow on window resize
	$(window).resize(function() {
		$('#main').redrawShadow();
	});

	//menu hover and selected
	$('.menuitem, .lastmenuitem').hover(function() {
			$(this).css({'color' : '#FF9B28'});
		},
		function () {
			if (!$(this).hasClass('selected')) {
				$(this).css({'color' : '#FFFFFF'});
			}
		}
	);

	//selected menu item
	$('.selected').css('color', '#FF9B28');


//contact email
	$('#myForm').ajaxForm(function(data) {
		$('#contactmsg p').text('').removeClass();
		data = data.replace(/^\s+|\s+$/g, '');
		if (data=="Thank you! Your message has been sent."){
			$('#contactmsg p').append(data).addClass('success').fadeIn("slow");
			$('#myForm').resetForm();
		}
		else {
			$('#contactmsg p').append(data).addClass('error').fadeIn("slow");
		}
		
	});

	//services boxes
	$('#services li').click(function() {
		clicked = $(this).attr("id");
		
		$('#whichservice').children().hide();
		$('#' + clicked +'box').show();
		$(this).siblings().removeClass('thisservice');
		$(this).addClass('thisservice');
	});




});

