// JavaScript Document
$(function() {
  iSOL.Actions.Tabs();
  iSOL.Actions.externalHover();
  iSOL.Actions.resentpostslider();   
})	
/*
$(window).resize(function() {
  iSOL.Actions.resize();
});
$(window).scroll(function () { 
  iSOL.Actions.resize();
});
*/
$(document).ready(function() {
  $("a[rel='tearsgospelactivities']").colorbox();
  $("a[rel='photofade']").colorbox({transition:"fade"});
  $("a[rel='photowrap']").colorbox({transition:"none", width:"75%", height:"75%"});
  $("a[rel='photoslideshow']").colorbox({slideshow:true});
  $(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});
  $(".example7").colorbox({width:"80%", height:"80%", iframe:true});
  $(".example8").colorbox({width:"50%", inline:true, href:"#inline_example1"});
  $(".example9").colorbox({
	  onOpen:function(){ alert('onOpen: colorbox is about to open'); },
	  onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
	  onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
	  onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
	  onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
  });
  $("a[rel='youtubevideo']").colorbox({iframe:true, innerWidth:640, innerHeight:390}); 
});
iSOL = {};
iSOL.Actions = {};
iSOL.Actions.resize = function () {
	if ($(document).height() >= $(window).height() ) {
		$('.bg').css({"height":$(document).height()});
	} else {
		$('.bg').css({"height":$(window).height()});
	} 	
}
iSOL.Actions.externalHover = function () {
	/*
		$("a.external").hover(function() {
			$(this).css({'z-index' : '9999'});
			$(this).find('span')
				.animate({
					marginTop: '-25%'
				}, 100);
			
			} , function() {
			$(this).find('span')
				.animate({
					marginTop: '0'
				}, 500);
		});
		*/
}
iSOL.Actions.Tabs = function () {
	$(".tab .tabContent .tabs").hide();
	$(".tab .tabMenu li:first").addClass("active").show();
	$(".tab .tabContent .tabs:first").show();
	$(".tab .tabMenu li").click(function() {
		$(".tab .tabMenu li").removeClass("active");
		$(this).addClass("active");
		$(".tab .tabContent .tabs").hide();
		$INDEXID = $('.tab .tabMenu li').index($(this));
		$('.tab .tabContent .tabs:eq('+$INDEXID+')').show();
		return false;
	});
}
iSOL.Actions.resentpostslider = function () {
	$(".slider li:gt(0)").hide();
	setInterval(function() { 
	  $('.slider li:first')
		.fadeOut(600)
		.next()
		.fadeIn(1000)
		.end()
		.appendTo('.slider');
	},  3000);
}

iSOL.Actions.Tabs2 = function () {
	/*
	var tabContainers = $('div.tabContent > div');
	tabContainers.hide().filter(':first').show();
	$('div.ys1 ul.tabMenu li a').click(function () {
		tabContainers.hide();
		tabContainers.filter(this.hash).show();
		$('div.ys1 ul.tabMenu li a').removeClass('selected');
		$(this).addClass('selected');
		return false;
	}).filter(':first').click();
	*/
}
