	var $j = jQuery.noConflict();
	
	$j(document).ready(function() {
				$j(".accordion-content").each(function() {
					  $j(this).hide();
				});
				$j(".accordion-sub-content").each(function() {
					  $j(this).hide();
				});
				
				
				// Capture .accordion-bar clicks
				$j(".accordion-bar").click(function() {
					  //reference selected panel content
					  var thePanel = $j(this).parent().find(".accordion-content");
					  var theBar = $j(this);
					  var sectionTitle = $j(this).children().html().toLowerCase();
					  
					  //hide deselected panels
					  $j(".accordion-content").each(function(){
									$j(this).hide("slow");
									$j(".accordion-bar").attr("id", '');
									$j(".accordion-sub-bar").attr("id",'');
									});
				
				//show selected panel
				if ($j(thePanel).is(':visible')) {
					  $j(thePanel).hide("slow");
					  $j(theBar).attr("id", '');
					  pageTracker._trackPageview('nav/main/' + sectionTitle + '/close/');
				} else {
					  $j(thePanel).show("slow");
					  $j(".accordion-sub-content").hide("slow");
					  $j(theBar).attr("id", 'selected');
					  pageTracker._trackPageview('nav/main/' + sectionTitle + '/open/');					  
				}
				
				});
				// Capture .accordion-sub-bar clicks
				$j(".accordion-sub-bar").click(function() {
					  //reference selected panel content
					  var theSubPanel = $j(this).parent().find(".accordion-sub-content");
					  var theSubBar = $j(this);
					  var sectionSubTitle = $j(this).html().toLowerCase();
					  var parentSection = $j(this).parent().parent().attr("id");
					  
					  //hide deselected panels
					  $j(".accordion-sub-content").each(function(){
									$j(this).hide("slow");
									$j(".accordion-sub-bar").attr("id",'');
									});
					  //show selected panel
				if ($j(theSubPanel).is(':visible')) {
					  $j(theSubPanel).hide("slow");
					  $j(theSubBar).attr("id", '');
					  pageTracker._trackPageview('/' + parentSection + '/' + sectionSubTitle + '/close/');
				} else {
					  $j(theSubPanel).show("slow");
					  $j(theSubBar).attr("id",'selected');
					  pageTracker._trackPageview('/' + parentSection + '/' + sectionSubTitle + '/open/');

				}
					  });
				
				$j.superbox();
				
			
				
				
				//topNav hiding
				var childArray = $j('#topNav').children();
				$j(childArray).each(function() {
				   $j(this).hide();
				});
				
				//topNav swapping
				$j('#projects-content .accordion-sub-bar').click(function() {
					var self = $j(this).html().toLowerCase();
					var array = $j('#topNav').children();
					
					$j(array).hide();
					$j('#' + self + '-nav').show();
					
				});
				
				//body content swap
				$j('.box').click(function() {
										  var box = $j(this);
										  var selfName = $j(this).attr('name');
										  var selfTitle = $j(this).attr('title');
										  var selfDescription = $j(this).attr('alt');
										  var targetLink = $j('#bodycontent a');
										  var targetImage = $j('#bodycontent img');
										  var targetTitle = $j('#bodycontent .title');
										  var targetDescription = $j('#bodycontent .description');
										  
										  var sectionTitle = $j(this).parent().attr('id');
										  
										
										  //swap content
										  if ( sectionTitle == 'monorail-nav') {
										  		$j(targetLink).attr('href', '_img/hires/' + selfName + '_hires.jpg');
												$j(targetImage).attr('src', '_img/lores/' + selfName + '_lores.jpg');
												$j(targetImage).attr('width','800');
												$j(targetImage).removeAttr('height');
										  } else {
												$j(targetLink).attr('href', '_img/hires/' + selfName + '_hires.jpg');
												$j(targetImage).attr('src', '_img/lores/' + selfName + '_lores.jpg');
												$j(targetImage).attr('height','375');
												$j(targetImage).removeAttr('width');
										  }
										  $j(targetTitle).html(selfTitle);
										  $j(targetDescription).html(selfDescription);
										  pageTracker._trackPageview('/view/' + sectionTitle + '/' + selfTitle + '/');
										 
										 
										  // set the selected item's navigation image to full transparency
										  var img = $j(this).children('img');
										  var imgID = $j(img).attr('id');
										  
										  if ( imgID == 'box-selected') {
											  return false;
										  } else {
											  $j('#box-selected').removeAttr('id');
											  $j(img).attr('id', 'box-selected');
										  }
										  
										  });
				
				var targetLink = $j('#bodycontent a');
				var targetImage = $j('#bodycontent img');
				var targetTitle = $j('#bodycontent .title');
				var targetDescription = $j('#bodycontent .description');
								
				// info section replace body content
						  
				$j('.accordion-section#info-section').click(function() {
										  $j(targetLink).attr('href','_img/hires/iceberg_hires.jpg');
										  $j(targetImage).attr('src', '_img/lores/iceberg_lores.jpg');
										  $j(targetTitle).html('The Divide, (Sydney)')
										  $j(targetDescription).html('Digital C-Print, 2008');
				});
					// DECONSTRUCTION section replace body content
						  
				$j('.accordion-sub-bar').click(function() {
										  
										  var child = $j(this).html();

										  switch(child) {
												case 'Deconstruction':
													  $j(targetLink).attr('href','_img/hires/Deconstruction_5_myrtle_hires.jpg');
													  $j(targetImage).attr('src', '_img/lores/Deconstruction_5_myrtle_lores.jpg');
													  $j(targetTitle).html('Deconstruction #5 (Ft. Greene, Brooklyn)')
													  $j(targetDescription).html('Digital C-Print, 2009');
													  $j(targetImage).attr('height','375');
													  $j(targetImage).removeAttr('width');
													  break;
												
												case 'Elemental' :
													  $j(targetLink).attr('href','_img/hires/Untitled-7_hires.jpg');
													  $j(targetImage).attr('src', '_img/lores/Untitled-7_lores.jpg');
													  $j(targetTitle).html('Burning Tree')
													  $j(targetDescription).html('Digital C-Print, 2008');
													  $j(targetImage).attr('height','375');
													  $j(targetImage).removeAttr('width');
													  break;
													  
												case 'Monorail' :
													  $j(targetLink).attr('href','_img/hires/Untitled-16-copy_hires.jpg');
													  $j(targetImage).attr('src', '_img/lores/Untitled-16-copy_lores.jpg');
													  $j(targetImage).attr('width','800');
													  $j(targetImage).removeAttr('height');
													  $j(targetTitle).html('Untitled #1 (MONORAIL)')
													  $j(targetDescription).html('Digital C-Print, 2008');
													  break;
													  
												case 'Portraits' :
													  $j(targetLink).attr('href','_img/hires/jacquie_hires.jpg');
													  $j(targetImage).attr('src', '_img/lores/jacquie_lores.jpg');
													  $j(targetTitle).html('Jacquelyn')
													  $j(targetDescription).html('Digital C-Print, 2009');
													  $j(targetImage).attr('height','375');
													  $j(targetImage).removeAttr('width');
													  break;
													  
												case 'Interiors' :
													  $j(targetLink).attr('href','_img/hires/Untitled-12_hires.jpg');
													  $j(targetImage).attr('src', '_img/lores/Untitled-12_lores.jpg');
													  $j(targetTitle).html('Untitled Interior #44')
													  $j(targetDescription).html('Digital C-Print, 2008');
													  $j(targetImage).attr('height','375');
													  $j(targetImage).removeAttr('width');
													  break;
													  
										  }
										  
				});
					
				});
	function showPopup(url) { 
		newwindow=window.open(url,'name','height=400,width=450,top=200,left=300,resizable'); 
if (window.focus) {newwindow.focus()} 
} 