(function($){
	$('document').ready(function(){
		$('.item .media p.image a').lightBox();
		$('.item .media p.magnifier a').lightBox();
		$('.tabs .menu a').click(function(event){
			event.preventDefault();
			$('.tabs .menu a').removeClass('on');
			$(this).addClass('on');
			$('.tabs .tab_content').hide();
			$($(this).attr('href')).show();
		});
		$('.tabs .tab_content').hide();
		$('.tabs .menu a:first').click();
		$('.slider').cycle({
			fx: 'fade',
			timeout: 6000
		});
		$('.slider img').each(function(){
			try
			{
				if($(this).attr('alt').slice(0, 7) == 'http://')
				{
					$(this).css('cursor', 'pointer');
					$(this).click(function(){
						window.location = $(this).attr('title');
					});
				}
			}
			catch(e){}
		});
		// popups
		$('[rel=popup]').click(function(event){
			event.preventDefault();
			window.open($(this).attr('href'), '', 'width=900,height=650,scrollbars,resizable');
		});
		$('[rel=launcher]').click(function(event){
			event.preventDefault();
			window.open($(this).attr('href'), '', 'width=650,height=500');
		});
	});
})(jQuery);

