function vr_preventDefault(a){if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}}var isTransformSupported="WebkitTransform" in document.documentElement.style,current_top=new Object,current_left=new Object,saved_childdiv;function next_page(d){var b=d.parent(),c=b.height(),f=d.height(),a=d.position(),e={},g=d.selector;if(!(g in current_top)){current_top[g]=0}if(!(g in current_left)){current_left[g]=0}saved_childdiv=d;if(isTransformSupported){if(f>c){current_top[g]-=c;d.css("top",current_top[g])}else{if(equiv(a.left,current_left[g])){current_left[g]-=600;d.css("left",current_left[g]);$("#prev_link").removeClass("disabled")}}}else{if($(".pageable:animated").length==0){if(f>c){e.top="-="+c+"px";d.animate(e,"slow")}else{e.left="-=600px";d.animate(e,"slow",function(){$("#prev_link").removeClass("disabled")})}}}}function prev_page(d){var b=d.parent(),c=b.height(),f=d.height(),a=d.position(),e={};child_selector=d.selector;if(!(child_selector in current_top)){current_top[child_selector]=0}if(!(child_selector in current_left)){current_left[child_selector]=0}saved_childdiv=d;if(isTransformSupported){if(f>c){current_top[child_selector]+=c;d.css("top",current_top[child_selector])}else{if((a.left<0)&&equiv(a.left,current_left[child_selector])){current_left[child_selector]+=600;d.css("left",current_left[child_selector]);if(a.left>=-600){$("#prev_link").addClass("disabled")}}}}else{if($(".pageable:animated").length==0){if(f>c){e.top="+="+c+"px";d.animate(e,"slow")}else{if(a.left<0){e.left="+=600px";d.animate(e,"slow");if(a.left>-(600*2)){$("#prev_link").addClass("disabled")}}}}}}function paginate_reset(a){var b=a.selector;current_top[b]=0;current_left[b]=0;if(saved_childdiv){saved_childdiv.css("top",current_top[b]);saved_childdiv.css("left",current_left[b])}$("#prev_link").addClass("disabled")}function equiv(d,c){if(Math.abs(d-c)<=2){return true}else{return false}}function single_page(){var a=$("#sp_css");if(a.length==0){$("#main_css").after('<link id="sp_css" rel="stylesheet" type="text/css" media="screen"href="http://vanderbiltrepublic.com/css/single_column.css" />');$("#sp_link").html("MULTI-COLUMN");paginate_reset('#columns_content"')}else{a.remove();$("#sp_link").html("SINGLE COLUMN")}Hyphenator.toggleHyphenation()}$(document).ready(function(){if($("#columns_content").length!=0){if(!(("WebkitColumns" in document.documentElement.style)||("MozColumnCount" in document.documentElement.style))||((navigator.userAgent.toLowerCase().indexOf("chrome")!=-1)&&($("#pager").length!=0))){$("#sp_link").hide();single_page()}else{if((navigator.userAgent.toLowerCase().indexOf("iphone")!=-1)||(navigator.userAgent.toLowerCase().indexOf("ipod")!=-1)){single_page()}}}});var hero_contents=null,hero_alt=null,hero_curtain=null,h1_link=null,h2_link=null,hero_caption=null,h1_caption_html=null,h2_caption_html=null,first_hero=true,hero_alt_is_slideshow=false,replacesec=1;function hero_replace(){if(first_hero){if(hero_contents==null||hero_alt==null||hero_curtain==null||hero_caption==null){hero_contents=$("#hero_contents");hero_alt=$("#hero_alt");hero_alt_is_slideshow==(hero_alt.children("#slideshow").length!=0);hero_curtain=$("#hero_curtain");hero_caption=$("#hero_caption");h1_link=$("#h1_link");h2_link=$("#h2_link")}stop_hero(hero_contents);h1_caption_html=hero_caption.html();hero_curtain.css("z-index",3);hero_curtain.fadeIn(1000*(replacesec/2),function(){hero_contents.css("top","-10000px");hero_alt.css("top","0");hero_curtain.fadeOut(1000*(replacesec/2),function(){hero_curtain.css("z-index",0);first_hero=false;start_hero(hero_alt)})});hero_caption.fadeOut(1000*(replacesec/2),function(){hero_caption.fadeIn(1000*(replacesec/2),function(){});if((h2_caption_html!=null)||(!hero_alt_is_slideshow)){hero_caption.html(h2_caption_html)}});h2_link.fadeOut(1000*(replacesec/2),function(){h1_link.fadeIn(1000*(replacesec/2),function(){})})}}function hero_restore(){if(!first_hero){stop_hero(hero_alt);h2_caption_html=hero_caption.html();hero_curtain.css("z-index",3);hero_curtain.fadeIn(1000*(replacesec/2),function(){hero_alt.css("top","-10000px");hero_contents.css("top","0");hero_curtain.fadeOut(1000*(replacesec/2),function(){hero_curtain.css("z-index",0);first_hero=true;start_hero(hero_contents)})});hero_caption.fadeOut(1000*(replacesec/2),function(){hero_caption.fadeIn(1000*(replacesec/2),function(){});hero_caption.html(h1_caption_html)});h1_link.fadeOut(1000*(replacesec/2),function(){h2_link.fadeIn(1000*(replacesec/2),function(){})})}}function hero_swap(){if(first_hero){hero_replace()}else{hero_restore()}}function stop_hero(a){if(a.children("#slideshow").length!=0&&window.stopShow){stopShow()}}function start_hero(a){if(a.children("#slideshow").length!=0&&window.startShow){startShow()}}$(document).ready(function(){$("#hero_button.active").hover(function(){$("#h1_link,#h2_link").css("color","#00deff")},function(){$("#h1_link,#h2_link").css("color","#F2F2F2")}).click(function(){hero_swap()})});function VR_slideContentToPosition(a){if(isTransformSupported){$("#afth_horizontalslides").css("left",a)}else{$("#afth_horizontalslides").animate({left:a},"slow")}}function VR_slidePostContentToPosition(a){if(isTransformSupported){$("#afth_post_slides").css("left",a)}else{$("#afth_post_slides").animate({left:a},"slow")}}function VR_slideRevealTicketForm(){$("#afth_form_tag").hide();$("#afth_form_ticket").show();if(isTransformSupported){$("#afth_verticalslides").css("top","-640px")}else{$("#afth_verticalslides").animate({top:"-640px"},"slow")}}function VR_slideRevealTagForm(){$("#afth_form_ticket").hide();$("#afth_form_tag").show();if(isTransformSupported){$("#afth_verticalslides").css("top","-640px")}else{$("#afth_verticalslides").animate({top:"-640px"},"slow")}}function VR_slideHideForm(){if(isTransformSupported){$("#afth_verticalslides").css("top","0")}else{$("#afth_verticalslides").animate({top:"0"},"slow")}}$(document).ready(function(){$(".content_button").hover(function(){$(this).find("a").css("color","#00deff")},function(){$(this).find("a").css("color","#F2F2F2")});$("#afth_button_2011").click(function(){VR_slidePostContentToPosition("0px");JRW_startShow()});$("#afth_button_2012").click(function(){VR_slidePostContentToPosition("-852px");JRW_stopShow()})});
