// JavaScript Document

jQuery.fn.fadeToggle = function(speed, easing, callback) {
  return this.animate({opacity: 'toggle'}, speed, easing, callback);  
};
 
$(document).ready(function() {
	$('#tellfriend').hide();
  	$('#email, #tellfriend a.close').click(function() {
    $("#tellfriend").fadeToggle('slow');
  });
  
}); 

function save_mail() {
	
	

	
	$.post("/cl/mail.php", $("#tellafriend_form").serialize(), function(data){  
	
		//alert(result);
	       
     }, "json");
$('#tellfriend').hide();
	return false;

}

$('#tellafriend_form').submit(function() {
	save_mail();
  alert('Спасибо! С вами свяжуться в ближайшее время.');
  return false;
});





 
 
 
//Using jquery with prototype
var $j = jQuery.noConflict();
 
 
jQuery(document).ready(function($){
	
	$("#game_slider").easySlider(	{		
		prevText: '<img src="/i/s.gif" width="20" height="18">',
		nextText: '<img src="/i/f.gif" width="20" height="18">',		
		orientation: 'horisontal'
	})	
 
});
 
 
jQuery(document).ready(function($){
    $('#fakebody').css('min-height', $('#container').height() + 'px')
})
 
 
 
//toogle options
function option_toggle(obj) {
	if($j(obj).hasClass("opened")) { // switch off
		$j(obj).removeClass("opened")
	}
	else { // switch on
		$j(obj).addClass("opened")
	}
	return false;
}
 
 

