/* HM */


jQuery(document).ready(function() {
    // put all your jQuery goodness in here.
if(document.getElementById("p1")){var p1=document.getElementById('p1');p1.onclick=function(){showPhotos(1);};}
if(document.getElementById("p2")){var p1=document.getElementById('p2');p1.onclick=function(){showPhotos(2);};}
if(document.getElementById("p3")){var p1=document.getElementById('p3');p1.onclick=function(){showPhotos(3);};}
if(document.getElementById("p4")){var p1=document.getElementById('p4');p1.onclick=function(){showPhotos(4);};}

mc3(0);
mlinks();
});


function mlinks() {
jQuery('.mlink').each(function(index) {
var op=''; var mx=new Array(); var chars='st2-n7vwk_5x16uyqz9m:0b3hja4opr.igcdel8@f'; var m='42495560245143';
    var idm=jQuery(this).attr("id");
	idm=idm.substring(5,idm.lastIndexOf('.'));
	var inp=m+idm;for(var i=0; i<inp.length; i+=2) {id=parseInt(inp.substr(i,2));op+=chars.charAt(id-23);}	
	var mstr=(jQuery(this).parent().attr("id")=="contact")? 'click here to email' : op.substr(7);
	jQuery(this).html('<a href='+op+'>'+mstr+'</a>');
  });
}

function mc3(e) {
var op=''; var mx=new Array(); mx[0]='55276351624555564560375953592324493753492724545751543731';
var chars='st2-n7vwk_5x16uyqz9m:0b3hja4opr.igcdel8@f'; var m='42495560245143';
var inp=m+mx[e];for(i=0; i<inp.length; i+=2) {id=parseInt(inp.substr(i,2));op+=chars.charAt(id-23);}
jQuery('.mlink').html('<a href='+op+'>'+op.substr(7)+'</a>');
}

function showPhotos(n) {
if(document.getElementById("showcase")){document.getElementById("showcase").style.display='block';}
document.getElementById('s1').src='/wp-content/themes/bbr/images/s/'+n+'.jpg';
}

function closePhotos(n) {
if(document.getElementById("showcase")){document.getElementById("showcase").style.display='none';}
}

/* SIFR */
var vt = { src: '/wp-content/themes/bbr/js/sifr/flash/vgr.swf' };
sIFR.activate(vt);


sIFR.replace(vt, {
  selector: 'h1',
  css: '.sIFR-root { background-color:#00109B; color: #FFFFFF; }',
  wmode: 'transparent'
});

sIFR.replace(vt, {
  selector: 'h2',
  css: '.sIFR-root { background-color:#00109B; color: #99CCCC; }',
  wmode: 'transparent'
});

var popUpWin=0;
function popMap() {
	
var URLStr='/find';
var left='100';
var top='100';
var width='800';
var height='600';
	
if(popUpWin) {  if(!popUpWin.closed) popUpWin.close();  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


function printBTN() {
	var pbtn='<div id="printbtn"><a href="javascript:window.print();"><img src="/wp-content/themes/bbr/images/1.gif" alt="Print" width="84" height="37" /></a></div>';
	document.write(pbtn);	
}



