// JavaScript Document

$().ready(function(){
	$('#et_keywords').hide();
	$('#close_img').hide();
		$('#freq_kw_link').toggle(function() {
		  $('#et_keywords').show();
		  $('#close_img').show();
		  $('#close_click').show();
		  $('.freq_kw_normal_img').hide();
		  $('.freq_kw_normal a').css('top','-6px');
		  $('.freq_kw_normal a').css('left','5px');
		  // the browse catalogue link (in navigation) is also clickable even if we 
		  // set the the links block to absolutue
		  // so we are disabling it here
		 /* $('[href="hotels-selection.php"]').css('display','none');*/
		  $('[href="hotels-selection.php"] + img').css('display','none');
		  $('[href="catalogue.php?cat=0"] + img').css('display','none');
		  
	  	  $('.freq_kw_normal').addClass('freq_kw_down');
		  
		  // showing the close button
		  $('#freq_kw_link').addClass('freq_link_close_img');
		  
		  // dynamic absolute position handler of links
		  $('.content').css('padding-bottom',150);
		  var offset = $('#keywords_place_holder').offset();
		  from_top = offset.top;
		  $('#et_keywords').css('top',from_top);
		  $('#et_keywords').css('left',769);
		  $('.freq_kw').css('height',$('#et_keywords').height()+30);
		  
		  
		}, function() {
		  $('#et_keywords').hide();
		  $('#close_img').hide();
		  
		  $('.freq_kw_normal_img').show();
		  $('.freq_kw_normal a').css('top','0px');
		 /* $('[href="hotels-selection.php"]').css('display','inline');*/
		 $('[href="hotels-selection.php"] + img').css('display','inline');
		  $('[href="catalogue.php?cat=0"] + img').css('display','inline');
		  
		  
		  $('.freq_kw_normal').removeClass('freq_kw_down');
		  $('.freq_kw').css('height','2px');
	});
	
	$('#close_click').click(function(){
		$('#et_keywords').hide();
		$('#close_click').hide();
		$('#close_img').hide();
		
		$('.freq_kw_normal_img').show();
		$('.freq_kw_normal a').css('top','0px');
		$('[href="catalogue.php?cat=0"]').css('display','inline');
		$('.freq_kw_normal').removeClass('freq_kw_down');
		$('.freq_kw').css('height','2px');
	});
	  
});
