// 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: 'images/flash/flash_advert_news.swf',
          width: 244,
          height: 175 },
        { version: 8 }
    );
	
	/*$('#advert2').flash(
        { src: 'images/flash/flash_advert_features1.swf',
          width: 245,
          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));						
        }
    );

    // international contact changer
    $('.intDetailDiv').hide();
    $("#theChoices").change(function(){
    if(this.value == 'all')
        {$(".internationalDetails").children().show();}
    else
        {$("#" + this.value).show().siblings().hide();}
    });

    $("#theChoices").change();

/*ending ready Function */
});



