function flashPlayerPlay(title,mp3){var mp3Location="/media/mp3/";$("#nowPlaying").html(title);document.getElementById("mp3player").SetVariable("player:jsUrl",mp3Location+ mp3);document.getElementById("mp3player").SetVariable("player:jsPlay","");}
function pageload(hash){var pageStr='home';if(hash){pageStr=document.location.hash.replace(/^.*#/,'');}
getPage(pageStr);}
function getPage(pageStr){if(pageStr==null||pageStr===''||pageStr==='home'){$("#pageContainer").html('');$("#pageContainer").hide();$("#featuredContainer").show();return true;}
var urlToFetch=pageStr+".php";$.ajax({method:"get",url:urlToFetch,beforeSend:function(){$("#featuredContainer").hide();$("#pageContainer").html('');$("#pageContainer").show();if(pageStr==='works2'){$('#pageContainer').css('background','none').css('padding','0px');}else{$('#pageContainer').css('background','rgba(0,0,0,0.7)').css('padding','20px 20px 20px 20px');}},complete:function(){if(pageStr==='photos'){$('#gallery a').lightBox();}else if(pageStr==='home'){}else if(pageStr==='works'){$("#bandAccordion").accordion({header:"h3",autoHeight:false,active:false});$("#choralAccordion").accordion({header:"h3",autoHeight:false,active:false});$("#chamberAccordion").accordion({header:"h3",autoHeight:false,active:false});$('#worksTabs').tabs();$(".ui-icon-stop").live("click",function(){document.getElementById("mp3player").SetVariable("player:jsStop","");return false;});$(".ui-icon-cart").live("click",function(){$("#shoppingCart").toggle('blind');return false;});$("#evenetHorizonPlay").click(function(){flashPlayerPlay("Event Horizon (MIDI)","Event Horizon.Joni Greene.mp3");});$("#netluckPlay").click(function(){flashPlayerPlay("Net Luck Soaring","NetLuckSoaring-KUReading.mp3");});$("#circianPlay").click(function(){flashPlayerPlay("Circean Waters","Circean%20Waters%20Kansas%20University%20Wind%20Ensemble.mp3");});$("#messagePlay").click(function(){flashPlayerPlay("Message in Blue","Message_in_Blue.mp3");});$("#moonscapePlay").click(function(){flashPlayerPlay("Moonscape Awakening (10/14/08)","MoonscapeAwakening_IUConcertBand.mp3");});$("#moonscapeRevisedPlay").click(function(){flashPlayerPlay("Moonscape Awakening <i>(revised)</i> (9/20/09)","MoonscapeAwakening_MM.mp3");});$(".autumnI-VIPlay").click(function(){flashPlayerPlay("Autumn Reflections I-VI.","Autumn%20Reflections%20edited%20-%20senior%20recital.mp3");});$("#huesPlay").click(function(){flashPlayerPlay("Un Aliento de Color I. Hues in the Wind","HuesInTheWind_MM.mp3");});$("#lucretiaIPlay").click(function(){flashPlayerPlay("Lucretia I. The Jewel of Rome","Lucretia%20I.mp3");});$("#lucretiaIIPlay").click(function(){flashPlayerPlay("Lucretia II. Perfidious Beauty","Lucretia%20II.mp3");});$("#lucretiaIIIPlay").click(function(){flashPlayerPlay("Lucretia III. Headlong to Death","Lucretia.mvt.III_3.24.09.mp3");});$("#ephemeraPlay").click(function(){flashPlayerPlay("Ephemera","01%20Ephemera.mp3");});$("#tchinaPlay").click(function(){flashPlayerPlay("T'china Lema'an Haifa","Tchina%20Lemaan%20Haifa%20edited%20-%20senio.mp3");});$("#crackedPlay").click(function(){flashPlayerPlay("Cracked","Cracked%20edited%20-%20senior%20recital.mp3");});$("#interventionPlay").click(function(){flashPlayerPlay("Intervention","Intervention.mp3");});$("#wavePlay").click(function(){flashPlayerPlay("I. Wave","WaveAndImpulse-Wave.mp3");});$("#impulsePlay").click(function(){flashPlayerPlay("II. Impulse","WaveAndImpulse-Impulse.mp3");});$('#worksTabs').css('display','block');}},success:function(html){$("#pageContainer").html(html);}});}
$(document).ready(function(){$('#featured').orbit({animation:'fade',animationSpeed:2000,advanceSpeed:10000,afterSlideChange:function(){}});$("#f_netluckPlay").click(function(){flashPlayerPlay("Net Luck Soaring","NetLuckSoaring-KUReading.mp3");});$("#f_evenetHorizonPlay").click(function(){flashPlayerPlay("Event Horizon (MIDI)","Event Horizon.Joni Greene.mp3");});$("#f_circianPlay").click(function(){flashPlayerPlay("Circean Waters","Circean%20Waters%20Kansas%20University%20Wind%20Ensemble.mp3");});$("#f_moonscapePlay").click(function(){flashPlayerPlay("Moonscape Awakening (10/14/08)","MoonscapeAwakening_IUConcertBand.mp3");});$("#f_moonscapeRevisedPlay").click(function(){flashPlayerPlay("Moonscape Awakening <i>(revised)</i> (9/20/09)","MoonscapeAwakening_MM.mp3");});$.history.init(pageload);$('a[href='+ document.location.hash+']').addClass('selected');$('a[rel=ajax]').click(function(){var hash=this.href;hash=hash.replace(/^.*#/,'');$.history.load(hash);$('a[rel=ajax]').removeClass('selected');$(this).addClass('selected');pageload(hash);return false;});});
