i think delay_ms function don't take variable, just constant, the compiler add this delays in code.
Build your own delay function or just use PWM module (didn't check DS of this PIC, correct me if it does not have one) , you changing both delays value, so basically you changing the blinking frequency.