$(document).ready(function (){
	var pathname = window.location.pathname;
	if (pathname.indexOf('apps') !=-1) {
		$("#main_nav li a:first").removeClass("active_section");
		$("#main_nav li a:last").addClass("active_section");
		$("#sidebar h4, #sidebar .sidebar_nav").hide();
	} 
	
/*
    $("#brewery_build").EmbedPicasaGallery('jszacon',{
       matcher:    'Brewery Build',  // string or regexp matching album title 
       album_title_tag:    '<h3/>',
      size:      '48',  // thumb size (32,48,64,72,144,160)) 
     albumid : 'I5yB5K3PBvQ',
      msg_loading_list :  'Loading list from PicasaWeb',
      msg_back :   ''
    });
*/

/*
    $("#brewery_build").pwi({
        username: 'jszacon',
        mode: 'album',
        album: "Brewery Build",
        thumbSize: 48,
        thumbCss: { margin: '5px' },
        popupExt: function(photos){
							photos.fancybox({
								'hideOnContentClick': false
							})
						},
        onclickThumb: ""
    });
*/

    

    /* $(".video_link").append('<img src="/media/mingus/img/video_thumb_play.png" class="video_thumb_icon" />'); */
    
    var sm_vid_th_h = $("img.vid_thumb").css("height");
    var sm_vid_th_w = $("img.vid_thumb").css("width");

    $(".small_vid_thumb, .video_link").append('<span class="sm_video_thumb_icon" style="height:'+ sm_vid_th_h +';width:'+ sm_vid_th_w +';" />');


    $("a.iframe").fancybox({
		'width'	: 640,
		'height' : 480,
		'padding' : 0
    });
    
    $("a.iframe[rel=widescreen]").fancybox({
		'width'	: 640,
		'height' : 360,
		'padding' : 0
    });

	var buildsettings = {
		username: 'jszacon',
        mode: 'album',
        album: "BreweryBuild02",
        thumbSize: 48,	
        photoSize: 700,	
        albumPage: 1,
		popupExt: function(photos){
				photos.fancybox({
					'hideOnContentClick': false
				})
			}
	}
    
    $("#brewery_build").pwi(buildsettings);
    
	var sausagebuildsettings = {
		username: 'jszacon',
        mode: 'album',
        album: "Jan2011SausageMaking",
        thumbSize: 64,	
        thumbCrop: 1,
        photoSize: 700,	
        albumPage: 1,
        showPhotoDate: false,
		popupExt: function(photos){
				photos.fancybox({
					'hideOnContentClick': false
				})
			}
	}

    $("#jan_sausage").pwi(sausagebuildsettings);
    
	var blizzardudsbuildsettings = {
		username: 'jszacon',
        mode: 'album',
        album: "BlizzardABTs",
        thumbSize: 48,	
        thumbCrop: 1,
        photoSize: 700,	
        albumPage: 1,
        showPhotoDate: false,
		popupExt: function(photos){
				photos.fancybox({
					'hideOnContentClick': false
				})
			}
	}
    
    $("#blizzardudsgallery").pwi(blizzardudsbuildsettings);
    
    $(".inline_popper").fancybox();
	
});

