/*----------------------------------------
IAPA Javascript
Author: Marcus Ellis
Last Updated: July 12, 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($){
    
	// Modal
	$('a.modal, #m_regionmap area').fancybox({
		height: 280,
		width: 430,
		margin: 0,
		type: 'iframe',
		scrolling: 'no',
		overlayColor: '#000',
		overlayOpacity: 0.5,
		titleShow: false
	});
	
	// Login
	$('#login-widget').incLoginWidget({
		showLabels: true,
		showForgotPass: true,
		showForgotUser: false,
		showAutoLogout: false,
		forgotPassText: 'Forgot password?',
		buttonImage: '/associations/13029/imgs/btn-login.png',
		hoverImage: '/associations/13029/imgs/btn-login-hover.png'
	});
	
    // Sponsors
	$('#sponsors ul').incSponsorBox();
	
	// Clickable Logo
    $('body').addClickableLogo({
        name: 'Idaho Academy of Physician Assistants',
        url: 'http://www.idahopa.org'
    });
	
});


google.load("feeds", "1");
function feedLoaded(result) {
  if (!result.error) {
	var html = '<ul>';
	for (var i = 0; i < result.feed.entries.length; i++) {
      var entry = result.feed.entries[i];
	  var title = entry.title;
	  var link = entry.link;  
	  html += '<li><a href="'+ link +' target="_blank">'+ title +'</a></li>';
    }
	html += '</ul>';
	j('#rss-content').html(html);
  }
}
function OnLoad() {
  var feed = new google.feeds.Feed("http://www.jaapa.com/pages/rss.aspx?sectionid=455");
  feed.setNumEntries(5);
  feed.load(feedLoaded);
}
google.setOnLoadCallback(OnLoad);

