	// ready function

jQuery().ready(function(){
						
//-------------------------------------------------------------------
//top navigation stuff

	jQuery('#headerWrapper ul').superfish();


//-------------------------------------------------------------------
//accordion

	jQuery("#faqsList").accordion({
		event: "click",
		active: false, 
		alwaysOpen: false, 
		animated: false, 
		autoheight: false 

	
	});


	jQuery("dl.testimonials").accordion({
		event: "click",
		active: false, 
		alwaysOpen: false, 
		animated: false, 
		autoheight: false, 
		header: 'dt'	    
	});

//-------------------------------------------------------------------
//new flash repalce stuff

	$('#advert1').flash(
        { src: 'imgs/flash/advert_news.swf',
          width: 490,
          height: 351 },
        { version: 8 }
   );
		$('#advert2').flash(
        { src: 'imgs/flash/advert_news2.swf',
          width: 490,
          height: 351 },
        { version: 8 }
   );	
		$('#ciclobanner').flash(
        { src: 'imgs/flash/gifrandomloader.swf',
          width: 490,
          height: 175 },
        { version: 8 }
    );
		$('#bannerorange').flash(
        { src: 'imgs/flash/advert_lateral.swf',
          width: 225,
          height: 300,
		  wmode: 'transparent',
		  menu: 'false'},
        { version: 8 }
    );
		$('#ciclobanner2').flash(
        { src: 'imgs/flash/gifrandomloader2.swf',
          width: 245,
          height: 175 },
        { version: 8 }
    );
		$('#nieve').flash(
        { src: 'imgs/flash/fx_Nieve.swf',
          width: 982,
          height: 93,
		  wmode: 'transparent',
		  menu: 'false'},
        { version: 8 }
    );
		$('#ciclobannercentral').flash(
        { src: 'imgs/flash/advert_fachada.swf',
          width: 244,
          height: 175 },
        { version: 8 }
    );

//-------------------------------------------------------------------
//news tabs

    $("#example > ul").tabs();

//-------------------------------------------------------------------
//font replace script

	// old JQUERY one
	//var root = "http://"+window.document.domain+"/2020mobile/flash";
    //$.sifr({path: root});
	//$('h2').sifr({ font:'utopiaStandard', color:'#000000'});
	//$('dl.title dt').sifr({ font:'utopiaStandard', color:'#000000', width:'200px;'});
	//$('div.newsItem h3').sifr({ font:'serifaRoman', color:'#185378'});
	
	$('h2').flash(
        { 
            src: 'flash/serifa.swf', 
            flashvars: { 
                css: [
                    '* { color: #000000; }',
                    'a { color: #0099CC; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );
	
	$('dl.title dt').flash(
        { 
            src: 'flash/serifaLTBG.swf', 
            flashvars: { 
                css: [
                    '* { color: #000000; width:200px; }',
                    'a { color: #0099CC; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );
	
	
$('h3.fancy').flash(
        { 
            src: 'flash/utopia.swf', 
            flashvars: { 
                css: [
                    '* { color: #000000; background: #transparent }',
                    'a { color: #0099CC; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );

/*ending ready Function */
});

// JavaScript Document
