/*$(" pick_another_service").ready(function(){	
	$(this).css("top","400px");
	$(this).css("left","0px");
	//alert(document.body.scrollTop);
});

/*
document.pick_another_service.scrollTop

$('#box').floating();

*/

//script to listen how far the browser has scrolled 






//script for scrolling the link
function startPolling(){
setInterval("poll()", 500);
}


var name = "#pick_another_service";
var name2 = "#pick_another_service_2";
var shadow = "#pick_another_shadow";
var menuYloc = null; 
var qMenyYloc = null; 
var offset;
var sOffset;
var offset2;

//function for scrolling pick_another_service
function poll() {
	var position = $(document).scrollTop();
	//alert(position);
	if (position > 900) { 
			
			
		    menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))  
		    //$(window).scroll(function () {  
					offset = 300 + $(document).scrollTop()+"px"; //alert(offset);
					sOffset = 300 + $(document).scrollTop()+"px";
					if ($(document).scrollTop() > 900){
						$(name).animate({top:offset},{duration:500,queue:false});
						$(name2).animate({top:offset},{duration:500,queue:false});
						$(shadow).animate({top:sOffset},{duration:500,queue:false});
					}
					else {
						$(name).animate({top:1200},{duration:500,queue:false});
						$(name2).animate({top:1200},{duration:500,queue:false});
						$(shadow).animate({top:1200},{duration:500,queue:false});
					}
		    
		// });
	}
	else {
		$(name).css("top","1200px");
		$(name2).css("top","1200px");
		$(shadow).css("top","1200px");
	}
	return true;
};






$(document).ready(function(){
	$("#pick_another_service_2").hide();	
	startPolling();
	
	//code for hiding/showing when clicked
	//code for pick_another_service
	$("#pick_another_service").click(function(){
		$("#pick_another_service").fadeOut(500, fadePickQ).hide(500);
		$("#pick_another_shadow").fadeOut(500).hide(500);
	});
	$("#pick_another_service_2").mouseleave(function(){
		$("#pick_another_service_2").fadeOut(2000, fadePickQ2).hide(2000);
		$("#pick_another_shadow").fadeOut(2000).hide(2000);
	});
	function fadePickQ() {
		$("#pick_another_service_2").fadeIn(500);
		$("#pick_another_shadow").fadeIn(500);
	};
	function fadePickQ2() {
		$("#pick_another_service").fadeIn(2000);
		$("#pick_another_shadow").fadeIn(2000);
	};

});

