var CutPastePaint = 
{
	init:function($)
	{
		
		this.transpli($);
		this.equalColumns($);
		$(".rounded").corners("10px");
		this.addHover($);
		this.lightbox($);
		this.tableMagic($);
	},
	
	// transparent subnav li's
	transpli:function($)
	{
		$("ul#SubNavigation li.link")
			.css("opacity", .5)
			.mouseover(function(){$(this).css("opacity",1)})
			.mouseout(function(){$(this).css("opacity",.5)})
	},
	
	// equal column heights for TwoColumnPage and ThreeColumnPage	
	equalColumns:function($)
	{
		var tallest = 0;
		var thisHeight;
		$(".rounded").each(function()
		{
			thisHeight = $(this).height();
			if(thisHeight > tallest)
			{
				tallest = thisHeight;
			}
		});
		$(".rounded").height(tallest);
	},
	
	// li:hover for IE6
	addHover:function($)
	{
		$("ul#Navigation li")
		.mouseover(function(){$(this).addClass("hover")})
		.mouseout(function(){$(this).removeClass("hover")})
	},
	
	lightbox:function($)
	{
		if($('body.GalleryPage')[0])
		{
			$('a[@rel*=lightbox]').lightBox({
        	imageLoading: 'mysite/javascript/lightbox/images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
        	imageBtnPrev: 'mysite/javascript/lightbox/images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
        	imageBtnNext: 'mysite/javascript/lightbox/images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
        	imageBtnClose: 'mysite/javascript/lightbox/images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
        	imageBlank: 'mysite/javascript/lightbox/images/lightbox-blank.gif'
    		});
		}
	},
	
	tableMagic:function($)
	{
		var t;
		$("table.pricetable tr td:first-child").each(
		function()
		{
			if(t && t == $(this).text())
			{
				$(this).css("text-indent", "-30000px");
			}
			t = $(this).text();
		});
	}
}

jQuery.noConflict();

jQuery(function($){
	CutPastePaint.init($); 
});