var ie6 = false;
if($.browser.msie && parseFloat($.browser.version) < 7) ie6 = true;

function refreshEdges(){
	if(ie6){
		$('.edge-left:visible, .edge-right:visible').each(function(){
			$(this).css('height', $(this).parent().outerHeight() - 2).css('top', 1);
		});
		$('.edge-top:visible, .edge-bottom:visible').each(function(){
			$(this).css('width', $(this).parent().outerWidth() - 2).css('left', 1);
		});
		$('#tab-body .edge-bottom, #tab-body .corner-bottom').css('bottom', -1).css('bottom', 0);
	}
}


if(ie6){
	$(document).ready(function(){
		// Show / Hide image gallery tooltip
		$('#block-views-Photo_Gallery-block_1 .thumb').hover(function(){
			$(this).find('.title').show();
		}, function(){
			$(this).find('.title').hide();
		});
		
		// Edge styles
		refreshEdges();
		
		// Add hover states to submit buttons
		$('.form-submit').mouseover(function(){
			$(this).addClass('form-submit-hover');
		}).mouseout(function(){
			$(this).removeClass('form-submit-hover');
		});
	});
} 
