doc = 0;
$(document).ready(function() {
	$("#primenav li").hover(
	  function () {
	    $(this).addClass("over");
	  },
	  function () {
	    $(this).removeClass("over");
	  }
	);
	$("#subnav li").hover(
	  function () {
	    $(this).addClass("over");
	  },
	  function () {
	    $(this).removeClass("over");
	  }
	);
	$('#gallery_presse img').css("cursor", "pointer");
	$("#gallery_presse img").hover(
	  function () {
	    $(this).addClass("over");
	  },
	  function () {
	    $(this).removeClass("over");
	  }
	);
	$('#gallery img').css("cursor", "pointer");
	$("#gallery img").hover(
	  function () {
	    $(this).addClass("over");
	  },
	  function () {
	    $(this).removeClass("over");
	  }
	);
	$('#gallery img').each(function(i) {
		$(this).click(function() {
			$('#hint').removeClass("h");
			$('#prog').removeClass("h");
			vari = "#des_"+(i+1)+"_b";
			doc = (i+1);
			$('#big_img img').hide();
			$(vari).show();
		});
	});
	$('#big_img').removeClass("h");
	$('#big_img img').hide();
	$('#prog').change(function() {
		switch(doc) {
			case 1:
			durl = "tropic";
			break;
			case 2:
			durl = "valentine";
			break;
			case 3:
			durl = "ostern";
			break;
			case 4:
			durl = "weihnachten";
			break;
			case 5:
			durl = "iloveyou";
			break;
			case 6:
			durl = "geburtstag";
			break;
		}
		if($('#prog').val() == "p" && doc != 0) {
			window.open('vorlagen/designvorlagen/powerpoint/'+durl+'.zip');
		}
		if($('#prog').val() == "w" && doc != 0) {
			window.open('vorlagen/designvorlagen/word/'+durl+'.zip');
		}
		if($('#prog').val() == "j" && doc != 0) {
			window.open('vorlagen/designvorlagen/profis/'+durl+'.zip');
		}
		$('#prog').empty();
		$('#prog').append('<option value="">Bitte wählen</option><option value="w">Word</option><option value="p">Powerpoint</option><option value="j">Für Profis</option>');
	});

});


