$(function() {
	theme_hotel();
	reasonable_plan();

	$.init_slide('slidepreload','slidebody',0,0,1000,1,6000,1,'_self');
	$('#showmap').click(function() {
		$(this).toggleClass('hide_map');
		$('#slideshow').toggleClass('show_map');
	});
	$('input#submit_search').mouseover(function() {
		$(this).addClass('submit_search_over');
	});
	$('input#submit_search').mouseout(function() {
		$(this).removeClass('submit_search_over');
	});



    function makeSublist(parent, child, childVal) {
      $("body").append("<select style='display:none' id='" + parent + child + "'></select>");
      $('#' + parent + child).html($("#" + child + " option"));

      var parentValue = $('#' + parent).attr('value');
      $('#' + child).html($("#" + parent + child + " .sub_" + parentValue).clone());

      childVal = (typeof childVal == "undefined") ? "" : childVal;
      $("#" + child + ' option[@value="' + childVal + '"]').attr('selected', 'selected');

      $('#' + parent).change( function() {
		    var parentValue = $('#' + parent).attr('value');
		    $('#' + child).html($("#" + parent + child + " .sub_" + parentValue).clone());
		      $('#' + child).trigger("change");
		    $('#' + child).focus();
	  });
    }
    
    makeSublist('parent', 'child', '4013002');

});
