$(document).ready(function(){
	
	//changeMenuWidth(690);
	
	/* COLORBOX */
	$("a[rel='gallery']").colorbox();
	$("a.video").colorbox({iframe:true, innerWidth:480, innerHeight:385});	
	$("a.navtrigger").each(function (i) {
		$(this).tooltip({ 
	    	position: ['bottom', 'right'],
			offset: [0, - ($(this).width()+19)],
		    opacity: 0.9
		});    	
	});

	
});


/*codropsmenu*/
/*function changeMenuWidth(menuWidth){
    var menuItems = $('#menu li').size();
    var itemWidth = (menuWidth/menuItems)-2;

    $('#menu').css({'width': menuWidth +'px'});
    $('#menu a').css({'width': itemWidth +'px'});
}*/


/*ALLGEMEIN*/
function popup(ziel,w,h) {
  h = h - 20; var x=0, y=0, parameter="";
  if (w < screen.availWidth || h < screen.availHeight) {
    x = (screen.availWidth - w - 12) / 2;
    y = (screen.availHeight - h - 104) / 2;
    if (window.opera) y = 0; // Opera positioniert unter den Symbolleisten
    if (x<0 || y<0) { x=0; y=0; }
    else parameter = "width=" + w + ",height=" + h + ",";
  }
  parameter += "left=" + x + ",top=" + y;
  parameter += ",menubar=0,location=0,toolbar=0,status=0";
  parameter += ",resizable=1,scrollbars=1";
  var Fenster = window.open(ziel,"",parameter);
  if (Fenster) Fenster.focus();
  return !Fenster;
}

function openLink(link) {
  location.href = link;
  return false;
}
