
var j = jQuery.noConflict();
j(document).ready(function($){
	
	// Clickable Logo
	$('body').addClickableLogo({
		name: 'American Massage Therapy Association of New York',
		url: 'http://www.amtany.org/'
	});
	
	// Home Page
	if ($('.home').length){
	
		// Login Widget
		$('#login-widget').incLoginWidget({
			showLabels: false,
			showAutoLogout: false,
			buttonImage: '/associations/8696/imgs/btn-login.png',
			hoverImage: '/associations/8696/imgs/btn-login-hover.png'
		});
		
		// Events
		$('#events-widget').new360events({
			url: 'http://m360.amtany.org/calendar.aspx',
			items: 5,
			style: 'compact',
			linkText: 'view all >>',
			callback: function(){
				if ($('#events li').length > 3){
					$('#events-widget ul li:gt(2)').addClass('hide');
					$('#events').append('<a id="view-more" href="#">View More +</a><a id="view-less" href="#" class="hide">View Less -</a>');
					$('#view-more, #view-less').live('click',function(){
						$('#events ul li:gt(2), #view-more, #view-less').toggleClass('hide');
						return false;
					});
				}
			}
		});

	}
	
	// Marketing Banner
		 $('#banner ul').incMarketingBanner({
			 showPager:true
		 });

	// Sponsors
		 $('#sponsors ul').incSponsorBox();

	// Search
		$('#navtop1cell').append('<div id="search-widget"></div>');
		$('#search-widget').incSearchWidget({
			showLabel: false,
			showButton: false
		});


});

