/**
 * @package Archaic_Horizon
 * @copyright Copyright (c) 2009, Dan Bettles 
 * @author Dan Bettles <danbettles@yahoo.co.uk>
 */

archaichorizon.contact = {

    getFeature: function () {
        return jQuery('div#feature');
    },

    /**
     * Returns a reference to the "return" button
     * 
     * @return {jQuery}
     */
    getReturnButton: function () {
        return this.getFeature().find('p.pagecontrols a.return');
    },

    /**
     * Positions the "return" button to the left and top of the contact form
     */
    positionReturnButton: function () {
        archaichorizon.alignTo(this.getReturnButton(), this.getFeature(), 'lt');
    }
};

jQuery(function () {
    archaichorizon.contact.positionReturnButton();

    jQuery(window).resize(function () {
        archaichorizon.contact.positionReturnButton();
    });
});
