// JavaScript Document
jQuery(document).ready(function(){
	
	// config var
	var colWidth = 165;
	
	//jQuery('ul#nav li:not(:last)').css('borderRight','1px solid #55CEF0');
	
	//jQuery('.col500Content form').jqTransform({imgPath:imgroot + '/includes/images/forms/'});
	
	jQuery.easing.custom = function (x, t, b, c, d) { 
	    var s = 1.70158;  
	    if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 
	    return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 
	}
	
	jQuery('ul.leftNav li').click( function() {
		var selMenu = jQuery(this).find("a").attr('childid');
		var thisHref = jQuery(this).find("a").attr("href");
		var thisTitle = jQuery(this).find("a").attr("title");
		if (selMenu.length && document.getElementById('childOf_'+selMenu)) {
			jQuery("#childOf_" + selMenu).toggle(200, function(){
				jQuery('#secondaryNavSlideSlider').animate({
					marginLeft: "-"+colWidth+"px"
				}, 700, 'custom', function(){
					jQuery('#secondaryNavTitle').html(thisTitle);
					jQuery("#secondaryNavSlideSlider").animate({height: jQuery("#childOf_" + selMenu).height()+20},700, 'custom', function(){
						window.location = thisHref;
					});
				});
			});
		} else {
			window.location = thisHref;
		}
		return false;
	});
	
	if (document.getElementById('pics_container')) {
		jQuery('#pics_container .listingContainerPics_pic a').lightBox();
		jQuery('#morePhotosLink').click(function () {jQuery('#pics_container .listingContainerPics_pic a:first').click();});
	}
	//jQuery('#pics_container a').colorbox({transition:'fade',speed:500,rel:'pics'});
	
	/*jQuery('.col330 > .col155:odd').css('margin-left','18px');
	jQuery('hr').attr("noshade","noshade");
	//jQuery('.col212 div:not(#navClip)').removeClass('col155');
	jQuery('.col212 .col155').removeClass('col155').css('width',colWidth+'px');*/
 });