function AccumulatorsItems(typeId, brandId){
	post = 'typeId=' + typeId.value + '&brandId=' + brandId.value;
	url = typeof(language)  == 'undefined' ? "/accumulator/childrensoptions" :  "/accumulator/index";
	$.post(url, post, function(data){
	});
}


function SelectAccumulatorItem(id){
	post = 'itemId=' + id ;
	url = typeof(language)  == 'undefined' ? "/accumulator/childrens/view/options" : language + "/accumulator/childrens";
	$.post(url, post, function(data){
	    container = $("#accumulators-"+id).parents("div.accumulators-container:first");
	    $(container).children(".accumulators-container:first").replaceWith(data);
	});
}

function AccumulatorTypeChange(sender){
	post = 'itemId=' + $(sender).val() ;
	$("#accumulators-block-brand").attr('disabled', 'disabled');
	url = typeof(language)  == 'undefined' ? "/accumulator/childrensoptions" : language + "/accumulator/childrensoptions";
	$.post(url, post, function(data){
		$("#accumulators-block-brand").html(data).removeAttr('disabled');
	});
}

function AccumulatorFotoVideo(id){
	post = 'itemId=' + id;
	$("#accumulators-marks").attr('style', 'display: none;');
	$("#accumulators-battery").attr('style', 'display: none;');	
	url = typeof(language)  == 'undefined' ? "/accumulator/accumulatorselect" : language + "/accumulator/accumulatorselect";
	$.post(url, post, function(data){
		$("#accumulators-brand").html(data);
	});
	$("#accumulators-brand").attr('style', 'display: block');
}

function AccumulatorBrand(id){
	post = 'itemId=' + id;
	$("#accumulators-marks").attr('style','display: none;');
	$("#accumulators-battery").attr('style','display: none;');
	url = typeof(language)  == 'undefined' ? "/accumulator/brand" : language + "/accumulator/brand";
	$.post(url, post, function(data){
		$("#accumulators-marks").html(data);
	});
	$("#accumulators-marks").attr('style','display: block;height:200px;overflow:auto;width:480px;');
}

function AccumulatorMarks(id){
	post = 'itemId=' + id;
	url = typeof(language)  == 'undefined' ? "/accumulator/battery" : language + "/accumulator/battery";
	$.post(url, post, function(data){
		$("#accumulators-battery").html(data);
	});
	$("#accumulators-battery").attr('style','display: block');
}
$(document).ready(function(){
	$("#accumulators-foto-video a").live('click', function(){
		$("#accumulators-foto-video a").removeClass('shadow');
		$(this).addClass('shadow');
	});
});
$(document).ready(function(){
	$("#accumulators-brand a").live('click', function(){
		$("#accumulators-brand a").removeClass('shadow');
		$(this).addClass('shadow');
	});
});
$(document).ready(function(){
	$("#accumulators-marks a").live('click', function(){
		$("#accumulators-marks a").removeClass('shadow');
		$(this).addClass('shadow');
	});
}); 
$(document).ready(function(){
	$("#accumulators-battery a").live('click', function(){
		$("#accumulators-battery a").removeClass('shadow');
		$(this).addClass('shadow');
	});
});






function SelectAccumulatorItemAdmin(id){
	post = 'itemId=' + id ;
	url = typeof(language)  == 'undefined' ? "/admin/childrens/view/options" : language + "/admin/childrens";
	$.post(url, post, function(data){
	    container = $("#accumulators-"+id).parents("div.accumulators-container:first");
	    $(container).children(".accumulators-container:first").replaceWith(data);
	});
}

function AccumulatorTypeChangeAdmin(sender){
	post = 'itemId=' + $(sender).val() ;
	$("#accumulators-block-brand").attr('disabled', 'disabled');
	url = typeof(language)  == 'undefined' ? "/admin/childrensoptions" : language + "/admin/childrensoptions";
	$.post(url, post, function(data){
		$("#accumulators-block-brand").html(data).removeAttr('disabled');
	});
}

function AccumulatorFotoVideoAdmin(id){
	post = 'itemId=' + id;
	$("#accumulators-marks").attr('style', 'display: none;');
	$("#accumulators-battery").attr('style', 'display: none;');	
	url = typeof(language)  == 'undefined' ? "/admin/accumulatorselect" : language + "/admin/accumulatorselect";
	$.post(url, post, function(data){
		$("#accumulators-brand").html(data);
	});
	$("#accumulators-brand").attr('style', 'display: block');
}

function AccumulatorBrandAdmin(id){
	post = 'itemId=' + id;
	$("#accumulators-marks").attr('style','display: none;');
	$("#accumulators-battery").attr('style','display: none;');
	url = typeof(language)  == 'undefined' ? "/admin/brand" : language + "/admin/brand";
	$.post(url, post, function(data){
		$("#accumulators-marks").html(data);
	});
	$("#accumulators-marks").attr('style','display: block;height:200px;overflow:auto;width:480px;');
}

function AccumulatorMarksAdmin(id){
	post = 'itemId=' + id;
	url = typeof(language)  == 'undefined' ? "/admin/battery" : language + "/admin/battery";
	$.post(url, post, function(data){
		$("#accumulators-battery").html(data);
	});
	$("#accumulators-battery").attr('style','display: block');
}
