// JavaScript Document

  	var intLIWidth = 155;
	$(document).ready(function(){
		
	/*
	 *  
	 *
	 * Author: waldemarm
	 */	
		$('#siteContainer, #thickBoxContainer').css('width','100%');
		$('#siteContainer, #thickBoxContainer').css('background-color','#fff');
		$('#thickBoxContainer').css('background-image','url()');
		$("img[@src='/resources/images/bg_thickbox_header.gif']").remove();
		$(this).find('body').css('background-color','#fff');
	
		$('.js_deleteItemFromList').click(function(e){
			e.preventDefault(); 
			e.stopPropagation(); 
			var property_yacht_id = $(this).parents('li').parents('li').attr('id').split('_')[4];
			/** count table TRs and if there are only 2 (really 1) then display information that list is empty **/
			/*
			if($(this).parents('li').parents('li').size()==2){
				$('#compareYachtsWrapper').html('<span style="padding-left: 155px;">You do not have any yachts to compare.</span>');
			}
			*/			
			/** remove column **/
			$(this).parents('li').remove();
			$('#compareULListWrapper').css('width',$('#compareULListWrapper').width()-intLIWidth);

			/** remove deleted item from parent comparsion list and uncheck selectboxes **/
			window.parent.deleteItemFromComparsionList(property_yacht_id);
							
		});//eof delete 
		
		/** on link click **/
		$('.yachtLink').click(function(e){
			e.preventDefault(); 
			e.stopPropagation(); 				
			window.parent.location.href = $(this).attr('href');
		});		
	
	});

