$(document).ready(function(){

	$('.edit> a').click(function(){
		window.open(this.href,'admin','height=600, width=630, scrollbars=yes').focus();
		return false;
	});
	
	$('.contact_owner> a').click(function(){
		window.open(this.href,'contact','height=600, width=630, scrollbars=yes').focus();
		return false;
	});
		
	$("ul.hide").removeClass('hide');
	
	$("#news").newsTicker(5000);
	
	$('.make_homepage> a').click(function(){
		if(document.all){
			this.style.behavior="url(#default#homepage)";
			this.setHomePage(this.href);
			return false;	
		}
		else
		{
			$('<li id="tooltip_sethome"><a class="parent" href="'+this.href+'"><img class="icon_make_home" alt="set home icon" src="/images/bbm/common/icon_make_home.gif" /></a><ol><li>Drag the above home icon onto the "house icon" in the browsers tool bar</li><li>In the popup window select "Yes"</li></ol></li>').insertAfter($(this).parent());
			return false;
		}
	});
	
	//$('a[rel*=external]').click(function(){
		//window.open(this.href);
		//return false;
	//});
	
	$('li.tools> a').click(function() {
		$(this).parent().toggleClass('indicator');
		var tool = $(this).attr('title');
		$('#'+tool).slideToggle('slow');
		$('div[id!='+tool+'].draw:visible').slideUp('slow');
		$(this).parent().siblings('li.indicator').removeClass('indicator');
		return false;
  	});
	
});