<script>
function setEqualHeight(columns)
{
var tallestcolumn = 0;
columns.each(
function()
{
currentHeight = $(this).height();
if(currentHeight > tallestcolumn)
{
tallestcolumn = currentHeight;
}
}
);
columns.height(tallestcolumn);
}
$(document).ready(function() {
setEqualHeight($(".columns > div"));
});
    
    $(function() {
	var Accordion = function(el, multiple) {
		this.el = el || {};
		this.multiple = multiple || false;

		// Variables privadas
		var links = this.el.find('.link');
		// Evento
		links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
	}

	Accordion.prototype.dropdown = function(e) {
		var $el = e.data.el;
			$this = $(this),
			$next = $this.next();

		$next.slideToggle();
		$this.parent().toggleClass('open');

		if (!e.data.multiple) {
			$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
		};
	}	

	var accordion = new Accordion($('#accordion'), false);
});
    
$(function () {
  $('[data-toggle="tooltip"]').tooltip()
})

   
$(function () {
  $('[data-toggle="popover"]').popover()
})

</script>

<script type="text/javascript">
        $(document).ready(function () {
			$('#cssmenu li.has-sub > a').on('click', function(){
				$(this).removeAttr('href');
				var element = $(this).parent('li');
				if (element.hasClass('open')) {
					element.removeClass('open');
					element.find('li').removeClass('open');
					element.find('ul').slideUp();
				}
				else {
					element.addClass('open');
					element.children('ul').slideDown();
					element.siblings('li').children('ul').slideUp();
					element.siblings('li').removeClass('open');
					element.siblings('li').find('li').removeClass('open');
					element.siblings('li').find('ul').slideUp();
				}
			});
			$('#cssmenu>ul>li.has-sub>a').append('<span class="holder"></span>');
        });

   $(document).on("mouseenter",".b-rating-stars li",function(){
	var b_index = $(this).index()+1;
	$(this).parent().find('li').each(function(i){
		if(b_index>i) $(this).addClass('b-hover');
	});
}).on("mouseleave",".b-rating-stars li",function(){
	$(this).parent().find('li').removeClass('b-hover');
});

</script>

