function sendDialog(url, data) {    $.ajax({			url: '/' + _lang + url,			type: "post",			dataType: 'html',			data: data,			success: function(result)			{				$('#res').remove();				$('body').append('<div id="res"/>');				$('#res').html(result);				$('#res').lightbox_me({					centered: true,					zIndex: 1000,					onLoad: function() {					//					}				});			}		});}$(document).ready(function(){	var $body = $('body');	var is_home = $body.hasClass('homepg');	//lightbox	if (!is_home) {		$('a[rel=lightbox]').nyroModal({			'zIndexStart' : 810		});	}	if (is_home) {	    		function showSlider() {			var cf = new ContentFlow('contentFlow', {				onInit: function() {					$('a[rel=lightbox]').nyroModal({						'zIndexStart' : 810					});				},				onclickActiveItem: function(){},				visibleItems: '2',				endOpacity : '0.9',				relativeItemPosition: 'cetner center',				reflectionHeight: 0			});			cf.init();		}		$.preload('.flow .content', {			onFinish: showSlider		});	}	//lang	$('#lang-select').change(function(){		location.href = $(this).val();	});	//target blank fix	$('a[rel=_blank]').click(function(e){		e.preventDefault();		window.open($(this).attr('href'));	});	//height fixes	var footer = 211;	var header = 80;    	//    $('.gingerale .container').height($('body').height() - header - footer);	//    if($('.gingerale .container').height() < 473) $('.gingerale .container').css('backgroundPosition', 'center top');	//online order	$('a[rel=online]').click(function(e){		e.preventDefault();		$.ajax({			url: '/' + _lang + '/online/dialog',			type: "post",			dataType: 'html',			success: function(result)			{				$('#online').remove();				$('body').append('<div id="online"/>');				$('#online').html(result);				$('#online').lightbox_me({					centered: true,					zIndex: 1000,					onLoad: function() {                        $('#online form').submit(function(){                            $('.lb_overlay').remove();                            $('#online').remove();                            sendDialog('/online/send', $(this).serialize());                        });					}				});			}		});	});	//contacts dialog	$('a[rel=contacts]').click(function(e){		e.preventDefault();		$.ajax({			url: '/' + _lang + '/contacts/dialog',			type: "post",			dataType: 'html',			success: function(result)			{				$('#contacts').remove();				$('body').append('<div id="contacts"/>');				$('#contacts').html(result);				$('#contacts').lightbox_me({					centered: true,					zIndex: 1000,					onLoad: function() {                        $('#contacts form').submit(function(){                            $('.lb_overlay').remove();                            $('#contacts').remove();                            sendDialog('/contacts/send', $(this).serialize());                        });					}				});			}		});	});	//video	$('.videoplayer').click(function(e){		e.preventDefault();		var video_id = $(this).attr('rel');		$.ajax({			url: '/' + _lang + '/products/video',			type: "post",			data: {				'video_id' : video_id			},			dataType: 'html',			success: function(result)			{				$('#video').remove();				$('body').append('<div id="video"/>');				$('#video').html(result);				$('#video').lightbox_me({					centered: true,					zIndex: 1000,					onLoad: function() {					//					}				});			}		});	});});
