// Gallery Script -->	Simple jQuery Slideshow Script
function slideSwitch(){var $active=$('#slideshow li.active');if($active.length==0)$active=$('#slideshow li:last');var $next=$active.next().length?$active.next():$('#slideshow li:first');$active.addClass('last-active');$next.css({opacity:0.0}).addClass('active').animate({opacity:1.0},1000,function(){$active.removeClass('active last-active')})}$(function(){setInterval("slideSwitch()",5000)});

$(function(){

	$(".company-focus a").append("<em class='link'></em>");
	
	$("a").hover(function() {
		$(this).find("em.link").animate({opacity: "show", top: "-75"}, "slow");
		var hoverText = $(this).attr("title");
	    $(this).find("em.link").text(hoverText);
	}, function() {
		$(this).find("em.link").animate({opacity: "hide", top: "-85"}, "fast");
	});

	$(".company-focus dd .content").css("cursor", "pointer").click(function(){										  
    	window.location=$(this).find("a").attr("href");return false;
	});

// REMOVES AND DEFUALT VALUES FROM INPUT FIELDS IN FORMS

	$('input[type="text"], textarea').focus(function() {
		if (this.value == this.defaultValue){ 
			this.value = '';
		}
		
			if(this.value != this.defaultValue){
			this.select();
					}
				});
				$('input[type="text"], textarea').blur(function() {
					if ($.trim(this.value) == ''){
						this.value = (this.defaultValue ? this.defaultValue : '');
					}
				});



});

$(function(){
	$('#mcbut').click(function(){
		var email = $('#mcemailaddress').val();
		if (email != ""  && email != "Successfully Subscribed!" && email != "enter your email address") {
			$.ajax({
				type:           "GET",
				url:            "/common/mcsub.php",
				dataType:       "html",
				cache:          false,
				data:           'email=' + email,
				success:        function(html){ 
					$('#mcemailaddress').val(html);
				}
			});
		}
	return false;
	});
});



