function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   var rel = anchor.getAttribute("rel");
   if (rel == null) {
	rel = "";
   }
   if (anchor.getAttribute("href") &&
       rel.indexOf("external") != -1)
     anchor.target = "_blank";
 }
}

function addLikeBox(pageID) {
        var e = document.createElement('fb:like-box');
        e.setAttribute('width', '188');
        e.setAttribute('height', '80');
        e.setAttribute('profile_id', pageID);
        e.setAttribute('header', 'false');
        e.setAttribute('connections', '0');
        e.setAttribute('stream', 'false');
        document.getElementById('fb-likebox').appendChild(e);
}
function fbInit() {
  window.fbAsyncInit = function() {
    FB.init({appId: '156651791043972', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
}

function fbLikeBox() {
	var e = document.getElementById('fb-likebox');
	if (e != null) {
		addLikeBox('360099782981');
	}
}

function slideShow() {
	//Run Main Pae Slideshow
	$(document).ready(function() {
		$('#slideshow').cycle({
			fx: 'scrollHorz',
			timeout: 10000,
			speed: 2000
		});
	});
}

