function [out] = wobbler_hyb(vial, buffer_start, hyb_temp, hyb_temp2, hyb_time, hyb_time2)

%for a 56C hyb, the washout temp should be set around 48 (tried 40, and it
%took forever).

%for small circle, diamond gasket:
REAGENT_VOL = 125;
CHASE_VOL = 200;

%for er285w:
%REAGENT_VOL = 125;
%CHASE_VOL = 225;

%for small circle, rectangular gasket:
%REAGENT_VOL = 125;
%CHASE_VOL = 250;

%for large rectangle:
%REAGENT_VOL = 125;
%CHASE_VOL = 300;

PAUSE_TIME = 10;
hyb_time = hyb_time * 60;
hyb_time2 = hyb_time2 * 60;
PREHEAT = 0;

%Put correct primer in reagent loop
disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Put specified primer (well ' num2str(vial) ') in reagent loop']);
out = ll_draw_reagent(vial, REAGENT_VOL);

%Wash needle, then add wash buffer to loop
disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Wash needle']);

disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Add wash buffer ' num2str(buffer_start) ' to loop']);
out = ll_draw_reagent(buffer_start, CHASE_VOL);

disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Wash needle']);
out = ll_needle_wash();

if(PREHEAT == 1)
    %Heat to denature
    disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Heating cell to initial 60C dgrees...']);
    set_slide_temp(60);
    for(i = 1:10)
        disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected)]);
        pause((120 / 10));
    end
end

%Heat to hyb temp
disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Heating cell to hyb temp...']);
set_slide_temp(hyb_temp);

%Perform hybridization
disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Primer ' num2str(vial) ' is hybridizing (' num2str(hyb_time) ' sec).']);
for(i = 1:20)
    disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected)]);
    pause((hyb_time / 20));
end

disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Allowing cell to reach hyb2 temp...']);
set_slide_temp(hyb_temp2);
pause(120);

%
%PUT THIS BACK IN ONCE ANALOG INPUT IS FIXED 12_21_05; SET_SLIDE_TEMP JUST BLOCKS FOR 2 MIN NOW
%curr_temp = get_slide_temp_corrected;
%while(curr_temp > hyb_temp2 + 0.5)
%    pause(2);
%    curr_temp = get_slide_temp_corrected;
%end

%Perform hybridization
disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Primer ' num2str(vial) ' is hybridizing (' num2str(hyb_time2) ' sec).']);
for(i = 1:20)
    disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected)]);
    pause((hyb_time2 / 20));
end

%disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Allowing cell to cool...']);
%set_slide_temp(20);

%disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Cooling...']);
%for(i = 1:2)
%    disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected)]);
%    pause((60 / 2));
%end


disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Washing primer out (5 washes)']);
disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Wash 1 of 5: ' num2str(buffer_start+1)]);
out = ll_draw_buffer_fast(500);

disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Wash 2 of 5: ' num2str(buffer_start+2)]);
out = ll_draw_buffer_fast(500);

disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Wash 3 of 5: ' num2str(buffer_start+3)]);
out = ll_draw_buffer_fast(500);

disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Wash 4 of 5: ' num2str(buffer_start+4)]);
out = ll_draw_buffer(500);

disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Wash 5 of 5: ' num2str(buffer_start+5)]);
out = ll_draw_buffer(500);

disp([timestamp(clock) ' ' num2str(get_slide_temp) ' ' num2str(get_slide_temp_corrected) '      Hybridization completed.']);
