
// functions for basket overs
var folded=0;
var finishedBouncing=true;

function toggleSmallIn()
{
	$('#ifxElement').FoldToggle(200, 25, null, 'bounceout');
}
function toggleSmallOut()
{
	$('#ifxElement').FoldToggle(200, 25, finToggle, 'bounceout');
}
function finToggle() 
{
	finishedBouncing=true;
}

function foldoutbig()
{
	if (folded==1) {
		foldoutbigTemp();
		folded=0;
	}
}
function foldinbig()
{
	try {
		if (folded==0 && finishedBouncing) {
			$('#ifxElementBig').UnFold(0.5, 20, null, 'bounceout'); //a.ravji - made time slower to see if the basket loads faster!555
			folded=1;												 //on basis on maths,req for jira pbf-382 is 1/2 sec, 0.5
		}
	}
	catch (er) {
		if (er.name=='TypeError') {
			alert('Configuration of Boxfresh jquery invalid ');
		}
		else
			throw (er);
	}
}
function foldoutbigTemp()
{
	$('#ifxElementBig').Fold(0.5,20, null, 'bounceout'); //555 //20
}
function foldoutbigTemp2() 
{
	setTimeout('foldoutbig()',8000);		
}

$("body").bind("click", function(){
   foldoutbig();
 });
