$(document).ready(function(){
	
	<!-- sIFR function calls and parameters -->
	$.sifrSettings({path:'/css/skins/site/flash/'});
	$(".side-panel h2").sifr({font:'helvetica-neue-light'});
	$("#main-center-panel h2").sifr({font:'helvetica-neue-light'});
	$(".side-panel h3").sifr({font:'helvetica-neue-light'});
	$("#main-center-panel h3").sifr({font:'helvetica-neue-light'}); 
	$("#header h3").sifr({font:'helvetica-neue-bold'});	
	$("#main #main-left-panel #side-panel-3 .content .copy h3").sifr({font:'helvetica-neue-bold'});
	$("#home #main #main-center-panel h3").sifr({font:'helvetica-neue-bold'});	
	$("h4").sifr({font:'helvetica-neue-bold'});	
	$("h5").sifr({font:'helvetica-neue-bold'});	
	$("h6").sifr({font:'helvetica-neue-bold'});	
	$("#footer dt").sifr({font:'helvetica-neue-light'});	
	
	//use cookie to store current selected tab
	$('#product-nav ul').tabs({fx: { height: 'toggle'}});
	$('#banner-nav ul').tabs();
	
	//place dropshaow effect on NON sIFR headings
	$("#banner-panel h2").dropShadow({left: 2, top: 2, opacity: 0.8, blur: 2});
	$("#banner-panel h3").dropShadow({left: 2, top: 2, opacity: 0.8, blur: 2});
	$("#banner-panel p").dropShadow({left: 2, top: 2, opacity: 0.8, blur: 2});
	
	//replace all fck inserted movies with swfobject
	//needed for accessibility options
	
	//needed for accessibility options
	var cnt = 1;
	//find all embed objects
	$('div#demo embed').each(function(){
			//if they are flash movies

			if($(this).attr('src') != 'undefined'){

				//get the source fo the flash movie
				if($(this).attr('src')){
		
					var next_img = $(this).siblings('img');
					var flash_src = $(this).attr('src');
					var flash_div = 'flash-'+cnt;
					var flash_extension = $(this).attr('src').substring($(this).attr('src').lastIndexOf(".")+1,$(this).attr('src').length);

					switch(flash_extension){
						case "flv":
						if(jQuery.fn.media){
							//replace the embed obect with a holding div
							$(this).replaceWith('<div id="'+flash_div+'" style="display:none;"><a class="{width:500, height:390}" href="'+flash_src+'"></a></div>');
						
							//set default player location
							$.fn.media.defaults.flvPlayer = '/css/skins/site/flash/player.swf';
							//run media plugin on all a links with media class
							$('#'+flash_div+' a').media();
						
							if(next_img.length > 0 && next_img.attr('src').length > 0){
								//call thickbox programatically on click
								next_img.wrap('<a title="Ebedded Video" class="thickbox" href="#" />').click(function(){
									var url = "#TB_inline?height=400&amp;width=500&amp;inlineId="+flash_div;
									tb_show("Ebedded Video", url);

								});
							}else{

								$('<a title="Ebedded Video" class="thickbox" href="#">View video</a>').click(function(){
									var url = "#TB_inline?height=400&amp;width=500&amp;inlineId="+flash_div;
									tb_show("Ebedded Video", url);

								}).insertAfter('#'+flash_div);
							}
							

						}else{
							alert('You need to have the media and meta plugins installed.');
						}
						break;
						default:
						if(jQuery.fn.flash){
							//replace the embed obect with a holding div
							$(this).replaceWith('<div id="'+flash_div+'"></div>');
							//use swfobject to embded the flash movie
							$('#'+flash_div).flash({
								// test.swf is the flash document
								swf: flash_src,
								width : 425,
								height : 344
							});
						}else{
							alert('You need to have the swfobject plugins installed.');
						}
						break;
					}
				}
			}
		cnt ++;
	});

	//fix background transparency on PNG images.
	$(document).pngFix();
});