$(document).ready(function() {
	TIP.loadtip();	
});

var TIP = function() {
   
   function getTip()
	{
		var tipText = new Array ();
		
		tipText[0] = "Always read and follow instructions in the Owner/Operator Manual before loading and firing the firearm. Follow all instructions on the proper handling and safe use of the firearm.";
		tipText[1] = "Always familiarize yourself with any firearm before firing, and make sure the bore has been cleaned to remove any excess oil.";
		tipText[2] = "If the firearm is carelessly or improperly handled, unintentional discharge could result and could cause injury, death or damage to property";
		tipText[3] = "Always treat any firearm as if it was loaded. If someone hands you a firearm, always check to see if it is loaded with the muzzle pointed in a safe direction";
		tipText[4] = "Use only clean, dry, high quality commercially manufactured ammunition in good condition of the correct caliber for the firearm. Bushmaster does not recommend the use of remanufactured or hand loaded ammunition because it may damage your firearm";
		tipText[5] = "Always keep the muzzle pointed in a safe direction. Never point the muzzle at anything you do not intend to shoot.";
		tipText[6] = "Never load a firearm until ready for use";

		var i = Math.floor(Math.random()*tipText.length);
		
		return tipText[i];
	}
	
	return {
      loadtip : function() 
		{
			var tip = getTip();
			$('<p>' + tip + '</p>').appendTo("#tip1");
		}      
      	         
   };
	
}();