// image zoom
$("#content div.product div.header p.enlarge a")
	.click( function() {
		imageMgr.zoom();
	})



// toggle key features
$("#content ul.features")
	.find("a.toggle")
		.click( function(){
			
			$(this)
				.parents("li")
					.toggleClass('closed')
		
		});
		
		
/*
 @ Functions for view options
 */
$("#viewoptions")
	.find("ul.tabs a")
		.click( function(){
			
			// find immediate parent and take off 
			var parent = $(this).parents("li");
			
			// only proceed if parent has inactive class
			if (parent.attr('class').indexOf('inactive') != -1) {
			
				// get content id
				var contentID = parent.attr('content');
				
				// remove inactive class
				parent.removeClass('inactive');
				
				// add to sibling
				parent.siblings('li').addClass('inactive');
				
				$("#viewoptions div.content div[id=" + contentID + "]")
					.show()
					.siblings("div[id!=" + contentID + "]")
						.hide()
				
			}
			
		})
	.end()
	.find("div.content div a")
		.click( function() {
			
			if ($(this).attr('class') != 'current') {
			
				// remove the 'current' class from the active one and place on this one
				$(this).parents('div.content').find('a.current').removeClass('current');
				$(this).addClass('current');
				
				// load image, passing along <a> link
				imageMgr.load( $(this) );
			
			};
			
		})
		