$(document).ready(function() {
	
	$("ul#top_offer").liScroll({travelocity: 0.02}); 
	
	$("a[id^='lang_nav_']").mouseover(function () { 
		var id = $(this).attr('id').replace('lang_nav_', '');
		$('#'+id+'_flag').attr('src', IMGPATH + id + '-over.jpg');
	});
	
	$("a[id^='lang_nav_']").mouseout(function () { 
		var id = $(this).attr('id').replace('lang_nav_', '');
		$('#'+id+'_flag').attr('src', IMGPATH + id + '.jpg');
	});
	
	$("a[id^='nav_']").mouseover(function () { 
		var id = $(this).attr('id').replace('nav_', '').split('_');
		$('#nav_'+id[0]+'_img_'+id[1]).attr('src', IMGPATH + id[1] + '-' + id[0] + '-over.gif');
		
	});
	
	$("a[id^='nav_']").mouseout(function () { 
		var id = $(this).attr('id').replace('nav_', '').split('_');
		$('#nav_'+id[0]+'_img_'+id[1]).attr('src', IMGPATH + id[1] + '-' + id[0] + '.gif');
	});
	
	$(".print").click(function () { 
		$.jPrintArea('#print_area');
		return false;
	});
	
	$(".tooltip").click(function () {
		if ($('#tooltip_container').css('display')=='none') {
			//$('#tooltip_container').show('slow');
			$('#tooltip_container').fadeIn('slow');
		} else {
			//$('#tooltip_container').hide('slow');
			$('#tooltip_container').fadeOut('slow');
		}
		return false;
	});
	

	    // find all the input elements with title attributes
		$('input[title!=""]').hint();

		// CYCLE plugin
        $('#cycle a').each(function() {
			$(this).css({left: '25px'});
			//$(this).css({left: '50%', marginLeft: -$(this).width()/2});
        });
	
		$('#cycle').cycle({ 
		fx:     'fade', 
		timeout: 4000, 
		delay: -2000 ,
		before :  function () {
			$('#cycle_container').height($(this).height());
		}
	});
						
});