$(function () {
			
		

		
		// SOCIAL ICONS
		$('#social img').css('opacity', 0.5);
		$('#social img').hover( 
		// hover state
		function() {$(this).css('opacity', 1.0);},
		// back to off
		function() {$(this).css('opacity', 0.7);});
		
		
		// accordeon hover
		$('.accordion li').css('background', 'none');
		$('.accordion li').hover( 
		// hover state
		function() {$(this).css('background', '#f6f6f6');},
		// back to off
		function() {$(this).css('background', 'none');});
		
		


					
$('#submeniu_2').each(function(i){
$('ul:first', this).addClass( 'first' );
$('ul:last', this).addClass( 'end' );	});


				

		
		var tabContainers = $('div.taburi > div');
		tabContainers.hide();//.filter(':first').show();
		$('div.taburi a.drop').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).fadeIn();
				$('div.taburi a').removeClass('active');
				$(this).addClass('active');
				return false;
				
		});
// CAROUSEL
$('div.taburi a#companie').addClass('active');
$('div#companie').show();
$('div.submeniu a').fadeIn();

$("#meniu_1 a").each(function() {
if(this.href == window.location) $(this).addClass("selectat");
}); 
$(".submeniu a").each(function() {
if(this.href == window.location) $(this).addClass("selectat");
}); 





    $('#s4') 
	.before('<div id="slider_nav">') 
	.cycle({ 
    fx:     'turnRight', 
    speed:  'slow', 
    timeout: 6000, 
    pager:  '#slider_nav'
	});
	
	    $('#s5') 
	.before('<div id="slider_nav2">') 
	.cycle({ 
    fx:     'turnRight', 
    speed:  'slow', 
    timeout: 6000, 
    pager:  '#slider_nav2'
	});
	
	
	
//ACORDEON

	$('ul#moloz').accordion();

//SUBMENIU >>

$('a.ambient').lightBox({fixedNavigation:true});





//lista hover
$('#lista_colectie li').hover (
				function() {$(this).css('background', '#e2e2e2');},
				function() {$(this).css('background', '#f0f0f0');});


//lista diplome si premii hover
$('.diplome li').hover (
				function() {$(this).css('background', '#e2e2e2');},
				function() {$(this).css('background', '#f6f6f6');});

//lista comunicate hover
$('.comunicate li').hover (
				function() {$(this).css('background', '#e2e2e2');},
				function() {$(this).css('background', '#f6f6f6');});


//INAPOI SUS
$('.backtotop').click(function(){
		$('html, body').animate({scrollTop:0}, 'slow');
	});
							 

$('#submeniu_2 ul').hover(
				 
      function () {
		$('.drop_2 li:first', this).addClass( 'first' );
		$('.drop_2 li:last', this).addClass( 'last' );		  
        $('.arrow', this).addClass('arrow_down'); 
        $('ul', this).slideDown(200);

      }, 
      function () {
        obj = this;

        $('.drop_2', this).slideUp(200, function(){ $('.arrow', obj).removeClass('arrow_down'); });
		

      });

//SWAP VALUES
    swapValues = [];
    $(".swap_value").each(function(i){
        swapValues[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapValues[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapValues[i]);
            }
        });
    });
	
	
//FILETYPE ICONS
var fileTypes = {
  doc: 'imgs/OfficeWord.png',
  jpg: 'imgs/jpg.gif',
  pdf: 'imgs/pdf.gif'
};
 
$('#files a').each(function() {
 
  var $a = $(this);
  var href = $a.attr('href');
 
  if (
    (href.match(/^http/)) &&
    (! href.match(document.domain))
  ) {
 
    // use a special image for external links
    var image = 'external.gif';
 
  } else {
    // get the extension from the href
    var hrefArray = href.split('.');
    var extension = hrefArray[hrefArray.length - 1];
 
    var image = fileTypes[extension];
  }
 
  if (image) {
    $a.css({
      paddingLeft: '40px',
      background: 'transparent url("' + image + '") no-repeat center left'
    });
  }
 
});

//SFATURI UTILE HIDE SHOW
  $('div.faq:eq(0)> p').hide();
  $('div.faq:eq(0)> h5').click(function() {
 $(this).next().slideToggle('fast');
  });



		

		});





		
