/*--------------------------------------------------------------------------*
 * 
 * Volusion(C) PowerReviews(C) Integration (Dakota)
 * 
 * Version 1.0.8
 * 
 * Copyright (C) 2009 Brand Labs LLC
 * 
 *--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*
 * PowerReviews Configuration
 *--------------------------------------------------------------------------*/
DakotaSettings.MERCHANT_ID = 12417;
DakotaSettings.OVERRIDE_STYLE_SHEET_HTML = '<link type="text/css" rel="stylesheet" href="http://www.lamin-x.com/v/dakota/css/powerreviews_express.css"/>';
/*--------------------------------------------------------------------------*/


/*--------------------------------------------------------------------------*
 * PowerReviews Configuration
 *--------------------------------------------------------------------------*/
DakotaSettings.ENABLED = true;

var BelowProductPhotoAndAlternatePhotos = Class.create(BelowProductPhotoAndButtonDocument, {
	addElementToFixedLocation: function($super, element) {
		var container = null;
		
		try {
			container = $(this.ANCHOR_ELEMENT_ID);
			
			//Make sure something is available
			if(container == null) {
				container = $(this.IMAGE_ELEMENT_ID);
			}
			//If still do not have a container, exit
			if(container == null) {
				return;
			}		
			
			//Go to parent
			container = container.up().up().up().up().up();
			//Nothing exit
			if(container == null) {
				return;
			}
			
			//Add element after container
			container.insert(element);
		}
		catch(e){
			$super(element);
		}
	}
});

DakotaSettings.REVIEW_SNIPPET_DOCUMENT = new BelowProductPhotoAndAlternatePhotos('dakota_review_snippet');
DakotaSettings.REVIEW_DOCUMENT = new BelowProductDescriptionDocument('dakota_review');
DakotaSettings.CATEGORY_REVIEW_SNIPPET_DOCUMENT = BelowAnonymousLocationDocument;
DakotaSettings.CATEGORY_REVIEW_SNIPPET_CSS_CLASS = 'dakota_review_snippet_category';
DakotaSettings.CATEGORY_MINIMUM_REVIEWS_TO_DISPLAY = 1;
DakotaSettings.PRODUCT_MINIMUM_REVIEWS_TO_DISPLAY = 0;
/*--------------------------------------------------------------------------*/


/*--------------------------------------------------------------------------*
 * Start up the module
 *--------------------------------------------------------------------------*/
try {
	Dakota.load();
}
catch(e) {/*No-op*/}
/*--------------------------------------------------------------------------*/
