/************************************************************/
/************************************************************/
/*	START variables and such for the home page images viewer	*/


var viewer_semiphore_locked = false;
var current_viewer_image = 0;

var images = new Array();
var image_links = new Array();
var main_item_title_arr = new Array();
var main_item_phrase_arr = new Array();


images[0]="./images/home/1welcome.jpg"
image_links[0]="./?page=neighborhood";
main_item_title_arr[0] = "Welcome to Jeffers Waterfront";
main_item_phrase_arr[0] = "Contact us for availability and price list.  Call Jim Hill at 612-799-4567";

images[1]="./images/home/2ridge.jpg"
image_links[1]="./?page=neighborhood&sub=ridge";
main_item_title_arr[1] = "Luxury Single Family Lots";
main_item_phrase_arr[1] = "Contact us for availability and price list.  Call Jim Hill at 612-799-4567  ";

images[2]="./images/home/3enclave.jpg"
image_links[2]="./?page=neighborhood&sub=enclave";
main_item_title_arr[2] = "Single Family Lots With Great Views";
main_item_phrase_arr[2] = "Contact us for availability and price list.  Call Jim Hill at 612-799-4567";

images[3]="./images/home/4hollow.jpg"
image_links[3]="./?page=neighborhood&sub=hollow";
main_item_title_arr[3] = "Villas Abuting A Wooded Preserve ";
main_item_phrase_arr[3] = "Contact us for availability and price list.  Call Jim Hill at 612-799-4567";

images[4]="./images/home/5pointe.jpg"
image_links[4]="./?page=neighborhood&sub=pointe";
main_item_title_arr[4] = "Luxury Single Family Homes";
main_item_phrase_arr[4] = "Contact us for availability and price list.  Call Jim Hill at 612-799-4567";

images[5]="./images/home/6parkside.jpg"
image_links[5]="./?page=neighborhood&sub=parkside";
main_item_title_arr[5] = "Townhome Living Next To Park";
main_item_phrase_arr[5] = "Contact us for availability and price list.  Call Jim Hill at 612-799-4567";

images[6]="./images/home/7other.jpg"
image_links[6]="./?page=neighborhood&sub=shore";
main_item_title_arr[6] = "The Shore, Trail Head & Park View";
main_item_phrase_arr[6] = "Contact us for availability and price list.  Call Jim Hill at 612-799-4567";

thumb_numbs = new Array();
thumb_numbs[0] = 6;
thumb_numbs[1] = 59;
thumb_numbs[2] = 112;
thumb_numbs[3] = 165;
thumb_numbs[4] = 218;
thumb_numbs[5] = 271;
thumb_numbs[6] = 324;
	
	
/*	END variables and such for the home page images viewer	*/
/************************************************************/
/************************************************************/

	$(document).ready(function(){
		// this works the expandible window at the very top of the template
		$("#open_button").click(function(){
			$("#top_float").animate({top:0},300,function(){
				$("#open_button").css('z-index','10');
				$("#close_button").css('z-index','20');		
				$("#open_link").html("Click \"Close\" To Continue.");			
			});
		});
		$("#close_button").click(function(){
			$("#top_float").animate({top:-125},300,function(){
				$("#open_button").css('z-index','20');
				$("#close_button").css('z-index','10');
				$("#open_link").html("Click \"Open\" To Learn More.");			
			});
		});
		$("#open_link").click(function(){
		
			if(parseInt($("#top_float").css('top'))==-125){
				$("#top_float").animate({top:0},300,function(){
					$("#open_button").css('z-index','10');
					$("#close_button").css('z-index','20');	
					$("#open_link").html("Click \"Close\" To Continue.");			
				});
			}else{
				$("#top_float").animate({top:-125},300,function(){
					$("#open_button").css('z-index','20');
					$("#close_button").css('z-index','10');	
					$("#open_link").html("Click \"Open\" To Learn More.");			
				});
			
			}			
		});
		// this will work the acordian effect in the sidebar
		$("#first_side_item_text").css('height',273);
		$("#first_side_item_text .side_item_head").css('backgroundImage','url("./images/arrow_close.png")');
		$(".side_item_head").click(function(){
			head_el = this;
			//alert('here');
			if(parseInt($(this).parent().css('height'))!=273){
				$(".side_item").animate({height:22},200,function(){
					$(head_el).css('backgroundImage',"url('./images/arrow_open.png')");
				});
				$(".side_item_head").css('backgroundImage',"url('./images/arrow_open.png')");
				$(head_el).parent().animate({height:273},200,function(){
					$(head_el).css('backgroundImage',"url('./images/arrow_close.png')");
				});					
			}
		});
		try{
			preloader();
			image_timer();
			//update_twitter();
		}catch(e){}
		
		try{
			BirdMap({lat:44.741435,lon:-93.441086});			
		}catch(e){}
		
		try{
			GetMap(44.741435,-93.441086,15);		
		}catch(e){}
		
		//create the map in the sidebar on the home page
		//gmap();
	});

