// This code is made for working with the RapidWeaver Stacks plugin from YourHead.com and the FlowPlayer Flash Video PLayer by FlowPLayer.org (a very nice player it is too.)
// This Code has been built by Symfonip ¬©2009. (a brand owned and managed by it-iss.com and CRM Technik.com)
// Technical Design, writing and jQuery awesomeness: Ronan Cashell, Visual Direction , RapidWeaver technical direction and testing: Kevin Burns
// v1.1.5 May 6 2009- Screen size fixed to 640x360 previously this was incorrect, scaling method is default to scale, Stacks selctor can choose fit use
// flowplayer 3.1.0 swf files and control, Overlay statte caontained to use one only , previous version launched additional overlays
// rename of overlay instance to symoverlay to avoid conflict of Themes using same naming convention
jQuery.noConflict();jQuery(document).ready(function(e){e("#symoverlay").appendTo("body");var a="swf-fp/flowplayer-3.1.0.swf";if(typeof symfonip_vars=="object"){if(typeof symfonip_vars.fp_player=="object"){a=symfonip_vars.fp_player["flowplayerloc"]}}var c={color:"#ffffff",opacity:0.1,loadSpeed:"normal",closeSpeed:"normal",maskId:"exposeMask",closeOnClick:false,zIndex:21000};var d={key:"",clip:{scaling:"scale",url:"",autoPlay:false,autoBuffering:true},play:{label:"Play Video",replayLabel:"Play Again"},logo:{url:"",fullscreenOnly:true,displayTime:15},screen:{width:640,height:360},canvas:{backgroundColor:"#131313",backgroundGradient:[0.3,0],borderRadius:10},plugins:{controls:{backgroundColor:"#131313",backgroundGradient:[0.3,0],autoHide:"always",all:false,play:true,mute:false,fullscreen:true,scrubber:true,height:20,buttonColor:"#8C838A",sliderColor:"#333333",progressColor:"#CCCCCC",bufferColor:"#666666"}}};var b={speed:"normal",fadeInSpeed:"fast",oneInstance:true,closeOnClick:true,preload:true,zIndex:21001,onBeforeLoad:function(){e("#symoverlay").expose(c);$f("player",a,d).load()},onLoad:function(){e("#player").show()},onClose:function(){e.expose.close()}};if(typeof symfonip_vars=="object"){for(key in symfonip_vars){if(key=="fp_player"&&typeof symfonip_vars[key]=="object"){update_vars(d,symfonip_vars[key])}if(key=="fp_overlay"&&typeof symfonip_vars[key]=="object"){update_vars(b,symfonip_vars[key])}if(key=="fp_expose"&&typeof symfonip_vars[key]=="object"){update_vars(c,symfonip_vars[key])}}}e("#symoverlay").overlay(b);e("#player").hide();$f("player",a);e("a[href$=mp4],a[href$=m4v],a[href$=flv],a[href$=mov],a[href$=M4V],a[href$=MOV]").each(function(){e(this).attr("rel","#symoverlay")});e("a[rel=#symoverlay]").click(function(){d.clip["url"]=e(this).attr("href");e("#symoverlay").overlay().load();return false})});function update_vars(a,b){for(key in b){if(typeof key=="object"&&typeof a[key]=="object"){update_vars(a[key],key)}if(typeof b[key]==typeof a[key]){if(key=="opacity"){tmp=parseInt(b[key])/100;a[key]=tmp.toString()}else{a[key]=b[key]}}}}function display_object(b){var a="";for(key in b){if(typeof b[key]=="object"){a=a+key+": {"+display_object(b[key])+"}\n,"}else{a=a+key+": "+b[key]+"\n,"}}return a};