// controls big blocks on www index.php
// bigblock_{n}Wrp n(1-7)

// --|1|--

// --|1|--

// --|2|--
YUI().use('node','event-mouseenter',function(Y) {		
	var cntnt="";
	var block=Y.one('#bigblock_2Wrp');
	var fld=null;
	var q='TYPE YOUR QUESTION';
	var v='';
	var localhost=((document.location.href.indexOf('http://localhost/')===0)?"localhost/":"");
	block.setContent('');
	block.on('mouseenter',openit);	
	function openit(e) {		
		e.preventDefault();
		block.toggleClass('expanded');
		block.setContent(cntnt);
		fld=Y.one('#ask_questionFrmFld_q');
		if(v===''){
			fld.set('value',q).replaceClass('active','inactive');
		} else {
			fld.set('value',v).replaceClass('inactive','active');
		}	
		fld.on('focus',function(e) {		
			if(Y.Lang.trim(this.get('value'))===q) {
				this.set('value','');
			}		
			this.replaceClass('inactive','active');			
		});
	}
	block.on('mouseleave',closeit);	
	function closeit(e) {
		e.stopPropagation();
		v=Y.Lang.trim(fld.get('value'));if(v===q){v='';}
		block.toggleClass('expanded');
		block.setContent('');
	}	
	cntnt="<div id=\"ask_questionFrmWrp\">\
		        <img src=\"http://"+localhost+"static1.fiig.com.au/www/images/ask_question_left.png\" width=\"18\" height=\"18\" />\
            		<form name=\"ask_questionFrm\" method=\"get\" action=\"http://"+localhost+"www.fiig.com.au/education/ask_a_specialist\">\
						<div id=\"ask_questionFrmWrpFld\">\
                			<input type=\"text\" name=\"q\" id=\"ask_questionFrmFld_q\" class=\"inactive\" value=\"\" size=\"30\" maxlength=\"50\" />\
						</div>\
                		<input type=\"image\" src=\"http://"+localhost+"static1.fiig.com.au/www/images/ask_question_right.png\" title=\"SUBMIT\" />\
            		</form>\
                </div><!-- end ask_questionFrmWrp -->\
				<div class=\"floatclear\"></div>\
				<img src=\"http://"+localhost+"static1.fiig.com.au/www/images/big_blocks/some_popular_questions.gif\" class=\"some_popular_questions\" />\
				<div class=\"floatclear\"></div>\
				<a href=\"./education/FAQ#q9\" class=\"question\">How and when do investors receive their coupons?</a>\
				<a href=\"./education/FAQ#q11\" class=\"question\">How do investors sell bonds before maturity?</a>\
		   		<a href=\"./education/FAQ#q1\" class=\"question\">Which bonds (notes) are generally available?</a>\
		   		<a href=\"./education/FAQ#q12\" class=\"question\">How are bonds taxed?</a>";
});
// --|2|--










/*/
YUI({
	gallery:'gallery-2010.03.30-17-26'
}).use('gallery-yquery',function(Y) {
 	
	var jQueryPlugins=['http://localhost/static1.fiig.com.au/_global/js/libs/jQuery_plugins/rotate3Di-0.9/jquery-css-transform.js',
					   'http://localhost/static1.fiig.com.au/_global/js/libs/jQuery_plugins/rotate3Di-0.9/rotate3Di-0.9.js'
					   ];
    Y.YQuery().use(jQueryPlugins,function(e) {
 
        //$('#bigblock_5Wrp').rotate3Di(180);
		$('#bigblock_5Wrp').hover(function(){$(this).rotate3Di('toggle',500);});
 
    }); 
});
//*/
