 # All this logic will automatically be available in application.js.
 # You can use CoffeeScript in this file: http:#coffeescript.org/
 $ ->
+#$(document).ready ->
   $('#enable_js').hide()
-  #form validation# <<<
-  form_validation = $('#new_pv_query').validate
-    debug: true,
+  
+  form_validation = $('#new_pv_query').validate# <<<
+    #debug: true,
     errorClass: 'alert-warning',
     errorPlacement: (error, element) ->
-      element.parent().append(error)
-
-  $('#pv_query_postcode_id').rules(
-    'add',
-      required: true,
-      digits: true,
-      minlength: 4,
-      maxlength: 4
-  )
-  $('.bearing_input').rules(
-    'add',
-      required: true,
-      digits: true,
-      min: 0,
-      max: 360
-  )
-  $('.tilt_input').rules(
-    'add',
-      required: true,
-      digits: true,
-      min: 0,
-      max: 90
-  )
-  $('.area_input').rules(
-    'add',
-      required: true,
-      number: true,
-      min: 0
-  )# >>>
+      element.parent().append(error)# >>>
   #add/remove nested forms without link_to_function (which has been deprecated)# <<<
   add_fields = (event) ->
     #clone fields


# Set callback to run when API is loaded
  google.setOnLoadCallback(drawVisualization)# >>>

    event.preventDefault()
    remove_fields(event)# >>>
  #animate panel icon# <<<
  $('.bearing_input').change ->
    if form_validation.valid()
      bearing = this.value - 45
