//All code written by Mark Goddard http://0100.tv/
//PrettyPhoto by Stéphane Caron http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/

Cufon.replace('li',{hover:true});Cufon.replace('h1');$(document).ready(function(){$("#form1").css("display","");var string=window.location.toString();if(string.match("admin"))
{$(".bImage").css("background-image","url(../images/top/4.jpg)");}
if(string.match("rescue"))
{$(".bImage").css("background-image","url(../images/top/3.jpg)");}
if(string.match("edit"))
{$(".bImage").css("background-image","url(../images/top/4.jpg)");$("#submit").click(function(){name=$("#form1 #name").val();breed=$("#form1 #breed").val();description=$("#form1 #description").val();$(".error").html("");error=false;if(!name){$(".error").append("<p>Please make sure you enter a name</p>");error=true;}
if(!breed){$(".error").append("<p>The breed is empty.</p>");error=true;}
if(!description){$(".error").append("<p>Please describe the animal</p>");error=true;}
if(error){return false;}
else
{$(this).css("display","none")
$("#wait").css("display","")}});}
if(string.match("contact"))
{$(".bImage").css("background-image","url(../images/top/2.jpg)");$("#submit").click(function(){name=$("#form1 #name").val();email=$("#form1 #email").val();enquiry=$("#form1 #enquiry").val();telephone=$("#form1 #telephone").val();$(".error").html("");error=false;if(!name){$(".error").append("<p>Please make sure you enter a name</p>");error=true;}
if(!email&&!telephone){$(".error").append("<p>Please make sure you enter either a telephone number or an email address so we can contact you</p>");error=true;}
if(!enquiry){$(".error").append("<p>Don't forget to enter some comments</p>");error=true;}
if(isNaN(telephone)&&telephone){$(".error").append("<p>"+telephone+" is not a valid telephone number</p>");error=true;}
if(error){return false;}});}
$("table .delete").click(function(){url=$(this).attr("href");var answer=confirm("Are you sure you wish to delete this animal? You won't be able to undo this function!")
if(answer){window.location=url;}
else{return false;}});$("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',padding:40,opacity:0.7,showTitle:true,theme:'light_rounded',callback:function(){}});$("#check").val("cliffekennels");});