﻿var jq = jQuery.noConflict();

swfobject.registerObject("FlashID");

jq(function(){
 var index = 0;
 jq("#num span").mouseover(function(){
index  =  jq("#num span").index(this);
showImg(index);
});	
 jq('#side').hover(function(){
  if(MyTime){
 clearInterval(MyTime);
  }
 },function(){
  MyTime = setInterval(function(){
    showImg(index)
index++;
if(index==4){index=0;}
  } , 5000);
 });
 var MyTime = setInterval(function(){
showImg(index)
index++;
if(index==4){index=0;}
 } , 5000);
})
function showImg(i){
jq("#pic img")
.eq(i).stop(true,true).fadeIn(800)
.parent().siblings().find("img").hide();
jq("#info p")
.eq(i).stop(true,true).fadeIn(800)
.siblings().hide();
 jq("#num span")
.eq(i).addClass("the")
.siblings().removeClass("the");
}


(function(jq) {
	 
	jq.fn.equalizeCols = function(){
		var height = 0,
			reset = jq.browser.msie ? "1%" : "auto";
  
		return this
			.css("height", reset)
			.each(function() {
				height = Math.max(height, this.offsetHeight);
			})
			.css("height", height)
			.each(function() {
				var h = this.offsetHeight;
				if (h > height) {
					jq(this).css("height", height - (h - height));
				};
			});
			
	};
	
})(jQuery);

var jqels = jq("#eq1, #eq2, #eq3").equalizeCols();

function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"hover":"";
con.style.display=i==cursel?"block":"none";

}
}