$(document).ready(function() {
						   
// EDIT BELOW THIS LINE

$('h1.logo').ifixpng().click(function() {document.location='http://www.lonestarchl.com/'});
//$('.rounded').corners("6px mozilla webkit");
DD_roundies.addRule('.rounded', '6px', true);

// ADD HEIGHT TO SHADOW BOX SET BEHIND THE HOMEPAGE CONTENT
if ( $('#homeMainShadow') )
{

	if($.browser.msie && $.browser.version > 6 && $.browser.version < 8)
	{
		$('h2.permitToCarry').css("marginTop", 2);
		$('h2.permitToCarry').css("marginLeft", 2);
		
		
		if ( $('#homeMain').height() != null )
		{
			var getHeight = $('#homeMain').css("top");
		} else if ( $('#subMain').height() != null )
		{
			getHeight = $('#subMain').css("top");
		}
		
		var chopPx = getHeight.substr(0,3);
		var myHeight = parseInt(chopPx);
		var removeHeight = myHeight - 15;
		
		if ( $('#homeMain').height() != null )
		{
			$('#homeMain').css("top", removeHeight);
		} else if ( $('#subMain').height() != null )
		{
			$('#subMain').css("top", removeHeight);
		}
	}
	
	var heightToAddToShadow = 50;
	if ( $('#homeMain').height() != null )
	{
		var getHomeMainShadowHeight = $('#homeMain').height();
	} else if ( $('#subMain').height() != null )
	{
		getHomeMainShadowHeight = $('#subMain').height();
	}
	else if ( $('#subMainSpecials').height() != null )
	{
		getHomeMainShadowHeight = $('#subMainSpecials').height();
		var chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
		if (chrome)
			getHomeMainShadowHeight = getHomeMainShadowHeight + 200;
	}
	
	var newHomeMainShadowHeight = getHomeMainShadowHeight + heightToAddToShadow;
	$('#homeMainShadow img').css("height", newHomeMainShadowHeight);
}

	$(".bannerButtons img").hover(function() {
		if ($(this).attr("class") != "active") {
			var mySrc = $(this).attr("src");
			mySrcSplit = mySrc.split("_off");
			mySrc = mySrcSplit[0] + "_on" + mySrcSplit[1] + "?2";
			$(this).attr("src",mySrc);
		}
	},function() {
		if ($(this).attr("class") != "active") {
			mySrc = $(this).attr("src");
			mySrcSplit = mySrc.split("_on");
			mySrc = mySrcSplit[0] + "_off" + mySrcSplit[1] + "?2";
			$(this).attr("src",mySrc);
		}
	});

	$(".navbar img").hover(function() {
		if ($(this).attr("class") != "active") {
			var mySrc = $(this).attr("src");
			mySrcSplit = mySrc.split("_off");
			mySrc = mySrcSplit[0] + "_on" + mySrcSplit[1];
			$(this).attr("src",mySrc);
		}
	},function() {
		if ($(this).attr("class") != "active") {
			mySrc = $(this).attr("src");
			mySrcSplit = mySrc.split("_on");
			mySrc = mySrcSplit[0] + "_off" + mySrcSplit[1];
			$(this).attr("src",mySrc);
		}
	});		
		   
});

