jQuery.fn.resizeWindow = function()
{
	$.fn.cssNum = function(attr)
	{ try{ parseInt(this.css(attr))||0; } catch(e){ return 0; } }
	$.fn.scrollbarHeight = function(){
	    return this.attr('offsetHeight')
	           - this.cssNum('border-top-width')
	           - this.cssNum('border-bottom-width')
	           - this.attr('clientHeight');
	}
	var window_width = $(window).width();
	//var window_width = $(window).width() - $(window).scrollbarHeight();
	var window_height = $(window).height();
	//var window_height = $(window).height() - $(window).scrollbarHeight();
	if($.os.name != 'iphone')
	{
		var width = window_width;
		var height = Math.floor(window_width * 768 / 1024);
		var width_px = window_width + 'px';
		var height_px = height + 'px';
		$(this).css('width',width_px);
		$(this).css('height',height_px);
		if(window_height > height)
		{
		var top_px = (window_height - height)/2 + 'px';
		$(this).css('top', top_px);
		//$(this).css('left', 0);
		}else{
			$(this).css('top', 0);
		}
	}else{
		if(window_width * 768 / 1024 > window_height)
		{
			//横長
			var width = Math.floor(window_height * 1024 / 768);
			var height = window_height;
			var width_px = width + 'px';
			var height_px = window_height + 'px';
			$(this).css('width',width_px);
			$(this).css('height',height_px);
			var left_px = (window_width - width)/2 + 'px';
			$(this).css('left', left_px);
			$(this).css('top', 0);
		}else{
			var width = window_width;
			var height = Math.floor(window_width * 768 / 1024);
			var width_px = window_width + 'px';
			var height_px = height + 'px';
			$(this).css('width',width_px);
			$(this).css('height',height_px);
			var top_px = (window_height - height)/2 + 'px';
			$(this).css('top', top_px);
			$(this).css('left', 0);
		}
	}

    $('.photo_txt').css('font-size',width/100);
    $('.photo_txt span').css('font-size',width/100);
    $('.photo_txt strong').css('font-size',width/33);
    $('#coordinate span').css('font-size',width/100);
    $('#photo_txt').css('font-size',width/100);
    $('#photo_txt span').css('font-size',width/100);
    $('#photo_txt strong').css('font-size',width/33);
};
