

/* Create the porject controller class and initiate the projects */

var projectController = new ProjectController();

// Residential Projects
projectController.addProject('residential', 'rubin', 'Rubin Residence', '<p>In this remodel, we did a complete exterior and extensive interior renovation to a dated Clyde Hill home.  Both the architect and BH Contracting Services Inc. felt the home was worth renovating versus tearing down.</p><p>Architect: Debbie Cleary of Cleary Design Studio<br>Designer: same</p>',
[
	[22, "Before"],
	[3, "Renovated the front of the home creating a welcoming entrance with cultured stone"],
	[4, "Custom handcrafted railing"],
	[1, "Second story loft that the homeowners refer to as the “Moon Room”"],
	[23, "Before"],
	[5, "New slate entry and covered porch"],
	[21, "Interior entry with matching slate"],
	[24, "Before"],
	[14, "Renovated a master bathroom installing marble tile, heated floor, and a Japanese soaking tub"],
	[19, "Custom vanity with matching mirror and medicine cabinet"],
	[17, "Custom Japanese soaking tub along side a shower"],
	[18, "Marble tile"],
	[16, "Custom built-in shower niches"],
	[25, "Before"],
	[9, "Custom handcrafted stairs, shelves, and railing built to access the new loft"],
	[10, "”Moon Room” Custom 12x16 skylight with remote blinds"],
	[13, "Installed a cork floor to flow with the natural wood trim"],
	[6, "Custom built-in coat storage and bench"],
	[7, "Built-in storage with a roll-away feature"]
]
);
projectController.addProject('residential', 'williams', 'Williams Residence', '<p>In this remodel, we did a complete exterior and interior renovation to a Bridle Trails home.  Together with designer Diana Cutler, we created a traditional colonial design with contemporary accents.</p><p>Interior designer: Diana Cutler of D.C. Designs</p>',
[
	[24, "Kitchen with traditional Colonial design and contemporary accents, including custom tile, butcher block, and granite countertops"],
	[2, "Built-in sub zero refrigerator, freezer, and wine chiller"],
	[4, "Tile accents with a chef range hood and stove"],
	[5, "Custom butcher block"],
	[7, "Exotic hardwoods throughout the house, chair rail cap, and Wainscoting with raised panel detail"],
	[8, "Custom vertical VG grain panels with raised panel detail"],
	[11, "Hand-stained millwork and VG grain panels to enhance the natural wood grain"],
	[14, "New hand rail and stair system"],
	[20, "Custom handrail to match Colonial style home"],
	[15, "Master bath renovation creating more usable space, two vanities, and a shower large enough for two"],
	[17, "Free standing cast iron tub"],
	[25, "Built a small addition off the kitchen to create a formal dining area, with the roof serving as a master suite balcony"],
	[28, "New entry with blue flag stone stairs and including a new deck"]
]
);
projectController.addProject('residential', 'smith', 'Smith Residence', '<p>In this remodel, we took a 1970s split level and transformed the exterior and interior into a traditional Northwest design.  We removed the split level feature and created two separate staircases for the new loft area and the entrance to the home.  We turned the existing garage into an entertainment space and built a separate unattached garage.</p>',
[
	[19, "Before demolition and future site for garage"],
	[18, "View of the new garage and loft addition"],
	[1, "New asphalt driveway with custom hand stamped stained concrete walkway"],
	[4, "Front view of the new timber framed garage"],
	[5, "Stamped concrete walkway"],
	[16, "Custom, handcrafted, timber framed deck"],
	[6, "Renovated hallway leading to the new stairwell and basement"],
	[10, "New open timber master suite with stairwell leading to the new loft"],
	[11, "Handmade timber framed stairs"]
]
);
projectController.addProject('residential', 'johanson', 'Johanson Residence', '<p>In this remodel, we completed an entire kitchen renovation, removing walls that separated the kitchen from the dining and living room.  We wanted to create an open enlarged space that was inviting and useful for entertaining.  We also added a small addition to the kitchen to increase the total square footage.</p><p>Architect: Debbie Cleary of Cleary Design Studio</p>',
[
  [10, "Removed walls to the living room and dining room to create an open environment"],
	[1, "Removed a sunken living room and installed hardwoods throughout the home"],
	[5, "Island provides a casual eating area"],
	[11, "Built a dividing wall that included a pantry and work space"],
	[22, "Complete master bath renovation"],
	[24, "Added a French sliding door to allow dual access to the beautiful composite deck."]
]
);
projectController.addProject('residential', 'watson', 'Watson Residence', '<p>In this remodel, we completely renovated the exterior and interior all the way down to the original framing of this 1908 Queen Anne home.  In our reconstruction process, we used an original photo of the home to bring it back to the look of the original era.  On the interior of the home, we kept the original feel of the home while adding modern conveniences.</p>',
[
  [12, "Gas fireplace insert"],
	[1, "VG fir hardwoods and Craftsman style millwork"],
	[2, "Granite tile countertops with custom cabinets"],
	[4, "Created an additional entryway into the kitchen"],
	[5, "Converted a back porch into a powder room"],
	[6, "Resurfaced the original 1908 cast iron bathtub"],
	[8, "Walk-in two person shower with built-in niches and bench"],
	[9, ""]
]
);

projectController.addProject('residential', 'mcdonald', 'McDonald Residence', '<p>In this remodel, we renovated the entire main floor and daylight basement. On the main floor we removed the flat ceilings to build an open cathedral ceiling. Removing walls and putting in a stone fireplace as the living room\'s focal point, created an inviting Northwest design. </p>',
[
	[52, "Before, with demo of old kitchen completed"],
	[53, "After"],
	[51, "Before, with demo of old Living room completed"],
	[54, "After, Living room "],
	[55, "After, Dining room "],
	[56, "New windows and patio doors"]
]
);


projectController.addProject('residential', 'cudd', 'Cudd Residence', '<p>In this remodel, we renovated a full master bedroom suite including enlarging the bathroom into the garage to create room for a two person shower and vanity.  We completely relocated the kitchen to create an open space with increased functionality. </p><p>Interior Designer: Colleen Wiley of Interior Moods</p>',
[
	[53, "Before"],
	[54, "Before"],
	[56, "After, Removal of built in cabinet wall to create a large kitchen and dining area"],
	[55, "Before"],
	[57, "After, Removed wood stove and replaced patio door with a new kitchen sink window"],
	[58, "After, As an option client selected to add cabinet door fronts to their refrigerator and dishwasher to match their kitchen cabinets"],
	[51, "Before"],
	[61, "After, Removed interior walls and raised the ceiling to create more useable space for a master bathroom"],
	[59, "After, Moved the existing bathroom wall into the garage to create a two person shower"],
	[52, "Before"],
	[60, "After, Reconfigured the existing hall closet and interior walls in order to build a two person vanity and sink area together with a linen closet. "]

]
);

projectController.addProject('residential', 'schiff', 'Schiff Residence', '<p>In this remodel, we built a large maintenance free deck and a covered area for summer entertaining and barbeques. We redesigned the back yard, including tiered rockeries, flower beds, concrete steps, and patios.</p><p>Designer for patios and rockeries: BH Contracting Services, Inc.</p>',
[
	[57, "Before"],
	[52, "After, Removed existing sunroom and built a dual entry deck and covered entertaining space"],
	[60, "Before"],
	[56, "After, Created a new dry useable space under the new deck"],
	[59, "Before"],
	[53, "After, Installed EverGrain composite decking and railing for a maintenance free deck"],
	[55, "After, Added electrical for accent lighting and finished with a cedar soffit"],
	[61, "Before"],
	[51, "After, Added aggregate concrete steps to tie the new deck to the rockeries"],
	[58, "Before"],
	[54, "After, Removed all railroad ties. Added Index granite retaining walls to create flower beds and garden area."]
]
);





// Project types
projectController.addProject('genre', 'kitchen', 'Kitchen Remodels', '',
[
	[33, ""],
	[11, "Complete kitchen remodel"],
	[12, "Granite tile countertops and glass tile backsplash"],
	[34, ""],
	[18, "Before"],
	[19, "Before"],
	[1, "New hardwood flooring, granite countertops, and tile backsplash"],
	[26, "Before"],
	[27, "Removed wall to create an open kitchen and dining room"],
	[35, ""],
	[5, "Removed a wall to enlarge the original kitchen space"],
	[9, "Custom granite countertops, tile backsplash, and under cabinet lighting"],
	[36, ""],
	[13, "Custom backsplash and granite countertops"],
	[14, "Relocated cook top to the island to create a more efficient kitchen"],
	[15, "Installed 12x24 inch floor tiles"],
	[16, "Custom pantries in VG fir"],
	[17, "Hide-able custom work center"],
	[37, ""],
	[20, "Before"],
	[28, "Farm house sink and custom country style cabinets"],
	[29, "Relocated appliances to create a more efficient kitchen"],
	[31, "Custom hand painted tile"],
	[32, "Full tile backsplash"],
	[38, ""],
	[21, "Removed wall to create additional space"],
	[22, "Custom designed lighting"],
	[39, ""],
	[23, "Before"],
	[24, "Custom maple cabinets"],
	[25, "Countertops made from recycled milk cartons"],

	// Stephens
	[100, ""],
	[60, "Before"],
	[55, "After"],
	[54, "Removed flat ceilings to create vaulted ceilings"],
	[56, "Opened up the kitchen by removing dividing walls and building a center island"],

	// Giamona
	[101, ""],
	[53, "Before"],
	[57, "After"],
	[51, "Before"],
	[58, "After"],
	[52, "Before"],
	[59, "After"]
]
);
projectController.addProject('genre', 'bathroom', 'Bath Remodels', '',
[
	[23, ""],
	[4, "New vanity and tile countertops"],
	[22, "Enlarged existing shower and turned it into a two person shower"],
	[24, ""],
	[6, "Era restoration to a Queen Anne bathroom"],
	[7, "Added an additional sink and created a larger shower"],
	[25, ""],
	[12, "New vanity with linen tower for additional storage"],
	[26, ""],
	[13, "Complete bathroom remodel to include limestone tile throughout"],
	[27, ""],
	[15, "Classic 6x6 ceramic tile with a color glass accent"],
	[28, ""],
	[16, "New powder room vanity with a vessel sink"],
	[18, "Custom frameless shower door"],
	[19, "Granite countertops with undermount sinks"],
	[21, "Installed a heat mat underneath the tile floor"],
	[20, "Created a seascape for a kids bathroom"],

	// Rogers
	[100, ""],
	[52, "Complete master bath remodel"],
	[51, "Heated tile floor"],
	[53, "Custom glass block shower installation"],
	[54, "Glass block shower"]
]
);
projectController.addProject('genre', 'tile', 'Custom Tiles', '',
[
	[1, "Installed tile in multi-directional pattern to create interest"],
	[3, "Custom designed inlay to add detail to a shower"],
	[5, "Used multiple colors and shapes to create an interesting accent liner"],
	[6, "Custom tile mantel and hearth"],
	[7, "Installed 4x4 multi-colored tile with a hand etched mural"],
	[8, "Installed hand painted tile behind a cook top"],
	[9, "Created a custom tile bench"],
	[14, "(Before picture) Used nonorganic tile backer called Wedi, which is approved by The Tile Council of America."],
	[10, "(After picture)"],
	[11, "Glass tile with a custom niche"],
	[12, "Custom mosaic backsplash"],
	[13, "Custom designed inlay to add detail to a shower"],
	[54, "Frameless glass shower door with custom ceramic tile"],
	[53, "Custom shower niches"],
	[52, "Custom mantle and tile"],
	[51, " Accent tile"]
]
);
projectController.addProject('genre', 'additions', 'Small and Large Additions', '<h3>Wiley</h3><p>In this remodel, we had many issues to resolve such as lot size restrictions, set-back issues, and building height restrictions.  We improvised by raising the house and excavating underneath to create eight foot tall ceilings in a new basement.  We also added onto the back of the house to take advantage of the Puget Sound view.</p><h3>Wilson</h3><p>In this remodel, the homeowners did not want to lose any yard space in creating additional livable space.  Due to this fact, we kept the existing foundation footprint and created a second story addition which added 1,600 additional square feet.</p><p>Architect: Debbi Cleary of Cleary Design Studio</p><h3>Hyatt</h3><p>In this remodel, we did an extension of the second story to create a playroom for the kids and an oasis for the parents in their new master suite.  We also built a breathtaking entry to be used for summer and winter barbecuing.</p>',
[
	[28, ""],
	[1, "Before"],
	[2, "After"],
	[3, "Before"],
	[4, "After"],
	[5, "During"],
	[6, "During"],
	[7, "After"],
	[8, "After"],
	[9, "After"],
	[27, ""],
	[11, "Before"],
	[32, "During"],
	[33, "During"],
	[12, "After"],
	[13, "After"],
	[20, ""],
	[21, ""],
	[22, ""],
	[23, ""],
	[24, ""],
	[25, ""],
	[26, ""],
	[29, ""],
	[30, "Before"],
	[31, "After"],
	[16, ""],
	[17, ""],
	[18, ""],
	[19, ""]
]
);
projectController.addProject('genre', 'outside_structures', 'Outdoor Structures', '',
[
  [10, ""],
	[1, "Built a sloped deck understructure to allow for water run-off. & constructed a level deck made of composite material to go over the top."],
	[2, "Custom glass and aluminum post railing system"],
	[3, "Composite deck material with estate style railing"],
	[4, "Finished deck with slate and a custom railing"],
	[5, "Completed handrail with a polished brass patina"],
	[6, "Used large custom pillars to create a symmetrical border for the entry"],
	[7, "Timber framed deck"],
	[8, "Created a custom curved walkway"],
	[12, "Built multi-tiered sections to give the deck more dimension"],
	[13, "Estate style railing system"],
	[15, "Decks exceed all local seismic code requirements"],
	[14, "Built long gradual steps to create visual interest"],
	[16, "Custom privacy screen"],
	[29, "Built-in benches"],
	[30, "Easy access stairs"],
	[31, "Built a covered section of the deck for year round barbequing"],
	[11, ""],
	[17, "Rebuilt the front entry and added a covered area"],
	[40, "Relocated the stairs and installed a new handrail"],
	[35, "Added flute details to match the existing structural posts of the home"],
	[39, "Before"],
	[36, "Converted a front porch into an enclosed sunroom"],
	[38, "Wrapped all exposed wood in metal to create a maintenance free exterior"],
	[37, "Composite deck with estate style railing"],
	[18, ""],
	[19, "Built this structure using reclaimed timber to create a private getaway in the homeowner’s backyard"],
	[20, "Used barn door tracks for easy access to adjoining rooms"],
	[21, "Designed the windows to view the Madrona trees behind the new building"],
	[32, "Built this outdoor shed to flow with the house design"],
	[24, "Built a covered outdoor kitchen with food preparation sink, accent lighting, wine refrigerator, and gas fireplace.  "],
	[22, "Custom slate countertop and backsplash"],
	[23, "Installed an outdoor gas fire place with slate tile"],
	[25, "Covered all exposed wood with a on the cabinets with slate and a high moisture rated epoxy sealer"],
	[26, "Installed tinted glass panels on the roof to create an open feeling"],
	[27, "Brought power to the structure to create ambience"]
]
);
projectController.addProject('genre', 'small_projects', 'Small Projects', '',
[
  [14, "Before"],
	[1, "New laundry room"],
	[3, "Custom Cedar garage door"],
	[4, "Hand crafted staircase that includes built-in cubbies with lighting"],
	[5, "Custom built-in shelves, drawers, mantle with natural stone tile"],
	[7, "Installed a gas log burning insert"],
	[12, "Before"],
	[8, "Installed a new entry door along with opening windows"],
	[9, "Refinished existing mantle and installed slate tile with a new gas insert"],
	[10, "New handrail, balusters, and newels"],
	[11, "Granite countertop, vessel sink, and vanity"],
	[13, "Installed new windows throughout the house"],
	[15, "New media room"],
	[16, "Exotic hand distressed hardwood flooring"],
	[51, "Excavating for an Egress Window"],
	[52, "Interior of Egress Window"],
	[58, "Exterior of Egress Window"],
	[55, "New asphalt driveway"],
	[56, "New stamped concrete walkway"],
	[57, "Stamp pattern - Olde English with pewter & autumn brown"],
	[54, "Canyon Creek cabinetry & cork flooring"],
	[53, "Custom Built-in wall drawers"]


]
);


projectController.addProject('genre', 'attics_basements', 'Attics and Basements', '<h3>Fagan</h3><p>In this remodel, we created an additional floor of finished space, by claiming unusable attic space. We designed a bedroom and a master bedroom together with a shared bathroom. Additionally, we carried the existing style of the home into the newly created space.</p><h3>Milks</h3><p>In this remodel, we renovated an unfinished basement to create a family room, laundry room, bathroom, and storage room. We installed radiant heat below the new concrete floor, which we stained to create a unique look. Additionally, we preformed a Seismic Retrofit on the basement and retained several of the early 1900 features of the home including the original fireplace and Chimney. </p>',
[
	// Fagan
	[100, ""],
	[51, "Added Brazilian cherry hardwoods, 2 skylights, and a built in bookshelf"],
	[54, "Built in dresser. The built in furniture selected in this remodel, allowed the homeowners to make the most of the new useable space"],
	[52, "Created a new bathroom in the attic"],
	[53, "New tile shower and plumbing"],
	[55, ""],
	[56, "Removed a wall to create an open office and bring Craftsman style to the space"],

	// Milks
	[101, ""],
	[2, "Before"],
	[8, "After"],
	[1, "Before"],
	[3, "After"],
	[7, "Custom in-wall bookshelf doubles as a laundry chute on the opposing side"],
	[4, "Bathroom laundry room combo with custom glass block shower and granite counter tops "],
	[5, "Adjustable shower arm and body sprayer shower features"],
	[6, ""],
	[9, "Boiler and radiant heat system that we installed in the basement and main floor of the home "]

]
);




/* ---------------------------[ Classes ]---------------------------- */

/* ProjectController class */

function ProjectController() {

	this.projects = new Array();
	this.projects['residential'] = new Array();
	this.projects['genre'] = new Array();

	this.current_project = new Array();

	// Add Project
	this.addProject = function(type, name, view_name, description, photos) {
		this.projects[type][name] = new Project(type, name, view_name, description, photos);
	}

	// Print out the nav bar
	this.init_navbar = function( id ) {

		var html = '';

		html =  '<h2 class="first">Projects</h2>';
		html += this.get_navbar_group_str( 'residential' );
		html += '<h2>Project Gallery</h2>';
		html += this.get_navbar_group_str( 'genre' );

		$(id).html( html );
	}

	// Generate HTML for the nav bar
	this.get_navbar_group_str = function( type ) {
		var html = '';

		html = '<ul class="ul2">';
		for( key in this.projects[type] ) {
			html += '<li id="' + type + '_' + this.projects[type][key].name + '"><a href="portfolio.html?type=' + type + '&name=' + this.projects[type][key].name + '">' + this.projects[type][key].view_name + '</a></li>';
		}
		html += '</ul>';

		return html;
	}

	// Set the current project
	this.set_project = function( type, name ) {
		this.current_project = this.projects[type][name];

		// select the item in the nav bar
		var handle = $('#' + type + '_' + name);
		var text = handle.find('a').html();

		handle.html( text );
		handle.addClass( 'selected' );
	}

	this.fill_in_name = function( id ) {
		$(id).html( this.current_project.view_name );
	}

	this.fill_in_description = function( id ) {
		if( this.current_project.description != '' ) {
			$(id).html( this.current_project.description );
		} else {
			$(id).prev().remove();
		}
	}

	this.fill_in_photos = function( id ) {
		var html = '';

		for( key in this.current_project.photos ) {
			html += '<div class="image1"><a href="images/projects/' + this.current_project.type + '/' + this.current_project.name + '/' + this.current_project.photos[key][0] + '_large.jpg" title="' + this.current_project.photos[key][1] + '"><img src="images/projects/' + this.current_project.type + '/' + this.current_project.name + '/' + this.current_project.photos[key][0] + '_thumb.jpg"></a></div>';
		}

		$(id).html(html);
	}
}



/* Project Class */

function Project( type, name, view_name, description, photos ) {
	this.type = type;
	this.name = name;
	this.view_name = view_name;
	this.description = description;
	this.photos = photos;
}

