function initCycle()
{
	$('.slideshow').cycle({
	  fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
      speed:       600,
      timeout:     6000,
	   pager:      '#slide-controls',
      //pagerEvent: 'mouseover',
	  pagerEvent:  'click',
      fastOnEvent: false
    }) ;
	
}
	
	
function initFancy()
{
		
			$("#callout1").fancybox({
				'width'				: 690,
				'height'			: 450,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
				
		});	
		
			$("#callout2").fancybox({
				'width'				: 690,
				'height'			: 450,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
		});
		
		$("#callout3").fancybox({
				'width'				: 690,
				'height'			: 450,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
		});
		
		$("#ApplyNow").fancybox({
				'width'				: 710,
				'height'			: 650,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe',
                'href'              : 'ApplyNow.aspx'
		});
		
		$("#ApplyNow1").fancybox({
				'width'				: 710,
				'height'			: 650,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'              : 'iframe',
                'href'              : 'ApplyNow.aspx?id=1'
            });
            $("#ApplyNow2").fancybox({
                'width': 710,
                'height': 650,
                'autoScale': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe',
                'href': 'ApplyNow.aspx?id=2'
            });
            $("#ThankYou").fancybox({
                'padding': 0,
                'width': 372,
                'height': 196,
                'autoScale': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe',
                'modal': 'true',
                'href': 'Thankupage.aspx'
            });
            
		
}
	



function initOpportunity()
{
	
	initTabModule();
}


/* Begin tabs */
function activateTabModule()
{
	var sTab = $(this).attr("rel");
	if(sTab != null && sTab != "")
	{
		$(this).parents(".TabModule").find(".breadcrumb,.TabControl").find("a.active").removeClass("active");
		$(this).parents(".TabModule").find(".Tab.active").fadeOut(0,function(){
			$(this).removeClass("active");
			$(this).parents(".TabModule").find(".breadcrumb,.TabControl").find("a[rel="+sTab+"]").addClass("active");
			$(this).parents(".TabModule").find(".Tab."+sTab).fadeIn(0,function(){$(this).addClass("active");});
		});
	}
}
function initTabModule(sel,callback)
{
	if(sel == null) sel = "";
	$(sel+" .TabModule").each(function(){
		$(".TabControl a:not(.disabled)",$(this)).click(activateTabModule);
		$(".breadcrumb a:not(.disabled)",$(this)).click(activateTabModule);
		$(".Tab:not(.active)",$(this)).hide();
		$(".Tab",$(this)).css("position","relative");
		$(this).css("visibility","visible");
	});
	
	
		
}






/* End Begin tabs */

Video = {	
	'videoPlayer' : false,
	'doPlay' : function(source){
		    if (typeof PInstance == 'undefined') var PInstance = false;
			
            this.videoPlayer = this.videoPlayer || (PInstance && PInstance[0]) || false;
			
			if (!this.videoPlayer){
				return true;
			}
		
			var title 		= source.attr('title');
			var id 			= source.attr('id');
			var poster		= source.find('img').attr('src').replace('_thumb', '');
			var videoUrl 	= source.attr('filename');
			
			$('#video_title').html(title);

			this.videoPlayer.setTitle(title);
			this.videoPlayer.setID(id);
			this.videoPlayer.setFile(videoUrl+".mp4", false);
			this.videoPlayer.setFile(videoUrl+".ogv", false);
			this.videoPlayer.setPlay();
			this.videoPlayer.setActiveItem(1);
			this.videoPlayer.setPlayerPoster(poster);

			
	}
};



