// Titles
var PALMPRE_TITLE = 'Palm Pre';
var JAVAFX_TITLE = 'JavaFX';
var WIDGET_TITLE = 'Android Widget';

// Text
var PALMPRE_TEXT = '<p>The latest player in the smartphone battle, Palm\'s Pre features a sleek web-based UI and the ability to have multiple applications running simultaneously.</p><p>AccuWeather\'s contribution to the Pre is a feature-rich application that provides users with meaningful and detailed weather information at a glance.</p>';

var JAVAFX_TEXT = '<p>JavaFX is an expressive client platform for creating and delivering rich Internet experiences across all screens of your life.</p><p>The AccuWeather JavaFX widget features minimal UI to enhance the user\'s experience and minimize clutter on the desktop.</p>';

var WIDGET_TEXT = '<p>Google\'s Android team recently added the homescreen widget feature to their SDK.  These small applications allow users to access a wealth of information without leaving their homescreens.</p><p>The AccuWeather Android widget provides users with current condition and forecast data, as well as NOAA weather alerts.</p>';


function initializePortfolio() {


	$('#palmpre_select').click(function(event){
		$('#portfolio_title').html(PALMPRE_TITLE);
		$('#portfolio_text').html(PALMPRE_TEXT);
	});
	
	$('#javafx_select').click(function(event){
		$('#portfolio_title').html(JAVAFX_TITLE);
		$('#portfolio_text').html(JAVAFX_TEXT);
	});
	
	$('#widget_select').click(function(event){
		$('#portfolio_title').html(WIDGET_TITLE);
		$('#portfolio_text').html(WIDGET_TEXT);
	});
	
	var lastSelected = $('#palmpre_select > .portfolio_item');
	$('.portfolio_item').click(function(event){
		
		$(lastSelected).removeClass('portfolio_item_selected');
		lastSelected = $(this);
		
		var dir = $(this).attr('mdir');
		var num = $(this).attr('mnum');
		$(this).addClass('portfolio_item_selected');
		$('#portfolio_image > img').attr('src', 'images/' + dir + '/screen' + num + '.jpg');
	});
		
}
