function setSelect(value) {

	$("select.manage option[value="+value+"]").attr("selected",true);

}

function checkAll(element) {

	$('input.'+element).attr('checked','checked');

}

function filterFinder() {

	var make = $('#brand :selected').val();
	var price = $('#price :selected').val();
	var type = $('#type :selected').val();

	document.location.href= siteurl+'search/finder/'+price+'/'+make+'/'+type;

}

function showImage(thumb, productid, show) {

	if(show == 1) {

		$('#showImage-'+productid).css('display', 'block');
		$("#showImage-"+productid).html('<img src="'+siteurl+'assets/data/product/thumbs/'+thumb+'" />');

	}

	if(show == 2) {

		$('#showImage-'+productid).css('display', 'none');

	}

}

function showBrand() {
	
	$('.ref-brand').slideDown();
	$('#view-more').css('display', 'none');
	
}

function reportProduct(productid) {

	if(productid > 0) {

		$.post(siteurl+"product/areport/jf0aw9eur930", { pid: productid },
		function(data){

			$('#product-'+productid).html(data);

		}
		);

	}

}
