
$(document).ready(function(){


	// tabs
	$(".tabs A").click(function(){
		if (!$(this).parent().hasClass("tab-current")) {
		
			$(this).parent().addClass("tab-current").siblings().removeClass("tab-current")
			
			$("#"+this.href.split("#")[1]).show().siblings(".t1").hide()
			
			}
		return false
		})
		
	$(".cpt_params_lists > select ").change(function(){


	
		if(!$("#id_"+this.options[this.selectedIndex].value).length){
		$(".param_"+this.options[this.selectedIndex].title).siblings().hide();
		$(".cur-"+this.options[this.selectedIndex].title).show();
		}
			
			$("#id_"+this.options[this.selectedIndex].value).show().siblings(".param_"+this.options[this.selectedIndex].title).hide()
			$("#id_"+this.options[this.selectedIndex].value).attr({name :"param_"+this.options[this.selectedIndex].title}).siblings().removeAttr("name") 
			
		
		})
		
 jQuery("#openAddSearchForm").toggle(function(){
 var obj = jQuery(this);
 var offset = obj.offset();
 jQuery("div.addSearchForm").css({top:offset.top,left:offset.left-390}).animate({height: "show"}, 300);
 },
 function(){
 jQuery("div.addSearchForm").animate({height: "hide"}, 300);
 }
 ); 

});

