/**
 * @author yamashita
 */
$(document).ready(function(){
	if (jQuery.browser.msie) {
		var preLoadImg = new Object();
		$(".main_column2 a:hidden,.main_column2 p:hidden").each(function(){
			var tmpImg = new Image();
			var imgsrc = $(this).css('background-image');
			if (imgsrc != "" && imgsrc != "none") {
				var srct = imgsrc.replace(/url\(['"](.*)['"]\)/, '$1');
				srct = srct.replace(/url\((.*)\)/, '$1');
				if (srct != "") {
					tmpImg.src = srct;
					preLoadImg = tmpImg;
				}
			}
		})
	}
	
	$('#show_panels').galleryView({
		panel_width: 700,
		panel_height: 220,
		frame_width: 210,
		frame_height: 62,
		background_color: 'transparent',
		border: 'none',
		pause_on_hover: true
	});
	$("#tf_view2").hide();
	$("#resetform").live('click', function() {
		var type = $(this).attr('rel');
		if(type == 1) {
			document.location = "http://forrent.tokyu-relocation.co.jp/search/new/";
		} else if(type == 2){
			document.location = "http://forrent.tokyu-relocation.co.jp/search/recommend/";
		} else if(type == 3){
			document.location = "http://forrent.tokyu-relocation.co.jp/search/arrival/";
		}  else {
			document.location = "http://forrent.tokyu-relocation.co.jp/search/"+type;
		}
		return false;
	});
	$("select").change(function () {
	      var str = "";
	      $("select option:selected").each(function () {
	            str += $(this).val();
	      });
		  document.location = "http://forrent.tokyu-relocation.co.jp/search/"+str;
	});

});

function resetForm(){
	$("input:checkbox").attr("checked", "");	
}

