var hoverColour = "#99cc33";

$(function(){
	$("a.hoverBtn").show("fast", function() {
		$(this).wrap("<div class=\"hoverBtn\">");
		$(this).attr("class", "");
	});
	
	//display the hover div
	$("div.hoverBtn").show("fast", function() {
		//append the background div
		$(this).append("<div></div>");
		
		//get link's size
		var wid = $(this).children("a").width();
		var hei = $(this).children("a").height();
		
		//set div's size
		$(this).width(wid);
		$(this).height(hei);
		$(this).children("div").width(wid);
		$(this).children("div").height(hei);
		
		//on link hover
		$(this).children("a").hover(function(){
			//store initial link colour
			if ($(this).attr("rel") == "") {
				$(this).attr("rel", $(this).css("color"));
			}
			//fade in the background
			$(this).parent().children("div")
				.stop()
				.css({"display": "none", "opacity": "1"})
				.fadeIn("fast");
			//fade the colour
			$(this)	.stop()
				.css({"color": $(this).attr("rel")})
				.animate({"color": hoverColour}, 350);
		},function(){
			//fade out the background
			$(this).parent().children("div")
				.stop()
				.fadeOut("slow");
			//fade the colour
			$(this)	.stop()
				.animate({"color": $(this).attr("rel")}, 250);
		});
	});
});


var hovColour = "#99cc33";

$(function(){
	$("a.hovBtn").show("fast", function() {
		$(this).wrap("<div class=\"hovBtn\">");
		$(this).attr("class", "");
	});
	
	//display the hover div
	$("div.hovBtn").show("fast", function() {
		//append the background div
		$(this).append("<div></div>");
		
		//get link's size
		var wid = $(this).children("a").width();
		var hei = $(this).children("a").height();
		
		//set div's size
		$(this).width(wid);
		$(this).height(hei);
		$(this).children("div").width(wid);
		$(this).children("div").height(hei);
		
		//on link hover
		$(this).children("a").hover(function(){
			//store initial link colour
			if ($(this).attr("rel") == "") {
				$(this).attr("rel", $(this).css("color"));
			}
			//fade in the background
			$(this).parent().children("div")
				.stop()
				.css({"display": "none", "opacity": "1"})
				.fadeIn("fast");
			//fade the colour
			$(this)	.stop()
				.css({"color": $(this).attr("rel")})
				.animate({"color": hovColour}, 150);
		},function(){
			//fade out the background
			$(this).parent().children("div")
				.stop()
				.fadeOut("slow");
			//fade the colour
			$(this)	.stop()
				.animate({"color": $(this).attr("rel")}, 700);
		});
	});
});


var hovingColour = "#fff";

$(function(){
	$("a.hovingBtn").show("fast", function() {
		$(this).wrap("<div class=\"hovingBtn\">");
		$(this).attr("class", "");
	});
	
	//display the hover div
	$("div.hovingBtn").show("fast", function() {
		//append the background div
		$(this).append("<div></div>");
		
		//get link's size
		var wid = $(this).children("a").width();
		var hei = $(this).children("a").height();
		
		//set div's size
		$(this).width(wid);
		$(this).height(hei);
		$(this).children("div").width(wid);
		$(this).children("div").height(hei);
		
		//on link hover
		$(this).children("a").hover(function(){
			//store initial link colour
			if ($(this).attr("rel") == "") {
				$(this).attr("rel", $(this).css("color"));
			}
			//fade in the background
			$(this).parent().children("div")
				.stop()
				.css({"display": "none", "opacity": "1"})
				.fadeIn("fast");
			//fade the colour
			$(this)	.stop()
				.css({"color": $(this).attr("rel")})
				.animate({"color": hovingColour}, 30);
		},function(){
			//fade out the background
			$(this).parent().children("div")
				.stop()
				.fadeOut("slow");
			//fade the colour
			$(this)	.stop()
				.animate({"color": $(this).attr("rel")}, 600);
		});
	});
});




var hoColour = "#99cc33";

$(function(){
	$("a.hoBtn").show("fast", function() {
		$(this).wrap("<div class=\"hoBtn\">");
		$(this).attr("class", "");
	});
	
	//display the hover div
	$("div.hoBtn").show("fast", function() {
		//append the background div
		$(this).append("<div></div>");
		
		//get link's size
		var wid = $(this).children("a").width();
		var hei = $(this).children("a").height();
		
		//set div's size
		$(this).width(wid);
		$(this).height(hei);
		$(this).children("div").width(wid);
		$(this).children("div").height(hei);
		
		//on link hover
		$(this).children("a").hover(function(){
			//store initial link colour
			if ($(this).attr("rel") == "") {
				$(this).attr("rel", $(this).css("color"));
			}
			//fade in the background
			$(this).parent().children("div")
				.stop()
				.css({"display": "none", "opacity": "1"})
				.fadeIn("fast");
			//fade the colour
			$(this)	.stop()
				.css({"color": $(this).attr("rel")})
				.animate({"color": hoColour}, 300);
		},function(){
			//fade out the background
			$(this).parent().children("div")
				.stop()
				.fadeOut("slow");
			//fade the colour
			$(this)	.stop()
				.animate({"color": $(this).attr("rel")}, 600);
		});
	});
});




var hovsideColour = "#99cc33";

$(function(){
	$("a.hovsideBtn").show("fast", function() {
		$(this).wrap("<div class=\"hovsideBtn\">");
		$(this).attr("class", "");
	});
	
	//display the hover div
	$("div.hovsideBtn").show("fast", function() {
		//append the background div
		$(this).append("<div></div>");
		
		//get link's size
		var wid = $(this).children("a").width();
		var hei = $(this).children("a").height();
		
		//set div's size
		$(this).width(wid);
		$(this).height(hei);
		$(this).children("div").width(wid);
		$(this).children("div").height(hei);
		
		//on link hover
		$(this).children("a").hover(function(){
			//store initial link colour
			if ($(this).attr("rel") == "") {
				$(this).attr("rel", $(this).css("color"));
			}
			//fade in the background
			$(this).parent().children("div")
				.stop()
				.css({"display": "none", "opacity": "1"})
				.fadeIn("fast");
			//fade the colour
			$(this)	.stop()
				.css({"color": $(this).attr("rel")})
				.animate({"color": hovsideColour}, 10);
		},function(){
			//fade out the background
			$(this).parent().children("div")
				.stop()
				.fadeOut("slow");
			//fade the colour
			$(this)	.stop()
				.animate({"color": $(this).attr("rel")}, 600);
		});
	});
});

$(document).ready(function(){
  $('p.logo-button a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 650);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 650);
	  }
	);
});

$(document).ready(function(){
  $('p.cta-button a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 100);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 1250);
	  }
	);
});

$(document).ready(function(){
  $('p.cta-button-sub a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 650);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 650);
	  }
	);
});


$(document).ready(function(){
  $('p.logo_wom a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 650);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 650);
	  }
	);
});

$(document).ready(function(){
  $('p.logo_si a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 650);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 650);
	  }
	);
});


$(document).ready(function(){
  $('p.go-button a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 400);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 500);
	  }
	);
});


$(document).ready(function(){
  $('p.wp-button a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 100);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 1050);
	  }
	);
});



$(document).ready(function(){
  $('p.wd-button1 a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 100);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 1050);
	  }
	);
});


$(document).ready(function(){
  $('p.dm-button1 a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 100);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 1050);
	  }
	);
});

$(document).ready(function(){
  $('p.wp-button1 a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 250);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
});



$(document).ready(function(){
  $('p.wd-button a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 250);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
});


$(document).ready(function(){
  $('p.dm-button a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 250);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
});

