$(document).ready(function()
{
	show_hide_text('#q');

	$('.nav ul li.li-level-1').each(function(){
		$(this).find('ul').hide();
		$(this).hover(function(){
			$(this).find('ul').show();
		},function(){
			$(this).find('ul').hide();
		});
	});
	

	$('.cycle').cycle({ 
	    fx:     'fade', 
	    speed:  'slow',
	    timeout: 10000,
	    cleartype: true,
	    cleartypeNoBg: true
    
	});
	
	$('.tabs').corner('10px top');
	
	$("a.video").fancybox({
	    'type': 'ajax',
	    'ajax': { 
	                dataFilter: function(data){
	                    return $(data).find('.video1');
	                }
	            },
	    'width':640,
	    'height':360,
	    'autoDimensions':true,
	    'padding': 0, //optional 
	    'scrolling':'no', //or auto depending on preference
	  	'onComplete': function () {
                   $("#fancybox-inner").css({ 'overflow': 'hidden' });
                   VideoJS.setupAllWhenReady();
        }

	 });
    

	
});

	    	
	    	
	    
	    
	    function show_hide_text(el) {
$(el).each(function() {
document['def_'+$(this).attr('name')] = $(this).attr('value');
$(this).focus(function()
{
if($(this).attr('value') == document['def_'+$(this).attr('name')]) {
$(this).attr('value','');
if(el == '.toggle-input') $(this).css('color','#000000');
}
});
$(this).blur(function()
{
if($(this).attr('value') == '') {
$(this).attr('value',document['def_'+$(this).attr('name')]);
if(el == '.toggle-input') $(this).css('color','#999999');
}
});
});
}

