You should really apply from your home country rather than from hte US. As part of the process, CIC will want to see that you have strong ties to your home country. This will be more difficult to prove if you are applying from the US. Also, the process can take many many months. Unless you plan to be in the US for over six months, the processing time may very well exceed the length of your visit.