/*window_resize - begin*/
var d = document;
var winIE = (navigator.userAgent.indexOf("Opera")==-1 && (d.getElementById &&  d.documentElement.behaviorUrns))  ? true : false;

function bodySize(){
	if(winIE && d.documentElement.clientWidth) {
		sObj = d.getElementsByTagName("body")[0].style;
		sObj.width = (d.documentElement.clientWidth<1000) ? "1000px" : "100%";
		$("#all_inside, #footer, #footer_contacts, #footer_copy").width((d.documentElement.clientWidth>1234) ? "1234px" : "auto");
	}
	
	if ($("#center .left_part").height() < $("#center .content").height()) $("#center .left_part").css("_margin-bottom:", "-100%");
}

function init(){
	if(winIE) { bodySize(); }
}
 
onload = init;

if(winIE) { onresize = bodySize; }
/*window_resize - end*/

$(document).ready(function() {
	$("#index_cat_tabs a").click(function() {
		$("#index_cat_items_wrapper .index_cat_items").addClass("hidden");
		$($(this).attr("href")).removeClass("hidden");
		$("#index_cat_tabs li").removeClass("current");
		$(this).parent().addClass("current");
		return false;
	});
	
	$("#ic_images").jCarouselLite({
		auto: 800,
		speed: 1000,
		visible: 6
	});
	
	if ($("#center .left_part").height() < $("#center .content").height()) $("#center .left_part").css("_margin-bottom:", "-100%");
	
	$(".dynamic_hdr").click(function() {
		var that = $(this);
		that.next(".dynamic_text").slideToggle();
		that.toggleClass("active");
		return false;
	});
	
	/*zebra stripping*/
	$("#center table:not(.layout) tr:nth-child(odd)").addClass("even");
	/*/zebra stripping*/
});
