jQuery(document).ready(function($){

			$('#statusMsg').css({opacity:0});				

/*   ------------  Contact Form  -------- */	
	$('#contactform').ajaxForm(function(data) {
			if (data==1){				
				$('#contactform').hide(300);	
				$('#contactform').resetForm();	
				$('fieldset legend').css({color:"green"}).text("Thank you for contacting Icon Belts");	
			}
			else if (data==2){
				$('#contactform').hide(300, function(){$('fieldset legend').css({color:"990000"}).text("The form encountered a fatal error.");	});
			
			}
			else if (data==3)
			{
$('#statusMsg').text("Oops, I think you forgot to write us your message.");	
$('#statusMsg').slideDown(300)
					.animate({ opacity: 1 }, 300 )
					.animate({ opacity: 1 }, 4000 )
					.animate({ opacity: 0 }, 300 )
					.slideUp(300);

			}
			else if (data==4)
			{
				$('#y_email').animate({ backgroundColor: "#fcc4a2" }, 300 );
				
$('#statusMsg').text("Please enter your email so that we may respond to your message.");	
$('#statusMsg').slideDown(300)
					.animate({ opacity: 1 }, 300 )
					.animate({ opacity: 1 }, 4000 )
					.animate({ opacity: 0 }, 300 )
					.slideUp(300);
			}
			else if (data==5)
			{

				$('#statusMsg').text("The \"Name\" field is a required field. ");	
$('#statusMsg').slideDown(300)
					.animate({ opacity: 1 }, 300 )
					.animate({ opacity: 1 }, 4000 )
					.animate({ opacity: 0 }, 300 )
					.slideUp(300);
			}
			else if (data==6)
			{
				//$('#y_cap').animate({ height: "50px" }, 300 );

$('#statusMsg').text("Please check the security code and check that it has been entered correctly.");	
$('#statusMsg').slideDown(300)
					.animate({ opacity: 1 }, 300 )
					.animate({ opacity: 1 }, 4000 )
					.animate({ opacity: 0 }, 300 )
					.slideUp(300);
					

			}			
			
			
		});		
							
							
							
							

			var $sections_overlay = $('#sections li div.sections-overlay');

			var $sections_overlay_single = $('.thumbnail-single div.sections-overlay');

			var $featured_button_prev = $("#featured-button div.prev-hover");

			var $featured_button_next = $("#featured-button div.next-hover");

			

	$('#animate a')

		.css( {backgroundPosition: "50% 0px"} )

		.mouseover(function(){

			$(this).stop().animate({backgroundPosition:"(50% -190px)"}, {duration:500})

		})

		.mouseout(function(){

			$(this).stop().animate({backgroundPosition:"(50% 0px)"}, {duration:700, complete:function(){

				$(this).css({backgroundPosition: "50% 0px"})

			}})

		})

	$('#sidebar div.sidebar-box ul li a')

		.css( {backgroundPosition: "0px 0px"} )

		.mouseover(function(){

			$(this).stop().animate({backgroundPosition:"(0px -50px)"}, {duration:200})

		})

		.mouseout(function(){

			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:200, complete:function(){

				$(this).css({backgroundPosition: "0px 0px"})

			}})

		})		

	$('#animate li li a')

		.css( {backgroundPosition: "-640px 0px"} )

		.mouseover(function(){

			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:500})

		})

		.mouseout(function(){

			$(this).stop().animate({backgroundPosition:"(-640px 0px)"}, {duration:400, complete:function(){

				$(this).css({backgroundPosition: "-640px 0px"})

			}})

		})

		$featured_button_prev.css("opacity","0");

		$featured_button_prev.hover(function () {

			$(this).stop().animate({

				opacity: 1

			}, "slow");

		},

		function () {

			$(this).stop().animate({

				opacity: 0

			}, "fast");

		});

		$featured_button_next.css("opacity","0");

		$featured_button_next.hover(function () {

			$(this).stop().animate({

				opacity: 1

			}, "slow");

		},

		function () {

			$(this).stop().animate({

				opacity: 0

			}, "fast");

		});



	$("#categories-button").click(function(){

		$("#categories-dropdown").slideToggle("slow");

		$(this).toggleClass("active"); return false;

	});

	

		$("#home-wrapper div.sections-overlay").css({opacity: "0", backgroundPosition: "-40px -167px"});

		$("#home-wrapper div.thumbnail-div").hover(function () {

		$(this).stop().animate({marginTop: "-5px"}, 450);

		$(this).find("div.sections-overlay").stop().animate({opacity: "1", backgroundPosition:"(-40px 0px)"}, {duration:500});

		},

		function () {

			$(this).stop().animate({marginTop: "0px"}, 450);

			$(this).find("div.sections-overlay").stop().animate({opacity: "0", backgroundPosition:"(0px -167px)"}, {duration:500});

		});

		

		$sections_overlay.css("opacity","0");

		$sections_overlay.hover(function () {

			$(this).stop().animate({

				opacity: 1

			}, "slow");

		},

		function () {

			$(this).stop().animate({

				opacity: 0

			}, "slow");

		});

		

		$sections_overlay_single.css("opacity","0");

		$sections_overlay_single.hover(function () {

			$(this).stop().animate({

				opacity: 1

			}, "slow");

		},

		function () {

			$(this).stop().animate({

				opacity: 0

			}, "slow");

		});

	});