/*

///////////////////ADD THIS CODE INBETWEEN YOUR HEAD TAGS///////////////////

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="/scripts/share.js" type="text/javascript"></script>


//////////////ADD THIS CODE JUST BEFORE THE BODY CLOSING TAGS///////////////

<div id="shareIt">
<ul>
<li><!-- twitter --><a href="https://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></li>
<li><!-- plus1 --><script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="tall"></g:plusone></li>
<li><!-- iframe --><iframe src="//www.facebook.com/plugins/like.php?href=<?php echo 'http://www.rainbowinfosys.com'.$_SERVER['PHP_SELF'];?>&amp;send=false&amp;layout=box_count&amp;width=50&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=verdana&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:62px;" allowTransparency="true"></iframe></li>
<li style="width:50px;"><!-- AddThis --><div class="addthis_toolbox addthis_default_style "><a class="addthis_counter"></a></div><script type="text/javascript" src="https://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e78ad062a6edf68"></script></li></ul>
</div>


///////////ADJUST THE CHANGEABLE VARIABLES BELOW AS YOU SEE FIT//////////*/	
//Changeable Variables
	var templateAlign	=	'center';				// the actual alignment of the template, can accept 'right', 'center', 'left'
	var templateWidth	=	800;				// the actual width of the template, in number format
	var headerHeight	=	403;				// the actual height of the homepage header before the content starts, in number format
	var headerHeightIn	=	240;				// the actual height of the inside page's header before the content starts, in number format
	var buttonAlign		= 	'right';			// which side of the template you want the buttons on, can accept 'right', 'left', only used if templateAlign is 'center'
	var backgroundColor	= 	'#006198';			// background color of the share area
	var dividerCSS		= 	'1px solid #006198';	// border CSS for the dividers in between each button







///////////DO NOT EDIT BELOW//////////
//NonChangeable Variables
	var pageName		=	window.location.pathname;
	var headerUse		=	headerHeightIn;
	var leftPos			=	'50%';
	var rightPos		=	'auto';
	var marginLeft		=	0;
	var browser			=	$.browser;
	var typePos			=	'fixed'


////////////////////////////////////////////////////////////////////////////////
//////////////////////////// Functioning Code //////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

//check if homepage
if (pageName == '/') { headerUse = headerHeight; }
if (pageName == '/temp.html') { headerUse = headerHeight; }


//set location based on templateAlign
if (templateAlign == 'left') {
	leftPos = templateWidth + 10 + 'px';
} else if (templateAlign == 'right') {
	rightPos = templateWidth + 10 + 'px';
	leftPos = 'auto';
} else {
//set location if templateAlign = center, based on buttonAlign
	if (buttonAlign == 'left') {
		marginLeft = ((templateWidth / 2) + 86) * -1;
	} else {
		marginLeft = ((templateWidth / 2) + 10);
	}
}
//set position style absolute if later than ie 9
  if ( browser.msie && browser.version != "9.0" ) {
    typePos = 'absolute';
  }

//sets initial position based on functions above
window.onload = function() {
$('#shareIt ul').css({'top': headerUse+'px', 'left': leftPos, 'right': rightPos, 'margin-left': marginLeft+'px', 'background': backgroundColor, 'position': typePos, 'width': '56px', 'padding': '10px', 'text-align': 'center', 'list-style': 'none', '-webkit-border-radius': '15px', '-moz-border-radius': '15px', 'border-radius': '15px'});
$('#shareIt ul li').css({'margin': '0 auto', 'padding': '7px 0 5px', 'border-top': dividerCSS});
};

//move social icons with content when page scrolls
$(document).scroll(function() {
	var scrollHeight = $(document).scrollTop();
	var OriginalTop = headerUse;
	var currentTop = headerUse - scrollHeight;
	if (currentTop > 0) {
		$('#shareIt ul').stop().animate({'top': currentTop+10+'px'}, 1000);
	}
});
