
var j = jQuery.noConflict();
j(document).ready(function($){

    // Claickable Logo
    $('body').addClickableLogo({
        name: 'Houston Contractors Associations',
		url: 'http://www.houstoncontractors.org'
       // url: '/'
    });
	
	// Home Page
	if ($('.home').length){
	
		// 360 Events Widget
		$('#events-widget').inc360events({
			url: 'https://m360.houstoncontractors.org/calendar.aspx',
			items: 3,
			style: 'compact'
		}); 

	}
	
	// Ad Banners
	$('#topnavcell ul').each(function(){
		$(this).addClass('banner-ad')
			.prependTo('#maincontentsubcell')
			.incSponsorBox({
				rotate: false
			});
	});
	
	// Photo Gallery
	if ($('.albumPage').length){
		
	  	$('.albumPage #maincontentsubcell ul').addClass('albums');
		$('.albums li').each(function(){
			var html = '<div class="image-wrapper"><div class="image">';
				html += '<a href="' + $('a',this).attr('href') +'"><img border="0" src="'+ $('img',this).attr('src') +'"></a>';
				html += '</div></div><h3>'+ $('a',this).attr('title') +'</h3><p>'+ $('img',this).attr('alt') +'</p>';
		  	$(this).html(html);
		  
		}).hover(
			function(){
				$(this).addClass('hover');
			},
			function(){
				$(this).removeClass('hover');
			}
		);
	}

});

