// JavaScript Document
function portfolio()
{
	this.projectId = null;
	
	this.projects = Array(
		{	
			"title": "Baptism Invitation", 
			"description": "Darling invitation for a sweet boy's baptism featuring a quintessential blue and brown color palette.", 
			"thumb": "/images/portfolio/thumbs/AndrewsBaptism.jpg", 
			"image": [
				{"title": "Invitation", "url": "/images/portfolio/images/AndrewsBaptism.jpg"}
			]
		},
		{	
			"title": "Attachmate President's Club", 
			"description": "A tropical incentive event held on Paradise Island, Bahamas featuring a sunken treasure pirate theme.", 
			"thumb": "/images/portfolio/thumbs/Attachmate.jpg",
			"image": [
				{"title": "Invitation", "url": "/images/portfolio/images/Attachmate_1.jpg"},
				{"title": "Event Signage", "url": "/images/portfolio/images/Attachmate_2.jpg"}
			]
		},
		{	
			"title": "Microsoft Channel Appreciation Conference 2005", 
			"description": "A high level partner event held in Napa, CA. featuring a fall wine theme.", 
			"thumb": "/images/portfolio/thumbs/CAC05.jpg",
			"image": [
				{"title": "Event Logo", "url": "/images/portfolio/images/CAC05_1.jpg"},
				{"title": "Custom Name Badges", "url": "/images/portfolio/images/CAC05_2.jpg"},
				{"title": "Conference Guide Cover", "url": "/images/portfolio/images/CAC05_3.jpg"}
			]
		},
		{	
			"title": "Microsoft Channel Appreciation Conference 2007", 
			"description": "Look and Feel concept for a high end partner event taking place at the breathtaking Bacara Resort in Santa Barbara, CA.", 
			"thumb": "/images/portfolio/thumbs/CAC07.jpg",
			"image": [
				{"title": "Event Logo", "url": "/images/portfolio/images/CAC07_1.jpg"}
			]
		},
		{	
			"title": "Microsoft Channel Partner Summit 2007", 
			"description": "A premier partner event held at the Biltmore Resort in Phoenix, AZ featuring a classic Southwest feeling with a touch of the resort's Frank Lloyd Wright style.", 
			"thumb": "/images/portfolio/thumbs/CPS07.jpg",
			"image": [
				{"title": "Event Logo", "url": "/images/portfolio/images/CPS07_1.jpg"},
				{"title": "Water Bottle Label", "url": "/images/portfolio/images/CPS07_2.jpg"},
				{"title": "Game Card", "url": "/images/portfolio/images/CPS07_3.jpg"}
			]
		},
		{	
			"title": "CRG Events", 
			"description": "A redesign of CRG Event's logo and marketing materials featuring a fresh clean vibe.", 
			"thumb": "/images/portfolio/thumbs/CRG.jpg",
			"image": [
				{"title": "Corporate Logo", "url": "/images/portfolio/images/CRG_1.jpg"},
				{"title": "Crew Jacket", "url": "/images/portfolio/images/CRG_2.jpg"},
				{"title": "Sign", "url": "/images/portfolio/images/CRG_3.jpg"}
			]
		},
		{	
			"title": "Microsoft Delta Force", 
			"description": "Logo concepts for an adventurous internal team at Microsoft featuring a classic military feel.", 
			"thumb": "/images/portfolio/thumbs/DeltaForce.jpg",
			"image": [
				{"title": "Logo 1", "url": "/images/portfolio/images/DeltaForce_1.jpg"},
				{"title": "Logo 2", "url": "/images/portfolio/images/DeltaForce_2.jpg"},
				{"title": "Logo 3", "url": "/images/portfolio/images/DeltaForce_3.jpg"}
			]
		},
		{	
			"title": "Halstead Design", 
			"description": "Local interior designer with an eclectic classic style.", 
			"thumb": "/images/portfolio/thumbs/HalsteadDesign.jpg",
			"image": [
				{"title": "Corporate Logo", "url": "/images/portfolio/images/HalsteadDesign_1.jpg"},
				{"title": "Business Card", "url": "/images/portfolio/images/HalsteadDesign_2.jpg"},
				{"title": "Letterheard", "url": "/images/portfolio/images/HalsteadDesign_3.jpg"}
			]
		},
		{	
			"title": "Party at my Crib", 
			"description": "Featuring the theme ''Party at my Crib'' this kitschy birthday party invitation is for a true princess.", 
			"thumb": "/images/portfolio/thumbs/KatesBirthday.jpg",
			"image": [
				{"title": "Invitation Front", "url": "/images/portfolio/images/KatesBirthday_1.jpg"},
				{"title": "Invitation Back", "url": "/images/portfolio/images/KatesBirthday_2.jpg"}
			]
		},
		{	
			"title": "Dinner Party Invitation", 
			"description": "Hand built invitation for a unique upscale dinner party at Pomegranate Restaurant.", 
			"thumb": "/images/portfolio/thumbs/LeasasInvite.jpg",
			"image": [
				{"title": "Invitation Front", "url": "/images/portfolio/images/LeasasInvite_1.jpg"}
			]
		},
		{	
			"title": "MPI Washington State Chapter", 
			"description": "An invitation to MPI's Holiday Gala and Annual Auction featuring the theme \"Feel the 'Presents' of the Season\".", 
			"thumb": "/images/portfolio/thumbs/MPIWinterGala.jpg",
			"image": [
				{"title": "Invitation Front", "url": "/images/portfolio/images/MPIWinterGala_1.jpg"},
				{"title": "Invitation Back", "url": "/images/portfolio/images/MPIWinterGala_2.jpg"}
			]
		},
		{	
			"title": "WaMu Premier Group 2", 
			"description": "A festive incentive event held at the opulent Wynn Resort in Las Vegas, NV.", 
			"thumb": "/images/portfolio/thumbs/PremierGroupII.jpg",
			"image": [
				{"title": "Event Logo", "url": "/images/portfolio/images/PremierGroupII_1.jpg"}
			]
		},
		{	
			"title": "Lasting Impressions for Starbucks", 
			"description": "Concepts for Starbucks Mug Award lapel pins.", 
			"thumb": "/images/portfolio/thumbs/MUGAwards.jpg",
			"image": [
				{"title": "Concept 1", "url": "/images/portfolio/images/MUGAwards_1.jpg"},
				{"title": "Concept 2", "url": "/images/portfolio/images/MUGAwards_2.jpg"},
				{"title": "Concept 3", "url": "/images/portfolio/images/MUGAwards_3.jpg"}
			]
		},
		{	
			"title": "Microsoft Virtual Earth", 
			"description": "An advertisement for an industry publication featuring the benefits of Virtual Earth's Live Maps technology for the real estate market.", 
			"thumb": "/images/portfolio/thumbs/VirtualEarth.jpg",
			"image": [
				{"title": "Magazine Advertisement", "url": "/images/portfolio/images/VirtualEarth_1.jpg"}
			]
		},
		{	
			"title": "Microsoft Windows Live", 
			"description": "Promotional postcard for an event featuring a coupon for a sponsored restaurant event on one side and a Live Map to the location from the event site on the other.", 
			"thumb": "/images/portfolio/thumbs/WindowsLivePromo.jpg",
			"image": [
				{"title": "Postcard Front", "url": "/images/portfolio/images/WindowsLivePromo_1.jpg"},
				{"title": "Postcard Back", "url": "/images/portfolio/images/WindowsLivePromo_2.jpg"}
			]
		},
		{	
			"title": "Birthday Party Invitation", 
			"description": "A festive 3rd birthday invitation with a fun carousel theme.", 
			"thumb": "/images/portfolio/thumbs/Kates3rdInvite.jpg",
			"image": [
				{"title": "Invitation Front", "url": "/images/portfolio/images/Kates3rdInvite_1.jpg"},
				{"title": "Invitation Back", "url": "/images/portfolio/images/Kates3rdInvite_2.jpg"}
			]
		},
		{	
			"title": "MPI Washington State Chapter", 
			"description": "An invitation to MPI's Annual Gala and Auction featuring the theme ''Caliente''.", 
			"thumb": "/images/portfolio/thumbs/MPIAnnualGala07.jpg",
			"image": [
				{"title": "Invitation Front", "url": "/images/portfolio/images/MPIAnnualGala07_2.jpg"},
				{"title": "Invitation Back", "url": "/images/portfolio/images/MPIAnnualGala07_1.jpg"}
			]
		},
		{	
			"title": "Assistance League of the Eastside", 
			"description": "A feminine retro feel invitation for a non profit fundraising fashion show with the theme ''Step into Style''.", 
			"thumb": "/images/portfolio/thumbs/StepIntoStyle08.jpg",
			"image": [
				{"title": "Invitation Front", "url": "/images/portfolio/images/StepIntoStyle08_1.jpg"},
				{"title": "Invitation Spread", "url": "/images/portfolio/images/StepIntoStyle08_2.jpg"},
				{"title": "Invitation Back", "url": "/images/portfolio/images/StepIntoStyle08_3.jpg"}
			]
		},
		{	
			"title": "Blackboard Banner", 
			"description": "A web banner for Blackboard's Global Sponsorship Program.", 
			"thumb": "/images/portfolio/thumbs/GlobalSponsorshipBanner.jpg",
			"image": [
				{"title": "Web Banner", "url": "/images/portfolio/images/GlobalSponsorshipBanner_1.jpg"}
			]
		},
		{	
			"title": "Plan-It Green&trade;", 
			"description": "A logo for CRG Events' initiative ''Plan-It Green&trade;'' which promotes planning ''green'' and eco-friendly events.", 
			"thumb": "/images/portfolio/thumbs/PlanIt_Green.jpg",
			"image": [
				{"title": "Logo", "url": "/images/portfolio/images/PlanIt_Green_1.jpg"}
			]
		},
		{	
			"title": "Queen of Hearts", 
			"description": "A chic and trendy bridal shower invitation with a Queen of Hearts theme.", 
			"thumb": "/images/portfolio/thumbs/QueenofHearts.jpg",
			"image": [
				{"title": "Invitation", "url": "/images/portfolio/images/QueenofHearts_1.jpg"}
			]
		},
		{	
			"title": "Rene Stern, <span style='font-size:10pt;'>Windermere Queen Anne Office</span>", 
			"description": "A gorgeous custom printed tag featuring a favorite quote and invitation to an evening of gratitude. The invitation was presented tied to a vintage house key for a special touch.", 
			"thumb": "/images/portfolio/thumbs/ReneTag.jpg",
			"image": [
				{"title": "Tag Front", "url": "/images/portfolio/images/ReneTag_1.jpg"},
				{"title": "Tag Back", "url": "/images/portfolio/images/ReneTag_2.jpg"}
			]
		},
		{	
			"title": "Orchid Wedding Invitation", 
			"description": "A simple yet elegant Pan-Asian themed wedding invitation.", 
			"thumb": "/images/portfolio/thumbs/CohenOwens.jpg",
			"image": [
				{"title": "Invitation", "url": "/images/portfolio/images/CohenOwens_1.jpg"},
				{"title": "Directions Card", "url": "/images/portfolio/images/CohenOwens_2.jpg"},
				{"title": "RSVP Card", "url": "/images/portfolio/images/CohenOwens_3.jpg"}
			]
		}
	);
	
	this.getProject = function(p)
	{
		var imageString = new String();
		
		//loop through images
		for(i = 0; i < this.projects[p].image.length; i++)
		{
			imageString += '<button onclick="p.setImage(\'' + this.projects[p].image[i].url + '\');">' + this.projects[p].image[i].title + '</button>';
		}
		
		//turn on active item in the table
		if(document.getElementById('portfolioItem' + p))
		{
			document.getElementById('portfolioItem' + p).className = "active";
		}
		
		//turn off old active item in the table
		if(document.getElementById('portfolioItem' + this.projectId))
		{
			document.getElementById('portfolioItem' + this.projectId).className = null;
		}
		
		//modify old projectId
		document.getElementById("projectTitle").innerHTML = this.projects[p].title;
		document.getElementById("projectDescription").innerHTML = this.projects[p].description;
		document.getElementById("projectImages").innerHTML = imageString;
		
		this.setImage(this.projects[p].image[0].url);
		
		this.projectId = p;
	};
	
	this.drawTable = function()
	{
		var table = new String();
		
		for(i = 0; i < this.projects.length; i++)
		{
			table += '<a id="portfolioItem' + i + '" href="javascript: p.getProject(' + i + ');"><img src="' + this.projects[i].thumb + '" /></a>';
		}
		
		document.write(table);
	};
	
	this.setImage = function(url)
	{
		document.getElementById("projectImage").style.background = 'url(' + url + ') no-repeat 50% 50% #fff';	
	};
	
	this.getHd = function()
	{
		var hdurl = document.getElementById("projectImage").style.backgroundImage;
		
		//clean up
		hdurl = hdurl.replace(")", "");
		hdurl = hdurl.replace("url(/images/portfolio/images/", "/images/portfolio/imagesHD/");
		hdurl = hdurl.replace("url(http://www.suite7creative.com/images/portfolio/images/", "/images/portfolio/imagesHD/");		
					
		//alert(hdurl);
		window.open(hdurl);
	};
}



