soundManager.url = 'wp-content/themes/freshout/embed/'; // directory where SM2 .SWFs live

// disable debug mode after development/testing..
soundManager.debugMode = false;
soundManager.waitForWindowLoad = true;
soundManager.onload = function() {
  // SM2 has loaded - now you can create and play sounds!
  soundManager.createSound('background','wp-content/themes/freshout/embed/site_backgroundmusic_track.mp3');
  soundManager.play('background');
}

function imafan(artist) {
  jQuery.ajax({
    url: 'http://bigearsphilly.com/wp-content/themes/freshout/increase_fans.php',
    data: 'action=increase_fans&id='+artist,
    dataType: 'json',
    type: 'post',
    success: function (j) {
      jQuery("#fansQuantity").html(j.msg);
    }
  });
}

function directionsMap() {
    Shadowbox.open({
        player:     'html',
        height:     370,
        width:      425,
        title:		'Get Directions',
        content:    '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=painted+bride+arts+center,+philadelphia&amp;ie=UTF8&amp;cid=39955586,-75143704,10140510047862025811&amp;s=AARTsJqzci3p49xs0GMlVWh1zbWPbRsB2Q&amp;ll=39.966069,-75.139532&amp;spn=0.023024,0.036478&amp;z=14&amp;iwloc=A&amp;iwstate1=dir&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=painted+bride+arts+center,+philadelphia&amp;ie=UTF8&amp;cid=39955586,-75143704,10140510047862025811&amp;ll=39.966069,-75.139532&amp;spn=0.023024,0.036478&amp;z=14&amp;iwloc=A&amp;iwstate1=dir&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>'
    });

}

function demoMap(){

    Shadowbox.open({
        player:     'html',
        content:    '',
        height:     300,
        width:      500,
        options:    {
            onFinish: function(item){
                if(GBrowserIsCompatible()){
                    var map = new GMap2(document.getElementById('shadowbox_content'));
                    map.setCenter(new GLatLng(37.4419, -122.1419), 13);

                    // add 10 markers to the map at random locations
                    var bounds = map.getBounds();
                    var southWest = bounds.getSouthWest();
                    var northEast = bounds.getNorthEast();
                    var lngSpan = northEast.lng() - southWest.lng();
                    var latSpan = northEast.lat() - southWest.lat();
                    for(var i = 0; i < 10; i++){
                        var point = new GLatLng(southWest.lat() + latSpan * Math.random(),
                            southWest.lng() + lngSpan * Math.random());
                        map.addOverlay(new GMarker(point));
                    }

                    // add some simple controls
                    map.addControl(new GSmallMapControl());
                    map.addControl(new GMapTypeControl());
                }
            }
        }
    });

};
