﻿$(document).ready(function(){
$("'a[title='預約']").click(function() {
        var url = $("#weburl").val();
         var select1 = $("#select1").attr("courseid");
        
         if($("#select1").val()!="" && $("#select1").val()!="-1" && $("#select1").val()!=undefined)
         {
         window.location.href = url+"/course/apply.aspx?classid="+$("#select1").attr("courseid")+"&courseid="+$("#select1").val()+"&typeid=1";
         return false;
         }
         if($("#select2").val()!="" && $("#select2").val()!="-1" && $("#select2").val()!=undefined)
         {
         window.location.href = url+"/course/apply.aspx?classid="+$("#select2").attr("courseid")+"&courseid="+$("#select2").val()+"&typeid=1";
         return false;
         }
         });
});
