1st hand- this is the tough one...JJ is a hand where players, (often short-stacks) see and start lickin thier chops for. when really if you are a average stack this hand brings a little bit of difficulty. when holding JJ any A, K, Q on the flop is a bad card. providing you do not hit your set, there are 12 cards to beat your hand. by raising a hand like this strongly from middle position, you commit yourself to calling all-in. which you never really want to do. because if you are going to get re-raised all-in , you are most likely beat, or a coin flip, (AK AQ KK QQ). however a lot of times you could be ahead with the chip leader holding a smaller pair to your J's.
depending on how the tournament has been played, and your perception of the table, (how much of a bet is repsected by players and the blinds especially) i would post a standard bet of about 2.5-3xBB. in most cases this may allow you to see a flop, for minimal cost. if a rag flop comes such as 762 rainbow, i suggest a check raise, or big bet out, depending on your opponents image, if he likes to bet out at flops, let him bet out then put the hammer to him once he has commited chips. if he is a fish, you put the hammer to him right away. i don't suggest going all-in with JJ from middle mainly because if you get called you are mostof the time beat, or in a coinflip. and considering you still have 10XBB, hold on to those, a better situation will arise.
the second hand was done perfectly, just unlucky.
hope this helps, gl