//////////////////////////////////////////
///////////PNG-Fix//////////////////
////////////////////////////////////////

function correctPNG(){
	for(var i=0; i<document.images.length; i++){
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		 {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
		 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='image');\"><"+"/span>"
		 img.outerHTML = strNewHTML
		 i = i-1
		 }
	  }
}
   
/*** 
    Simple jQuery Slideshow Script
    Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc.  Please link out to me if you like it :)
***/

function slideSwitch() {
    var $active = $('#slideshow img.active');

    if ( $active.length == 0 ) $active = $('#slideshow img:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next(): $('#slideshow img:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );
    $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()", 2500 );
});

 
$(document).ready(function(){	
						   if ($("#slider1").length > 0){  
	$("#slider1").easySlider({
		prevText: '',
		nextText: '',		
		firstShow: true,
		lastShow: true,
		vertical: true, 
		continuous: true 		
	});
						   }
	$("input[name='stay_informed']").focus(function(){
		if($(this).val() == 'Your Email Here!!'){
			$(this).val('');
		}
	});

	$("input[name='stay_informed']").blur(function(){
		if($(this).val() == ''){
			$(this).val('Your Email Here!!');
		}
	});
	
	$("input[name='ask_vet']").focus(function(){
		if($(this).val() == 'Ask the Vet... type your question here!!'){
			$(this).val('');
		}
	});

	$("input[name='ask_vet']").blur(function(){
		if($(this).val() == ''){
			$(this).val('Ask the Vet... type your question here!!');
		}
	});	
});	
   

