$(document).ready(function(){

// these functions are for the landing page cookie settings.
	
  	$('#ebc').click(function() {  // east campus
		$.ajax({
   			type: "GET",
   			url: "/cookie/ebc",
			dataType: "html",
   			success: function(html){
    				$("#viewDialog").append(html);

				$( "#viewDialog" ).dialog({
					minHeight: 140,
					modal: true,
					close: function(ev, ui) {window.location.reload();}
				});
  			}
 		});
	});

	
  	$('#wbc').click(function() { // west campus
		$.ajax({
   			type: "GET",
   			url: "/cookie/wbc",
			dataType: "html",
   			success: function(html){
    				$("#viewDialog").append(html);

				$( "#viewDialog" ).dialog({
					minHeight: 140,
					modal: true,
					close: function(ev, ui) {window.location.reload();}
				});
  			}
 		});
	});


  	$('#oc').click(function() {  // online campus
		$.ajax({
   			type: "GET",
   			url: "/cookie/oc",
			dataType: "html",
   			success: function(html){
    				$("#viewDialog").append(html);

				$( "#viewDialog" ).dialog({
					minHeight: 140,
					modal: true,
					close: function(ev, ui) {window.location.reload();}
				});
  			}
 		});
	});




//events for the quick select dropdown

  	$('input.ebc').live('click', function() { // east campus radio
		$.ajax({
   			type: "GET",
   			url: "/cookie/ebc",
			dataType: "html",
   			success: function(html){
    				$("#viewDialog").append(html);

				$( "#viewDialog" ).dialog({
					minHeight: 140,
					modal: true,
					close: function(ev, ui) {window.location.reload();}
				});
  			}
 		});
	});



  	$('input.wbc').live('click', function() { // west campus radio
		$.ajax({
   			type: "GET",
   			url: "/cookie/wbc",
			dataType: "html",
   			success: function(html){
    				$("#viewDialog").append(html);

				$( "#viewDialog" ).dialog({
					minHeight: 140,
					modal: true,
					close: function(ev, ui) {window.location.reload();}
				});
  			}
 		});
	});



  	$('input.oc').live('click', function() { // online campus radio
		$.ajax({
   			type: "GET",
   			url: "/cookie/oc",
			dataType: "html",
   			success: function(html){
    				$("#viewDialog").append(html);

				$( "#viewDialog" ).dialog({
					minHeight: 140,
					modal: true,
					close: function(ev, ui) {window.location.reload();}
				});
  			}
 		});
	});

});
