  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-3254979-5']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

var clip;
var needRef;
var btt=1;
//flag for page reload
function pEdit(){
needRef = 1;
}
Shadowbox.init({
    handleOversize: "resize",
    modal: true,
    initialHeight: 32,
    initialWidth: 400,
    overlayOpacity: 0.85,
        onClose: function(){//check for reload flag and reload
if (needRef == 1){needRef = 0; window.location.href=window.location.href;}
}
});
ZeroClipboard.setMoviePath('/js/ZeroClipboard10.swf');

$(document).ready(function() {
function loadEm(){
    getImg = $("img").filter(':[longdesc]');
    getImg.each(function(){
    var ccw = $("#mainContent").width() -80;
    ccw = (Math.round(ccw / 10) * 10);
    $newImg = "/pt/phpThumb.php?src=" + $(this).attr("longdesc") + "&w="+ccw;//+"&fltr[]=wmt|click for full size image|10|B|FFFFFF|arial.ttf|100|0||000000|100|x";
    $(this).attr("src", $newImg);
    });
}
loadEm();
var isbc = $('#sb-collection').length;
$('.sb-first').hide().fadeIn(3000);
if (isbc != 0) {
    $('#sb-collection').cycle();
}
$(".dim img").fadeTo("slow", 0.65);
$(".dim img").hover(function(){
$(this).fadeTo("slow", 1.0);
},function(){
$(this).fadeTo("slow", 0.65);
});
$('#mainContent').hide().fadeIn(1200);
	//When page loads...
	$(".tab_content").hide(); //Hide all content
	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});
$('.menu2').ptMenu({vertical:true});
$("#textfix").click(function() {
if (btt == 1) {$('.blogtext').css({'font-family' : 'Cuprum', 'color' : 'white', 'text-shadow' : 'none', 'font-size' : '1em'});
$("#textfix").text("* Click again to return to blog text. *");
 btt=2; return;}
if (btt == 2) {$('.blogtext').css({'font-family' : ' Just Another Hand', 'color' : 'white',  'font-size' : '1.25em'});
$("#textfix").text(" * If you find this difficult to read, click here to display normal text. *");
 btt=1; return;}
});
$("li.potato-menu-item > a").attr('title', '');
});

