// menu start
$(function() {
            $("#mymenu").menu({
                fx: "backout",
                speed: 300,
                click: function(event, menuItem) {
                    return true;
                }
            });
        });
// menu end

// slider start		
		$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true, 
				continuous: true
			});
		});	
// slider end	

// social button start	
		$(document).ready(function(){
			$(".trigger").click(function(){
				$(".panel").toggle("fast");
				$(this).toggleClass("active");
				return false;
			});
		});
// social button end

// portfolio thumbnail slide efect	start
		$(document).ready(function(){
				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
				//Vertical Sliding
				$('.boxgrid.slidedown').hover(function(){
					$(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
				});
				//Horizontal Sliding
				$('.boxgrid.slideright').hover(function(){
					$(".cover", this).stop().animate({left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
				});
				//Diagnal Sliding
				$('.boxgrid.thecombo').hover(function(){
					$(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
				});
				//Partial Sliding (Only show some of background)
				$('.boxgrid.peek').hover(function(){
					$(".cover", this).stop().animate({top:'90px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
				});
				//Full Caption Sliding (Hidden to Visible)
				$('.boxgrid.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'260px'},{queue:false,duration:160});
				});
				//Caption Sliding (Partially Hidden to Visible)
				$('.boxgrid.caption').hover(function(){
					$(".cover", this).stop().animate({top:'110px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'220px'},{queue:false,duration:160});
				});
		});
// portfolio thumbnail slide efect	end

// contact form validation start
	function checkForm() {
		name = document.getElementById("Name").value;
	  	email = document.getElementById("Email").value;
 	 	comment = document.getElementById("Message").value;
  
	if (name == "") {
		hideAllErrors();
		document.getElementById("nameError").style.display = "inline";
		document.getElementById("Name").select();
		document.getElementById("Name").focus();
		return false;
  	} else if (email == "") {
		hideAllErrors();
		document.getElementById("emailError").style.display = "inline";
		document.getElementById("Email").select();
		document.getElementById("Email").focus();
	  return false;
  } else if (comment == "") {
		hideAllErrors();
		document.getElementById("commentError").style.display = "inline";
		document.getElementById("Message").select();
		document.getElementById("Message").focus();
		return false;
  }
    return true;
  }
 
  function hideAllErrors() {
		document.getElementById("nameError").style.display = "none"
		document.getElementById("emailError").style.display = "none"
		document.getElementById("commentError").style.display = "none"
  }
// contact form validation end
