$(document).ready(function(){
	/*$(".srchBtn").click(function(){
		//show the loading bar
		$('.busy_div').fadeIn(1500);
		
	 	$(".busy_div").load("home/friends.php?q=" + $("#searchem").val(), function(){
	 		
	 	$("#img_banner").hide();
	 	$("#hr_footer").hide();
	 	});
	});
	*/

	//var p = $(\".row:first\");
	//var position = p.position();
	
	function scroll_rows(){
		$('.results_data').animate({
			scrollTop: $('.row').offset().top
		}, 2000);
	}
	
	/*
	$('.row').livequery(function(){ 
		$('.row').bind('click', scroll_rows); 
	});
	*/

	$('#searchem').focus(function(init_srch_type) {
        $(this).val('');
    });
	

	$('#county1').click(function(){
		$.post('home/friends.php', { q: "los angeles" },
				function(output){
					$(".busy_div").html(output).show();
				}
			)
		//$('.video_bar').load("srch_ctrls.php");
	});
	
	$('#county2').click(function(){
		$.post('home/friends.php', { q: "san bernardino" },
				function(output){
					$(".busy_div").html(output).show();
				}
			)
		//$('.video_bar').load("srch_ctrls.php");
	});
	
	$('#county3').click(function(){
		$.post('home/friends.php', { q: "Orange" },
				function(output){
					$(".busy_div").html(output).show();
				}
			)
		//$('.video_bar').load("srch_ctrls.php");
	});
	
	$('#county4').click(function(){
		$.post('home/friends.php', { q: "riverside" },
				function(output){
					$(".busy_div").html(output).show();
				}
			)
		//$('.video_bar').load("srch_ctrls.php");
	});
	

	/*$("#page_navigation_next").click(function(){
	 	var searchemVar = $('#searchem').val();
		$('.busy_div').fadeIn(1500);
		$(".busy_div").load("home/friends.php?s=20&q=" + searchemVar);
		function(output){
				$(".busy_div").html(output).show();
			}
	});*/
	
	//$(".awesome").click(function(){
		//event.preventDefault();
		//$(".busy_div").animate({left:"-=656px"}, 500);
		
	//});
	//$(".awesome").click(function() {
	//	$("#busy_div").fadein(1500);
	//	$("#busy_div").load("home/friends.php?q=" + $("#textfield").val());
		  //$.ajax({
		   //type: "GET",
		   //url: "home/friends.php",
		   //data: "q=" + $("#searchem").val(),
		   //success: function(msg){
		     //$("#busy_div").html(msg);
		   //}
	//});
	//});
	
	
	//var parsinator = $('.row').css('height');
	//var oldSize = parseFloat(parsinator);
	//var newSize = oldSize  * 2;
	//$(".row").hover(
	//		function() {
	//			$(this).animate({ height: newSize}, 250);
	//		},
	//		function() {
	//			$(this).animate({ height: oldSize}, 250);
	//		}
	//);
	//function divToggle(){
	//	$(".members").toggle("slow");
	//}
	//function divLoad(){
	//	$(this).click(function(){
	//		var currentId = $(this).attr('id';
	//		$(".prop_info").load('');
	//	});
	//}
	//$(".row").click(divToggle);
	//$(".row").click(function () {
	//	$(this).siblings(".row").unbind('click', divToggle);
	//	$(this).siblings(".row").bind('click', divLoad);
	//});

		$('#videos').youTubeChannel({ 
		userName: 'FreehomeProperties'
		,hideNumberOfRatings: true
		// Other options:
		//,removeBordersFromImage: false
		,loadingText: "Loading..."
		//,linksInNewWindow: false
		,hideVideoLength: true
		,hideFrom: true
		,hideViews: true
		,hideRating: true 
		});
	
});
