$(document).ready(function() {
			$("a#tablePopup").fancybox( {frameWidth: 758,frameHeight: 460, padding:0,hideOnContentClick: false,callbackOnShow :
			 function(){
					$('.dediTable a.close').click(
						function() {
							$.fn.fancybox.close();
						});
				$("#fancy_close").hide();  
			}})
            $("#fancy_close").hide();
                    
			$("a.r_q").fancybox( {frameWidth: 599,frameHeight: 950, padding:0,centerOnScroll: false, hideOnContentClick: false, callbackOnShow :
			 function(){
			 		//$("#fancy_outer").height($("#fancy_content #quote").height()+50);
					$('.quote a.close').click(
						function() {
							$.fn.fancybox.close();
						});
					$('.quote .submits a').click(
						function() {
							$.fn.fancybox.close();
						});
					$(".choiceForm input[type='radio']").click(function() { 
						var selected = $(this).attr("class");
						$(".choice").hide();
						$("." + selected).show();
							
						
					});
					$(".other_requirements_checkbox").click(function() { 
						if($(this).attr("checked")) {
							$(".other_requirements").show();
							$("#fancy_outer").height($("#fancy_outer").height()+166);
						} else {
							$(".other_requirements").hide();
							$("#fancy_outer").height($("#fancy_outer").height()-166);
						}
						//$("#fancy_outer").height($("#fancy_content #quote").height()+50);
					});		
                    $("#fancy_close").hide();           
                $('#fancy_div [id=quote_form]').validate({
                	  rules: {
                			existingserviceFeedback: {
                				required: "#chs_s:checked"

                			},
                    		newserviceFeedback: {
                				required: "#chs_n:checked"

                			}
                    }
                });    
			}})
         
           //$("#fancy_div #quote_form").validate();
            
            jQuery.validator.messages.required = "";
            jQuery.validator.messages.email = "";

            
            
		});
            