$(document).ready(function() {
	// images--lightbox
	if ($('a.lightbox').length > 0) {
		$('a.lightbox').lightBox({fixedNavigation:true});						   
	}
						   
	$('a').click(function() {
		if ($(this).hasClass('popup')) {
			if ( $(this).hasClass('gmap' )) {
				newWin($(this).attr('href'),900,800);
			} else if ($(this).hasClass('large')) {
				newWin($(this).attr('href'),1100,600);	
			} else {
				newWin($(this).attr('href'));
			}
			return false;
		}
	});
});

function newWin (href,width,height) {
    // window features
	if (!height) height='400';
	if (!width) width='650';	
    var status="1";var toolbar="0";var location="0";var menubar="0";var directories="0";var resizable="1";var scrollbars="1"
    var features = "status=" + status + ",toolbar=" + toolbar + ",location=" + location + ",menubar=" + menubar + ",directories=" + directories + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",height=" + height + ",width=" + width;
    var newWin = window.open(href, "newWin", features);

    newWin.focus();   
    return false;
} 