/*----------------------------------------
AIA Dallas Javascript
Author: Marcus Ellis
Last Updated: May 24, 2011
(c) 2011 Affiniscape, Inc.
All Rights Reserved. This JavaScript file must not be reproduced without the express written permission of Affiniscape, Inc.
For questions regarding licensing or setup please contact Affiniscape, projects @ affiniscape dot com
----------------------------------------*/

var j = jQuery.noConflict();
j(document).ready(function($){
	
	// Custom Banner
	if ($('#topnavcell img').length){
		$('#topnavcell img').attr('id','custom-banner');
		$('#navtop2div').append($('#custom-banner'));
		$('#topnavcell').hide();
	}
	
	// Events
	$('#events-widget').inc247events({
		items: 4,
		style: 'compact',
		showLink: true,
		linkText: 'view all &raquo;'
	});
	
	// Mktg Banner
	$('#banner ul').incMarketingBanner({
		showPager: true
	});

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

	// Constant Contact Form
	$('#assnfooter input.email').addClass('bkgd')
		.focus(function(){ $(this).removeClass('bkgd'); })
		.blur(function(){ if ($(this).val() == '') { $(this).addClass('bkgd'); } });

	// Search
	$('#navtop1cell').append('<div id="search-widget"></div>');
	$('#search-widget').incSearchWidget({
		formAction: 'http://www.aiadallas.org/searchsite.cfm',
		showLabel: false,
		showButton: false
	});
	
	// Clickable Logo
    $('body').addClickableLogo({
        name: 'Dallas Chapter of the American Institute of Architects',
        url: 'http://www.aiadallas.org'
    });
    
});

