//////////////////////////////////////////////////||
//												  ||
//		CareSharing Inc							  ||
//		Custom Jquery							  ||
//												  ||
//////////////////////////////////////////////////||

$(document).ready(function(){ // begin jquery

///////////// hides overlay onload
      

	$('#overlay').hide();	
	$('#abs').hide();
///////////// hide infos in meer info

	$('.showme').hide();	
///////////// slides screenshots using Jquery Cycle


///////////// Shows Overlay

	 $("#p_demo").click(function () { 		  
		$('#overlay').css("visibility","visible");
//		$('body').css("overflow","hidden");
		$('#abs').show();
		$('#overlay').fadeIn('slow');
		$('#window').load('swf/player.html');
		return false;
	 });

///////////// Hide Overlay

	 $("#btn_close").click(function () { 
//		$('body').css("overflow","auto");
		$('#abs').hide();		
		$('#overlay').fadeOut('slow');
	 });

///////////// calls cycle plugin

	$('#module_wrap').cycle({
			fx:      'scrollRight',
    		timeout: 0, 			
		 	speed:  4000,
			speedIn:1000,			
			speedOut:1000,
		    pager:  '#module_list_nav',
            pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#module_list_nav li:eq(' + (idx) + ')';
        }
		});

///////////// Module header MouseOver

	$('#module_header li').hover(function(){
		$(this).attr('id','activeSlide');									
		}
		 , 
		  function () {
			$(this).attr('id','activeSlide2');;
	}); 	

///////////// moves to other module

	$('#module_header li').click(function(){
		var index = $(this).attr('href').substr($(this).attr('href').length-1);
		$('#module_wrap').cycle(parseFloat(index)-1);  
		
		$(".bigshots").stop().fadeOut('slow');				
		return false;  
	}); 
 
///////////// show big image shots under module

	 $(".modules_shots a").live("click",function () {
	var mylink = $(this).attr('href');
	$('#bigshots_' + mylink).fadeIn('slow');
	
	//alert('#bigshots_' + mylink);
		return false;
	 } );

///////////// hide big shots

	 $(".bigshots").live("click",function () { 
		$(this).stop().fadeOut('slow');
	 } );	 
	 
	 
///////////// lists mouseover effects

	 $("#btm_lists ul li , .meer_list li").hover(function () { 
		$(this).css('background-color','#fff');
		$(this).addClass('hover');
	 }
	 , 
      function () { //mouseout
		$(this).css('background-color','#F0F7DC');
		$(this).removeClass('hover');		
      }

	 );
	 
///////////// slide effects for meer info page

	$('ul').accordion();
	
  }); // end jquery
