function goPop(url) {
var winW = 800;
var winH = 700;
var winX = (screen.availWidth - winW) / 2;
var winY = (screen.availHeight - winH) / 2;
var features = 'left='+winX+',top='+winY+',width='+winW+',height='+winH+',toolbar=0,location=0,status=0,scrollbars= 1,resizable=0';
var popWin = window.open(url,popWin,features);
if (popWin) {
popWin.focus();
} else {
window.location.href = url;
}
}
function detailPop(url) {
var winW2 = 1000;
var winH2 = 700;
var winX2 = (screen.availWidth - winW2) / 2;
var winY2 = (screen.availHeight - winH2) / 2;
var features = 'left='+winX2+',top='+winY2+',width='+winW2+',height='+winH2+',toolbar=0,location=1,status=0,scrollbars= 1,resizable=0';
var popWin2 = window.open(url,popWin2,features);
if (popWin2) {
popWin2.focus();
} else {
window.location.href = url;
}
}

// Slideshow
function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 4000 );
});

// Lightstring
$(document).ready(function() {
	$(".LightString").mousedown( function() {
		$("#string").animate({ 
				marginTop: "-6px"
				}, 200 );
	}); 
	$(".LightString").mouseup( function() {
		$("#string").animate({ 
				marginTop: "-15px"
				}, 100 );
	}); 
});


