$('header nav > ul > li > ul > li > ul').parent().click(function(e){
	//e.preventDefault();
	if($(this).children('ul').hasClass("open")){
		$(this).children('ul').attr("style","height:1px;").removeClass("open");
	}else{
		$('header nav ul.open').attr("style","height:1px;").removeClass("open");
		$(this).children('ul').attr("style","height:100%;").addClass("open");
	}
});
$('#main .content .columns section:last-child').attr("style", "margin-right:0;");


/*IE6 STUFF */

$('header nav > ul > li').hover(function(){
	$(this).children("ul").show();
	
}, function(){
	$(this).children("ul").hide();
});



// View Stock Images
$('.thumbimg').live('click', function(event) {
  var theSrc = $(this).attr("rel");
  var mainImg = $(this).attr("realpath");
  var theSrc = theSrc + "&w=245&h=245";
  $('.mainimg').attr("src", theSrc);
  $('.mainimg').attr('href', mainImg);
  return false;
});


  $(document).ready(function(){
    $(".mainimg").colorbox({transition:"fade", maxHeight: "90%", photo: "true", scalePhotos: "true", preloading: "true"});
  });

