(function($){
$(function(){
	$('a[rel^="search"]').live('click', function(event){
		event.preventDefault();
		var target = ($(this).attr('target') && $(this).attr('target') != null) ? $(this).attr('target') : '_self';
		var $form = $('<form/>').attr({
			'action': 'http://www.roomaccess.jp/article_list.php?page_no=1',
			'method': 'POST',
			'target': target
		});
		var re = /([^&=]+)=([^&]+)/img;
		var c;
		while(c = re.exec($(this).attr('rel').replace(/^search\:/i, ''))){
			$('<input/>').attr({
				type: 'hidden',
				name: c[1],
				value: c[2]
			}).appendTo($form);
		}
		$('<input/>').attr({
			type: 'hidden',
			name: 'action[search]',
			value: 'この条件で物件を検索する'
		}).appendTo($form);
		$form.appendTo($('body:eq(0)')).get(0).submit().remove();
		return false;
	});
});
})(jQuery);
