var products = [
	'meer', 
	'suess', 
	'austern', 
	'muscheln', 
	'shrimps', 
	'matjes', 
	'kaviar', 
	'rauch', 
	'lachs', 
	'leber',
	'gesund' 
]

function initialize() {
  var latlng = new google.maps.LatLng(48.1372884, 16.3595778);
  var myOptions = {
    zoom: 13,
    center: latlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
	  navigationControl: false,
	  mapTypeControl: false,
	  scaleControl: false
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

	var contentString = '<div id="content">'+
			'test' +
	    '</div>';
	
	var infowindow = new google.maps.InfoWindow({
	    content: contentString
	});
	
	var marker = new google.maps.Marker({
	    position: latlng,
	    map: map,
	    title:"Eishken Estate Rauch- und Frischfischvertriebs GmbH"
	});
	
	google.maps.event.addListener(marker, 'click', function() {
	  infowindow.open(map,marker);
	});

}

$(document).ready(function(){
/* 	Cufon.replace('h1'); */
/* 	initialize();		 */

	if ($('.main').attr('class') == 'main prods') {
		$('#product-list').show(0.1);
	}
	
	jQuery.each(products, function(i, val) {		
		if ($('.main').attr('class') == 'main prods ' + val) {		
				if ($.browser.mozilla) {
					i.toFixed();
					switch (i) {
	  				case 0: i = 2; break;
	  				case 1: i = 4; break;
	  				case 2: i = 6; break;
	  				case 3: i = 8; break;
	  				case 4: i = 10; break;
	  				case 5: i = 12; break;
	  				case 6: i = 14; break;
	  				case 7: i = 16; break;
	  				case 8: i = 18; break;
	  				case 9: i = 20; break;
	  				case 10: i = 22; break;
	  				case 11: i = 24; break;
					}
				} else {
					i.toFixed();
					i = i+1;
				}				
				$('.nav .subnav a:eq('+ i +')').addClass('active');
/*
				console.log(
					'offset: 2; '+ $('.subnav a:eq(2)').text() +
					'| offset: 4; '+ $('.subnav a:eq(4)').text() +
					'| offset: 6; '+ $('.subnav a:eq(6)').text() +
					'| offset: 8; '+ $('.subnav a:eq(8)').text() +
					'| offset: 10; '+ $('.subnav a:eq(10)').text() +
					'| offset: 12; '+ $('.subnav a:eq(12)').text() +
					'| offset: 14; '+ $('.subnav a:eq(14)').text()
				);
*/
/*
				var test = '.nav .subnav a:eq('+ offset +')';
				console.log(test);
*/
/* 				console.log('offset: '+ offset +'; '+ $(test).text()); */
		}
	});
		
	$('#nl-email').click(function(){
		var def = 'e-mail@domain.com';
		var curr = $(this).val();		
		if (curr == def) $(this).val('');
	});

	$('#nl-email').blur(function(){
		var def = 'e-mail@domain.com';
		var curr = $(this).val();		
		if (curr == '') $(this).val(def);
	});

	$('#nl-fn').click(function(){
		var def = 'Vorname';
		var curr = $(this).val();		
		if (curr == def) $(this).val('');
	});

	$('#nl-fn').blur(function(){
		var def = 'Vorname';
		var curr = $(this).val();		
		if (curr == '') $(this).val(def);
	});

	$('#nl-ln').click(function(){
		var def = 'Nachname';
		var curr = $(this).val();		
		if (curr == def) $(this).val('');
	});

	$('#nl-ln').blur(function(){
		var def = 'Nachname';
		var curr = $(this).val();		
		if (curr == '') $(this).val(def);
	});

});
