// Active Tabs
$(function() {
    var pathname = location.pathname;
    var highlight;

    if(pathname == "/")
        highlight = $('#nav > ul > li:first > a:first');
    else {
    	var pathArray = window.location.pathname.split( '/' );
    	var secondLevelLocation = pathArray[1];

        if (secondLevelLocation)
            highlight = $('#nav > ul > li a[href$="/' + secondLevelLocation + '/"]');
    }
    highlight.addClass('active');
};


$(function () {

    var content = $('#product-images > div');
    content.hide().filter(':first').show();
   
    $('.images-nav a').click(function () {
            content.hide();
            content.filter(this.hash).show();
            $('.images-nav a').removeClass('selected');
            $(this).addClass('selected');
            return false;
    }).filter(':first').click();
});



$(document).ready(function() {

	$('.roster_detail #photos a').fancyZoom({scaleImg: true, closeOnClick: true});
	
	
    var poi = $('#international #map .poi a span');
	poi.hide();
	
	$('#international #map .poi a').click(function () {
            poi.hide();
            poi.filter(this.hash).show();
            return false;
    });

	$('#international #map .poi a span').click(function () {
            poi.hide();
            return false;
    });
	
	
});
