$j = jQuery.noConflict();

$j(window).ready(function(){
	$j('body').defuscate();
	$j('#Address .Address').click(function(){
		location.href = $j(this).find('a').attr('href');
	});
	
	$j('#Newsletters_1').attr('checked', 'checked');
	$j('#Newsletters').hide();
	
	if(!($j.browser.msie && $j.browser.version == '6.0')){
		$j('#OrderForm').hide();
		$j('#OrderTitle').click(function(){
			$j(this).toggleClass('active');
			$j('#OrderForm').slideToggle(500);
		});
	}
	/*
	$j(".link.Parent").click(function(evt){
		evt.preventDefault();
		evt.stopPropagation();
		$j(this).removeClass("link").addClass("current");
		$j(this).siblings("ul").slideDown(100);
	}).siblings("ul").hide();
	*/
});

$j(window).load(function(){
	$j('.PortfolioImage').each(function(){
		var img = $j(this).find('img:first');
		var leg = $j(this).find('.legend:first');
		leg.css('white-space', 'nowrap');
		
		if(img.width() < leg.width()){
			leg.css('white-space', 'normal');
			leg.width(img.width());
		} else {
			leg.css('white-space', 'nowrap');
		}
		
		//$j(this).css('width', $j(this).find('img:first').width() + 'px');
	});
});