// Ultimele stiri & Latest news page
$(document).ready(function(){  
		var initial_hgt = $(".open_this").height();
		var the_others = new Array();
		$(".open_this").each(function(i){
			the_others[i] = $(this);
		});
		var how_many = the_others.length;
		$(".opener").each(function(){
			var trigger = $(this).find(".news_lk");
			var real_hgt = $(this).find(".open_this").children(":first").height();
			var x = $(this).find(".open_this");
			trigger.click(function(){
				if (x.css("height") == (initial_hgt + "px")){
					/*for(j=0;j<=how_many-1;j++){
						the_others[j].animate({
							height: initial_hgt+'px'
						},300);
						the_others[j].parent().find('.news_lk').removeClass('on');
					};*/
					$(".open_this").each(function(){
						if($(this).height() != initial_hgt){
							$(this).animate({
								height: initial_hgt+'px'
							},300);
							$(this).parent().find('.news_lk').removeClass('on');
						};
					});
					x.animate({
						height: real_hgt+'px'
					},300);
					trigger.addClass('on');
				} else {
					x.animate({
						height: initial_hgt+'px'
					},300, function(){trigger.removeClass('on');});
				}
			});
		});
});
// end Ultimele stiri & Latest news page

//carousel	
jQuery(document).ready(function() {
								
	jQuery('#mycarousel_23').jcarousel({
									   
});
// end carousel		
			
// fancy thickbox		
	$("a[rel=example_group]").fancybox({
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'titlePosition' 	: 'over',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-over">' + (title) + '</span>';
			}
		});	
	});
// end fancy thickbox


// taburi login
$(document).ready(function() {
	
	$('#log_type a').click(function () {
	$('#log_type a').removeAttr('class');
	$(this).attr('class','on');
	var a_id = $(this).attr('id');
	var sel_div = '#tab_'+a_id;
	$('#tabs .log_big').attr('style','display: none;');
	$(sel_div).attr('style','display: block;');
	});
	
});

// Servicii de cercetare page && Research services page
$(document).ready(function()  {
						   
		$('#r_open').hide();
		$('#show_mystery').hide();	
		
		$("#r_more").click(function(){
			$(this).toggleClass("active").next().slideToggle("slow");
			return false;
		});


		$("#m_mult").click(function(){
			$(this).toggleClass("active").parent().next().slideToggle("slow");
			return false;
		});
		
		$('#brand').click(function() {
			$('#brand_eq').addClass('underline_sp');
			$('#usage_att').removeClass('underline_sp');
			$('#product_conc').removeClass('underline_sp');
			$('#price_sens').removeClass('underline_sp');
			$('#customer_sat').removeClass('underline_sp');
			$('#mystery_sh').removeClass('underline_sp');
			$('#employee_sat').removeClass('underline_sp');
			
		});
		
		$('#usage').click(function() {
			$('#usage_att').addClass('underline_sp');
			$('#brand_eq').removeClass('underline_sp');
			$('#product_conc').removeClass('underline_sp');
			$('#price_sens').removeClass('underline_sp');
			$('#customer_sat').removeClass('underline_sp');
			$('#mystery_sh').removeClass('underline_sp');
			$('#employee_sat').removeClass('underline_sp');
			
		});
		
		$('#product').click(function() {
			$('#product_conc').addClass('underline_sp');
			$('#usage_att').removeClass('underline_sp');
			$('#brand_eq').removeClass('underline_sp');
			$('#price_sens').removeClass('underline_sp');
			$('#customer_sat').removeClass('underline_sp');
			$('#mystery_sh').removeClass('underline_sp');
			$('#employee_sat').removeClass('underline_sp');				
		});
		
		$('#price').click(function() {
			$('#price_sens').addClass('underline_sp');
			$('#product_conc').removeClass('underline_sp');
			$('#usage_att').removeClass('underline_sp');
			$('#brand_eq').removeClass('underline_sp');
			$('#customer_sat').removeClass('underline_sp');
			$('#mystery_sh').removeClass('underline_sp');
			$('#employee_sat').removeClass('underline_sp');					
		});
		
		$('#customer').click(function() {
			$('#customer_sat').addClass('underline_sp');
			$('#price_sens').removeClass('underline_sp');
			$('#product_conc').removeClass('underline_sp');
			$('#usage_att').removeClass('underline_sp');
			$('#brand_eq').removeClass('underline_sp');
			$('#mystery_sh').removeClass('underline_sp');
			$('#employee_sat').removeClass('underline_sp');							
		});
		
		$('#mytery').click(function() {
			$('#mystery_sh').addClass('underline_sp');
			$('#customer_sat').removeClass('underline_sp');
			$('#price_sens').removeClass('underline_sp');
			$('#product_conc').removeClass('underline_sp');
			$('#usage_att').removeClass('underline_sp');
			$('#brand_eq').removeClass('underline_sp');
			$('#employee_sat').removeClass('underline_sp');								
		});
		
		$('#employee').click(function() {
			$('#employee_sat').addClass('underline_sp');
			$('#mystery_sh').removeClass('underline_sp');
			$('#customer_sat').removeClass('underline_sp');
			$('#price_sens').removeClass('underline_sp');
			$('#product_conc').removeClass('underline_sp');
			$('#usage_att').removeClass('underline_sp');
			$('#brand_eq').removeClass('underline_sp');	
		});
});
// Servicii de cercetare page && Research services page
