
function closes(){

jQuery('#lbOverlay').remove();
jQuery('#video').remove();

}


function newlight(id){

 closes();
var left = (screen.width/2)-(800/2);
var top = (screen.height/2)-(700/2);

jQuery('body').prepend('<div id="lbOverlay" style="width:100%; padding-bottom:10%; height:100%; position:absolute; top:0px; left:0px; background-color: #AFAFAF; z-index:1000; opacity:0.5; filter: alpha(opacity=50); "></div>');
jQuery('body').prepend('<div id="video"></div>');
jQuery('#video').css('top',top);
jQuery('#video').css('left',left);


	if(id == "spareroom"){
	
	jQuery('#video').load('/input_content.php?id=49');

	}else{
	

	jQuery('#video').load('/input_content.php?id=50');
	
	}



}

function propergateformfeild(idname,valuetext){

values = jQuery(idname).attr('value');
if(values != valuetext && values == undefined){
jQuery(idname).attr('value',valuetext);
jQuery(idname).click(function(){
jQuery(idname).attr('value','');});}}

jQuery(document).ready(function(){


jQuery('#other_option').hide();

jQuery('#postedapp-other-please-state').click(function(){


jQuery('#other_option').show();

})

jQuery('#postedapp-spareroom-No').click(function(){

newlight('spareroom');

});

jQuery('#postedapp-publictransport-No').click(function(){

newlight('transport');

});

jQuery('#become_foster').css('cursor','pointer');
jQuery('#why_pathway').css('cursor','pointer');
jQuery('#our_new_services').css('cursor','pointer');
jQuery('#become_foster').click(function(){

window.location = '/carer-profiles/';

})

jQuery('#why_pathway').click(function(){

window.location = '/the-process/';

})
jQuery('#our_new_services').click(function(){

window.location = '/about-us/';

})
jQuery('.accordian').hide();	
jQuery('.status').html('&gt;');
jQuery('.accordian').eq(0).show();	
jQuery('.accordian_title').eq(0).css('background','#0459aa');
jQuery('.accordian_title').eq(0).find('.status').html('&or;');

propergateformfeild('#posted-name','Name');
propergateformfeild('#posted-email','E-mail');
propergateformfeild('#posted-telephonenumber','Telephone Number');




	jQuery('#slideshow ul').innerfade({
					speed: 2000,
					timeout: 7000,
					type: 'sequence',
					containerheight: '279px'
				});


jQuery('.accordian_title').click(function(){
										  jQuery('.status').html('&gt');
	jQuery(this).find('.status').html('&or;');
	mvar  = jQuery(this).find('.acclink').html();
	jQuery('.accordian').slideUp();
	jQuery(mvar).slideDown('slow');
	jQuery('.accordian_title').css('background','#1378D8');
	jQuery(this).css('background','#0459aa');

});




					
});