$(function (){
		   
   $("#btn-search").click(function () {
	$("#btn-newsletter").removeClass("newsletterselected");
 	$("#btn-search").addClass("searchselected"); 
	$("#searchbox").show();
	$("#newsletterbox").hide();
    });
   
   $("#btn-newsletter").click(function () { 
	  $("#btn-search").removeClass("searchselected");
	  $("#btn-newsletter").addClass("newsletterselected"); 
	$("#searchbox").hide();
	$("#newsletterbox").show();
    });

$("body").click
(
  function(e)
  {
    if(e.target.className !== "searchfield" && e.target.className !== "searchoptions" && e.target.className !== "radiobtn")
    {$(".searchoptions").hide();}
  }
);

$(".searchfield, .searchoptions").click( function () {$(".searchoptions").show();});

$("#nav ul li a").hover(function(){
		$(this).animate({ 'paddingTop': '21px' }, {queue:false,duration:150});
	},function(){
   		$(this).animate({ 'paddingTop': '15px' }, {queue:false,duration:150});
	});

$("#subnav ul li a").hover(function(){
		$(this).animate({ 'paddingTop': '21px' }, {queue:false,duration:150});
	},function(){
   		$(this).animate({ 'paddingTop': '15px' }, {queue:true,duration:150});
	});

 $("#quotebtn2").hover(function(){
		$("#quotebtn2 .inner").animate({ 'left': '-60px' }, {queue:false,duration:150});
	},function(){
   		$("#quotebtn2 .inner").animate({ 'left': '0' }, {queue:false,duration:150});
	});

$('#portfolio .thumb').hover(function(){$(this).find('.thumboverlay').animate({top:'120px'},{queue:false,duration:150});
				$(this).find('.thumbborder').animate({opacity : 0.90},{queue:false,duration:150});
			}, function(){$(this).find('.thumboverlay').animate({top:'161px'},{queue:false,duration:150});
				$(this).find('.thumbborder').animate({opacity : 0},{queue:false,duration:150});
			});

$('#portfolio .otherclients').hover(function(){
				$(this).find('.otherclients-thumboverlay').animate({opacity: 0.9}, {queue:false,duration: 150});
			}, function(){
				$(this).find('.otherclients-thumboverlay').animate({opacity: 0}, {queue:false,duration: 150});
			});

$("#actions ul li").hover(function(){

		if ($(this).hasClass('selected')) {
			$(this).find("a").animate({ 'paddingLeft': '36px' }, { queue:false, duration: 100 });
		} else {
			$(this).find("a").animate({ 'paddingLeft': '19px' }, { queue:false, duration: 100 });
		}
	},function(){
		if ($(this).hasClass('selected')) {
			$(this).find("a").animate({ 'paddingLeft': '33px' }, { queue:false, duration: 100 });
		} else {
			$(this).find("a").animate({ 'paddingLeft': '13px' }, { queue:false, duration: 100 });
		}
   		
	});
   
});
