/**
 * @name Orcas Center User Interface
 * @version 2010.08.10
 * @author nickheezy@gmail.com
 * @copyright Orcas Center, 2010
 * 
 * @type jQuery
 * @requires jQuery v1.4.2
 * @requires shadowbox v2
 * @requires validate v1.7
 */


//shadowbox setup
Shadowbox.loadSkin('classic','/_ui/shadowbox/skin');


//init jQuery
$(function() {
    
	//Shadowbox defaults
	var sbOptions = {
		flvPlayer:'/_ui/shadowbox/flvplayer.swf',
		continuous:true,
		handleOversize:'resize',
		displayCounter:false,
		autoplayMovies:true,
		animSequence:'sync',
		overlayColor:'#111',
		overlayOpacity:0.6,
		fadeDuration:0.3,
		resizeDuration:1.0,
		initialWidth:450,
		initialHeight:300
	};
	Shadowbox.init(sbOptions);

	//homepage & show details page
	$('#tabs').tabs({ selected:0 });

	// blur the element focus to fix 'dotted line' bug
	$('a, button, form #submit').focus(function(){
		this.blur();
		}
	);
	//removes padding from first breadcrumb link
	$('#bd #center .breadcrumb a:first').css('padding-left','0');
	
	// jShowOff
	$('#features').jshowoff({
		effect:'fade',
		autoPlay:true,
		hoverPause:false,
		controlText:{play:'Play',pause:'Pause',previous:'Previous',next:'Next'}
	});
//--
});


/**
 * @type JavaScript
 * @requires google.feeds
 * @desc global functions
 */
 
 
//Google Search Results
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 600;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";


// load RSS via Google AJAX Feed API
function getRSS() {
	var feedControl = new google.feeds.FeedControl();
	feedControl.addFeed("http://orcascenter.org/blog/?feed=rss2");
	feedControl.setNumEntries(2);
	feedControl.setLinkTarget(google.feeds.LINK_TARGET_BLANK);
	feedControl.draw(document.getElementById("feedControl"));
}
google.setOnLoadCallback(getRSS);
