function gen_random(){var a=new Date().getTime();return a}function g_home(){$(".sabpets").hover(function(){$("#sabpets_text").stop().animate({height:"40px",opacity:0.7},700)},function(){$("#sabpets_text").stop().animate({height:"0px",opacity:0},1200)})}function gallery(){$("a[rel='gal1']").colorbox({transition:"none",opacity:0.8,height:"550px",width:"720px",current:"Photo {current} of {total}"})}function loadContents(b){if(b.indexOf("#")>-1){b=b.substring(b.indexOf("#",0)+1,b.length)}else{if(b.indexOf("page=",0)>-1){b=b.substring(b.indexOf("page=",0)+5,b.length)}}$("#r_side .title span").text("Loading...");var a=$("img#contentLoader");a.fadeIn();a.attr("src","img/loader.gif").one("load",function(){$("#menu_main .selected").removeClass("selected");$("#"+b).addClass("selected");var c="pages/"+b+".cfm  .content";$("#r_side .content").load(c,{randomNum:gen_random()},function(e,d,g){if(d=="error"){var f="Unable to find page...Redirecting ";$("#r_side .title span").text(f);window.location.hash="";window.location="http://www.SabrinasDogGrooming.com"}else{$("#r_side .title span").text(b);switch(b){case"Home":g_home();case"Photos":gallery();break}document.title="Sabrina's Dog Grooming - Kildare Groomer: "+b;$(".mlink").unbind("click").click(function(){loadContents($(this).attr("href"));return false});window.location.hash=b}a.fadeOut()})}).each(function(){if(this.complete){$(this).trigger("load")}})};
