$(document).ready( function(){
	if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
	{
		$("div#auxiliaryNavigation").css("position", "static");
		$("div#gFooter").css({
			margin: "0px",
			padding: "0px",
			bottom: "0px"
		});


		window.onorientationchange=function(){
			var orientation=window.orientation;
			switch(orientation)
			{

				case 0:
					if($('#cContent').height() < $(window).height()){
						$('#backGroundImage').css({
							height:$(window).height()+'px',
							width:$(window).width()+'px'
						})
					}else{
						$('#backGroundImage').css({
							height:'100%',
							width:'100%'
						})
					}
					
					break;
				default:
					$('#backGroundImage').css({
						height:'100%',
						width:'100%'
					})
					break;
			}
		}

	};


	$( "div#auxiliaryNavigation" ).minWidth();

	$( 'div#auxiliaryNavigation ul li a' ).each( function(){
		if( typeof( Cufon ) == 'function' && Cufon.replace ){
			Cufon.replace( $( this ), {
				fontFamily: 'gotham-bold',
				hover: true
			});
		}
	/*
		if( !$( this ).is( '.active' )){
			$( this ).hover(
				function(){
					if( Cufon.replace ){
						Cufon.replace( $( this ), { fontFamily: 'gotham-bold', color: '#AAA' });
					}
				},
				function(){
					if( Cufon.replace ){
						Cufon.replace( $( this ), { fontFamily: 'gotham-bold', color: '#FFF' });
					}
				}
			);
		}
*/
	});
});
