﻿$(function() {
    $('#a a')
		.css({ backgroundPosition: "-20px 35px" })
		.mouseover(function() {
		    $(this).stop().animate({ backgroundPosition: "(-20px 94px)" }, { duration: 500 })
		})
		.mouseout(function() {
		    $(this).stop().animate({ backgroundPosition: "(40px 35px)" }, { duration: 200, complete: function() {
		        $(this).css({ backgroundPosition: "-20px 35px" })
		    }
		    })
		})
    $('#b a')
		.css({ backgroundPosition: "0 0" })
		.mouseover(function() {
		    $(this).stop().animate({ backgroundPosition: "(-150px 0)" }, { duration: 500 })
		})
		.mouseout(function() {
		    $(this).stop().animate({ backgroundPosition: "(-300px 0)" }, { duration: 200, complete: function() {
		        $(this).css({ backgroundPosition: "0 0" })
		    }
		    })
		})
    $('#c a')
		.css({ backgroundPosition: "0 0" })
		.mouseover(function() {
		    $(this).stop().animate({ backgroundPosition: "(0 -250px)" }, { duration: 500 })
		})
		.mouseout(function() {
		    $(this).stop().animate({ backgroundPosition: "(0 0)" }, { duration: 500 })
		})
    $('#d a')
		.css({ backgroundPosition: "0 0" })
		.mouseover(function() {
		    $(this).stop().animate({ backgroundPosition: "(0 -250px)" }, { duration: 500 })
		})
		.mouseout(function() {
		    $(this).stop().animate({ backgroundPosition: "(0 0)" }, { duration: 500 })
		})
});

