Attempts to purchase a main shop item, returns result
        
        Uses the item's stock id and brr to navigate to the haggle page. Auotmatically downloads
        the OCR image from the haggle page and attempts to crack it. Submits the haggle form with
        the given price and returns if the item was successfully bought or not.
           
        Parameters:
           price (str) -- The price to buy the item for
           pause (int) -- The time in seconds to pause before submitting the haggle form
           
        Returns
           bool - True if successful, false otherwise
           
        Raises:
           failedOCR

def buy(self, price, pause=0):
        """ Attempts to purchase a main shop item, returns result
        
        Uses the item's stock id and brr to navigate to the haggle page. Auotmatically downloads
        the OCR image from the haggle page and attempts to crack it. Submits the haggle form with
        the given price and returns if the item was successfully bought or not.
           
        Parameters:
           price (str) -- The price to buy the item for
           pause (int) -- The time in seconds to pause before submitting the haggle form
           
        Returns
           bool - True if successful, false otherwise
           
        Raises:
           failedOCR
        """
        pg = self.usr.getPage("http://www.neopets.com/haggle.phtml?obj_info_id=%s&stock_id=%s&brr=%s" % (self.id, self.stockid, self.brr))
        form = pg.form(name="haggleform")
        
        form['x'], form['y'] = self.crackOCR(StringIO.StringIO(self.usr.getPage("http://www.neopets.com" + form.image).content))
        form['current_offer'] = price
        
        if pause != 0:
            time.sleep(pause)
        
        pg = form.submit()
        
        if "I accept" in pg.content:
            return True
        elif "You must select the correct pet" in pg.content:
            logging.getLogger("neolib.item").exception("Failed to crack OCR")
            raise failedOCR
        else:
            return False