initKepek = function() {
	$('p.kepek a.lightboxStart').click(function(e) {
  	$('p.kepek a.lightbox:first').trigger('click', false);
    	e.preventDefault();
	});

	$('p.kepek img.kicsi').each(function(i,o) {
  	$(o).mouseover(function(o) {
    	var f = /filename=[a-zA-Z0-9+.,!?:…%_-]*/.exec(this.src),
      		url = $('p.kepek img.nagy').attr('src').replace(/filename=[a-zA-Z0-9+.,!?:…%_-]*/, f);
      $('p.kepek img.nagy').attr('src', url)
      $('p.kepek img.nagy').parent().attr('href', url);
    });
  });
}

gmaps_processPoint = function(key, id, name, coords) {
	var parts = coords.split(","),
  		lat = parseFloat(parts[0]),
		  lng = parseFloat(parts[1]),
			point = new GLatLng(lat,lng),
			marker = new GMarker(point);

	GEvent.addListener(marker, "click", function() {
        marker.openInfoWindowHtml(name);
    });
    gmaps.addOverlay(marker);

    $('#menu_uticel_' + id).mouseover(function(e) {
        gmarkers[key].openInfoWindowHtml(name);
        //e.preventDefault();
    });

    $('#menu_uticel_' + id).mouseout(function(e) {
        gmaps.closeInfoWindow();
    });
    return marker;
}

function iwiwshare_click() {
	var u = location.href, t = document.title;
	window.open('http://iwiw.hu/pages/share/share.jsp?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'iwiwshare', 'toolbar=0,status=0,location=1, width=650,height=600,scrollbars=1');
	return false;
}

function kalkulator_click() {
	// window.open('/szallashely/ek', 'eurokalkulator', 'toolbar=0,status=0,location=1, width=400,height=275,scrollbars=1');
	$("#dialog").dialog({minWidth: 410, minHeight: 275, resizable: false});
	return false;
}

$(document).ready(function() {
    initKepek();
    $('a.lightbox').lightBox({fixedNavigation:true});
    //swfobject.embedSWF('/swf/videoBanner.swf', 'videoBanner', '320', '240', '9.0.0', 'expressInstall.swf', false, {loop: true, wmode:'transparent'}, false);
		$('#euro_kalkulator a').click(function(e){
			e.preventDefault();
			kalkulator_click();
		});
});

