

/// Library Calls
$(document).ready(function() {
	locationObj1 = document.getElementById("safari_addressbglt");
	locationObj2 = document.getElementById("safari_input");
	locationObj3 = document.getElementById("safari_addressbgrt");
	$('#safari_location').focus(function(){
		$(this).select();
		locationObj1.className='loadingAon';
		locationObj2.className='loadingBon';
		locationObj3.className='loadingCon';
	});
	$('#safari_location').blur(function(){
		locationObj1.className='loadingAoff';
		locationObj2.className='loadingBoff';
		locationObj3.className='loadingCoff';
	});
	$('#1_head').click(function(){
		$('#1').toggle('fast');
	});
	$('#2_head').click(function(){
		$('#2').toggle('fast');
	});
	$('#3_head').click(function(){
		$('#3').toggle('fast');
	});
	$('#4_head').click(function(){
		$('#4').toggle('fast');
	});
	$('#5_head').click(function(){
		$('#5').toggle('fast');
	});
	$("html").keypress(function(e){
		if(window.event)	keycode = window.event.keyCode; //ie
		else if (e)	keycode = e.which; //ff
		if(keycode == 32){
			Rotate_Phone(null);//spacebar rotates
			return false;
		}
	});
	if (document.images){
	   img1 = new Image();
	   img2 = new Image();
	   img3 = new Image();
	   img4 = new Image();
	   img5 = new Image();
	   img6 = new Image();
	   img7 = new Image();
	   img1.src = "/img/UIRoundedTextFieldLeft.png";
	   img2.src = "/img/UIRoundedTextFieldMiddle.png";
	   img3.src = "/img/UIRoundedTextFieldRight.png";
	   img4.src = "/img/UIRoundedTextFieldProgressLeft.png";
	   img5.src = "/img/UIRoundedTextFieldProgressMiddle.png";
	   img6.src = "/img/UIRoundedTextFieldProgressRight.png";
	   img7.src = "/img/iphone_hor.png";
	}
});