$(document).ready(function(){if($("#testimonials").length>0){$.getJSON("/template/media/testimonials.php",function(c){$.each(c,function(d,e){setTimeout(function(){$("#testimonial_stage").hide();$("#testimonial_stage .content").html(e.testimonials_content);$("#testimonial_stage .name").html(e.testimonials_name);$("#testimonial_stage").fadeIn("slow")},15000*d)})})}if($("#home_content").length>0){$("#home_content").hide()}$("a.home_read_more").click(function(){$("#home_content").slideToggle("slow");return false});$("#navigation > ul > li").hover(function(){$(this).children("ul").fadeIn("slow")},function(){$(this).children("ul").fadeOut("fast")});$("#navigation a.n").click(function(){return false});$("#navigation ul.cs li").hover(function(){$(this).children("ul").show()},function(){$(this).children("ul").hide()});if($("#casebook").length>0){$("#casebook").booklet({width:"780",height:"500",menu:"#index_menu",pageSelector:true,arrows:true})}$("ol#index_page a").live("click",function(){var c=$(this).attr("id");c=c.replace("selector-page-","");$("#casebook .b-page-"+c+" a.readfull").click();return false});$("ol#home_index a").live("click",function(d){d.preventDefault();var c=$(this).attr("id");c=c.replace("selector-page-","");$("#casebook").booklet(parseInt(c));return false});$("#index_page_icon").live("click",function(){$("#casebook").booklet(1)});function b(){$(".booklet").css("z-index","10");$("#fade_backdrop").hide();$("#casebook_overlay").hide();$("#casebook_overlay_content").html("");$("#casebook_overlay_close").hide()}function a(){$(".booklet").css("z-index","0");$("#fade_backdrop").fadeIn();$("#casebook_overlay").fadeIn();$("#casebook_overlay_close").fadeIn();$("#casebook_overlay").scrollTop(0)}$("#casebook_overlay_close").live("click",function(){b()});$("a.readfull").live("click",function(){var c=$(this).parent().parent().find(".full").html();$("#casebook_overlay_content").html(c);a();return false});$("#fade_backdrop").live("click",function(){b()});if($("#testimonials > #slideshow").length>0){$("#testimonials #slideshow").fadeIn();$("#testimonials #slideshow").cycle({speed:1000,timeout:10000})}});

