/**
 * @author rlacson
 */

$(document).ready(function(){
	$('.rotating').cycle({
			fx:    'fade', 
    		speed:  2500 
		});
		
    Cufon.replace('h1, h2, h3, .cufon', {
        hover:true
    });

    $('.nav-dropdown').each(function(){
        maxwidth = 0;
        $(this).children().each(function(){
            w=$(this).width();
            if(w>maxwidth){
                maxwidth = w;
            }
        });
        $(this).children().each(function(){
            $(this).width(maxwidth);
        });
    });
    
    $(".nav-dropdown").each(function(){
        w=$(this).parent("li").width();
        $(this).css("min-width",w);
        $(this).children("li").css("min-width",w);
        $(this).hide();
    });

    $("#nav li").hover(
        function(){
            $(this).children('ul').show();
            $(this).addClass("hover");
        },
        function(){
            $(this).children('ul').slideUp();
            $(this).removeClass("hover");
        }
        );
				
	//remove all seconds on dropdown
	$("#quote_request_dropoff_time_5i").children().remove();
	$("#quote_request_pickup_time_5i").children().remove();
	
	//put [00,15,30,45] in seconds dropdown
	$("#quote_request_dropoff_time_5i").append('<option value="00">00</option>');
	$("#quote_request_dropoff_time_5i").append('<option value="15">15</option>');
	$("#quote_request_dropoff_time_5i").append('<option value="30">30</option>');
	$("#quote_request_dropoff_time_5i").append('<option value="45">45</option>');
	
	$("#quote_request_pickup_time_5i").append('<option value="00">00</option>');
	$("#quote_request_pickup_time_5i").append('<option value="15">15</option>');
	$("#quote_request_pickup_time_5i").append('<option value="30">30</option>');
	$("#quote_request_pickup_time_5i").append('<option value="45">45</option>');

});

