//bottom ad without noConflict.

function setCookie(c_name,value,exdays) {
	var exdate=new Date();
	exdate.setDate(exdate.getDate() + exdays);
	var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
	document.cookie=c_name + "=" + c_value;
}

function getCookie(c_name) {
	var i,x,y,ARRcookies=document.cookie.split(";");
	for (i=0;i<ARRcookies.length;i++)
	{
	  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
	  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
	  x=x.replace(/^\s+|\s+$/g,"");
	  if (x==c_name)
		{
		return unescape(y);
		}
	  }
}
	
//make sure noconflict mode
$(function(){
	var dock_height = "150"
	var body_height = $(window).height() - dock_height
	$('body').append('<div id="bottom-ad" style="display: none;" ><span id="close-bottom-form" style="display: block; cursor: pointer; position: absolute; right: 50px; top: 10px; color: #fff; display: inline-block; padding: 0px 10px 2px; border: 1px solid #4081AF; border-bottom-color: #20559A; color: white !important;			text-align: center; text-shadow: 0 -1px 0 rgba(0, 0, 0, .3); text-decoration: none; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px;			background: #237FD7; background: -webkit-gradient( linear, left top, left bottom, color-stop(.2, #52A8E8), color-stop(1, #2E76CF) ); background: -moz-linear-gradient( center top, #52A8E8 20%, #2E76CF 100% ); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3) /*Top*/, inset 0 0 2px rgba(255, 255, 255, .3) /*Shine*/, 0 1px 2px rgba(0, 0, 0, .29) /*Shadow*/; -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3) /*Top*/, inset 0 0 2px rgba(255, 255, 255, .3) /*Shine*/, 0 1px 2px rgba(0, 0, 0, .29) /*Shadow*/; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3) /*Top*/, inset 0 0 2px rgba(255, 255, 255, .3) /*Shine*/, 0 1px 2px rgba(0, 0, 0, .29) /*Shadow*/; cursor: pointer;">x</span><iframe src="http://awebsitedesigner.com.au/downloads/seo-domination.php" border="0" style="border: 0; width: 100%;" scrolling="no"></iframe></div>');
	if ( getCookie ( 'ad-bottom' ) != 'hidden' ) {
		$('#bottom-ad').css({'height' : '0', 'position' : 'fixed', 'bottom' : 0, 'width' : '100%', 'z-index' : '1000', 'display' : 'block'}).delay(2000).animate({ height : '+=' + dock_height });
	}
	$('#close-bottom-form').click(function(){
		setCookie ( 'ad-bottom', 'hidden', 5);
		$('#bottom-ad').fadeOut('fast');
	});
	$(window).resize(function(){
		var updated_height = $(window).height() - dock_height;
		$('#bottom-ad').css('top', updated_height);
	});
	setCookie ( 'ad-bottom', 'hidden', 5);
	
	
});

