

// Menu navigation Dropmenu
$(document).ready(function(){
	$('.sub_menu').css("display","none");
	// Find and add class to the Li parent of Ul sub_menu
	$(".sub_menu").parent('li').addClass("drop");
	$(".drop").hover(function(){
			$(this).find('.sub_menu').slideDown(100);
	},function(){
			$(this).find('.sub_menu').slideUp(100);
	});
		$(".sub_menu a").hover(function(){
		$(this).find('span').stop().animate({marginLeft:'10px'},{queue:false, duration:125, easing: 'easeInCubic'})
	},function(){
		$(this).find('span').stop().animate({marginLeft:'0px'},{queue:false, duration:250, easing: 'easeOutSine'})
	});
 });


// Animate the lists...
$(document).ready(function(){
		$("#sidebar li a").wrapInner("<span></span>");
		$("#sidebar li a").hover(function(){
		$(this).find('span').stop().animate({marginLeft:'10px'},{queue:false, duration:125, easing: 'easeInCubic'})
	},function(){
		$(this).find('span').stop().animate({marginLeft:'0px'},{queue:false, duration:250, easing: 'easeOutSine'})
	});
});




// Captcha system
$(document).ready(function(){

			$("#errorcaptcha").css({opacity: "0"});
$("#check").keyup(function () {
		var rep = $(this).val();
		var n1 = document.getElementById('num1').innerHTML;
		var n2 = document.getElementById('num2').innerHTML;
		var n3 = parseInt(n1) + parseInt(n2);
      		if( n3 == rep ){
			$("#submitter").prepend('<input type="submit" name="contact_submit" id="contact_submit" value="SUBMIT NOW" class="cufon" />').animate({opacity: "1"},{duration:350});
			$("#errorcaptcha").text(" ").animate({opacity: "0"},{duration:150});
		}
		else {
			$("#errorcaptcha").text("Sorry you have not filled in the form correctly, please review your entries!").animate({opacity: "1"},{duration:350});
			$("#submitter").prepend('').animate({opacity: "0"},{duration:150}).empty();
		}
    });

 });
