jQuery(function($){
//	$('#prodinfo').css('display','none')
	$(document).ready(function(){
//		document.getElementById('plusone').innerHTML = '<g:plusone size="" annotation="inline"></g:plusone>'
		$("#plusone").html('<g:plusone size="" annotation="inline"></g:plusone>')
	})
	$('#faq li a').click(function(){
		var L = $(this).attr('href');
		$.scrollTo(L,800);
		return false;
	})
	$('#faq a.top').click(function(){
		$.scrollTo('#top',800);
		return false;
	})
	$('#foCoupon img.close').click(function(){
		$('#foCoupon').slideUp('slow')
		$('#foCoupon').load('/popup/foClose.php')
		return false;
	})
	$('input.submit').click(function(){
		if($(this).attr('clicked'))
			return false;
		else{
			$(this).attr('clicked',true).slideUp('slow')
			$('#waiting').slideDown('slow')
		}
	})
})

openCat = 0;
function expandCat(ID){
	var catID = '#c'+ID
	if(openCat == null){
		openCat = ID
		$('#c'+ID).attr('loaded',true)
		$('#cat'+ID).toggle('_default')
	}else{
		if(ID != openCat){
			if(openCat)
				$('#cat' + openCat).hide('_default')
			if(!$('#c'+ID).attr('loaded'))
				$('#c'+ID).attr('loaded',true).append('<img src="/picts/loading.gif" alt="" class="load"/>').load('/open_c' + ID)
			else
				$('#cat'+ID).toggle('_default')
			openCat = ID
		}else{
			$('#cat'+ID).hide('_default')
			openCat = 0
		}
	}
	return false
}
function goProd(prodID){
	newWin = window.open("/buy_cheap_" + prodID + "_online","_self")
	return false
}
function goCat(catID){
	newWin = window.open("/buy_" + catID + "_drugs_online","_self")
	return false
}
function goFemParm(){
	newWin = window.open("http://www.femaleviagraforwomen.com/","_blank")
	return false
}

function checkout(prodID){
	newWin = window.open("/paypage/" + prodID,"_blank")
	newWin.focus()
	return false
}
function checkoutFromSelect(selNo){
	prodID = document.getElementById('no_'+selNo).value
	return checkout(prodID)
}
function newWin(url, name, w, h){
	l = (screen.availWidth-10 - w) / 2;
	t = (screen.availHeight-20 - h) / 2;

	features = "width="+w+",height="+h+",left="+l+",top="+t;
	features += ",screenX="+l+",screenY="+t;
	features += ",scrollbars=1,resizable=1,location=0";
	features += ",menubar=0,toolbar=0,status=0";

	nw = window.open(url, name, features);
	if(nw)
	  nw.focus();
	return nw;
}
function winOpen(url,title){
	newWin(url,null,350,350);
}
function support_win(servername){
//	servername = 'foretabs.com'
	winOpen("http://chat.billrx.com/request.php?l=admin&x=1&deptid=&page=http://"+servername+"/", "")
	return false
}
function expandInfo(id){
	$('#prodinfo').append('<img src="/picts/loading.gif" alt="" class="load"/>').load('/prodinfo/' + id + '.php');
}
function expand(id){
	var container = document.getElementById('prodinfo');
//	var switcher = document.getElementById('toggle_info');
	var showInfo = 'more product info &raquo;';
	var hideInfo = '« hide info';
	if($('#prodinfo').attr('loaded')){
		$('#prodinfo').toggle('slow');
		switcher.innerHTML = (switcher.innerHTML == hideInfo ? showInfo : hideInfo);
	}else{
		switcher.innerHTML = hideInfo;
		$('#prodinfo').attr('loaded', true).append('<img src="/picts/loading.gif" alt="" class="load"/>').
			load('/prodinfo/' + id + '.php');
	}
}


function addThis(){
	document.write('<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4af9acff43ee977b" rel="nofollow">' +
				   '<img src="http://s7.addthis.com/static/btn/v2/lg-bookmark-en.gif" alt="Bookmark and Share"/></a>')
	document.write('<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pub=xa-4af9acff43ee977b"></script>')
}
function counter(){
	document.write('<a href="http://www.liveinternet.ru/click" target="_blank" rel="nofollow" id="LI"><img'+
	' src="http://counter.yadro.ru/hit?t24.17;r'+escape(document.referrer)+((typeof(screen)=="undefined")?"":
	";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
	";"+Math.random()+'" alt=""/><\/a>')
}

//	Google +1 Button
(function(){
	var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
	po.src = 'https://apis.google.com/js/plusone.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();

