// JavaScript Document
// perform JavaScript after the document is scriptable.
$(document).ready(function() {
	$("div.home_scrollable").scrollable({
		size: 1,
		clickable: false
	}).autoscroll({
		interval:11000
	}).circular();

	
	$(document).pngFix();
	
	$('.partner').hover(function(){
			$(this).children('.comment').stop().css("display", "block");
			$(this).children('.comment').stop().css("top", "0px");
		}
		, function(){
			$(this).children('.comment').stop().animate({"top": '400px'}, 800);
		}
	);	

	// setup button action. it will fire our overlay 
	$("a[rel]").overlay({
		expose: '#000',
		// when overlay is opened, load our player
		onLoad: function() {
			player.load();
		},
		// when overlay is closed, unload our player
		onClose: function() {
			player.unload();
		}
	});	
	
});

document.write('\x3Cscript src="http://www.google.com/jsapi?key=ABQIAAAA1Q73oHZUWzLsZpI2f6gxBBSU3oUhilsDND8vdmmQE0zJ4TSEYBTuvJFsPlfB0GHXLNH7NBt2TVshDA" type="text/javascript">\x3C/script>');

function googleSerachInit() {
	google.load("search", "1");
	google.setOnLoadCallback(googleOnLoadCallback, true);
}
    
function googleOnLoadCallback() {
	// Create a search control      
	var searchControl = new google.search.SearchControl();	
	
	var search =  new google.search.WebSearch();
	search.setSiteRestriction("www.signalinc.com");//This will need to be updated to ceedd's website eventually

	var options = new google.search.SearcherOptions();
	options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
	
	searchControl.addSearcher(search,options);                
	// Tell the searcher to draw itself and tell it where to attach      
	searchControl.draw(document.getElementById("searchcontrol"));      
	
 }