/*--------------------------------------------------------------------------*
 * 
 * Volusion(C) PowerReviews(C) Integration (Dakota)
 * 
 * Version 1.0.7
 * 
 * Copyright (C) 2009 Brand Labs LLC
 * 
 *--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*
 * PowerReviews Configuration
 *--------------------------------------------------------------------------*/
DakotaSettings.MERCHANT_ID = 11095;
/*--------------------------------------------------------------------------*/


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

DakotaSettings.OVERRIDE_STYLE_SHEET_HTML = '<link type="text/css" rel="stylesheet" href="http://cdn.powerreviews.com/aux/11095/5505/css/powerreviews_express.css"/>';
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;
/*--------------------------------------------------------------------------*/


/*--------------------------------------------------------------------------*
 * Custom Product Detail Configuration
 *--------------------------------------------------------------------------*/
var BelowProductPhotoAndButtonDocument = Class.create(FixedLocationDocument, {
	IMAGE_ELEMENT_ID: 'product_photo',
	ANCHOR_ELEMENT_ID: 'product_photo_zoom_url',
	
	addElementToFixedLocation: function(element) {
		var 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();
		//Nothing exit
		if(container == null) {
			return;
		}

		//Add element after container
		container.insert(element);
	}
});
DakotaSettings.REVIEW_SNIPPET_DOCUMENT = new BelowProductPhotoAndButtonDocument('dakota_review_snippet');
/*--------------------------------------------------------------------------*/


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