/**
 * Zentropy javascript core
 *
 * - Provides frequently used extensions to base javascript objects
 * - jQuery browser detection tweak
 * - Define functions used in events
 */

// Adds String.trim() method
String.prototype.trim = function(){
	return this.replace(/\s+$/, '').replace(/^\s+/, '');
}

// jQuery Browser Detect Tweak For IE7
jQuery.browser.version = jQuery.browser.msie && parseInt(jQuery.browser.version) == 6 && window["XMLHttpRequest"] ? "7.0" : jQuery.browser.version;

// Console.log wrapper to avoid errors when firebug is not present
// usage: log('inside coolFunc',this,arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function() {
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if (this.console) {
    console.log(Array.prototype.slice.call(arguments));
  }
};

// init object
var Zentropy = Zentropy || {};

/**
 * Image handling functions
 */
Zentropy.image = { _cache : [] };

// preload images
Zentropy.image.preload = function() {
  for (var i = arguments.length; i--;) {
    var cacheImage = document.createElement('img');
    cacheImage.src = arguments[i];
    Zentropy.image._cache.push(cacheImage);
  }
}
;
/**
 * Equal Heights Plugin
 * Equalize the heights of elements. Great for columns or any elements
 * that need to be the same size (floats, etc).
 * 
 * Version 1.0
 * Updated 12/10/2008
 *
 * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com) 
 *
 * Usage: $(object).equalHeights([minHeight], [maxHeight]);
 * 
 * Example 1: $(".cols").equalHeights(); Sets all columns to the same height.
 * Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall.
 * Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more
 * than 300 pixels tall. Elements with too much content will gain a scrollbar.
 * 
 */

(function($) {
	$.fn.equalHeights = function(minHeight, maxHeight) {
		tallest = (minHeight) ? minHeight : 0;
		this.each(function() {
			if($(this).height() > tallest) {
				tallest = $(this).height();
			}
		});
		if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
		return this.each(function() {
			if (maxHeight) {					  
				$(this).height(tallest).css("overflow","auto");
			} else {
				$(this).height(tallest);
			}
		});
	}
})(jQuery);;
jQuery(document).ready(function() { 
jQuery(".view-uc-products .views-row .inner .book-description").equalHeights();
jQuery("#block-views-quotes-block .view-content, #block-views-core-values-block .view-content").equalHeights();

jQuery(".quote-right").prepend('<q>&#8220;</q>').append('<q>&#8221;</q>');

jQuery(".view-uc-products .views-row::nth-child(3n+3)").css("margin-right", "0px");


jQuery('#block-views-articles-block-1 .views-row').hover(function(){
		jQuery(".hover-more", this).stop().animate({opacity: 1}, { duration: 500, queue: false });
	}, function() {
		jQuery(".hover-more", this).stop().animate({opacity: 0}, { duration: 500, queue: false });

});

jQuery('.ui-state-default a').append('<span/>');	

});;

