function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function pause(milliseconds) {
	var dt = new Date();
	while ((new Date()) - dt <= milliseconds) { /* Do nothing */ }
}

jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}

$.preloadImages("images/Screenshot/Main.jpg", "images/Screenshots/U92.jpg", "images/Screenshots/DAReader.jpg", "images/Screenshots/Library.jpg", "images/Screenshots/Emergency.jpg", "images/Screenshots/Buses.jpg", "images/Screenshots/Buildings.jpg", "images/Screenshots/Football.jpg", "images/Screenshots/Dining.jpg", "images/Screenshots/PRT.jpg", "images/Screenshots/Mobi.jpg", "images/Screenshots/Twitter.jpg", "images/Screenshots/Directory.jpg");

function mainDetails(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshot/Main.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("Chose an icon from the features on the left to learn more. iWVU is not affiliated with or endorsed by West Virginia University. Compatible with both iPhone and iPod Touch, iWVU will be a free application. It is the pefect tool for: <ul><li>Students</li><li>Faculty</li><li>Visitors</li><li>Parents</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("U92 Live");
		$("h1.featureTitle").fadeIn("slow");
  	});
	
}

function U92(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/U92.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("Stream U92 Live to your iPhone or iPod Touch. iWVU will even determine the optimal network settings to ensure you always get the best sound quality.<ul><li>Listen Live</li><li>Make a Request</li><li>Contact Informaion</li><li>Website Links</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("U92 Live");
		$("h1.featureTitle").fadeIn("slow");
  	});
}


function DA(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/DAReader.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("With the new integrated DA Reader you can read the latest WVU news right from your iPhone or iPod Touch.<ul><li>Full Print Format</li><li>Read every page and every story<li>Pinch to zoom</li><li>Browse the archives</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("DA Reader");
		$("h1.featureTitle").fadeIn("slow");
  	});
}

function Library(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Library.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("All the information you need about WVU Libraries in one place. The perfect companion for one of the best college libraries in the country.<ul><li>Up-to-date Library Hours</li><li>Ask A Librarian</li><li>Librarian Phone Numbers</li><li>Book Search</li><li>Eliza's Information</li> </ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("WVU Libraries");
		$("h1.featureTitle").fadeIn("slow");
  	});
}

function Emergency(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Emergency.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("iWVU includes contact infomation for many of Morgantown's Emergency Services, including:<ul><li> Morgantown Police</li><li> WVU Police</li><li>Area hospitals</li><li>Student Health</li><li>Morgnatown Fire Department</li><li>Allegheny Energy</li><li>Poison Control</li><li>Miscellaneous numbers</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("Emergency Services");
		$("h1.featureTitle").fadeIn("slow");
  	});
}

function Buses(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Buses.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("Mountain Line bus information with you wherever you go. With iWVU and Mountain Line buses, you can always be sure you are taking the fastest route possible and that you are never left wonderig where your bus is.<ul><li> Bus Late Status</li><li>Route Planning through Google Maps</li><li>Route Information and Maps</li><li>Mountain Line Contact Information</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("Mountain Line Buses");
		$("h1.featureTitle").fadeIn("slow");
  	});
	
}


function Buildings(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Buildings.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("The interactive campus map can show you the location of any building on campus. Either pick a building from the list or choose all building. Either way, the intuitive Google Maps interface will show you exactly what you are looking for.<ul><li>All WVU Buildings</li><li>A-GPS Location puts you in the map</li><li>Find the name of a building by location</li><li>Satelite, Map, or Hybrid View customizes the map to fit your needs</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("Building Finder");
		$("h1.featureTitle").fadeIn("slow");
  	});
}

function Football(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Football.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("Never be the last one to know important Football information. iWVU has all the information a WVU football fan could want.<ul><li>2009 Schedule</li><li>Link to Team Website</li><li>Bill Stewart's Twitter Feed</li><li>Team Roster</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("WVU Football");
		$("h1.featureTitle").fadeIn("slow");
  	});
	
}

function Dining(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Dining.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("Getting on-campus-dining information just got a lot easier. With iWVU you will always know what time a dining location is open and what your payment options are.<ul><li>All WVU Dining Services Locations</li><li>Normal Operating Hours</li><li>Accepted Forms of Payment</li><li>Links to menus for dining halls</li><li>Location of dining establishments</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("On-campus Dining");
		$("h1.featureTitle").fadeIn("slow");
  	});
}

function PRT(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/PRT.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("The PRTs is one of the most unique features of WVU. iWVU provides you with all the PRT information you need:<ul><li>PRT Platform Locations</li><li>Normal Operating Hours</li><li>PRT Maintenance Phone Number</li><li>PRT Website Link</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("PRT");
		$("h1.featureTitle").fadeIn("slow");
  	});
}

function Mobi(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Mobi.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("WVU Mobile Web is an iPhone optimized version of WVU.edu. With WVU Mobile web you can <ul><li>Search the directory</li><li>View WVU Youtube Videos</li><li>View the campus calendar</li><li>and much more...</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("WVU Mobile Web");
		$("h1.featureTitle").fadeIn("slow");
  	});
}

function Twitter(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Twitter.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("With the built in Twitter client you can follow WVU colleges, coaches, administration, student organizations, athletics, and much more.<ul><li>Message style similar to built-in SMS app</li><li>Follow URLs with the integrated web browser</li><li>No Twitter account required</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("WVU on Twitter");
		$("h1.featureTitle").fadeIn("slow");
  	});
}

function Directory(){
	$("img.iPhoneScreen").fadeOut("slow",function() {
		$("img.iPhoneScreen").attr("src", "images/Screenshots/Directory.jpg");
		$("img.iPhoneScreen").fadeIn("slow");
  	});
	
	$("h2.featureDescription").fadeOut("slow",function() {
		$("h2.featureDescription").html("Finding contact information for a friend, teacher, or colleague couldn't be easier. When accessing a WVU Wi-Fi network, simply enter the contacts name and hit search.<ul><li>Sort by student or faculty</li><li>Import contacts directly to your address book</li><li>Merge new details with an existing contact</li><li>Call, email, or get directions to a contact</li></ul>");
		$("h2.featureDescription").fadeIn("slow");
  	});
	  
	$("h1.featureTitle").fadeOut("slow",function() {
		$("h1.featureTitle").html("WVU Directory Search");
		$("h1.featureTitle").fadeIn("slow");
  	});
}
