/* horam main javascript */

 jQuery(document).ready(function() {
   // doc ready stuff
	
		jQuery(window).resize(function() {
		adjustBG();
		});
	
		adjustBG();
		
		mlinks();
	
	

// end doc ready
 });
 
 
 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 adjustBG() {
	var ww=jQuery(window).width();
	jQuery("#testwidth").html(ww);
	if(ww<1100) {
		jQuery("body").css('background-image','url(/wp-content/themes/horam/images/bodygdAlt.jpg)');
	} else {
		jQuery("body").css('background-image','url(/wp-content/themes/horam/images/bodygd.jpg)');
	}
	
}


