# HG changeset patch # User veltr # Date 1336060372 -7200 # Node ID 61c384dda19e29b21cc549fb4c054c1d9f2d8afe # Parent f11b234497f7f57ebd388edac2ed93c4d6d58a6f Big refactoring diff -r f11b234497f7 -r 61c384dda19e .hgignore --- a/.hgignore Fri Apr 27 19:18:21 2012 +0200 +++ b/.hgignore Thu May 03 17:52:52 2012 +0200 @@ -12,4 +12,8 @@ syntax: regexp ^src/css/LdtPlayer-release\.css$ syntax: regexp -^build$ \ No newline at end of file +^build$ +syntax: regexp +^test/libs$ +syntax: regexp +^test/metadataplayer$ \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e assets/annotate.psd Binary file assets/annotate.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/annotate_arrow.psd Binary file assets/annotate_arrow.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/arrow.psd Binary file assets/arrow.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/fullscreen.psd Binary file assets/fullscreen.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/gplus_button.psd Binary file assets/gplus_button.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/left_edge_arrow.psd Binary file assets/left_edge_arrow.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/left_handle.psd Binary file assets/left_handle.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/minimize.psd Binary file assets/minimize.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/mute.psd Binary file assets/mute.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/pause_sprite.psd Binary file assets/pause_sprite.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/play.psd Binary file assets/play.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/polemic_buttons_sprite.psd Binary file assets/polemic_buttons_sprite.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/profile_arrow.psd Binary file assets/profile_arrow.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/psd/annotate_arrow.psd Binary file assets/psd/annotate_arrow.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/psd/mdpsprites.psd Binary file assets/psd/mdpsprites.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/psd/pin-cross.psd Binary file assets/psd/pin-cross.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/psd/polemic_buttons_sprite.psd Binary file assets/psd/polemic_buttons_sprite.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/psd/profile_arrow.psd Binary file assets/psd/profile_arrow.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/psd/socialbuttons.psd Binary file assets/psd/socialbuttons.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/psd/submit_annotation.psd Binary file assets/psd/submit_annotation.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/psd/wire_pattern.psd Binary file assets/psd/wire_pattern.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/reply.psd Binary file assets/reply.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/retweet.psd Binary file assets/retweet.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/right_edge_arrow.psd Binary file assets/right_edge_arrow.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/right_handle.psd Binary file assets/right_handle.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/search.psd Binary file assets/search.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/sound.psd Binary file assets/sound.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/submit_annotation.psd Binary file assets/submit_annotation.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/tweet_button.psd Binary file assets/tweet_button.psd has changed diff -r f11b234497f7 -r 61c384dda19e assets/wire_pattern.psd Binary file assets/wire_pattern.psd has changed diff -r f11b234497f7 -r 61c384dda19e examples/LdtPlayer-release.js --- a/examples/LdtPlayer-release.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1750 +0,0 @@ -/* - * Copyright 2010 Institut de recherche et d'innovation - * contributor(s) : Samuel Huron - * Use Silvia Pfeiffer 's javascript mediafragment implementation - * - * contact@iri.centrepompidou.fr - * http://www.iri.centrepompidou.fr - * - * This software is a computer program whose purpose is to show and add annotations on a video . - * This software is governed by the CeCILL-C license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL-C - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL-C license and that you accept its terms. -*/ - -if ( window.IriSP === undefined && window.__IriSP === undefined ) { - var IriSP = {}; - var __IriSP = IriSP; /* for backward compatibility */ -} - - -// Official instance - to refactor ? -IriSP.MyLdt = null; -IriSP.MyTags = null; -IriSP.MyApiPlayer = null; -IriSP.player = null; - -// genral var (old code) - to refactor -IriSP.Durration = null; -IriSP.playerLdtWidth = null; -IriSP.playerLdtHeight = null; - - -IriSP.init = function ( config ) { - if ( config === null ) { - IriSP.config = IriSP.configDefault; - } else { - - IriSP.config = config; - - if ( IriSP.config.player.params == null ) { - IriSP.config.player.params = IriSP.configDefault.player.params; - } - - if ( IriSP.config.player.flashvars == null ) { - IriSP.config.player.flashvars = IriSP.configDefault.player.flashvars; - } - - if ( IriSP.config.player.attributes == null ) { - IriSP.config.player.attributes = IriSP.configDefault.player.attributes; - } - } - - var metadataSrc = IriSP.config.metadata.src; - var guiContainer = IriSP.config.gui.container; - var guiMode = IriSP.config.gui.mode; - var guiLdtShareTool = IriSP.LdtShareTool; - - // Localize jQuery variable - IriSP.jQuery = null; - - /* FIXME : to refactor using popcorn.getscript ? */ - /******** Load jQuery if not present *********/ - if ( window.jQuery === undefined || window.jQuery.fn.jquery !== '1.4.2' ) { - - var script_tag = document.createElement( 'script' ); - script_tag.setAttribute( "type", "text/javascript" ); - script_tag.setAttribute( "src", IriSP.lib.jQuery ); - - script_tag.onload = scriptLibHandler; - script_tag.onreadystatechange = function () { // Same thing but for IE - if ( this.readyState == 'complete' || this.readyState == 'loaded' ) { - scriptLibHandler(); - } - }; - - // Try to find the head, otherwise default to the documentElement - ( document.getElementsByTagName("head")[0] || document.documentElement ).appendChild( script_tag ); - } else { - // The jQuery version on the window is the one we want to use - IriSP.jQuery = window.jQuery; - scriptLibHandler(); - } - - /******** Called once jQuery has loaded ******/ - function scriptLibHandler() { - - var script_jqUi_tooltip = document.createElement( 'script' ); - script_jqUi_tooltip.setAttribute( "type", "text/javascript" ); - script_jqUi_tooltip.setAttribute( "src", IriSP.lib.jQueryToolTip ); - script_jqUi_tooltip.onload = scriptLoadHandler; - script_jqUi_tooltip.onreadystatechange = function () { // Same thing but for IE - if ( this.readyState == 'complete' || this.readyState == 'loaded' ) { - scriptLoadHandler( "jquery.tools.min.js loded" ); - } - }; - - var script_swfObj = document.createElement('script'); - script_swfObj.setAttribute( "type","text/javascript" ); - script_swfObj.setAttribute( "src",IriSP.lib.swfObject ); - script_swfObj.onload = scriptLoadHandler; - script_swfObj.onreadystatechange = function () { // Same thing but for IE - if ( this.readyState == 'complete' || this.readyState == 'loaded' ) { - scriptLoadHandler( "swfobject.js loded" ); - } - }; - - var script_jqUi = document.createElement( 'script' ); - script_jqUi.setAttribute( "type","text/javascript" ); - script_jqUi.setAttribute( "src",IriSP.lib.jQueryUI ); - script_jqUi.onload = scriptLoadHandler; - script_jqUi.onreadystatechange = function () { // Same thing but for IE - if ( this.readyState == 'complete' || this.readyState == 'loaded' ) { - scriptLoadHandler( "jquery-ui.min.js loded" ); - } - }; - - - ( document.getElementsByTagName("head")[0] || document.documentElement ).appendChild( script_jqUi_tooltip); - ( document.getElementsByTagName("head")[0] || document.documentElement ).appendChild( script_jqUi ); - ( document.getElementsByTagName("head")[0] || document.documentElement ).appendChild( script_swfObj ); - - - }; - - /******** Called once all lib are loaded ******/ - var loadLib = 0; - /* FIXME : ugly */ - function scriptLoadHandler( Mylib ) { - //alert(Mylib); - loadLib +=1; - if( loadLib===3 ) { - main(); - } - }; - - /******** Our main function ********/ - function main() { - - - // Make our own IriSP.jQuery and restore window.jQuery if there was one. - IriSP.jQuery = window.jQuery.noConflict( true ); - // Call ours Jquery - IriSP.jQuery( document ).ready( function($) { - - /******* Load CSS *******/ - var css_link_jquery = IriSP.jQuery( "", { - rel: "stylesheet", - type: "text/css", - href: IriSP.lib.cssjQueryUI, - 'class': "dynamic_css" - } ); - var css_link_custom = IriSP.jQuery( "", { - rel: "stylesheet", - type: "text/css", - href: IriSP.config.gui.css, - 'class': "dynamic_css" - } ); - - css_link_jquery.appendTo( 'head' ); - css_link_custom.appendTo( 'head' ); - - // to see dynamicly loaded css on IE - if ( $.browser.msie ) { - $( '.dynamic_css' ).clone().appendTo( 'head' ); - } - - //__IriSP.trace("main","ready createMyHtml"); - - IriSP.createPlayerChrome(); - - /******* Load Metadata *******/ - IriSP.getMetadata(); - - }); - } - -}; - - -__IriSP.Media = function ( id, url, duration, title, description ) { - this.id = id; - this.url = url; - this.title = title; - this.description = description; - this.duration = duration; - this.lignes = new Array(); - - IriSP.trace( "__IriSP.Media" , "Media ID : "+id); - IriSP.trace( "__IriSP.Media" , "Media URL : "+url); - IriSP.trace( "__IriSP.Media" , "Media title : "+title); -}; - -__IriSP.Media.prototype.createPlayerMedia = function ( width, height, MyStreamer, MySwfPath) { - IriSP.MyApiPlayer = new __IriSP.APIplayer( width, height, this.url, this.duration, MyStreamer, MySwfPath); - //createPlayer(width,height,this.url,this.duration,MyStreamer,MySwfPath); -}; - -__IriSP.Media.prototype.getMediaDuration = function () { - return (this.duration); -}; - -__IriSP.Media.prototype.getMediaTitle = function (){ - return (this.title); -}; - - - - - - -/* FIXME : API player - work in progress ... need refactoring of code */ -__IriSP.APIplayer = function ( width, height, url, duration, streamerPath, MySwfPath){ - - - this.player = null; - this.hashchangeUpdate = null; - - this.width = width; - this.height = height; - this.url = url; - this.duration = duration; - this.streamerPath = streamerPath; - this.MySwfPath = MySwfPath; - - IriSP.MyApiPlayer = this; - - IriSP.createPlayer( this.url, this.streamerPath ); - IriSP.trace( "__IriSP.APIplayer", "__IriSP.createPlayer" ); - - //__IriSP.config.player - /* - - dailymotion // &enableApi=1&chromeless=1 - - youtube - - html5 - - flowplayer - - jwplayer - */ - -}; - -__IriSP.APIplayer.prototype.ready = function( player ) { - - //__IriSP.trace("__IriSP.APIplayer.prototype.APIpReady"," __IriSP.createInterface"); - IriSP.createInterface( this.width, this.height, this.duration ); - //__IriSP.trace("__IriSP.APIplayer.prototype.APIpReady","END __IriSP.createInterface"); - - // hashchange EVENT - if ( window.addEventListener ){ - - // for firefox hashchange EVENT - window.addEventListener( "hashchange", function() { - var url = window.location.href; - var time = IriSP.retrieveTimeFragment( url ); - IriSP.trace( "__IriSP.APIplayer.prototype.ready", time ); - if( IriSP.MyApiPlayer.hashchangeUpdate==null ){ - IriSP.MyApiPlayer.seek( time ); - - } else { - IriSP.MyApiPlayer.hashchangeUpdate = null; - } - }, false ); - - } else if (window.attachEvent){ - // for ie hashchange EVENT - window.attachEvent( "onhashchange", function() { - IriSP.trace( "hashchange",time ); - var url = window.location.href; - var time = IriSP.retrieveTimeFragment( url ); - if( IriSP.MyApiPlayer.hashchangeUpdate == null ){ - IriSP.MyApiPlayer.seek(time); - } else { - IriSP.MyApiPlayer.hashchangeUpdate = null; - } - }, false); - } - - // Search - //__IriSP.jQuery("#LdtSearchInput").change(function() {__IriSP.Search(this.value);}); - //__IriSP.jQuery("#LdtSearchInput").live('change', function(event) {__IriSP.Search(this.value);}); - IriSP.jQuery( "#LdtSearchInput" ).keydown( function() { IriSP.Search( this.value );} ); - IriSP.jQuery("#LdtSearchInput").keyup( function() { IriSP.Search( this.value );} ); - -}; - -__IriSP.APIplayer.prototype.pause = function(){ - this.hashchangeUpdate = true; - IriSP.player.sendEvent( 'PAUSE' ); -}; - -__IriSP.APIplayer.prototype.play = function() { - this.hashchangeUpdate = true; - //__IriSP.trace("__IriSP.config.player.type",__IriSP.config.player.type); - if( IriSP.config.player.type=='jwplayer' ){ - - IriSP.player.sendEvent( 'PLAY' ); - - } else if(IriSP.config.player.type == 'dailymotion' - || IriSP.config.player.type == 'youtube' ) { - - var status = IriSP.player.getPlayerState(); - IriSP.trace( "__IriSP.APIplayer.prototype.play.status", status); - if ( status != 1 ){ - IriSP.player.playVideo(); - } else { - IriSP.player.pauseVideo(); - } - } -}; - -__IriSP.APIplayer.prototype.mute = function() { - IriSP.player.sendEvent( 'MUTE' ); - - //alert(__IriSP.jQuery(".ui-icon-volume-on").css("background-position-x")); - /* FIXME : remove hardcoded values */ - if ( IriSP.jQuery( ".ui-icon-volume-on" ).css( "background-position" ) == "-144px -160px" ){ - IriSP.jQuery(" .ui-icon-volume-on ").css(" background-position ", "-130px -160px"); - } else { - IriSP.jQuery( ".ui-icon-volume-on" ).css( "background-position", "-144px -160px" ); - } -}; - -/* FIXME : rename */ -__IriSP.APIplayer.prototype.share = function( network ) { - - /* FIXME : remove hardcoded */ - var MyMessage = encodeURIComponent( "J'écoute Les Retours du Dimanche : " ); - var MyURLNow = window.location.href; - var shareURL = null; - //alert(network+" : "+MyURLNow); - - /* FIXME : use a sharing library */ - if(network == "facebook"){ - shareURL = "http://www.facebook.com/share.php?u="; - }else if(network == "twitter"){ - shareURL = "http://twitter.com/home?status="+MyMessage; - }else if(network == "myspace"){ - shareURL ="http://www.myspace.com/Modules/PostTo/Pages/?u="; - }else if(network == "delicious"){ - shareURL = "http://delicious.com/save?url="; - }else if(network == "JameSpot"){ - shareURL = "http://www.jamespot.com/?action=spotit&u="; - //alert(network+" non actif pour l'instant : "+MyURLNow); - } - - if (shareURL != null) - window.open( shareURL+encodeURIComponent(MyURLNow) ); - //window.location.href = shareURL+encodeURIComponent(MyURLNow); -}; - -__IriSP.APIplayer.prototype.seek = function (time) { - - if( time==0 ) { time=1; } - - IriSP.trace( "__IriSP.APIplayer.prototype.seek", time ); - - if( IriSP.config.player.type=='jwplayer') { - //__IriSP.MyApiPlayer.play() - IriSP.player.sendEvent( 'SEEK', time ); - } else if( IriSP.config.player.type=='dailymotion' - || IriSP.config.player.type=='youtube' ) { - IriSP.player.seekTo( time ); - } - - this.changePageUrlOffset( time ); -}; - -__IriSP.APIplayer.prototype.update = function (time) { - - if( time != 0 ) { - this.hashchangeUpdate = true; - - IriSP.trace( "__IriSP.APIplayer.prototype.update" ,time); - IriSP.player.sendEvent( 'SEEK', time ); - } -}; - -__IriSP.APIplayer.prototype.changePageUrlOffset = function ( time ) { - //alert(time); - IriSP.trace( "__IriSP.APIplayer.prototype.changePageUrlOffset" , "CHANGE URL "+ time); - - window.location.hash = "#t=" + time; - window.location.href = window.location.href; - -}; - -/* Media Fragment functionality by Silvia Pfeiffer */ - -IriSP.jumpToTimeoffset = function ( form ) { - var time = form.time.value; - IriSP.MyApiPlayer.changePageUrlOffset( time ); -}; - -IriSP.retrieveTimeFragment = function ( url ) { - var pageoffset = 0; - var offsettime = 0; - - if ( url.split("#")[1] != null ) { - pageoffset = url.split( "#" )[1]; - if ( pageoffset.substring( 2 ) != null ) { - offsettime = pageoffset.substring( 2 ); - } - } - return offsettime; -}; - -IriSP.ignoreTimeFragment = function( url ){ - - var pageurl = url; - - if ( url.split( "#" )[1] != null ) { - pageurl = url.split( "#" )[0]; - } - - return pageurl; -}; - - -/* code specific to jwplayer / creation and listener */ - -IriSP.currentPosition = 0; -IriSP.currentVolume = 50; -IriSP.player = null; -IriSP.startPosition = null; -IriSP.firstplay = false; - - - -IriSP.createPlayer = function ( url, streamerPath ) { - if( IriSP.config.player.type=='dailymotion' ) { - IriSP.config.player.src = IriSP.config.player.src+"&chromeless=1&enableApi=1"; - } else if ( IriSP.config.player.type=='youtube' ){ - IriSP.config.player.src = IriSP.config.player.src+"&enablejsapi=1&version=3"; - } - - IriSP.trace( "__IriSP.createPlayer", "start" ); - - IriSP.myUrlFragment = url.split( streamerPath ); - - var configTemp = IriSP.jQuery.extend( true, {}, IriSP.config ); - configTemp.player.flashvars.autostart = "true"; - configTemp.player.flashvars.streamer = streamerPath; - configTemp.player.flashvars.file = IriSP.myUrlFragment[1]; - - var flashvars = configTemp.player.flashvars; - var params = configTemp.player.params; - var attributes = configTemp.player.attributes; - - IriSP.trace( - "__IriSP.createPlayer", - "SWFOBJECT src:"+ - IriSP.config.player.src+ - " " +IriSP.config.gui.width+ - " " +IriSP.config.gui.height - ); - - swfobject.embedSWF( - IriSP.config.player.src, - "Ldt-PlaceHolder", - IriSP.config.gui.width, - IriSP.config.gui.height, - "9.0.115", // FIXME : de-hardcode version ? - false, - flashvars, - params, - attributes - ); - - // need a methode to - // re execute if this swf call does'nt work -}; - - -/* jw player api */ -IriSP.playerReady = function (thePlayer) { - - //__IriSP.trace("__IriSP.playerReady","PLAYER READY !!!!!!!!!!!!"); - IriSP.player = window.document[thePlayer.id]; - //__IriSP.trace("__IriSP.playerReady","API CALL "+__IriSP.player); - IriSP.MyApiPlayer.ready( IriSP.player ); - //__IriSP.trace("__IriSP.playerReady","API CALL END "); - - var url = document.location.href; - var time = IriSP.retrieveTimeFragment( url ); - //__IriSP.trace("__IriSP.playerReady"," "+url+" "+time ); - IriSP.startPosition = time; - //__IriSP.trace("__IriSP.playerReady"," LISTENER LAUCHER"); - IriSP.addListeners(); - //__IriSP.trace("__IriSP.playerReady"," LISTENER END"); - -}; - -IriSP.addListeners = function () { - if ( IriSP.player ) { - IriSP.trace("__IriSP.addListeners","ADD Listener "); - IriSP.player.addModelListener( "TIME", "__IriSP.positionListener"); - IriSP.player.addControllerListener( "VOLUME", "__IriSP.volumeListener" ); - IriSP.player.addModelListener( 'STATE', '__IriSP.stateMonitor' ); - } else { - IriSP.setTimeout( "__IriSP.addListeners()", 100 ); - } - - // et changer les boutons -}; - -IriSP.stateMonitor = function ( obj ) { - - if(obj.newstate == 'PAUSED') { - IriSP.trace( "__IriSP.stateMonitor", "PAUSE" ); - IriSP.MyApiPlayer.changePageUrlOffset( IriSP.currentPosition ); - IriSP.jQuery( ".ui-icon-play" ).css( "background-position","0px -160px" ); - - } else if (obj.newstate == 'PLAYING' ){ - - IriSP.trace( "__IriSP.stateMonitor", "PLAYING "+IriSP.startPosition ); - - // force buffering even if autostart is disabled. - if ( IriSP.config.player.flashvars.autostart == "false" && IriSP.firstplay == false && IriSP.startPosition == 0 ) { - IriSP.trace("__IriSP.stateMonitor","first stop ???"); - IriSP.MyApiPlayer.play(); - IriSP.firstplay = true; - IriSP.MyLdt.checkTime( 1 ); - } - - // once that the video is loaded, move it to the correct timecode - if( IriSP.startPosition!=null ){ - IriSP.MyApiPlayer.update( IriSP.startPosition ); - IriSP.startPosition = null; - } - - - IriSP.jQuery( ".ui-icon-play" ).css( "background-position", "-16px -160px" ); - } else if (obj.newstate == 'BUFFERING'){ - IriSP.trace( "__IriSP.stateMonitor", "BUFFERING : "+IriSP.config.player.flashvars.autostart ); - //changePageUrlOffset(currentPosition); - } - -}; - -IriSP.positionListener = function(obj) { - //__IriSP.trace("__IriSP.positionListener",obj.position); - IriSP.currentPosition = obj.position; - var tmp = document.getElementById( "posit" ); - if (tmp) { tmp.innerHTML = "position: " + IriSP.currentPosition; } - IriSP.jQuery( "#slider-range-min" ).slider( "value", obj.position); - IriSP.jQuery( "#amount" ).val(obj.position+" s"); - // display annotation - IriSP.MyLdt.checkTime( IriSP.currentPosition ); - -}; - -IriSP.volumeListener = function (obj) { - IriSP.currentVolume = obj.percentage; - var tmp = document.getElementById("vol"); - if (tmp) { tmp.innerHTML = "volume: " + IriSP.currentVolume; } -}; - - -/* dailymotion api */ -onDailymotionPlayerReady = function (playerid) { - - //alert(playerid); - IriSP.player = document.getElementById( IriSP.config.player.attributes.id ); - IriSP.MyApiPlayer.ready( IriSP.player ); - - var url = document.location.href; - var time = IriSP.retrieveTimeFragment( url ); - IriSP.startPosition = time; - IriSP.DailymotionAddListeners(); - - IriSP.MyApiPlayer.ready(playerid); -}; - -IriSP.DailymotionAddListeners = function () { - if ( IriSP.player ) { - IriSP.trace( "__IriSP.addListeners","ADD Listener " ); - //__IriSP.player.addEventListener("onStateChange", "__IriSP.DailymotionPositionListener"); - setTimeout( "__IriSP.DailymotionPositionListener()", 100); - IriSP.DailymotionPositionListener(); - /* FIXME : works only with jwplayer */ - IriSP.player.addModelListener( "VOLUME", "__IriSP.volumeListener" ); - //__IriSP.player.addModelListener('STATE', '__IriSP.stateMonitor'); - } else { - IriSP.setTimeout( "__IriSP.DailymotionAddListeners()", 100); - } -}; - -IriSP.DailymotionPositionListener = function() { - - IriSP.currentPosition = IriSP.player.getCurrentTime(); - //__IriSP.trace("__IriSP.DailymotionPositionListener",__IriSP.currentPosition); - //__IriSP.trace("__IriSP.currentPosition",__IriSP.currentPosition); - - IriSP.jQuery( "#slider-range-min" ).slider( "value" , IriSP.currentPosition); - IriSP.jQuery( "#amount" ).val( IriSP.currentPosition+" s" ); - // afficher annotation - /*__IriSP.MyLdt.checkTime(__IriSP.currentPosition); - */ - - setTimeout( "__IriSP.DailymotionPositionListener()", 10 ); -}; - -/* youtube api */ -onYouTubePlayerReady= function (playerid){ - - var url = document.location.href; - var time = IriSP.retrieveTimeFragment( url ); - IriSP.player = document.getElementById( IriSP.config.player.attributes.id ); - IriSP.startPosition = time; - - IriSP.MyApiPlayer.ready( IriSP.player ); - - IriSP.MyApiPlayer.seek( time ); - IriSP.MyApiPlayer.play(); - - - IriSP.YouTubeAddListeners(); - IriSP.trace( "onYouTubePlayerReady=", time); - //__IriSP.MyApiPlayer.ready(playerid); -}; - -IriSP.YouTubeAddListeners = function () { - if ( IriSP.player ) { - IriSP.trace( "__IriSP.addListeners", "ADD Listener " ); - IriSP.player.addEventListener( "onStateChange", "__IriSP.YouTubeStateMonitor" ); - setTimeout( "__IriSP.YouTubePositionListener()", 100 ); - - /* FIXME : works only with jwplayer */ - IriSP.player.addModelListener( "VOLUME", "__IriSP.volumeListener" ); - //__IriSP.player.addModelListener('STATE', '__IriSP.stateMonitor'); - } else { - } -}; - -IriSP.YouTubePositionListener = function() { - - IriSP.currentPosition = IriSP.player.getCurrentTime(); - //__IriSP.trace("__IriSP.YouTubePositionListener",__IriSP.currentPosition); - //__IriSP.trace("__IriSP.currentPosition",__IriSP.currentPosition); - - IriSP.MyLdt.checkTime(IriSP.currentPosition); - IriSP.jQuery( "#slider-range-min" ).slider( "value", IriSP.currentPosition ); - IriSP.jQuery( "#amount" ).val( IriSP.currentPosition+" s" ); - // afficher annotation - IriSP.MyLdt.checkTime( IriSP.currentPosition ); - - - setTimeout( "__IriSP.YouTubePositionListener()", 10 ); -}; - -IriSP.YouTubeStateMonitor = function (obj) { - IriSP.player.addModelListener( '__IriSP.YouTubeStateMonitor ', newstate ); - //alert(newstate+" "+obj.newstate); - if(newstate == '2') { - IriSP.trace("__IriSP.stateMonitor","PAUSE"); - IriSP.MyApiPlayer.changePageUrlOffset( IriSP.currentPosition ); - - } else if (newstate == '1' || newstate == '1') { - // une fois la video prete a lire la déplacer au bon timecode - if( IriSP.startPosition!=null ) { - IriSP.MyApiPlayer.update( IriSP.startPosition ); - IriSP.startPosition = null; - } - } else if (newstate == '3'){ - IriSP.trace("__IriSP.stateMonitor","BUFFERING : "); - //changePageUrlOffset(currentPosition); - } - -}; - - -/* utils */ -// code from http://stackoverflow.com/questions/822452/strip-html-from-text-javascript -/* FIXME: maybe make it a little more robust */ -IriSP.stripHtml = function(s){ - return s.replace(/\\&/g, '&').replace(/\\/g, '>').replace(/\\t/g, '   ').replace(/\\n/g, '
').replace(/'/g, ''').replace(/"/g, '"'); -}; - -// conversion de couleur Decimal vers HexaDecimal || 000 si fff -/* FIXME : move it somewhere else */ -IriSP.DEC_HEXA_COLOR = function (dec) { - var hexa='0123456789ABCDEF',hex=''; - var tmp; - while (dec>15){ - tmp = dec-(Math.floor(dec/16))*16; - hex = hexa.charAt(tmp)+hex; - dec = Math.floor(dec/16); - } - hex = hexa.charAt(dec)+hex; - if (hex == "FFCC00"){ hex="";/* by default color of Ldt annotation */ } - return(hex); -}; - - -/* Search methods */ -IriSP.SearchOldValue=""; -IriSP.searchblockOpen=false; -IriSP.searchblock = function () { - IriSP.trace( "__IriSP.searchblock", IriSP.searchblockOpen ); - - if ( IriSP.searchblockOpen == false ) { - IriSP.jQuery( ".ui-icon-search" ).css( "background-position", "-144px -112px" ); - //__IriSP.jQuery("#LdtSearch").animate({height:26},250); - IriSP.jQuery("#LdtSearch").show(250); - /* FIXME : refactor this */ - IriSP.jQuery("#LdtSearchInput").css('background-color','#fff'); - IriSP.jQuery("#LdtSearchInput").focus(); - IriSP.jQuery("#LdtSearchInput").attr('value',IriSP.SearchOldValue); - IriSP.Search(IriSP.SearchOldValue); - IriSP.searchblockOpen = true; - } else { - IriSP.SearchOldValue = IriSP.jQuery("#LdtSearchInput").attr('value'); - IriSP.jQuery("#LdtSearchInput").attr('value',''); - IriSP.SearchClean(); - IriSP.jQuery(".ui-icon-search").css("background-position","-160px -112px"); - //__IriSP.jQuery("#LdtSearch").animate({height:0},250); - IriSP.jQuery("#LdtSearch").hide(250); - IriSP.searchblockOpen = false; - } -}; - -/* Search with typeahead */ -IriSP.Search = function ( value ){ - - annotations = IriSP.LDTligne.annotations; - - IriSP.trace("__IriSP.Search", annotations.length+" "+value); - - var found = 0; - var findmem = 0; - var factor = 0; - IriSP.trace(value,value.length); - var valueS = value.toLowerCase(); - IriSP.trace("__IriSP.Search", annotations.length+" "+valueS); - if(valueS.length>=3){ - - for (var i=0; i < annotations.length; ++i){ - annotation = annotations[i]; - - IriSP.jQuery("#output2").text(annotation.title+" ?= "+value); - - chaine1 = annotation.title.toLowerCase(); - chaine2 = annotation.description.toLowerCase(); - chaine3 = annotation.htmlTags.toLowerCase(); - - if(chaine1.indexOf(valueS,0) !=-1){ - found+=1; - } - if(chaine2.indexOf(valueS,0) !=-1){ - found+=1; - } - if(chaine3.indexOf(valueS,0) !=-1){ - found+=1; - } - - findmem += found; - if(found>0){ - factor = found*8; - IriSP.jQuery("#"+annotation.id).dequeue(); - IriSP.jQuery("#"+annotation.id).animate({height:factor},200); - IriSP.jQuery("#"+annotation.id).css('border','2px'); - IriSP.jQuery("#"+annotation.id).css('border-color','red'); - IriSP.jQuery("#"+annotation.id).animate({opacity:0.6},200); - - IriSP.trace("!!!!!!!!!!!!!!!!!!"," ?= "+annotation.id); - IriSP.jQuery("#LdtSearchInput").css('background-color','#e1ffe1'); - }else { - IriSP.jQuery("#"+annotation.id).dequeue(); - IriSP.jQuery("#"+annotation.id).animate({height:0},250); - IriSP.jQuery("#"+annotation.id).animate({opacity:0.3},200); - } - - found = 0; - } - if(findmem==0){ - IriSP.jQuery("#LdtSearchInput").css('background-color','#f6f6f6'); - } - - } else if(value.length==0){ - IriSP.SearchClean(); - IriSP.jQuery("#LdtSearchInput").css('background-color','#fff'); - } else { - IriSP.SearchClean(); - IriSP.jQuery("#LdtSearchInput").css('background-color','#f6f6f6'); - } -}; - -IriSP.SearchClean = function (){ - annotations = IriSP.LDTligne.annotations; - - for (var i=0; i < annotations.length; ++i){ - annotation = annotations[i]; - IriSP.jQuery("#"+annotation.id).dequeue(); - IriSP.jQuery("#"+annotation.id).animate({height:0},100); - IriSP.jQuery("#"+annotation.id).css('border','0px'); - IriSP.jQuery("#"+annotation.id).css('border-color','red'); - IriSP.jQuery("#"+annotation.id).animate({opacity:0.3},100); - } -}; - - -IriSP.SearchThisSegment = function (annotation){ - /* FIXME: to implement */ - IriSP.jQuery("#LdtSearchInput").text(annotation.title); - IriSP.trace("__IriSP.Ligne.prototype.checkTimeLigne",annotation.title); - /*__IriSP.jQuery("#Ldt-SaDescription").text(annotationTempo.description); - __IriSP.jQuery("#Ldt-SaKeywordText").html("Mots clefs : "+annotationTempo.htmlTags);*/ -}; - - -/* CLASS Ligne (annotationType) */ - -IriSP.LDTligne = null; -__IriSP.Ligne = function( id, title, description, duration ) { - this.id = id; - this.title = title; - this.description = description; - // - this.annotations = new Array(); - this.duration = duration; - this.annotationOldRead = ""; - IriSP.LDTligne = this; - IriSP.trace("__IriSP.Ligne","CREATE "+IriSP.LDTligne); -}; - -__IriSP.Ligne.prototype.addAnnotation = function ( id, begin, end, media, title, description, color, tags ) { - var myAnnotation = new __IriSP.Annotation(id,begin,end,media,title,description,color,tags,this.duration); - this.annotations.push(myAnnotation); - //__IriSP.trace("__IriSP.Ligne.prototype.addAnnotation ","add annotation "+title); -}; - -__IriSP.Ligne.prototype.onClickLigneAnnotation = function( id ) { - /* TODO implement */ - //changePageUrlOffset(currentPosition); - //player.sendEvent('SEEK', this.start); - //__IriSP.trace("SEEK",this.start); -}; - -__IriSP.Ligne.prototype.searchLigneAnnotation = function( id ) { - /* TODO implement */ - /*for (){ - }*/ -}; - -__IriSP.Ligne.prototype.listAnnotations = function() { - /* TODO implement */ -}; - -__IriSP.Ligne.prototype.nextAnnotation = function () { - - var annotationCibleNumber = this.numAnnotation(this.annotationOldRead)+1; - var annotationCible = this.annotations[annotationCibleNumber]; - - if( annotationCibleNumberannotationTempo.begin/1000 && time "; - //alert(this.color+" : "+DEC_HEXA_COLOR(this.color)); - - IriSP.jQueryAnnotationTemplate = Mustache.to_html(IriSP.annotation_template, - {"divTitle" : divTitle, "id" : this.id, "startPourcent" : startPourcent, - "endPourcent" : endPourcent, "hexa_color" : IriSP.DEC_HEXA_COLOR(this.color), - "seekPlace" : Math.round(this.begin/1000)}); - - IriSP.jQuerytoolTipTemplate = Mustache.to_html(IriSP.tooltip_template, - {"title" : this.title, "begin" : this.begin, "end" : this.end, - "description": this.description}); - - - IriSP.jQuery("
"+IriSP.jQueryAnnotationTemplate+"
").appendTo("#Ldt-Annotations"); - // TOOLTIP BUG ! - - IriSP.jQuery("#"+this.id).tooltip({ effect: 'slide'}); - - - IriSP.jQuery("#"+this.id).fadeTo(0,0.3); - IriSP.jQuery("#"+this.id).mouseover(function() { - IriSP.jQuery("#"+this.id).animate({opacity: 0.6}, 5); - }).mouseout(function(){ - IriSP.jQuery("#"+this.id).animate({opacity: 0.3}, 5); - }); - IriSP.trace("__IriSP.Annotation.prototype.draw","ADD ANOTATION : "+this.begin+" "+this.end+" "+IriSP.stripHtml(this.title)+" | "+startPourcent+" | "+endPourcent+" | duration = "+this.duration); - -}; - -__IriSP.Annotation.prototype.drawTags = function(){ - /* FIXME : to implement */ - var KeywordPattern = ' '+' '; - - //__IriSP.trace(" !? Tags : ",this.tags); - - if (this.tags!=undefined){ - for (var i = 0; i < this.tags.length; ++i){ - - //this.htmlTags += ' '+MyTags.getTitle(this.tags[i]['id-ref'])+' '+" , "; - this.htmlTags += ' '+IriSP.MyTags.getTitle(this.tags[i]['id-ref'])+' '+" , "; - - } - } -}; - -__IriSP.Annotation.prototype.tootTipAnnotation = function() { - // 1 chercher le div correspondant - // 2 y mettre les information - return this.color + ' ' + this.type + ' apple'; -}; - -__IriSP.Annotation.prototype.onRollOverAnnotation = function (){ - this.tootTip(); -}; - -__IriSP.Annotation.prototype.timeToPourcent = function(time,timetotal){ - return (parseInt(Math.round(time/timetotal*100))); -}; - - -/* CLASS Tags */ - -__IriSP.Tags = function(object){ - this.myTags = object; - this.htmlTags = null; - this.weigthMax = 0; - //this.mySegments = new array(); -}; - -__IriSP.Tags.prototype.addAnnotation = function (annotation){ - for (var i = 0; i < this.myTags.length; ++i){ - this.myTags[i].mySegments = new Array(); - if (annotation.tags!=null){ - for (var j = 0; j < annotation.tags.length; ++j){ - if (this.myTags[i]['id'] == annotation.tags[j]['id-ref']){ - this.myTags[i].mySegments.push([annotation.begin,annotation.end,annotation.id]); - var weigthTempo = this.myTags[i].mySegments.length; - var tempo = this.myTags[i].mySegments[weigthTempo-1]; - //__IriSP.trace ("__IriSP.Tags.prototype.addAnnotation "," "+this.myTags[i]['meta']['dc:title']+" "+this.myTags[i]['id']+" : "+tempo[0]+" - "+tempo[1]); - - if (this.weigthMax < weigthTempo ){ - this.weigthMax = weigthTempo; - } - } - } - } - } -}; - -__IriSP.Tags.prototype.getTitle = function (id){ - for (var i = 0; i < this.myTags.length; ++i){ - if(this.myTags[i]['id']==id){ - return(this.myTags[i]['meta']['dc:title']); - } - } - -}; - -__IriSP.Tags.prototype.draw = function (){ - - IriSP.trace("__IriSP.Tags.prototype.draw"," !!! WELL START " ); - for (var i = 0; i < this.myTags.length; ++i){ - IriSP.trace("__IriSP.Tags.prototype.draw"," ADD Tags : "+this.myTags[i]['id']); - if(this.myTags[i]['id']!=null){ - this.htmlTags += ' '+this.myTags[i]['meta']['dc:title']+' '+' , '; - } - } - - IriSP.jQuery('#Ldt-Tags').html(this.htmlTags); - IriSP.trace("__IriSP.Tags.prototype.draw"," !!!! END WMAX= "+this.weigthMax ); - -}; - -__IriSP.Tags.prototype.show = function (id){ - - var timeStartOffsetA = 100000000000000000000; - var timeStartOffsetB = 100000000000000000000; - var timeEndOffsetA = 0; - var timeEndOffsetB = 0; - var timeStartID; - var timeEndID; - var WidthPourCent; - var leftPourCent; - var timeStartOffset; - - // case 1 : seul segment - // case 2 : 2 ou X segments - - - for (var i = 0; i < this.myTags.length; ++i){ - if (this.myTags[i]['id']==id){ - IriSP.trace("######### TAG DRAWing : "," END" ); - - for (var j = 0; j < this.myTags[i].mySegments.length; ++j){ - if(timeStartOffset> this.myTags[i].mySegments[j][0]){ - timeStartOffsetA = this.myTags[i].mySegments[j][0]; - timeStartOffsetB = this.myTags[i].mySegments[j][1]; - timeStartID = this.myTags[i].mySegments[j][2] - } - if(timeStartOffset> this.myTags[i].mySegments[j][0]){ - timeEndOffsetA = this.myTags[i].mySegments[j][0]; - timeEndOffsetB = this.myTags[i].mySegments[j][1]; - timeEndID = this.myTags[i].mySegments[j][2] - } - } - - } - } - - // ------------------------------------------------- - // - // ------------------------------------------------- - - leftPourCent = IriSP.timeToPourcent((timeStartOffsetA*1+(timeStartOffsetB-timeStartOffsetA)/2),IriSP.MyLdt.duration); - WidthPourCent = IriSP.timeToPourcent((timeEndOffsetA*1+(timeEndOffsetB-timeEndOffsetA)/2),IriSP.MyLdt.duration)-leftPourCent; - //WidthPourCent = timeToPourcent((timeEndOffsetA*1+(timeEndOffsetB-timeEndOffsetA)/2),MyLdt.duration)-startPourcent; - IriSP.jQuery("#Ldt-Show-Tags").css('left',leftPourCent+'%'); - IriSP.jQuery("#Ldt-Show-Tags").css('width',WidthPourCent+'%'); - IriSP.jQuery("#Ldt-Show-Tags").text('joijoij'); - // like arrow script - - - -}; - - -IriSP.annotation_template = "
"; -IriSP.annotation_loading_template = "
 
Chargement...
"; -IriSP.radio_template = "
Get flash to see this player
 
{{{share_template}}}
Mots clefs :
"; -IriSP.search_template = "
"; -IriSP.share_template = " "; -IriSP.tooltip_template = "
{{title}}
{{begin}} : {{end}}
{{description}}
"; -IriSP.video_template = "
Get flash to see this player
 \;
{{{share_template}}}
Mots clefs :
";/* - mustache.js — Logic-less templates in JavaScript - - See http://mustache.github.com/ for more info. -*/ - -var Mustache = function() { - var Renderer = function() {}; - - Renderer.prototype = { - otag: "{{", - ctag: "}}", - pragmas: {}, - buffer: [], - pragmas_implemented: { - "IMPLICIT-ITERATOR": true - }, - context: {}, - - render: function(template, context, partials, in_recursion) { - // reset buffer & set context - if(!in_recursion) { - this.context = context; - this.buffer = []; // TODO: make this non-lazy - } - - // fail fast - if(!this.includes("", template)) { - if(in_recursion) { - return template; - } else { - this.send(template); - return; - } - } - - template = this.render_pragmas(template); - var html = this.render_section(template, context, partials); - if(in_recursion) { - return this.render_tags(html, context, partials, in_recursion); - } - - this.render_tags(html, context, partials, in_recursion); - }, - - /* - Sends parsed lines - */ - send: function(line) { - if(line !== "") { - this.buffer.push(line); - } - }, - - /* - Looks for %PRAGMAS - */ - render_pragmas: function(template) { - // no pragmas - if(!this.includes("%", template)) { - return template; - } - - var that = this; - var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" + - this.ctag, "g"); - return template.replace(regex, function(match, pragma, options) { - if(!that.pragmas_implemented[pragma]) { - throw({message: - "This implementation of mustache doesn't understand the '" + - pragma + "' pragma"}); - } - that.pragmas[pragma] = {}; - if(options) { - var opts = options.split("="); - that.pragmas[pragma][opts[0]] = opts[1]; - } - return ""; - // ignore unknown pragmas silently - }); - }, - - /* - Tries to find a partial in the curent scope and render it - */ - render_partial: function(name, context, partials) { - name = this.trim(name); - if(!partials || partials[name] === undefined) { - throw({message: "unknown_partial '" + name + "'"}); - } - if(typeof(context[name]) != "object") { - return this.render(partials[name], context, partials, true); - } - return this.render(partials[name], context[name], partials, true); - }, - - /* - Renders inverted (^) and normal (#) sections - */ - render_section: function(template, context, partials) { - if(!this.includes("#", template) && !this.includes("^", template)) { - return template; - } - - var that = this; - // CSW - Added "+?" so it finds the tighest bound, not the widest - var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag + - "\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag + - "\\s*", "mg"); - - // for each {{#foo}}{{/foo}} section do... - return template.replace(regex, function(match, type, name, content) { - var value = that.find(name, context); - if(type == "^") { // inverted section - if(!value || that.is_array(value) && value.length === 0) { - // false or empty list, render it - return that.render(content, context, partials, true); - } else { - return ""; - } - } else if(type == "#") { // normal section - if(that.is_array(value)) { // Enumerable, Let's loop! - return that.map(value, function(row) { - return that.render(content, that.create_context(row), - partials, true); - }).join(""); - } else if(that.is_object(value)) { // Object, Use it as subcontext! - return that.render(content, that.create_context(value), - partials, true); - } else if(typeof value === "function") { - // higher order section - return value.call(context, content, function(text) { - return that.render(text, context, partials, true); - }); - } else if(value) { // boolean section - return that.render(content, context, partials, true); - } else { - return ""; - } - } - }); - }, - - /* - Replace {{foo}} and friends with values from our view - */ - render_tags: function(template, context, partials, in_recursion) { - // tit for tat - var that = this; - - var new_regex = function() { - return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?" + - that.ctag + "+", "g"); - }; - - var regex = new_regex(); - var tag_replace_callback = function(match, operator, name) { - switch(operator) { - case "!": // ignore comments - return ""; - case "=": // set new delimiters, rebuild the replace regexp - that.set_delimiters(name); - regex = new_regex(); - return ""; - case ">": // render partial - return that.render_partial(name, context, partials); - case "{": // the triple mustache is unescaped - return that.find(name, context); - default: // escape the value - return that.escape(that.find(name, context)); - } - }; - var lines = template.split("\n"); - for(var i = 0; i < lines.length; i++) { - lines[i] = lines[i].replace(regex, tag_replace_callback, this); - if(!in_recursion) { - this.send(lines[i]); - } - } - - if(in_recursion) { - return lines.join("\n"); - } - }, - - set_delimiters: function(delimiters) { - var dels = delimiters.split(" "); - this.otag = this.escape_regex(dels[0]); - this.ctag = this.escape_regex(dels[1]); - }, - - escape_regex: function(text) { - // thank you Simon Willison - if(!arguments.callee.sRE) { - var specials = [ - '/', '.', '*', '+', '?', '|', - '(', ')', '[', ']', '{', '}', '\\' - ]; - arguments.callee.sRE = new RegExp( - '(\\' + specials.join('|\\') + ')', 'g' - ); - } - return text.replace(arguments.callee.sRE, '\\$1'); - }, - - /* - find `name` in current `context`. That is find me a value - from the view object - */ - find: function(name, context) { - name = this.trim(name); - - // Checks whether a value is thruthy or false or 0 - function is_kinda_truthy(bool) { - return bool === false || bool === 0 || bool; - } - - var value; - if(is_kinda_truthy(context[name])) { - value = context[name]; - } else if(is_kinda_truthy(this.context[name])) { - value = this.context[name]; - } - - if(typeof value === "function") { - return value.apply(context); - } - if(value !== undefined) { - return value; - } - // silently ignore unkown variables - return ""; - }, - - // Utility methods - - /* includes tag */ - includes: function(needle, haystack) { - return haystack.indexOf(this.otag + needle) != -1; - }, - - /* - Does away with nasty characters - */ - escape: function(s) { - s = String(s === null ? "" : s); - return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) { - switch(s) { - case "&": return "&"; - case "\\": return "\\\\"; - case '"': return '"'; - case "'": return '''; - case "<": return "<"; - case ">": return ">"; - default: return s; - } - }); - }, - - // by @langalex, support for arrays of strings - create_context: function(_context) { - if(this.is_object(_context)) { - return _context; - } else { - var iterator = "."; - if(this.pragmas["IMPLICIT-ITERATOR"]) { - iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator; - } - var ctx = {}; - ctx[iterator] = _context; - return ctx; - } - }, - - is_object: function(a) { - return a && typeof a == "object"; - }, - - is_array: function(a) { - return Object.prototype.toString.call(a) === '[object Array]'; - }, - - /* - Gets rid of leading and trailing whitespace - */ - trim: function(s) { - return s.replace(/^\s*|\s*$/g, ""); - }, - - /* - Why, why, why? Because IE. Cry, cry cry. - */ - map: function(array, fn) { - if (typeof array.map == "function") { - return array.map(fn); - } else { - var r = []; - var l = array.length; - for(var i = 0; i < l; i++) { - r.push(fn(array[i])); - } - return r; - } - } - }; - - return({ - name: "mustache.js", - version: "0.3.1-dev", - - /* - Turns a template and view into HTML - */ - to_html: function(template, view, partials, send_fun) { - var renderer = new Renderer(); - if(send_fun) { - renderer.send = send_fun; - } - renderer.render(template, view, partials); - if(!send_fun) { - return renderer.buffer.join("\n"); - } - } - }); -}(); -/* utils.js - various utils that don't belong anywhere else */ - -/* trace function, for debugging */ - -IriSP.traceNum = 0; -IriSP.trace = function( msg, value ) { - - if( IriSP.config.gui.debug === true ) { - IriSP.traceNum += 1; - IriSP.jQuery( "
"+IriSP.traceNum+" - "+msg+" : "+value+"
" ).appendTo( "#Ldt-output" ); - } -}; - -/* data.js - this file deals with how the players gets and sends data */ - -IriSP.getMetadata = function() { - - IriSP.jQuery.ajax({ - dataType: IriSP.config.metadata.load, - url:IriSP.config.metadata.src, - success : function( json ){ - - IriSP.trace( "ajax", "success" ); - - // START PARSING ----------------------- - if( json === "" ){ - alert( "Json load error" ); - } else { - // # CREATE MEDIA // - // # JUSTE ONE PLAYER FOR THE MOMENT // - //__IriSP.jQuery("
").appendTo("#output"); - var MyMedia = new __IriSP.Media( - json.medias[0].id, - json.medias[0].href, - json.medias[0]['meta']['dc:duration'], - json.medias[0]['dc:title'], - json.medias[0]['dc:description']); - - IriSP.trace( "__IriSP.MyApiPlayer", - IriSP.config.gui.width+" " - + IriSP.config.gui.height + " " - + json.medias[0].href + " " - + json.medias[0]['meta']['dc:duration'] + " " - + json.medias[0]['meta']['item']['value']); - - // Create APIplayer - IriSP.MyApiPlayer = new __IriSP.APIplayer ( - IriSP.config.gui.width, - IriSP.config.gui.height, - json.medias[0].href, - json.medias[0]['meta']['dc:duration'], - json.medias[0]['meta']['item']['value']); - - // # CREATE THE FIRST LINE // - IriSP.trace( "__IriSP.init.main","__IriSP.Ligne" ); - IriSP.MyLdt = new __IriSP.Ligne( - json['annotation-types'][0].id, - json['annotation-types'][0]['dc:title'], - json['annotation-types'][0]['dc:description'], - json.medias[0]['meta']['dc:duration']); - - // CREATE THE TAG CLOUD // - IriSP.trace( "__IriSP.init.main","__IriSP.Tags" ); - IriSP.MyTags = new __IriSP.Tags( json.tags ); - - // CREATE THE ANNOTATIONS // - // JUSTE FOR THE FIRST TYPE // - /* FIXME: make it support more than one ligne de temps */ - IriSP.jQuery.each( json.annotations, function(i,item) { - if (item.meta['id-ref'] == IriSP.MyLdt.id) { - //__IriSP.trace("__IriSP.init.main","__IriSP.MyLdt.addAnnotation"); - IriSP.MyLdt.addAnnotation( - item.id, - item.begin, - item.end, - item.media, - item.content.title, - item.content.description, - item.content.color, - item.tags); - } - //MyTags.addAnnotation(item); - } ); - IriSP.jQuery.each( json.lists, function(i,item) { - IriSP.trace("lists",""); - } ); - IriSP.jQuery.each( json.views, function(i,item) { - IriSP.trace("views",""); - } ); - } - // END PARSING ----------------------- // - - - }, error : function(data){ - alert("ERROR : "+data); - } - }); - -}/* site.js - all our site-dependent config : player chrome, cdn locations, etc...*/ - -IriSP.lib = { - jQuery:"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", - jQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js", - jQueryToolTip:"http://cdn.jquerytools.org/1.2.4/all/jquery.tools.min.js", - swfObject:"http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js", - cssjQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css" -}; - -//Player Configuration -IriSP.config = undefined; -IriSP.configDefault = { - metadata:{ - format:'cinelab', - src:'', - load:'jsonp' - }, - gui:{ - width:650, - height:0, - mode:'radio', - container:'LdtPlayer', - debug:false, - css:'../src/css/LdtPlayer.css' - }, - player:{ - type:'jwplayer', - src:'../res/swf/player.swf', - params:{ - allowfullscreen:"true", - allowscriptaccess:"always", - wmode:"transparent" - }, - flashvars:{ - streamer:"streamer", - file:"file", - live:"true", - autostart:"false", - controlbar:"none", - playerready:"IriSP.playerReady" - }, - attributes:{ - id:"Ldtplayer1", - name:"Ldtplayer1" - } - }, - module:null -}; - -/* ui.js - ui related functions */ - -/* FIXME: use an sharing library */ -IriSP.LdtShareTool = IriSP.share_template; /* the contents come from share.html */ - -IriSP.createPlayerChrome = function(){ - var width = IriSP.config.gui.width; - var height = IriSP.config.gui.height; - var heightS = IriSP.config.gui.height-20; - - // AUDIO */ - // PB dans le html : ; - IriSP.trace( "__IriSP.createMyHtml",IriSP.config.gui.container ); - - - /* FIXME : factor this in another file */ - if( IriSP.config.gui.mode=="radio" ){ - - IriSP.jQuery( "#"+IriSP.config.gui.container ).before(IriSP.search_template); - var radioPlayer = Mustache.to_html(IriSP.radio_template, {"share_template" : IriSP.share_template}); - IriSP.jQuery(radioPlayer).appendTo("#"+IriSP.config.gui.container); - - // special tricks for IE 7 - if (IriSP.jQuery.browser.msie==true && IriSP.jQuery.browser.version=="7.0"){ - //LdtSearchContainer - //__IriSP.jQuery("#LdtPlayer").attr("margin-top","50px"); - IriSP.jQuery("#Ldt-Root").css("padding-top","25px"); - IriSP.trace("__IriSP.createHtml","IE7 SPECIAL "); - } - } else if(IriSP.config.gui.mode=="video") { - - var videoPlayer = Mustache.to_html(IriSP.video_template, {"share_template" : IriSP.share_template, "heightS" : heightS}); - IriSP.jQuery(videoPlayer).appendTo("#"+IriSP.config.gui.container); - } - - /* FIXME : move it elsewhere */ - IriSP.trace("__IriSP.createHtml",IriSP.jQuery.browser.msie+" "+IriSP.jQuery.browser.version); - IriSP.trace("__IriSP.createHtml","end"); - IriSP.jQuery("#Ldt-Annotations").width(width-(75*2)); - IriSP.jQuery("#Ldt-Show-Arrow-container").width(width-(75*2)); - IriSP.jQuery("#Ldt-ShowAnnotation-audio").width(width-10); - IriSP.jQuery("#Ldt-ShowAnnotation-video").width(width-10); - IriSP.jQuery("#Ldt-SaKeyword").width(width-10); - IriSP.jQuery("#Ldt-controler").width(width-10); - IriSP.jQuery("#Ldt-Control").attr("z-index","100"); - IriSP.jQuery("#Ldt-controler").hide(); - - IriSP.jQuery(IriSP.annotation_loading_template).appendTo("#Ldt-ShowAnnotation-audio"); - - if(IriSP.config.gui.mode=='radio'){ - IriSP.jQuery("#Ldt-load-container").attr("width",IriSP.config.gui.width); - } - // Show or not the output - if(IriSP.config.gui.debug===true){ - IriSP.jQuery("#Ldt-output").show(); - } else { - IriSP.jQuery("#Ldt-output").hide(); - } - -}; - - -/* create the buttons and the slider */ -IriSP.createInterface = function( width, height, duration ) { - - IriSP.jQuery( "#Ldt-controler" ).show(); - //__IriSP.jQuery("#Ldt-Root").css('display','visible'); - IriSP.trace( "__IriSP.createInterface" , width+","+height+","+duration+"," ); - - IriSP.jQuery( "#Ldt-ShowAnnotation").click( function () { - //__IriSP.jQuery(this).slideUp(); - } ); - - var LdtpPlayerY = IriSP.jQuery("#Ldt-PlaceHolder").attr("top"); - var LdtpPlayerX = IriSP.jQuery("#Ldt-PlaceHolder").attr("left"); - - IriSP.jQuery( "#slider-range-min" ).slider( { //range: "min", - value: 0, - min: 1, - max: duration/1000,//1:54:52.66 = 3600+3240+ - step: 0.1, - slide: function(event, ui) { - - //__IriSP.jQuery("#amount").val(ui.value+" s"); - //player.sendEvent('SEEK', ui.value) - IriSP.MyApiPlayer.seek(ui.value); - //changePageUrlOffset(ui.value); - //player.sendEvent('PAUSE') - } - } ); - - IriSP.trace("__IriSP.createInterface","ICI"); - IriSP.jQuery("#amount").val(IriSP.jQuery("#slider-range-min").slider("value")+" s"); - IriSP.jQuery(".Ldt-Control1 button:first").button({ - icons: { - primary: 'ui-icon-play' - }, - text: false - }).next().button({ - icons: { - primary: 'ui-icon-seek-next' - }, - text: false - }); - IriSP.jQuery(".Ldt-Control2 button:first").button({ - icons: { - primary: 'ui-icon-search'//, - //secondary: 'ui-icon-volume-off' - }, - text: false - }).next().button({ - icons: { - primary: 'ui-icon-volume-on' - }, - text: false - }); - - // /!\ PB A MODIFIER - //__IriSP.MyTags.draw(); - IriSP.trace("__IriSP.createInterface","ICI2"); - IriSP.jQuery( "#ldt-CtrlPlay" ).attr( "style", "background-color:#CD21C24;" ); - - IriSP.jQuery( "#Ldt-load-container" ).hide(); - - if( IriSP.config.gui.mode=="radio" & IriSP.jQuery.browser.msie != true ) { - IriSP.jQuery( "#Ldtplayer1" ).attr( "height", "0" ); - } - IriSP.trace( "__IriSP.createInterface" , "3" ); - - IriSP.trace( "__IriSP.createInterface", "END" ); - - }; diff -r f11b234497f7 -r 61c384dda19e examples/index-youtube.htm --- a/examples/index-youtube.htm Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ - - - - - - - - - -
-

MetaData Player

- Iri MetaData is a javascript's Widget interface to augment existing flash or html5 video player. - It's made to show time annotation and different metadata on video. - To implement it on your website it's 's really simple. - You just need to insert a div and a script, like the exemple under this lines.

- /!\ This is the first beta version the code is not optimized ! But your feedback is needed ! - This player was test on : -
    -
  • Firefox 3.6.9
  • -
  • Chrome 6.0.472.55
  • -
  • Safari 5.0.2
  • -
  • Internet Explore 8
  • -
- This Player is a freeSoftware under CeCILL-C license. - This program is made by Institut de recherche et d innovation - more information on this page. -

-
- - - - - - - -
- - - - - - - \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e examples/index.htm --- a/examples/index.htm Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ - - - - - - - - - -
-

MetaDataPlayer

- Iri MetaDataPlayer is a javascript's Widget interface to augment existing flash or html5 video player. - It's made to show time annotation and different metadata on video. - To implement it on your website it's 's really simple. - You just need to insert a div and a script, like the exemple under this lines.

- This player was test on : firefox 3.6.9 / Chrome 6.0.472.55 / Safari 5.0.2 / Internet Explore 8

- This Player is a freeSoftware under CeCILL-C license. - This program is made by Institut de recherche et d innovation - more information on this page. -
- - - - - -
- - - - - - - \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e examples/test-youtube.json --- a/examples/test-youtube.json Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,461 +0,0 @@ -{ - "tags": [ - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.147547", - "dc:title": "suffrage universel", - "dc:modified": "2010-09-15T15:28:02.147547", - "dc:creator": "IRI" - }, - "id": "d4000614-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.148547", - "dc:title": "Patrick Rogiers", - "dc:modified": "2010-09-15T15:28:02.148547", - "dc:creator": "IRI" - }, - "id": "d4002126-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.145004", - "dc:title": "Kirgistan", - "dc:modified": "2010-09-15T15:28:02.145004", - "dc:creator": "IRI" - }, - "id": "d3ff94ae-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.146232", - "dc:title": "Alphonse Baudin", - "dc:modified": "2010-09-15T15:28:02.146232", - "dc:creator": "IRI" - }, - "id": "d3ffbf06-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.147547", - "dc:title": "mandats rétribués", - "dc:modified": "2010-09-15T15:28:02.147547", - "dc:creator": "IRI" - }, - "id": "d3fffa02-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.148547", - "dc:title": "Belgique", - "dc:modified": "2010-09-15T15:28:02.148547", - "dc:creator": "IRI" - }, - "id": "d400197e-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.146745", - "dc:title": "18juin", - "dc:modified": "2010-09-15T15:28:02.146745", - "dc:creator": "IRI" - }, - "id": "d3ffd32e-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.148547", - "dc:title": "Wallons", - "dc:modified": "2010-09-15T15:28:02.148547", - "dc:creator": "IRI" - }, - "id": "d4002874-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.149993", - "dc:title": "theatre.doc", - "dc:modified": "2010-09-15T15:28:02.149993", - "dc:creator": "IRI" - }, - "id": "d40051f0-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.146745", - "dc:title": "marée noire", - "dc:modified": "2010-09-15T15:28:02.146745", - "dc:creator": "IRI" - }, - "id": "d3ffde82-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.148547", - "dc:title": "Flamands", - "dc:modified": "2010-09-15T15:28:02.148547", - "dc:creator": "IRI" - }, - "id": "d4001d70-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.147547", - "dc:title": "Auguste Baudin", - "dc:modified": "2010-09-15T15:28:02.147547", - "dc:creator": "IRI" - }, - "id": "d3fff26e-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.145004", - "dc:title": "retraite", - "dc:modified": "2010-09-15T15:28:02.145004", - "dc:creator": "IRI" - }, - "id": "d3ff9d3c-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.147547", - "dc:title": "financement politique", - "dc:modified": "2010-09-15T15:28:02.147547", - "dc:creator": "IRI" - }, - "id": "d3fff656-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.146745", - "dc:title": "Bloody Sunday", - "dc:modified": "2010-09-15T15:28:02.146745", - "dc:creator": "IRI" - }, - "id": "d3ffd716-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.148547", - "dc:title": "éléction", - "dc:modified": "2010-09-15T15:28:02.148547", - "dc:creator": "IRI" - }, - "id": "d4002c2a-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.147547", - "dc:title": "suffrage directs", - "dc:modified": "2010-09-15T15:28:02.147547", - "dc:creator": "IRI" - }, - "id": "d400022c-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.148547", - "dc:title": "vuvuzela", - "dc:modified": "2010-09-15T15:28:02.148547", - "dc:creator": "IRI" - }, - "id": "d40024c8-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.146745", - "dc:title": "Domenech", - "dc:modified": "2010-09-15T15:28:02.146745", - "dc:creator": "IRI" - }, - "id": "d3ffdacc-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.149511", - "dc:title": "sociologie du sport", - "dc:modified": "2010-09-15T15:28:02.149511", - "dc:creator": "IRI" - }, - "id": "d4003f12-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.145004", - "dc:title": "Mondiale", - "dc:modified": "2010-09-15T15:28:02.145004", - "dc:creator": "IRI" - }, - "id": "d3ff997c-c0dd-11df-bfff-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-15T15:28:02.147547", - "dc:title": "professionalisation de la politique", - "dc:modified": "2010-09-15T15:28:02.147547", - "dc:creator": "IRI" - }, - "id": "d3fffdae-c0dd-11df-bfff-00145ea4a2be" - } - ], - "views": null, - "lists": [ - { - "items": [ - { - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560" - }, - { - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795" - }, - { - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831" - }, - { - "id-ref": "c_DE60F95E-73B8-922D-3AC7-6FB197A1BF16" - } - ], - "meta": { - "dc:contributor": "undefined", - "dc:created": "2010-09-15T15:28:02.144361", - "dc:creator": "perso", - "id-ref": "franceculture_retourdudimanche20100620", - "dc:title": "Découpages personnels", - "editable": "false", - "dc:modified": "2010-09-15T15:28:02.144361", - "dc:description": "" - }, - "id": "ens_perso" - } - ], - "medias": [ - { - "origin": "0", - "http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_player/video/franceculture/franceculture_retourdudimanche20100620.flv", - "meta": { - "dc:contributor": "IRI", - "item": { - "name": "streamer", - "value": "rtmp://media.iri.centrepompidou.fr/ddc_player/" - }, - "dc:created": "2010-06-25T16:58:36.186952", - "dc:duration": 603000, - "dc:creator": "onubufonu", - "dc:created.contents": "2010-06-25", - "dc:title": "Andrei Tarkovsky interview part 1 ", - "dc:creator.contents": "IRI", - "dc:modified": "2010-06-25T16:58:36.187009", - "dc:description": "Test Youtube local example with Json" - }, - "id": "franceculture_retourdudimanche20100620", - "unit": "ms" - } - ], - "meta": { - "dc:contributor": "admin", - "dc:created": "2010-07-12T00:30:40.272719", - "dc:creator": "admin", - "main_media": { - "id-ref": "franceculture_retourdudimanche20100620" - }, - "dc:description": "", - "dc:title": "RetourDimanche20juin_decoupageChronique", - "id": "ef4dcc2e-8d3b-11df-8a24-00145ea4a2be", - "dc:modified": "2010-09-13T11:07:51.331011" - }, - "annotations": [ - { - "begin": 202000, - "end": 252000, - "tags": [ - { - "id-ref": "d3ff94ae-c0dd-11df-bfff-00145ea4a2be" - }, - { - "id-ref": "d3ff997c-c0dd-11df-bfff-00145ea4a2be" - }, - { - "id-ref": "d3ff9d3c-c0dd-11df-bfff-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "6684774", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": null - }, - "description": "", - "title": "Générique" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-15T15:28:02.144394", - "dc:modified": "2010-09-15T15:28:02.144394", - "dc:creator": "perso" - }, - "id": "s_38948-15F4-E7CB-EBC5-6FB51DAC635C" - }, - { - "begin": 50000, - "end": 182000, - "tags": [ - { - "id-ref": "d3ff94ae-c0dd-11df-bfff-00145ea4a2be" - }, - { - "id-ref": "d3ff997c-c0dd-11df-bfff-00145ea4a2be" - }, - { - "id-ref": "d3ff9d3c-c0dd-11df-bfff-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "16776960", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": null - }, - "description": "", - "title": "Générique" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-15T15:28:02.144394", - "dc:modified": "2010-09-15T15:28:02.144394", - "dc:creator": "perso" - }, - "id": "s_38978-15F4-E7CB-EBC5-6FB51DAC635C" - }, - { - "begin": 2, - "end": 12000, - "tags": [ - { - "id-ref": "d3ff94ae-c0dd-11df-bfff-00145ea4a2be" - }, - { - "id-ref": "d3ff997c-c0dd-11df-bfff-00145ea4a2be" - }, - { - "id-ref": "d3ff9d3c-c0dd-11df-bfff-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "16776960", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": null - }, - "description": "", - "title": "Générique" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-15T15:28:02.144394", - "dc:modified": "2010-09-15T15:28:02.144394", - "dc:creator": "perso" - }, - "id": "s_32C565F4-15F4-E7CB-EBC5-6FB51DAC635C" - }, - { - "begin": 25000, - "end": 35000, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "6684774", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": null - }, - "description": "description de test ...", - "title": "Sommaire" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-15T15:28:02.144394", - "dc:modified": "2010-09-15T15:28:02.144394", - "dc:creator": "perso" - }, - "id": "s_8F385150-64B3-7539-AB94-6FB51DAC40B4" - } - - ], - "annotation-types": [ - { - "dc:contributor": "perso", - "dc:creator": "perso", - "dc:title": "Chapitrage Notes", - "id": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-15T15:28:02.144394", - "dc:description": "", - "dc:modified": "2010-09-15T15:28:02.144394" - }, - { - "dc:contributor": "perso", - "dc:creator": "perso", - "dc:title": "Mes notes", - "id": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-15T15:28:02.150138", - "dc:description": "", - "dc:modified": "2010-09-15T15:28:02.150138" - }, - { - "dc:contributor": "perso", - "dc:creator": "perso", - "dc:title": "Mes notes", - "id": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-15T15:28:02.159006", - "dc:description": "", - "dc:modified": "2010-09-15T15:28:02.159006" - }, - { - "dc:contributor": "perso", - "dc:creator": "perso", - "dc:title": "Chapitrage", - "id": "c_DE60F95E-73B8-922D-3AC7-6FB197A1BF16", - "dc:created": "2010-09-15T15:28:02.163372", - "dc:description": "", - "dc:modified": "2010-09-15T15:28:02.163372" - } - ] -} \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e examples/test.json --- a/examples/test.json Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1456 +0,0 @@ -{ - "tags": [ - { - "meta": { - "dc:contributor": "IRI ", - "dc:created": "2010-09-06T15:53:44.618963", - "dc:title": "suffrage universel", - "dc:modified": "2010-09-06T15:53:44.618963", - "dc:creator": "IRI" - }, - "id": "edaabd04-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.621828", - "dc:title": "Patrick Rogiers", - "dc:modified": "2010-09-06T15:53:44.621828", - "dc:creator": "IRI" - }, - "id": "edab1fec-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.575615", - "dc:title": "Kirgistan", - "dc:modified": "2010-09-06T15:53:44.575615", - "dc:creator": "IRI" - }, - "id": "eda50fb2-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.600158", - "dc:title": "Alphonse Baudin", - "dc:modified": "2010-09-06T15:53:44.600158", - "dc:creator": "IRI" - }, - "id": "eda8ba7c-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.618963", - "dc:title": "mandats rétribués", - "dc:modified": "2010-09-06T15:53:44.618963", - "dc:creator": "IRI" - }, - "id": "edaab0b6-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.621828", - "dc:title": "Belgique", - "dc:modified": "2010-09-06T15:53:44.621828", - "dc:creator": "IRI" - }, - "id": "edab1808-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.609400", - "dc:title": "18juin", - "dc:modified": "2010-09-06T15:53:44.609400", - "dc:creator": "IRI" - }, - "id": "edaa23f8-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.621828", - "dc:title": "Wallons", - "dc:modified": "2010-09-06T15:53:44.621828", - "dc:creator": "IRI" - }, - "id": "edab2730-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.626707", - "dc:title": "theatre.doc", - "dc:modified": "2010-09-06T15:53:44.626707", - "dc:creator": "IRI" - }, - "id": "edabd6b2-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.609400", - "dc:title": "marée noire", - "dc:modified": "2010-09-06T15:53:44.609400", - "dc:creator": "IRI" - }, - "id": "edaa3aaa-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.621828", - "dc:title": "Flamands", - "dc:modified": "2010-09-06T15:53:44.621828", - "dc:creator": "IRI" - }, - "id": "edab1c36-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.618963", - "dc:title": "Auguste Baudin", - "dc:modified": "2010-09-06T15:53:44.618963", - "dc:creator": "IRI" - }, - "id": "edaaa8dc-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.575615", - "dc:title": "retraite", - "dc:modified": "2010-09-06T15:53:44.575615", - "dc:creator": "IRI" - }, - "id": "eda7047a-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.618963", - "dc:title": "financement politique", - "dc:modified": "2010-09-06T15:53:44.618963", - "dc:creator": "IRI" - }, - "id": "edaaad00-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.609400", - "dc:title": "Bloody Sunday", - "dc:modified": "2010-09-06T15:53:44.609400", - "dc:creator": "IRI" - }, - "id": "edaa329e-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.621828", - "dc:title": "éléction", - "dc:modified": "2010-09-06T15:53:44.621828", - "dc:creator": "IRI" - }, - "id": "edab2b68-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.618963", - "dc:title": "suffrage directs", - "dc:modified": "2010-09-06T15:53:44.618963", - "dc:creator": "IRI" - }, - "id": "edaab962-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.621828", - "dc:title": "vuvuzela", - "dc:modified": "2010-09-06T15:53:44.621828", - "dc:creator": "IRI" - }, - "id": "edab238e-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.609400", - "dc:title": "Domenech", - "dc:modified": "2010-09-06T15:53:44.609400", - "dc:creator": "IRI" - }, - "id": "edaa36ea-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.624524", - "dc:title": "sociologie du sport", - "dc:modified": "2010-09-06T15:53:44.624524", - "dc:creator": "IRI" - }, - "id": "edab8162-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.575615", - "dc:title": "Mondiale", - "dc:modified": "2010-09-06T15:53:44.575615", - "dc:creator": "IRI" - }, - "id": "eda60c8c-b9ce-11df-9e63-00145ea4a2be" - }, - { - "meta": { - "dc:contributor": "IRI", - "dc:created": "2010-09-06T15:53:44.618963", - "dc:title": "professionalisation de la politique", - "dc:modified": "2010-09-06T15:53:44.618963", - "dc:creator": "IRI" - }, - "id": "edaab5c0-b9ce-11df-9e63-00145ea4a2be" - } - ], - "views": null, - "lists": [ - { - "items": [ - { - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560" - }, - { - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795" - }, - { - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831" - }, - { - "id-ref": "c_DE60F95E-73B8-922D-3AC7-6FB197A1BF16" - } - ], - "meta": { - "dc:contributor": "undefined", - "dc:created": "2010-09-06T15:53:44.572185", - "dc:creator": "perso", - "id-ref": "franceculture_retourdudimanche20100620", - "dc:title": "Découpages personnels", - "editable": "false", - "dc:modified": "2010-09-06T15:53:44.572185", - "dc:description": "" - }, - "id": "ens_perso" - } - ], - "medias": [ - { - "origin": "0", - "http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_player/video/franceculture/franceculture_retourdudimanche20100620.flv", - "meta": { - "dc:contributor": "IRI", - "item": { - "name": "streamer", - "value": "rtmp://media.iri.centrepompidou.fr/ddc_player/" - }, - "dc:created": "2010-06-25T16:58:36.186952", - "dc:duration": 3016000, - "dc:creator": "IRI", - "dc:created.contents": "2010-06-25", - "dc:title": "FC Retour du dimanche 2010-06-20", - "dc:creator.contents": "IRI", - "dc:modified": "2010-06-25T16:58:36.187009", - "dc:description": "France Culture. Retour du dimanche 2010-06-20" - }, - "id": "franceculture_retourdudimanche20100620", - "unit": "ms" - } - ], - "meta": { - "dc:contributor": "admin", - "dc:created": "2010-07-12T00:30:40.272719", - "dc:creator": "admin", - "main_media": { - "id-ref": "franceculture_retourdudimanche20100620" - }, - "dc:description": "", - "dc:title": "RetourDimanche20juin_decoupageChronique", - "id": "ef4dcc2e-8d3b-11df-8a24-00145ea4a2be", - "dc:modified": "2010-08-25T11:39:25.507013" - }, - "annotations": [ - { - "begin": "0", - "end": 88414, - "tags": [ - { - "id-ref": "eda50fb2-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "eda60c8c-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "eda7047a-b9ce-11df-9e63-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "16776960", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "Générique" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:modified": "2010-09-06T15:53:44.572226", - "dc:creator": "perso" - }, - "id": "s_32C565F4-15F4-E7CB-EBC5-6FB51DAC635C" - }, - { - "begin": "88422", - "end": 169831, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "6684774", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "Sommaire" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:modified": "2010-09-06T15:53:44.572226", - "dc:creator": "perso" - }, - "id": "s_8F385150-64B3-7539-AB94-6FB51DAC40B4" - }, - { - "begin": "170235", - "end": 316123, - "tags": [ - { - "id-ref": "eda8ba7c-b9ce-11df-9e63-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "10027008", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "L'invité : Alain Guarrigue, sur Alphonse Baudin", - "title": "Présentation de l'invité - Alain Garrigou" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:modified": "2010-09-06T15:53:44.572226", - "dc:creator": "perso" - }, - "id": "s_948A7C82-DD23-8CAC-27D4-6FB51DAC7D41" - }, - { - "begin": "316720", - "end": 694781, - "tags": [ - { - "id-ref": "edaa23f8-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaa329e-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaa36ea-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaa36ea-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaa3aaa-b9ce-11df-9e63-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "6736896", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "Revue d'actualité - Hervé Gardette" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:modified": "2010-09-06T15:53:44.572226", - "dc:creator": "perso" - }, - "id": "s_54DB840E-01AC-D042-37E2-B2BA1E18B47C" - }, - { - "begin": "695261", - "end": 1772062, - "tags": [ - { - "id-ref": "edaaa8dc-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaaad00-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaab0b6-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaab5c0-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaab962-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edaabd04-b9ce-11df-9e63-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "10027008", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "Invité spécial - Alain Garrigou" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:modified": "2010-09-06T15:53:44.572226", - "dc:creator": "perso" - }, - "id": "s_BDB0677D-DBF9-D198-896B-B2BDB9012D54" - }, - { - "begin": "1772707", - "end": 2515173, - "tags": [ - { - "id-ref": "edab1808-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edab1c36-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edab1fec-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edab238e-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edab2730-b9ce-11df-9e63-00145ea4a2be" - }, - { - "id-ref": "edab2b68-b9ce-11df-9e63-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "6749952", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "Revue de presse - Hervé Gardette" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:modified": "2010-09-06T15:53:44.572226", - "dc:creator": "perso" - }, - "id": "s_3FC1D037-34A3-FEF7-541C-B2C31ED973A8" - }, - { - "begin": "2516091", - "end": 2646767, - "tags": [ - { - "id-ref": "edab8162-b9ce-11df-9e63-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "10027008", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "Le sujet de l'invité : la sociologie du sport - Alain Garrigou" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:modified": "2010-09-06T15:53:44.572226", - "dc:creator": "perso" - }, - "id": "s_82613B88-9578-DC2C-D7D0-B2C5BE0B7BDA" - }, - { - "begin": "2647012", - "end": 3012503, - "tags": [ - { - "id-ref": "edabd6b2-b9ce-11df-9e63-00145ea4a2be" - } - ], - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "16776960", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "Chronique du Courrier International - Antony Bélanger" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:modified": "2010-09-06T15:53:44.572226", - "dc:creator": "perso" - }, - "id": "s_24324ACF-E8D0-46FE-E977-B2C7D1A1FBAA" - }, - { - "begin": "902235", - "end": 1022560, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Garrigou : financement politique, suffrage universel et direct et mandats rétribués,", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_C5118055-7575-43BD-05BA-B2B91B977B61" - }, - { - "begin": "1022560", - "end": 1029340, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Caroline Broué", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_224FA6AF-AC6B-5412-C882-B2B91B97A0BC" - }, - { - "begin": "1029340", - "end": 1123892, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Garrigou : professionalisation de la politique, promotion sociale et financière", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_99950FC3-A79B-9A08-5E90-B2B91B97C844" - }, - { - "begin": "1123892", - "end": 1135827, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "CBroué : mourir pour des idées", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_7DE30BA7-4E61-F41D-9EB8-B2B91B97C4C1" - }, - { - "begin": "1135827", - "end": 1195874, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Archives Radio : Auguste Bodin, mourrir pour 25 francs", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_C588B92E-EB4F-B383-4D50-B2B91B97B4C2" - }, - { - "begin": "1195874", - "end": 1215565, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "C.Broué : geste et figure du député. Emblématique.", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_87A5F46B-9588-4C02-24B6-B2B91B97037A" - }, - { - "begin": "1215565", - "end": 1391433, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Garrigou : mourrir pour des idées est valorisé, grandeur humaine au 19è siècle\nVictor Hugo esthétise Bodin\nSouscription de bodin ou se révèle Gambetta", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_1CF29EC2-1109-25FF-F8D7-B2B91B97944A" - }, - { - "begin": "1391433", - "end": 1451340, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "C.Broué : héros civique, figure disparue,\ndéfense de l'indémnité parlementaire\nl'intérete a repris le dessus sur la politique", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_B3A6C0FE-10B0-91D2-BC98-B2B91B97EC15" - }, - { - "begin": "1451340", - "end": 1539483, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Garrigou : humour de Bodin, \non ne meurt pas pour de l'argent, \nl'argent n'est pas une conviction,\nHéros : héros guerrier, le Saint ou martyr,", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_FE44EC82-002E-3A78-B712-B2B91B975C76" - }, - { - "begin": "1539483", - "end": 1547610, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "C.Broué : Degaulle figure de héros civique ?", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_943F5904-D438-F263-C8B4-B2B91B97608C" - }, - { - "begin": "1547610", - "end": 1659484, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Garrigou : appel à la désobéissance, résistance de Bodin et Résistance de J.Moulin\nhéros civique : personnage anonyme\nca n'est pas le soldat, ni le saint, ni le Grand Homme", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_FBB30EA9-8699-E909-62BA-B2B91B9792C6" - }, - { - "begin": "1659484", - "end": 1720413, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "C.Broué : autonomisation du champs politique par rapport à l'intéret économique.\nperspective contemporaine : tenter de rétablir une certaine morale publique.", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_8F2D73FD-4C22-DE0A-E22A-B2B91B97CA92" - }, - { - "begin": "1720413", - "end": 1773308, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Garrigou : société post-héroique : la politique est une question économique\nsociété d'irresponsabilité,", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_716B6123-2040-71A2-3B8F-B2B91B978EF1" - }, - { - "begin": "1773308", - "end": 1846311, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Gardette : transition\nBelgique a voté. Flamand fait une percée historique. Tsunami politique ?\ninstabilité politique", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_1D64F959-8A86-FD3E-3FD1-B2B91B972648" - }, - { - "begin": "1846311", - "end": 2176406, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Patrick Rogiers : sur les résutats des élections belges", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_D7398F00-E4F5-9692-88D0-B2B91B976204" - }, - { - "begin": "2176406", - "end": 2207985, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Gardette : transition\nC. Broué : montée des nationalismes et séparatismes", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_21BCA9F6-A71C-C601-1247-B2B91B97A664" - }, - { - "begin": "2207985", - "end": 2248713, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Garrigou : sur les séparatismes, narcissisme des petites différences", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_45E25D8E-416B-8158-23DD-B2B91B9745CE" - }, - { - "begin": "2248713", - "end": 2519086, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "H. Gardette : Vuvuzela : tradition et calvaire", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_88FBDAB0-64C7-74B9-7C5A-B2B91B977EC3" - }, - { - "begin": "2519086", - "end": 2540542, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "C.Broué : question à Garrigou : sociologie du sport", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_6506C8B0-AAB0-3678-31FD-B2B91B978702" - }, - { - "begin": "2540542", - "end": 2647121, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Elimination de l'équipe de France\nArgent, politique du foot", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_CB104420-63C8-F957-78CF-B2B91B97D0B0" - }, - { - "begin": "2647121", - "end": 2657384, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "intermède musical", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_1947C9C6-B47F-1544-AD5E-B2B91B97A552" - }, - { - "begin": "2657384", - "end": 3012515, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Antony Bélanger (Courrier International) : Moscou, pièce de théatre à guichet fermé\nTheatre.doc : agonie de l'avocat en prison", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_874A4942-9AA9-CA9A-F595-B2B91B97210A" - }, - { - "begin": "3012515", - "end": 3013515, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:modified": "2010-09-06T15:53:44.626882", - "dc:creator": "perso" - }, - "id": "s_1F7790E7-BC3F-6C87-9B4F-B2B91B9769B6" - }, - { - "begin": "206240", - "end": 316720, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Interview : Alphonse Baudin\n\"comment meurt vos 25 francs\"\nabolitionniste, barricade,Victor Hugo, Victor", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_9CA4F1C6-6FA0-7070-EBCA-B293F1474ECC" - }, - { - "begin": "316720", - "end": 546458, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "actualité de Gardette : \n- Domenech et défaite francaise contre le Mexique\n- La France aura eu besoin de De Gaulle\n- 18 juin : 1815, défaite de waterloo\ndéfaite de Dien Bien \n- Belgique: éléctions et divorce Wallon et Flamands\n- Kirgistan : Pogrom contre les Ouzbeks, 200 morts.\n- Conflits Israélo-palestinien : enquete indépendante\n- Bloody Sunday, London dairy, répression sanglante. Rapport conclut à la seule culpabilité de l'armée britannique", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_F1A706C3-8CFD-8479-FE1A-B293F147FB10" - }, - { - "begin": "546458", - "end": 552728, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "intermède musicale", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_D87336F4-AF1E-1192-AD6F-B293F14750F6" - }, - { - "begin": "552728", - "end": 694963, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Retraite, travail allongé : méthode douce du gouvernement\nTony Eward communicant BP\nCatastrophe dans le Var\nApéro saucisson et pinard interdit\nécrivain portugais Saramago : l'évangile selon Jésus Christ", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_EA074915-79A3-E8C3-A7BD-B293F1472B4A" - }, - { - "begin": "695261", - "end": 725426, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "commentaire Alain Guarigou", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_20B4A5D9-D87C-329A-8D6E-B293F147D954" - }, - { - "begin": "725716", - "end": 784695, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Fond public - fond privé", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_F0A40BE7-0DE5-F4AE-00E7-B293F147C76E" - }, - { - "begin": "784695", - "end": 802807, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Gardette : Francois Fillon veut montrer l'exemple", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_801AE38E-9E88-347D-365A-B293F147FA32" - }, - { - "begin": "802807", - "end": 853566, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Reportage : Fillon et les privilèges des politiques", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_F5F3F6C7-2152-6FCA-3838-B293F147F4A6" - }, - { - "begin": "853566", - "end": 870284, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Caroline Broué à Garrigou : les privilèges ?", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_F01AD8C9-6F7F-0ED8-FCB8-B293F147EAE0" - }, - { - "begin": "870284", - "end": 899309, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "Réponse : privilège du cumul.", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_306A6A5E-BB28-DBB3-1B2C-B293F147B879" - }, - { - "begin": "899309", - "end": 900309, - "tags": null, - "media": "franceculture_retourdudimanche20100620", - "content": { - "mimetype": "application/x-ldt-structured", - "color": "255", - "audio": { - "mimetype": "audio/mp3", - "src": "", - "href": "" - }, - "description": "", - "title": "" - }, - "meta": { - "dc:contributor": "perso", - "id-ref": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:modified": "2010-09-06T15:53:44.675786", - "dc:creator": "perso" - }, - "id": "s_40445FD2-80E5-F9C9-57B8-B293F1472D60" - } - ], - "annotation-types": [ - { - "dc:contributor": "perso", - "dc:creator": "perso", - "dc:title": "Chapitrage Notes", - "id": "c_1F07824B-F512-78A9-49DB-6FB51DAB9560", - "dc:created": "2010-09-06T15:53:44.572226", - "dc:description": "", - "dc:modified": "2010-09-06T15:53:44.572226" - }, - { - "dc:contributor": "perso", - "dc:creator": "perso", - "dc:title": "Mes notes", - "id": "c_F6BB72C6-686E-1E8A-D775-B2B91B97C795", - "dc:created": "2010-09-06T15:53:44.626882", - "dc:description": "", - "dc:modified": "2010-09-06T15:53:44.626882" - }, - { - "dc:contributor": "perso", - "dc:creator": "perso", - "dc:title": "Mes notes", - "id": "c_393E05F0-80CC-9D29-A42B-B293F1478831", - "dc:created": "2010-09-06T15:53:44.675786", - "dc:description": "", - "dc:modified": "2010-09-06T15:53:44.675786" - }, - { - "dc:contributor": "perso", - "dc:creator": "perso", - "dc:title": "Chapitrage", - "id": "c_DE60F95E-73B8-922D-3AC7-6FB197A1BF16", - "dc:created": "2010-09-06T15:53:44.699595", - "dc:description": "", - "dc:modified": "2010-09-06T15:53:44.699595" - } - ] -} diff -r f11b234497f7 -r 61c384dda19e sbin/build/client.xml --- a/sbin/build/client.xml Fri Apr 27 19:18:21 2012 +0200 +++ b/sbin/build/client.xml Thu May 03 17:52:52 2012 +0200 @@ -13,41 +13,16 @@ + - - - - - - - - - - - - - - - - - - - - - - - + + - - - - + - + @@ -62,6 +37,7 @@ + @@ -71,7 +47,7 @@ - + - + diff -r f11b234497f7 -r 61c384dda19e src/css/LdtPlayer-base.css --- a/src/css/LdtPlayer-base.css Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -/* Base classes */ - diff -r f11b234497f7 -r 61c384dda19e src/css/LdtPlayer-core.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/css/LdtPlayer-core.css Thu May 03 17:52:52 2012 +0200 @@ -0,0 +1,15 @@ +/* Base classes */ + +.Ldt-Loader { + min-height: 128px; + background:url(img/loader.gif) center no-repeat; + text-indent: -9999px; + position: absolute; + width: 100%; +} + +.Ldt-Widget { + font-family: Arial, Helvetica, sans-serif; + color: black; + font-size: 12px; +} diff -r f11b234497f7 -r 61c384dda19e src/css/img/loader.gif Binary file src/css/img/loader.gif has changed diff -r f11b234497f7 -r 61c384dda19e src/css/imgs/loader.gif Binary file src/css/imgs/loader.gif has changed diff -r f11b234497f7 -r 61c384dda19e src/js/defaults.js --- a/src/js/defaults.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/js/defaults.js Thu May 03 17:52:52 2012 +0200 @@ -3,7 +3,7 @@ IriSP.libFiles = { defaultDir : "js/libs/", inDefaultDir : { - underscore : "underscore.js", + underscore : "underscore-min.js", Mustache : "mustache.js", jQuery : "jquery.min.js", jQueryUI : "jquery-ui.min.js", @@ -11,12 +11,12 @@ cssjQueryUI : "jquery-ui.css", popcorn : "popcorn.js", jwplayer : "jwplayer.js", - raphael : "raphael.js", + raphael : "raphael-min.js", "popcorn.mediafragment" : "popcorn.mediafragment.js", "popcorn.code" : "popcorn.code.js", "popcorn.jwplayer" : "popcorn.jwplayer.js", "popcorn.youtube" : "popcorn.youtube.js", - "tracemanager" : "tracemanager.js" + tracemanager : "tracemanager.js" }, locations : { // use to define locations outside defautl_dir @@ -31,88 +31,26 @@ IriSP.widgetsDir = 'widgets'; +IriSP.widgetsRequirements = { + Sparkline: { + noCss: true, + requires: "raphael" + }, + Arrow: { + noCss: true, + requires: "raphael" + }, + Mediafragment: { + noCss: true + }, + Trace : { + noCss: true, + requires: "tracemanager" + } +} + IriSP.guiDefaults = { width : 640, container : 'LdtPlayer', spacer_div_height : 0 } - -IriSP.widgetsDefaults = { - "AnnotationsWidget" : { - "share_text" : "I'm watching " - }, - "TweetsWidget" : { - default_profile_picture : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png", - tweet_display_period : 10000 // how long do we show a tweet ? - }, - "SegmentsWidget" : { - cinecast_version : false - }, - "createAnnotationWidget" : { - tags : [ - { - "id" : "digitalstudies", - "meta" : { - "description" : "#digital-studies" - } - }, - { - "id" : "amateur", - "meta" : { - "description" : "#amateur" - }, - } - ], - remote_tags : false, - random_tags : false, - show_from_field : false, - disable_share : false, - polemic_mode : true, /* enable polemics ? */ - polemics : [{ - "className" : "positive", - "keyword" : "++" - }, { - "className" : "negative", - "keyword" : "--" - }, { - "className" : "reference", - "keyword" : "==" - }, { - "className" : "question", - "keyword" : "??" - }], - cinecast_version : false, /* put to false to enable the platform version, true for the festival cinecast one. */ - - /* where does the widget PUT the annotations - this is a mustache template. id refers to the id of the media ans is filled - by the widget. - */ - api_endpoint_template : "", // platform_url + "/ldtplatform/api/ldt/annotations/{{id}}.json", - api_method : "PUT" - }, - "StackGraphWidget" : { - defaultcolor : "#585858", - tags : [ - { - "keywords" : [ "++" ], - "description" : "positif", - "color" : "#1D973D" - }, - { - "keywords" : [ "--" ], - "description" : "negatif", - "color" : "#CE0A15" - }, - { - "keywords" : [ "==" ], - "description" : "reference", - "color" : "#C5A62D" - }, - { - "keywords" : [ "??" ], - "description" : "question", - "color" : "#036AAE" - } - ], - streamgraph : false - } -} \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/js/iframe_embed/embed-mini.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/js/iframe_embed/embed-mini.js Thu May 03 17:52:52 2012 +0200 @@ -0,0 +1,4 @@ +(function(a) {var b=document.location,c=b.getElementById(a),d=window,e="hashchange"; +d.onhashchange=function(){c.contentWindow.postMessage({type:e,hash:b.hash},"*");}; +d.addEventListener('message',function(f){g=f.data;if(g.type===e){b.hash=g.hash;}}); +})("metadataplayer_embed"); diff -r f11b234497f7 -r 61c384dda19e src/js/iframe_embed/embedder.js --- a/src/js/iframe_embed/embedder.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/js/iframe_embed/embedder.js Thu May 03 17:52:52 2012 +0200 @@ -3,258 +3,17 @@ to the iframe url in the page url. */ -IriSP = {}; - -window.onhashchange = function() { - var url = window.location.href; - var frame = document.getElementById("metadataplayer_embed"); - - if ( url.split( "#" )[ 1 ] != null ) { - hashvalue = url.split("#")[1]; - frame.contentWindow.postMessage({type: "hashchange", value: hashvalue}, "*"); - } -}; - - -IriSP.handleMessages = function(e) { - var history = window.history; - - if ( !history.pushState ) { - return false; - } - - if (e.data.type === "hashchange") { - console.log(e.data.value); - history.replaceState( {}, "", e.data.value); - } -}; - -// http://stackoverflow.com/questions/799981/document-ready-equivalent-without-jquery -var ready = (function(){ - - var readyList, - DOMContentLoaded, - class2type = {}; - class2type["[object Boolean]"] = "boolean"; - class2type["[object Number]"] = "number"; - class2type["[object String]"] = "string"; - class2type["[object Function]"] = "function"; - class2type["[object Array]"] = "array"; - class2type["[object Date]"] = "date"; - class2type["[object RegExp]"] = "regexp"; - class2type["[object Object]"] = "object"; - - var ReadyObj = { - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - ReadyObj.readyWait++; - } else { - ReadyObj.ready( true ); - } - }, - // Handle when the DOM is ready - ready: function( wait ) { - // Either a released hold or an DOMready/load event and not yet ready - if ( (wait === true && !--ReadyObj.readyWait) || (wait !== true && !ReadyObj.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( ReadyObj.ready, 1 ); - } - - // Remember that the DOM is ready - ReadyObj.isReady = true; - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --ReadyObj.readyWait > 0 ) { - return; - } - // If there are functions bound, to execute - readyList.resolveWith( document, [ ReadyObj ] ); - - // Trigger any bound ready events - //if ( ReadyObj.fn.trigger ) { - // ReadyObj( document ).trigger( "ready" ).unbind( "ready" ); - //} - } - }, - bindReady: function() { - if ( readyList ) { - return; - } - readyList = ReadyObj._Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( ReadyObj.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - // A fallback to window.onload, that will always work - window.addEventListener( "load", ReadyObj.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", ReadyObj.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} +(function(_frameId) { + var _frame = document.getElementById(_frameId); + + window.onhashchange = function() { + frame.contentWindow.postMessage({type: "hashchange", hash: hashvalue}, "*"); + }; - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - _Deferred: function() { - var // callbacks list - callbacks = [], - // stored [ context , args ] - fired, - // to avoid firing when already doing so - firing, - // flag to know if the deferred has been cancelled - cancelled, - // the deferred itself - deferred = { - - // done( f1, f2, ...) - done: function() { - if ( !cancelled ) { - var args = arguments, - i, - length, - elem, - type, - _fired; - if ( fired ) { - _fired = fired; - fired = 0; - } - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = ReadyObj.type( elem ); - if ( type === "array" ) { - deferred.done.apply( deferred, elem ); - } else if ( type === "function" ) { - callbacks.push( elem ); - } - } - if ( _fired ) { - deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); - } - } - return this; - }, - - // resolve with given context and args - resolveWith: function( context, args ) { - if ( !cancelled && !fired && !firing ) { - // make sure args are available (#8421) - args = args || []; - firing = 1; - try { - while( callbacks[ 0 ] ) { - callbacks.shift().apply( context, args );//shifts a callback, and applies it to document - } - } - finally { - fired = [ context, args ]; - firing = 0; - } - } - return this; - }, - - // resolve with this as context and given arguments - resolve: function() { - deferred.resolveWith( this, arguments ); - return this; - }, - - // Has this deferred been resolved? - isResolved: function() { - return !!( firing || fired ); - }, - - // Cancel - cancel: function() { - cancelled = 1; - callbacks = []; - return this; - } - }; - - return deferred; - }, - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ Object.prototype.toString.call(obj) ] || "object"; + window.addEventListener('message', function(_e) { + if (e.data.type === "hashchange") { + document.location.hash = e.data.hash; } - } - // The DOM ready check for Internet Explorer - function doScrollCheck() { - if ( ReadyObj.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - ReadyObj.ready(); - } - // Cleanup functions for the document ready method - if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - ReadyObj.ready(); - }; - - } else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - ReadyObj.ready(); - } - }; - } - function ready( fn ) { - // Attach the listeners - ReadyObj.bindReady(); - - var type = ReadyObj.type( fn ); - - // Add the callback - readyList.done( fn );//readyList is result of _Deferred() - } - return ready; -})(); - -ready(function() { window.addEventListener('message', IriSP.handleMessages, false); }); \ No newline at end of file + }); + +})("metadataplayer_embed"); diff -r f11b234497f7 -r 61c384dda19e src/js/init.js --- a/src/js/init.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/js/init.js Thu May 03 17:52:52 2012 +0200 @@ -1,17 +1,20 @@ /* init.js - initialization and configuration of Popcorn and the widgets -exemple json configuration: */ +if (typeof window.IriSP === "undefined") { + IriSP = {}; +} + /* The Metadataplayer Object, single point of entry, replaces IriSP.init_player */ IriSP.Metadataplayer = function(config, video_metadata) { for (var key in IriSP.guiDefaults) { - if (IriSP.guiDefaults.hasOwnProperty(key) && !config.gui.hasOwnProperty('key')) { + if (IriSP.guiDefaults.hasOwnProperty(key) && !config.gui.hasOwnProperty(key)) { config.gui[key] = IriSP.guiDefaults[key] } } var _container = document.getElementById(config.gui.container); - _container.innerHTML = '
Loading... Chargement...
'; + _container.innerHTML = '

Loading... Chargement...

'; this.video_metadata = video_metadata; this.sourceManager = new IriSP.Model.Directory(); this.config = config; @@ -23,8 +26,7 @@ } IriSP.Metadataplayer.prototype.loadLibs = function() { - // Localize jQuery variable - IriSP.jQuery = null; + var $L = $LAB.script(IriSP.getLib("underscore")).script(IriSP.getLib("Mustache")).script(IriSP.getLib("jQuery")).script(IriSP.getLib("swfObject")).wait().script(IriSP.getLib("jQueryUI")); if(this.config.player.type === "jwplayer" || this.config.player.type === "allocine" || this.config.player.type === "dailymotion") { @@ -44,18 +46,16 @@ /* widget specific requirements */ for(var _i = 0; _i < this.config.gui.widgets.length; _i++) { - if(this.config.gui.widgets[_i].type === "Sparkline" || this.config.gui.widgets[_i].type === "Arrow") { - $L.script(IriSP.getLib("raphael")); - } - if(this.config.gui.widgets[_i].type === "TraceWidget") { - $L.script(IriSP.getLib("tracemanager")) + var _t = this.config.gui.widgets[_i].type; + if (typeof IriSP.widgetsRequirements[_t] !== "undefined" && typeof IriSP.widgetsRequirements[_t].requires !== "undefined") { + $L.script(IriSP.getLib(IriSP.widgetsRequirements[_t].requires)); } } var _this = this; $L.wait(function() { - IriSP.jQuery = window.jQuery.noConflict(true); + IriSP.jQuery = window.jQuery.noConflict(); IriSP._ = window._.noConflict(); IriSP.loadCss(IriSP.getLib("cssjQueryUI")) @@ -67,7 +67,6 @@ } IriSP.Metadataplayer.prototype.onLibsLoaded = function() { - console.log('OnLibsLoaded'); this.videoData = this.loadMetadata(this.video_metadata); this.$ = IriSP.jQuery('#' + this.config.gui.container); this.$.css({ @@ -135,8 +134,10 @@ _callback(new IriSP.Widgets[_widgetConfig.type](_this, _widgetConfig)); }); } else { - /* Loading Widget CSS */ - IriSP.loadCss(IriSP.widgetsDir + '/' + _widgetConfig.type + '.css'); + /* Loading Widget CSS */ + if (typeof IriSP.widgetsRequirements[_widgetConfig.type] === "undefined" || typeof IriSP.widgetsRequirements[_widgetConfig.type].noCss === "undefined" || !IriSP.widgetsRequirements[_widgetConfig.type].noCss) { + IriSP.loadCss(IriSP.widgetsDir + '/' + _widgetConfig.type + '.css'); + } /* Loading Widget JS */ $LAB.script(IriSP.widgetsDir + '/' + _widgetConfig.type + '.js').wait(function() { _callback(new IriSP.Widgets[_widgetConfig.type](_this, _widgetConfig)); diff -r f11b234497f7 -r 61c384dda19e src/js/layout.js --- a/src/js/layout.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -/* layout.js - very basic layout management */ - -/* Has been integrated to init.js */ diff -r f11b234497f7 -r 61c384dda19e src/js/libs/LAB.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/js/libs/LAB.min.js Thu May 03 17:52:52 2012 +0200 @@ -0,0 +1,5 @@ +/*! LAB.js (LABjs :: Loading And Blocking JavaScript) + v2.0.3 (c) Kyle Simpson + MIT License +*/ +(function(o){var K=o.$LAB,y="UseLocalXHR",z="AlwaysPreserveOrder",u="AllowDuplicates",A="CacheBust",B="BasePath",C=/^[^?#]*\//.exec(location.href)[0],D=/^\w+\:\/\/\/?[^\/]+/.exec(C)[0],i=document.head||document.getElementsByTagName("head"),L=(o.opera&&Object.prototype.toString.call(o.opera)=="[object Opera]")||("MozAppearance"in document.documentElement.style),q=document.createElement("script"),E=typeof q.preload=="boolean",r=E||(q.readyState&&q.readyState=="uninitialized"),F=!r&&q.async===true,M=!r&&!F&&!L;function G(a){return Object.prototype.toString.call(a)=="[object Function]"}function H(a){return Object.prototype.toString.call(a)=="[object Array]"}function N(a,c){var b=/^\w+\:\/\//;if(/^\/\/\/?/.test(a)){a=location.protocol+a}else if(!b.test(a)&&a.charAt(0)!="/"){a=(c||"")+a}return b.test(a)?a:((a.charAt(0)=="/"?D:C)+a)}function s(a,c){for(var b in a){if(a.hasOwnProperty(b)){c[b]=a[b]}}return c}function O(a){var c=false;for(var b=0;b0){for(var a=0;a=0;){d=n.shift();a=a[d.type].apply(null,d.args)}return a},noConflict:function(){o.$LAB=K;return m},sandbox:function(){return J()}};return m}o.$LAB=J();(function(a,c,b){if(document.readyState==null&&document[a]){document.readyState="loading";document[a](c,b=function(){document.removeEventListener(c,b,false);document.readyState="complete"},false)}})("addEventListener","DOMContentLoaded")})(this); \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/js/libs/lab.js --- a/src/js/libs/lab.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,514 +0,0 @@ -/*! LAB.js (LABjs :: Loading And Blocking JavaScript) - v2.0.3 (c) Kyle Simpson - MIT License -*/ - -(function(global){ - var _$LAB = global.$LAB, - - // constants for the valid keys of the options object - _UseLocalXHR = "UseLocalXHR", - _AlwaysPreserveOrder = "AlwaysPreserveOrder", - _AllowDuplicates = "AllowDuplicates", - _CacheBust = "CacheBust", - /*!START_DEBUG*/_Debug = "Debug",/*!END_DEBUG*/ - _BasePath = "BasePath", - - // stateless variables used across all $LAB instances - root_page = /^[^?#]*\//.exec(location.href)[0], - root_domain = /^\w+\:\/\/\/?[^\/]+/.exec(root_page)[0], - append_to = document.head || document.getElementsByTagName("head"), - - // inferences... ick, but still necessary - opera_or_gecko = (global.opera && Object.prototype.toString.call(global.opera) == "[object Opera]") || ("MozAppearance" in document.documentElement.style), - -/*!START_DEBUG*/ - // console.log() and console.error() wrappers - log_msg = function(){}, - log_error = log_msg, -/*!END_DEBUG*/ - - // feature sniffs (yay!) - test_script_elem = document.createElement("script"), - explicit_preloading = typeof test_script_elem.preload == "boolean", // http://wiki.whatwg.org/wiki/Script_Execution_Control#Proposal_1_.28Nicholas_Zakas.29 - real_preloading = explicit_preloading || (test_script_elem.readyState && test_script_elem.readyState == "uninitialized"), // will a script preload with `src` set before DOM append? - script_ordered_async = !real_preloading && test_script_elem.async === true, // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order - - // XHR preloading (same-domain) and cache-preloading (remote-domain) are the fallbacks (for some browsers) - xhr_or_cache_preloading = !real_preloading && !script_ordered_async && !opera_or_gecko - ; - -/*!START_DEBUG*/ - // define console wrapper functions if applicable - if (global.console && global.console.log) { - if (!global.console.error) global.console.error = global.console.log; - log_msg = function(msg) { global.console.log(msg); }; - log_error = function(msg,err) { global.console.error(msg,err); }; - } -/*!END_DEBUG*/ - - // test for function - function is_func(func) { return Object.prototype.toString.call(func) == "[object Function]"; } - - // test for array - function is_array(arr) { return Object.prototype.toString.call(arr) == "[object Array]"; } - - // make script URL absolute/canonical - function canonical_uri(src,base_path) { - var absolute_regex = /^\w+\:\/\//; - - // is `src` is protocol-relative (begins with // or ///), prepend protocol - if (/^\/\/\/?/.test(src)) { - src = location.protocol + src; - } - // is `src` page-relative? (not an absolute URL, and not a domain-relative path, beginning with /) - else if (!absolute_regex.test(src) && src.charAt(0) != "/") { - // prepend `base_path`, if any - src = (base_path || "") + src; - } - // make sure to return `src` as absolute - return absolute_regex.test(src) ? src : ((src.charAt(0) == "/" ? root_domain : root_page) + src); - } - - // merge `source` into `target` - function merge_objs(source,target) { - for (var k in source) { if (source.hasOwnProperty(k)) { - target[k] = source[k]; // TODO: does this need to be recursive for our purposes? - }} - return target; - } - - // does the chain group have any ready-to-execute scripts? - function check_chain_group_scripts_ready(chain_group) { - var any_scripts_ready = false; - for (var i=0; i 0) { - for (var i=0; i=0;) { - val = queue.shift(); - $L = $L[val.type].apply(null,val.args); - } - return $L; - }, - - // rollback `[global].$LAB` to what it was before this file was loaded, the return this current instance of $LAB - noConflict:function(){ - global.$LAB = _$LAB; - return instanceAPI; - }, - - // create another clean instance of $LAB - sandbox:function(){ - return create_sandbox(); - } - }; - - return instanceAPI; - } - - // create the main instance of $LAB - global.$LAB = create_sandbox(); - - - /* The following "hack" was suggested by Andrea Giammarchi and adapted from: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html - NOTE: this hack only operates in FF and then only in versions where document.readyState is not present (FF < 3.6?). - - The hack essentially "patches" the **page** that LABjs is loaded onto so that it has a proper conforming document.readyState, so that if a script which does - proper and safe dom-ready detection is loaded onto a page, after dom-ready has passed, it will still be able to detect this state, by inspecting the now hacked - document.readyState property. The loaded script in question can then immediately trigger any queued code executions that were waiting for the DOM to be ready. - For instance, jQuery 1.4+ has been patched to take advantage of document.readyState, which is enabled by this hack. But 1.3.2 and before are **not** safe or - fixed by this hack, and should therefore **not** be lazy-loaded by script loader tools such as LABjs. - */ - (function(addEvent,domLoaded,handler){ - if (document.readyState == null && document[addEvent]){ - document.readyState = "loading"; - document[addEvent](domLoaded,handler = function(){ - document.removeEventListener(domLoaded,handler,false); - document.readyState = "complete"; - },false); - } - })("addEventListener","DOMContentLoaded"); - -})(this); \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/js/libs/raphael-min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/js/libs/raphael-min.js Thu May 03 17:52:52 2012 +0200 @@ -0,0 +1,10 @@ +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +(function(a){var b="0.3.4",c="hasOwnProperty",d=/[\.\/]/,e="*",f=function(){},g=function(a,b){return a-b},h,i,j={n:{}},k=function(a,b){var c=j,d=i,e=Array.prototype.slice.call(arguments,2),f=k.listeners(a),l=0,m=!1,n,o=[],p={},q=[],r=h,s=[];h=a,i=0;for(var t=0,u=f.length;tf*b.top){e=b.percents[y],p=b.percents[y-1]||0,t=t/b.top*(e-p),o=b.percents[y+1],j=b.anim[e];break}f&&d.attr(b.anim[b.percents[y]])}if(!!j){if(!k){for(var A in j)if(j[g](A))if(U[g](A)||d.paper.customAttributes[g](A)){u[A]=d.attr(A),u[A]==null&&(u[A]=T[A]),v[A]=j[A];switch(U[A]){case C:w[A]=(v[A]-u[A])/t;break;case"colour":u[A]=a.getRGB(u[A]);var B=a.getRGB(v[A]);w[A]={r:(B.r-u[A].r)/t,g:(B.g-u[A].g)/t,b:(B.b-u[A].b)/t};break;case"path":var D=bR(u[A],v[A]),E=D[1];u[A]=D[0],w[A]=[];for(y=0,z=u[A].length;yd)return d;while(cf?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cq(){return this.x+q+this.y+q+this.width+" × "+this.height}function cp(){return this.x+q+this.y}function cb(a,b,c,d,e,f){a!=null?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function bH(b,c,d){b=a._path2curve(b),c=a._path2curve(c);var e,f,g,h,i,j,k,l,m,n,o=d?0:[];for(var p=0,q=b.length;p=0&&y<=1&&A>=0&&A<=1&&(d?n++:n.push({x:x.x,y:x.y,t1:y,t2:A}))}}return n}function bF(a,b){return bG(a,b,1)}function bE(a,b){return bG(a,b)}function bD(a,b,c,d,e,f,g,h){if(!(x(a,c)x(e,g)||x(b,d)x(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(!k)return;var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(n<+y(a,c).toFixed(2)||n>+x(a,c).toFixed(2)||n<+y(e,g).toFixed(2)||n>+x(e,g).toFixed(2)||o<+y(b,d).toFixed(2)||o>+x(b,d).toFixed(2)||o<+y(f,h).toFixed(2)||o>+x(f,h).toFixed(2))return;return{x:l,y:m}}}function bC(a,b,c,d,e,f,g,h,i){if(!(i<0||bB(a,b,c,d,e,f,g,h)n)k/=2,l+=(m1?1:i<0?0:i;var j=i/2,k=12,l=[-0.1252,.1252,-0.3678,.3678,-0.5873,.5873,-0.7699,.7699,-0.9041,.9041,-0.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],n=0;for(var o=0;od;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function bx(){return this.hex}function bv(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];if(h[g](f)){bu(i,f);return c?c(h[f]):h[f]}i.length>=1e3&&delete h[i.shift()],i.push(f),h[f]=a[m](b,e);return c?c(h[f]):h[f]}return d}function bu(a,b){for(var c=0,d=a.length;c',bl=bk.firstChild,bl.style.behavior="url(#default#VML)";if(!bl||typeof bl.adj!="object")return a.type=p;bk=null}a.svg=!(a.vml=a.type=="VML"),a._Paper=j,a.fn=k=j.prototype=a.prototype,a._id=0,a._oid=0,a.is=function(a,b){b=v.call(b);if(b=="finite")return!M[g](+a);if(b=="array")return a instanceof Array;return b=="null"&&a===null||b==typeof a&&a!==null||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||H.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return(180+w.atan2(-i,-h)*180/B+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*B/180},a.deg=function(a){return a*180/B%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,E)){var e=b.length;while(e--)if(z(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(fb-d)return c-f+b}return c};var bn=a.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=w.random()*16|0,c=a=="x"?b:b&3|8;return c.toString(16)});a.setWindow=function(b){eve("raphael.setWindow",a,h.win,b),h.win=b,h.doc=h.win.document,a._engine.initWin&&a._engine.initWin(h.win)};var bo=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write(""),e.close(),d=e.body}catch(f){d=createPopup().document.body}var g=d.createTextRange();bo=bv(function(a){try{d.style.color=r(a).replace(c,p);var b=g.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=h.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",h.doc.body.appendChild(i),bo=bv(function(a){i.style.color=a;return h.doc.defaultView.getComputedStyle(i,p).getPropertyValue("color")})}return bo(b)},bp=function(){return"hsb("+[this.h,this.s,this.b]+")"},bq=function(){return"hsl("+[this.h,this.s,this.l]+")"},br=function(){return this.hex},bs=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,D)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;return[b,c,d]},bt=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:br};a.is(e,"finite")&&(f.opacity=e);return f};a.color=function(b){var c;a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b?(c=a.hsb2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b?(c=a.hsl2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):(a.is(b,"string")&&(b=a.getRGB(b)),a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b?(c=a.rgb2hsl(b),b.h=c.h,b.s=c.s,b.l=c.l,c=a.rgb2hsb(b),b.v=c.b):(b={hex:"none"},b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1)),b.toString=br;return b},a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;a=a%360/60,i=c*b,h=i*(1-z(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bt(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h);if(a>1||b>1||c>1)a/=360,b/=100,c/=100;a*=360;var e,f,g,h,i;a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-z(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bt(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=bs(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;f=x(a,b,c),g=f-y(a,b,c),d=g==0?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=g==0?0:g/f;return{h:d,s:e,b:f,toString:bp}},a.rgb2hsl=function(a,b,c){c=bs(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;g=x(a,b,c),h=y(a,b,c),i=g-h,d=i==0?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=i==0?0:f<.5?i/(2*f):i/(2-2*f);return{h:d,s:e,l:f,toString:bq}},a._path2string=function(){return this.join(",").replace(Y,"$1")};var bw=a._preload=function(a,b){var c=h.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,h.doc.body.removeChild(this)},c.onerror=function(){h.doc.body.removeChild(this)},h.doc.body.appendChild(c),c.src=a};a.getRGB=bv(function(b){if(!b||!!((b=r(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bx};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:bx};!X[g](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bo(b));var c,d,e,f,h,i,j,k=b.match(L);if(k){k[2]&&(f=R(k[2].substring(5),16),e=R(k[2].substring(3,5),16),d=R(k[2].substring(1,3),16)),k[3]&&(f=R((i=k[3].charAt(3))+i,16),e=R((i=k[3].charAt(2))+i,16),d=R((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,f,h)}if(k[6]){j=k[6][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,f,h)}k={r:d,g:e,b:f,toString:bx},k.hex="#"+(16777216|f|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bx}},a),a.hsb=bv(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=bv(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=bv(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=function(b){if(!b)return null;var c=bz(b);if(c.arr)return bJ(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];a.is(b,E)&&a.is(b[0],E)&&(e=bJ(b)),e.length||r(b).replace(Z,function(a,b,c){var f=[],g=b.toLowerCase();c.replace(_,function(a,b){b&&f.push(+b)}),g=="m"&&f.length>2&&(e.push([b][n](f.splice(0,2))),g="l",b=b=="m"?"l":"L");if(g=="r")e.push([b][n](f));else while(f.length>=d[g]){e.push([b][n](f.splice(0,d[g])));if(!d[g])break}}),e.toString=a._path2string,c.arr=bJ(e);return e},a.parseTransformString=bv(function(b){if(!b)return null;var c={r:3,s:4,t:2,m:6},d=[];a.is(b,E)&&a.is(b[0],E)&&(d=bJ(b)),d.length||r(b).replace($,function(a,b,c){var e=[],f=v.call(b);c.replace(_,function(a,b){b&&e.push(+b)}),d.push([b][n](e))}),d.toString=a._path2string;return d});var bz=function(a){var b=bz.ps=bz.ps||{};b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[g](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])});return b[a]};a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=A(j,3),l=A(j,2),m=i*i,n=m*i,o=k*a+l*3*i*c+j*3*i*i*e+n*g,p=k*b+l*3*i*d+j*3*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,x=j*e+i*g,y=j*f+i*h,z=90-w.atan2(q-s,r-t)*180/B;(q>s||r=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},a.isBBoxIntersect=function(b,c){var d=a.isPointInsideBBox;return d(c,b.x,b.y)||d(c,b.x2,b.y)||d(c,b.x,b.y2)||d(c,b.x2,b.y2)||d(b,c.x,c.y)||d(b,c.x2,c.y)||d(b,c.x,c.y2)||d(b,c.x2,c.y2)||(b.xc.x||c.xb.x)&&(b.yc.y||c.yb.y)},a.pathIntersection=function(a,b){return bH(a,b)},a.pathIntersectionNumber=function(a,b){return bH(a,b,1)},a.isPointInsidePath=function(b,c,d){var e=a.pathBBox(b);return a.isPointInsideBBox(e,c,d)&&bH(b,[["M",c,d],["H",e.x2+10]],1)%2==1},a._removedFactory=function(a){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a)}};var bI=a.pathBBox=function(a){var b=bz(a);if(b.bbox)return b.bbox;if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=bR(a);var c=0,d=0,e=[],f=[],g;for(var h=0,i=a.length;h1&&(v=w.sqrt(v),c=v*c,d=v*d);var x=c*c,y=d*d,A=(f==g?-1:1)*w.sqrt(z((x*y-x*u*u-y*t*t)/(x*u*u+y*t*t))),C=A*c*u/d+(a+h)/2,D=A*-d*t/c+(b+i)/2,E=w.asin(((b-D)/d).toFixed(9)),F=w.asin(((i-D)/d).toFixed(9));E=aF&&(E=E-B*2),!g&&F>E&&(F=F-B*2)}else E=j[0],F=j[1],C=j[2],D=j[3];var G=F-E;if(z(G)>k){var H=F,I=h,J=i;F=E+k*(g&&F>E?1:-1),h=C+c*w.cos(F),i=D+d*w.sin(F),m=bO(h,i,c,d,e,0,g,I,J,[F,H,C,D])}G=F-E;var K=w.cos(E),L=w.sin(E),M=w.cos(F),N=w.sin(F),O=w.tan(G/4),P=4/3*c*O,Q=4/3*d*O,R=[a,b],S=[a+P*L,b-Q*K],T=[h+P*N,i-Q*M],U=[h,i];S[0]=2*R[0]-S[0],S[1]=2*R[1]-S[1];if(j)return[S,T,U][n](m);m=[S,T,U][n](m).join()[s](",");var V=[];for(var W=0,X=m.length;W"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bP(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bP(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bP(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bP(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y));return{min:{x:y[m](0,p),y:y[m](0,o)},max:{x:x[m](0,p),y:x[m](0,o)}}}),bR=a._path2curve=bv(function(a,b){var c=!b&&bz(a);if(!b&&c.curve)return bJ(c.curve);var d=bL(a),e=b&&bL(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][n](bO[m](0,[b.x,b.y][n](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][n](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][n](bN(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][n](bN(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](bM(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](bM(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](bM(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](bM(b.x,b.y,b.X,b.Y))}return a},i=function(a,b){if(a[b].length>7){a[b].shift();var c=a[b];while(c.length)a.splice(b++,0,["C"][n](c.splice(0,6)));a.splice(b,1),l=x(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=x(d.length,e&&e.length||0))};for(var k=0,l=x(d.length,e&&e.length||0);ke){if(c&&!l.start){m=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i.shift()+i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},cu=ct(1),cv=ct(),cw=ct(0,1);a.getTotalLength=cu,a.getPointAtLength=cv,a.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return cw(a,b).end;var d=cw(a,c,1);return b?cw(d,b).end:d},cl.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return cu(this.attrs.path)}},cl.getPointAtLength=function(a){if(this.type=="path")return cv(this.attrs.path,a)},cl.getSubpath=function(b,c){if(this.type=="path")return a.getSubpath(this.attrs.path,b,c)};var cx=a.easing_formulas={linear:function(a){return a},"<":function(a){return A(a,1.7)},">":function(a){return A(a,.48)},"<>":function(a){var b=.48-a/1.04,c=w.sqrt(.1734+b*b),d=c-b,e=A(z(d),1/3)*(d<0?-1:1),f=-c-b,g=A(z(f),1/3)*(f<0?-1:1),h=e+g+.5;return(1-h)*3*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==!!a)return a;return A(2,-10*a)*w.sin((a-.075)*2*B/.3)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};cx.easeIn=cx["ease-in"]=cx["<"],cx.easeOut=cx["ease-out"]=cx[">"],cx.easeInOut=cx["ease-in-out"]=cx["<>"],cx["back-in"]=cx.backIn,cx["back-out"]=cx.backOut;var cy=[],cz=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},cA=function(){var b=+(new Date),c=0;for(;c1&&!d.next){for(s in k)k[g](s)&&(r[s]=d.totalOrigin[s]);d.el.attr(r),cE(d.anim,d.el,d.anim.percents[0],null,d.totalOrigin,d.repeat-1)}d.next&&!d.stop&&cE(d.anim,d.el,d.next,null,d.totalOrigin,d.repeat)}}a.svg&&m&&m.paper&&m.paper.safari(),cy.length&&cz(cA)},cB=function(a){return a>255?255:a<0?0:a};cl.animateWith=function(b,c,d,e,f,g){var h=this;if(h.removed){g&&g.call(h);return h}var i=d instanceof cD?d:a.animation(d,e,f,g),j,k;cE(i,h,i.percents[0],null,h.attr());for(var l=0,m=cy.length;l.5)*2-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&n!=.5&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/);if(j=="linear"){var t=e.shift();t=-d(t);if(isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient);if(!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,j=="radial"?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x1?G.opacity/100:G.opacity});case"stroke":G=a.getRGB(p),i.setAttribute(o,G.hex),o=="stroke"&&G[b]("opacity")&&q(i,{"stroke-opacity":G.opacity>1?G.opacity/100:G.opacity}),o=="stroke"&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":(d.type=="circle"||d.type=="ellipse"||c(p).charAt()!="r")&&r(d,p);break;case"opacity":k.gradient&&!k[b]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){H=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),H&&(I=H.getElementsByTagName("stop"),q(I[I.length-1],{"stop-opacity":p}));break};default:o=="font-size"&&(p=e(p,10)+"px");var J=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[J]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if(d.type=="text"&&!!(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){g.text=f.text;while(h.firstChild)h.removeChild(h.firstChild);var j=c(f.text).split("\n"),k=[],m;for(var n=0,o=j.length;n"));var $=X.getBoundingClientRect();t.W=m.w=($.right-$.left)/Y,t.H=m.h=($.bottom-$.top)/Y,t.X=m.x,t.Y=m.y+t.H/2,("x"in i||"y"in i)&&(t.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));var _=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var ba=0,bb=_.length;ba.25&&(c=e.sqrt(.25-i(b-.5,2))*((c>.5)*2-1)+.5),m=b+n+c);return o}),f=f.split(/\s*\-\s*/);if(l=="linear"){var p=f.shift();p=-d(p);if(isNaN(p))return null}var q=a._parseDots(f);if(!q)return null;b=b.shape||b.node;if(q.length){b.removeChild(g),g.on=!0,g.method="none",g.color=q[0].color,g.color2=q[q.length-1].color;var r=[];for(var s=0,t=q.length;s')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e,f=b.width,g=b.x,h=b.y;if(!c)throw new Error("VML container not found.");var i=new a._Paper,j=i.canvas=a._g.doc.createElement("div"),k=j.style;g=g||0,h=h||0,f=f||512,d=d||342,i.width=f,i.height=d,f==+f&&(f+="px"),d==+d&&(d+="px"),i.coordsize=u*1e3+n+u*1e3,i.coordorigin="0 0",i.span=a._g.doc.createElement("span"),i.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",j.appendChild(i.span),k.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(a._g.doc.body.appendChild(j),k.left=g+"px",k.top=h+"px",k.position="absolute"):c.firstChild?c.insertBefore(j,c.firstChild):c.appendChild(j),i.renderfix=function(){};return i},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}(window.Raphael) \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/js/libs/raphael.js --- a/src/js/libs/raphael.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5436 +0,0 @@ -// ┌─────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2.0 - JavaScript Vector Library │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ -// └─────────────────────────────────────────────────────────────────────┘ \\ - -// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\ -// │ Eve 0.3.2 - JavaScript Events Library │ \\ -// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\ -// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\ -// └──────────────────────────────────────────────────────────────────────────────────────┘ \\ - -(function (glob) { - var version = "0.3.2", - has = "hasOwnProperty", - separator = /[\.\/]/, - wildcard = "*", - fun = function () {}, - numsort = function (a, b) { - return a - b; - }, - current_event, - stop, - events = {n: {}}, - - eve = function (name, scope) { - var e = events, - oldstop = stop, - args = Array.prototype.slice.call(arguments, 2), - listeners = eve.listeners(name), - z = 0, - f = false, - l, - indexed = [], - queue = {}, - out = [], - errors = []; - current_event = name; - stop = 0; - for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) { - indexed.push(listeners[i].zIndex); - if (listeners[i].zIndex < 0) { - queue[listeners[i].zIndex] = listeners[i]; - } - } - indexed.sort(numsort); - while (indexed[z] < 0) { - l = queue[indexed[z++]]; - out.push(l.apply(scope, args)); - if (stop) { - stop = oldstop; - return out; - } - } - for (i = 0; i < ii; i++) { - l = listeners[i]; - if ("zIndex" in l) { - if (l.zIndex == indexed[z]) { - out.push(l.apply(scope, args)); - if (stop) { - stop = oldstop; - return out; - } - do { - z++; - l = queue[indexed[z]]; - l && out.push(l.apply(scope, args)); - if (stop) { - stop = oldstop; - return out; - } - } while (l) - } else { - queue[l.zIndex] = l; - } - } else { - out.push(l.apply(scope, args)); - if (stop) { - stop = oldstop; - return out; - } - } - } - stop = oldstop; - return out.length ? out : null; - }; - - eve.listeners = function (name) { - var names = name.split(separator), - e = events, - item, - items, - k, - i, - ii, - j, - jj, - nes, - es = [e], - out = []; - for (i = 0, ii = names.length; i < ii; i++) { - nes = []; - for (j = 0, jj = es.length; j < jj; j++) { - e = es[j].n; - items = [e[names[i]], e[wildcard]]; - k = 2; - while (k--) { - item = items[k]; - if (item) { - nes.push(item); - out = out.concat(item.f || []); - } - } - } - es = nes; - } - return out; - }; - - - eve.on = function (name, f) { - var names = name.split(separator), - e = events; - for (var i = 0, ii = names.length; i < ii; i++) { - e = e.n; - !e[names[i]] && (e[names[i]] = {n: {}}); - e = e[names[i]]; - } - e.f = e.f || []; - for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) { - return fun; - } - e.f.push(f); - return function (zIndex) { - if (+zIndex == +zIndex) { - f.zIndex = +zIndex; - } - }; - }; - - eve.stop = function () { - stop = 1; - }; - - eve.nt = function (subname) { - if (subname) { - return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event); - } - return current_event; - }; - - eve.unbind = function (name, f) { - var names = name.split(separator), - e, - key, - splice, - cur = [events]; - for (var i = 0, ii = names.length; i < ii; i++) { - for (var j = 0; j < cur.length; j += splice.length - 2) { - splice = [j, 1]; - e = cur[j].n; - if (names[i] != wildcard) { - if (e[names[i]]) { - splice.push(e[names[i]]); - } - } else { - for (key in e) if (e[has](key)) { - splice.push(e[key]); - } - } - cur.splice.apply(cur, splice); - } - } - for (i = 0, ii = cur.length; i < ii; i++) { - e = cur[i]; - while (e.n) { - if (f) { - if (e.f) { - for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) { - e.f.splice(j, 1); - break; - } - !e.f.length && delete e.f; - } - for (key in e.n) if (e.n[has](key) && e.n[key].f) { - var funcs = e.n[key].f; - for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) { - funcs.splice(j, 1); - break; - } - !funcs.length && delete e.n[key].f; - } - } else { - delete e.f; - for (key in e.n) if (e.n[has](key) && e.n[key].f) { - delete e.n[key].f; - } - } - e = e.n; - } - } - }; - - eve.version = version; - eve.toString = function () { - return "You are running Eve " + version; - }; - (typeof module != "undefined" && module.exports) ? (module.exports = eve) : (glob.eve = eve); -})(this); - -// ┌─────────────────────────────────────────────────────────────────────┐ \\ -// │ "Raphaël 2.0" - JavaScript Vector Library │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ -// └─────────────────────────────────────────────────────────────────────┘ \\ -(function () { - - function R(first) { - if (R.is(first, "function")) { - return loaded ? first() : eve.on("DOMload", first); - } else if (R.is(first, array)) { - var a = first, - cnv = R._engine.create[apply](R, a.splice(0, 3 + R.is(a[0], nu))), - res = cnv.set(), - i = 0, - ii = a.length, - j; - for (; i < ii; i++) { - j = a[i] || {}; - elements[has](j.type) && res.push(cnv[j.type]().attr(j)); - } - return res; - } else { - var args = Array.prototype.slice.call(arguments, 0); - if (R.is(args[args.length - 1], "function")) { - var f = args.pop(); - return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("DOMload", function () { - f.call(R._engine.create[apply](R, args)); - }); - } else { - return R._engine.create[apply](R, arguments); - } - } - } - R.version = "2.0.0"; - R.eve = eve; - var loaded, - separator = /[, ]+/, - elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1}, - formatrg = /\{(\d+)\}/g, - proto = "prototype", - has = "hasOwnProperty", - g = { - doc: document, - win: window - }, - oldRaphael = { - was: Object.prototype[has].call(g.win, "Raphael"), - is: g.win.Raphael - }, - Paper = function () { - - - this.ca = this.customAttributes = {}; - }, - paperproto, - appendChild = "appendChild", - apply = "apply", - concat = "concat", - supportsTouch = "createTouch" in g.doc, - E = "", - S = " ", - Str = String, - split = "split", - events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S), - touchMap = { - mousedown: "touchstart", - mousemove: "touchmove", - mouseup: "touchend" - }, - lowerCase = Str.prototype.toLowerCase, - math = Math, - mmax = math.max, - mmin = math.min, - abs = math.abs, - pow = math.pow, - PI = math.PI, - nu = "number", - string = "string", - array = "array", - toString = "toString", - fillString = "fill", - objectToString = Object.prototype.toString, - paper = {}, - push = "push", - ISURL = R._ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i, - colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, - isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1}, - bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, - round = math.round, - setAttribute = "setAttribute", - toFloat = parseFloat, - toInt = parseInt, - upperCase = Str.prototype.toUpperCase, - availableAttrs = R._availableAttrs = { - "arrow-end": "none", - "arrow-start": "none", - blur: 0, - "clip-rect": "0 0 1e9 1e9", - cursor: "default", - cx: 0, - cy: 0, - fill: "#fff", - "fill-opacity": 1, - font: '10px "Arial"', - "font-family": '"Arial"', - "font-size": "10", - "font-style": "normal", - "font-weight": 400, - gradient: 0, - height: 0, - href: "http://raphaeljs.com/", - opacity: 1, - path: "M0,0", - r: 0, - rx: 0, - ry: 0, - src: "", - stroke: "#000", - "stroke-dasharray": "", - "stroke-linecap": "butt", - "stroke-linejoin": "butt", - "stroke-miterlimit": 0, - "stroke-opacity": 1, - "stroke-width": 1, - target: "_blank", - "text-anchor": "middle", - title: "Raphael", - transform: "", - width: 0, - x: 0, - y: 0 - }, - availableAnimAttrs = R._availableAnimAttrs = { - blur: nu, - "clip-rect": "csv", - cx: nu, - cy: nu, - fill: "colour", - "fill-opacity": nu, - "font-size": nu, - height: nu, - opacity: nu, - path: "path", - r: nu, - rx: nu, - ry: nu, - stroke: "colour", - "stroke-opacity": nu, - "stroke-width": nu, - transform: "transform", - width: nu, - x: nu, - y: nu - }, - commaSpaces = /\s*,\s*/, - hsrg = {hs: 1, rg: 1}, - p2s = /,?([achlmqrstvxz]),?/gi, - pathCommand = /([achlmrqstvz])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?\s*,?\s*)+)/ig, - tCommand = /([rstm])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?\s*,?\s*)+)/ig, - pathValues = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)\s*,?\s*/ig, - radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/, - eldata = {}, - sortByKey = function (a, b) { - return a.key - b.key; - }, - sortByNumber = function (a, b) { - return toFloat(a) - toFloat(b); - }, - fun = function () {}, - pipe = function (x) { - return x; - }, - rectPath = R._rectPath = function (x, y, w, h, r) { - if (r) { - return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]]; - } - return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]]; - }, - ellipsePath = function (x, y, rx, ry) { - if (ry == null) { - ry = rx; - } - return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]]; - }, - getPath = R._getPath = { - path: function (el) { - return el.attr("path"); - }, - circle: function (el) { - var a = el.attrs; - return ellipsePath(a.cx, a.cy, a.r); - }, - ellipse: function (el) { - var a = el.attrs; - return ellipsePath(a.cx, a.cy, a.rx, a.ry); - }, - rect: function (el) { - var a = el.attrs; - return rectPath(a.x, a.y, a.width, a.height, a.r); - }, - image: function (el) { - var a = el.attrs; - return rectPath(a.x, a.y, a.width, a.height); - }, - text: function (el) { - var bbox = el._getBBox(); - return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); - } - }, - mapPath = R.mapPath = function (path, matrix) { - if (!matrix) { - return path; - } - var x, y, i, j, pathi; - path = path2curve(path); - for (i = 0, ii = path.length; i < ii; i++) { - pathi = path[i]; - for (j = 1, jj = pathi.length; j < jj; j += 2) { - x = matrix.x(pathi[j], pathi[j + 1]); - y = matrix.y(pathi[j], pathi[j + 1]); - pathi[j] = x; - pathi[j + 1] = y; - } - } - return path; - }; - - R._g = g; - - R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); - if (R.type == "VML") { - var d = g.doc.createElement("div"), - b; - d.innerHTML = ''; - b = d.firstChild; - b.style.behavior = "url(#default#VML)"; - if (!(b && typeof b.adj == "object")) { - return (R.type = E); - } - d = null; - } - - - R.svg = !(R.vml = R.type == "VML"); - R._Paper = Paper; - - R.fn = paperproto = Paper.prototype = R.prototype; - R._id = 0; - R._oid = 0; - - R.is = function (o, type) { - type = lowerCase.call(type); - if (type == "finite") { - return !isnan[has](+o); - } - if (type == "array") { - return o instanceof Array; - } - return (type == "null" && o === null) || - (type == typeof o && o !== null) || - (type == "object" && o === Object(o)) || - (type == "array" && Array.isArray && Array.isArray(o)) || - objectToString.call(o).slice(8, -1).toLowerCase() == type; - }; - - R.angle = function (x1, y1, x2, y2, x3, y3) { - if (x3 == null) { - var x = x1 - x2, - y = y1 - y2; - if (!x && !y) { - return 0; - } - return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360; - } else { - return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3); - } - }; - - R.rad = function (deg) { - return deg % 360 * PI / 180; - }; - - R.deg = function (rad) { - return rad * 180 / PI % 360; - }; - - R.snapTo = function (values, value, tolerance) { - tolerance = R.is(tolerance, "finite") ? tolerance : 10; - if (R.is(values, array)) { - var i = values.length; - while (i--) if (abs(values[i] - value) <= tolerance) { - return values[i]; - } - } else { - values = +values; - var rem = value % values; - if (rem < tolerance) { - return value - rem; - } - if (rem > values - tolerance) { - return value - rem + values; - } - } - return value; - }; - - - var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) { - return function () { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase(); - }; - })(/[xy]/g, function (c) { - var r = math.random() * 16 | 0, - v = c == "x" ? r : (r & 3 | 8); - return v.toString(16); - }); - - - R.setWindow = function (newwin) { - eve("setWindow", R, g.win, newwin); - g.win = newwin; - g.doc = g.win.document; - if (initWin) { - initWin(g.win); - } - }; - var toHex = function (color) { - if (R.vml) { - // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/ - var trim = /^\s+|\s+$/g; - var bod; - try { - var docum = new ActiveXObject("htmlfile"); - docum.write(""); - docum.close(); - bod = docum.body; - } catch(e) { - bod = createPopup().document.body; - } - var range = bod.createTextRange(); - toHex = cacher(function (color) { - try { - bod.style.color = Str(color).replace(trim, E); - var value = range.queryCommandValue("ForeColor"); - value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16); - return "#" + ("000000" + value.toString(16)).slice(-6); - } catch(e) { - return "none"; - } - }); - } else { - var i = g.doc.createElement("i"); - i.title = "Rapha\xebl Colour Picker"; - i.style.display = "none"; - g.doc.body.appendChild(i); - toHex = cacher(function (color) { - i.style.color = color; - return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color"); - }); - } - return toHex(color); - }, - hsbtoString = function () { - return "hsb(" + [this.h, this.s, this.b] + ")"; - }, - hsltoString = function () { - return "hsl(" + [this.h, this.s, this.l] + ")"; - }, - rgbtoString = function () { - return this.hex; - }, - prepareRGB = function (r, g, b) { - if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) { - b = r.b; - g = r.g; - r = r.r; - } - if (g == null && R.is(r, string)) { - var clr = R.getRGB(r); - r = clr.r; - g = clr.g; - b = clr.b; - } - if (r > 1 || g > 1 || b > 1) { - r /= 255; - g /= 255; - b /= 255; - } - - return [r, g, b]; - }, - packageRGB = function (r, g, b, o) { - r *= 255; - g *= 255; - b *= 255; - var rgb = { - r: r, - g: g, - b: b, - hex: R.rgb(r, g, b), - toString: rgbtoString - }; - R.is(o, "finite") && (rgb.opacity = o); - return rgb; - }; - - - R.color = function (clr) { - var rgb; - if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) { - rgb = R.hsb2rgb(clr); - clr.r = rgb.r; - clr.g = rgb.g; - clr.b = rgb.b; - clr.hex = rgb.hex; - } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) { - rgb = R.hsl2rgb(clr); - clr.r = rgb.r; - clr.g = rgb.g; - clr.b = rgb.b; - clr.hex = rgb.hex; - } else { - if (R.is(clr, "string")) { - clr = R.getRGB(clr); - } - if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) { - rgb = R.rgb2hsl(clr); - clr.h = rgb.h; - clr.s = rgb.s; - clr.l = rgb.l; - rgb = R.rgb2hsb(clr); - clr.v = rgb.b; - } else { - clr = {hex: "none"}; - crl.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1; - } - } - clr.toString = rgbtoString; - return clr; - }; - - R.hsb2rgb = function (h, s, v, o) { - if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) { - v = h.b; - s = h.s; - h = h.h; - o = h.o; - } - h *= 360; - var R, G, B, X, C; - h = (h % 360) / 60; - C = v * s; - X = C * (1 - abs(h % 2 - 1)); - R = G = B = v - C; - - h = ~~h; - R += [C, X, 0, 0, X, C][h]; - G += [X, C, C, X, 0, 0][h]; - B += [0, 0, X, C, C, X][h]; - return packageRGB(R, G, B, o); - }; - - R.hsl2rgb = function (h, s, l, o) { - if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) { - l = h.l; - s = h.s; - h = h.h; - } - if (h > 1 || s > 1 || l > 1) { - h /= 360; - s /= 100; - l /= 100; - } - h *= 360; - var R, G, B, X, C; - h = (h % 360) / 60; - C = 2 * s * (l < .5 ? l : 1 - l); - X = C * (1 - abs(h % 2 - 1)); - R = G = B = l - C / 2; - - h = ~~h; - R += [C, X, 0, 0, X, C][h]; - G += [X, C, C, X, 0, 0][h]; - B += [0, 0, X, C, C, X][h]; - return packageRGB(R, G, B, o); - }; - - R.rgb2hsb = function (r, g, b) { - b = prepareRGB(r, g, b); - r = b[0]; - g = b[1]; - b = b[2]; - - var H, S, V, C; - V = mmax(r, g, b); - C = V - mmin(r, g, b); - H = (C == 0 ? null : - V == r ? (g - b) / C : - V == g ? (b - r) / C + 2 : - (r - g) / C + 4 - ); - H = ((H + 360) % 6) * 60 / 360; - S = C == 0 ? 0 : C / V; - return {h: H, s: S, b: V, toString: hsbtoString}; - }; - - R.rgb2hsl = function (r, g, b) { - b = prepareRGB(r, g, b); - r = b[0]; - g = b[1]; - b = b[2]; - - var H, S, L, M, m, C; - M = mmax(r, g, b); - m = mmin(r, g, b); - C = M - m; - H = (C == 0 ? null : - M == r ? (g - b) / C : - M == g ? (b - r) / C + 2 : - (r - g) / C + 4); - H = ((H + 360) % 6) * 60 / 360; - L = (M + m) / 2; - S = (C == 0 ? 0 : - L < .5 ? C / (2 * L) : - C / (2 - 2 * L)); - return {h: H, s: S, l: L, toString: hsltoString}; - }; - R._path2string = function () { - return this.join(",").replace(p2s, "$1"); - }; - function repush(array, item) { - for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) { - return array.push(array.splice(i, 1)[0]); - } - } - function cacher(f, scope, postprocessor) { - function newf() { - var arg = Array.prototype.slice.call(arguments, 0), - args = arg.join("\u2400"), - cache = newf.cache = newf.cache || {}, - count = newf.count = newf.count || []; - if (cache[has](args)) { - repush(count, args); - return postprocessor ? postprocessor(cache[args]) : cache[args]; - } - count.length >= 1e3 && delete cache[count.shift()]; - count.push(args); - cache[args] = f[apply](scope, arg); - return postprocessor ? postprocessor(cache[args]) : cache[args]; - } - return newf; - } - - var preload = R._preload = function (src, f) { - var img = g.doc.createElement("img"); - img.style.cssText = "position:absolute;left:-9999em;top-9999em"; - img.onload = function () { - f.call(this); - this.onload = null; - g.doc.body.removeChild(this); - }; - img.onerror = function () { - g.doc.body.removeChild(this); - }; - g.doc.body.appendChild(img); - img.src = src; - }; - - function clrToString() { - return this.hex; - } - - - R.getRGB = cacher(function (colour) { - if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) { - return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; - } - if (colour == "none") { - return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString}; - } - !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour)); - var res, - red, - green, - blue, - opacity, - t, - values, - rgb = colour.match(colourRegExp); - if (rgb) { - if (rgb[2]) { - blue = toInt(rgb[2].substring(5), 16); - green = toInt(rgb[2].substring(3, 5), 16); - red = toInt(rgb[2].substring(1, 3), 16); - } - if (rgb[3]) { - blue = toInt((t = rgb[3].charAt(3)) + t, 16); - green = toInt((t = rgb[3].charAt(2)) + t, 16); - red = toInt((t = rgb[3].charAt(1)) + t, 16); - } - if (rgb[4]) { - values = rgb[4][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - } - if (rgb[5]) { - values = rgb[5][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); - rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - return R.hsb2rgb(red, green, blue, opacity); - } - if (rgb[6]) { - values = rgb[6][split](commaSpaces); - red = toFloat(values[0]); - values[0].slice(-1) == "%" && (red *= 2.55); - green = toFloat(values[1]); - values[1].slice(-1) == "%" && (green *= 2.55); - blue = toFloat(values[2]); - values[2].slice(-1) == "%" && (blue *= 2.55); - (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); - rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3])); - values[3] && values[3].slice(-1) == "%" && (opacity /= 100); - return R.hsl2rgb(red, green, blue, opacity); - } - rgb = {r: red, g: green, b: blue, toString: clrToString}; - rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1); - R.is(opacity, "finite") && (rgb.opacity = opacity); - return rgb; - } - return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; - }, R); - - R.hsb = cacher(function (h, s, b) { - return R.hsb2rgb(h, s, b).hex; - }); - - R.hsl = cacher(function (h, s, l) { - return R.hsl2rgb(h, s, l).hex; - }); - - R.rgb = cacher(function (r, g, b) { - return "#" + (16777216 | b | (g << 8) | (r << 16)).toString(16).slice(1); - }); - - R.getColor = function (value) { - var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75}, - rgb = this.hsb2rgb(start.h, start.s, start.b); - start.h += .075; - if (start.h > 1) { - start.h = 0; - start.s -= .2; - start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b}); - } - return rgb.hex; - }; - - R.getColor.reset = function () { - delete this.start; - }; - - // http://schepers.cc/getting-to-the-point - function catmullRom2bezier(crp) { - var d = []; - for (var i = 0, iLen = crp.length; iLen - 2 > i; i += 2) { - var p = [{x: +crp[i], y: +crp[i + 1]}, - {x: +crp[i], y: +crp[i + 1]}, - {x: +crp[i + 2], y: +crp[i + 3]}, - {x: +crp[i + 4], y: +crp[i + 5]}]; - if (iLen - 4 == i) { - p[0] = {x: +crp[i - 2], y: +crp[i - 1]}; - p[3] = p[2]; - } else if (i) { - p[0] = {x: +crp[i - 2], y: +crp[i - 1]}; - } - d.push(["C", - (-p[0].x + 6 * p[1].x + p[2].x) / 6, - (-p[0].y + 6 * p[1].y + p[2].y) / 6, - (p[1].x + 6 * p[2].x - p[3].x) / 6, - (p[1].y + 6*p[2].y - p[3].y) / 6, - p[2].x, - p[2].y - ]); - } - - return d; - } - - R.parsePathString = cacher(function (pathString) { - if (!pathString) { - return null; - } - var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0}, - data = []; - if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption - data = pathClone(pathString); - } - if (!data.length) { - Str(pathString).replace(pathCommand, function (a, b, c) { - var params = [], - name = b.toLowerCase(); - c.replace(pathValues, function (a, b) { - b && params.push(+b); - }); - if (name == "m" && params.length > 2) { - data.push([b][concat](params.splice(0, 2))); - name = "l"; - b = b == "m" ? "l" : "L"; - } - if (name == "r") { - data.push([b][concat](params)); - } else while (params.length >= paramCounts[name]) { - data.push([b][concat](params.splice(0, paramCounts[name]))); - if (!paramCounts[name]) { - break; - } - } - }); - } - data.toString = R._path2string; - return data; - }); - - R.parseTransformString = cacher(function (TString) { - if (!TString) { - return null; - } - var paramCounts = {r: 3, s: 4, t: 2, m: 6}, - data = []; - if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption - data = pathClone(TString); - } - if (!data.length) { - Str(TString).replace(tCommand, function (a, b, c) { - var params = [], - name = lowerCase.call(b); - c.replace(pathValues, function (a, b) { - b && params.push(+b); - }); - data.push([b][concat](params)); - }); - } - data.toString = R._path2string; - return data; - }); - - R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { - var t1 = 1 - t, - t13 = pow(t1, 3), - t12 = pow(t1, 2), - t2 = t * t, - t3 = t2 * t, - x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x, - y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y, - mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x), - my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y), - nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x), - ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y), - ax = t1 * p1x + t * c1x, - ay = t1 * p1y + t * c1y, - cx = t1 * c2x + t * p2x, - cy = t1 * c2y + t * p2y, - alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI); - (mx > nx || my < ny) && (alpha += 180); - return { - x: x, - y: y, - m: {x: mx, y: my}, - n: {x: nx, y: ny}, - start: {x: ax, y: ay}, - end: {x: cx, y: cy}, - alpha: alpha - }; - }; - var pathDimensions = cacher(function (path) { - if (!path) { - return {x: 0, y: 0, width: 0, height: 0}; - } - path = path2curve(path); - var x = 0, - y = 0, - X = [], - Y = [], - p; - for (var i = 0, ii = path.length; i < ii; i++) { - p = path[i]; - if (p[0] == "M") { - x = p[1]; - y = p[2]; - X.push(x); - Y.push(y); - } else { - var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); - X = X[concat](dim.min.x, dim.max.x); - Y = Y[concat](dim.min.y, dim.max.y); - x = p[5]; - y = p[6]; - } - } - var xmin = mmin[apply](0, X), - ymin = mmin[apply](0, Y); - return { - x: xmin, - y: ymin, - width: mmax[apply](0, X) - xmin, - height: mmax[apply](0, Y) - ymin - }; - }, null, function (o) { - return { - x: o.x, - y: o.y, - width: o.width, - height: o.height - }; - }), - pathClone = function (pathArray) { - var res = []; - if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption - pathArray = R.parsePathString(pathArray); - } - for (var i = 0, ii = pathArray.length; i < ii; i++) { - res[i] = []; - for (var j = 0, jj = pathArray[i].length; j < jj; j++) { - res[i][j] = pathArray[i][j]; - } - } - res.toString = R._path2string; - return res; - }, - pathToRelative = R._pathToRelative = cacher(function (pathArray) { - if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption - pathArray = R.parsePathString(pathArray); - } - var res = [], - x = 0, - y = 0, - mx = 0, - my = 0, - start = 0; - if (pathArray[0][0] == "M") { - x = pathArray[0][1]; - y = pathArray[0][2]; - mx = x; - my = y; - start++; - res.push(["M", x, y]); - } - for (var i = start, ii = pathArray.length; i < ii; i++) { - var r = res[i] = [], - pa = pathArray[i]; - if (pa[0] != lowerCase.call(pa[0])) { - r[0] = lowerCase.call(pa[0]); - switch (r[0]) { - case "a": - r[1] = pa[1]; - r[2] = pa[2]; - r[3] = pa[3]; - r[4] = pa[4]; - r[5] = pa[5]; - r[6] = +(pa[6] - x).toFixed(3); - r[7] = +(pa[7] - y).toFixed(3); - break; - case "v": - r[1] = +(pa[1] - y).toFixed(3); - break; - case "m": - mx = pa[1]; - my = pa[2]; - default: - for (var j = 1, jj = pa.length; j < jj; j++) { - r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3); - } - } - } else { - r = res[i] = []; - if (pa[0] == "m") { - mx = pa[1] + x; - my = pa[2] + y; - } - for (var k = 0, kk = pa.length; k < kk; k++) { - res[i][k] = pa[k]; - } - } - var len = res[i].length; - switch (res[i][0]) { - case "z": - x = mx; - y = my; - break; - case "h": - x += +res[i][len - 1]; - break; - case "v": - y += +res[i][len - 1]; - break; - default: - x += +res[i][len - 2]; - y += +res[i][len - 1]; - } - } - res.toString = R._path2string; - return res; - }, 0, pathClone), - pathToAbsolute = R._pathToAbsolute = cacher(function (pathArray) { - if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption - pathArray = R.parsePathString(pathArray); - } - if (!pathArray || !pathArray.length) { - return [["M", 0, 0]]; - } - var res = [], - x = 0, - y = 0, - mx = 0, - my = 0, - start = 0; - if (pathArray[0][0] == "M") { - x = +pathArray[0][1]; - y = +pathArray[0][2]; - mx = x; - my = y; - start++; - res[0] = ["M", x, y]; - } - for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) { - res.push(r = []); - pa = pathArray[i]; - if (pa[0] != upperCase.call(pa[0])) { - r[0] = upperCase.call(pa[0]); - switch (r[0]) { - case "A": - r[1] = pa[1]; - r[2] = pa[2]; - r[3] = pa[3]; - r[4] = pa[4]; - r[5] = pa[5]; - r[6] = +(pa[6] + x); - r[7] = +(pa[7] + y); - break; - case "V": - r[1] = +pa[1] + y; - break; - case "H": - r[1] = +pa[1] + x; - break; - case "R": - var dots = [x, y][concat](pa.slice(1)); - for (var j = 2, jj = dots.length; j < jj; j++) { - dots[j] = +dots[j] + x; - dots[++j] = +dots[j] + y; - } - res.pop(); - res = res[concat](catmullRom2bezier(dots)); - break; - case "M": - mx = +pa[1] + x; - my = +pa[2] + y; - default: - for (j = 1, jj = pa.length; j < jj; j++) { - r[j] = +pa[j] + ((j % 2) ? x : y); - } - } - } else if (pa[0] == "R") { - dots = [x, y][concat](pa.slice(1)); - res.pop(); - res = res[concat](catmullRom2bezier(dots)); - r = ["R"][concat](pa.slice(-2)); - } else { - for (var k = 0, kk = pa.length; k < kk; k++) { - r[k] = pa[k]; - } - } - switch (r[0]) { - case "Z": - x = mx; - y = my; - break; - case "H": - x = r[1]; - break; - case "V": - y = r[1]; - break; - case "M": - mx = r[r.length - 2]; - my = r[r.length - 1]; - default: - x = r[r.length - 2]; - y = r[r.length - 1]; - } - } - res.toString = R._path2string; - return res; - }, null, pathClone), - l2c = function (x1, y1, x2, y2) { - return [x1, y1, x2, y2, x2, y2]; - }, - q2c = function (x1, y1, ax, ay, x2, y2) { - var _13 = 1 / 3, - _23 = 2 / 3; - return [ - _13 * x1 + _23 * ax, - _13 * y1 + _23 * ay, - _13 * x2 + _23 * ax, - _13 * y2 + _23 * ay, - x2, - y2 - ]; - }, - a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { - // for more information of where this math came from visit: - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - var _120 = PI * 120 / 180, - rad = PI / 180 * (+angle || 0), - res = [], - xy, - rotate = cacher(function (x, y, rad) { - var X = x * math.cos(rad) - y * math.sin(rad), - Y = x * math.sin(rad) + y * math.cos(rad); - return {x: X, y: Y}; - }); - if (!recursive) { - xy = rotate(x1, y1, -rad); - x1 = xy.x; - y1 = xy.y; - xy = rotate(x2, y2, -rad); - x2 = xy.x; - y2 = xy.y; - var cos = math.cos(PI / 180 * angle), - sin = math.sin(PI / 180 * angle), - x = (x1 - x2) / 2, - y = (y1 - y2) / 2; - var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); - if (h > 1) { - h = math.sqrt(h); - rx = h * rx; - ry = h * ry; - } - var rx2 = rx * rx, - ry2 = ry * ry, - k = (large_arc_flag == sweep_flag ? -1 : 1) * - math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))), - cx = k * rx * y / ry + (x1 + x2) / 2, - cy = k * -ry * x / rx + (y1 + y2) / 2, - f1 = math.asin(((y1 - cy) / ry).toFixed(9)), - f2 = math.asin(((y2 - cy) / ry).toFixed(9)); - - f1 = x1 < cx ? PI - f1 : f1; - f2 = x2 < cx ? PI - f2 : f2; - f1 < 0 && (f1 = PI * 2 + f1); - f2 < 0 && (f2 = PI * 2 + f2); - if (sweep_flag && f1 > f2) { - f1 = f1 - PI * 2; - } - if (!sweep_flag && f2 > f1) { - f2 = f2 - PI * 2; - } - } else { - f1 = recursive[0]; - f2 = recursive[1]; - cx = recursive[2]; - cy = recursive[3]; - } - var df = f2 - f1; - if (abs(df) > _120) { - var f2old = f2, - x2old = x2, - y2old = y2; - f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); - x2 = cx + rx * math.cos(f2); - y2 = cy + ry * math.sin(f2); - res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); - } - df = f2 - f1; - var c1 = math.cos(f1), - s1 = math.sin(f1), - c2 = math.cos(f2), - s2 = math.sin(f2), - t = math.tan(df / 4), - hx = 4 / 3 * rx * t, - hy = 4 / 3 * ry * t, - m1 = [x1, y1], - m2 = [x1 + hx * s1, y1 - hy * c1], - m3 = [x2 + hx * s2, y2 - hy * c2], - m4 = [x2, y2]; - m2[0] = 2 * m1[0] - m2[0]; - m2[1] = 2 * m1[1] - m2[1]; - if (recursive) { - return [m2, m3, m4][concat](res); - } else { - res = [m2, m3, m4][concat](res).join()[split](","); - var newres = []; - for (var i = 0, ii = res.length; i < ii; i++) { - newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; - } - return newres; - } - }, - findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { - var t1 = 1 - t; - return { - x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x, - y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y - }; - }, - curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { - var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x), - b = 2 * (c1x - p1x) - 2 * (c2x - c1x), - c = p1x - c1x, - t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a, - t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a, - y = [p1y, p2y], - x = [p1x, p2x], - dot; - abs(t1) > "1e12" && (t1 = .5); - abs(t2) > "1e12" && (t2 = .5); - if (t1 > 0 && t1 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); - x.push(dot.x); - y.push(dot.y); - } - if (t2 > 0 && t2 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); - x.push(dot.x); - y.push(dot.y); - } - a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y); - b = 2 * (c1y - p1y) - 2 * (c2y - c1y); - c = p1y - c1y; - t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a; - t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a; - abs(t1) > "1e12" && (t1 = .5); - abs(t2) > "1e12" && (t2 = .5); - if (t1 > 0 && t1 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); - x.push(dot.x); - y.push(dot.y); - } - if (t2 > 0 && t2 < 1) { - dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); - x.push(dot.x); - y.push(dot.y); - } - return { - min: {x: mmin[apply](0, x), y: mmin[apply](0, y)}, - max: {x: mmax[apply](0, x), y: mmax[apply](0, y)} - }; - }), - path2curve = R._path2curve = cacher(function (path, path2) { - var p = pathToAbsolute(path), - p2 = path2 && pathToAbsolute(path2), - attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, - attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, - processPath = function (path, d) { - var nx, ny; - if (!path) { - return ["C", d.x, d.y, d.x, d.y, d.x, d.y]; - } - !(path[0] in {T:1, Q:1}) && (d.qx = d.qy = null); - switch (path[0]) { - case "M": - d.X = path[1]; - d.Y = path[2]; - break; - case "A": - path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1)))); - break; - case "S": - nx = d.x + (d.x - (d.bx || d.x)); - ny = d.y + (d.y - (d.by || d.y)); - path = ["C", nx, ny][concat](path.slice(1)); - break; - case "T": - d.qx = d.x + (d.x - (d.qx || d.x)); - d.qy = d.y + (d.y - (d.qy || d.y)); - path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); - break; - case "Q": - d.qx = path[1]; - d.qy = path[2]; - path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4])); - break; - case "L": - path = ["C"][concat](l2c(d.x, d.y, path[1], path[2])); - break; - case "H": - path = ["C"][concat](l2c(d.x, d.y, path[1], d.y)); - break; - case "V": - path = ["C"][concat](l2c(d.x, d.y, d.x, path[1])); - break; - case "Z": - path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y)); - break; - } - return path; - }, - fixArc = function (pp, i) { - if (pp[i].length > 7) { - pp[i].shift(); - var pi = pp[i]; - while (pi.length) { - pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6))); - } - pp.splice(i, 1); - ii = mmax(p.length, p2 && p2.length || 0); - } - }, - fixM = function (path1, path2, a1, a2, i) { - if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") { - path2.splice(i, 0, ["M", a2.x, a2.y]); - a1.bx = 0; - a1.by = 0; - a1.x = path1[i][1]; - a1.y = path1[i][2]; - ii = mmax(p.length, p2 && p2.length || 0); - } - }; - for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) { - p[i] = processPath(p[i], attrs); - fixArc(p, i); - p2 && (p2[i] = processPath(p2[i], attrs2)); - p2 && fixArc(p2, i); - fixM(p, p2, attrs, attrs2, i); - fixM(p2, p, attrs2, attrs, i); - var seg = p[i], - seg2 = p2 && p2[i], - seglen = seg.length, - seg2len = p2 && seg2.length; - attrs.x = seg[seglen - 2]; - attrs.y = seg[seglen - 1]; - attrs.bx = toFloat(seg[seglen - 4]) || attrs.x; - attrs.by = toFloat(seg[seglen - 3]) || attrs.y; - attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x); - attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y); - attrs2.x = p2 && seg2[seg2len - 2]; - attrs2.y = p2 && seg2[seg2len - 1]; - } - return p2 ? [p, p2] : p; - }, null, pathClone), - parseDots = R._parseDots = cacher(function (gradient) { - var dots = []; - for (var i = 0, ii = gradient.length; i < ii; i++) { - var dot = {}, - par = gradient[i].match(/^([^:]*):?([\d\.]*)/); - dot.color = R.getRGB(par[1]); - if (dot.color.error) { - return null; - } - dot.color = dot.color.hex; - par[2] && (dot.offset = par[2] + "%"); - dots.push(dot); - } - for (i = 1, ii = dots.length - 1; i < ii; i++) { - if (!dots[i].offset) { - var start = toFloat(dots[i - 1].offset || 0), - end = 0; - for (var j = i + 1; j < ii; j++) { - if (dots[j].offset) { - end = dots[j].offset; - break; - } - } - if (!end) { - end = 100; - j = ii; - } - end = toFloat(end); - var d = (end - start) / (j - i + 1); - for (; i < j; i++) { - start += d; - dots[i].offset = start + "%"; - } - } - } - return dots; - }), - tear = R._tear = function (el, paper) { - el == paper.top && (paper.top = el.prev); - el == paper.bottom && (paper.bottom = el.next); - el.next && (el.next.prev = el.prev); - el.prev && (el.prev.next = el.next); - }, - tofront = R._tofront = function (el, paper) { - if (paper.top === el) { - return; - } - tear(el, paper); - el.next = null; - el.prev = paper.top; - paper.top.next = el; - paper.top = el; - }, - toback = R._toback = function (el, paper) { - if (paper.bottom === el) { - return; - } - tear(el, paper); - el.next = paper.bottom; - el.prev = null; - paper.bottom.prev = el; - paper.bottom = el; - }, - insertafter = R._insertafter = function (el, el2, paper) { - tear(el, paper); - el2 == paper.top && (paper.top = el); - el2.next && (el2.next.prev = el); - el.next = el2.next; - el.prev = el2; - el2.next = el; - }, - insertbefore = R._insertbefore = function (el, el2, paper) { - tear(el, paper); - el2 == paper.bottom && (paper.bottom = el); - el2.prev && (el2.prev.next = el); - el.prev = el2.prev; - el2.prev = el; - el.next = el2; - }, - removed = function (methodname) { - return function () { - throw new Error("Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object"); - }; - }, - extractTransform = R._extractTransform = function (el, tstr) { - if (tstr == null) { - return el._.transform; - } - tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E); - var tdata = R.parseTransformString(tstr), - deg = 0, - dx = 0, - dy = 0, - sx = 1, - sy = 1, - _ = el._, - m = new Matrix; - _.transform = tdata || []; - if (tdata) { - for (var i = 0, ii = tdata.length; i < ii; i++) { - var t = tdata[i], - tlen = t.length, - command = Str(t[0]).toLowerCase(), - absolute = t[0] != command, - inver = absolute ? m.invert() : 0, - x1, - y1, - x2, - y2, - bb; - if (command == "t" && tlen == 3) { - if (absolute) { - x1 = inver.x(0, 0); - y1 = inver.y(0, 0); - x2 = inver.x(t[1], t[2]); - y2 = inver.y(t[1], t[2]); - m.translate(x2 - x1, y2 - y1); - } else { - m.translate(t[1], t[2]); - } - } else if (command == "r") { - if (tlen == 2) { - bb = bb || el.getBBox(1); - m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2); - deg += t[1]; - } else if (tlen == 4) { - if (absolute) { - x2 = inver.x(t[2], t[3]); - y2 = inver.y(t[2], t[3]); - m.rotate(t[1], x2, y2); - } else { - m.rotate(t[1], t[2], t[3]); - } - deg += t[1]; - } - } else if (command == "s") { - if (tlen == 2 || tlen == 3) { - bb = bb || el.getBBox(1); - m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2); - sx *= t[1]; - sy *= t[tlen - 1]; - } else if (tlen == 5) { - if (absolute) { - x2 = inver.x(t[3], t[4]); - y2 = inver.y(t[3], t[4]); - m.scale(t[1], t[2], x2, y2); - } else { - m.scale(t[1], t[2], t[3], t[4]); - } - sx *= t[1]; - sy *= t[2]; - } - } else if (command == "m" && tlen == 7) { - m.add(t[1], t[2], t[3], t[4], t[5], t[6]); - } - _.dirtyT = 1; - el.matrix = m; - } - } - - el.matrix = m; - - _.sx = sx; - _.sy = sy; - _.deg = deg; - _.dx = dx = m.e; - _.dy = dy = m.f; - - if (sx == 1 && sy == 1 && !deg && _.bbox) { - _.bbox.x += +dx; - _.bbox.y += +dy; - } else { - _.dirtyT = 1; - } - }, - getEmpty = function (item) { - var l = item[0]; - switch (l.toLowerCase()) { - case "t": return [l, 0, 0]; - case "m": return [l, 1, 0, 0, 1, 0, 0]; - case "r": if (item.length == 4) { - return [l, 0, item[2], item[3]]; - } else { - return [l, 0]; - } - case "s": if (item.length == 5) { - return [l, 1, 1, item[3], item[4]]; - } else if (item.length == 3) { - return [l, 1, 1]; - } else { - return [l, 1]; - } - } - }, - equaliseTransform = R._equaliseTransform = function (t1, t2) { - t2 = Str(t2).replace(/\.{3}|\u2026/g, t1); - t1 = R.parseTransformString(t1) || []; - t2 = R.parseTransformString(t2) || []; - var maxlength = mmax(t1.length, t2.length), - from = [], - to = [], - i = 0, j, jj, - tt1, tt2; - for (; i < maxlength; i++) { - tt1 = t1[i] || getEmpty(t2[i]); - tt2 = t2[i] || getEmpty(tt1); - if ((tt1[0] != tt2[0]) || - (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) || - (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4])) - ) { - return; - } - from[i] = []; - to[i] = []; - for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) { - j in tt1 && (from[i][j] = tt1[j]); - j in tt2 && (to[i][j] = tt2[j]); - } - } - return { - from: from, - to: to - }; - }; - R._getContainer = function (x, y, w, h) { - var container; - container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x; - if (container == null) { - return; - } - if (container.tagName) { - if (y == null) { - return { - container: container, - width: container.style.pixelWidth || container.offsetWidth, - height: container.style.pixelHeight || container.offsetHeight - }; - } else { - return { - container: container, - width: y, - height: w - }; - } - } - return { - container: 1, - x: x, - y: y, - width: w, - height: h - }; - }; - - R.pathToRelative = pathToRelative; - R._engine = {}; - - R.path2curve = path2curve; - - R.matrix = function (a, b, c, d, e, f) { - return new Matrix(a, b, c, d, e, f); - }; - function Matrix(a, b, c, d, e, f) { - if (a != null) { - this.a = +a; - this.b = +b; - this.c = +c; - this.d = +d; - this.e = +e; - this.f = +f; - } else { - this.a = 1; - this.b = 0; - this.c = 0; - this.d = 1; - this.e = 0; - this.f = 0; - } - } - (function (matrixproto) { - - matrixproto.add = function (a, b, c, d, e, f) { - var out = [[], [], []], - m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]], - matrix = [[a, c, e], [b, d, f], [0, 0, 1]], - x, y, z, res; - - if (a && a instanceof Matrix) { - matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]; - } - - for (x = 0; x < 3; x++) { - for (y = 0; y < 3; y++) { - res = 0; - for (z = 0; z < 3; z++) { - res += m[x][z] * matrix[z][y]; - } - out[x][y] = res; - } - } - this.a = out[0][0]; - this.b = out[1][0]; - this.c = out[0][1]; - this.d = out[1][1]; - this.e = out[0][2]; - this.f = out[1][2]; - }; - - matrixproto.invert = function () { - var me = this, - x = me.a * me.d - me.b * me.c; - return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x); - }; - - matrixproto.clone = function () { - return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f); - }; - - matrixproto.translate = function (x, y) { - this.add(1, 0, 0, 1, x, y); - }; - - matrixproto.scale = function (x, y, cx, cy) { - y == null && (y = x); - (cx || cy) && this.add(1, 0, 0, 1, cx, cy); - this.add(x, 0, 0, y, 0, 0); - (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy); - }; - - matrixproto.rotate = function (a, x, y) { - a = R.rad(a); - x = x || 0; - y = y || 0; - var cos = +math.cos(a).toFixed(9), - sin = +math.sin(a).toFixed(9); - this.add(cos, sin, -sin, cos, x, y); - this.add(1, 0, 0, 1, -x, -y); - }; - - matrixproto.x = function (x, y) { - return x * this.a + y * this.c + this.e; - }; - - matrixproto.y = function (x, y) { - return x * this.b + y * this.d + this.f; - }; - matrixproto.get = function (i) { - return +this[Str.fromCharCode(97 + i)].toFixed(4); - }; - matrixproto.toString = function () { - return R.svg ? - "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" : - [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join(); - }; - matrixproto.toFilter = function () { - return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + - ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + - ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')"; - }; - matrixproto.offset = function () { - return [this.e.toFixed(4), this.f.toFixed(4)]; - }; - function norm(a) { - return a[0] * a[0] + a[1] * a[1]; - } - function normalize(a) { - var mag = math.sqrt(norm(a)); - a[0] && (a[0] /= mag); - a[1] && (a[1] /= mag); - } - - matrixproto.split = function () { - var out = {}; - // translation - out.dx = this.e; - out.dy = this.f; - - // scale and shear - var row = [[this.a, this.c], [this.b, this.d]]; - out.scalex = math.sqrt(norm(row[0])); - normalize(row[0]); - - out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1]; - row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear]; - - out.scaley = math.sqrt(norm(row[1])); - normalize(row[1]); - out.shear /= out.scaley; - - // rotation - var sin = -row[0][1], - cos = row[1][1]; - if (cos < 0) { - out.rotate = R.deg(math.acos(cos)); - if (sin < 0) { - out.rotate = 360 - out.rotate; - } - } else { - out.rotate = R.deg(math.asin(sin)); - } - - out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate); - out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate; - out.noRotation = !+out.shear.toFixed(9) && !out.rotate; - return out; - }; - - matrixproto.toTransformString = function (shorter) { - var s = shorter || this[split](); - if (s.isSimple) { - return "t" + [s.dx, s.dy] + "s" + [s.scalex, s.scaley, 0, 0] + "r" + [s.rotate, 0, 0]; - } else { - return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]; - } - }; - })(Matrix.prototype); - - // WebKit rendering bug workaround method - var version = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/); - if ((navigator.vendor == "Apple Computer, Inc.") && (version && version[1] < 4 || navigator.platform.slice(0, 2) == "iP") || - (navigator.vendor == "Google Inc." && version && version[1] < 8)) { - - paperproto.safari = function () { - var rect = this.rect(-99, -99, this.width + 99, this.height + 99).attr({stroke: "none"}); - setTimeout(function () {rect.remove();}); - }; - } else { - paperproto.safari = fun; - } - - var preventDefault = function () { - this.returnValue = false; - }, - preventTouch = function () { - return this.originalEvent.preventDefault(); - }, - stopPropagation = function () { - this.cancelBubble = true; - }, - stopTouch = function () { - return this.originalEvent.stopPropagation(); - }, - addEvent = (function () { - if (g.doc.addEventListener) { - return function (obj, type, fn, element) { - var realName = supportsTouch && touchMap[type] ? touchMap[type] : type, - f = function (e) { - var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, - x = e.clientX + scrollX, - y = e.clientY + scrollY; - if (supportsTouch && touchMap[has](type)) { - for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) { - if (e.targetTouches[i].target == obj) { - var olde = e; - e = e.targetTouches[i]; - e.originalEvent = olde; - e.preventDefault = preventTouch; - e.stopPropagation = stopTouch; - break; - } - } - } - return fn.call(element, e, x, y); - }; - obj.addEventListener(realName, f, false); - return function () { - obj.removeEventListener(realName, f, false); - return true; - }; - }; - } else if (g.doc.attachEvent) { - return function (obj, type, fn, element) { - var f = function (e) { - e = e || g.win.event; - var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, - x = e.clientX + scrollX, - y = e.clientY + scrollY; - e.preventDefault = e.preventDefault || preventDefault; - e.stopPropagation = e.stopPropagation || stopPropagation; - return fn.call(element, e, x, y); - }; - obj.attachEvent("on" + type, f); - var detacher = function () { - obj.detachEvent("on" + type, f); - return true; - }; - return detacher; - }; - } - })(), - drag = [], - dragMove = function (e) { - var x = e.clientX, - y = e.clientY, - scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, - dragi, - j = drag.length; - while (j--) { - dragi = drag[j]; - if (supportsTouch) { - var i = e.touches.length, - touch; - while (i--) { - touch = e.touches[i]; - if (touch.identifier == dragi.el._drag.id) { - x = touch.clientX; - y = touch.clientY; - (e.originalEvent ? e.originalEvent : e).preventDefault(); - break; - } - } - } else { - e.preventDefault(); - } - var node = dragi.el.node, - o, - next = node.nextSibling, - parent = node.parentNode, - display = node.style.display; - g.win.opera && parent.removeChild(node); - node.style.display = "none"; - o = dragi.el.paper.getElementByPoint(x, y); - node.style.display = display; - g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node)); - o && eve("drag.over." + dragi.el.id, dragi.el, o); - x += scrollX; - y += scrollY; - eve("drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e); - } - }, - dragUp = function (e) { - R.unmousemove(dragMove).unmouseup(dragUp); - var i = drag.length, - dragi; - while (i--) { - dragi = drag[i]; - dragi.el._drag = {}; - eve("drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e); - } - drag = []; - }, - - elproto = R.el = {}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for (var i = events.length; i--;) { - (function (eventName) { - R[eventName] = elproto[eventName] = function (fn, scope) { - if (R.is(fn, "function")) { - this.events = this.events || []; - this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)}); - } - return this; - }; - R["un" + eventName] = elproto["un" + eventName] = function (fn) { - var events = this.events, - l = events.length; - while (l--) if (events[l].name == eventName && events[l].f == fn) { - events[l].unbind(); - events.splice(l, 1); - !events.length && delete this.events; - return this; - } - return this; - }; - })(events[i]); - } - - - elproto.data = function (key, value) { - var data = eldata[this.id] = eldata[this.id] || {}; - if (arguments.length == 1) { - if (R.is(key, "object")) { - for (var i in key) if (key[has](i)) { - this.data(i, key[i]); - } - return this; - } - eve("data.get." + this.id, this, data[key], key); - return data[key]; - } - data[key] = value; - eve("data.set." + this.id, this, value, key); - return this; - }; - - elproto.removeData = function (key) { - if (key == null) { - eldata[this.id] = {}; - } else { - eldata[this.id] && delete eldata[this.id][key]; - } - return this; - }; - - elproto.hover = function (f_in, f_out, scope_in, scope_out) { - return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in); - }; - - elproto.unhover = function (f_in, f_out) { - return this.unmouseover(f_in).unmouseout(f_out); - }; - - elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) { - function start(e) { - (e.originalEvent || e).preventDefault(); - var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, - scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; - this._drag.x = e.clientX + scrollX; - this._drag.y = e.clientY + scrollY; - this._drag.id = e.identifier; - !drag.length && R.mousemove(dragMove).mouseup(dragUp); - drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope}); - onstart && eve.on("drag.start." + this.id, onstart); - onmove && eve.on("drag.move." + this.id, onmove); - onend && eve.on("drag.end." + this.id, onend); - eve("drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e); - } - this._drag = {}; - this.mousedown(start); - return this; - }; - - elproto.onDragOver = function (f) { - f ? eve.on("drag.over." + this.id, f) : eve.unbind("drag.over." + this.id); - }; - - elproto.undrag = function () { - var i = drag.length; - while (i--) if (drag[i].el == this) { - R.unmousedown(drag[i].start); - drag.splice(i++, 1); - eve.unbind("drag.*." + this.id); - } - !drag.length && R.unmousemove(dragMove).unmouseup(dragUp); - }; - - paperproto.circle = function (x, y, r) { - var out = R._engine.circle(this, x || 0, y || 0, r || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - - paperproto.rect = function (x, y, w, h, r) { - var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - - paperproto.ellipse = function (x, y, rx, ry) { - var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - - paperproto.path = function (pathString) { - pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E); - var out = R._engine.path(R.format[apply](R, arguments), this); - this.__set__ && this.__set__.push(out); - return out; - }; - - paperproto.image = function (src, x, y, w, h) { - var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0); - this.__set__ && this.__set__.push(out); - return out; - }; - - paperproto.text = function (x, y, text) { - var out = R._engine.text(this, x || 0, y || 0, Str(text)); - this.__set__ && this.__set__.push(out); - return out; - }; - - paperproto.set = function (itemsArray) { - !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length)); - var out = new Set(itemsArray); - this.__set__ && this.__set__.push(out); - return out; - }; - - paperproto.setStart = function (set) { - this.__set__ = set || this.set(); - }; - - paperproto.setFinish = function (set) { - var out = this.__set__; - delete this.__set__; - return out; - }; - - paperproto.setSize = function (width, height) { - return R._engine.setSize.call(this, width, height); - }; - - paperproto.setViewBox = function (x, y, w, h, fit) { - return R._engine.setViewBox.call(this, x, y, w, h, fit); - }; - - - paperproto.top = paperproto.bottom = null; - - paperproto.raphael = R; - var getOffset = function (elem) { - var box = elem.getBoundingClientRect(), - doc = elem.ownerDocument, - body = doc.body, - docElem = doc.documentElement, - clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, - top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop, - left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft; - return { - y: top, - x: left - }; - }; - - paperproto.getElementByPoint = function (x, y) { - var paper = this, - svg = paper.canvas, - target = g.doc.elementFromPoint(x, y); - if (g.win.opera && target.tagName == "svg") { - var so = getOffset(svg), - sr = svg.createSVGRect(); - sr.x = x - so.x; - sr.y = y - so.y; - sr.width = sr.height = 1; - var hits = svg.getIntersectionList(sr, null); - if (hits.length) { - target = hits[hits.length - 1]; - } - } - if (!target) { - return null; - } - while (target.parentNode && target != svg.parentNode && !target.raphael) { - target = target.parentNode; - } - target == paper.canvas.parentNode && (target = svg); - target = target && target.raphael ? paper.getById(target.raphaelid) : null; - return target; - }; - - paperproto.getById = function (id) { - var bot = this.bottom; - while (bot) { - if (bot.id == id) { - return bot; - } - bot = bot.next; - } - return null; - }; - - paperproto.forEach = function (callback, thisArg) { - var bot = this.bottom; - while (bot) { - if (callback.call(thisArg, bot) === false) { - return this; - } - bot = bot.next; - } - return this; - }; - function x_y() { - return this.x + S + this.y; - } - function x_y_w_h() { - return this.x + S + this.y + S + this.width + " \xd7 " + this.height; - } - - elproto.getBBox = function (isWithoutTransform) { - if (this.removed) { - return {}; - } - var _ = this._; - if (isWithoutTransform) { - if (_.dirty || !_.bboxwt) { - this.realPath = getPath[this.type](this); - _.bboxwt = pathDimensions(this.realPath); - _.bboxwt.toString = x_y_w_h; - _.dirty = 0; - } - return _.bboxwt; - } - if (_.dirty || _.dirtyT || !_.bbox) { - if (_.dirty || !this.realPath) { - _.bboxwt = 0; - this.realPath = getPath[this.type](this); - } - _.bbox = pathDimensions(mapPath(this.realPath, this.matrix)); - _.bbox.toString = x_y_w_h; - _.dirty = _.dirtyT = 0; - } - return _.bbox; - }; - - elproto.clone = function () { - if (this.removed) { - return null; - } - var out = this.paper[this.type]().attr(this.attr()); - this.__set__ && this.__set__.push(out); - return out; - }; - - elproto.glow = function (glow) { - if (this.type == "text") { - return null; - } - glow = glow || {}; - var s = { - width: (glow.width || 10) + (+this.attr("stroke-width") || 1), - fill: glow.fill || false, - opacity: glow.opacity || .5, - offsetx: glow.offsetx || 0, - offsety: glow.offsety || 0, - color: glow.color || "#000" - }, - c = s.width / 2, - r = this.paper, - out = r.set(), - path = this.realPath || getPath[this.type](this); - path = this.matrix ? mapPath(path, this.matrix) : path; - for (var i = 1; i < c + 1; i++) { - out.push(r.path(path).attr({ - stroke: s.color, - fill: s.fill ? s.color : "none", - "stroke-linejoin": "round", - "stroke-linecap": "round", - "stroke-width": +(s.width / c * i).toFixed(3), - opacity: +(s.opacity / c).toFixed(3) - })); - } - return out.insertBefore(this).translate(s.offsetx, s.offsety); - }; - var curveslengths = {}, - getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) { - var len = 0, - precision = 100, - name = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y].join(), - cache = curveslengths[name], - old, dot; - !cache && (curveslengths[name] = cache = {data: []}); - cache.timer && clearTimeout(cache.timer); - cache.timer = setTimeout(function () {delete curveslengths[name];}, 2e3); - if (length != null && !cache.precision) { - var total = getPointAtSegmentLength(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y); - cache.precision = ~~total * 10; - cache.data = []; - } - precision = cache.precision || precision; - for (var i = 0; i < precision + 1; i++) { - if (cache.data[i * precision]) { - dot = cache.data[i * precision]; - } else { - dot = R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, i / precision); - cache.data[i * precision] = dot; - } - i && (len += pow(pow(old.x - dot.x, 2) + pow(old.y - dot.y, 2), .5)); - if (length != null && len >= length) { - return dot; - } - old = dot; - } - if (length == null) { - return len; - } - }, - getLengthFactory = function (istotal, subpath) { - return function (path, length, onlystart) { - path = path2curve(path); - var x, y, p, l, sp = "", subpaths = {}, point, - len = 0; - for (var i = 0, ii = path.length; i < ii; i++) { - p = path[i]; - if (p[0] == "M") { - x = +p[1]; - y = +p[2]; - } else { - l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); - if (len + l > length) { - if (subpath && !subpaths.start) { - point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); - sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y]; - if (onlystart) {return sp;} - subpaths.start = sp; - sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join(); - len += l; - x = +p[5]; - y = +p[6]; - continue; - } - if (!istotal && !subpath) { - point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); - return {x: point.x, y: point.y, alpha: point.alpha}; - } - } - len += l; - x = +p[5]; - y = +p[6]; - } - sp += p.shift() + p; - } - subpaths.end = sp; - point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1); - point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha}); - return point; - }; - }; - var getTotalLength = getLengthFactory(1), - getPointAtLength = getLengthFactory(), - getSubpathsAtLength = getLengthFactory(0, 1); - - R.getTotalLength = getTotalLength; - - R.getPointAtLength = getPointAtLength; - - R.getSubpath = function (path, from, to) { - if (this.getTotalLength(path) - to < 1e-6) { - return getSubpathsAtLength(path, from).end; - } - var a = getSubpathsAtLength(path, to, 1); - return from ? getSubpathsAtLength(a, from).end : a; - }; - - elproto.getTotalLength = function () { - if (this.type != "path") {return;} - if (this.node.getTotalLength) { - return this.node.getTotalLength(); - } - return getTotalLength(this.attrs.path); - }; - - elproto.getPointAtLength = function (length) { - if (this.type != "path") {return;} - return getPointAtLength(this.attrs.path, length); - }; - - elproto.getSubpath = function (from, to) { - if (this.type != "path") {return;} - return R.getSubpath(this.attrs.path, from, to); - }; - - var ef = R.easing_formulas = { - linear: function (n) { - return n; - }, - "<": function (n) { - return pow(n, 1.7); - }, - ">": function (n) { - return pow(n, .48); - }, - "<>": function (n) { - var q = .48 - n / 1.04, - Q = math.sqrt(.1734 + q * q), - x = Q - q, - X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1), - y = -Q - q, - Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1), - t = X + Y + .5; - return (1 - t) * 3 * t * t + t * t * t; - }, - backIn: function (n) { - var s = 1.70158; - return n * n * ((s + 1) * n - s); - }, - backOut: function (n) { - n = n - 1; - var s = 1.70158; - return n * n * ((s + 1) * n + s) + 1; - }, - elastic: function (n) { - if (n == !!n) { - return n; - } - return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1; - }, - bounce: function (n) { - var s = 7.5625, - p = 2.75, - l; - if (n < (1 / p)) { - l = s * n * n; - } else { - if (n < (2 / p)) { - n -= (1.5 / p); - l = s * n * n + .75; - } else { - if (n < (2.5 / p)) { - n -= (2.25 / p); - l = s * n * n + .9375; - } else { - n -= (2.625 / p); - l = s * n * n + .984375; - } - } - } - return l; - } - }; - ef.easeIn = ef["ease-in"] = ef["<"]; - ef.easeOut = ef["ease-out"] = ef[">"]; - ef.easeInOut = ef["ease-in-out"] = ef["<>"]; - ef["back-in"] = ef.backIn; - ef["back-out"] = ef.backOut; - - var animationElements = [], - requestAnimFrame = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - function (callback) { - setTimeout(callback, 16); - }, - animation = function () { - var Now = +new Date, - l = 0; - for (; l < animationElements.length; l++) { - var e = animationElements[l]; - if (e.el.removed || e.paused) { - continue; - } - var time = Now - e.start, - ms = e.ms, - easing = e.easing, - from = e.from, - diff = e.diff, - to = e.to, - t = e.t, - that = e.el, - set = {}, - now, - init = {}, - key; - if (e.initstatus) { - time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms; - e.status = e.initstatus; - delete e.initstatus; - e.stop && animationElements.splice(l--, 1); - } else { - e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top; - } - if (time < 0) { - continue; - } - if (time < ms) { - var pos = easing(time / ms); - for (var attr in from) if (from[has](attr)) { - switch (availableAnimAttrs[attr]) { - case nu: - now = +from[attr] + pos * ms * diff[attr]; - break; - case "colour": - now = "rgb(" + [ - upto255(round(from[attr].r + pos * ms * diff[attr].r)), - upto255(round(from[attr].g + pos * ms * diff[attr].g)), - upto255(round(from[attr].b + pos * ms * diff[attr].b)) - ].join(",") + ")"; - break; - case "path": - now = []; - for (var i = 0, ii = from[attr].length; i < ii; i++) { - now[i] = [from[attr][i][0]]; - for (var j = 1, jj = from[attr][i].length; j < jj; j++) { - now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j]; - } - now[i] = now[i].join(S); - } - now = now.join(S); - break; - case "transform": - if (diff[attr].real) { - now = []; - for (i = 0, ii = from[attr].length; i < ii; i++) { - now[i] = [from[attr][i][0]]; - for (j = 1, jj = from[attr][i].length; j < jj; j++) { - now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j]; - } - } - } else { - var get = function (i) { - return +from[attr][i] + pos * ms * diff[attr][i]; - }; - // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]]; - now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]]; - } - break; - case "csv": - if (attr == "clip-rect") { - now = []; - i = 4; - while (i--) { - now[i] = +from[attr][i] + pos * ms * diff[attr][i]; - } - } - break; - default: - var from2 = [][concat](from[attr]); - now = []; - i = that.paper.customAttributes[attr].length; - while (i--) { - now[i] = +from2[i] + pos * ms * diff[attr][i]; - } - break; - } - set[attr] = now; - } - that.attr(set); - (function (id, that, anim) { - setTimeout(function () { - eve("anim.frame." + id, that, anim); - }); - })(that.id, that, e.anim); - } else { - (function(f, el, a) { - setTimeout(function() { - eve("anim.frame." + el.id, el, a); - eve("anim.finish." + el.id, el, a); - R.is(f, "function") && f.call(el); - }); - })(e.callback, that, e.anim); - that.attr(to); - animationElements.splice(l--, 1); - if (e.repeat > 1 && !e.next) { - for (key in to) if (to[has](key)) { - init[key] = e.totalOrigin[key]; - } - e.el.attr(init); - runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1); - } - if (e.next && !e.stop) { - runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat); - } - } - } - R.svg && that && that.paper && that.paper.safari(); - animationElements.length && requestAnimFrame(animation); - }, - upto255 = function (color) { - return color > 255 ? 255 : color < 0 ? 0 : color; - }; - - elproto.animateWith = function (element, anim, params, ms, easing, callback) { - var a = params ? R.animation(params, ms, easing, callback) : anim; - status = element.status(anim); - return this.animate(a).status(a, status * anim.ms / a.ms); - }; - function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) { - var cx = 3 * p1x, - bx = 3 * (p2x - p1x) - cx, - ax = 1 - cx - bx, - cy = 3 * p1y, - by = 3 * (p2y - p1y) - cy, - ay = 1 - cy - by; - function sampleCurveX(t) { - return ((ax * t + bx) * t + cx) * t; - } - function solve(x, epsilon) { - var t = solveCurveX(x, epsilon); - return ((ay * t + by) * t + cy) * t; - } - function solveCurveX(x, epsilon) { - var t0, t1, t2, x2, d2, i; - for(t2 = x, i = 0; i < 8; i++) { - x2 = sampleCurveX(t2) - x; - if (abs(x2) < epsilon) { - return t2; - } - d2 = (3 * ax * t2 + 2 * bx) * t2 + cx; - if (abs(d2) < 1e-6) { - break; - } - t2 = t2 - x2 / d2; - } - t0 = 0; - t1 = 1; - t2 = x; - if (t2 < t0) { - return t0; - } - if (t2 > t1) { - return t1; - } - while (t0 < t1) { - x2 = sampleCurveX(t2); - if (abs(x2 - x) < epsilon) { - return t2; - } - if (x > x2) { - t0 = t2; - } else { - t1 = t2; - } - t2 = (t1 - t0) / 2 + t0; - } - return t2; - } - return solve(t, 1 / (200 * duration)); - } - elproto.onAnimation = function (f) { - f ? eve.on("anim.frame." + this.id, f) : eve.unbind("anim.frame." + this.id); - return this; - }; - function Animation(anim, ms) { - var percents = [], - newAnim = {}; - this.ms = ms; - this.times = 1; - if (anim) { - for (var attr in anim) if (anim[has](attr)) { - newAnim[toFloat(attr)] = anim[attr]; - percents.push(toFloat(attr)); - } - percents.sort(sortByNumber); - } - this.anim = newAnim; - this.top = percents[percents.length - 1]; - this.percents = percents; - } - - Animation.prototype.delay = function (delay) { - var a = new Animation(this.anim, this.ms); - a.times = this.times; - a.del = +delay || 0; - return a; - }; - - Animation.prototype.repeat = function (times) { - var a = new Animation(this.anim, this.ms); - a.del = this.del; - a.times = math.floor(mmax(times, 0)) || 1; - return a; - }; - function runAnimation(anim, element, percent, status, totalOrigin, times) { - percent = toFloat(percent); - var params, - isInAnim, - isInAnimSet, - percents = [], - next, - prev, - timestamp, - ms = anim.ms, - from = {}, - to = {}, - diff = {}; - if (status) { - for (i = 0, ii = animationElements.length; i < ii; i++) { - var e = animationElements[i]; - if (e.el.id == element.id && e.anim == anim) { - if (e.percent != percent) { - animationElements.splice(i, 1); - isInAnimSet = 1; - } else { - isInAnim = e; - } - element.attr(e.totalOrigin); - break; - } - } - } else { - status = +to; // NaN - } - for (var i = 0, ii = anim.percents.length; i < ii; i++) { - if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) { - percent = anim.percents[i]; - prev = anim.percents[i - 1] || 0; - ms = ms / anim.top * (percent - prev); - next = anim.percents[i + 1]; - params = anim.anim[percent]; - break; - } else if (status) { - element.attr(anim.anim[anim.percents[i]]); - } - } - if (!params) { - return; - } - if (!isInAnim) { - for (attr in params) if (params[has](attr)) { - if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) { - from[attr] = element.attr(attr); - (from[attr] == null) && (from[attr] = availableAttrs[attr]); - to[attr] = params[attr]; - switch (availableAnimAttrs[attr]) { - case nu: - diff[attr] = (to[attr] - from[attr]) / ms; - break; - case "colour": - from[attr] = R.getRGB(from[attr]); - var toColour = R.getRGB(to[attr]); - diff[attr] = { - r: (toColour.r - from[attr].r) / ms, - g: (toColour.g - from[attr].g) / ms, - b: (toColour.b - from[attr].b) / ms - }; - break; - case "path": - var pathes = path2curve(from[attr], to[attr]), - toPath = pathes[1]; - from[attr] = pathes[0]; - diff[attr] = []; - for (i = 0, ii = from[attr].length; i < ii; i++) { - diff[attr][i] = [0]; - for (var j = 1, jj = from[attr][i].length; j < jj; j++) { - diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms; - } - } - break; - case "transform": - var _ = element._, - eq = equaliseTransform(_[attr], to[attr]); - if (eq) { - from[attr] = eq.from; - to[attr] = eq.to; - diff[attr] = []; - diff[attr].real = true; - for (i = 0, ii = from[attr].length; i < ii; i++) { - diff[attr][i] = [from[attr][i][0]]; - for (j = 1, jj = from[attr][i].length; j < jj; j++) { - diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms; - } - } - } else { - var m = (element.matrix || new Matrix), - to2 = { - _: {transform: _.transform}, - getBBox: function () { - return element.getBBox(1); - } - }; - from[attr] = [ - m.a, - m.b, - m.c, - m.d, - m.e, - m.f - ]; - extractTransform(to2, to[attr]); - to[attr] = to2._.transform; - diff[attr] = [ - (to2.matrix.a - m.a) / ms, - (to2.matrix.b - m.b) / ms, - (to2.matrix.c - m.c) / ms, - (to2.matrix.d - m.d) / ms, - (to2.matrix.e - m.e) / ms, - (to2.matrix.e - m.f) / ms - ]; - // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy]; - // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }}; - // extractTransform(to2, to[attr]); - // diff[attr] = [ - // (to2._.sx - _.sx) / ms, - // (to2._.sy - _.sy) / ms, - // (to2._.deg - _.deg) / ms, - // (to2._.dx - _.dx) / ms, - // (to2._.dy - _.dy) / ms - // ]; - } - break; - case "csv": - var values = Str(params[attr])[split](separator), - from2 = Str(from[attr])[split](separator); - if (attr == "clip-rect") { - from[attr] = from2; - diff[attr] = []; - i = from2.length; - while (i--) { - diff[attr][i] = (values[i] - from[attr][i]) / ms; - } - } - to[attr] = values; - break; - default: - values = [][concat](params[attr]); - from2 = [][concat](from[attr]); - diff[attr] = []; - i = element.paper.customAttributes[attr].length; - while (i--) { - diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms; - } - break; - } - } - } - var easing = params.easing, - easyeasy = R.easing_formulas[easing]; - if (!easyeasy) { - easyeasy = Str(easing).match(bezierrg); - if (easyeasy && easyeasy.length == 5) { - var curve = easyeasy; - easyeasy = function (t) { - return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms); - }; - } else { - easyeasy = pipe; - } - } - timestamp = params.start || anim.start || +new Date; - e = { - anim: anim, - percent: percent, - timestamp: timestamp, - start: timestamp + (anim.del || 0), - status: 0, - initstatus: status || 0, - stop: false, - ms: ms, - easing: easyeasy, - from: from, - diff: diff, - to: to, - el: element, - callback: params.callback, - prev: prev, - next: next, - repeat: times || anim.times, - origin: element.attr(), - totalOrigin: totalOrigin - }; - animationElements.push(e); - if (status && !isInAnim && !isInAnimSet) { - e.stop = true; - e.start = new Date - ms * status; - if (animationElements.length == 1) { - return animation(); - } - } - if (isInAnimSet) { - e.start = new Date - e.ms * status; - } - animationElements.length == 1 && requestAnimFrame(animation); - } else { - isInAnim.initstatus = status; - isInAnim.start = new Date - isInAnim.ms * status; - } - eve("anim.start." + element.id, element, anim); - } - - R.animation = function (params, ms, easing, callback) { - if (params instanceof Animation) { - return params; - } - if (R.is(easing, "function") || !easing) { - callback = callback || easing || null; - easing = null; - } - params = Object(params); - ms = +ms || 0; - var p = {}, - json, - attr; - for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) { - json = true; - p[attr] = params[attr]; - } - if (!json) { - return new Animation(params, ms); - } else { - easing && (p.easing = easing); - callback && (p.callback = callback); - return new Animation({100: p}, ms); - } - }; - - elproto.animate = function (params, ms, easing, callback) { - var element = this; - if (element.removed) { - callback && callback.call(element); - return element; - } - var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback); - runAnimation(anim, element, anim.percents[0], null, element.attr()); - return element; - }; - - elproto.setTime = function (anim, value) { - if (anim && value != null) { - this.status(anim, mmin(value, anim.ms) / anim.ms); - } - return this; - }; - - elproto.status = function (anim, value) { - var out = [], - i = 0, - len, - e; - if (value != null) { - runAnimation(anim, this, -1, mmin(value, 1)); - return this; - } else { - len = animationElements.length; - for (; i < len; i++) { - e = animationElements[i]; - if (e.el.id == this.id && (!anim || e.anim == anim)) { - if (anim) { - return e.status; - } - out.push({ - anim: e.anim, - status: e.status - }); - } - } - if (anim) { - return 0; - } - return out; - } - }; - - elproto.pause = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - if (eve("anim.pause." + this.id, this, animationElements[i].anim) !== false) { - animationElements[i].paused = true; - } - } - return this; - }; - - elproto.resume = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - var e = animationElements[i]; - if (eve("anim.resume." + this.id, this, e.anim) !== false) { - delete e.paused; - this.status(e.anim, e.status); - } - } - return this; - }; - - elproto.stop = function (anim) { - for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { - if (eve("anim.stop." + this.id, this, animationElements[i].anim) !== false) { - animationElements.splice(i--, 1); - } - } - return this; - }; - elproto.toString = function () { - return "Rapha\xebl\u2019s object"; - }; - - // Set - var Set = function (items) { - this.items = []; - this.length = 0; - this.type = "set"; - if (items) { - for (var i = 0, ii = items.length; i < ii; i++) { - if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) { - this[this.items.length] = this.items[this.items.length] = items[i]; - this.length++; - } - } - } - }, - setproto = Set.prototype; - - setproto.push = function () { - var item, - len; - for (var i = 0, ii = arguments.length; i < ii; i++) { - item = arguments[i]; - if (item && (item.constructor == elproto.constructor || item.constructor == Set)) { - len = this.items.length; - this[len] = this.items[len] = item; - this.length++; - } - } - return this; - }; - - setproto.pop = function () { - this.length && delete this[this.length--]; - return this.items.pop(); - }; - - setproto.forEach = function (callback, thisArg) { - for (var i = 0, ii = this.items.length; i < ii; i++) { - if (callback.call(thisArg, this.items[i], i) === false) { - return this; - } - } - return this; - }; - for (var method in elproto) if (elproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname][apply](el, arg); - }); - }; - })(method); - } - setproto.attr = function (name, value) { - if (name && R.is(name, array) && R.is(name[0], "object")) { - for (var j = 0, jj = name.length; j < jj; j++) { - this.items[j].attr(name[j]); - } - } else { - for (var i = 0, ii = this.items.length; i < ii; i++) { - this.items[i].attr(name, value); - } - } - return this; - }; - - setproto.clear = function () { - while (this.length) { - this.pop(); - } - }; - - setproto.splice = function (index, count, insertion) { - index = index < 0 ? mmax(this.length + index, 0) : index; - count = mmax(0, mmin(this.length - index, count)); - var tail = [], - todel = [], - args = [], - i; - for (i = 2; i < arguments.length; i++) { - args.push(arguments[i]); - } - for (i = 0; i < count; i++) { - todel.push(this[index + i]); - } - for (; i < this.length - index; i++) { - tail.push(this[index + i]); - } - var arglen = args.length; - for (i = 0; i < arglen + tail.length; i++) { - this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen]; - } - i = this.items.length = this.length -= count - arglen; - while (this[i]) { - delete this[i++]; - } - return new Set(todel); - }; - - setproto.exclude = function (el) { - for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) { - this.splice(i, 1); - return true; - } - }; - setproto.animate = function (params, ms, easing, callback) { - (R.is(easing, "function") || !easing) && (callback = easing || null); - var len = this.items.length, - i = len, - item, - set = this, - collector; - if (!len) { - return this; - } - callback && (collector = function () { - !--len && callback.call(set); - }); - easing = R.is(easing, string) ? easing : collector; - var anim = R.animation(params, ms, easing, collector); - item = this.items[--i].animate(anim); - while (i--) { - this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim); - } - return this; - }; - setproto.insertAfter = function (el) { - var i = this.items.length; - while (i--) { - this.items[i].insertAfter(el); - } - return this; - }; - setproto.getBBox = function () { - var x = [], - y = [], - w = [], - h = []; - for (var i = this.items.length; i--;) if (!this.items[i].removed) { - var box = this.items[i].getBBox(); - x.push(box.x); - y.push(box.y); - w.push(box.x + box.width); - h.push(box.y + box.height); - } - x = mmin[apply](0, x); - y = mmin[apply](0, y); - return { - x: x, - y: y, - width: mmax[apply](0, w) - x, - height: mmax[apply](0, h) - y - }; - }; - setproto.clone = function (s) { - s = new Set; - for (var i = 0, ii = this.items.length; i < ii; i++) { - s.push(this.items[i].clone()); - } - return s; - }; - setproto.toString = function () { - return "Rapha\xebl\u2018s set"; - }; - - - R.registerFont = function (font) { - if (!font.face) { - return font; - } - this.fonts = this.fonts || {}; - var fontcopy = { - w: font.w, - face: {}, - glyphs: {} - }, - family = font.face["font-family"]; - for (var prop in font.face) if (font.face[has](prop)) { - fontcopy.face[prop] = font.face[prop]; - } - if (this.fonts[family]) { - this.fonts[family].push(fontcopy); - } else { - this.fonts[family] = [fontcopy]; - } - if (!font.svg) { - fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10); - for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) { - var path = font.glyphs[glyph]; - fontcopy.glyphs[glyph] = { - w: path.w, - k: {}, - d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) { - return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M"; - }) + "z" - }; - if (path.k) { - for (var k in path.k) if (path[has](k)) { - fontcopy.glyphs[glyph].k[k] = path.k[k]; - } - } - } - } - return font; - }; - - paperproto.getFont = function (family, weight, style, stretch) { - stretch = stretch || "normal"; - style = style || "normal"; - weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400; - if (!R.fonts) { - return; - } - var font = R.fonts[family]; - if (!font) { - var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i"); - for (var fontName in R.fonts) if (R.fonts[has](fontName)) { - if (name.test(fontName)) { - font = R.fonts[fontName]; - break; - } - } - } - var thefont; - if (font) { - for (var i = 0, ii = font.length; i < ii; i++) { - thefont = font[i]; - if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) { - break; - } - } - } - return thefont; - }; - - paperproto.print = function (x, y, string, font, size, origin, letter_spacing) { - origin = origin || "middle"; // baseline|middle - letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1); - var out = this.set(), - letters = Str(string)[split](E), - shift = 0, - path = E, - scale; - R.is(font, string) && (font = this.getFont(font)); - if (font) { - scale = (size || 16) / font.face["units-per-em"]; - var bb = font.face.bbox[split](separator), - top = +bb[0], - height = +bb[1] + (origin == "baseline" ? bb[3] - bb[1] + (+font.face.descent) : (bb[3] - bb[1]) / 2); - for (var i = 0, ii = letters.length; i < ii; i++) { - var prev = i && font.glyphs[letters[i - 1]] || {}, - curr = font.glyphs[letters[i]]; - shift += i ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0; - curr && curr.d && out.push(this.path(curr.d).attr({ - fill: "#000", - stroke: "none", - transform: [["t", shift * scale, 0]] - })); - } - out.transform(["...s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]); - } - return out; - }; - - - R.format = function (token, params) { - var args = R.is(params, array) ? [0][concat](params) : arguments; - token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) { - return args[++i] == null ? E : args[i]; - })); - return token || E; - }; - - R.fullfill = (function () { - var tokenRegex = /\{([^\}]+)\}/g, - objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties - replacer = function (all, key, obj) { - var res = obj; - key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) { - name = name || quotedName; - if (res) { - if (name in res) { - res = res[name]; - } - typeof res == "function" && isFunc && (res = res()); - } - }); - res = (res == null || res == obj ? all : res) + ""; - return res; - }; - return function (str, obj) { - return String(str).replace(tokenRegex, function (all, key) { - return replacer(all, key, obj); - }); - }; - })(); - - R.ninja = function () { - oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael; - return R; - }; - - R.st = setproto; - // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html - (function (doc, loaded, f) { - if (doc.readyState == null && doc.addEventListener){ - doc.addEventListener(loaded, f = function () { - doc.removeEventListener(loaded, f, false); - doc.readyState = "complete"; - }, false); - doc.readyState = "loading"; - } - function isLoaded() { - (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("DOMload"); - } - isLoaded(); - })(document, "DOMContentLoaded"); - - oldRaphael.was ? (g.win.Raphael = R) : (Raphael = R); - - eve.on("DOMload", function () { - loaded = true; - }); -})(); - -// ┌─────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2 - JavaScript Vector Library │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ SVG Module │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ -// └─────────────────────────────────────────────────────────────────────┘ \\ -window.Raphael.svg && function (R) { - var has = "hasOwnProperty", - Str = String, - toFloat = parseFloat, - toInt = parseInt, - math = Math, - mmax = math.max, - abs = math.abs, - pow = math.pow, - separator = /[, ]+/, - eve = R.eve, - E = "", - S = " "; - var xlink = "http://www.w3.org/1999/xlink", - markers = { - block: "M5,0 0,2.5 5,5z", - classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z", - diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z", - open: "M6,1 1,3.5 6,6", - oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" - }, - markerCounter = {}; - R.toString = function () { - return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version; - }; - var $ = function (el, attr) { - if (attr) { - if (typeof el == "string") { - el = $(el); - } - for (var key in attr) if (attr[has](key)) { - if (key.substring(0, 6) == "xlink:") { - el.setAttributeNS(xlink, key.substring(6), Str(attr[key])); - } else { - el.setAttribute(key, Str(attr[key])); - } - } - } else { - el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el); - el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); - } - return el; - }, - gradients = {}, - rgGrad = /^url\(#(.*)\)$/, - removeGradientFill = function (node, paper) { - var oid = node.getAttribute("fill"); - oid = oid && oid.match(rgGrad); - if (oid && !--gradients[oid[1]]) { - delete gradients[oid[1]]; - paper.defs.removeChild(R._g.doc.getElementById(oid[1])); - } - }, - addGradientFill = function (element, gradient) { - var type = "linear", - id = element.id + gradient, - fx = .5, fy = .5, - o = element.node, - SVG = element.paper, - s = o.style, - el = R._g.doc.getElementById(id); - if (!el) { - gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) { - type = "radial"; - if (_fx && _fy) { - fx = toFloat(_fx); - fy = toFloat(_fy); - var dir = ((fy > .5) * 2 - 1); - pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && - (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) && - fy != .5 && - (fy = fy.toFixed(5) - 1e-5 * dir); - } - return E; - }); - gradient = gradient.split(/\s*\-\s*/); - if (type == "linear") { - var angle = gradient.shift(); - angle = -toFloat(angle); - if (isNaN(angle)) { - return null; - } - var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))], - max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1); - vector[2] *= max; - vector[3] *= max; - if (vector[2] < 0) { - vector[0] = -vector[2]; - vector[2] = 0; - } - if (vector[3] < 0) { - vector[1] = -vector[3]; - vector[3] = 0; - } - } - var dots = R._parseDots(gradient); - if (!dots) { - return null; - } - if (element.gradient) { - SVG.defs.removeChild(element.gradient); - delete element.gradient; - } - - id = id.replace(/[\(\)\s,\xb0#]/g, "-"); - el = $(type + "Gradient", {id: id}); - element.gradient = el; - $(el, type == "radial" ? { - fx: fx, - fy: fy - } : { - x1: vector[0], - y1: vector[1], - x2: vector[2], - y2: vector[3], - gradientTransform: element.matrix.invert() - }); - SVG.defs.appendChild(el); - for (var i = 0, ii = dots.length; i < ii; i++) { - el.appendChild($("stop", { - offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%", - "stop-color": dots[i].color || "#fff" - })); - } - } - $(o, { - fill: "url(#" + id + ")", - opacity: 1, - "fill-opacity": 1 - }); - s.fill = E; - s.opacity = 1; - s.fillOpacity = 1; - return 1; - }, - updatePosition = function (o) { - var bbox = o.getBBox(1); - $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"}); - }, - addArrow = function (o, value, isEnd) { - if (o.type == "path") { - var values = Str(value).toLowerCase().split("-"), - p = o.paper, - se = isEnd ? "end" : "start", - node = o.node, - attrs = o.attrs, - stroke = attrs["stroke-width"], - i = values.length, - type = "classic", - from, - to, - dx, - refX, - attr, - w = 3, - h = 3, - t = 5; - while (i--) { - switch (values[i]) { - case "block": - case "classic": - case "oval": - case "diamond": - case "open": - case "none": - type = values[i]; - break; - case "wide": h = 5; break; - case "narrow": h = 2; break; - case "long": w = 5; break; - case "short": w = 2; break; - } - } - if (type == "open") { - w += 2; - h += 2; - t += 2; - dx = 1; - refX = isEnd ? 4 : 1; - attr = { - fill: "none", - stroke: attrs.stroke - }; - } else { - refX = dx = w / 2; - attr = { - fill: attrs.stroke, - stroke: "none" - }; - } - if (o._.arrows) { - if (isEnd) { - o._.arrows.endPath && markerCounter[o._.arrows.endPath]--; - o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--; - } else { - o._.arrows.startPath && markerCounter[o._.arrows.startPath]--; - o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--; - } - } else { - o._.arrows = {}; - } - if (type != "none") { - var pathId = "raphael-marker-" + type, - markerId = "raphael-marker-" + se + type + w + h; - if (!R._g.doc.getElementById(pathId)) { - p.defs.appendChild($($("path"), { - "stroke-linecap": "round", - d: markers[type], - id: pathId - })); - markerCounter[pathId] = 1; - } else { - markerCounter[pathId]++; - } - var marker = R._g.doc.getElementById(markerId), - use; - if (!marker) { - marker = $($("marker"), { - id: markerId, - markerHeight: h, - markerWidth: w, - orient: "auto", - refX: refX, - refY: h / 2 - }); - use = $($("use"), { - "xlink:href": "#" + pathId, - transform: (isEnd ? " rotate(180 " + w / 2 + " " + h / 2 + ") " : S) + "scale(" + w / t + "," + h / t + ")", - "stroke-width": 1 / ((w / t + h / t) / 2) - }); - marker.appendChild(use); - p.defs.appendChild(marker); - markerCounter[markerId] = 1; - } else { - markerCounter[markerId]++; - use = marker.getElementsByTagName("use")[0]; - } - $(use, attr); - var delta = dx * (type != "diamond" && type != "oval"); - if (isEnd) { - from = o._.arrows.startdx * stroke || 0; - to = R.getTotalLength(attrs.path) - delta * stroke; - } else { - from = delta * stroke; - to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); - } - attr = {}; - attr["marker-" + se] = "url(#" + markerId + ")"; - if (to || from) { - attr.d = Raphael.getSubpath(attrs.path, from, to); - } - $(node, attr); - o._.arrows[se + "Path"] = pathId; - o._.arrows[se + "Marker"] = markerId; - o._.arrows[se + "dx"] = delta; - o._.arrows[se + "Type"] = type; - o._.arrows[se + "String"] = value; - } else { - if (isEnd) { - from = o._.arrows.startdx * stroke || 0; - to = R.getTotalLength(attrs.path) - from; - } else { - from = 0; - to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); - } - o._.arrows[se + "Path"] && $(node, {d: Raphael.getSubpath(attrs.path, from, to)}); - delete o._.arrows[se + "Path"]; - delete o._.arrows[se + "Marker"]; - delete o._.arrows[se + "dx"]; - delete o._.arrows[se + "Type"]; - delete o._.arrows[se + "String"]; - } - for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) { - var item = R._g.doc.getElementById(attr); - item && item.parentNode.removeChild(item); - } - } - }, - dasharray = { - "": [0], - "none": [0], - "-": [3, 1], - ".": [1, 1], - "-.": [3, 1, 1, 1], - "-..": [3, 1, 1, 1, 1, 1], - ". ": [1, 3], - "- ": [4, 3], - "--": [8, 3], - "- .": [4, 3, 1, 3], - "--.": [8, 3, 1, 3], - "--..": [8, 3, 1, 3, 1, 3] - }, - addDashes = function (o, value, params) { - value = dasharray[Str(value).toLowerCase()]; - if (value) { - var width = o.attrs["stroke-width"] || "1", - butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0, - dashes = [], - i = value.length; - while (i--) { - dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt; - } - $(o.node, {"stroke-dasharray": dashes.join(",")}); - } - }, - setFillAndStroke = function (o, params) { - var node = o.node, - attrs = o.attrs, - vis = node.style.visibility; - node.style.visibility = "hidden"; - for (var att in params) { - if (params[has](att)) { - if (!R._availableAttrs[has](att)) { - continue; - } - var value = params[att]; - attrs[att] = value; - switch (att) { - case "blur": - o.blur(value); - break; - case "href": - case "title": - case "target": - var pn = node.parentNode; - if (pn.tagName.toLowerCase() != "a") { - var hl = $("a"); - pn.insertBefore(hl, node); - hl.appendChild(node); - pn = hl; - } - if (att == "target" && value == "blank") { - pn.setAttributeNS(xlink, "show", "new"); - } else { - pn.setAttributeNS(xlink, att, value); - } - break; - case "cursor": - node.style.cursor = value; - break; - case "transform": - o.transform(value); - break; - case "arrow-start": - addArrow(o, value); - break; - case "arrow-end": - addArrow(o, value, 1); - break; - case "clip-rect": - var rect = Str(value).split(separator); - if (rect.length == 4) { - o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode); - var el = $("clipPath"), - rc = $("rect"); - el.id = R.createUUID(); - $(rc, { - x: rect[0], - y: rect[1], - width: rect[2], - height: rect[3] - }); - el.appendChild(rc); - o.paper.defs.appendChild(el); - $(node, {"clip-path": "url(#" + el.id + ")"}); - o.clip = rc; - } - if (!value) { - var clip = R._g.doc.getElementById(node.getAttribute("clip-path").replace(/(^url\(#|\)$)/g, E)); - clip && clip.parentNode.removeChild(clip); - $(node, {"clip-path": E}); - delete o.clip; - } - break; - case "path": - if (o.type == "path") { - $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"}); - o._.dirty = 1; - if (o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - } - break; - case "width": - node.setAttribute(att, value); - o._.dirty = 1; - if (attrs.fx) { - att = "x"; - value = attrs.x; - } else { - break; - } - case "x": - if (attrs.fx) { - value = -attrs.x - (attrs.width || 0); - } - case "rx": - if (att == "rx" && o.type == "rect") { - break; - } - case "cx": - node.setAttribute(att, value); - o.pattern && updatePosition(o); - o._.dirty = 1; - break; - case "height": - node.setAttribute(att, value); - o._.dirty = 1; - if (attrs.fy) { - att = "y"; - value = attrs.y; - } else { - break; - } - case "y": - if (attrs.fy) { - value = -attrs.y - (attrs.height || 0); - } - case "ry": - if (att == "ry" && o.type == "rect") { - break; - } - case "cy": - node.setAttribute(att, value); - o.pattern && updatePosition(o); - o._.dirty = 1; - break; - case "r": - if (o.type == "rect") { - $(node, {rx: value, ry: value}); - } else { - node.setAttribute(att, value); - } - o._.dirty = 1; - break; - case "src": - if (o.type == "image") { - node.setAttributeNS(xlink, "href", value); - } - break; - case "stroke-width": - if (o._.sx != 1 || o._.sy != 1) { - value /= mmax(abs(o._.sx), abs(o._.sy)) || 1; - } - if (o.paper._vbSize) { - value *= o.paper._vbSize; - } - node.setAttribute(att, value); - if (attrs["stroke-dasharray"]) { - addDashes(o, attrs["stroke-dasharray"], params); - } - if (o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - break; - case "stroke-dasharray": - addDashes(o, value, params); - break; - case "fill": - var isURL = Str(value).match(R._ISURL); - if (isURL) { - el = $("pattern"); - var ig = $("image"); - el.id = R.createUUID(); - $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1}); - $(ig, {x: 0, y: 0, "xlink:href": isURL[1]}); - el.appendChild(ig); - - (function (el) { - R._preload(isURL[1], function () { - var w = this.offsetWidth, - h = this.offsetHeight; - $(el, {width: w, height: h}); - $(ig, {width: w, height: h}); - o.paper.safari(); - }); - })(el); - o.paper.defs.appendChild(el); - node.style.fill = "url(#" + el.id + ")"; - $(node, {fill: "url(#" + el.id + ")"}); - o.pattern = el; - o.pattern && updatePosition(o); - break; - } - var clr = R.getRGB(value); - if (!clr.error) { - delete params.gradient; - delete attrs.gradient; - !R.is(attrs.opacity, "undefined") && - R.is(params.opacity, "undefined") && - $(node, {opacity: attrs.opacity}); - !R.is(attrs["fill-opacity"], "undefined") && - R.is(params["fill-opacity"], "undefined") && - $(node, {"fill-opacity": attrs["fill-opacity"]}); - } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) { - if ("opacity" in attrs || "fill-opacity" in attrs) { - var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); - if (gradient) { - var stops = gradient.getElementsByTagName("stop"); - $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)}); - } - } - attrs.gradient = value; - attrs.fill = "none"; - break; - } - clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); - case "stroke": - clr = R.getRGB(value); - node.setAttribute(att, clr.hex); - att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); - if (att == "stroke" && o._.arrows) { - "startString" in o._.arrows && addArrow(o, o._.arrows.startString); - "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); - } - break; - case "gradient": - (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value); - break; - case "opacity": - if (attrs.gradient && !attrs[has]("stroke-opacity")) { - $(node, {"stroke-opacity": value > 1 ? value / 100 : value}); - } - // fall - case "fill-opacity": - if (attrs.gradient) { - gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); - if (gradient) { - stops = gradient.getElementsByTagName("stop"); - $(stops[stops.length - 1], {"stop-opacity": value}); - } - break; - } - default: - att == "font-size" && (value = toInt(value, 10) + "px"); - var cssrule = att.replace(/(\-.)/g, function (w) { - return w.substring(1).toUpperCase(); - }); - node.style[cssrule] = value; - o._.dirty = 1; - node.setAttribute(att, value); - break; - } - } - } - - tuneText(o, params); - node.style.visibility = vis; - }, - leading = 1.2, - tuneText = function (el, params) { - if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) { - return; - } - var a = el.attrs, - node = el.node, - fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10; - - if (params[has]("text")) { - a.text = params.text; - while (node.firstChild) { - node.removeChild(node.firstChild); - } - var texts = Str(params.text).split("\n"), - tspans = [], - tspan; - for (var i = 0, ii = texts.length; i < ii; i++) { - tspan = $("tspan"); - i && $(tspan, {dy: fontSize * leading, x: a.x}); - tspan.appendChild(R._g.doc.createTextNode(texts[i])); - node.appendChild(tspan); - tspans[i] = tspan; - } - } else { - tspans = node.getElementsByTagName("tspan"); - for (i = 0, ii = tspans.length; i < ii; i++) if (i) { - $(tspans[i], {dy: fontSize * leading, x: a.x}); - } else { - $(tspans[0], {dy: 0}); - } - } - $(node, {x: a.x, y: a.y}); - el._.dirty = 1; - var bb = el._getBBox(), - dif = a.y - (bb.y + bb.height / 2); - dif && R.is(dif, "finite") && $(tspans[0], {dy: dif}); - }, - Element = function (node, svg) { - var X = 0, - Y = 0; - - this[0] = this.node = node; - - node.raphael = true; - - this.id = R._oid++; - node.raphaelid = this.id; - this.matrix = R.matrix(); - this.realPath = null; - - this.paper = svg; - this.attrs = this.attrs || {}; - this._ = { - transform: [], - sx: 1, - sy: 1, - deg: 0, - dx: 0, - dy: 0, - dirty: 1 - }; - !svg.bottom && (svg.bottom = this); - - this.prev = svg.top; - svg.top && (svg.top.next = this); - svg.top = this; - - this.next = null; - }, - elproto = R.el; - - Element.prototype = elproto; - elproto.constructor = Element; - - R._engine.path = function (pathString, SVG) { - var el = $("path"); - SVG.canvas && SVG.canvas.appendChild(el); - var p = new Element(el, SVG); - p.type = "path"; - setFillAndStroke(p, { - fill: "none", - stroke: "#000", - path: pathString - }); - return p; - }; - - elproto.rotate = function (deg, cx, cy) { - if (this.removed) { - return this; - } - deg = Str(deg).split(separator); - if (deg.length - 1) { - cx = toFloat(deg[1]); - cy = toFloat(deg[2]); - } - deg = toFloat(deg[0]); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - cx = bbox.x + bbox.width / 2; - cy = bbox.y + bbox.height / 2; - } - this.transform(this._.transform.concat([["r", deg, cx, cy]])); - return this; - }; - - elproto.scale = function (sx, sy, cx, cy) { - if (this.removed) { - return this; - } - sx = Str(sx).split(separator); - if (sx.length - 1) { - sy = toFloat(sx[1]); - cx = toFloat(sx[2]); - cy = toFloat(sx[3]); - } - sx = toFloat(sx[0]); - (sy == null) && (sy = sx); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - } - cx = cx == null ? bbox.x + bbox.width / 2 : cx; - cy = cy == null ? bbox.y + bbox.height / 2 : cy; - this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); - return this; - }; - - elproto.translate = function (dx, dy) { - if (this.removed) { - return this; - } - dx = Str(dx).split(separator); - if (dx.length - 1) { - dy = toFloat(dx[1]); - } - dx = toFloat(dx[0]) || 0; - dy = +dy || 0; - this.transform(this._.transform.concat([["t", dx, dy]])); - return this; - }; - - elproto.transform = function (tstr) { - var _ = this._; - if (tstr == null) { - return _.transform; - } - R._extractTransform(this, tstr); - - this.clip && $(this.clip, {transform: this.matrix.invert()}); - this.pattern && updatePosition(this); - this.node && $(this.node, {transform: this.matrix}); - - if (_.sx != 1 || _.sy != 1) { - var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1; - this.attr({"stroke-width": sw}); - } - - return this; - }; - - elproto.hide = function () { - !this.removed && this.paper.safari(this.node.style.display = "none"); - return this; - }; - - elproto.show = function () { - !this.removed && this.paper.safari(this.node.style.display = ""); - return this; - }; - - elproto.remove = function () { - if (this.removed) { - return; - } - this.paper.__set__ && this.paper.__set__.exclude(this); - eve.unbind("*.*." + this.id); - R._tear(this, this.paper); - this.node.parentNode.removeChild(this.node); - for (var i in this) { - delete this[i]; - } - this.removed = true; - }; - elproto._getBBox = function () { - if (this.node.style.display == "none") { - this.show(); - var hide = true; - } - var bbox = {}; - try { - bbox = this.node.getBBox(); - } catch(e) { - // Firefox 3.0.x plays badly here - } finally { - bbox = bbox || {}; - } - hide && this.hide(); - return bbox; - }; - - elproto.attr = function (name, value) { - if (this.removed) { - return this; - } - if (name == null) { - var res = {}; - for (var a in this.attrs) if (this.attrs[has](a)) { - res[a] = this.attrs[a]; - } - res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; - res.transform = this._.transform; - return res; - } - if (value == null && R.is(name, "string")) { - if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) { - return this.attrs.gradient; - } - if (name == "transform") { - return this._.transform; - } - var names = name.split(separator), - out = {}; - for (var i = 0, ii = names.length; i < ii; i++) { - name = names[i]; - if (name in this.attrs) { - out[name] = this.attrs[name]; - } else if (R.is(this.paper.customAttributes[name], "function")) { - out[name] = this.paper.customAttributes[name].def; - } else { - out[name] = R._availableAttrs[name]; - } - } - return ii - 1 ? out : out[names[0]]; - } - if (value == null && R.is(name, "array")) { - out = {}; - for (i = 0, ii = name.length; i < ii; i++) { - out[name[i]] = this.attr(name[i]); - } - return out; - } - if (value != null) { - var params = {}; - params[name] = value; - } else if (name != null && R.is(name, "object")) { - params = name; - } - for (var key in params) { - eve("attr." + key + "." + this.id, this, params[key]); - } - for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { - var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); - this.attrs[key] = params[key]; - for (var subkey in par) if (par[has](subkey)) { - params[subkey] = par[subkey]; - } - } - setFillAndStroke(this, params); - return this; - }; - - elproto.toFront = function () { - if (this.removed) { - return this; - } - this.node.parentNode.appendChild(this.node); - var svg = this.paper; - svg.top != this && R._tofront(this, svg); - return this; - }; - - elproto.toBack = function () { - if (this.removed) { - return this; - } - if (this.node.parentNode.firstChild != this.node) { - this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); - R._toback(this, this.paper); - var svg = this.paper; - } - return this; - }; - - elproto.insertAfter = function (element) { - if (this.removed) { - return this; - } - var node = element.node || element[element.length - 1].node; - if (node.nextSibling) { - node.parentNode.insertBefore(this.node, node.nextSibling); - } else { - node.parentNode.appendChild(this.node); - } - R._insertafter(this, element, this.paper); - return this; - }; - - elproto.insertBefore = function (element) { - if (this.removed) { - return this; - } - var node = element.node || element[0].node; - node.parentNode.insertBefore(this.node, node); - R._insertbefore(this, element, this.paper); - return this; - }; - elproto.blur = function (size) { - // Experimental. No Safari support. Use it on your own risk. - var t = this; - if (+size !== 0) { - var fltr = $("filter"), - blur = $("feGaussianBlur"); - t.attrs.blur = size; - fltr.id = R.createUUID(); - $(blur, {stdDeviation: +size || 1.5}); - fltr.appendChild(blur); - t.paper.defs.appendChild(fltr); - t._blur = fltr; - $(t.node, {filter: "url(#" + fltr.id + ")"}); - } else { - if (t._blur) { - t._blur.parentNode.removeChild(t._blur); - delete t._blur; - delete t.attrs.blur; - } - t.node.removeAttribute("filter"); - } - }; - R._engine.circle = function (svg, x, y, r) { - var el = $("circle"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"}; - res.type = "circle"; - $(el, res.attrs); - return res; - }; - R._engine.rect = function (svg, x, y, w, h, r) { - var el = $("rect"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {x: x, y: y, width: w, height: h, r: r || 0, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"}; - res.type = "rect"; - $(el, res.attrs); - return res; - }; - R._engine.ellipse = function (svg, x, y, rx, ry) { - var el = $("ellipse"); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"}; - res.type = "ellipse"; - $(el, res.attrs); - return res; - }; - R._engine.image = function (svg, src, x, y, w, h) { - var el = $("image"); - $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"}); - el.setAttributeNS(xlink, "href", src); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = {x: x, y: y, width: w, height: h, src: src}; - res.type = "image"; - return res; - }; - R._engine.text = function (svg, x, y, text) { - var el = $("text"); - // $(el, {x: x, y: y, "text-anchor": "middle"}); - svg.canvas && svg.canvas.appendChild(el); - var res = new Element(el, svg); - res.attrs = { - x: x, - y: y, - "text-anchor": "middle", - text: text, - font: R._availableAttrs.font, - stroke: "none", - fill: "#000" - }; - res.type = "text"; - setFillAndStroke(res, res.attrs); - return res; - }; - R._engine.setSize = function (width, height) { - this.width = width || this.width; - this.height = height || this.height; - this.canvas.setAttribute("width", this.width); - this.canvas.setAttribute("height", this.height); - if (this._viewBox) { - this.setViewBox.apply(this, this._viewBox); - } - return this; - }; - R._engine.create = function () { - var con = R._getContainer.apply(0, arguments), - container = con && con.container, - x = con.x, - y = con.y, - width = con.width, - height = con.height; - if (!container) { - throw new Error("SVG container not found."); - } - var cnvs = $("svg"), - css = "overflow:hidden;", - isFloating; - x = x || 0; - y = y || 0; - width = width || 512; - height = height || 342; - $(cnvs, { - height: height, - version: 1.1, - width: width, - xmlns: "http://www.w3.org/2000/svg" - }); - if (container == 1) { - cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px"; - R._g.doc.body.appendChild(cnvs); - isFloating = 1; - } else { - cnvs.style.cssText = css + "position:relative"; - if (container.firstChild) { - container.insertBefore(cnvs, container.firstChild); - } else { - container.appendChild(cnvs); - } - } - container = new R._Paper; - container.width = width; - container.height = height; - container.canvas = cnvs; - // plugins.call(container, container, R.fn); - container.clear(); - container._left = container._top = 0; - isFloating && (container.renderfix = function () {}); - container.renderfix(); - return container; - }; - R._engine.setViewBox = function (x, y, w, h, fit) { - eve("setViewBox", this, this._viewBox, [x, y, w, h, fit]); - var size = mmax(w / this.width, h / this.height), - top = this.top, - aspectRatio = fit ? "meet" : "xMinYMin", - vb, - sw; - if (x == null) { - if (this._vbSize) { - size = 1; - } - delete this._vbSize; - vb = "0 0 " + this.width + S + this.height; - } else { - this._vbSize = size; - vb = x + S + y + S + w + S + h; - } - $(this.canvas, { - viewBox: vb, - preserveAspectRatio: aspectRatio - }); - while (size && top) { - sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1; - top.attr({"stroke-width": sw}); - top._.dirty = 1; - top._.dirtyT = 1; - top = top.prev; - } - this._viewBox = [x, y, w, h, !!fit]; - return this; - }; - - R.prototype.renderfix = function () { - var cnvs = this.canvas, - s = cnvs.style, - pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix(), - left = -pos.e % 1, - top = -pos.f % 1; - if (left || top) { - if (left) { - this._left = (this._left + left) % 1; - s.left = this._left + "px"; - } - if (top) { - this._top = (this._top + top) % 1; - s.top = this._top + "px"; - } - } - }; - - R.prototype.clear = function () { - R.eve("clear", this); - var c = this.canvas; - while (c.firstChild) { - c.removeChild(c.firstChild); - } - this.bottom = this.top = null; - (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version)); - c.appendChild(this.desc); - c.appendChild(this.defs = $("defs")); - }; - - R.prototype.remove = function () { - eve("remove", this); - this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); - for (var i in this) { - this[i] = removed(i); - } - }; - var setproto = R.st; - for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname].apply(el, arg); - }); - }; - })(method); - } -}(window.Raphael); - -// ┌─────────────────────────────────────────────────────────────────────┐ \\ -// │ Raphaël 2 - JavaScript Vector Library │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ VML Module │ \\ -// ├─────────────────────────────────────────────────────────────────────┤ \\ -// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ -// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ -// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ -// └─────────────────────────────────────────────────────────────────────┘ \\ -window.Raphael.vml && function (R) { - var has = "hasOwnProperty", - Str = String, - toFloat = parseFloat, - math = Math, - round = math.round, - mmax = math.max, - mmin = math.min, - abs = math.abs, - fillString = "fill", - separator = /[, ]+/, - eve = R.eve, - ms = " progid:DXImageTransform.Microsoft", - S = " ", - E = "", - map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"}, - bites = /([clmz]),?([^clmz]*)/gi, - blurregexp = / progid:\S+Blur\([^\)]+\)/g, - val = /-?[^,\s-]+/g, - cssDot = "position:absolute;left:0;top:0;width:1px;height:1px", - zoom = 21600, - pathTypes = {path: 1, rect: 1, image: 1}, - ovalTypes = {circle: 1, ellipse: 1}, - path2vml = function (path) { - var total = /[ahqstv]/ig, - command = R._pathToAbsolute; - Str(path).match(total) && (command = R._path2curve); - total = /[clmz]/g; - if (command == R._pathToAbsolute && !Str(path).match(total)) { - var res = Str(path).replace(bites, function (all, command, args) { - var vals = [], - isMove = command.toLowerCase() == "m", - res = map[command]; - args.replace(val, function (value) { - if (isMove && vals.length == 2) { - res += vals + map[command == "m" ? "l" : "L"]; - vals = []; - } - vals.push(round(value * zoom)); - }); - return res + vals; - }); - return res; - } - var pa = command(path), p, r; - res = []; - for (var i = 0, ii = pa.length; i < ii; i++) { - p = pa[i]; - r = pa[i][0].toLowerCase(); - r == "z" && (r = "x"); - for (var j = 1, jj = p.length; j < jj; j++) { - r += round(p[j] * zoom) + (j != jj - 1 ? "," : E); - } - res.push(r); - } - return res.join(S); - }, - compensation = function (deg, dx, dy) { - var m = R.matrix(); - m.rotate(-deg, .5, .5); - return { - dx: m.x(dx, dy), - dy: m.y(dx, dy) - }; - }, - setCoords = function (p, sx, sy, dx, dy, deg) { - var _ = p._, - m = p.matrix, - fillpos = _.fillpos, - o = p.node, - s = o.style, - y = 1, - flip = "", - dxdy, - kx = zoom / sx, - ky = zoom / sy; - s.visibility = "hidden"; - if (!sx || !sy) { - return; - } - o.coordsize = abs(kx) + S + abs(ky); - s.rotation = deg * (sx * sy < 0 ? -1 : 1); - if (deg) { - var c = compensation(deg, dx, dy); - dx = c.dx; - dy = c.dy; - } - sx < 0 && (flip += "x"); - sy < 0 && (flip += " y") && (y = -1); - s.flip = flip; - o.coordorigin = (dx * -kx) + S + (dy * -ky); - if (fillpos || _.fillsize) { - var fill = o.getElementsByTagName(fillString); - fill = fill && fill[0]; - o.removeChild(fill); - if (fillpos) { - c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1])); - fill.position = c.dx * y + S + c.dy * y; - } - if (_.fillsize) { - fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy); - } - o.appendChild(fill); - } - s.visibility = "visible"; - }; - R.toString = function () { - return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version; - }; - addArrow = function (o, value, isEnd) { - var values = Str(value).toLowerCase().split("-"), - se = isEnd ? "end" : "start", - i = values.length, - type = "classic", - w = "medium", - h = "medium"; - while (i--) { - switch (values[i]) { - case "block": - case "classic": - case "oval": - case "diamond": - case "open": - case "none": - type = values[i]; - break; - case "wide": - case "narrow": h = values[i]; break; - case "long": - case "short": w = values[i]; break; - } - } - var stroke = o.node.getElementsByTagName("stroke")[0]; - stroke[se + "arrow"] = type; - stroke[se + "arrowlength"] = w; - stroke[se + "arrowwidth"] = h; - }; - setFillAndStroke = function (o, params) { - // o.paper.canvas.style.display = "none"; - o.attrs = o.attrs || {}; - var node = o.node, - a = o.attrs, - s = node.style, - xy, - newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r), - isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry), - res = o; - - - for (var par in params) if (params[has](par)) { - a[par] = params[par]; - } - if (newpath) { - a.path = R._getPath[o.type](o); - o._.dirty = 1; - } - params.href && (node.href = params.href); - params.title && (node.title = params.title); - params.target && (node.target = params.target); - params.cursor && (s.cursor = params.cursor); - "blur" in params && o.blur(params.blur); - if (params.path && o.type == "path" || newpath) { - node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path); - if (o.type == "image") { - o._.fillpos = [a.x, a.y]; - o._.fillsize = [a.width, a.height]; - setCoords(o, 1, 1, 0, 0, 0); - } - } - "transform" in params && o.transform(params.transform); - if (isOval) { - var cx = +a.cx, - cy = +a.cy, - rx = +a.rx || +a.r || 0, - ry = +a.ry || +a.r || 0; - node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom)); - } - if ("clip-rect" in params) { - var rect = Str(params["clip-rect"]).split(separator); - if (rect.length == 4) { - rect[2] = +rect[2] + (+rect[0]); - rect[3] = +rect[3] + (+rect[1]); - var div = node.clipRect || R._g.doc.createElement("div"), - dstyle = div.style; - dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect); - if (!node.clipRect) { - dstyle.position = "absolute"; - dstyle.top = 0; - dstyle.left = 0; - dstyle.width = o.paper.width + "px"; - dstyle.height = o.paper.height + "px"; - node.parentNode.insertBefore(div, node); - div.appendChild(node); - node.clipRect = div; - } - } - if (!params["clip-rect"]) { - node.clipRect && (node.clipRect.style.clip = E); - } - } - if (o.textpath) { - var textpathStyle = o.textpath.style; - params.font && (textpathStyle.font = params.font); - params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"'); - params["font-size"] && (textpathStyle.fontSize = params["font-size"]); - params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]); - params["font-style"] && (textpathStyle.fontStyle = params["font-style"]); - } - if ("arrow-start" in params) { - addArrow(res, params["arrow-start"]); - } - if ("arrow-end" in params) { - addArrow(res, params["arrow-end"], 1); - } - if (params.opacity != null || - params["stroke-width"] != null || - params.fill != null || - params.src != null || - params.stroke != null || - params["stroke-width"] != null || - params["stroke-opacity"] != null || - params["fill-opacity"] != null || - params["stroke-dasharray"] != null || - params["stroke-miterlimit"] != null || - params["stroke-linejoin"] != null || - params["stroke-linecap"] != null) { - var fill = node.getElementsByTagName(fillString), - newfill = false; - fill = fill && fill[0]; - !fill && (newfill = fill = createNode(fillString)); - if (o.type == "image" && params.src) { - fill.src = params.src; - } - params.fill && (fill.on = true); - if (fill.on == null || params.fill == "none" || params.fill === null) { - fill.on = false; - } - if (fill.on && params.fill) { - var isURL = Str(params.fill).match(R._ISURL); - if (isURL) { - fill.parentNode == node && node.removeChild(fill); - fill.rotate = true; - fill.src = isURL[1]; - fill.type = "tile"; - var bbox = o.getBBox(1); - fill.position = bbox.x + S + bbox.y; - o._.fillpos = [bbox.x, bbox.y]; - - R._preload(isURL[1], function () { - o._.fillsize = [this.offsetWidth, this.offsetHeight]; - }); - } else { - fill.color = R.getRGB(params.fill).hex; - fill.src = E; - fill.type = "solid"; - if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) { - a.fill = "none"; - a.gradient = params.fill; - fill.rotate = false; - } - } - } - if ("fill-opacity" in params || "opacity" in params) { - var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1); - opacity = mmin(mmax(opacity, 0), 1); - fill.opacity = opacity; - if (fill.src) { - fill.color = "none"; - } - } - node.appendChild(fill); - var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]), - newstroke = false; - !stroke && (newstroke = stroke = createNode("stroke")); - if ((params.stroke && params.stroke != "none") || - params["stroke-width"] || - params["stroke-opacity"] != null || - params["stroke-dasharray"] || - params["stroke-miterlimit"] || - params["stroke-linejoin"] || - params["stroke-linecap"]) { - stroke.on = true; - } - (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false); - var strokeColor = R.getRGB(params.stroke); - stroke.on && params.stroke && (stroke.color = strokeColor.hex); - opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1); - var width = (toFloat(params["stroke-width"]) || 1) * .75; - opacity = mmin(mmax(opacity, 0), 1); - params["stroke-width"] == null && (width = a["stroke-width"]); - params["stroke-width"] && (stroke.weight = width); - width && width < 1 && (opacity *= width) && (stroke.weight = 1); - stroke.opacity = opacity; - - params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter"); - stroke.miterlimit = params["stroke-miterlimit"] || 8; - params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round"); - if (params["stroke-dasharray"]) { - var dasharray = { - "-": "shortdash", - ".": "shortdot", - "-.": "shortdashdot", - "-..": "shortdashdotdot", - ". ": "dot", - "- ": "dash", - "--": "longdash", - "- .": "dashdot", - "--.": "longdashdot", - "--..": "longdashdotdot" - }; - stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E; - } - newstroke && node.appendChild(stroke); - } - if (res.type == "text") { - res.paper.canvas.style.display = E; - var span = res.paper.span, - m = 100, - fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/); - s = span.style; - a.font && (s.font = a.font); - a["font-family"] && (s.fontFamily = a["font-family"]); - a["font-weight"] && (s.fontWeight = a["font-weight"]); - a["font-style"] && (s.fontStyle = a["font-style"]); - fontSize = toFloat(fontSize ? fontSize[0] : a["font-size"]); - s.fontSize = fontSize * m + "px"; - res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/")); - var brect = span.getBoundingClientRect(); - res.W = a.w = (brect.right - brect.left) / m; - res.H = a.h = (brect.bottom - brect.top) / m; - // res.paper.canvas.style.display = "none"; - res.X = a.x; - res.Y = a.y + res.H / 2; - - ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1)); - var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; - for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) { - res._.dirty = 1; - break; - } - - // text-anchor emulation - switch (a["text-anchor"]) { - case "start": - res.textpath.style["v-text-align"] = "left"; - res.bbx = res.W / 2; - break; - case "end": - res.textpath.style["v-text-align"] = "right"; - res.bbx = -res.W / 2; - break; - default: - res.textpath.style["v-text-align"] = "center"; - res.bbx = 0; - break; - } - res.textpath.style["v-text-kern"] = true; - } - // res.paper.canvas.style.display = E; - }; - addGradientFill = function (o, gradient, fill) { - o.attrs = o.attrs || {}; - var attrs = o.attrs, - pow = Math.pow, - opacity, - oindex, - type = "linear", - fxfy = ".5 .5"; - o.attrs.gradient = gradient; - gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) { - type = "radial"; - if (fx && fy) { - fx = toFloat(fx); - fy = toFloat(fy); - pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5); - fxfy = fx + S + fy; - } - return E; - }); - gradient = gradient.split(/\s*\-\s*/); - if (type == "linear") { - var angle = gradient.shift(); - angle = -toFloat(angle); - if (isNaN(angle)) { - return null; - } - } - var dots = R._parseDots(gradient); - if (!dots) { - return null; - } - o = o.shape || o.node; - if (dots.length) { - o.removeChild(fill); - fill.on = true; - fill.method = "none"; - fill.color = dots[0].color; - fill.color2 = dots[dots.length - 1].color; - var clrs = []; - for (var i = 0, ii = dots.length; i < ii; i++) { - dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color); - } - fill.colors = clrs.length ? clrs.join() : "0% " + fill.color; - if (type == "radial") { - fill.type = "gradientTitle"; - fill.focus = "100%"; - fill.focussize = "0 0"; - fill.focusposition = fxfy; - fill.angle = 0; - } else { - // fill.rotate= true; - fill.type = "gradient"; - fill.angle = (270 - angle) % 360; - } - o.appendChild(fill); - } - return 1; - }; - Element = function (node, vml) { - this[0] = this.node = node; - node.raphael = true; - this.id = R._oid++; - node.raphaelid = this.id; - this.X = 0; - this.Y = 0; - this.attrs = {}; - this.paper = vml; - this.matrix = R.matrix(); - this._ = { - transform: [], - sx: 1, - sy: 1, - dx: 0, - dy: 0, - deg: 0, - dirty: 1, - dirtyT: 1 - }; - !vml.bottom && (vml.bottom = this); - this.prev = vml.top; - vml.top && (vml.top.next = this); - vml.top = this; - this.next = null; - }; - var elproto = R.el; - - Element.prototype = elproto; - elproto.constructor = Element; - elproto.transform = function (tstr) { - if (tstr == null) { - return this._.transform; - } - var vbs = this.paper._viewBoxShift, - vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E, - oldt; - if (vbs) { - oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E); - } - R._extractTransform(this, vbt + tstr); - var matrix = this.matrix.clone(), - skew = this.skew, - o = this.node, - split, - isGrad = ~Str(this.attrs.fill).indexOf("-"), - isPatt = !Str(this.attrs.fill).indexOf("url("); - matrix.translate(-.5, -.5); - if (isPatt || isGrad || this.type == "image") { - skew.matrix = "1 0 0 1"; - skew.offset = "0 0"; - split = matrix.split(); - if ((isGrad && split.noRotation) || !split.isSimple) { - o.style.filter = matrix.toFilter(); - var bb = this.getBBox(), - bbt = this.getBBox(1), - dx = bb.x - bbt.x, - dy = bb.y - bbt.y; - o.coordorigin = (dx * -zoom) + S + (dy * -zoom); - setCoords(this, 1, 1, dx, dy, 0); - } else { - o.style.filter = E; - setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate); - } - } else { - o.style.filter = E; - skew.matrix = Str(matrix); - skew.offset = matrix.offset(); - } - oldt && (this._.transform = oldt); - return this; - }; - elproto.rotate = function (deg, cx, cy) { - if (this.removed) { - return this; - } - if (deg == null) { - return; - } - deg = Str(deg).split(separator); - if (deg.length - 1) { - cx = toFloat(deg[1]); - cy = toFloat(deg[2]); - } - deg = toFloat(deg[0]); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - cx = bbox.x + bbox.width / 2; - cy = bbox.y + bbox.height / 2; - } - this._.dirtyT = 1; - this.transform(this._.transform.concat([["r", deg, cx, cy]])); - return this; - }; - elproto.translate = function (dx, dy) { - if (this.removed) { - return this; - } - dx = Str(dx).split(separator); - if (dx.length - 1) { - dy = toFloat(dx[1]); - } - dx = toFloat(dx[0]) || 0; - dy = +dy || 0; - if (this._.bbox) { - this._.bbox.x += dx; - this._.bbox.y += dy; - } - this.transform(this._.transform.concat([["t", dx, dy]])); - return this; - }; - elproto.scale = function (sx, sy, cx, cy) { - if (this.removed) { - return this; - } - sx = Str(sx).split(separator); - if (sx.length - 1) { - sy = toFloat(sx[1]); - cx = toFloat(sx[2]); - cy = toFloat(sx[3]); - isNaN(cx) && (cx = null); - isNaN(cy) && (cy = null); - } - sx = toFloat(sx[0]); - (sy == null) && (sy = sx); - (cy == null) && (cx = cy); - if (cx == null || cy == null) { - var bbox = this.getBBox(1); - } - cx = cx == null ? bbox.x + bbox.width / 2 : cx; - cy = cy == null ? bbox.y + bbox.height / 2 : cy; - - this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); - this._.dirtyT = 1; - return this; - }; - elproto.hide = function () { - !this.removed && (this.node.style.display = "none"); - return this; - }; - elproto.show = function () { - !this.removed && (this.node.style.display = E); - return this; - }; - elproto._getBBox = function () { - if (this.removed) { - return {}; - } - if (this.type == "text") { - return { - x: this.X + (this.bbx || 0) - this.W / 2, - y: this.Y - this.H, - width: this.W, - height: this.H - }; - } else { - return pathDimensions(this.attrs.path); - } - }; - elproto.remove = function () { - if (this.removed) { - return; - } - this.paper.__set__ && this.paper.__set__.exclude(this); - R.eve.unbind("*.*." + this.id); - R._tear(this, this.paper); - this.node.parentNode.removeChild(this.node); - this.shape && this.shape.parentNode.removeChild(this.shape); - for (var i in this) { - delete this[i]; - } - this.removed = true; - }; - elproto.attr = function (name, value) { - if (this.removed) { - return this; - } - if (name == null) { - var res = {}; - for (var a in this.attrs) if (this.attrs[has](a)) { - res[a] = this.attrs[a]; - } - res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; - res.transform = this._.transform; - return res; - } - if (value == null && R.is(name, "string")) { - if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) { - return this.attrs.gradient; - } - var names = name.split(separator), - out = {}; - for (var i = 0, ii = names.length; i < ii; i++) { - name = names[i]; - if (name in this.attrs) { - out[name] = this.attrs[name]; - } else if (R.is(this.paper.customAttributes[name], "function")) { - out[name] = this.paper.customAttributes[name].def; - } else { - out[name] = R._availableAttrs[name]; - } - } - return ii - 1 ? out : out[names[0]]; - } - if (this.attrs && value == null && R.is(name, "array")) { - out = {}; - for (i = 0, ii = name.length; i < ii; i++) { - out[name[i]] = this.attr(name[i]); - } - return out; - } - var params; - if (value != null) { - params = {}; - params[name] = value; - } - value == null && R.is(name, "object") && (params = name); - for (var key in params) { - eve("attr." + key + "." + this.id, this, params[key]); - } - if (params) { - for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { - var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); - this.attrs[key] = params[key]; - for (var subkey in par) if (par[has](subkey)) { - params[subkey] = par[subkey]; - } - } - // this.paper.canvas.style.display = "none"; - if (params.text && this.type == "text") { - this.textpath.string = params.text; - } - setFillAndStroke(this, params); - // this.paper.canvas.style.display = E; - } - return this; - }; - elproto.toFront = function () { - !this.removed && this.node.parentNode.appendChild(this.node); - this.paper && this.paper.top != this && R._tofront(this, this.paper); - return this; - }; - elproto.toBack = function () { - if (this.removed) { - return this; - } - if (this.node.parentNode.firstChild != this.node) { - this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); - R._toback(this, this.paper); - } - return this; - }; - elproto.insertAfter = function (element) { - if (this.removed) { - return this; - } - if (element.constructor == R.st.constructor) { - element = element[element.length - 1]; - } - if (element.node.nextSibling) { - element.node.parentNode.insertBefore(this.node, element.node.nextSibling); - } else { - element.node.parentNode.appendChild(this.node); - } - R._insertafter(this, element, this.paper); - return this; - }; - elproto.insertBefore = function (element) { - if (this.removed) { - return this; - } - if (element.constructor == R.st.constructor) { - element = element[0]; - } - element.node.parentNode.insertBefore(this.node, element.node); - R._insertbefore(this, element, this.paper); - return this; - }; - elproto.blur = function (size) { - var s = this.node.runtimeStyle, - f = s.filter; - f = f.replace(blurregexp, E); - if (+size !== 0) { - this.attrs.blur = size; - s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")"; - s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5)); - } else { - s.filter = f; - s.margin = 0; - delete this.attrs.blur; - } - }; - - R._engine.path = function (pathString, vml) { - var el = createNode("shape"); - el.style.cssText = cssDot; - el.coordsize = zoom + S + zoom; - el.coordorigin = vml.coordorigin; - var p = new Element(el, vml), - attr = {fill: "none", stroke: "#000"}; - pathString && (attr.path = pathString); - p.type = "path"; - p.path = []; - p.Path = E; - setFillAndStroke(p, attr); - vml.canvas.appendChild(el); - var skew = createNode("skew"); - skew.on = true; - el.appendChild(skew); - p.skew = skew; - p.transform(E); - return p; - }; - R._engine.rect = function (vml, x, y, w, h, r) { - var path = R._rectPath(x, y, w, h, r), - res = vml.path(path), - a = res.attrs; - res.X = a.x = x; - res.Y = a.y = y; - res.W = a.width = w; - res.H = a.height = h; - a.r = r; - a.path = path; - res.type = "rect"; - return res; - }; - R._engine.ellipse = function (vml, x, y, rx, ry) { - var res = vml.path(), - a = res.attrs; - res.X = x - rx; - res.Y = y - ry; - res.W = rx * 2; - res.H = ry * 2; - res.type = "ellipse"; - setFillAndStroke(res, { - cx: x, - cy: y, - rx: rx, - ry: ry - }); - return res; - }; - R._engine.circle = function (vml, x, y, r) { - var res = vml.path(), - a = res.attrs; - res.X = x - r; - res.Y = y - r; - res.W = res.H = r * 2; - res.type = "circle"; - setFillAndStroke(res, { - cx: x, - cy: y, - r: r - }); - return res; - }; - R._engine.image = function (vml, src, x, y, w, h) { - var path = R._rectPath(x, y, w, h), - res = vml.path(path).attr({stroke: "none"}), - a = res.attrs, - node = res.node, - fill = node.getElementsByTagName(fillString)[0]; - a.src = src; - res.X = a.x = x; - res.Y = a.y = y; - res.W = a.width = w; - res.H = a.height = h; - a.path = path; - res.type = "image"; - fill.parentNode == node && node.removeChild(fill); - fill.rotate = true; - fill.src = src; - fill.type = "tile"; - res._.fillpos = [x, y]; - res._.fillsize = [w, h]; - node.appendChild(fill); - setCoords(res, 1, 1, 0, 0, 0); - return res; - }; - R._engine.text = function (vml, x, y, text) { - var el = createNode("shape"), - path = createNode("path"), - o = createNode("textpath"); - x = x || 0; - y = y || 0; - text = text || ""; - path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1); - path.textpathok = true; - o.string = Str(text); - o.on = true; - el.style.cssText = cssDot; - el.coordsize = zoom + S + zoom; - el.coordorigin = "0 0"; - var p = new Element(el, vml), - attr = { - fill: "#000", - stroke: "none", - font: R._availableAttrs.font, - text: text - }; - p.shape = el; - p.path = path; - p.textpath = o; - p.type = "text"; - p.attrs.text = Str(text); - p.attrs.x = x; - p.attrs.y = y; - p.attrs.w = 1; - p.attrs.h = 1; - setFillAndStroke(p, attr); - el.appendChild(o); - el.appendChild(path); - vml.canvas.appendChild(el); - var skew = createNode("skew"); - skew.on = true; - el.appendChild(skew); - p.skew = skew; - p.transform(E); - return p; - }; - R._engine.setSize = function (width, height) { - var cs = this.canvas.style; - this.width = width; - this.height = height; - width == +width && (width += "px"); - height == +height && (height += "px"); - cs.width = width; - cs.height = height; - cs.clip = "rect(0 " + width + " " + height + " 0)"; - if (this._viewBox) { - setViewBox.apply(this, this._viewBox); - } - return this; - }; - R._engine.setViewBox = function (x, y, w, h, fit) { - R.eve("setViewBox", this, this._viewBox, [x, y, w, h, fit]); - var width = this.width, - height = this.height, - size = 1 / mmax(w / width, h / height), - H, W; - if (fit) { - H = height / h; - W = width / w; - if (w * H < width) { - x -= (width - w * H) / 2 / H; - } - if (h * W < height) { - y -= (height - h * W) / 2 / W; - } - } - this._viewBox = [x, y, w, h, !!fit]; - this._viewBoxShift = { - dx: -x, - dy: -y, - scale: size - }; - this.forEach(function (el) { - el.transform("..."); - }); - return this; - }; - var createNode, - initWin = function (win) { - var doc = win.document; - doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); - try { - !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); - createNode = function (tagName) { - return doc.createElement(''); - }; - } catch (e) { - createNode = function (tagName) { - return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'); - }; - } - }; - initWin(R._g.win); - R._engine.create = function () { - var con = R._getContainer.apply(0, arguments), - container = con.container, - height = con.height, - s, - width = con.width, - x = con.x, - y = con.y; - if (!container) { - throw new Error("VML container not found."); - } - var res = new R._Paper, - c = res.canvas = R._g.doc.createElement("div"), - cs = c.style; - x = x || 0; - y = y || 0; - width = width || 512; - height = height || 342; - res.width = width; - res.height = height; - width == +width && (width += "px"); - height == +height && (height += "px"); - res.coordsize = zoom * 1e3 + S + zoom * 1e3; - res.coordorigin = "0 0"; - res.span = R._g.doc.createElement("span"); - res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;"; - c.appendChild(res.span); - cs.cssText = R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", width, height); - if (container == 1) { - R._g.doc.body.appendChild(c); - cs.left = x + "px"; - cs.top = y + "px"; - cs.position = "absolute"; - } else { - if (container.firstChild) { - container.insertBefore(c, container.firstChild); - } else { - container.appendChild(c); - } - } - // plugins.call(res, res, R.fn); - res.renderfix = function () {}; - return res; - }; - R.prototype.clear = function () { - R.eve("clear", this); - this.canvas.innerHTML = E; - this.span = R._g.doc.createElement("span"); - this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; - this.canvas.appendChild(this.span); - this.bottom = this.top = null; - }; - R.prototype.remove = function () { - R.eve("remove", this); - this.canvas.parentNode.removeChild(this.canvas); - for (var i in this) { - this[i] = removed(i); - } - return true; - }; - - var setproto = R.st; - for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { - setproto[method] = (function (methodname) { - return function () { - var arg = arguments; - return this.forEach(function (el) { - el[methodname].apply(el, arg); - }); - }; - })(method); - } -}(window.Raphael); \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/js/libs/tracemanager.js --- a/src/js/libs/tracemanager.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/js/libs/tracemanager.js Thu May 03 17:52:52 2012 +0200 @@ -1,512 +1,540 @@ -/* - * Modelled Trace API - */ -IriSP.TraceManager = function($) { - // If there are more than MAX_FAILURE_COUNT synchronisation - // failures, then disable synchronisation - MAX_FAILURE_COUNT = 20; - - // If there are more than MAX_BUFFER_SIZE obsels in the buffer, - // then "compress" them as a single "ktbsFullBuffer" - MAX_BUFFER_SIZE = 500; - - var BufferedService_prototype = { - /* - * Buffered service for traces - */ - // url: "", - // buffer: [], - // isReady: false, - // timer: null, - // failureCount: 0, - - /* Flush buffer */ - flush: function() { - // FIXME: add mutex on this.buffer - if (! this.isReady) - { - if (window.console) window.console.log("Sync service not ready"); - } else if (this.failureCount > MAX_FAILURE_COUNT) - { - // Disable synchronisation - this.set_sync_mode('none'); - } else if (this.buffer.length) { - var temp = this.buffer; - this.buffer = []; - - if (this.mode == 'GET') - { - // GET mode: do some data mangline. We mark the - // "compressed" nature of the generated JSON by - // prefixing it with c - var data = 'c' + JSON.stringify(temp.map(function (o) { return o.toCompactJSON(); })); - // Swap " (very frequent, which will be - // serialized into %22) and ; (rather rare), this - // saves some bytes - data = data.replace(/[;"]/g, function(s){ return s == ';' ? '"' : ';'; }).replace(/#/g, '%23'); - // FIXME: check data length (< 2K is safe) - var request=$('').error( function() { this.failureCount += 1; }) - .load( function() { this.failureCount = 0; }) - .attr('src', this.url + 'trace/?data=' + data); - } - else - { - $.ajax({ url: this.url + 'trace/', - type: 'POST', - contentType: 'application/json', - data: JSON.stringify(temp.map(function (o) { return o.toJSON(); })), - processData: false, - // Type of the returned data. - dataType: "html", - error: function(jqXHR, textStatus, errorThrown) { - if (window.console) window.console.log("Error when sending buffer:", textStatus); - this.failureCount += 1; - }, - success: function(data, textStatus, jqXHR) { - // Reset failureCount to 0 as soon as there is 1 valid answer - this.failureCount = 0; - } - }); - } - } - }, - - /* Sync mode: delayed, sync (immediate sync), none (no - * synchronisation with server, the trace has to be explicitly saved - * if needed */ - set_sync_mode: function(mode) { - this.sync_mode = mode; - if (! this.isReady && mode !== "none") - this.init(); - if (mode == 'delayed') { - this.start_timer(); - } else { - this.stop_timer(); - } - }, - - /* Enqueue an obsel */ - enqueue: function(obsel) { - if (this.buffer.length > MAX_BUFFER_SIZE) - { - obsel = new Obsel('ktbsFullBuffer', this.buffer[0].begin, - this.buffer[this.buffer.length - 1].end, this.buffer[0].subject); - obsel.trace = this.buffer[0].trace; - this.buffer = []; - } - this.buffer.push(obsel); - if (this.sync_mode === 'sync') { - // Immediate sync of the obsel. - this.flush(); - } - }, - - start_timer: function() { - var self = this; - if (this.timer === null) { - this.timer = window.setInterval(function() { - self.flush(); - }, this.timeOut); - } - }, - - stop_timer: function() { - if (this.timer !== null) { - window.clearInterval(this.timer); - this.timer = null; - } - }, - - /* - * Initialize the sync service - */ - init: function() { - var self = this; - if (this.isReady) - /* Already initialized */ - return; - if (this.mode == 'GET') - { - var request=$('').attr('src', this.url + 'login?userinfo={"name":"ktbs4js"}'); - // Do not wait for the return, assume it is - // initialized. This assumption will not work anymore - // if login returns some necessary information - this.isReady = true; - } - else - { - $.ajax({ url: this.url + 'login', - type: 'POST', - data: 'userinfo={"name":"ktbs4js"}', - success: function(data, textStatus, jqXHR) { - self.isReady = true; - if (self.buffer.length) { - self.flush(); - } - } - }); - } - } - }; - var BufferedService = function(url, mode) { - this.url = url; - this.buffer = []; - this.isReady = false; - this.timer = null; - this.failureCount = 0; - // sync_mode is either "none", "sync" or "buffered" - this.sync_mode = "none"; - /* mode can be either POST or GET */ - if (mode == 'POST' || mode == 'GET') - this.mode = mode; - else - this.mode = 'POST'; - /* Flush buffer every timeOut ms if the sync_mode is delayed */ - this.timeOut = 2000; - }; - BufferedService.prototype = BufferedService_prototype; - - var Trace_prototype = { - /* FIXME: We could/should use a sorted list such as - http://closure-library.googlecode.com/svn/docs/class_goog_structs_AvlTree.html - to speed up queries based on time */ - obsels: [], - /* Trace URI */ - uri: "", - default_subject: "", - /* baseuri is used as the base URI to resolve relative - * attribute-type names in obsels. Strictly speaking, this - * should rather be expressed as a reference to model, or - * more generically, as a qname/URI dict */ - baseuri: "", - /* Mapping of obsel type or property name to a compact - * representation (shorthands). - */ - shorthands: null, - syncservice: null, - - /* Define the trace URI */ - set_uri: function(uri) { - this.uri = uri; - }, - - /* Sync mode: delayed, sync (immediate sync), none (no - * synchronisation with server, the trace has to be explicitly saved - * if needed */ - set_sync_mode: function(mode) { - if (this.syncservice !== null) { - this.syncservice.set_sync_mode(mode); - } - }, - - /* - * Return a list of the obsels of this trace matching the parameters - */ - list_obsels: function(_begin, _end, _reverse) { - var res; - if (typeof _begin !== 'undefined' || typeof _end !== 'undefined') { - /* - * Not optimized yet. - */ - res = []; - var l = this.obsels.length; - for (var i = 0; i < l; i++) { - var o = this.obsels[i]; - if ((typeof _begin !== 'undefined' && o.begin > _begin) && (typeof _end !== 'undefined' && o.end < _end)) { - res.push(o); - } - } - } - - if (typeof _reverse !== 'undefined') { - if (res !== undefined) { - /* Should reverse the whole list. Make a copy. */ - res = this.obsels.slice(0); - } - res.sort(function(a, b) { return b.begin - a.begin; }); - return res; - } - - if (res === undefined) { - res = this.obsels; - } - return res; - - }, - - /* - * Return the obsel of this trace identified by the URI, or undefined - */ - get_obsel: function(id) { - for (var i = 0; i < this.obsels.length; i++) { - /* FIXME: should check against variations of id/uri, take this.baseuri into account */ - if (this.obsels[i].uri === id) { - return this.obsels[i]; - } - } - return undefined; - }, - - set_default_subject: function(subject) { - this.default_subject = subject; - }, - - get_default_subject: function() { - return this.default_subject; - }, - - /* (type:ObselType, begin:int, end:int?, subject:str?, attributes:[AttributeType=>any]?) */ - /* Create a new obsel and add it to the trace */ - create_obsel: function(type, begin, end, subject, _attributes) { - var o = new Obsel(type, begin, end, subject); - if (typeof _attributes !== 'undefined') { - o.attributes = _attributes; - } - o.trace = this; - this.obsels.push(o); - if (this.syncservice !== null) - this.syncservice.enqueue(o); - }, - - /* Helper methods */ - - /* Create a new obsel with the given attributes */ - trace: function(type, _attributes, _begin, _end, _subject) { - var t = (new Date()).getTime(); - if (typeof begin === 'undefined') { - _begin = t; - } - if (typeof end === 'undefined') { - _end = _begin; - } - if (typeof subject === 'undefined') { - _subject = this.default_subject; - } - if (typeof _attributes === 'undefined') { - _attributes = {}; - } - return this.create_obsel(type, _begin, _end, _subject, _attributes); - } - }; - - var Trace = function(uri, requestmode) { - /* FIXME: We could/should use a sorted list such as - http://closure-library.googlecode.com/svn/docs/class_goog_structs_AvlTree.html - to speed up queries based on time */ - this.obsels = []; - /* Trace URI */ - if (uri === undefined) - uri = ""; - this.uri = uri; - this.sync_mode = "none"; - this.default_subject = ""; - this.shorthands = {}; - /* baseuri is used a the base URI to resolve relative attribute names in obsels */ - this.baseuri = ""; - - this.syncservice = new BufferedService(uri, requestmode); - $(window).unload( function () { - if (this.syncservice && this.sync_mode !== 'none') { - this.syncservice.flush(); - this.syncservice.stop_timer(); - } - }); - }; - Trace.prototype = Trace_prototype; - - var Obsel_prototype = { - /* The following attributes are here for documentation - * purposes. They MUST be defined in the constructor - * function. */ - trace: undefined, - type: undefined, - begin: undefined, - end: undefined, - subject: undefined, - /* Dictionary indexed by ObselType URIs */ - attributes: {}, - - /* Method definitions */ - get_trace: function() { - return this.trace; - }, - - get_obsel_type: function() { - return this.type; - }, - get_begin: function() { - return this.begin; - }, - get_end: function() { - return this.end; - }, - get_subject: function() { - return this.subject; - }, - - list_attribute_types: function() { - var result = []; - for (var prop in this.attributes) { - if (this.hasOwnProperty(prop)) - result.push(prop); - } - /* FIXME: we return URIs here instead of AttributeType elements */ - return result; - }, - - list_relation_types: function() { - /* FIXME: not implemented yet */ - }, - - list_related_obsels: function (rt) { - /* FIXME: not implemented yet */ - }, - list_inverse_relation_types: function () { - /* FIXME: not implemented yet */ - }, - list_relating_obsels: function (rt) { - /* FIXME: not implemented yet */ - }, - /* - * Return the value of the given attribute type for this obsel - */ - get_attribute_value: function(at) { - if (typeof at === "string") - /* It is a URI */ - return this.attributes[at]; - else - /* FIXME: check that at is instance of AttributeType */ - return this.attributes[at.uri]; - }, - - - /* obsel modification (trace amendment) */ - - set_attribute_value: function(at, value) { - if (typeof at === "string") - /* It is a URI */ - this.attributes[at] = value; - /* FIXME: check that at is instance of AttributeType */ - else - this.attributes[at.uri] = value; - }, - - del_attribute_value: function(at) { - if (typeof at === "string") - /* It is a URI */ - delete this.attributes[at]; - /* FIXME: check that at is instance of AttributeType */ - else - delete this.attributes[at.uri]; - }, - - add_related_obsel: function(rt, value) { - /* FIXME: not implemented yet */ - }, - - del_related_obsel: function(rt, value) { - /* FIXME: not implemented yet */ - }, - - /* - * Return a JSON representation of the obsel - */ - toJSON: function() { - var r = { - "@id": this.id, - "@type": this.type, - "begin": this.begin, - "end": this.end, - "subject": this.subject - }; - for (var prop in this.attributes) { - if (this.hasOwnProperty(prop)) - r[prop] = this.attributes[prop]; - } - return r; - }, - - /* - * Return a compact JSON representation of the obsel. - * Use predefined + custom shorthands for types/properties - */ - toCompactJSON: function() { - var r = { - "@i": this.id, - "@t": (this.trace.shorthands.hasOwnProperty(this.type) ? this.trace.shorthands[this.type] : this.type), - "@b": this.begin, - "@s": this.subject - }; - // Store duration (to save some bytes) and only if it is non-null - if (this.begin !== this.end) - r["@d"] = this.end - this.begin; - - for (var prop in this.attributes) { - if (this.hasOwnProperty(prop)) - { - var v = this.attributes[prop]; - r[prop] = this.trace.shorthands.hasOwnProperty(v) ? this.trace.shorthands[v] : v; - } - } - return r; - }, - - toJSONstring: function() { - return JSON.stringify(this.toJSON()); - } - }; - - var Obsel = function(type, begin, end, subject, attributes) { - this.trace = undefined; - this.uri = ""; - this.id = ""; - this.type = type; - this.begin = begin; - this.end = end; - this.subject = subject; - /* Is the obsel synched with the server ? */ - this.sync_status = false; - /* Dictionary indexed by ObselType URIs */ - this.attributes = {}; - }; - Obsel.prototype = Obsel_prototype; - - var TraceManager_prototype = { - traces: [], - /* - * Return the trace with id name - * If it was not registered, return undefined. - */ - get_trace: function(name) { - return this.traces[name]; - }, - - /* - * Explicitly create and initialize a new trace with the given name. - * The optional uri parameter allows to initialize the trace URI. - * - * If another existed with the same name before, then it is replaced by a new one. - */ - init_trace: function(name, params) - { - if (window.console) window.console.log("init_trace", params); - url = params.url ? params.url : ""; - requestmode = params.requestmode ? params.requestmode : "POST"; - syncmode = params.syncmode ? params.syncmode : "none"; - default_subject = params.default_subject ? params.default_subject : "default"; - var t = new Trace(url, requestmode); - t.set_sync_mode(syncmode); - t.set_default_subject(default_subject); - this.traces[name] = t; - return t; - } - }; - - var TraceManager = function() { - this.traces = {}; - }; - TraceManager.prototype = TraceManager_prototype; - - var tracemanager = new TraceManager(); - return tracemanager; - }; +/* + * Modelled Trace API + * + * This file is part of ktbs4js. + * + * ktbs4js is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * ktbs4js is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with ktbs4js. If not, see . + * + */ +/* FIXME: properly use require.js feature. This will do for debugging in the meantime */ +window.tracemanager = (function($) { + // If there are more than MAX_FAILURE_COUNT synchronisation + // failures, then disable synchronisation + MAX_FAILURE_COUNT = 20; + + // If there are more than MAX_BUFFER_SIZE obsels in the buffer, + // then "compress" them as a single "ktbsFullBuffer" + MAX_BUFFER_SIZE = 500; + + var BufferedService_prototype = { + /* + * Buffered service for traces + */ + // url: "", + // buffer: [], + // isReady: false, + // timer: null, + // failureCount: 0, + + /* Flush buffer */ + flush: function() { + // FIXME: add mutex on this.buffer + if (! this.isReady) + { + if (window.console) window.console.log("Sync service not ready"); + } else if (this.failureCount > MAX_FAILURE_COUNT) + { + // Disable synchronisation + this.set_sync_mode('none'); + } else if (this.buffer.length) { + var temp = this.buffer; + this.buffer = []; + + if (this.mode == 'GET') + { + // GET mode: do some data mangline. We mark the + // "compressed" nature of the generated JSON by + // prefixing it with c + var data = 'c' + JSON.stringify(temp.map(function (o) { return o.toCompactJSON(); })); + // Swap " (very frequent, which will be + // serialized into %22) and ; (rather rare), this + // saves some bytes + data = data.replace(/[;"#]/g, function(s){ return s == ';' ? '"' : ( s == '"' ? ';' : '%23'); }); + // FIXME: check data length (< 2K is safe) + var request=$('').error( function() { this.failureCount += 1; }) + .load( function() { this.failureCount = 0; }) + .attr('src', this.url + 'trace/?data=' + data); + } + else + { + $.ajax({ url: this.url + 'trace/', + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(temp.map(function (o) { return o.toJSON(); })), + processData: false, + // Type of the returned data. + dataType: "html", + error: function(jqXHR, textStatus, errorThrown) { + if (window.console) window.console.log("Error when sending buffer:", textStatus); + this.failureCount += 1; + }, + success: function(data, textStatus, jqXHR) { + // Reset failureCount to 0 as soon as there is 1 valid answer + this.failureCount = 0; + } + }); + } + } + }, + + /* Sync mode: delayed, sync (immediate sync), none (no + * synchronisation with server, the trace has to be explicitly saved + * if needed */ + set_sync_mode: function(mode, default_subject) { + this.sync_mode = mode; + if (! this.isReady && mode !== "none") + this.init(default_subject); + if (mode == 'delayed') { + this.start_timer(); + } else { + this.stop_timer(); + } + }, + + /* Enqueue an obsel */ + enqueue: function(obsel) { + if (this.buffer.length > MAX_BUFFER_SIZE) + { + obsel = new Obsel('ktbsFullBuffer', this.buffer[0].begin, + this.buffer[this.buffer.length - 1].end, this.buffer[0].subject); + obsel.trace = this.buffer[0].trace; + this.buffer = []; + } + this.buffer.push(obsel); + if (this.sync_mode === 'sync') { + // Immediate sync of the obsel. + this.flush(); + } + }, + + start_timer: function() { + var self = this; + if (this.timer === null) { + this.timer = window.setInterval(function() { + self.flush(); + }, this.timeOut); + } + }, + + stop_timer: function() { + if (this.timer !== null) { + window.clearInterval(this.timer); + this.timer = null; + } + }, + + /* + * Initialize the sync service + */ + init: function(default_subject) { + var self = this; + if (this.isReady) + /* Already initialized */ + return; + if (typeof default_subject === 'undefined') + default_subject = 'anonymous'; + if (this.mode == 'GET') + { + var request=$('').attr('src', this.url + 'login?userinfo={"default_subject": "' + default_subject + '"}'); + // Do not wait for the return, assume it is + // initialized. This assumption will not work anymore + // if login returns some necessary information + this.isReady = true; + } + else + { + $.ajax({ url: this.url + 'login', + type: 'POST', + data: 'userinfo={"default_subject":"' + default_subject + '"}', + success: function(data, textStatus, jqXHR) { + self.isReady = true; + if (self.buffer.length) { + self.flush(); + } + } + }); + } + } + }; + var BufferedService = function(url, mode) { + this.url = url; + this.buffer = []; + this.isReady = false; + this.timer = null; + this.failureCount = 0; + // sync_mode is either "none", "sync" or "buffered" + this.sync_mode = "none"; + /* mode can be either POST or GET */ + if (mode == 'POST' || mode == 'GET') + this.mode = mode; + else + this.mode = 'POST'; + /* Flush buffer every timeOut ms if the sync_mode is delayed */ + this.timeOut = 2000; + }; + BufferedService.prototype = BufferedService_prototype; + + var Trace_prototype = { + /* FIXME: We could/should use a sorted list such as + http://closure-library.googlecode.com/svn/docs/class_goog_structs_AvlTree.html + to speed up queries based on time */ + obsels: [], + /* Trace URI */ + uri: "", + default_subject: "", + /* baseuri is used as the base URI to resolve relative + * attribute-type names in obsels. Strictly speaking, this + * should rather be expressed as a reference to model, or + * more generically, as a qname/URI dict */ + baseuri: "", + /* Mapping of obsel type or property name to a compact + * representation (shorthands). + */ + shorthands: null, + syncservice: null, + + /* Define the trace URI */ + set_uri: function(uri) { + this.uri = uri; + }, + + /* Sync mode: delayed, sync (immediate sync), none (no + * synchronisation with server, the trace has to be explicitly saved + * if needed */ + set_sync_mode: function(mode) { + if (this.syncservice !== null) { + this.syncservice.set_sync_mode(mode, this.default_subject); + } + }, + + /* + * Return a list of the obsels of this trace matching the parameters + */ + list_obsels: function(_begin, _end, _reverse) { + var res; + if (typeof _begin !== 'undefined' || typeof _end !== 'undefined') { + /* + * Not optimized yet. + */ + res = []; + var l = this.obsels.length; + for (var i = 0; i < l; i++) { + var o = this.obsels[i]; + if ((typeof _begin !== 'undefined' && o.begin > _begin) && (typeof _end !== 'undefined' && o.end < _end)) { + res.push(o); + } + } + } + + if (typeof _reverse !== 'undefined') { + if (res !== undefined) { + /* Should reverse the whole list. Make a copy. */ + res = this.obsels.slice(0); + } + res.sort(function(a, b) { return b.begin - a.begin; }); + return res; + } + + if (res === undefined) { + res = this.obsels; + } + return res; + + }, + + /* + * Return the obsel of this trace identified by the URI, or undefined + */ + get_obsel: function(id) { + for (var i = 0; i < this.obsels.length; i++) { + /* FIXME: should check against variations of id/uri, take this.baseuri into account */ + if (this.obsels[i].uri === id) { + return this.obsels[i]; + } + } + return undefined; + }, + + set_default_subject: function(subject) { + // FIXME: if we call this method after the sync_service + // init method, then the default_subject will not be + // consistent anymore. Maybe we should then call init() again? + this.default_subject = subject; + }, + + get_default_subject: function() { + return this.default_subject; + }, + + /* (type:ObselType, begin:int, end:int?, subject:str?, attributes:[AttributeType=>any]?) */ + /* Create a new obsel and add it to the trace */ + create_obsel: function(type, begin, end, subject, _attributes) { + var o = new Obsel(type, begin, end, subject); + if (typeof _attributes !== 'undefined') { + o.attributes = _attributes; + } + o.trace = this; + this.obsels.push(o); + if (this.syncservice !== null) + this.syncservice.enqueue(o); + }, + + /* Helper methods */ + + /* Create a new obsel with the given attributes */ + trace: function(type, _attributes, _begin, _end, _subject) { + var t = (new Date()).getTime(); + if (typeof begin === 'undefined') { + _begin = t; + } + if (typeof end === 'undefined') { + _end = _begin; + } + if (typeof subject === 'undefined') { + _subject = this.default_subject; + } + if (typeof _attributes === 'undefined') { + _attributes = {}; + } + return this.create_obsel(type, _begin, _end, _subject, _attributes); + } + }; + + var Trace = function(uri, requestmode) { + /* FIXME: We could/should use a sorted list such as + http://closure-library.googlecode.com/svn/docs/class_goog_structs_AvlTree.html + to speed up queries based on time */ + this.obsels = []; + /* Trace URI */ + if (uri === undefined) + uri = ""; + this.uri = uri; + this.sync_mode = "none"; + this.default_subject = ""; + this.shorthands = {}; + /* baseuri is used a the base URI to resolve relative attribute names in obsels */ + this.baseuri = ""; + + this.syncservice = new BufferedService(uri, requestmode); + $(window).unload( function () { + if (this.syncservice && this.sync_mode !== 'none') { + this.syncservice.flush(); + this.syncservice.stop_timer(); + } + }); + }; + Trace.prototype = Trace_prototype; + + var Obsel_prototype = { + /* The following attributes are here for documentation + * purposes. They MUST be defined in the constructor + * function. */ + trace: undefined, + type: undefined, + begin: undefined, + end: undefined, + subject: undefined, + /* Dictionary indexed by ObselType URIs */ + attributes: {}, + + /* Method definitions */ + get_trace: function() { + return this.trace; + }, + + get_obsel_type: function() { + return this.type; + }, + get_begin: function() { + return this.begin; + }, + get_end: function() { + return this.end; + }, + get_subject: function() { + return this.subject; + }, + + list_attribute_types: function() { + var result = []; + for (var prop in this.attributes) { + if (this.attributes.hasOwnProperty(prop)) + result.push(prop); + } + /* FIXME: we return URIs here instead of AttributeType elements */ + return result; + }, + + list_relation_types: function() { + /* FIXME: not implemented yet */ + }, + + list_related_obsels: function (rt) { + /* FIXME: not implemented yet */ + }, + list_inverse_relation_types: function () { + /* FIXME: not implemented yet */ + }, + list_relating_obsels: function (rt) { + /* FIXME: not implemented yet */ + }, + /* + * Return the value of the given attribute type for this obsel + */ + get_attribute_value: function(at) { + if (typeof at === "string") + /* It is a URI */ + return this.attributes[at]; + else + /* FIXME: check that at is instance of AttributeType */ + return this.attributes[at.uri]; + }, + + + /* obsel modification (trace amendment) */ + + set_attribute_value: function(at, value) { + if (typeof at === "string") + /* It is a URI */ + this.attributes[at] = value; + /* FIXME: check that at is instance of AttributeType */ + else + this.attributes[at.uri] = value; + }, + + del_attribute_value: function(at) { + if (typeof at === "string") + /* It is a URI */ + delete this.attributes[at]; + /* FIXME: check that at is instance of AttributeType */ + else + delete this.attributes[at.uri]; + }, + + add_related_obsel: function(rt, value) { + /* FIXME: not implemented yet */ + }, + + del_related_obsel: function(rt, value) { + /* FIXME: not implemented yet */ + }, + + /* + * Return a JSON representation of the obsel + */ + toJSON: function() { + var r = { + "@id": this.id, + "@type": this.type, + "begin": this.begin, + "end": this.end, + "subject": this.subject + }; + for (var prop in this.attributes) { + if (this.attributes.hasOwnProperty(prop)) + r[prop] = this.attributes[prop]; + } + return r; + }, + + /* + * Return a compact JSON representation of the obsel. + * Use predefined + custom shorthands for types/properties + */ + toCompactJSON: function() { + var r = { + "@t": (this.trace.shorthands.hasOwnProperty(this.type) ? this.trace.shorthands[this.type] : this.type), + "@b": this.begin, + }; + // Transmit subject only if different from default_subject + if (this.subject !== this.trace.default_subject) + r["@s"] = this.subject; + + // Store duration (to save some bytes) and only if it is non-null + if (this.begin !== this.end) + r["@d"] = this.end - this.begin; + + // Store id only if != "" + if (this.id !== "") + r["@i"] = this.id; + + for (var prop in this.attributes) { + if (this.attributes.hasOwnProperty(prop)) + { + var v = this.attributes[prop]; + r[prop] = this.trace.shorthands.hasOwnProperty(v) ? this.trace.shorthands[v] : v; + } + } + return r; + }, + + toJSONstring: function() { + return JSON.stringify(this.toJSON()); + } + }; + + var Obsel = function(type, begin, end, subject, attributes) { + this.trace = undefined; + this.uri = ""; + this.id = ""; + this.type = type; + this.begin = begin; + this.end = end; + this.subject = subject; + /* Is the obsel synched with the server ? */ + this.sync_status = false; + /* Dictionary indexed by ObselType URIs */ + this.attributes = {}; + }; + Obsel.prototype = Obsel_prototype; + + var TraceManager_prototype = { + traces: [], + /* + * Return the trace with id name + * If it was not registered, return undefined. + */ + get_trace: function(name) { + return this.traces[name]; + }, + + /* + * Explicitly create and initialize a new trace with the given name. + * The optional uri parameter allows to initialize the trace URI. + * + * If another existed with the same name before, then it is replaced by a new one. + */ + init_trace: function(name, params) + { + if (window.console) window.console.log("init_trace", params); + url = params.url ? params.url : ""; + requestmode = params.requestmode ? params.requestmode : "POST"; + syncmode = params.syncmode ? params.syncmode : "none"; + default_subject = params.default_subject ? params.default_subject : "default"; + var t = new Trace(url, requestmode); + t.set_default_subject(default_subject); + t.set_sync_mode(syncmode); + this.traces[name] = t; + return t; + } + }; + + var TraceManager = function() { + this.traces = {}; + }; + TraceManager.prototype = TraceManager_prototype; + + var tracemanager = new TraceManager(); + return tracemanager; + })(jQuery); diff -r f11b234497f7 -r 61c384dda19e src/js/libs/underscore-min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/js/libs/underscore-min.js Thu May 03 17:52:52 2012 +0200 @@ -0,0 +1,30 @@ +// Underscore.js 1.2.3 +// (c) 2009-2011 Jeremy Ashkenas, DocumentCloud Inc. +// Underscore is freely distributable under the MIT license. +// Portions of Underscore are inspired or borrowed from Prototype, +// Oliver Steele's Functional, and John Resig's Micro-Templating. +// For all details and documentation: +// http://documentcloud.github.com/underscore +(function(){function r(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== +c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&r(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(m.call(a,h)&&(f++,!(g=m.call(c,h)&&r(a[h],c[h],d))))break;if(g){for(h in c)if(m.call(c, +h)&&!f--)break;g=!f}}d.pop();return g}var s=this,F=s._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,G=k.concat,H=k.unshift,l=p.toString,m=p.hasOwnProperty,v=k.forEach,w=k.map,x=k.reduce,y=k.reduceRight,z=k.filter,A=k.every,B=k.some,q=k.indexOf,C=k.lastIndexOf,p=Array.isArray,I=Object.keys,t=Function.prototype.bind,b=function(a){return new n(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else typeof define==="function"&& +define.amd?define("underscore",function(){return b}):s._=b;b.VERSION="1.2.3";var j=b.each=b.forEach=function(a,c,b){if(a!=null)if(v&&a.forEach===v)a.forEach(c,b);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a==null&&(a=[]);if(x&&a.reduce===x)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(y&&a.reduceRight===y)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g, +c,d,e):b.reduce(g,c)};b.find=b.detect=function(a,c,b){var e;D(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(z&&a.filter===z)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(A&&a.every===A)return a.every(c, +b);j(a,function(a,g,h){if(!(e=e&&c.call(b,a,g,h)))return o});return e};var D=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(B&&a.some===B)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return q&&a.indexOf===q?a.indexOf(c)!=-1:b=D(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(c.call?c||a:a[c]).apply(a, +d)})};b.pluck=function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex= +function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after= +function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=I||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)m.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){j(i.call(arguments, +1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return r(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(m.call(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a=== +Object(a)};b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!m.call(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)== +"[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.noConflict=function(){s._=F;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),function(c){J(c, +b[c]=a[c])})};var K=0;b.uniqueId=function(a){var b=K++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape,function(a,b){return"',_.escape("+b.replace(/\\'/g,"'")+"),'"}).replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g, +"'")+",'"}).replace(d.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};var n=function(a){this._wrapped=a};b.prototype=n.prototype;var u=function(a,c){return c?b(a).chain():a},J=function(a,c){n.prototype[a]=function(){var a=i.call(arguments);H.call(a,this._wrapped);return u(c.apply(b, +a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];n.prototype[a]=function(){b.apply(this._wrapped,arguments);return u(this._wrapped,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];n.prototype[a]=function(){return u(b.apply(this._wrapped,arguments),this._chain)}});n.prototype.chain=function(){this._chain=true;return this};n.prototype.value=function(){return this._wrapped}}).call(this); diff -r f11b234497f7 -r 61c384dda19e src/js/libs/underscore.js --- a/src/js/libs/underscore.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -// Underscore.js 1.2.3 -// (c) 2009-2011 Jeremy Ashkenas, DocumentCloud Inc. -// Underscore is freely distributable under the MIT license. -// Portions of Underscore are inspired or borrowed from Prototype, -// Oliver Steele's Functional, and John Resig's Micro-Templating. -// For all details and documentation: -// http://documentcloud.github.com/underscore -(function(){function r(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== -c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&r(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(m.call(a,h)&&(f++,!(g=m.call(c,h)&&r(a[h],c[h],d))))break;if(g){for(h in c)if(m.call(c, -h)&&!f--)break;g=!f}}d.pop();return g}var s=this,F=s._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,G=k.concat,H=k.unshift,l=p.toString,m=p.hasOwnProperty,v=k.forEach,w=k.map,x=k.reduce,y=k.reduceRight,z=k.filter,A=k.every,B=k.some,q=k.indexOf,C=k.lastIndexOf,p=Array.isArray,I=Object.keys,t=Function.prototype.bind,b=function(a){return new n(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else typeof define==="function"&& -define.amd?define("underscore",function(){return b}):s._=b;b.VERSION="1.2.3";var j=b.each=b.forEach=function(a,c,b){if(a!=null)if(v&&a.forEach===v)a.forEach(c,b);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a==null&&(a=[]);if(x&&a.reduce===x)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(y&&a.reduceRight===y)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g, -c,d,e):b.reduce(g,c)};b.find=b.detect=function(a,c,b){var e;D(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(z&&a.filter===z)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(A&&a.every===A)return a.every(c, -b);j(a,function(a,g,h){if(!(e=e&&c.call(b,a,g,h)))return o});return e};var D=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(B&&a.some===B)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return q&&a.indexOf===q?a.indexOf(c)!=-1:b=D(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(c.call?c||a:a[c]).apply(a, -d)})};b.pluck=function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex= -function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after= -function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=I||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)m.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){j(i.call(arguments, -1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return r(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(m.call(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a=== -Object(a)};b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!m.call(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)== -"[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.noConflict=function(){s._=F;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),function(c){J(c, -b[c]=a[c])})};var K=0;b.uniqueId=function(a){var b=K++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape,function(a,b){return"',_.escape("+b.replace(/\\'/g,"'")+"),'"}).replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g, -"'")+",'"}).replace(d.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};var n=function(a){this._wrapped=a};b.prototype=n.prototype;var u=function(a,c){return c?b(a).chain():a},J=function(a,c){n.prototype[a]=function(){var a=i.call(arguments);H.call(a,this._wrapped);return u(c.apply(b, -a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];n.prototype[a]=function(){b.apply(this._wrapped,arguments);return u(this._wrapped,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];n.prototype[a]=function(){return u(b.apply(this._wrapped,arguments),this._chain)}});n.prototype.chain=function(){this._chain=true;return this};n.prototype.value=function(){return this._wrapped}}).call(this); diff -r f11b234497f7 -r 61c384dda19e src/js/main.js --- a/src/js/main.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -/* main file */ -// Why is it called main ? It only loads the libs ! - -if(window.IriSP === undefined && window.__IriSP === undefined) { - /** - @class - the object under which everything goes. - */ - IriSP = {}; - - /** Alias to IriSP for backward compatibility */ - __IriSP = IriSP; -} - diff -r f11b234497f7 -r 61c384dda19e src/js/modules.js --- a/src/js/modules.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -/* modules are non-graphical entities, similar to widgets */ - -// TODO: Unify widgets and modules - -IriSP.Module = function(Popcorn, config, Serializer) { - - if (config === undefined || config === null) { - config = {} - } - - this._Popcorn = Popcorn; - this._config = config; - this._serializer = Serializer; -}; diff -r f11b234497f7 -r 61c384dda19e src/js/modules/embed.js --- a/src/js/modules/embed.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -/* embed module - listens and relay hash changes to a parent window. */ - -IriSP.EmbedModule = function(Popcorn, config, Serializer) { - IriSP.Module.call(this, Popcorn, config, Serializer); - - window.addEventListener('message', IriSP.wrap(this, this.handleMessages), false); - this._Popcorn.listen("IriSP.Mediafragment.hashchange", IriSP.wrap(this, this.relayChanges)); -}; - -IriSP.EmbedModule.prototype = new IriSP.Module(); - -IriSP.EmbedModule.prototype.handleMessages = function(e) { - if (e.data.type === "hashchange") { - window.location.hash = e.data.value; - } -}; - -IriSP.EmbedModule.prototype.relayChanges = function(newHash) { - window.parent.postMessage({type: "hashchange", value: newHash}, "*"); - return; -}; \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/js/serializers/CinecastSerializer.js --- a/src/js/serializers/CinecastSerializer.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/js/serializers/CinecastSerializer.js Thu May 03 17:52:52 2012 +0200 @@ -153,7 +153,7 @@ IriSP.jQuery.getJSON(_url, _callback) }, deSerialize : function(_data, _source) { - if (typeof _data !== "object" && _data === null) { + if (typeof _data !== "object" || _data === null) { return; } if (typeof _data.imports !== "undefined") { @@ -163,7 +163,7 @@ } IriSP._(this.types).forEach(function(_type, _typename) { var _listdata = _data[_type.serialized_name]; - if (typeof _listdata !== "undefined") { + if (typeof _listdata !== "undefined" && _listdata !== null) { var _list = new IriSP.Model.List(_source.directory); if (_listdata.hasOwnProperty("length")) { var _l = _listdata.length; diff -r f11b234497f7 -r 61c384dda19e src/js/serializers/PlatformSerializer.js --- a/src/js/serializers/PlatformSerializer.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/js/serializers/PlatformSerializer.js Thu May 03 17:52:52 2012 +0200 @@ -141,12 +141,12 @@ IriSP.jQuery.getJSON(_url, _callback) }, deSerialize : function(_data, _source) { - if (typeof _data !== "object" && _data === null) { + if (typeof _data !== "object" || _data === null) { return; } IriSP._(this.types).forEach(function(_type, _typename) { var _listdata = _data[_type.serialized_name]; - if (typeof _listdata !== "undefined") { + if (typeof _listdata !== "undefined" && _listdata !== null) { var _list = new IriSP.Model.List(_source.directory); if (_listdata.hasOwnProperty("length")) { var _l = _listdata.length; diff -r f11b234497f7 -r 61c384dda19e src/js/utils.js --- a/src/js/utils.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/js/utils.js Thu May 03 17:52:52 2012 +0200 @@ -1,5 +1,9 @@ /* utils.js - various utils that don't belong anywhere else */ +IriSP.jqEscape = function(_text) { + return text.replace(/(:|\.)/g,'\\$1'); +} + IriSP.getLib = function(lib) { if (IriSP.libFiles.useCdn && typeof IriSP.libFiles.cdn[lib] == "string") { return IriSP.libFiles.cdn[lib]; @@ -8,7 +12,7 @@ return IriSP.libFiles.locations[lib]; } if (typeof IriSP.libFiles.inDefaultDir[lib] == "string") { - return IriSP.libFiles.defaultDir + IriSP.libFiles.inDefaultDir[lib]; + return IriSP.libFiles.defaultDir + '/' + IriSP.libFiles.inDefaultDir[lib]; } } @@ -18,136 +22,4 @@ type : "text/css", href : _cssFile }).appendTo('head'); -} - -/* -IriSP.padWithZeros = function(num) { - if (Math.abs(num) < 10) { - return "0" + num.toString(); - } else { - return num.toString(); - } -}; - -/* convert a number of milliseconds to a tuple of the form - [hours, minutes, seconds] - -IriSP.msToTime = function(ms) { - return IriSP.secondsToTime(ms / 1000); -} - -/* format a tweet - replaces @name by a link to the profile, #hashtag, etc. */ -IriSP.formatTweet = function(tweet) { - /* - an array of arrays which hold a regexp and its replacement. - */ - var regExps = [ - /* copied from http://codegolf.stackexchange.com/questions/464/shortest-url-regex-match-in-javascript/480#480 */ - [/((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/gi, "$1"], - [/@(\w+)/gi, "@$1"], // matches a @handle - [/#(\w+)/gi, "#$1"],// matches a hashtag - [/(\+\+)/gi, "$1"], - [/(--)/gi, "$1"], - [/(==)/gi, "$1"], - [/(\?\?)/gi, "$1"] - ]; - - var i = 0; - for(i = 0; i < regExps.length; i++) { - tweet = tweet.replace(regExps[i][0], regExps[i][1]); - } - - return tweet; -}; -/* -IriSP.countProperties = function(obj) { - var count = 0; - - for(var prop in obj) { - if(obj.hasOwnProperty(prop)) - ++count; - } - - return count; -}; - -// conversion de couleur Decimal vers HexaDecimal || 000 si fff -IriSP.DEC_HEXA_COLOR = function (dec) { - var val = +dec; - var str = val.toString(16); - var zeroes = ""; - if (str.length < 6) { - for (var i = 0; i < 6 - str.length; i++) - zeroes += "0"; - } - return zeroes + str; -}; - -/* shortcut to have global variables in templates -IriSP.templToHTML = function(template, values) { - var params = IriSP._.extend( - { - "l10n" : IriSP.i18n.getMessages() - }, - values); - return Mustache.to_html(template, params); -}; - -/* we need to be stricter than encodeURIComponent, - because of twitter -*/ -IriSP.encodeURI = function(str) { - return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28'). - replace(/\)/g, '%29').replace(/\*/g, '%2A'); -} - -IriSP.jqEscape = function(text) { - return text.replace(/(:|\.)/g,'\\$1') -} - -IriSP.jqId = function (text) { - return IriSP.jQuery('#' + IriSP.jqEscape(text)); - } - -/** returns an url to share on facebook */ -IriSP.mkFbUrl = function(url, text) { - if (typeof(text) === "undefined") - text = "I'm watching "; - - return "http://www.facebook.com/share.php?u=" + IriSP.encodeURI(text) + IriSP.shorten_url(url); -}; - -/** returns an url to share on twitter */ -IriSP.mkTweetUrl = function(url, text) { - if (typeof(text) === "undefined") - text = "I'm watching "; - - return "http://twitter.com/home?status=" + IriSP.encodeURI(text) + IriSP.shorten_url(url); -}; - -/** returns an url to share on google + */ -IriSP.mkGplusUrl = function(url, text) { - return "https://plusone.google.com/_/+1/confirm?hl=en&url=" + IriSP.shorten_url(url); -}; - -/** get a property that can have multiple names **/ - -/** issue a call to an url shortener and return the shortened url */ -IriSP.shorten_url = function(url) { - return encodeURIComponent(url); -}; - - -/* for ie compatibility -if (Object.prototype.__defineGetter__&&!Object.defineProperty) { - Object.defineProperty=function(obj,prop,desc) { - if ("get" in desc) obj.__defineGetter__(prop,desc.get); - if ("set" in desc) obj.__defineSetter__(prop,desc.set); - } -} -*/ - -/* Creates regexps from text */ -IriSP.regexpFromText = function(_text) { - return new RegExp('(' + _text.replace(/(\W)/gim,'\\$1') + ')','gim'); -} +} \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/js/widgets/stackGraphWidget.js --- a/src/js/widgets/stackGraphWidget.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -IriSP.StackGraphWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); -} - -IriSP.StackGraphWidget.prototype = new IriSP.Widget(); - -IriSP.StackGraphWidget.prototype.draw = function() { - var _ = IriSP._; - this.height = this._config.height || 50; - this.width = this.selector.width(); - this.slices = this._config.slices || ~~(this.width/(this.streamgraph ? 20 : 5)); - _(this.tags).each(function(_a) { - _a.regexp = new RegExp(_(_a.keywords).map(function(_k) { - return _k.replace(/([\W])/gm,'\\$1'); - }).join("|"),"im") - }); - this.paper = new Raphael(this.selector[0], this.width, this.height); - this.groups = []; - this.duration = this.getDuration(); - - var _annotationType = this._serializer.getTweets(), - _sliceDuration = ~~ ( this.duration / this.slices), - _annotations = this._serializer._data.annotations, - _groupedAnnotations = _(_.range(this.slices)).map(function(_i) { - return _(_annotations).filter(function(_a){ - return (_a.begin <= (1 + _i) * _sliceDuration) && (_a.end >= _i * _sliceDuration) - }); - }), - _max = IriSP._(_groupedAnnotations).max(function(_g) { - return _g.length - }).length, - _scale = this.height / _max, - _width = this.width / this.slices, - _showTitle = !this._config.excludeTitle, - _showDescription = !this._config.excludeDescription; - - - var _paths = _(this.tags).map(function() { - return []; - }); - _paths.push([]); - - for (var i = 0; i < this.slices; i++) { - var _group = _groupedAnnotations[i]; - if (_group) { - var _vol = _(this.tags).map(function() { - return 0; - }); - for (var j = 0; j < _group.length; j++){ - var _txt = (_showTitle ? _group[j].content.title : '') + ' ' + (_showDescription ? _group[j].content.description : '') - var _tags = _(this.tags).map(function(_tag) { - return (_txt.search(_tag.regexp) == -1 ? 0 : 1) - }), - _nbtags = _(_tags).reduce(function(_a,_b) { - return _a + _b; - }, 0); - if (_nbtags) { - IriSP._(_tags).each(function(_v, _k) { - _vol[_k] += (_v / _nbtags); - }); - } - } - var _nbtags = _(_vol).reduce(function(_a,_b) { - return _a + _b; - }, 0), - _nbneutre = _group.length - _nbtags, - _h = _nbneutre * _scale, - _base = this.height - _h; - if (!this.streamgraph) { - this.paper.rect(i * _width, _base, _width - 1, _h ).attr({ - "stroke" : "none", - "fill" : this.defaultcolor - }); - } - _paths[0].push(_base); - for (var j = 0; j < this.tags.length; j++) { - _h = _vol[j] * _scale; - _base = _base - _h; - if (!this.streamgraph) { - this.paper.rect(i * _width, _base, _width - 1, _h ).attr({ - "stroke" : "none", - "fill" : this.tags[j].color - }); - } - _paths[j+1].push(_base); - } - this.groups.push(_(_vol).map(function(_v) { - return _v / _group.length; - })) - } else { - for (var j = 0; j < _paths.length; j++) { - _paths[j].push(this.height); - } - this.groups.push(_(this.tags).map(function() { - return 0; - })); - } - } - - if (this.streamgraph) { - for (var j = _paths.length - 1; j >= 0; j--) { - var _d = _(_paths[j]).reduce(function(_memo, _v, _k) { - return _memo + ( _k - ? 'C' + (_k * _width) + ' ' + _paths[j][_k - 1] + ' ' + (_k * _width) + ' ' + _v + ' ' + ((_k + .5) * _width) + ' ' + _v - : 'M0 ' + _v + 'L' + (.5*_width) + ' ' + _v ) - },'') + 'L' + this.width + ' ' + _paths[j][_paths[j].length - 1] + 'L' + this.width + ' ' + this.height + 'L0 ' + this.height; - this.paper.path(_d).attr({ - "stroke" : "none", - "fill" : (j ? this.tags[j-1].color : this.defaultcolor) - }); - } - } - this.rectangleFocus = this.paper.rect(0,0,_width,this.height) - .attr({ - "stroke" : "none", - "fill" : "#ff00ff", - "opacity" : 0 - }) - this.rectangleProgress = this.paper.rect(0,0,0,this.height) - .attr({ - "stroke" : "none", - "fill" : "#808080", - "opacity" : .3 - }); - this.ligneProgress = this.paper.path("M0 0L0 "+this.height).attr({"stroke":"#ff00ff", "line-width" : 2}) - - this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.timeUpdateHandler)); - var _this = this; - this.selector - .click(IriSP.wrap(this, this.clickHandler)) - .mousemove(function(_e) { - _this.updateTooltip(_e); - // Trace - var relX = _e.pageX - _this.selector.offset().left; - var _duration = _this.getDuration(); - var _time = parseInt((relX / _this.width) * _duration); - _this._Popcorn.trigger("IriSP.TraceWidget.MouseEvents", { - "widget" : "StackGraphWidget", - "type": "mousemove", - "x": _e.pageX, - "y": _e.pageY, - "time": _time - }); - - }) - .mouseout(function() { - _this.TooltipWidget.hide(); - _this.rectangleFocus.attr({ - "opacity" : 0 - }) - }) -} - -IriSP.StackGraphWidget.prototype.timeUpdateHandler = function() { - var _currentTime = this._Popcorn.currentTime(), - _x = (1000 * _currentTime / this.duration) * this.width; - this.rectangleProgress.attr({ - "width" : _x - }); - this.ligneProgress.attr({ - "path" : "M" + _x + " 0L" + _x + " " + this.height - }) -} - -IriSP.StackGraphWidget.prototype.clickHandler = function(event) { - /* Ctrl-C Ctrl-V'ed from another widget - */ - - var relX = event.pageX - this.selector.offset().left; - var newTime = ((relX / this.width) * this.duration/1000).toFixed(2); - this._Popcorn.trigger("IriSP.StackGraphWidget.clicked", newTime); - this._Popcorn.currentTime(newTime); -}; - -IriSP.StackGraphWidget.prototype.updateTooltip = function(event) { - var _segment = Math.max(0,Math.min(this.groups.length - 1, Math.floor(this.slices * (event.pageX - this.selector.offset().left)/this.width))), - _valeurs = this.groups[_segment], - _width = this.width / this.slices, - _html = '
    ' + IriSP._(this.tags).map(function(_tag, _i) { - return '
  • ' - + ~~(100 * _valeurs[_i]) - + '% de ' - + _tag.description - + '
  • '; - }).join('') + '
'; - this.TooltipWidget._shown = false; // Vraiment, on ne peut pas ouvrir le widget s'il n'est pas encore ouvert ? - this.TooltipWidget.show('','',(_segment + .5)* this.width / this.slices, 0); - this.TooltipWidget.selector.find(".tip").html(_html); - this.rectangleFocus.attr({ - "x" : _segment * _width, - "opacity" : .4 - }) -} - diff -r f11b234497f7 -r 61c384dda19e src/js/widgets/traceWidget.js --- a/src/js/widgets/traceWidget.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -IriSP.TraceWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - this.lastEvent = ""; - var _this = this, - _listeners = { - "IriSP.createAnnotationWidget.addedAnnotation" : 0, - "IriSP.search.open" : 0, - "IriSP.search.closed" : 0, - "IriSP.search" : 0, - "IriSP.search.cleared" : 0, - "IriSP.search.matchFound" : 0, - "IriSP.search.noMatchFound" : 0, - "IriSP.search.triggeredSearch" : 0, - "IriSP.TraceWidget.MouseEvents" : 0, - "play" : 0, - "pause" : 0, - "volumechange" : 0, - "seeked" : 0, - "play" : 0, - "pause" : 0, - "timeupdate" : 2000 - }; - IriSP._(_listeners).each(function(_ms, _listener) { - var _f = function(_arg) { - _this.eventHandler(_listener, _arg); - } - if (_ms) { - _f = IriSP.underscore.throttle(_f, _ms); - } - _this._Popcorn.listen(_listener, _f); - }); - this._Popcorn.listen("timeupdate", IriSP.underscore.throttle(function(_arg) { - _this.eventHandler(_listener, _arg); - })); - - this.tracer = IriSP.TraceManager(IriSP.jQuery).init_trace("test", this._config); - this.tracer.set_default_subject("default_subject"); - this.tracer.trace("StartTracing", { "hello": "world" }); - -} - -IriSP.TraceWidget.prototype = new IriSP.Widget(); - -IriSP.TraceWidget.prototype.draw = function() { - this.mouseLocation = ''; - var _this = this; - IriSP.jQuery(".Ldt-Widget").bind("click mouseover mouseout dragstart dragstop", function(_e) { - var _widget = IriSP.jQuery(this).attr("widget-type"), - _class = _e.target.className; - var _data = { - "type": _e.type, - "x": _e.clientX, - "y": _e.clientY, - "widget": _widget - } - if (typeof _class == "string" && _class.indexOf('Ldt-TraceMe') != -1) { - var _name = _e.target.localName, - _id = _e.target.id, - _text = _e.target.textContent.trim(), - _title = _e.target.title, - _value = _e.target.value; - _data.target = _name + (_id.length ? '#' + IriSP.jqEscape(_id) : '') + (_class.length ? ('.' + IriSP.jqEscape(_class).replace(/\s/g,'.')).replace(/\.Ldt-(Widget|TraceMe)/g,'') : ''); - if (typeof _title == "string" && _title.length && _title.length < 140) { - _data.title = _title; - } - if (typeof _text == "string" && _text.length && _text.length < 140) { - _data.text = _text; - } - if (typeof _value == "string" && _value.length) { - _data.value = _value; - } - _this._Popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); - } else { - //console.log(_e.type+','+_this.mouseLocation+','+_widget); - if (_e.type == "mouseover") { - if (_this.mouseLocation != _widget) { - _this._Popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); - } else { - if (typeof _this.moTimeout != "undefined") { - clearTimeout(_this.moTimeout); - delete _this.moTimeout; - } - } - } - if (_e.type == "click") { - _this._Popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); - } - if (_e.type == "mouseout") { - if (typeof _this.moTimeout != "undefined") { - clearTimeout(_this.moTimeout); - } - _this.moTimeout = setTimeout(function() { - if (_data.widget != _this.mouseLocation) { - _this._Popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); - } - },100); - } - } - _this.mouseLocation = _widget; - }); -} - -IriSP.TraceWidget.prototype.eventHandler = function(_listener, _arg) { - var _traceName = 'Mdp_'; - if (typeof _arg == "string" || typeof _arg == "number") { - _arg = { "value" : _arg } - } - if (typeof _arg == "undefined") { - _arg = {} - } - switch(_listener) { - case 'IriSP.TraceWidget.MouseEvents': - _traceName += _arg.widget + '_' + _arg.type; - delete _arg.widget; - delete _arg.type; - break; - case 'timeupdate': - case 'play': - case 'pause': - _arg.time = this._Popcorn.currentTime() * 1000; - case 'seeked': - case 'volumechange': - _traceName += 'Popcorn_' + _listener; - break; - default: - _traceName += _listener.replace('IriSP.','').replace('.','_'); - } - this.lastEvent = _traceName; - this.tracer.trace(_traceName, _arg); - if (this._config.js_console) { - console.log("tracer.trace('" + _traceName + "', " + JSON.stringify(_arg) + ");"); - } -} diff -r f11b234497f7 -r 61c384dda19e src/templates/arrowWidget.html --- a/src/templates/arrowWidget.html Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -
-
diff -r f11b234497f7 -r 61c384dda19e src/templates/loading.html --- a/src/templates/loading.html Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -
{{l10n.loading_wait}}
diff -r f11b234497f7 -r 61c384dda19e src/templates/share.html --- a/src/templates/share.html Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -{{! social network sharing template }} - - - - \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/templates/tooltip.html --- a/src/templates/tooltip.html Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -{{! template used by the jquery ui tooltip }} -
-
{{title}}
-
{{begin}} : {{end}}
-
{{description}}
-
diff -r f11b234497f7 -r 61c384dda19e src/templates/tweetWidget.html --- a/src/templates/tweetWidget.html Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -{{! template for the tweet widget }} -
-
- -
-
-
-
-
-
- Retweet
-
- Reply
- -
-
diff -r f11b234497f7 -r 61c384dda19e src/widgets/Annotation.css --- a/src/widgets/Annotation.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Annotation.css Thu May 03 17:52:52 2012 +0200 @@ -4,7 +4,6 @@ border-color: #b7b7b7; padding: 0 1px 1px; margin: 0; - font-family: Helvetica, Arial, sans-serif; } .Ldt-Annotation-Widget.Ldt-Annotation-ShowTop { diff -r f11b234497f7 -r 61c384dda19e src/widgets/AnnotationsList.css --- a/src/widgets/AnnotationsList.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/AnnotationsList.css Thu May 03 17:52:52 2012 +0200 @@ -1,7 +1,6 @@ /* AnnotationsListWidget */ .Ldt-AnnotationsListWidget { - font-family: "Open Sans", Helvetica, Arial, sans-serif; border: 1px solid #b6b8b8; overflow: auto; max-height: 480px; @@ -22,7 +21,7 @@ min-height: 60px; } .Ldt-AnnotationsList-li:hover { - background-color: #e9e9e9; + background: url(img/pinstripe-grey.png); } .Ldt-AnnotationsList-highlight { background: #F7268E; @@ -54,7 +53,7 @@ margin: 2px 2px 0 82px; font-weight: bold; } -.Ldt-AnnotationsList-Title a { +h3.Ldt-AnnotationsList-Title a { color: #0068c4; } p.Ldt-AnnotationsList-Description { diff -r f11b234497f7 -r 61c384dda19e src/widgets/Arrow.css --- a/src/widgets/Arrow.css Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -/* - * - */ -.Ldt-Arrow { - margin-top: 1px; -} diff -r f11b234497f7 -r 61c384dda19e src/widgets/Arrow.js --- a/src/widgets/Arrow.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Arrow.js Thu May 03 17:52:52 2012 +0200 @@ -20,7 +20,10 @@ IriSP.Widgets.Arrow.prototype.draw = function() { this.height = this.arrow_height + this.base_height; - this.$.addClass("Ldt-Arrow").css("height", this.height + "px"); + this.$.addClass("Ldt-Arrow").css({ + height: this.height + "px", + "margin-top": "1px" + }); this.paper = new Raphael(this.container, this.width, this.height ); window.myArrow = this; this.svgArrow = this.paper.path('M0,' + this.height + 'L' + this.width + ',' + this.height); diff -r f11b234497f7 -r 61c384dda19e src/widgets/Controller.css --- a/src/widgets/Controller.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Controller.css Thu May 03 17:52:52 2012 +0200 @@ -2,7 +2,6 @@ .Ldt-Ctrl { font-size: 10px; - font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; background:url('img/player_gradient.png') repeat-x transparent ; height: 25px; border: 1px solid #b6b8b8; diff -r f11b234497f7 -r 61c384dda19e src/widgets/Controller.js --- a/src/widgets/Controller.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Controller.js Thu May 03 17:52:52 2012 +0200 @@ -8,7 +8,10 @@ IriSP.Widgets.Controller.prototype = new IriSP.Widgets.Widget(); -IriSP.Widgets.Controller.prototype.defaults = {} +IriSP.Widgets.Controller.prototype.defaults = { + disable_annotate_btn: false, + disable_search_btn: false +} IriSP.Widgets.Controller.prototype.template = '
' @@ -43,33 +46,33 @@ + '
'; IriSP.Widgets.Controller.prototype.messages = { - "en": { - "play_pause": "Play/Pause", - "mute_unmute": "Mute/Unmute", - "play": "Play", - "pause": "Pause", - "mute": "Mute", - "unmute": "Unmute", - "annotate": "Annotate", - "search": "Search", - "elapsed_time": "Elapsed time", - "total_time": "Total time", - "volume": "Volume", - "volume_control": "Volume control" + en: { + play_pause: "Play/Pause", + mute_unmute: "Mute/Unmute", + play: "Play", + pause: "Pause", + mute: "Mute", + unmute: "Unmute", + annotate: "Annotate", + search: "Search", + elapsed_time: "Elapsed time", + total_time: "Total time", + volume: "Volume", + volume_control: "Volume control" }, - "fr": { - "play_pause": "Lecture/Pause", - "mute_unmute": "Couper/Activer le son", - "play": "Lecture", - "pause": "Pause", - "mute": "Couper le son", - "unmute": "Activer le son", - "annotate": "Annoter", - "search": "Rechercher", - "elapsed_time": "Durée écoulée", - "total_time": "Durée totale", - "volume": "Niveau sonore", - "volume_control": "Réglage du niveau sonore" + fr: { + play_pause: "Lecture/Pause", + mute_unmute: "Couper/Activer le son", + play: "Lecture", + pause: "Pause", + mute: "Couper le son", + unmute: "Activer le son", + annotate: "Annoter", + search: "Rechercher", + elapsed_time: "Durée écoulée", + total_time: "Durée totale", + volume: "Niveau sonore", + volume_control: "Réglage du niveau sonore" } }; diff -r f11b234497f7 -r 61c384dda19e src/widgets/CreateAnnotation.js --- a/src/widgets/CreateAnnotation.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/CreateAnnotation.js Thu May 03 17:52:52 2012 +0200 @@ -9,48 +9,88 @@ single_time_mode : false, show_title_field : true, user_avatar : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png" +/* + tags : [ + { + id: "digitalstudies", + meta: { + description: "#digital-studies" + } + }, + { + id: "amateur", + meta: { + description: "#amateur" + }, + } + ], + remote_tags : false, + random_tags : false, + show_from_field : false, + disable_share : false, + polemic_mode : true, // enable polemics + polemics : [{ + className: "positive", + keyword: "++" + }, { + className: "negative", + keyword: "--" + }, { + className: "reference", + keyword: "==" + }, { + className: "question", + keyword: "??" + }], + cinecast_version : false, // put to false to enable the platform version, true for the festival cinecast one. + + // where does the widget PUT the annotations - this is a mustache template. id refers to the id of the media and is filled by the widget. + + api_endpoint_template : "", // platform_url + "/ldtplatform/api/ldt/annotations/{{id}}.json", + api_method : "PUT" + */ } IriSP.Widgets.CreateAnnotation.prototype.messages = { - "en": { - "from_time" : "from", - "to_time" : "to", - "at_time" : "at", - "submit": "Submit", - "add_keywords": "Add keywords", - "add_polemic_keywords": "Add polemic keywords", - "your_name": "Your name", - "no_title" : "Annotate this video", - "type_title": "Annotation title", - "type_description": "Type the full description of your annotation here.", - "wait_while_processing": "Please wait while your request is being processed...", - "error_while_contacting": "An error happened while contacting the server. Your annotation has not been saved.", - "empty_annotation": "Your annotation is empty. Please write something before submitting.", - "annotation_saved": "Thank you, your annotation has been saved.", - "share_annotation": "Would you like to share it on social networks ?", - "share_on": "Share on", - "more_tags": "More tags", - "cancel": "Cancel" + en: { + from_time: "from", + to_time: "to", + at_time: "at", + submit: "Submit", + add_keywords: "Add keywords", + add_polemic_keywords: "Add polemic keywords", + your_name: "Your name", + no_title: "Annotate this video", + type_title: "Annotation title", + type_description: "Type the full description of your annotation here.", + wait_while_processing: "Please wait while your request is being processed...", + error_while_contacting: "An error happened while contacting the server. Your annotation has not been saved.", + empty_annotation: "Your annotation is empty. Please write something before submitting.", + annotation_saved: "Thank you, your annotation has been saved.", + share_annotation: "Would you like to share it on social networks ?", + share_on: "Share on", + more_tags: "More tags", + cancel: "Cancel" }, - "fr": { - "from_time" : "from", - "to_time" : "à", - "at_time" : "à", - "submit": "Envoyer", - "add_keywords": "Ajouter des mots-clés", - "add_polemic_keywords": "Ajouter des mots-clés polémiques", - "your_name": "Votre nom", - "no_title" : "Annoter cette vidéo", - "type_title": "Titre de l'annotation", - "type_description": "Rédigez le contenu de votre annotation ici.", - "wait_while_processing": "Veuillez patienter pendant le traitement de votre requête...", - "error_while_contacting": "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée", - "empty_annotation": "Votre annotation est vide. Merci de rédiger un texte avant de l'envoyer.", - "annotation_saved": "Merci, votre annotation a été enregistrée.", - "share_annotation": "Souhaitez-vous la partager sur les réseaux sociaux ?", - "share_on": "Partager sur", - "more_tags": "Plus de mots-clés", - "cancel": "Cancel" + fr: { + from_time: "from", + to_time: "à", + at_time: "à", + submit: "Envoyer", + add_keywords: "Ajouter des mots-clés", + add_polemic_keywords: "Ajouter des mots-clés polémiques", + your_name: "Votre nom", + no_title: "Annoter cette vidéo", + type_title: "Titre de l'annotation", + type_description: "Rédigez le contenu de votre annotation ici.", + wait_while_processing: "Veuillez patienter pendant le traitement de votre requête...", + error_while_contacting: "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée", + empty_annotation: "Votre annotation est vide. Merci de rédiger un texte avant de l'envoyer.", + annotation_saved: "Merci, votre annotation a été enregistrée.", + share_annotation: "Souhaitez-vous la partager sur les réseaux sociaux ?", + share_on: "Partager sur", + more_tags: "Plus de mots-clés", + cancel: "Cancel" } } diff -r f11b234497f7 -r 61c384dda19e src/widgets/HelloWorld.css --- a/src/widgets/HelloWorld.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/HelloWorld.css Thu May 03 17:52:52 2012 +0200 @@ -1,3 +1,3 @@ .Ldt-HelloWorld p { - text-align: center; font-size: 12px; margin: 2px 0; font-family: Helvetica, Arial, sans-serif; + text-align: center; font-size: 12px; margin: 2px 0; } diff -r f11b234497f7 -r 61c384dda19e src/widgets/Mediafragment.js --- a/src/widgets/Mediafragment.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Mediafragment.js Thu May 03 17:52:52 2012 +0200 @@ -2,6 +2,13 @@ IriSP.Widgets.Widget.call(this, player, config); this.last_hash = ""; window.onhashchange = this.functionWrapper("goToHash"); + if (typeof window.addEventListener !== "undefined") { + window.addEventListener('message', function(_msg) { + if (_msg.data.type === "hashchange") { + document.location.hash = _msg.data.hash; + } + }) + }; this.bindPopcorn("pause","setHashToTime"); this.bindPopcorn("seeked","setHashToTime"); this.bindPopcorn("IriSP.Mediafragment.setHashToAnnotation","setHashToAnnotation"); @@ -43,6 +50,12 @@ if (!this.blocked && this.last_hash !== _hash) { this.last_hash = _hash; document.location.hash = _hash; + if (window.parent !== window) { + window.parent.postMessage({ + type: "hashchange", + hash: _hash + }) + } this.block(); } } diff -r f11b234497f7 -r 61c384dda19e src/widgets/Polemic.css --- a/src/widgets/Polemic.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Polemic.css Thu May 03 17:52:52 2012 +0200 @@ -1,3 +1,11 @@ +/* + * Polemic Widget CSS + */ + +.Ldt-Polemic { + border-style: solid none; border-color: #cccccc; border-width: 1px; +} + .Ldt-Polemic-Position { background: #fc00ff; position: absolute; diff -r f11b234497f7 -r 61c384dda19e src/widgets/Polemic.js --- a/src/widgets/Polemic.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Polemic.js Thu May 03 17:52:52 2012 +0200 @@ -4,9 +4,22 @@ IriSP.Widgets.Polemic.prototype = new IriSP.Widgets.Widget(); +IriSP.Widgets.Polemic.prototype.messages = { + fr: { + from_: "de ", + _to_: " à ", + _annotations: " annotation(s)" + }, + en: { + from_: "from ", + _to_: " to ", + _annotations: " annotation(s)" + } +} IriSP.Widgets.Polemic.prototype.defaults = { element_width : 5, element_height : 5, + max_elements : 15, annotation_type : "tweet", defaultcolor : "#585858", foundcolor : "#fc00ff", @@ -77,24 +90,37 @@ IriSP.Widgets.Polemic.prototype.draw = function() { - this.bindPopcorn("IriSP.search", "onSearch"); - this.bindPopcorn("IriSP.search.closed", "onSearch"); - this.bindPopcorn("IriSP.search.cleared", "onSearch"); this.bindPopcorn("timeupdate", "onTimeupdate"); this.$zone = IriSP.jQuery('
'); + this.$zone.addClass("Ldt-Polemic"); this.$.append(this.$zone); + this.$elapsed = IriSP.jQuery('
') + .css({ + background: '#cccccc', + position: "absolute", + top: 0, + left: 0, + width: 0, + height: "100%" + }); + + this.$zone.append(this.$elapsed); + var _slices = [], _slice_count = Math.floor( this.width / this.element_width ), _duration = this.source.getDuration(), _max = 0, - _list = this.getWidgetAnnotations(); + _list = this.getWidgetAnnotations(), + _this = this; for (var _i = 0; _i < _slice_count; _i++) { var _begin = new IriSP.Model.Time( _i * _duration / _slice_count ), _end = new IriSP.Model.Time( ( _i + 1 ) * _duration / _slice_count ), _count = 0, _res = { + begin : _begin.toString(), + end : _end.toString(), annotations : _list.filter(function(_annotation) { return _annotation.begin >= _begin && _annotation.end < _end; }), @@ -113,83 +139,154 @@ _max = Math.max(_max, _count); _slices.push(_res); } - this.height = (_max ? (_max + 2) * this.element_height : 0); - this.$zone.css({ - width: this.width + "px", - height: this.height + "px", - position: "relative" - }); - - this.$elapsed = IriSP.jQuery('
') - .css({ - background: '#cccccc', - position: "absolute", - top: 0, - left: 0, - width: 0, - height: "100%" + if (_max < this.max_elements) { + this.is_stackgraph = false; + if (_max) { + + this.height = (2 + _max) * this.element_height; + this.$zone.css({ + width: this.width + "px", + height: this.height + "px", + position: "relative" + }); + + var _x = 0, + _html = ''; + + function displayElement(_x, _y, _color, _id, _title) { + _html += Mustache.to_html( + '
', + { + id: _id, + title: _title, + posx: Math.floor(_x + (_this.element_width - 1) / 2), + left: _x, + top: _y, + color: _color, + width: (_this.element_width-1), + height: _this.element_height + }); + } + + IriSP._(_slices).forEach(function(_slice) { + var _y = _this.height; + _slice.annotations.forEach(function(_annotation) { + _y -= _this.element_height; + displayElement(_x, _y, _this.defaultcolor, _annotation.id, _annotation.title); + }); + IriSP._(_slice.polemicStacks).forEach(function(_annotations, _j) { + var _color = _this.polemics[_j].color; + _annotations.forEach(function(_annotation) { + _y -= _this.element_height; + displayElement(_x, _y, _color, _annotation.id, _annotation.title); + }); + }); + _x += _this.element_width; + }); + + this.$zone.append(_html); + + this.$tweets = this.$.find(".Ldt-Polemic-TweetDiv"); + + this.$tweets + .mouseover(function() { + var _el = IriSP.jQuery(this); + _this.tooltip.show(_el.attr("pos-x"), _el.attr("pos-y"), _el.attr("tweet-title"), _el.attr("polemic-color")); + }) + .mouseout(function() { + _this.tooltip.hide(); + }) + .click(function() { + var _id = IriSP.jQuery(this).attr("annotation-id"); + _this.player.popcorn.trigger("IriSP.Mediafragment.setHashToAnnotation", _id); + _this.player.popcorn.trigger("IriSP.Tweet.show", _id); + }); + + this.bindPopcorn("IriSP.search", "onSearch"); + this.bindPopcorn("IriSP.search.closed", "onSearch"); + this.bindPopcorn("IriSP.search.cleared", "onSearch"); + + } else { + this.$zone.hide(); + } + } else { + this.is_stackgraph = true; + + this.height = (2 + this.max_elements) * this.element_height; + this.$zone.css({ + width: this.width + "px", + height: this.height + "px", + position: "relative" }); - this.$zone.append(this.$elapsed); - - var _x = 0, - _this = this, - _html = ''; - - function displayElement(_x, _y, _color, _id, _title) { - _html += Mustache.to_html( - '
', - { - id: _id, - title: _title, - posx: Math.floor(_x + (_this.element_width - 1) / 2), - left: _x, - top: _y, - color: _color, - width: (_this.element_width-1), - height: _this.element_height + var _x = 0, + _html = '', + _scale = this.max_elements * this.element_height / _max; + + function displayElement(_x, _y, _h, _color, _nums, _begin, _end) { + _html += Mustache.to_html( + '
', + { + nums: _nums, + posx: Math.floor(_x + (_this.element_width - 1) / 2), + left: _x, + top: _y, + color: _color, + width: (_this.element_width-1), + height: _h, + begin: _begin, + end: _end + }); + } + + IriSP._(_slices).forEach(function(_slice) { + var _y = _this.height, + _nums = _slice.annotations.length + "," + IriSP._(_slice.polemicStacks).map(function(_annotations) { + return _annotations.length + }).join(","); + if (_slice.annotations.length) { + var _h = Math.ceil(_scale * _slice.annotations.length); + _y -= _h; + displayElement(_x, _y, _h, _this.defaultcolor, _nums, _slice.begin, _slice.end); + } + IriSP._(_slice.polemicStacks).forEach(function(_annotations, _j) { + if (_annotations.length) { + var _color = _this.polemics[_j].color, + _h = Math.ceil(_scale * _annotations.length); + _y -= _h; + displayElement(_x, _y, _h, _color, _nums, _slice.begin, _slice.end); + } + }); + _x += _this.element_width; }); + + this.$zone.append(_html); + + this.$tweets = this.$.find(".Ldt-Polemic-TweetDiv"); + + this.$tweets + .mouseover(function() { + var _el = IriSP.jQuery(this), + _nums = _el.attr("annotation-counts").split(","), + _html = '

' + _this.l10n.from_ + _el.attr("begin-time") + _this.l10n._to_ + _el.attr("end-time") + '

'; + for (var _i = 0; _i <= _this.polemics.length; _i++) { + var _color = _i ? _this.polemics[_i - 1].color : _this.defaultcolor; + _html += '

' + _nums[_i] + _this.l10n._annotations + '

' + } + _this.tooltip.show(_el.attr("pos-x"), _el.attr("pos-y"), _html); + }) + .mouseout(function() { + _this.tooltip.hide(); + }) + } - IriSP._(_slices).forEach(function(_slice) { - var _y = _this.height; - _slice.annotations.forEach(function(_annotation) { - _y -= _this.element_height; - displayElement(_x, _y, _this.defaultcolor, _annotation.id, _annotation.title); - }); - IriSP._(_slice.polemicStacks).forEach(function(_annotations, _j) { - var _color = _this.polemics[_j].color; - _annotations.forEach(function(_annotation) { - _y -= _this.element_height; - displayElement(_x, _y, _color, _annotation.id, _annotation.title); - }); - }); - _x += _this.element_width; - }); - - this.$zone.append(_html); - - this.$tweets = this.$.find(".Ldt-Polemic-TweetDiv"); - this.$position = IriSP.jQuery('
').addClass("Ldt-Polemic-Position"); this.$zone.append(this.$position); - this.$tweets - .mouseover(function() { - var _el = IriSP.jQuery(this); - _this.tooltip.show(_el.attr("pos-x"), _el.attr("pos-y"), _el.attr("tweet-title"), _el.attr("polemic-color")); - }) - .mouseout(function() { - _this.tooltip.hide(); - }) - .click(function() { - var _id = IriSP.jQuery(this).attr("annotation-id"); - _this.player.popcorn.trigger("IriSP.Mediafragment.setHashToAnnotation", _id); - _this.player.popcorn.trigger("IriSP.Tweet.show", _id); - }); - this.$zone.click(function(_e) { var _x = _e.pageX - _this.$zone.offset().left; _this.player.popcorn.currentTime(_this.source.getDuration().getSeconds() * _x / _this.width); diff -r f11b234497f7 -r 61c384dda19e src/widgets/Segments.css --- a/src/widgets/Segments.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Segments.css Thu May 03 17:52:52 2012 +0200 @@ -1,3 +1,7 @@ +/* + * Segments Widget + */ + .Ldt-Segments-List { width: 100%; height: 100%; } diff -r f11b234497f7 -r 61c384dda19e src/widgets/Sparkline.css --- a/src/widgets/Sparkline.css Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -/* - * - */ \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e src/widgets/Tagcloud.css --- a/src/widgets/Tagcloud.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Tagcloud.css Thu May 03 17:52:52 2012 +0200 @@ -2,7 +2,6 @@ * */ .Ldt-Tagcloud-Container { - font-family: "Open Sans", Arial, Helvetica, sans-serif; border: 1px solid #b7b7b7; padding: 1px; margin: 0; diff -r f11b234497f7 -r 61c384dda19e src/widgets/Tagcloud.js --- a/src/widgets/Tagcloud.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Tagcloud.js Thu May 03 17:52:52 2012 +0200 @@ -1,6 +1,6 @@ IriSP.Widgets.Tagcloud = function(player, config) { IriSP.Widgets.Widget.call(this, player, config); - this.stopwords = IriSP._.uniq(IriSP._.extend([], this.custom_stopwords, this.stopword_lists[this.stopword_language])); + this.stopwords = IriSP._.uniq([].concat(this.custom_stopwords).concat(this.stopword_lists[this.stopword_language])); } IriSP.Widgets.Tagcloud.prototype = new IriSP.Widgets.Widget(); diff -r f11b234497f7 -r 61c384dda19e src/widgets/Tooltip.css --- a/src/widgets/Tooltip.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Tooltip.css Thu May 03 17:52:52 2012 +0200 @@ -10,8 +10,6 @@ height: 115px; width: 180px; padding: 15px 15px 20px; - color: black; - font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; overflow:hidden; } @@ -23,3 +21,7 @@ max-width: 140px; max-height: 70px; margin: 0 20px; } +.Ldt-Tooltip p { + margin: 2px 0; + font-size: 12px; +} diff -r f11b234497f7 -r 61c384dda19e src/widgets/Tooltip.js --- a/src/widgets/Tooltip.js Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Tooltip.js Thu May 03 17:52:52 2012 +0200 @@ -27,13 +27,13 @@ } else { this.$.find(".Ldt-Tooltip-Color").hide(); } - + this.$.find(".Ldt-Tooltip-Text").html(text); this.$tip.show(); this.$tip.css({ "left" : Math.floor(x - this.$tip.outerWidth() / 2) + "px", - "top" : Math.floor(y - this.$tip.outerHeight() - 5) + "px" + "top" : Math.floor(y - this.$tip.outerHeight()) + "px" }); }; diff -r f11b234497f7 -r 61c384dda19e src/widgets/Trace.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/widgets/Trace.js Thu May 03 17:52:52 2012 +0200 @@ -0,0 +1,148 @@ +IriSP.Widgets.Trace = function(player, config) { + IriSP.Widgets.Widget.call(this, player, config); + +} + +IriSP.Widgets.Trace.prototype = new IriSP.Widgets.Widget(); + +IriSP.Widgets.Trace.prototype.defaults = { + js_console : false, + url: "http://traces.advene.org:5000/", + requestmode: 'GET', + syncmode: "sync" +} + +IriSP.Widgets.Trace.prototype.draw = function() { + this.lastEvent = ""; + if (typeof window.tracemanager === "undefined") { + console.log("Tracemanager not found"); + return; + } + var _this = this, + _listeners = { + "IriSP.createAnnotationWidget.addedAnnotation" : 0, + "IriSP.search.open" : 0, + "IriSP.search.closed" : 0, + "IriSP.search" : 0, + "IriSP.search.cleared" : 0, + "IriSP.search.matchFound" : 0, + "IriSP.search.noMatchFound" : 0, + "IriSP.search.triggeredSearch" : 0, + "IriSP.TraceWidget.MouseEvents" : 0, + "play" : 0, + "pause" : 0, + "volumechange" : 0, + "seeked" : 0, + "play" : 0, + "pause" : 0, + "timeupdate" : 2000 + }; + IriSP._(_listeners).each(function(_ms, _listener) { + var _f = function(_arg) { + _this.eventHandler(_listener, _arg); + } + if (_ms) { + _f = IriSP._.throttle(_f, _ms); + } + _this.player.popcorn.listen(_listener, _f); + }); + this.player.popcorn.listen("timeupdate", IriSP._.throttle(function(_arg) { + _this.eventHandler(_listener, _arg); + })); + + this.tracer = window.tracemanager.init_trace("test", { + url: this.url, + requestmode: this.requestmode, + syncmode: this.syncmode + }); + this.tracer.set_default_subject("metadataplayer"); + this.tracer.trace("StartTracing", {}); + + this.mouseLocation = ''; + IriSP.jQuery(".Ldt-Widget").bind("click mouseover mouseout dragstart dragstop", function(_e) { + var _widget = IriSP.jQuery(this).attr("widget-type"), + _class = _e.target.className; + var _data = { + "type": _e.type, + "x": _e.clientX, + "y": _e.clientY, + "widget": _widget + } + if (typeof _class == "string" && _class.indexOf('Ldt-TraceMe') != -1) { + var _name = _e.target.localName, + _id = _e.target.id, + _text = _e.target.textContent.trim(), + _title = _e.target.title, + _value = _e.target.value; + _data.target = _name + (_id.length ? '#' + IriSP.jqEscape(_id) : '') + (_class.length ? ('.' + IriSP.jqEscape(_class).replace(/\s/g,'.')).replace(/\.Ldt-(Widget|TraceMe)/g,'') : ''); + if (typeof _title == "string" && _title.length && _title.length < 140) { + _data.title = _title; + } + if (typeof _text == "string" && _text.length && _text.length < 140) { + _data.text = _text; + } + if (typeof _value == "string" && _value.length) { + _data.value = _value; + } + this.player.popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); + } else { + //console.log(_e.type+','+_this.mouseLocation+','+_widget); + if (_e.type == "mouseover") { + if (_this.mouseLocation != _widget) { + _this.player.popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); + } else { + if (typeof _this.moTimeout != "undefined") { + clearTimeout(_this.moTimeout); + delete _this.moTimeout; + } + } + } + if (_e.type == "click") { + _this.player.popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); + } + if (_e.type == "mouseout") { + if (typeof _this.moTimeout != "undefined") { + clearTimeout(_this.moTimeout); + } + _this.moTimeout = setTimeout(function() { + if (_data.widget != _this.mouseLocation) { + _this.player.popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); + } + },100); + } + } + _this.mouseLocation = _widget; + }); +} + +IriSP.Widgets.Trace.prototype.eventHandler = function(_listener, _arg) { + var _traceName = 'Mdp_'; + if (typeof _arg == "string" || typeof _arg == "number") { + _arg = { "value" : _arg } + } + if (typeof _arg == "undefined") { + _arg = {} + } + switch(_listener) { + case 'IriSP.TraceWidget.MouseEvents': + _traceName += _arg.widget + '_' + _arg.type; + delete _arg.widget; + delete _arg.type; + break; + case 'timeupdate': + case 'play': + case 'pause': + _arg.time = this.player.popcorn.currentTime() * 1000; + case 'seeked': + case 'volumechange': + _traceName += 'Popcorn_' + _listener; + break; + default: + _traceName += _listener.replace('IriSP.','').replace('.','_'); + } + this.lastEvent = _traceName; + this.tracer.trace(_traceName, _arg); + if (this.js_console) { + console.log("tracer.trace('" + _traceName + "', " + JSON.stringify(_arg) + ");"); + } +} diff -r f11b234497f7 -r 61c384dda19e src/widgets/Tweet.css --- a/src/widgets/Tweet.css Fri Apr 27 19:18:21 2012 +0200 +++ b/src/widgets/Tweet.css Thu May 03 17:52:52 2012 +0200 @@ -2,7 +2,6 @@ border: 1px solid #b7b7b7; padding: 1px; margin: 0; - font-family: Helvetica, Arial, sans-serif; } .Ldt-Tweet-Inner { diff -r f11b234497f7 -r 61c384dda19e src/widgets/img/pinstripe-grey.png Binary file src/widgets/img/pinstripe-grey.png has changed diff -r f11b234497f7 -r 61c384dda19e src/widgets/img/pinstripe.png Binary file src/widgets/img/pinstripe.png has changed diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/1219830366Middlex02BottomRight.js --- a/test/emission_fichiers/1219830366Middlex02BottomRight.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -function OAS_RICH(position) { -if (position == 'Middle') { -document.write ('\n'); -document.write (''); -} -if (position == 'x02') { -document.write (''); -} -if (position == 'BottomRight') { -document.write (''); -} -} diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/265074200838.js --- a/test/emission_fichiers/265074200838.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -estat_Object=function(){};function eStat_loadjs(f){document.write('');};function eStat_urlRef(u){var pgu="";try{pgu=location.href;}catch(e){pgu="";};return u+"#&r="+pgu;};function eStat_windowOpen(winUrl,winName,winFeat){var urlref=eStat_urlRef(winUrl);var name=(winName&&winName!="")?winName.replace(/\s+/g,'_'):"";window.open(urlref,name,winFeat);};function Err(){var warn=true;var e="",w="";var _lvl=0;lvl=function(l){if(_lvl=0){charset=m[i].content.substr(posCharset+8);break;}}};if(!charset&&document.defaultCharset)charset=document.defaultCharset;return charset;};getRef=function(){var ret;try{ret=(top!=null&&top.location!=null&&typeof(top.location.href)=="string")?top.document.referrer:document.referrer;if(!ret||ret==""){if(window.opener&&window.opener.location)ret=window.opener.location.toString();}}catch(e){};return escape(ret);};getScr=function(){var scr="";if(typeof(screen)=="object"){scr+="&scw="+screen.width+"&sch="+screen.height+"&scp="+screen.colorDepth;}else eStat_er.W(env+"noscr",0);return scr;};getPge=function(t){var pgr="",pge="",pgd="";switch(t){case "m":if(navigator.appName=='Netscape')pgr=escape(document.referrer);else pgr=getRef();break;case "mf":pgr=getRef();break;case "mf4":case "mr":case "mr4":var _CKS=document.cookie;var _KS=_CKS.indexOf("cks=");if(_KS!=-1){var _START=_CKS.indexOf("=",_KS)+1;var _END=_CKS.indexOf(";",_KS);if(_END==-1)_END=_CKS.length;pgr=_CKS.substring(_START,_END);document.cookie="cks=; path=/; expires=Fri, 02 Jan 1970 00:00:00 GMT";}else pgr=(t=="mr"||t=="mr4")?escape(window.document.referrer):getRef();break;default:pgr=escape(window.document.referrer);break;};if(!pgr||pgr==""){try{var referer=window.location.hash;if(referer!=""){var st=referer.indexOf("#&r=");pgr="&r="+escape(referer.substring(st+4,referer.length));}else{pgr="&r=_bm_";eStat_er.W(env+"nopgr",0);}}catch(e){pgr="&r=_bm_";eStat_er.W(env+"nopgr",0);};}else pgr="&r="+pgr;pge=getCharset();if(!pge){eStat_er.W(env+"noenc",0);pge="";}else pge="&enc="+pge;pgd=document.domain;if(!pgd){eStat_er.W(env+"nodom",0);pgd="";}else pgd="&dom="+pgd;return pgr+pgd+pge;};this.getEnv=function(eStat_tag){return getScr()+getPge(eStat_tag);};};function Opt(){var opt="opt:";var alt="";var _proto="http://";var cyber;var v={_s:"",_g:"",_u:"",_p:"",_c:"",_c2:"",_a:"",_pt:"",_pb:"",_pr:"",_nb:"",_ca:"",_al:"",_L:"",_C:"",_R:"",_S:"",_W:"",_WU:""};set=function(vl,el,tg,et,dl){(vl&&vl!="")?v[el]=tg+vl:eStat_er.W(opt+et,dl);};cnflt=function(){eStat_er.E(opt+"ConflitTypCpt",3);};this.getSerial=function(){return v._s.substring(0,v._s.length-1);};this.serial=function(s){(cyber==true)?cnflt():cyber=false;v._s=s+"?";if(typeof(s)!='string'||s.length==0)eStat_er.W(opt+"Serial("+s+")",2);};this.cmclient=function(s){(cyber==false)?cnflt():cyber=true;(typeof(s)!='string'||s.length==0)?eStat_er.W(opt+"cmclient("+s+")",2):v._s=s+"_v?";};this.master=function(g){set(g,"_g","&g=","Master",1);};this.pg_mq=function(p){set(escape(p),"_p","&p=","PagesMarquees",2);v["_R"]=1;};this.gp_pg_mq=function(c){set(escape(c),"_c","&c=","GroupePagesMarquees",2);v["_S"]=1;};this.cm_cs=function(c){set(escape(c),"_c","&cs=","CM_CS",2);v["_S"]=1;};this.cm_cs2=function(c){set(escape(c),"_c2","&cs2=","CM_CS2",2);};this.action=function(a){set(a,"_a","&action=","Action",2);};this.typ_prod=function(pt){set(pt,"_pt","&ptype=","TypeProduit",1);};this.mrq_prod=function(pb){set(pb,"_pb","&pbrand=","MarqueProduit",1);};this.ref_prod=function(pr){set(pr,"_pr","&pref=","RefProduit",1);};this.nbr=function(nb){set(nb,"_nb","&nb=","Nombre",2);};this.ca_engdr=function(ca){set(ca,"_ca","&ca=","CA",2);};this.rubriq=function(r){this.pg_mq(r);};this.sec1=function(s){this.gp_pg_mq(s);};this.uid=function(u){set(u,"_u","&u=","UID",1);};this.alt=function(al){alt=al;};this.secur=function(){_proto="https://";};this.niveau=function(l,s){if(s!=""){var _s={'1':"&c=",'2':"&p=",'3':"&l3=",'4':"&l4="};(_s[l])?v._L+=_s[l]+escape(s):eStat_er.W(opt+"NiveauInconnu",1);}else eStat_er.W(opt+"NiveauVide",1);};this.critere=function(l,s){if(s!=""){(l<=5&&l>=1)?v._C+="&c"+l+"="+escape(s):eStat_er.W(opt+"CritereInconnu",1);}else eStat_er.W(opt+"CritereVide",1);};this.getAlt=function(){return alt;};this.isCyber=function(){return cyber;};this.hitcms=function(){return(v._R!="")||(v._S!="");};this.proto=function(){if(document.location.protocol.substring(0,5)=='https')this.secur();return _proto;};this.miss=function(vect){var tab=null;for(var i=0;i
');};imgLoadChk=function(img,tries){if(img.complete==true){return;};if(tries<=0){if(img.name=="0"){var img_url=img.src+'&jstimeout=1';var _IM2=new Image(1,1);_IM2.alt=img.alt;img.src="";delete img;_IM2.name="1";_IM2.src=img_url;imgLoadChk(_IM2,10);}return;};window.setTimeout(function(){imgLoadChk(img,tries-1);},500);};send=function(FT,t){var _IM=new Image(1,1);_IM.name="0";_IM.src=FT;switch(t){case "wap":_IM.alt=eStat_id.getAlt();break;default:break;};imgLoadChk(_IM,10);};get_S=function(t){var _S="";switch(t){case "wap":_S="http://prof.estat.com/m/wap/";break;default:_S=(eStat_id.isCyber())?"http://stat3.cybermonitor.com/":eStat_id.proto()+"prof.estat.com/m/web/";break;}return _S;};getTag=function(t){var ms=eStat_id.miss(v[t]);if(ms&&t!="cms"){var am="";for(var i=0;i-1){v.onReady();return}if(N.msi&&window==top){(function(){if(v.isReady){return}try{L.documentElement.doScroll("left")}catch(d){setTimeout(arguments.callee,0);return}v.onReady()})()}if(N.opr){L.addEventListener("DOMContentLoaded",function(){if(v.isReady){return}for(var d=0;d";s=p.getElementById("_atssh"+l)}b.opp(s.style);s.frameborder=s.style.border=0;s.style.top=s.style.left=0;return s},off:function(){return Math.floor((new Date().getTime()-f.sttm)/100).toString(16)},oms:function(d){var b=f;if(d&&d.data&&d.data.service){if(!b.upm){if(b.dcp){return}b.dcp=1}b.trk({gen:300,sh:d.data.service})}},omp:function(b,d,e){var a={};if(b){a.sh=b}if(d){a.cm=d}if(e){a.cs=e}f.img("sh","3",null,a)},trk:function(e){var d=f,i=d.dr,b=(d.rev||"");if(!e){return}if(i){i=i.split("http://").pop()}e.xck=_atc.xck?1:0;e.xxl=1;e.sid=d.ssid();e.pub=d.pub();e.ssl=d.ssl||0;e.du=d.tru(d.du||d.dl.href);if(d.dt){e.dt=d.dt}if(d.cb){e.cb=d.cb}e.lng=d.lng();e.ver=_atc.ver;if(!d.upm&&d.uid){e.uid=d.uid}e.pc=window.addthis_product||"men-"+_atc.ver;if(i){e.dr=d.tru(i)}if(d.dh){e.dh=d.dh}if(b){e.rev=b}if(d.xfr){if(d.upm){if(d.atf){d.atf.contentWindow.postMessage(m(e),"*")}}else{var l=d.get_atssh();base="static/r07/sh20.html"+(false?"?t="+new Date().getTime():"");if(d.atf){l.removeChild(l.firstChild)}d.atf=d.ctf();d.atf.src=_atr+base+"#"+m(e);l.appendChild(d.atf)}}else{f.qtp.push(e)}},img:function(l,r,b,p,q){if(!window.at_sub&&!_atc.xtr){var d=f,e=p||{};e.evt=l;if(b){e.ext=b}d.avt=e;if(q===1){d.xmi(true)}else{d.sxm(true)}}},cuid:function(){return((f.sttm/1000)&f.max).toString(16)+("00000000"+(Math.floor(Math.random()*(f.max+1))).toString(16)).slice(-8)},ssid:function(){if(f.sid===0){f.sid=f.cuid()}return f.sid},sta:function(){var b=f;return"AT-"+(b.pub()?b.pub():"unknown")+"/-/"+b.ab+"/"+b.ssid()+"/"+(b.seq++)+(b.uid!==null?"/"+b.uid:"")},cst:function(a){return"CXNID=2000001.521545608054043907"+(a||2)+"NXC"},fcv:function(b,a){return _euc(b)+"="+_euc(a)+";"+f.off()},cev:function(b,a){f.cvt.push(f.fcv(b,a));f.sxm(true)},sxm:function(a){if(f.tmo!==null){clearTimeout(f.tmo)}if(a){f.tmo=f.sto("_ate.xmi(false)",f.wait)}},xmi:function(r){var b=f,p=b.dl?b.dl.hostname:"";if(b.cvt.length>0||b.avt){b.sxm(false);if(_atc.xtr){return}var l=b.avt||{};l.ce=b.cvt.join(",");b.cvt=[];b.avt=null;b.trk(l);if(r){var q=document,e=q.ce("iframe");e.id="_atf";f.opp(e.style);q.body.appendChild(e);e=q.getElementById("_atf")}}}});J(f,{_rec:[],rec:function(e){if(!e){return}var q=j(e),b=f,d=b.atf,l=b._rec,w;if(q.ssh){b.ssh(q.ssh)}if(q.uid){b.uid=q.uid}if(q.dbm){b.dbm=q.dbm}if(q.rdy){b.xfr=1;b.xtp();return}for(var Q=0;Q=(i=i.charCodeAt(0)+13)?i:i-26)})}for(var p=0;p-1||i.indexOf(R.replace(/^ /g,""))===0){S|=r}}return S}function Q(){var U=(o.addthis_title||w.title),R=s(U),T=w.all?w.all.tags("META"):w.getElementsByTagName?w.getElementsByTagName("META"):new Array();if(T&&T.length){for(var S=0;S-1&&R.indexOf(_atd+"book")==-1){var w=[];var Z=R.substr(ac);Z=Z.split("&").shift().split("#").shift().split("=").pop();ae.sr=Z;if(ad.vamp>=0&&!ad.sub&&Z.length){w.push(ad.fcv("plv",Math.round(1/_atc.vamp)));w.push(ad.fcv("rsc",Z));ae.ce=w.join(",")}}if(ad.upm){ae.xd=1;if(f.bro.ffx){ae.xld=1}}if(p){if(ad.upm){if(q){f.sto(function(){Q();ad.atf=s=ad.ctf(d+m(ae))},f.wait);o.attachEvent("onmessage",ad.pmh)}else{s=ad.ctf();o.addEventListener("message",ad.pmh,false)}if(f.bro.ffx){s.src=d;f.qtp.push(ae)}else{if(!q){f.sto(function(){Q();s.src=d+m(ae)},f.wait)}}}else{s=ad.ctf();f.sto(function(){Q();s.src=d+m(ae)},f.wait)}if(s){ad.atf=s=ad.get_atssh().appendChild(s)}}if(o.addthis_language||M.ui_language){ad.alg()}if(ad.plo.length>0){ad.jlo()}}catch(ab){}}f.ed.addEventListener("addthis.menu.share",f.oms);o._ate=O;o._adr=v;try{var D=L.gn("script"),u=D[D.length-1],x=u.src.indexOf("#")>-1?u.src.replace(/^[^\#]+\#?/,""):u.src.replace(/^[^\?]+\??/,""),y=j(x);if(y.pub||y.username){o.addthis_pub=_duc(y.pub?y.pub:y.username)}if(o.addthis_pub&&o.addthis_config){o.addthis_config.username=o.addthis_pub}if(y.domready){_atc.dr=1}if(y.async){_atc.xol=1}if(_atc.ver===120){var C="atb"+f.cuid();L.write('');f.igv();f.lad(["span",C,addthis_share.url||"[url]",addthis_share.title||"[title]"])}if(o.addthis_clickout){f.lad(["cout"])}if(!_atc.xol&&!_atc.xcs&&M.ui_use_css!==false){f.acs(_atr+"static/r07/widget40.css")}}catch(K){}n.bindReady();n.append(h);(function(i,l,p){var d,w=i.util,b=i.event.EventDispatcher,r=25,e=[];function q(T,V,S){var R=[];function R(){R.push(arguments)}function U(){S[T]=V;while(R.length){V.apply(S,R.shift())}}R.ready=U;return R}function s(T){if(T&&T instanceof a){e.push(T)}for(var R=0;R-1){q.push(p)}}}else{u=u.replace(/\-/g,"\\-");var n=new RegExp("(^|\\s)"+u+(t?"\\w*":"")+"(\\s|$)");for(s=0;s-1){s=s.replace(/&([aeiou]).+;/g,"$1")}return s},customServices={},globalConfig=w.addthis_config,globalShare=w.addthis_share,upConfig={},upShare={},body=d.gn("body").item(0),mrg=function(o,n){if(n&&o!==n){for(var k in n){if(o[k]===u){o[k]=n[k]}}}},addevts=function(o,ss,au){var oldclick=o.onclick||function(){},genshare=function(){_ate.ed.fire("addthis.menu.share",window.addthis||{},{service:ss,url:o.share.url})};if(o.conf.data_ga_tracker||addthis_config.data_ga_tracker||o.conf.data_ga_property||addthis_config.data_ga_property){o.onclick=function(){_ate.gat(ss,au,o.conf,o.share);genshare();oldclick()}}else{o.onclick=function(){genshare();oldclick()}}},rpl=function(o,n){var r={};for(var k in o){if(n[k]){r[k]=n[k]}else{r[k]=o[k]}}return r},addthis=window.addthis,genieu=function(share){return"mailto:?subject="+_euc(share.title?share.title:"%20")+"&body="+_euc(share.title?share.title:"")+(share.title?"%0D%0A":"")+_euc(share.url)+"%0D%0A%0D%0AShared via AddThis.com"},b_title={email:"Email",mailto:"Email",print:"Print",favorites:"Save to Favorites",twitter:"Tweet This",digg:"Digg This",more:"View more services"},json={email_vars:1,modules:1,templates:1,services_custom:1},nosend={feed:1,more:1,email:1,mailto:1},nowindow={feed:1,email:1,mailto:1,print:1,more:1,favorites:1},a_config=["username","services_custom","services_exclude","services_compact","services_expanded","ui_click","ui_hide_embed","ui_delay","ui_hover_direction","ui_language","ui_offset_top","ui_offset_left","ui_header_color","ui_header_background","ui_icons","ui_cobrand","ui_use_embeddable_services","data_use_cookies","data_track_clickback","data_track_linkback"],a_share=["url","title","templates","email_template","email_vars","html","swfurl","iframeurl","width","height","modules","screenshot","author","description","content"],_uniquify=function(r){var a=[];var l=r.length;for(var i=0;i-1){o.firstChild.style.background="url("+customService.icon+") no-repeat top left"}}if(!nowindow[ss]){var t=_ate.trim,template=o.share.templates&&o.share.templates[ss]?o.share.templates[ss]:"",url=o.share.url||addthis_share.url,title=o.share.title||addthis_share.title,swfurl=o.share.swfurl||addthis_share.swfurl,width=o.share.width||addthis_share.width,height=o.share.height||addthis_share.height,description=o.share.description||addthis_share.description,screenshot=o.share.screenshot||addthis_share.screenshot;o.href="//"+_atd+"bookmark.php?pub="+t(addthis_config.username||o.conf.username||_ate.pub(),1)+"&v="+_atc.ver+"&source=tbx-"+_atc.ver+"&tt=0&s="+ss+"&url="+_euc(url||"")+"&title="+t(title||"",1)+"&content="+t(o.share.content||addthis_share.content||"",1)+(template?"&template="+_euc(template):"")+(o.conf.data_track_clickback||o.conf.data_track_linkback||(!_ate.pub())?"&sms_ss=1":"")+"&lng="+(o.conf.ui_language||_ate.lng()||"xy").split("-").shift()+(description?"&description="+t(description,1):"")+(swfurl?"&swfurl="+_euc(swfurl):"")+(attrs.issh?"&ips=1":"")+(width?"&width="+_euc(width):"")+(height?"&height="+_euc(height):"")+(screenshot?"&screenshot="+_euc(screenshot):"")+(customService&&customService.url?"&acn="+_euc(customService.name)+"&acc="+_euc(customService.code)+"&acu="+_euc(customService.url):"")+(_ate.uid?"&uid="+_euc(_ate.uid):"");addevts(o,ss,url);o.target="_blank";addthis.links.push(o)}else{if(ss=="mailto"||(ss=="email"&&(o.conf.ui_use_mailto||_ate.bro.iph||_ate.bro.ipa))){o.onclick=function(){};o.href=genieu(o.share);addevts(o,ss,url);addthis.ems.push(o)}}if(!o.title||o.at_titled){o.title=unaccent(b_title[ss]?b_title[ss]:"Send to "+addthis.util.getServiceName(ss,!customService));o.at_titled=1}}}var app;switch(internal){case"img":if(!o.hasChildNodes()){var lang=(o.conf.ui_language||_ate.lng()).split("-").shift(),validatedLang=_ate.ivl(lang);if(!validatedLang){lang="en"}else{if(validatedLang!==1){lang=validatedLang}}app=_makeButton(_ate.iwb(lang)?150:125,16,"Share",_atr+"static/btn/v2/lg-share-"+lang.substr(0,2)+".gif")}break}if(app){o.appendChild(app)}}}},buttons=addthis._gebcn(body,"A","addthis_button_",true,true),_renderToolbox=function(collection,config,share,reprocess){for(var i=0;i";var tm=b.firstChild;tm.src="//api.tweetmeme.com/button.js?url="+_euc(attr.share.url)+"&"+passthrough}else{if(sv==="facebook_like"){var fblike;passthrough=_ate.util.toKV(_parseThirdPartyAttributes(b,"fb:like"));if(!_ate.bro.msi){fblike=d.ce("iframe")}else{b.innerHTML='";fblike=b.firstChild}fblike.style.overflow="hidden";fblike.style.border="none";fblike.style.borderWidth="0px";fblike.style.width="82px";fblike.style.height="25px";fblike.style.marginTop="-2px";fblike.src="//www.facebook.com/plugins/like.php?href="+_euc(attr.share.url)+"&layout=button_count&show_faces=false&width=100&action=like&font=arial&"+passthrough;if(!_ate.bro.msi){b.appendChild(fblike)}}else{if(sv.indexOf("preferred")>-1){if(b._iss){continue}window.addthis_product="tbx-"+_atc.ver;s=c.match(/addthis_button_preferred_([0-9]+)(?:\s|$)/);var svidx=((s&&s.length)?Math.min(12,Math.max(1,parseInt(s[1]))):1)-1;if(window._atw){var excl=_atw.conf.services_exclude,locopts=_atw.loc,opts=_uniquify(addthis_options.replace(",more","").split(",").concat(locopts.split(",")));do{sv=opts[svidx++]}while((excl.indexOf(sv)>-1||(b.parentNode.services||{})[sv])&&svidx-1){if(!b.parentNode.services){b.parentNode.services={}}b.parentNode.services[sv]=1}if(!hc&&c.indexOf(a)==-1){b.className+=" "+a+"b"}options={singleservice:sv}}}if(b._ips){if(!options){options={}}options.issh=true}_render([b],attr,options);b.ost=1;window.addthis_product="tbx-"+_atc.ver}}}},gat=function(s,au,conf,share){var pageTracker=conf.data_ga_tracker,propertyId=conf.data_ga_property;if(propertyId&&typeof(window._gat)=="object"){pageTracker=_gat._getTracker(propertyId)}if(pageTracker&&typeof(pageTracker)=="string"){pageTracker=window[pageTracker]}if(pageTracker&&typeof(pageTracker)=="object"){var gaUrl=au||(share||{}).url||location.href;if(gaUrl.toLowerCase().replace("https","http").indexOf("http%3a%2f%2f")==0){gaUrl=_duc(gaUrl)}try{pageTracker._trackEvent("addthis",s,gaUrl)}catch(e){try{pageTracker._initData();pageTracker._trackEvent("addthis",s,gaUrl)}catch(e){}}}};_ate.gat=gat;addthis.update=function(which,what,value){if(which=="share"){if(!window.addthis_share){window.addthis_share={}}window.addthis_share[what]=value;upShare[what]=value;for(var i in addthis.links){var o=addthis.links[i],rx=new RegExp("&"+what+"=(.*)&"),ns="&"+what+"="+_euc(value)+"&";o.href=o.href.replace(rx,ns);if(o.href.indexOf(what)==-1){o.href+=ns}}for(var i in addthis.ems){var o=addthis.ems[i];o.href=genieu(addthis_share)}}else{if(which=="config"){if(!window.addthis_config){window.addthis_config={}}window.addthis_config[what]=value;upConfig[what]=value}}};addthis._render=_render;var rsrcs=[new _ate.resource.Resource("counter",_atr+"js/250/api.sharecounter.js",function(){return window.addthis.counter.ost}),new _ate.resource.Resource("countercss",_atr+"static/r07/counter40.css",function(){return true})];addthis.counter=function(what,config,share){if(what){what=addthis._select(what);if(what.length){for(var k in rsrcs){rsrcs[k].load()}}}};addthis.button=function(what,config,share){_render(what,{conf:config,share:share},{internal:"img"})};addthis.toolbox=function(what,config,share){var toolboxes=_select(what);for(var i=0;iB){delete a[d];_ate.cookie.sck("_atshc",o(a),0,1)}}},y=function(d){var a=_ate.cookie.rck("_atshc"),w=A(d)+1;u(d,w);if(!a){a={}}else{a=q(a)}if(a[d.url]){delete a[d.url]}a[_euc(d.url)]=w;_ate.cookie.sck("_atshc",o(a),0,1)},A=function(a){var d=0;if(a&&a.firstChild&&a.firstChild.firstChild){d=parseInt(a.firstChild.firstChild.nodeValue);if(isNaN(d)){d=0}}return d},u=function(d,D){if(!d){return}if(d.firstChild&&d.firstChild.nodeType==3){d.removeChild(d.firstChild)}if(!d.firstChild){var F=x.ce("a"),B=x.ce("a"),E=x.ce("span"),a=x.createTextNode("Share"),w=d.addthis_conf||{},C=d.addthis_share||{};F.className="addthis_button_expanded";B.className="atc_s addthis_button_compact";d.appendChild(F);d.appendChild(B);B.appendChild(E);E.appendChild(a);w.ui_offset_top=18;w.ui_offset_left=-4;addthis.button(B,w,C);addthis._render([F],{conf:w,share:C},{nohover:true,singleservice:"more"})}if(d.firstChild.firstChild){d.firstChild.removeChild(d.firstChild.firstChild)}D=x.createTextNode(D);d.firstChild.appendChild(D)},b=function(a,d){u(a,i(d))},f=[],l=function(a,B,C){var d=0,w=g(a.url);if(B.error){d="?"}else{d=B.shares}if(!isNaN(w)&&((isNaN(d)&&w>0)||w>d)){d=w}c(a.url,d);C(a,d)},m={},t={},v=function(a,w){if(!t[a.url]){t[a.url]=[]}t[a.url].push(a);if(m[a.url]){w(a,m[a.url])}else{_ate.ed.addEventListener("addthis.menu.share",function(B){try{if(B.data.service&&B.data.url==a.url){y(a)}}catch(B){}});var d="sc_"+encodeURIComponent(a.url).replace(/[0-3][A-Z]|[^a-zA-Z0-9]/g,"");if(!_ate.cbs){_ate.cbs={}}if(!_ate.cbs[d]){_ate.cbs[d]=function(C){if(s){img=new Image();z.imgz.push(img);img.src="//l.addthiscdn.com/live/t00/mu.gif?a=sc&t="+((new Date()).getTime()-_ate.cbs["time_"+d])}if(C&&!C.error&&C.shares){m[a.url]=C.shares}for(var B=0;B-1?addthis.util.getAttributes(a.parentNode,w,D):null,d=addthis.util.getAttributes(a,C?C.conf:w,C?C.share:D,true);if(!a.ost){a.url=d.share.url||(n.addthis_share||{}).url;a.addthis_conf=d.conf;a.addthis_share=d.share;a.ost=1;u(a,"--");v(a,function(F,G){b(F,G)})}}}};addthis.addEventListener("addthis.ready",function(){addthis.counter=function(w,a,d){h(w,a,d)};addthis.counter.ost=1;addthis.counter(".addthis_counter")});return addthis})()});_ate.extend(addthis,{user:(function(){var f=_ate,c=addthis,g={},d=0,j;function i(a,k){return f.reduce(["getID","getServiceShareHistory"],a,k)}function h(a,k){return function(l){setTimeout(function(){l(f[a]||k)},0)}}function b(){if(d){return}if(j!==null){clearTimeout(j)}j=null;d=1;i(function(l,a,k){g[a]=g[a].queuer.flush(h.apply(c,l[k]),c);return l},[["uid",""],["_ssh",[]]])}f._rec.push(b);j=setTimeout(b,5000);g.getPreferredServices=function(a){if(window._atw){a(addthis_options.split(","))}else{f.plo.push(["pref",a]);_ate.alg();if(f.gssh){f.pld=f.ajs("static/r07/menu57.js")}else{if(!f.pld){f.pld=1;_ate._rec.push(function(k){if(k.ssh){_ate.pld=_ate.ajs("static/r07/menu57.js")}})}}}};return i(function(k,a){k[a]=(new c._Queuer(a)).call;return k},g)})()}); \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/ajax-responder.js --- a/test/emission_fichiers/ajax-responder.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,347 +0,0 @@ -// $Id: ajax-responder.js,v 1.18.2.6 2010/01/22 06:48:08 merlinofchaos Exp $ -/** - * @file - * - * CTools flexible AJAX responder object. - */ - -(function ($) { - Drupal.CTools = Drupal.CTools || {}; - Drupal.CTools.AJAX = Drupal.CTools.AJAX || {}; - Drupal.CTools.AJAX.commands = Drupal.CTools.AJAX.commands || {}; - - /** - * Success callback for an ajax request. - * - * This function expects to receive a packet of data from a JSON object - * which is essentially a list of commands. Each commands must have a - * 'command' setting and this setting must resolve to a function in the - * Drupal.CTools.AJAX.commands space. - */ - Drupal.CTools.AJAX.respond = function(data) { - for (i in data) { - if (data[i]['command'] && Drupal.CTools.AJAX.commands[data[i]['command']]) { - Drupal.CTools.AJAX.commands[data[i]['command']](data[i]); - } - } - }; - - /** - * Generic replacement click handler to open the modal with the destination - * specified by the href of the link. - */ - Drupal.CTools.AJAX.clickAJAXLink = function() { - if ($(this).hasClass('ctools-ajaxing')) { - return false; - } - - var url = $(this).attr('href'); - var object = $(this); - $(this).addClass('ctools-ajaxing'); - try { - url = url.replace(/nojs/g, 'ajax'); - $.ajax({ - type: "POST", - url: url, - data: { 'js': 1, 'ctools_ajax': 1 }, - global: true, - success: Drupal.CTools.AJAX.respond, - error: function(xhr) { - Drupal.CTools.AJAX.handleErrors(xhr, url); - }, - complete: function() { - object.removeClass('ctools-ajaxing'); - }, - dataType: 'json' - }); - } - catch (err) { - alert("An error occurred while attempting to process " + url); - $(this).removeClass('ctools-ajaxing'); - return false; - } - - return false; - }; - - /** - * Generic replacement click handler to open the modal with the destination - * specified by the href of the link. - */ - Drupal.CTools.AJAX.clickAJAXButton = function() { - if ($(this).hasClass('ctools-ajaxing')) { - return false; - } - - // Put our button in. - this.form.clk = this; - - var url = Drupal.CTools.AJAX.findURL(this); - $(this).addClass('ctools-ajaxing'); - var object = $(this); - try { - if (url) { - url = url.replace('/nojs/', '/ajax/'); - $.ajax({ - type: "POST", - url: url, - data: { 'js': 1, 'ctools_ajax': 1 }, - global: true, - success: Drupal.CTools.AJAX.respond, - error: function(xhr) { - Drupal.CTools.AJAX.handleErrors(xhr, url); - }, - complete: function() { - object.removeClass('ctools-ajaxing'); - }, - dataType: 'json' - }); - } - else { - var form = this.form; - url = $(form).attr('action'); - url = url.replace('/nojs/', '/ajax/'); - $(form).ajaxSubmit({ - type: "POST", - url: url, - data: { 'js': 1, 'ctools_ajax': 1 }, - global: true, - success: Drupal.CTools.AJAX.respond, - error: function(xhr) { - Drupal.CTools.AJAX.handleErrors(xhr, url); - }, - complete: function() { - object.removeClass('ctools-ajaxing'); - }, - dataType: 'json' - }); - } - } - catch (err) { - alert("An error occurred while attempting to process " + url); - $(this).removeClass('ctools-ajaxing'); - return false; - } - return false; - }; - - /** - * Display error in a more fashion way - */ - Drupal.CTools.AJAX.handleErrors = function(xhr, path) { - var error_text = ''; - - if ((xhr.status == 500 && xhr.responseText) || xhr.status == 200) { - error_text = xhr.responseText; - - // Replace all < and > by < and > - error_text = error_text.replace("/&(lt|gt);/g", function (m, p) { - return (p == "lt")? "<" : ">"; - }); - - // Now, replace all html tags by empty spaces - error_text = error_text.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,""); - - // Fix end lines - error_text = error_text.replace(/[\n]+\s+/g,"\n"); - } - else if (xhr.status == 500) { - error_text = xhr.status + ': ' + Drupal.t("Internal server error. Please see server or PHP logs for error information."); - } - else { - error_text = xhr.status + ': ' + xhr.statusText; - } - - alert(Drupal.t("An error occurred at @path.\n\nError Description: @error", {'@path': path, '@error': error_text})); - } - - /** - * Generic replacement for change handler to execute ajax method. - */ - Drupal.CTools.AJAX.changeAJAX = function () { - if ($(this).hasClass('ctools-ajaxing')) { - return false; - } - - var url = Drupal.CTools.AJAX.findURL(this); - $(this).addClass('ctools-ajaxing'); - var object = $(this); - var form_id = $(object).parents('form').get(0).id; - try { - if (url) { - url = url.replace('/nojs/', '/ajax/'); - $.ajax({ - type: "POST", - url: url, - data: {'ctools_changed': $(this).val(), 'js': 1, 'ctools_ajax': 1 }, - global: true, - success: Drupal.CTools.AJAX.respond, - error: function(xhr) { - Drupal.CTools.AJAX.handleErrors(xhr, url); - }, - complete: function() { - object.removeClass('ctools-ajaxing'); - if ($(object).hasClass('ctools-ajax-submit-onchange')) { - $('form#' + form_id).submit(); - } - }, - dataType: 'json' - }); - } - else { - if ($(object).hasClass('ctools-ajax-submit-onchange')) { - $('form#' + form_id).submit(); - } - return false; - } - } - catch (err) { - alert("An error occurred while attempting to process " + url); - $(this).removeClass('ctools-ajaxing'); - return false; - } - return false; - }; - - /** - * Find a URL for an AJAX button. - * - * The URL for this gadget will be composed of the values of items by - * taking the ID of this item and adding -url and looking for that - * class. They need to be in the form in order since we will - * concat them all together using '/'. - */ - Drupal.CTools.AJAX.findURL = function(item) { - var url = ''; - var url_class = '.' + $(item).attr('id') + '-url'; - $(url_class).each( - function() { - if (url && $(this).val()) { - url += '/'; - } - url += $(this).val(); - }); - return url; - }; - - Drupal.CTools.AJAX.commands.prepend = function(data) { - $(data.selector).prepend(data.data); - Drupal.attachBehaviors($(data.selector)); - }; - - Drupal.CTools.AJAX.commands.append = function(data) { - $(data.selector).append(data.data); - Drupal.attachBehaviors($(data.selector)); - }; - - Drupal.CTools.AJAX.commands.replace = function(data) { - $(data.selector).replaceWith(data.data); - Drupal.attachBehaviors($(data.selector)); - }; - - Drupal.CTools.AJAX.commands.after = function(data) { - var object = $(data.data); - $(data.selector).after(object); - Drupal.attachBehaviors(object); - }; - - Drupal.CTools.AJAX.commands.before = function(data) { - var object = $(data.data); - $(data.selector).before(object); - Drupal.attachBehaviors(object); - }; - - Drupal.CTools.AJAX.commands.html = function(data) { - $(data.selector).html(data.data); - Drupal.attachBehaviors($(data.selector)); - }; - - Drupal.CTools.AJAX.commands.remove = function(data) { - $(data.selector).remove(); - }; - - Drupal.CTools.AJAX.commands.changed = function(data) { - if (!$(data.selector).hasClass('changed')) { - $(data.selector).addClass('changed'); - if (data.star) { - $(data.selector).find(data.star).append(' * '); - } - } - }; - - Drupal.CTools.AJAX.commands.alert = function(data) { - alert(data.text, data.title); - }; - - Drupal.CTools.AJAX.commands.css = function(data) { - /* - if (data.selector && data.selector.contains('* html ')) { - // This indicates an IE hack and we should only do it if we are IE. - if (!jQuery.browser.msie) { - return; - } - data.selector = data.selector.replace('* html ', ''); - } - */ - $(data.selector).css(data.argument); - }; - - Drupal.CTools.AJAX.commands.settings = function(data) { - $.extend(Drupal.settings, data.argument); - }; - - Drupal.CTools.AJAX.commands.data = function(data) { - $(data.selector).data(data.name, data.value); - }; - - Drupal.CTools.AJAX.commands.attr = function(data) { - $(data.selector).attr(data.name, data.value); - }; - - Drupal.CTools.AJAX.commands.restripe = function(data) { - // :even and :odd are reversed because jquery counts from 0 and - // we count from 1, so we're out of sync. - $('tbody tr:not(:hidden)', $(data.selector)) - .removeClass('even') - .removeClass('odd') - .filter(':even') - .addClass('odd') - .end() - .filter(':odd') - .addClass('even'); - }; - - Drupal.CTools.AJAX.commands.redirect = function(data) { - location.href = data.url; - }; - - Drupal.CTools.AJAX.commands.reload = function(data) { - location.reload(); - }; - - Drupal.CTools.AJAX.commands.submit = function(data) { - $(data.selector).submit(); - } - - - /** - * Bind links that will open modals to the appropriate function. - */ - Drupal.behaviors.CToolsAJAX = function(context) { - // Bind links - $('a.ctools-use-ajax:not(.ctools-use-ajax-processed)', context) - .addClass('ctools-use-ajax-processed') - .click(Drupal.CTools.AJAX.clickAJAXLink); - - // Bind buttons - $('input.ctools-use-ajax:not(.ctools-use-ajax-processed), button.ctools-use-ajax:not(.ctools-use-ajax-processed)', context) - .addClass('ctools-use-ajax-processed') - .click(Drupal.CTools.AJAX.clickAJAXButton); - - // Bind select - $('select, input:text, input:radio, input:checkbox', context) - .filter('.ctools-use-ajax-onchange:not(.ctools-use-ajax-processed)') - .addClass('ctools-use-ajax-processed') - .change(Drupal.CTools.AJAX.changeAJAX); - }; -})(jQuery); diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/baudin.jpg Binary file test/emission_fichiers/baudin.jpg has changed diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/comment.js --- a/test/emission_fichiers/comment.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -// $Id: comment.js,v 1.5 2007/09/12 18:29:32 goba Exp $ - -Drupal.behaviors.comment = function (context) { - var parts = new Array("name", "homepage", "mail"); - var cookie = ''; - for (i=0;i<3;i++) { - cookie = Drupal.comment.getCookie('comment_info_' + parts[i]); - if (cookie != '') { - $("#comment-form input[name=" + parts[i] + "]:not(.comment-processed)", context) - .val(cookie) - .addClass('comment-processed'); - } - } -}; - -Drupal.comment = {}; - -Drupal.comment.getCookie = function(name) { - var search = name + '='; - var returnValue = ''; - - if (document.cookie.length > 0) { - offset = document.cookie.indexOf(search); - if (offset != -1) { - offset += search.length; - var end = document.cookie.indexOf(';', offset); - if (end == -1) { - end = document.cookie.length; - } - returnValue = decodeURIComponent(document.cookie.substring(offset, end).replace(/\+/g, '%20')); - } - } - - return returnValue; -}; diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/css_8af77a07a1f960afe4e4736580827c7c.css --- a/test/emission_fichiers/css_8af77a07a1f960afe4e4736580827c7c.css Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -.header-footer{display:none;} \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/css_bf9cf64d750be06f6006828a2bed7b98.css --- a/test/emission_fichiers/css_bf9cf64d750be06f6006828a2bed7b98.css Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -.header-footer{font-family:'FreeSans','Arial';font-size:11pt;}.clearer{clear:both;height:0;width:0;} -#header-commun{margin:7px 0 0px 0;padding:0 0 0px;border-bottom:1px solid #DDDDDD;}body.blogs #header-commun{margin:7px 0 12px 0;}#header-content{ -width:1000px;margin:0 auto;}#header-commun ul{margin:0 auto 3px auto;padding:0; -float:left;}#header-commun li{display:inline;list-style-type:circle;background:transparent url(/sites/all/themes/franceculture/images/circle.png) no-repeat scroll 0 2px;padding:0 6px 0 24px;}#header-commun li.first-header{list-style-type:none;background:transparent none repeat scroll 0 0;padding-left:0;}#header-commun li.last-header{padding-right:0;}#header-commun li a{text-decoration:none;color:#000000;font-weight:normal;}#header-commun li a:hover{text-decoration:underline;}#header-commun li a:visited{} -#header-commun form{float:left;}#header-commun form input{margin:0;padding:0;float:left;}#header-commun form #recherche_site{background-image:url(/sites/all/themes/franceculture/images/input.png);background-repeat:no-repeat;border:medium none;height:21px;padding:3px 0 3px 5px;}#header-commun form #submit_recherche{background:transparent url(/sites/all/themes/franceculture/images/submit.png) no-repeat scroll 0 0;border:none;color:#FFFFFF;font-size:9pt;font-weight:bold;height:22px;padding:0 0 5px;width:22px;} - - -#footer-commun{background:transparent url(/sites/all/themes/franceculture/images/fondu.png) repeat-x scroll 0 0;padding:0px 0 0 0;}.content-header-footer{padding:25px 0 0 0;background-color:#ffffff;}#footer-commun li{list-style-type:none;}.footer-franceculture a{color:#000000;text-decoration:none;font-weight:normal;}#footer-chaine{margin:0 auto;padding:0 0 10px 0;width:1000px;font-size:12px;}#sous-footer{border-top:1px solid #929292;}#footer-rf{margin:0 auto;padding:15px 0 0 0;width:1000px;}#footer-rf a:hover{color:#1454a1;} -.colonne-footer{float:left;margin-left:35px;}.colonne-footer-first{margin-left:0;}.colonne-footer h4{font-size:13pt;margin:0 0 10px;padding:0;color:#000000;}.colonne-footer ul{margin:0;padding:0;}.colonne-footer li{margin:0;padding:2px 0;} -#colonne-liens-footer{width:95px;}#colonne-liens-footer img{border:none;}#colonne-liens-footer p{margin:7px 0;}#colonne-liens-footer p a{background-color:#f0f0f0;padding:3px;}#colonne-liens-footer p a:hover{color:#ffffff;background-color:#aaaaaa;} -#colonne-ecouter-footer{width:90px;} -#colonne-thematique-footer{width:500px;height:1px;}#colonne-thematique-footer li{color:#929292;}#colonne-thematique-footer a:hover{color:#000000;font-weight:bold;text-decoration:underline;} -#colonne-partager-footer{width:205px;color:#929292;}#colonne-partager-footer div{margin-bottom:10px;}#liens-partage-footer li{padding:4px 0;width:102px;}#liens-partage-footer ul.gauche li{float:left;}#liens-partage-footer ul.gauche li.clearer{width:0;float:none;}#liens-partage-footer a{padding:0 0 2px 25px;}#facebook-footer a{background:transparent url(/sites/all/themes/franceculture/images/facebook-gris.png) no-repeat scroll 0 0;}#facebook-footer a:hover{background:transparent url(/sites/all/themes/franceculture/images/facebook-footer.png) no-repeat scroll 0 0;}#twitter-footer a{background:transparent url(/sites/all/themes/franceculture/images/twitter-gris.png) no-repeat scroll 0 0;}#twitter-footer a:hover{background:transparent url(/sites/all/themes/franceculture/images/twitter.png) no-repeat scroll 0 0;}#dailymotion-footer a{background:transparent url(/sites/all/themes/franceculture/images/dailymotion-gris.png) no-repeat scroll 0 0;}#dailymotion-footer a:hover{background:transparent url(/sites/all/themes/franceculture/images/dailymotion.png) no-repeat scroll 0 0;}#autres-footer a{background:transparent url(/sites/all/themes/franceculture/images/autres-gris.png) no-repeat scroll 0 0;}#autres-footer a:hover{background:transparent url(/sites/all/themes/franceculture/images/autres.png) no-repeat scroll 0 0;} -#footer-rf ul{margin:0;padding:0 10px 0 0;}#footer-rf li{display:inline;border-left:1px solid #000000;margin:0;padding:0 10px;}#footer-rf li.first{border:none;padding:0 10px 0 0;}#footer-rf li.last{padding:0 40px 0 10px;}#footer-rf .haut-de-page{background:transparent url(/sites/all/themes/franceculture/images/top.png) no-repeat scroll bottom left;font-size:10pt;padding:0 0 0 13px;}#footer-rf .last-page{border:none;float:right;margin-right:103px;}#footer-rf p{color:#929292;font-size:10pt;padding:5px 0 25px 0;margin:0;} - -.footer-franceculture a:hover,.footer-franceculture:hover,#footer-rf a#top-page:hover,.footer-franceculture .color-chaine a,.footer-franceculture .color-chaine{color:#773694;}a.gris{color:#929292;} -#pub-bottom-right{width:728px;} \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/css_e94d821d2c09c140834405452127e5ae.css --- a/test/emission_fichiers/css_e94d821d2c09c140834405452127e5ae.css Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,390 +0,0 @@ -.flickr_badge_wrapper{display:block;width:216px;margin:auto}.flickr_badge_image{float:left;width:100px;padding-right:8px;padding-top:8px;height:75px;overflow:hidden;}.flickr_badge_source{float:left;width:100px;padding-right:8px;padding-top:25px;}.flickr_badge_uber_wrapper{text-align:center;}.flickr_badge_source_txt{font-size:11px;}.twitterBlock ul li{list-style:none;padding:5px;margin:0;background-image:none;background-color:#ffffff;color:#575757;}.block .twitterBlock ul{padding:2px;margin:0;}.block .twitterUser{font-family:'Lucida Grande',sans-serif;font-size:15px;font-weight:normal;}.widget_ytb{width:264px;}.widget_ytb .ytb_vide_list{width:264px;display:block;}.widget_ytb .ytb_vide_list .ytb_item{width:88px;float:left;margin:0;padding:0;height:64px;}.widget_ytb .ytb_vide_list .ytb_item:hover{width:86px;float:left;margin:0;padding:0;height:62px;border:black solid 1px;} - -.node-unpublished{background-color:#fff4f4;}.preview .node{background-color:#ffffea;}#node-admin-filter ul{list-style-type:none;padding:0;margin:0;width:100%;}#node-admin-buttons{float:left; - margin-left:0.5em; - clear:right;}td.revision-current{background:#ffc;}.node-form .form-text{display:block;width:95%;}.node-form .container-inline .form-text{display:inline;width:auto;}.node-form .standard{clear:both;}.node-form textarea{display:block;width:95%;}.node-form .attachments fieldset{float:none;display:block;}.terms-inline{display:inline;} - - -fieldset{margin-bottom:1em;padding:.5em;}form{margin:0;padding:0;}hr{height:1px;border:1px solid gray;}img{border:0;}table{border-collapse:collapse;}th{text-align:left; - padding-right:1em; - border-bottom:3px solid #ccc;} -.clear-block:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.clear-block{display:inline-block;}/* Hides from IE-mac \*/ -* html .clear-block{height:1%;}.clear-block{display:block;} - - - -body.drag{cursor:move;}th.active img{display:inline;}tr.even,tr.odd{background-color:#eee;border-bottom:1px solid #ccc;padding:0.1em 0.6em;}tr.drag{background-color:#fffff0;}tr.drag-previous{background-color:#ffd;}td.active{background-color:#ddd;}td.checkbox,th.checkbox{text-align:center;}tbody{border-top:1px solid #ccc;}tbody th{border-bottom:1px solid #ccc;}thead th{text-align:left; - padding-right:1em; - border-bottom:3px solid #ccc;} -.breadcrumb{padding-bottom:.5em}div.indentation{width:20px;height:1.7em;margin:-0.4em 0.2em -0.4em -0.4em; - padding:0.42em 0 0.42em 0.6em; - float:left;}div.tree-child{background:url(/misc/tree.png) no-repeat 11px center;}div.tree-child-last{background:url(/misc/tree-bottom.png) no-repeat 11px center;}div.tree-child-horizontal{background:url(/misc/tree.png) no-repeat -11px center;}.error{color:#e55;}div.error{border:1px solid #d77;}div.error,tr.error{background:#fcc;color:#200;padding:2px;}.warning{color:#e09010;}div.warning{border:1px solid #f0c020;}div.warning,tr.warning{background:#ffd;color:#220;padding:2px;}.ok{color:#008000;}div.ok{border:1px solid #00aa00;}div.ok,tr.ok{background:#dfd;color:#020;padding:2px;}.item-list .icon{color:#555;float:right; - padding-left:0.25em; - clear:right;}.item-list .title{font-weight:bold;}.item-list ul{margin:0 0 0.75em 0;padding:0;}.item-list ul li{margin:0 0 0.25em 1.5em; - padding:0;list-style:disc;}ol.task-list li.active{font-weight:bold;}.form-item{margin-top:1em;margin-bottom:1em;}tr.odd .form-item,tr.even .form-item{margin-top:0;margin-bottom:0;white-space:nowrap;}tr.merge-down,tr.merge-down td,tr.merge-down th{border-bottom-width:0 !important;}tr.merge-up,tr.merge-up td,tr.merge-up th{border-top-width:0 !important;}.form-item input.error,.form-item textarea.error,.form-item select.error{border:2px solid red;}.form-item .description{font-size:0.85em;}.form-item label{display:block;font-weight:bold;}.form-item label.option{display:inline;font-weight:normal;}.form-checkboxes,.form-radios{margin:1em 0;}.form-checkboxes .form-item,.form-radios .form-item{margin-top:0.4em;margin-bottom:0.4em;}.marker,.form-required{color:#f00;}.more-link{text-align:right;}.more-help-link{font-size:0.85em;text-align:right;}.nowrap{white-space:nowrap;}.item-list .pager{clear:both;text-align:center;}.item-list .pager li{background-image:none;display:inline;list-style-type:none;padding:0.5em;}.pager-current{font-weight:bold;}.tips{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;font-size:0.9em;}dl.multiselect dd.b,dl.multiselect dd.b .form-item,dl.multiselect dd.b select{font-family:inherit;font-size:inherit;width:14em;}dl.multiselect dd.a,dl.multiselect dd.a .form-item{width:8em;}dl.multiselect dt,dl.multiselect dd{float:left; - line-height:1.75em;padding:0;margin:0 1em 0 0;}dl.multiselect .form-item{height:1.75em;margin:0;} -.container-inline div,.container-inline label{display:inline;} -ul.primary{border-collapse:collapse;padding:0 0 0 1em; - white-space:nowrap;list-style:none;margin:5px;height:auto;line-height:normal;border-bottom:1px solid #bbb;}ul.primary li{display:inline;}ul.primary li a{background-color:#ddd;border-color:#bbb;border-width:1px;border-style:solid solid none solid;height:auto;margin-right:0.5em; - padding:0 1em;text-decoration:none;}ul.primary li.active a{background-color:#fff;border:1px solid #bbb;border-bottom:#fff 1px solid;}ul.primary li a:hover{background-color:#eee;border-color:#ccc;border-bottom-color:#eee;}ul.secondary{border-bottom:1px solid #bbb;padding:0.5em 1em;margin:5px;}ul.secondary li{display:inline;padding:0 1em;border-right:1px solid #ccc;}ul.secondary a{padding:0;text-decoration:none;}ul.secondary a.active{border-bottom:4px solid #999;} - -#autocomplete{position:absolute;border:1px solid;overflow:hidden;z-index:100;}#autocomplete ul{margin:0;padding:0;list-style:none;}#autocomplete li{background:#fff;color:#000;white-space:pre;cursor:default;}#autocomplete li.selected{background:#0072b9;color:#fff;} -html.js input.form-autocomplete{background-image:url(/misc/throbber.gif);background-repeat:no-repeat;background-position:100% 2px;}html.js input.throbbing{background-position:100% -18px;} -html.js fieldset.collapsed{border-bottom-width:0;border-left-width:0;border-right-width:0;margin-bottom:0;height:1em;}html.js fieldset.collapsed *{display:none;}html.js fieldset.collapsed legend{display:block;}html.js fieldset.collapsible legend a{padding-left:15px; - background:url(/misc/menu-expanded.png) 5px 75% no-repeat;}html.js fieldset.collapsed legend a{background-image:url(/misc/menu-collapsed.png); - background-position:5px 50%;} -* html.js fieldset.collapsed legend,* html.js fieldset.collapsed legend *,* html.js fieldset.collapsed table *{display:inline;} -html.js fieldset.collapsible{position:relative;}html.js fieldset.collapsible legend a{display:block;} -html.js fieldset.collapsible .fieldset-wrapper{overflow:auto;} -.resizable-textarea{width:95%;}.resizable-textarea .grippie{height:9px;overflow:hidden;background:#eee url(/misc/grippie.png) no-repeat center 2px;border:1px solid #ddd;border-top-width:0;cursor:s-resize;}html.js .resizable-textarea textarea{margin-bottom:0;width:100%;display:block;} -.draggable a.tabledrag-handle{cursor:move;float:left; - height:1.7em;margin:-0.4em 0 -0.4em -0.5em; - padding:0.42em 1.5em 0.42em 0.5em; - text-decoration:none;}a.tabledrag-handle:hover{text-decoration:none;}a.tabledrag-handle .handle{margin-top:4px;height:13px;width:13px;background:url(/misc/draggable.png) no-repeat 0 0;}a.tabledrag-handle-hover .handle{background-position:0 -20px;} -.joined + .grippie{height:5px;background-position:center 1px;margin-bottom:-2px;} -.teaser-checkbox{padding-top:1px;}div.teaser-button-wrapper{float:right; - padding-right:5%; - margin:0;}.teaser-checkbox div.form-item{float:right; - margin:0 5% 0 0; - padding:0;}textarea.teaser{display:none;}html.js .no-js{display:none;} -.progress{font-weight:bold;}.progress .bar{background:#fff url(/misc/progress.gif);border:1px solid #00375a;height:1.5em;margin:0 0.2em;}.progress .filled{background:#0072b9;height:1em;border-bottom:0.5em solid #004a73;width:0%;}.progress .percentage{float:right;}.progress-disabled{float:left;}.ahah-progress{float:left;}.ahah-progress .throbber{width:15px;height:15px;margin:2px;background:transparent url(/misc/throbber.gif) no-repeat 0px -18px;float:left;}tr .ahah-progress .throbber{margin:0 2px;}.ahah-progress-bar{width:16em;} -#first-time strong{display:block;padding:1.5em 0 .5em;} -tr.selected td{background:#ffc;} -table.sticky-header{margin-top:0;background:#fff;} -#clean-url.install{display:none;} -html.js .js-hide{display:none;} -#system-modules div.incompatible{font-weight:bold;} -#system-themes-form div.incompatible{font-weight:bold;} -span.password-strength{visibility:hidden;}input.password-field{margin-right:10px;}div.password-description{padding:0 2px;margin:4px 0 0 0;font-size:0.85em;max-width:500px;}div.password-description ul{margin-bottom:0;}.password-parent{margin:0 0 0 0;} -input.password-confirm{margin-right:10px;}.confirm-parent{margin:5px 0 0 0;}span.password-confirm{visibility:hidden;}span.password-confirm span{font-weight:normal;} - -ul.menu{list-style:none;border:none;text-align:left;}ul.menu li{margin:0 0 0 0.5em;}li.expanded{list-style-type:circle;list-style-image:url(/misc/menu-expanded.png);padding:0.2em 0.5em 0 0; - margin:0;}li.collapsed{list-style-type:disc;list-style-image:url(/misc/menu-collapsed.png); - padding:0.2em 0.5em 0 0; - margin:0;}li.leaf{list-style-type:square;list-style-image:url(/misc/menu-leaf.png);padding:0.2em 0.5em 0 0; - margin:0;}li a.active{color:#000;}td.menu-disabled{background:#ccc;}ul.links{margin:0;padding:0;}ul.links.inline{display:inline;}ul.links li{display:inline;list-style-type:none;padding:0 0.5em;}.block ul{margin:0;padding:0 0 0.25em 1em;} - -#permissions td.module{font-weight:bold;}#permissions td.permission{padding-left:1.5em;}#access-rules .access-type,#access-rules .rule-type{margin-right:1em; - float:left;}#access-rules .access-type .form-item,#access-rules .rule-type .form-item{margin-top:0;}#access-rules .mask{clear:both;}#user-login-form{text-align:center;}#user-admin-filter ul{list-style-type:none;padding:0;margin:0;width:100%;}#user-admin-buttons{float:left; - margin-left:0.5em; - clear:right;}#user-admin-settings fieldset .description{font-size:0.85em;padding-bottom:.5em;} -.profile{clear:both;margin:1em 0;}.profile .picture{float:right; - margin:0 1em 1em 0;}.profile h3{border-bottom:1px solid #ccc;}.profile dl{margin:0 0 1.5em 0;}.profile dt{margin:0 0 0.2em 0;font-weight:bold;}.profile dd{margin:0 0 1em 0;} - - -.field .field-label,.field .field-label-inline,.field .field-label-inline-first{font-weight:bold;}.field .field-label-inline,.field .field-label-inline-first{display:inline;}.field .field-label-inline{visibility:hidden;} -.node-form .content-multiple-table td.content-multiple-drag{width:30px;padding-right:0;}.node-form .content-multiple-table td.content-multiple-drag a.tabledrag-handle{padding-right:.5em;}.node-form .content-add-more .form-submit{margin:0;}.content-multiple-remove-button{display:block;float:right;height:14px;width:16px;margin:2px 0 1px 0;padding:0;background:transparent url(/sites/all/modules/contrib/cck/images/remove.png) no-repeat 0 0;border-bottom:#C2C9CE 1px solid;border-right:#C2C9CE 1px solid;}.content-multiple-remove-button:hover{background-position:0 -14px;}.content-multiple-removed-row .content-multiple-remove-button{background-position:0 -28px;}.content-multiple-removed-row .content-multiple-remove-button:hover{background-position:0 -42px;}html.js .content-multiple-removed-row{background-color:#ffffcc;}.content-multiple-weight-header,.content-multiple-remove-header,.content-multiple-remove-cell,.content-multiple-table td.delta-order{text-align:center;}html.js .content-multiple-weight-header,html.js .content-multiple-remove-header span,html.js .content-multiple-table td.delta-order,html.js .content-multiple-remove-checkbox{display:none;}.node-form .number{display:inline;width:auto;}.node-form .text{width:auto;} -.form-item #autocomplete .reference-autocomplete{white-space:normal;}.form-item #autocomplete .reference-autocomplete label{display:inline;font-weight:normal;} -#content-field-overview-form .advanced-help-link,#content-display-overview-form .advanced-help-link{margin:4px 4px 0 0;}#content-field-overview-form .label-group,#content-display-overview-form .label-group,#content-copy-export-form .label-group{font-weight:bold;}table#content-field-overview .label-add-new-field,table#content-field-overview .label-add-existing-field,table#content-field-overview .label-add-new-group{float:left;}table#content-field-overview tr.content-add-new .tabledrag-changed{display:none;}table#content-field-overview tr.content-add-new .description{margin-bottom:0;}table#content-field-overview .content-new{font-weight:bold;padding-bottom:.5em;} -.advanced-help-topic h3,.advanced-help-topic h4,.advanced-help-topic h5,.advanced-help-topic h6{margin:1em 0 .5em 0;}.advanced-help-topic dd{margin-bottom:.5em;}.advanced-help-topic span.code{background-color:#EDF1F3;font-family:"Bitstream Vera Sans Mono",Monaco,"Lucida Console",monospace;font-size:0.9em;padding:1px;}.advanced-help-topic .content-border{border:1px solid #AAA} -.ctools-locked{color:red;border:1px solid red;padding:1em;}.ctools-owns-lock{background:#FFFFDD none repeat scroll 0 0;border:1px solid #F0C020;padding:1em;}a.ctools-ajaxing,input.ctools-ajaxing,select.ctools-ajaxing{padding-right:18px !important;background:url(/sites/all/modules/contrib/ctools/images/status-active.gif) right center no-repeat;}div.ctools-ajaxing{float:left;width:18px;background:url(/sites/all/modules/contrib/ctools/images/status-active.gif) center center no-repeat;} -.container-inline-date{width:auto;clear:both;display:inline-block;vertical-align:top;margin-right:0.5em;}.container-inline-date .form-item{float:none;padding:0;margin:0;}.container-inline-date .form-item .form-item{float:left;}.container-inline-date .form-item,.container-inline-date .form-item input{width:auto;}.container-inline-date .description{clear:both;}.container-inline-date .form-item input,.container-inline-date .form-item select,.container-inline-date .form-item option{margin-right:5px;}.container-inline-date .date-spacer{margin-left:-5px;}.views-right-60 .container-inline-date div{padding:0;margin:0;}.container-inline-date .date-timezone .form-item{float:none;width:auto;clear:both;} -#calendar_div,#calendar_div td,#calendar_div th{margin:0;padding:0;}#calendar_div,.calendar_control,.calendar_links,.calendar_header,.calendar{width:185px;border-collapse:separate;margin:0;}.calendar td{padding:0;} -span.date-display-single{}span.date-display-start{}span.date-display-end{}span.date-display-separator{}.date-repeat-input{float:left; - width:auto;margin-right:5px;}.date-repeat-input select{min-width:7em;}.date-repeat fieldset{clear:both;float:none;}.date-views-filter-wrapper{min-width:250px;}.date-views-filter input{float:left !important; - margin-right:2px !important; - padding:0 !important;width:12em;min-width:12em;}.date-nav{width:100%;}.date-nav div.date-prev{text-align:left; - width:24%;float:left;}.date-nav div.date-next{text-align:right; - width:24%;float:right;}.date-nav div.date-heading{text-align:center;width:50%;float:left;}.date-nav div.date-heading h3{margin:0;padding:0;}.date-clear{float:none;clear:both;display:block;}.date-clear-block{float:none;width:auto;clear:both;} - .date-clear-block:after{content:" ";display:block;height:0;clear:both;visibility:hidden;}.date-clear-block{display:inline-block;}/* Hides from IE-mac \*/ - * html .date-clear-block{height:1%;}.date-clear-block{display:block;} - -.date-container .date-format-delete{margin-top:1.8em;margin-left:1.5em;float:left;}.date-container .date-format-name{float:left;}.date-container .date-format-type{float:left;padding-left:10px;}.date-container .select-container{clear:left;float:left;} -div.date-calendar-day{line-height:1;width:40px;float:left;margin:6px 10px 0 0;background:#F3F3F3;border-top:1px solid #eee;border-left:1px solid #eee;border-right:1px solid #bbb;border-bottom:1px solid #bbb;color:#999;text-align:center;font-family:Georgia,Arial,Verdana,sans;}div.date-calendar-day span{display:block;text-align:center;}div.date-calendar-day span.month{font-size:.9em;background-color:#B5BEBE;color:white;padding:2px;text-transform:uppercase;}div.date-calendar-day span.day{font-weight:bold;font-size:2em;}div.date-calendar-day span.year{font-size:.9em;padding:2px;} -#ui-datepicker-div table,#ui-datepicker-div td,#ui-datepicker-div th{margin:0;padding:0;}#ui-datepicker-div,#ui-datepicker-div table,.ui-datepicker-div,.ui-datepicker-div table,.ui-datepicker-inline,.ui-datepicker-inline table{font-size:12px !important;}.ui-datepicker-div,.ui-datepicker-inline,#ui-datepicker-div{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;background:#ffffff;border:2px solid #d3d3d3;font-family:Verdana,Arial,sans-serif;font-size:1.1em;margin:0;padding:2.5em .5em .5em .5em;position:relative;width:15.5em;}#ui-datepicker-div{background:#ffffff;display:none;z-index:9999;}.ui-datepicker-inline{display:block;float:left;}.ui-datepicker-control{display:none;}.ui-datepicker-current{display:none;}.ui-datepicker-next,.ui-datepicker-prev{background:#e6e6e6 url(/sites/all/modules/contrib/date/date_popup/themes/images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x; - left:.5em; - position:absolute;top:.5em;}.ui-datepicker-next{left:14.6em;}.ui-datepicker-next:hover,.ui-datepicker-prev:hover{background:#dadada url(/sites/all/modules/contrib/date/date_popup/themes/images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x;}.ui-datepicker-next a,.ui-datepicker-prev a{background:url(/sites/all/modules/contrib/date/date_popup/themes/images/888888_7x7_arrow_left.gif) 50% 50% no-repeat; - border:1px solid #d3d3d3;cursor:pointer;display:block;font-size:1em;height:1.4em;text-indent:-999999px;width:1.3em;}.ui-datepicker-next a{background:url(/sites/all/modules/contrib/date/date_popup/themes/images/888888_7x7_arrow_right.gif) 50% 50% no-repeat;}.ui-datepicker-prev a:hover{background:url(/sites/all/modules/contrib/date/date_popup/themes/images/454545_7x7_arrow_left.gif) 50% 50% no-repeat;}.ui-datepicker-next a:hover{background:url(/sites/all/modules/contrib/date/date_popup/themes/images/454545_7x7_arrow_right.gif) 50% 50% no-repeat;}.ui-datepicker-prev a:active{background:url(/sites/all/modules/contrib/date/date_popup/themes/images/222222_7x7_arrow_left.gif) 50% 50% no-repeat;}.ui-datepicker-next a:active{background:url(/sites/all/modules/contrib/date/date_popup/themes/images/222222_7x7_arrow_right.gif) 50% 50% no-repeat;}.ui-datepicker-header select{background:#e6e6e6;border:1px solid #d3d3d3;color:#555555;font-size:1em;line-height:1.4em;margin:0 !important;padding:0 !important;position:absolute;top:.5em;}.ui-datepicker-header select.ui-datepicker-new-month{left:2.2em; - width:7em;}.ui-datepicker-header select.ui-datepicker-new-year{left:9.4em; - width:5em;}table.ui-datepicker{text-align:right; - width:15.5em;}table.ui-datepicker td a{color:#555555;display:block;padding:.1em .3em .1em 0; - text-decoration:none;}table.ui-datepicker tbody{border-top:none;}table.ui-datepicker tbody td a{background:#e6e6e6 url(/sites/all/modules/contrib/date/date_popup/themes/images/e6e6e6_40x100_textures_02_glass_75.png) 0 50% repeat-x; - border:1px solid #ffffff;cursor:pointer;}table.ui-datepicker tbody td a:hover{background:#dadada url(/sites/all/modules/contrib/date/date_popup/themes/images/dadada_40x100_textures_02_glass_75.png) 0 50% repeat-x; - border:1px solid #999999;color:#212121;}table.ui-datepicker tbody td a:active{background:#ffffff url(/sites/all/modules/contrib/date/date_popup/themes/images/ffffff_40x100_textures_02_glass_65.png) 0 50% repeat-x; - border:1px solid #dddddd;color:#222222;}table.ui-datepicker .ui-datepicker-title-row td{ - color:#222222;font-size:.9em;padding:.3em 0;text-align:center;text-transform:uppercase;}table.ui-datepicker .ui-datepicker-title-row td a{color:#222222;} - - - - - - -.filefield-icon{float:left; - margin-right:0.4em;} - - -.filefield-element{margin:1em 0;white-space:normal;}.filefield-element .widget-preview{float:left; - padding-right:10px; - border-right:1px solid #CCC; - margin-right:10px; - max-width:30%;}.filefield-element .widget-edit{float:left; - max-width:70%;}.filefield-element .filefield-preview{width:16em;overflow:hidden;}.filefield-element .widget-edit .form-item{margin:0 0 1em 0;}.filefield-element input.form-submit,.filefield-element input.form-file{margin:0;}.filefield-element input.progress-disabled{float:none;display:inline;}.filefield-element div.ahah-progress,.filefield-element div.throbber{display:inline;float:none;padding:1px 13px 2px 3px;}.filefield-element div.ahah-progress-bar{display:none;margin-top:4px;width:28em;padding:0;}.filefield-element div.ahah-progress-bar div.bar{margin:0;} - - - -.filefield-generic-edit .filefield-icon{float:left; - margin-right:0.7em; - margin-top:0.3em;}.filefield-generic-edit-description{margin-right:6em;} -.filefield-generic-edit .form-text{width:99%;}.filefield-generic-edit .description{white-space:normal;margin-bottom:0;overflow:auto;} - -form.fivestar-widget{clear:both;display:block;}form.fivestar-widget select,form.fivestar-widget input{margin:0;} -.fivestar-combo-stars .fivestar-static-form-item{float:left; - margin-right:40px;}.fivestar-combo-stars .fivestar-form-item{float:left;} -.fivestar-static-form-item .form-item,.fivestar-form-item .form-item{margin:0;} -div.fivestar-widget-static{display:block;}div.fivestar-widget-static br{clear:left;}div.fivestar-widget-static .star{float:left; - width:17px;height:15px;overflow:hidden;text-indent:-999em;background:url(/sites/all/modules/contrib/fivestar/widgets/default/star.gif) no-repeat 0 0;}div.fivestar-widget-static .star span.on{display:block;width:100%;height:100%;background:url(/sites/all/modules/contrib/fivestar/widgets/default/star.gif) no-repeat 0 -32px;}div.fivestar-widget-static .star span.off{display:block;width:100%;height:100%;background:url(/sites/all/modules/contrib/fivestar/widgets/default/star.gif) no-repeat 0 0;} -div.fivestar-widget{display:block;}div.fivestar-widget .cancel,div.fivestar-widget .star{float:left; - width:17px;height:15px;overflow:hidden;text-indent:-999em;}div.fivestar-widget .cancel,div.fivestar-widget .cancel a{background:url(/sites/all/modules/contrib/fivestar/widgets/default/delete.gif) no-repeat 0 -16px; - text-decoration:none;}div.fivestar-widget .star,div.fivestar-widget .star a{background:url(/sites/all/modules/contrib/fivestar/widgets/default/star.gif) no-repeat 0 0; - text-decoration:none;}div.fivestar-widget .cancel a,div.fivestar-widget .star a{display:block;width:100%;height:100%;background-position:0 0; - cursor:pointer;}div.fivestar-widget div.on a{background-position:0 -16px;}div.fivestar-widget div.hover a,div.rating div a:hover{background-position:0 -32px;}form.fivestar-widget div.description{margin-bottom:0;} - -.simplenews-subscription-filter .form-item{clear:both;line-height:1.75em;margin:0pt 1em 0pt 0pt;}.simplenews-subscription-filter .form-item label{float:left;width:12em;}.simplenews-subscription-filter .spacer{margin-left:12em;}.simplenews-subscription-filter .form-select,.simplenews-subscription-filter .form-text{width:14em;}.block-simplenews .issues-link,.block-simplenews .issues-list{margin-top:1em;}.block-simplenews .issues-list .newsletter-created{display:none;} - - -.wrapper.tagadelic{text-align:justify;margin-right:1em;}.tagadelic.level1{font-size:1em;}.tagadelic.level2{font-size:1.2em;}.tagadelic.level3{font-size:1.4em;}.tagadelic.level4{font-size:1.6em;}.tagadelic.level5{font-size:1.8em;}.tagadelic.level6{font-size:2em;}.tagadelic.level7{font-size:2.2em;}.tagadelic.level8{font-size:2.4em;}.tagadelic.level9{font-size:2.6em;}.tagadelic.level10{font-size:2.8em;} -div.field-type-asin{display:block;clear:both;border-top:2px solid #DDD;padding-top:3px;}div.amazon-item{clear:both;}div.amazon-item img{float:left;padding-left:3px;margin-bottom:1em;margin-right:1em;}div.amazon-item div{padding-left:1em;margin-left:100px;height:4em;} -#edit-antidot-search-block-form-1-wrapper{display:inline;} -#form_submit_search{}#edit-keys-wrapper{float:left;margin:0 3px 0 0;padding:0;}.result .tagged{background-color:none;}#edit-keys{height:20px;}#submit_resultat_page{flao:left;}#fc_antidot_recherche_check_emission-wrapper label{color:#032649;font-size:11px;font-weight:bold;margin:5px 0 0 5px;}.pager span.pager-next{margin-left:3px;}#edit-keys-wrapper{position:relative;overflow:hidden;} -#SuggestPopupBox,#SuggestPopupPage{background-color:white;border:1px solid #999999;z-index:500;position:absolute;}#SuggestPopupBox{ -top:49px;left:362px;width:200px;}#SuggestPopupPage{ -width:279px;top:26px;left:0;position:absolute;z-index:550;}#SuggestPopupBox .suj-reponse,#SuggestPopupPage .suj-reponse{ -padding:2px 0 2px 10px;font-weight:bold;background-color:white;cursor:pointer;height:21px;}#SuggestPopupBox .suj-reponse:hover,#SuggestPopupPage .suj-reponse:hover{background-color:#DECFE2;}#SuggestPopupBox .active,#SuggestPopupPage .active{background-color:#DECFE2;}#fc-antidot-recherche-form .form-item{height:35px;overflow:visible;}#share,#share .addthis_toolbox addthis_default_style,#share .addthis_toolbox addthis_default_style a,#main{z-index:0;position:relative;overflow:visible;}.more{z-index:0;position:relative;overflow:hiddent;} -a.lien-radio{float:left;height:30px;width:38px;}a.autres_sites{color:#666666;display:block;text-align:right;margin-top:5px;}p.ligne-autre-site{margin-left:48px;margin-bottom:0px;}#resultats_crawl li{min-height:36px;}#fc_antidot_recherche_check_emission-wrapper{z-index:0;overflow:visible;position:relative;} -div.grille-programmes li{list-style:none;}div.grille-programmes .clearer{clear:both;} -div.grilles-programmes div.entete{} -div.grille-programmes div.navigation{padding:1em;background-color:#EEE;}div.grille-programmes div.navigation li{display:inline;} -div.grilles-programmes div.tranches{margin:1em 0;} -div.grille-programmes div.emissions{padding:1em 0;}div.grille-programmes div.emission{padding:1em;margin:1em 0;border:1px solid #CCC;}div.grille-programmes div.emission img.image-liste{float:right;margin:0 0 1em 1em;} -div.grille-programmes div.diffusion{padding:1em;margin:1em 0;border:1px solid #CCC;background-color:#EEE;} -div.grille-programmes div.tranche{border:1px dashed #ccc;background-color:#EEE;} - - -#quiz_progress{font-style:italic;font-size:80%;}span.multichoice_answer_text p{display:inline;} -.quiz_question_bullet{font-weight:bold;font-size:120%;}#quiz_score_possible,#quiz_score_percent{font-weight:bold;}.quiz_summary_question{margin-bottom:0.5em;}tr.quiz_summary_qrow{background:transparent;}td.quiz_summary_qcell{vertical-align:top;padding:1em 1em 0em 0em;}td.quiz_summary_qcell table tr{background:transparent;}td.quiz_summary_qcell table td{vertical-align:top;padding:.5em;}.quiz_answer_feedback{font-style:italic;}.quiz_summary_header{font-weight:bold;}.quiz_summary_text{}div.multichoice_answer_correct{padding:5px;border:1px solid green;}div.multichoice_answer_incorrect{padding:5px;border:1px solid red;}.add-questions{background:transparent url(/sites/all/modules/rf/quiz/images/add.png) no-repeat scroll 0% 10%;padding:0 0 1em 2em;} -div.panel-navigation ul.menu{display:inline;padding:0 1em 0 0;line-height:2.5em;}div.panel-navigation ul.menu li{display:inline;font-size:1.0em;list-style-type:none;background:#efefef;border:1px solid #aaa;margin:0;padding:4px 8px;}div.panel-navigation ul.menu li{font-weight:bold;} -div.emission-navigation ul.menu{display:inline;padding:0 1em 0 0;line-height:2.5em;}div.emission-navigation ul.menu li{display:inline;font-size:1.0em;list-style-type:none;background:#efefef;border:1px solid #aaa;margin:0;padding:4px 8px;}div.emission-navigation ul.menu li{font-weight:bold;} - -div.fieldgroup{margin:.5em 0 1em 0;}div.fieldgroup .content{padding-left:1em;} - -div.panel-pane div.admin-links{font-size:xx-small;margin-right:1em;}div.panel-pane div.admin-links li a{color:#ccc;}div.panel-pane div.admin-links li{padding-bottom:2px;background:white;z-index:201;}div.panel-pane div.admin-links:hover a,div.panel-pane div.admin-links-hover a{color:#000;}div.panel-pane div.admin-links a:before{content:"[";}div.panel-pane div.admin-links a:after{content:"]";}div.panel-pane div.panel-hide{display:none;} -div.panel-pane div.panel-hide-hover,div.panel-pane:hover div.panel-hide{display:block;position:absolute;z-index:200;margin-top:-1.5em;}div.panel-pane div.node{margin:0;padding:0;}div.panel-pane div.feed a{float:right;} -.views-exposed-form .views-exposed-widget{float:left; - padding:.5em 1em 0 0;}.views-exposed-form .views-exposed-widget .form-submit{margin-top:1.6em;}.views-exposed-form .form-item,.views-exposed-form .form-submit{margin-top:0;margin-bottom:0;}.views-exposed-form label{font-weight:bold;}.views-exposed-widgets{margin-bottom:.5em;}html.js a.views-throbbing,html.js span.views-throbbing{background:url(/sites/all/modules/contrib/views/images/status-active.gif) no-repeat right center;padding-right:18px;} - -div.view div.views-admin-links{font-size:xx-small;margin-right:1em;margin-top:1em;}.block div.view div.views-admin-links{margin-top:0;}div.view div.views-admin-links ul{padding-left:0;}div.view div.views-admin-links li a{color:#ccc;}div.view div.views-admin-links li{padding-bottom:2px;z-index:201;}div.view div.views-admin-links-hover a,div.view div.views-admin-links:hover a{color:#000;}div.view div.views-admin-links-hover,div.view div.views-admin-links:hover{background:transparent;;}div.view div.views-admin-links a:before{content:"[";}div.view div.views-admin-links a:after{content:"]";}div.view div.views-hide{display:none;} -div.view div.views-hide-hover,div.view:hover div.views-hide{display:block;position:absolute;z-index:200;} -div.view:hover div.views-hide{margin-top:-1.5em;} -.views-view-grid tbody{border-top:none;} - -#popups-overlay{position:absolute;z-index:8;background:black;top:0;}#popups-loading{position:absolute;z-index:10;opacity:0.75;width:100px;height:100px;display:none;}.popups-box{position:absolute;z-index:9;background:white;border:1px solid black;padding:0.5em;width:600px;overflow:auto;}.popups-title{font-weight:bold;margin-bottom:0.25em;}.popups-title div.title{float:left;}.popups-title .popups-close{float:right;}.popups-title .popups-close a{font-weight:normal;} -.popups-box div.messages{background:transparent;border:none;padding:0;margin:0;} -#popups-overlay{background:#773584;opacity:.80;}.popups-box{padding:0;border:10px #EBEBEB solid;-moz-border-radius:10px;-webkit-border-radius:10px;}.popups-inner{height:100%;}.popups-box{width:440px;z-index:600;}body.page-node-edit .popups-box,body.section-admin .popups-box,body.page-node-add .popups-box,body.section-tableau-de-bord .popups-box{width:700px;}.popups-title{background:#EBEBEB url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}.popups-title .title,.popups-title .popups-close{display:inline;background:#EBEBEB;padding:0 5px;}.popups-title .popups-close a{display:block;width:9px;text-indent:-9999999px;outline:none;cursor:pointer;background:transparent url(/sites/all/themes/franceculture/images/popups-close.png) no-repeat center right;margin-right:5px;}.popups-title div.title{float:none;}.popups-title .popups-close{padding-right:0;}.popups-body{background:white;padding:5px 10px;overflow:auto;height:auto;} - -label.content-multigroup{font-weight:bold;} -hr.content-multigroup{} -.content-multigroup-wrapper .field .field-label-inline{visibility:visible;} -.content-multigroup-edit-table-multiple-columns label,.content-multigroup-edit-table-multiple-columns .description{display:none;} -.content-multigroup-display-table-multiple-columns .field .field-label,.content-multigroup-display-table-multiple-columns .field .field-label-inline,.content-multigroup-display-table-multiple-columns .field .field-label-inline-first{display:none;} -.content-multigroup-display-table-single-column .content-multigroup-wrapper{clear:both;}.content-multigroup-display-table-single-column .content-multigroup-wrapper label.content-multigroup{display:block;}.content-multigroup-display-table-single-column .content-multigroup-wrapper .field{float:left;margin-right:1em;} - -.indented{margin-left:25px;}.comment-unpublished{background-color:#fff4f4;}.preview .comment{background-color:#ffffea;} - - -html{font-size:75%;}body{line-height:1.5;}h1{font-size:2em;margin:0 0 .5em;padding:0;}h2{font-size:1.5em;}h3{font-size:1.25em;}h4{font-size:1.17em;}h5,h6{font-size:1em;}h1,h2,h3,h4,h5,h6,h1 img,h2 img,h3 img,h4 img,h5 img,h6 img,em,dfn,del,ins{margin:0;padding:0;}p{margin:0 0 1.5em;padding:0;}blockquote p{margin:0;}strong{font-weight:bold;}em,dfn{font-style:italic;}dfn{font-weight:bold;}del{color:#666;}ins{border-bottom:none;text-decoration:none;}pre,code,tt,samp,kbd,var{font:1em "Lucida Console",Monaco,"DejaVu Sans Mono",monospace;}blockquote,q{font-style:italic;quotes:"" "";}blockquote{margin:0 0 1.5em;padding:0 0 0 3em;}blockquote:before,blockquote:after,q:before,q:after{content:"";}table{border-color:#C0C0C0;border-spacing:0;margin:1em 0;padding:0;}caption,th,td{text-align:left;}caption,th{font-weight:bold;}table,td,th{vertical-align:middle;}tbody,tfoot,thead,tr{margin:0;padding:0;}thead th{border-bottom:.1875em solid #C0C0C0;color:#494949;font-weight:bold;}td,th{border-bottom:1px solid #CCC;margin:0;padding:.375em .5em;}tr.odd,tr.info{background-color:#F5F5F5;}tr.even{background-color:#FFF;}tr.drag{background-color:#FFFFF0;}tr.drag-previous{background-color:#FFD;}tr.odd td.active{background-color:#EEE;}tr.even td.active{background-color:#F7F7F7;}td.region,td.module,td.container td.category{background-color:#EEE;border-bottom:1px solid #CCC;border-top:1.5em solid #FFF;color:#222;font-weight:bold;}tr:first-child td.region,tr:first-child td.module,tr:first-child td.container{border-top-width:0;}#forum table{width:100%;}#forum tr td.forum{background-position:5px 5px!important;padding-left:1.67em;}#forum tr td.forum .name{padding-left:.375em;}#forum div.indent{margin-left:.5em;}.section-admin table{width:100%;}.description{color:#555;}div.messages{font-weight:normal;margin:1em 0;}div.messages ul{margin:0 0 0 1.25em;}div.error{background:#FFF3F6 url(/sites/all/themes/franceculture/images/error.png) no-repeat .5em .45em;border:1px solid #C00000;color:#C00000;}tr.error{background:#FFEFF3;color:#E41F0B;}div.notice{background:#FFF6BF;color:#514721;border-color:#FFD324;}.error a,.notice a,.success a{text-decoration:underline;}div.status{background:#F1FFCF url(/sites/all/themes/franceculture/images/ok.png) no-repeat .75em .6em;border:1px solid #4DA449;color:#2A6827;}div.help{background:#F7F8F8 url(/sites/all/themes/franceculture/images/info.png) no-repeat .5em .45em;border:1px solid #66BEF4;color:#000D2F;margin:1em 0;}div.warning{background:#FFF6DF url(/sites/all/themes/franceculture/images/warning.png) no-repeat .5em .45em;border:1px solid #FFB900;color:#9F3800;}div.messages,div.warning,div.help,div.status,div.error{padding:.6em 1em .6em 3em;}div.help code,div.messages code{font-weight:bold;} -#saving{font-size:1em;font-weight:bold;background:url(/sites/all/themes/franceculture/images/loading.gif) no-repeat 12px 1px;display:none;padding-left:36px;}#saving p{margin:0;}#saving-notice{font-size:0.9em;font-style:italic;background:#FFC;}table tr.warning{background-color:#F7E8C5;}table tr.warning td{color:#9F3800;}table tr.warning.merge-up td{color:#514721;}div.ok,tr.ok,table tr.ok td{color:#222;padding:1em .5em;}.update tr.ok{background:#F1FFCF;}.update tr.error{background:#FFEFF3;}.update tr.warning{background:#FFF6DF;}.update tr.error .version-recommended{background:#FFEFF4;}.update .info{padding:0 0 0 1em;}.includes{color:#222;}div.help p:last-child,div.help ul:last-child{margin-bottom:0;}.form-item input.error,.form-item textarea.error,.form-item select.error{border:2px solid #C00000;}.form-item strong.error em{font-weight:bold;color:#E41F0B;font-size:1.2em;}.block-region{border:1px dotted #000;color:#000;font:1.25em "Lucida Console",Monaco,"DejaVu Sans Mono",monospace;padding:3px 6px 1px;}.node-unpublished,.comment-unpublished{background-color:#FFF6DF;}.unpublished{visibility:hidden;}.node-unpublished .unpublished,.comment-unpublished .unpublished{background:transparent url(/sites/all/themes/franceculture/images/warning-small.png) no-repeat 0 .1em;color:#FFB900;font-size:.94em;margin-left:.5em;padding-left:18px;visibility:visible;}.admin-dependencies,.admin-required,.admin-enabled,.admin-disabled,.admin-missing{font-weight:bold;}ul,ol{margin:0 0 1.5em 1.75em;padding:0;}li{margin:0;padding:0;}ul ul,ul ol,ol ol,ol ul,.block ul ul,.block ul ol,.block ol ol,.block ol ul,.item-list ul ul,.item-list ul ol,.item-list ol ol,.item-list ol ul{margin:0 0 0 1.75em;}ul{list-style-type:disc;}ul ul{list-style-type:circle;}ul ul ul{list-style-type:square;}ul ul ul ul{list-style-type:circle;}ol{list-style-type:decimal;}ol ol{list-style-type:lower-alpha;}ol ol ol{list-style-type:lower-roman;}dt{font-weight:bold;}dd{margin:0 0 1.5em 1.75em;}.item-list ul,.item-list ol{margin:0 0 0 1.75em;padding:0;}form{margin:0 0 1.5em;padding:0;} -input.text,input.title,textarea,select{border:1px solid #C0C0C0;margin:.375em 0;} - -input.text,input.title{padding:.375em;}input.title{font-size:1.5em;}input.form-text,textarea{border:1px solid #CCC;height:auto;padding:.1875em;} -div.form-item{margin-bottom:1em;margin-top:1em;}.form-item textarea.error{padding:.1875em;}.form-item .description{font-size:.9em;line-height:1.667em;}span.form-required,span.marker{color:#8A1F11;}div.form-item div.description img{margin:0;}#node-admin-filter ul{padding:.375em 0;}#edit-operation-wrapper select{margin:.375em;}div.resizable-textarea textarea{margin-top:0;}.tips{font-size:1em;margin-left:3em;padding:.1875em .375em .1875em 1.5em;}label,legend{margin:0;padding:0;}fieldset{background:transparent;border:1px solid #dadada;margin:1.5em 0;padding:.75em;}*:first-child+html fieldset{background-color:transparent;background-position:0 .75em;padding:0 1em .75em;}*:first-child+html fieldset > .description,*:first-child+html fieldset .fieldset-wrapper .description{padding-top:1.5em;}fieldset legend{display:block;font-weight:bold;padding:0 1em 0 0;}*:first-child+html fieldset legend,*:first-child+html fieldset.collapsed legend{display:inline;}html.js fieldset.collapsed{background:transparent;padding-bottom:.75em;padding-top:0;}#user-login-form li.openid-link,#user-login-form li.user-link{text-align:center;}html.js #user-login-form li.openid-link,html.js #user-login li.openid-link{list-style:none;}#user-login-form ul{margin-top:0;}#user-login ul{margin:0 0 5px;}#user-login ul li{margin:0;}#user-login-form li.openid-link,#user-login li.openid-link{background:none;}#user-login-form li.openid-link a,#user-login li.openid-link a{background:transparent url(/sites/all/themes/franceculture/images/openid.png) no-repeat 0 0;padding:0 20px;}#user-login-form .item-list li{list-style:none;}div.admin-panel{border:1px solid #DDD;margin:0 0 .75em;padding:0;}div.admin .left,div.admin .right{margin-left:0;margin-right:0;width:49%;}.admin-panel h3{background:#EEE;color:#222;padding:0 0 0 .5em;}.admin-panel .body{padding:0 1em;}.admin-panel p{margin:0;padding:1em 0 0;}.admin-panel ul,.admin-panel ul.menu,.admin-panel .item-list ul{padding:0 0 1em;}.admin-panel .item-list ul{margin:0;}.admin-panel ul li{color:#555;}.admin-panel dl{margin:0;padding:1em 0;}.admin-panel dt{font-weight:normal;}.admin-panel dd{color:#555;font-size:.94em;margin-left:0;}.admin .compact-link{margin:0 0 1em;}.page-admin-by-module .admin-panel .body{margin:0;}.page-admin-by-module .admin-panel .body p{color:#555;font-size:.94em;}#user-admin-filter ul li,#node-admin-filter ul li{list-style:none;}.more-help-link{font-size:.94em;line-height:1.667em;}#permissions td.permission{padding-left:.5em;}#permissions td.module{background:#EEE;color:#222;font-weight:bold;}tr .block{border:0;}.local-tasks{margin-bottom:1em;}ul.primary{border-bottom-color:#CCC;margin:1.5em 0 0;padding:0 0 .2em .3em;}ul.primary li a{background-color:#F5F5F5;border-color:#CCC;margin-right:.08em;padding:.1em .75em .2em;}.local-tasks ul.primary li a:hover{background-color:#F7F7F7;border-color:#DDD;color:#C1272D}.local-tasks ul.primary li.active a{background-color:#FFF;border-bottom-color:#FFF;}ul.secondary{border-bottom:1px solid #CCC;margin:1em 0 0 0;padding:0 .3em 1em;}ul.secondary li{border-right:0;list-style:none;padding:0 2em 0 0;}ul.secondary li a:hover,ul.secondary li a.active{border-bottom:none;text-decoration:underline;}body.admin-menu{margin-top:2em !important;}#admin-menu{font:0.9em Arial,Helvetica,sans-serif;}#admin-menu ul li a:focus{color:#000;border:0;background:#FFFF00;} -#genesis-1a .two-sidebars .content-inner{margin:0 22em;}#genesis-1a .sidebar-left .content-inner{margin-left:22em;}#genesis-1a .sidebar-right .content-inner{margin-right:22em;}#genesis-1a #sidebar-left{width:20em;margin-left:-100%;}#genesis-1a #sidebar-right{width:20em;margin-left:-20em;}#genesis-1b .two-sidebars .content-inner{margin:0 25.25%;}#genesis-1b .sidebar-left .content-inner{margin-left:25.25%;}#genesis-1b .sidebar-right .content-inner{margin-right:25.25%;}#genesis-1b #sidebar-left{width:24.25%;margin-left:-100%;}#genesis-1b #sidebar-right{width:24.25%;margin-left:-24.25%;}#genesis-1c .two-sidebars .content-inner{margin:0 260px;}#genesis-1c .sidebar-left .content-inner{margin-left:260px;}#genesis-1c .sidebar-right .content-inner{margin-right:260px;}#genesis-1c #sidebar-left{width:240px;margin-left:-100%;}#genesis-1c #sidebar-right{width:240px;margin-left:-240px;}#genesis-2a .two-sidebars .content-inner{margin-right:44em;}#genesis-2a .sidebar-left .content-inner{margin-right:22em;}#genesis-2a .sidebar-right .content-inner{margin-right:22em;}#genesis-2a #sidebar-left{width:20em;margin-left:-42em;}#genesis-2a #sidebar-right{width:20em;margin-left:-20em;}#genesis-2a .sidebar-left #sidebar-left{width:20em;margin-left:-20em;}#genesis-2b .two-sidebars .content-inner{margin-right:50.5%;}#genesis-2b .sidebar-left .content-inner{margin-right:25.25%;}#genesis-2b .sidebar-right .content-inner{margin-right:25.25%;}#genesis-2b #sidebar-left{width:24.25%;margin-left:-49.5%;}#genesis-2b #sidebar-right{width:24.25%;margin-left:-24.25%;}#genesis-2b .sidebar-left #sidebar-left{width:24.25%;margin-left:-24.25%;}#genesis-2c .two-sidebars .content-inner{margin-right:520px;}#genesis-2c .sidebar-left .content-inner{margin-right:260px;}#genesis-2c .sidebar-right .content-inner{margin-right:260px;}#genesis-2c #sidebar-left{width:240px;margin-left:-500px;}#genesis-2c #sidebar-right{width:240px;margin-left:-240px;}#genesis-2c .sidebar-left #sidebar-left{width:240px;margin-left:-240px;}#genesis-3a .two-sidebars .content-inner{margin-left:44em;}#genesis-3a .sidebar-left .content-inner{margin-left:22em;}#genesis-3a .sidebar-right .content-inner{margin-left:22em;}#genesis-3a #sidebar-left{width:20em;margin-left:-100%;}#genesis-3a #sidebar-right{width:20em;margin-left:-100%;}#genesis-3a .two-sidebars #sidebar-right{width:20em;position:relative;left:22em;}#genesis-3b .two-sidebars .content-inner{margin-left:50.5%;}#genesis-3b .sidebar-left .content-inner{margin-left:25.25%;}#genesis-3b .sidebar-right .content-inner{margin-left:25.25%;}#genesis-3b #sidebar-left{width:24.25%;margin-left:-100%;}#genesis-3b #sidebar-right{width:24.25%;margin-left:-100%;}#genesis-3b .two-sidebars #sidebar-right{width:24.25%;position:relative;left:25.25%;}#genesis-3c .two-sidebars .content-inner{margin-left:520px;}#genesis-3c .sidebar-left .content-inner{margin-left:260px;}#genesis-3c .sidebar-right .content-inner{margin-left:260px;}#genesis-3c #sidebar-left{width:240px;margin-left:-100%;}#genesis-3c #sidebar-right{width:240px;margin-left:-100%;}#genesis-3c .two-sidebars #sidebar-right{width:240px;position:relative;left:260px;}#genesis-4 .two-sidebars .content-inner{margin-right:40%;}#genesis-4 .sidebar-left .content-inner{margin-right:40%;}#genesis-4 .sidebar-right .content-inner{margin-right:40%;}#genesis-4 #sidebar-left{width:37%;margin-left:-37%;}#genesis-4 #sidebar-right{width:37%;margin-left:-37%;}#genesis-4 .sidebar-left #sidebar-left{width:37%;margin-left:-37%;}.gpanel{clear:both;margin:.75em 0;}.gpanel .region{display:inline;position:relative;}.two-col-50 .region{width:49.5%;}.two-col-50 .col-1{float:left;}.two-col-50 .col-2{float:right;}.two-col-50 .gpanel{margin:0;}#two-col-50-nested .col-2{width:48.5%;}.col-1 #two-col-50-nested .region,.col-2 #two-col-50-nested .col-2{width:49%;}.three-col-33 .region{float:left;width:32%;}.three-col-33 .col-2{right:-1%;width:34%;}.three-col-33 .col-3{right:-2%;}.four-col-25 .section-1{float:left;width:49.5%;}.four-col-25 .section-2{float:right;width:49.5%;}.four-col-25 .col-1,.four-col-25 .col-3{float:left;width:49%;}.four-col-25 .col-2,.four-col-25 .col-4{float:right;width:49%;}.gpanel .region .inner{margin:0;}.gpanel .last .inner{margin-right:0;}#container{position:relative;margin:0 auto;}#columns{display:inline-block;margin-bottom:1em;}#container > #columns{display:block;}#content-column,#sidebar-left,#sidebar-right{float:left;}#content-column{width:100%;margin-bottom:1em;}.clear,#nav,#columns,#breadcrumb,#content-bottom,#secondary-content,#tertiary-content,#footer-wrapper,#footer,#footer-message{clear:both;} -div.block{position:relative;}div.block div.block-edit{font-size:.9em;position:absolute;right:0;top:0;visibility:hidden;z-index:40;}div.block:hover div.block-edit{display:block;font-family:Arial,Helvetica,"Nimbus Sans",sans-serif;visibility:visible;}div.block div.block-edit a{text-decoration:none;color:#ccc;}div.block div.block-edit a:before{content:"[";}div.block div.block-edit a:after{content:"]";}div.block div.block-edit a:hover{color:#000;background:#FFF;}div.block div.block-edit li{display:inline;float:left;list-style:none;margin:0 0 0 .5em;}div.view div.views-admin-links{font-size:.85em;}.block div.view div.views-admin-links{margin-top:1.8em;}#main-content div.view div.views-admin-links{margin-top:-.8em;}div.view div.views-admin-links li a{text-decoration:none;width:5em;}div.view div.views-admin-links li a:hover{color:#000;background:#FFF;}div.view div.views-admin-links-hover a,div.view div.views-admin-links:hover a{color:#CCC;} - -li.leaf{list-style:none outside none !important;padding:0 !important;}.item-list ul,.item-list ol{margin:0;padding:0;}.item-list ul li{list-style:none;margin:0;padding:0;}#header form{margin:0;}div.views-cloud{line-height:1.2;}div.views-cloud span{margin:2px 5px;}div.views-cloud div{white-space:normal;}div.views-cloud span.views-cloud-size-3 a,div.views-cloud span.views-cloud-size-4 a{color:#262626;}.comments-count{font-style:italic;}.comments-count,.theme2,.type{font-size:11px;display:inline;margin:0 3px 0 0;}#comments .post img{float:left;margin:0 10px 0 0;}#comment-form label{color:#000000;font-size:14px;margin:0 0 5px;}div.ctools-modal-content textarea#edit-body{width:500px;height:400px;}#sidebar-right .block ul{padding:0 0 0.25em 0;}ul.primary li a{background-color:#DECFE2;} - -#acces-rapide{display:none;}.back-to-top{display:none;} - body{color:#4D4D4D;font-size:12px;line-height:17px;font-family:'Arial','FreeSans';}img{border:none;}a{text-decoration:none;color:#032649;font-weight:bold;}a:hover{text-decoration:underline;}a img,a:hover img{text-decoration:none;}a.ext{text-decoration:underline;}p{margin:0 0 5px 0;}ul{padding:0;margin:0;}ol{padding:0;margin:0;}li{list-style-type:none;padding:0;margin:0;}h1{color:#262626;font-size:24px;line-height:26px;letter-spacing:0.2px;margin:0 0 15px 0;}body.section-rubrique h1,body.section-partenariats h1{color:#773584;}h2{line-height:20px;font-size:16px;letter-spacing:0.5px;margin:0 0 3px 0;padding:0;}h3{font-size:12px;line-height:18px;margin:0 0 2px 0;padding:0;} - input.idleField{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;}.section-admin input.idleField{color:#000000;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;}input.focusField{border:1px dotted #773584 !important;background-color:#ad86b5;color:#fff;} - #sidebar-right h3{font-size:14px;line-height:14px;}.titre-barre{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}.titre-barre-gris{background:url(/sites/all/themes/franceculture/images/titre-barre-gris.gif) repeat-x 0 2px;color:#BABCBE;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}#footer-top .titre-barre{padding:0 0 15px 0;}.titre-barre span,.titre-barre-gris span{background:#fff none;padding:0 5px;letter-spacing:0;display:inline-block;}.titre-barre span.picto-ecoute{background:#ebebeb url(/sites/all/themes/franceculture/images/picto-ecoute-gris.png) no-repeat 5px 3px;padding-left:28px;}.titre-barre a{font-size:12px;font-weight:normal;line-height:12px;letter-spacing:-0.1px;cursor:default;display:block;color:#773584;}.titre-barre a:hover{text-decoration:none;}.titre-barre a.red{color:#C1272D;}.clear{clear:both;}.rss{padding:0 0 5px 5px;}.pictos{margin:2px 0 0 5px;background-color:#C1272D;}.sep{margin:0 0 6px 0;padding:0 0 6px 0;border-bottom:1px solid #CFCFCF;}.sep-last{margin:0;padding:0 0 6px 0;border-bottom:0 solid;}a.sep{display:block;}.read-more{text-align:right;font-size:11px;}.date{font-weight:bold;font-size:11px;}.timer{color:#C1272D;font-size:11px;margin:0 0 0 5px;font-weight:bold;}.timer-liste{font-size:11px;font-weight:bold;}.timer a{color:#C1272D;}.img-float{float:left;margin:0 10px 0 0;}.block{display:block;min-height:100px;margin:0 0 10px 0;}#footer-top .block{min-height:0;margin:0;}body.section-admin .block{min-height:0px;}.num-com{background:url(/sites/all/themes/franceculture/images/num-com-bg-rose.png) repeat-x 0 0;color:#000;font-size:10px;margin-left:10px;}.num-com:hover{text-decoration:none;}.num-com span{background:url(/sites/all/themes/franceculture/images/num-com-rose.png) no-repeat 100% 0;padding:0 3px 9px 3px;}.soon{padding:1px 4px;color:#fff;background-color:#C1272D;font-weight:bold;font-size:10px;margin-left:5px;}.violet{color:#773584;font-size:11px;}.cours{background-color:#E8E8E8;padding:0 5px;margin-right:5px;}.cours a{padding:0 5px;}.quiz{background-color:#DECFE2;padding:0 10px;margin-right:5px;}.quiz a{padding:0 10px;}.answer a{font-size:10px;background:url(/sites/all/themes/franceculture/images/answer.png) no-repeat 0 0;padding:0 5px 9px;}.answer a.none{background:#e4d7e6 none;padding:0 5px;}.rank-1{font-size:12px;}.rank-2{font-size:12px;color:#262626;}.rank-3{font-size:16px;color:#262626;}.btn-emission{color:#fff;background:url(/sites/all/themes/franceculture/images/btn-emission.png) no-repeat 0 0;font-weight:bold;font-size:12px;padding:3px 20px 4px;margin-left:20px;}.btn-emission:hover{background-position:0 -22px;text-decoration:none;}.btn-liste-ecoute{color:#fff;background:url(/sites/all/themes/franceculture/images/btn-liste-ecoute.png) no-repeat 0 0;font-weight:bold;font-size:12px;padding:4px 25px;margin-left:20px;}.btn-liste-ecoute:hover{background-position:0 -23px;text-decoration:none;}.more-doc{display:block;text-align:right;margin-top:15px;padding-right:15px;line-height:12px;cursor:pointer;}.more-doc:hover{text-decoration:none;}#edit-mollom-captcha-wrapper a#mollom-audio-captcha{display:none;}#edit-mollom-captcha-wrapper span{color:#fff;}#edit-mollom-captcha-wrapper span.form-required{color:#8A1F11;} - - - .retour-home{position:absolute;top:0;left:0;margin:18px 0 0 0;}.search{float:right;margin:10px 25px 0 0px;width:400px;} - #header .block{float:right;margin:22px 0 0 0;width:385px;}#header label,#header .block-simplenews p,#header #block-block-17 a{color:#773584;font-weight:bold;float:left;margin:0 10px 0 0;line-height:24px;}#header #block-block-17 a{float:right;}#header .block-simplenews p,#header .block-simplenews div,#header .block-simplenews form{display:inline;}#header .block-simplenews label{display:none;}#header input,#header .block-simplenews div.user-mail{padding:4px 10px 5px 10px;float:left;width:145px;}body.blogs #block-simplenews-65{display:none;}#header input.submit{padding:0;border:none;margin:0 0 0 2px;width:26px;height:26px;background-color:#773584;}#header .temp{margin:0 0 0 2px;} - #menu-principal{position:absolute;top:0;right:0;margin:108px 15px 0 0;}#menu-principal li{float:left;}#menu-principal a{color:#fff;padding:6px 8px 5px 9px;font-size:14px;font-weight:bold;display:block;background-color:#28042D;}#menu-principal a:hover,#menu-principal a.active{background-color:#773584;text-decoration:none;}#menu-principal .first a{margin:0 0 0 1px;}#menu-principal .menu-action a{padding:5px 10px 6px 10px;background-color:#4D4D4D;}#menu-principal .menu-action a:hover,#menu-principal .menu-action a.active{background-color:#C1272D;} - #menu-top{position:absolute;top:0;right:0;margin:80px 0 0 0;}#menu-top li{float:left;background-color:#DECFE2;}#menu-top a{color:#000;padding:5px 11px 6px;font-size:13px;font-weight:bold;display:block;}#menu-top a:hover,#menu-top a.active{background-color:#773584;color:#fff;text-decoration:none;}#menu-top .login{margin:0 0 0 1px;}#menu-top .login a{color:#56045D;}#menu-top .register a{color:#56045D;font-weight:normal;font-size:12px;}#menu-top .register a:hover,#menu-top .login a:hover,#menu-top .login a.active,#menu-top .register a.active{color:#fff;}#menu-top .disconnect a{margin:0 20px;}#menu-top .go-profil a{background:url(/sites/all/themes/franceculture/images/btn-edit-profil.png) no-repeat 0 0;display:block;text-align:center;width:54px;height:19px;color:#fff;margin:4px 4px 5px 4px;padding:0;}#menu-top .go-profil a:hover{background-position:0 -19px;} - .urgent{border:1px solid #CFCFCF;margin-bottom:15px;}.urgent-inner{background-color:#F5DCE3;margin:2px;padding:5px;position:relative;width:654px;}.urgent-inner span{color:#DC0000;font-size:11px;font-weight:bold;}.urgent-inner h1{color:#DC0000;font-size:16px;font-weight:bold;line-height:18px;margin-bottom:5px;}.urgent-inner a{font-size:11px;background:url(/sites/all/themes/franceculture/images/urg-up.png) no-repeat 0 4px;position:absolute;bottom:0;right:0;margin:0 10px 10px 0;line-height:11px;padding-left:10px;cursor:pointer;}.urgent-inner a:hover{text-decoration:none;} - .tabs{font-size:11px;color:#032649;}.tabs a{color:#032649;font-weight:bold;}.tabs a.active{color:#773584;} - #content-left{line-height:15px;}body .list-article li{margin:0 0 0 0;clear:left;padding:25px 0 0 0}.rubrique{background:url(/sites/all/themes/franceculture/images/bg-rubrique.png) repeat-x 0 0;font-size:11px;margin:0 0 3px 0;}.rubrique a,.rubrique span{background:#fff none;padding:0 5px 0 0;}.list-article .first{padding-top:0px;}.list-article .last{margin-bottom:25px;}.list-article .first .illustration{margin-bottom:15px;}.list-article .large .illustration{margin-right:0}.list-article .illustration{float:left;margin-right:20px;}.front .list-article .illustration{margin-bottom:25px;}.list-article .video{margin-top:15px;}img.imagefield-field_fleuve_image,img.imagecache-image_liste,img.imagecache-evenement_image_liste{float:left;margin-right:20px;} - .biographie{color:#262626;font-size:14px;line-height:18px;letter-spacing:0.1px;margin-bottom:35px;}.biographie p,body.node-type-rf-personne#tinymce p{margin-bottom:15px;} - #share,#block-print-0{position:absolute;top:0;right:0;text-align:right;min-height:0;}#share .share-mail{background:url(/sites/all/themes/franceculture/images/share-mail.png) no-repeat 100% 4px;padding-right:15px;margin-right:20px;}#share .share-mail span{display:none;}#share .share-more{padding-left:15px;}#share .share-services{margin-left:10px;}#share .share-services span{margin-right:5px;}.share-script .more-services{display:none;}.share-script .more-services.active{display:inline;}.share-script .more-services.active a{float:none;}.share-script .more-services.active a span{float:none;display:inline;padding:1px 8px;}#block-print-0{right:210px;}#block-print-0 .print-page{background:url(/sites/all/themes/franceculture/images/share-print.png) no-repeat 100% 2px;padding-right:15px;margin-right:17px;} - .pager{border:1px solid #CFCFCF;padding:5px;text-align:right;color:#032649;margin:50px 0 30px 0;}.pager a,.pager span.pager-current{font-size:14px;line-height:14px;color:#032649;display:inline-block;height:15px;text-align:center;padding:0;vertical-align:center;}.pager span.pager-item,.pager span.pager-current{margin:0 3px;}.pager span.pager-previous span,.pager span.pager-next span{display:none;}.pager span.pager-previous{background:url(/sites/all/themes/franceculture/images/script-scroll-left.png) no-repeat 0 0;width:15px;margin-right:3px;}.pager span.pager-next{background:url(/sites/all/themes/franceculture/images/script-scroll-right.png) no-repeat 0 0;width:15px;margin-left:3px;}.pager span.pager-previous a,.pager span.pager-next a{width:15px;}.pager span.pager-current{color:#773584;} - .player{background:url(/sites/all/themes/franceculture/images/player-article.png) no-repeat 0 0;width:650px;height:75px;color:#fff;font-weight:bold;margin:20px 0 0 0;}.player .ecouter{float:left;width:65px;}.player .ecouter a{font-size:10px;display:block;padding:38px 0 0 0;text-align:center;color:#fff;}.player .ecouter a:hover{text-decoration:none;}.player .played{float:left;width:430px;margin:12px 0 0 0;}.player .played img{margin:8px 0 0 0;}.player .action{float:left;width:155px;margin-top:12px;}.player .action a{color:#fff;display:block;margin-bottom:7px;padding-left:22px;} - .com{margin-bottom:40px;}.com .post{margin-bottom:20px;}.com .post .submited{color:#000;font-size:14px;margin-bottom:2px;display:block;}.com .post .auth{font-weight:bold;color:#032649;}.com .post .submited .date{margin-left:5px;}.com .post p{font-size:12px;color:#4D4D4D;margin-left:55px;}#comment-form .preview .post{margin-bottom:20px;}#comment-form .preview .post .submited{color:#000;font-size:14px;margin-bottom:2px;display:block;}#comment-form .preview .post .auth{font-weight:bold;color:#032649;}#comment-form .preview .post .submited .date{margin-left:5px;}#comment-form .preview .post p{font-size:12px;color:#4D4D4D;margin-left:55px;} -#comment-form{margin-bottom:40px;}#comment-form img{margin:0 0 15px 0;}#comment-form label,#comment-form input.form-text,#comment-form textarea{display:block;font-weight:normal;}#comment-form label{color:#000;font-size:14px;margin:0 0 5px 0;}#comment-form input.form-text{border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:4px 10px 5px 10px;width:210px;margin:0 0 15px 0;}#comment-form textarea{padding:4px 10px 5px 10px;color:#999999;width:633px;margin:0 0 15px 0;}#fc-quelisentils-comment-form input.form-submit,#comment-form input.form-submit,.section-liste-ecoute #node-form input.form-submit{background-color:#773587;text-align:center;color:#fff;font-size:13px;font-weight:bold;cursor:pointer;padding:2px 5px;width:80px;}.section-liste-ecoute #node-form input.form-submit{width:100px;}#fc-quelisentils-comment-form input.form-submit:hover,#comment-form - input.form-submit:hover,.section-liste-ecoute #node-form input.form-submit:hover{background-color:#C1272D;}#comment-form .fieldset-wrapper label,#comment-form .fieldset-wrapper input{display:inline;} - #footer-top ul{float:left;border-left:1px solid #CFCFCF;padding:0 0 0 15px;margin:0 0 0 15px;font-size:11px;line-height:16px;display:inline;}ul.no-border{border:none;padding:0 30px 0 0;margin:0;width:80px;}ul.tools{width:100px;}ul.france-culture{width:450px;}ul.ecoute-culture{width:230px;}#footer a{color:#fff;font-size:16px;}#footer ul{float:left;}#footer li{display:inline;border-right:2px solid #fff;padding:0 30px 5px 0;margin:0 30px 0 0;}.signature-rf{float:right;text-align:right;font-size:10px;color:#888b8b;line-height:12px;}.signature-rf a{display:block;color:#888b8b;font-size:10px;font-weight:bold;} - - #content-right{line-height:15px;}#content-right .panel-pane,.list-rubrique li{margin-bottom:30px;margin-top:0 !important;padding-left:10px;}#content-right .panel-pane label,.list-rubrique li label{margin:10px 0 5px 0;display:block;}#content-right .panel-pane input,.list-rubrique li input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:2px 10px 3px 10px;float:left;width:180px}#content-right .panel-pane input.form-text:focus,#content-right .panel-pane input.focusField{color:#FFF;}#content-right .panel-pane input.submit,.list-rubrique li input.submit{padding:0;border:none;margin:0 0 0 2px;width:22px;height:22px;background-color:#773584;}#content-right .panel-pane select,.list-rubrique li select{border-top:1px solid #CCCCCC;border-left:1px solid #CCCCCC;border-bottom:1px solid #666666;border-right:1px solid #666666;padding:2px 10px 3px 10px;float:left;width:100%;margin:0 0 10px 0;} - #content-right .panel-pane .title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}#content-right .panel-pane .title span{background:#fff none;padding:0 5px;letter-spacing:0;display:inline-block;}body.node-type-panel #content-left .panel-pane .title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}body.node-type-panel #content-left .panel-pane .title span{background:#fff none;padding:0 5px;letter-spacing:0;display:inline-block;} - .acheter li a{color:#000;font-weight:normal;font-style:italic;}.acheter li span{color:#808080;font-style:italic;font-size:11px;}#content-right .acheter li{border-bottom:1px solid #CFCFCF;margin:10px 0 0 0;padding:0 0 10px 0;} - body.lecture #sidebar-right .plus ul{padding-left:20px;padding-right:20px;}body.lecture #sidebar-right .plus li{clear:left;margin:20px 0 0 0;}body.lecture #sidebar-right .plus p{float:right;width:140px;margin-right:10px;font-size:11px;color:#666666;display:inline;line-height:14px;}body.lecture #sidebar-right .plus p a{font-size:12px;display:block;margin:0 0 5px 0;}body.lecture #sidebar-right .plus p span{font-size:12px;font-style:italic;display:block;margin-top:5px;}body.profil #content-right .plus li{clear:left;margin:10px 0;}body.profil #content-right .plus p{float:right;width:130px;font-size:11px;color:#666666;display:inline;line-height:14px;}body.profil #content-right .plus p a{font-size:12px;display:block;margin:0 0 5px 0;}body.profil #content-right .plus p span{font-size:12px;font-style:italic;display:block;margin-top:5px;} - body.profil #content-right .rel-doc li{clear:left;margin:10px 0;}body.profil #content-right .rel-doc img{float:left;margin:0 10px 15px 0;}body.profil #content-right .rel-doc p{font-size:12px;color:#4D4D4D;display:inline;line-height:14px;}body.profil #content-right .rel-doc p a{margin:0;}body.profil #content-right .rel-doc p span{display:block;margin-bottom:5px;color:#032649;}body.profil #content-right .rel-doc p span.date{font-weight:bold;color:#4D4D4D;font-size:11px;}body.profil #content-right .rel-doc p.theme a{display:block;text-align:right;}body.profil #content-right .rel-doc p.theme input{float:none;width:113px;margin:20px 0;} - #sidebar-right .block{background:url(/sites/all/themes/franceculture/images/leftgris-bg.png) repeat-y 0 0;line-height:14px;}#sidebar-right .block .block-inner{background:url(/sites/all/themes/franceculture/images/leftgris-bg-top.png) no-repeat 0 0;padding:5px 0 0 0;}#sidebar-right .block .title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}#sidebar-right .block .title{margin:0 10px 5px 10px;}#sidebar-right .block .title span{background-color:#ebebeb;padding:0 5px;letter-spacing:0;}#sidebar-right .block .title a{font-size:12px;font-weight:normal;line-height:12px;letter-spacing:-0.1px;cursor:default;display:block;color:#773584;}#sidebar-right .block .context{padding:0 10px 5px;}#sidebar-right .block label{background:#ebebeb url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;padding:10px 0;display:block;margin:2px 0 0 0;text-align:center;}#sidebar-right .block .block-content{background:url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat 0 0;padding:15px 20px 0;}#sidebar-right .block ol li{list-style-type:decimal;list-style-position:inside;margin-top:10px;font-weight:bold;color:#032649;}#sidebar-right .block li{border-bottom:1px solid #CFCFCF;margin:20px 0px 0 0px;padding:0 0 15px 0;border-top-width:0;}#sidebar-right .block li.first,#sidebar-right .block li.views-row-first{margin-top:0;}#sidebar-right .block .closure{background:url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;height:30px;display:block;margin:5px 0 0 0;} - #sidebar-right .block-ecoute{background:#fff url(/sites/all/themes/franceculture/images/player-noir-bg.png) repeat-y 0 0;margin:0 0 10px 0;line-height:14px;}#sidebar-right .block-ecoute .block-inner{background:url(/sites/all/themes/franceculture/images/player-noir-top.png) no-repeat 0 0;padding:15px 0 0 0;color:#fff;}#sidebar-right .block-ecoute .titre-barre{background:url(/sites/all/themes/franceculture/images/titre-barre-noir.gif) repeat-x 0 2px;margin:0 19px 5px 10px;}#sidebar-right .block-ecoute h2 span{background:#323232 url(/sites/all/themes/franceculture/images/picto-cult-noir.png) no-repeat 5px 0;color:#fff;padding-left:28px;}#sidebar-right .block-ecoute .context{background-color:#fff;margin:0 19px 15px 10px;border-top:1px solid #666666;border-bottom:1px solid #666666;border-right:none;border-left:none;padding:15px 10px;color:#4D4D4D;}#sidebar-right .block-ecoute .context p{padding:0;}#sidebar-right .block-ecoute h3 a{display:block;}#sidebar-right .block-ecoute h3 .timer{font-size:14px;display:block;margin:0 0 2px 0;}#sidebar-right .block-ecoute p{padding-left:10px;padding-right:19px;}#sidebar-right .block-ecoute p a{color:#fff;background-color:#121212;}#sidebar-right .block-ecoute p .timer{font-size:12px;margin:0;}#sidebar-right .block-ecoute p.auteur{background:url(/sites/all/themes/franceculture/images/player-noir-bottom.png) no-repeat 0 100%;padding-bottom:25px;display:block;margin:2px 0 0 0;}#sidebar-right .block-ecoute .closure{background:url(/sites/all/themes/franceculture/images/player-noir-bottom.png) no-repeat 0 100%;height:15px;display:block;margin:2px 0 0 0;border:none;}#sidebar-right .block-ecoute#block-fcbloc-a-tout-hasard .context{height:40px;}#sidebar-right .block-ecoute#block-fcbloc-a-tout-hasard .default{font-weight:bold;margin-top:7px;}#sidebar-right .block-ecoute#block-fcbloc-a-tout-hasard{height:140px;} - #sidebar-right .block-list{background:url(/sites/all/themes/franceculture/images/leftgris-bg.png) repeat-y 0 0;line-height:14px;}#sidebar-right .block-list .block-inner{background:url(/sites/all/themes/franceculture/images/leftgris-bg-top.png) no-repeat 0 0;padding:5px 0 0 0;}#sidebar-right .block-list .titre-barre{margin:0 10px 5px 10px;}#sidebar-right .block-list .titre-barre span{background-color:#ebebeb;}#sidebar-right .block-list .context{padding:0 10px 5px;}#sidebar-right .block-list .context a{float:left;margin:10px 10px 0 10px;width:120px;text-align:center;line-height:16px;}#sidebar-right .block-list label{background:#ebebeb url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;padding:10px 0;display:block;margin:2px 0 0 0;text-align:center;}#sidebar-right .block-list ul,.block-list ol,.block-list .context{background:url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat 0 0;padding-top:1px;}#sidebar-right .block-list ol li{list-style-type:decimal;list-style-position:inside;margin-top:10px;font-weight:bold;color:#032649;}#sidebar-right .block-list li{border-bottom:1px solid #CFCFCF;margin:20px 20px 0 20px;padding:0 0 15px 0;}#sidebar-right .block-list .read-more{padding:0 20px 0 0;display:block;margin:5px 0 0 0;clear:left;}#sidebar-right .block-list .closure{background:url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;height:30px;display:block;margin:5px 0 0 0;} - #sidebar-right .block-user{background:url(/sites/all/themes/franceculture/images/leftgris-bg.png) repeat-y 0 0;line-height:14px;}#sidebar-right .block-user .block-inner{background:url(/sites/all/themes/franceculture/images/leftgris-bg-top.png) no-repeat 0 0;padding:5px 0 0 0;}#sidebar-right .block-user .title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}#sidebar-right .block-user .title{margin:0 10px 5px 10px;}#sidebar-right .block-user .title span{background-color:#ebebeb;padding:0 5px;letter-spacing:0;}#sidebar-right .block-user .context{padding:0 10px 5px;}#sidebar-right .block-user label{background:#ebebeb url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;padding:10px 0;display:block;margin:2px 0 0 0;text-align:center;}#sidebar-right .block-user .block-content{background:url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat 0 0;padding:15px 20px 0;}#sidebar-right .block-user ol li{list-style-type:decimal;list-style-position:inside;margin-top:10px;font-weight:bold;color:#032649;}#sidebar-right .block-user li{border-bottom:1px solid #CFCFCF;margin:2px 0;padding:0;border-top-width:0;}#sidebar-right .block-user li.first{margin-top:0;}#sidebar-right .block-user .closure{background:url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;height:30px;display:block;margin:5px 0 0 0;} - #sidebar-right #block-fcbloc-sur-le-meme-theme{background:url(/sites/all/themes/franceculture/images/leftgris-bg.png) repeat-y 0 0;line-height:14px;}#sidebar-right #block-fcbloc-sur-le-meme-theme .block-inner{background:url(/sites/all/themes/franceculture/images/leftgris-bg-top.png) no-repeat 0 0;padding:5px 0 0 0;}#sidebar-right #block-fcbloc-sur-le-meme-theme h2.title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;margin:0 10px 5px 10px;}#sidebar-right #block-fcbloc-sur-le-meme-theme h2.title span{background:#fff none;padding:0 5px;letter-spacing:0;display:inline-block;background-color:#ebebeb;}#sidebar-right #block-fcbloc-sur-le-meme-theme .context{padding:0 10px 5px;}#sidebar-right #block-fcbloc-sur-le-meme-theme .context a{float:left;margin:10px 10px 0 10px;width:120px;text-align:center;line-height:16px;}#sidebar-right #block-fcbloc-sur-le-meme-theme label{background:#ebebeb url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;padding:10px 0;display:block;margin:2px 0 0 0;text-align:center;}#sidebar-right #block-fcbloc-sur-le-meme-theme ol li{list-style-type:decimal;list-style-position:inside;margin-top:10px;font-weight:bold;color:#032649;}#sidebar-right #block-fcbloc-sur-le-meme-theme li{border-bottom:1px solid #CFCFCF;margin:20px 0 0 0;padding:0 0 15px 0;}#sidebar-right #block-fcbloc-sur-le-meme-theme li.last{padding:0;border-bottom:0px}#sidebar-right #block-fcbloc-sur-le-meme-theme li.first{margin-top:0;}#sidebar-right #block-fcbloc-sur-le-meme-theme .read-more{padding:0 20px 0 0;display:block;margin:5px 0 0 0;clear:left;}#sidebar-right #block-fcbloc-sur-le-meme-theme .closure{background:url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;height:30px;display:block;margin:5px 0 0 0;}#sidebar-right #block-fcbloc-sur-le-meme-theme p a{font-weight:normal;}#sidebar-right #block-fcbloc-sur-le-meme-theme h2.title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;margin:0 10px 5px 10px;} - #sidebar-right #block-fcbloc-publicite.block .block-inner,#sidebar-right #block-fcbloc-publicite.block .block-content,#sidebar-right #block-fcbloc-publicite.block .closure{background:none;padding:0;margin:0;}#sidebar-right #block-fcbloc-publicite.block .closure{display:none;}#sidebar-right #block-fcbloc-publicite.block .title span{background-color:#FFF;}#sidebar-right #block-fcbloc-publicite.block .title{margin:0;}#sidebar-right #block-fcbloc-publicite.block .pub-inner{width:300px;height:250px;}#sidebar-right #block-fcbloc-publicite.block p.pub-notice{display:block;text-align:center;background-color:#c7c7c7;color:#808080;padding:2px;margin:0;}#sidebar-right #block-fcbloc-publicite.block{margin-bottom:15px;} - #sidebar-right #block-views-partenariats_fo_liste-block_1.block,#sidebar-right #block-views-partenariats_fo_liste-block_1.block .block-inner,#sidebar-right #block-views-partenariats_fo_liste-block_1.block .block-content,#sidebar-right #block-views-partenariats_fo_liste-block_1.block .closure{background:none;padding:0;margin:0;}#sidebar-right #block-views-partenariats_fo_liste-block_1.block .title span{background-color:#FFF;}#sidebar-right #block-views-partenariats_fo_liste-block_1.block .title{margin:0;} - #sidebar-right #block-views-lesplusconsultes-block_3 h2.title span{background:#ebebeb url(/sites/all/themes/franceculture/images/picto-ecoute-gris.png) no-repeat 3px 50%;padding-left:28px;} - #content-right .propos li{border-bottom:none;margin-top:15px;padding-bottom:5px;}#content-right .propos li .date{font-size:12px;display:block;margin-bottom:5px;} - #sidebar-right .aide .closure{height:15px;}#sidebar-right .aide li{border-bottom:none;margin-top:10px;padding-bottom:0;} - .block-nav a{display:block;margin-bottom:5px;} - #content-right .qr .read-more{background:none;padding-bottom:5px;}#content-right .qr .closure{background-color:#ebebeb;padding-top:10px;height:40px;}#content-right .qr .closure a{color:#fff;background:url(/sites/all/themes/franceculture/images/ecoute-bg.png) no-repeat 0 0;display:block;text-align:center;width:280px;height:20px;margin:2px 10px;padding-top:2px;}#content-right .qr .closure a:hover{background-position:0 -22px;text-decoration:none;}#sidebar-right .qr-posezvotrequestion a{color:#fff;background:url(/sites/all/themes/franceculture/images/ecoute-bg.png) no-repeat 0 0;display:block;text-align:center;height:20px;margin:10px 10px -15px;padding-top:2px;}#sidebar-right .qr-posezvotrequestion a:hover{background-position:0 -22px;text-decoration:none;} - #sidebar-right .equipe li{border-bottom:none;padding-bottom:5px;margin-top:15px;} - #content-right .votre-liste ol li{list-style-position:inside;border-bottom:none;font-weight:normal;color:#4D4D4D;} - #content-right .sujet li{margin-bottom:5px;padding-bottom:5px;border-bottom:0;}#content-right .sujet .illustration{float:left;margin-right:5px;}#content-right .sujet .timer{margin-left:0;} - #content-right #block-fc_evenement-proposer-un-evenement ul{padding:0 0 0.25em 0;}#content-right #block-fc_evenement-proposer-un-evenement{background:url(/sites/all/themes/franceculture/images/leftgris-bg.png) repeat-y 0 0;line-height:14px;}#content-right #block-fc_evenement-proposer-un-evenement .block-inner{background:url(/sites/all/themes/franceculture/images/leftgris-bg-top.png) no-repeat 0 0;padding:5px 0 0 0;}#content-right #block-fc_evenement-proposer-un-evenement .title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}#content-right #block-fc_evenement-proposer-un-evenement .title{margin:0 10px 5px 10px;}#content-right #block-fc_evenement-proposer-un-evenement .title span{background-color:#ebebeb;padding:0 5px;letter-spacing:0;}#content-right #block-fc_evenement-proposer-un-evenement .context{padding:0 10px 5px;}#content-right #block-fc_evenement-proposer-un-evenement .block-content{background:url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat 0 0;padding:15px 20px 0;}#content-right #block-fc_evenement-proposer-un-evenement li{border-bottom:1px solid #CFCFCF;margin:20px 0px 0 0px;padding:0 0 15px 0;border-top-width:0;}#content-right #block-fc_evenement-proposer-un-evenement li.first{margin-top:0;}#content-right #block-fc_evenement-proposer-un-evenement .closure{background:url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;height:35px;display:block;}#content-right #block-fc_evenement-proposer-un-evenement .desc .grippie{margin-left:25px;} - #content-right #block-fc_evenement-proposer-un-evenement .form-item label{font-weight:normal}#content-right #block-fc_evenement-proposer-un-evenement input.submit{width:100px;}#content-right #block-fc_evenement-proposer-un-evenement input.submit.file-add,#content-right #block-fc_evenement-proposer-un-evenement input.submit.file-remove{width:100px;margin-left:25px;border:2px outset;height:25px;}#content-right #block-fc_evenement-proposer-un-evenement input.submit.suite{background:url(/sites/all/themes/franceculture/images/btn-evenement.png) no-repeat 0 0;margin-left:185px;margin-top:0;text-align:center;width:85px;height:25px;color:#fff;border:none;}#content-right #block-fc_evenement-proposer-un-evenement input.submit.suite:hover{background-position:0 -25px;text-decoration:none;}#content-right #block-fc_evenement-proposer-un-evenement p.connect{height:30px;width:120px;margin-left:125px;padding:5px 20px;background:url(/sites/all/themes/franceculture/images/btn-evenement-connect.png) no-repeat 0 0;}#content-right #block-fc_evenement-proposer-un-evenement p.connect:hover{background-position:0 -39px;}#content-right #block-fc_evenement-proposer-un-evenement p.connect a{font-size:13px;color:#fff}#content-right #block-fc_evenement-proposer-un-evenement p.connect a:hover{text-decoration:none;}#content-right #block-fc_evenement-proposer-un-evenement div.messages{margin:1em;}#content-right #block-fc_evenement-proposer-un-evenement .quand .description{display:none;}#content-right #block-fc_evenement-proposer-un-evenement .quand{margin-left:25px;}#content-right #block-fc_evenement-proposer-un-evenement .quand label{margin-left:5px;}#content-right #block-fc_evenement-proposer-un-evenement .quand .container-inline-date.date-clear-block{clear:none;display:inline;float:left;margin-top:10px;}#content-right #block-fc_evenement-proposer-un-evenement .quand label span.form-required{display:none;}#content-right #block-fc_evenement-proposer-un-evenement .quand label span.form-required{display:none;}#content-right #block-fc_evenement-proposer-un-evenement .desc .form-item .description{margin-left:25px;clear:left;}#content-right #block-fc_evenement-proposer-un-evenement .ahah-progress-throbber{margin-top:-22px;margin-left:145px;}#content-right #block-fc_evenement-proposer-un-evenement .ahah-progress-bar{width:235px;float:left;margin-left:25px;}#content-right #block-fc_evenement-proposer-un-evenement .supl span.field-prefix{margin-left:25px;font-size:13px;}#content-right #block-fc_evenement-proposer-un-evenement .supl input{margin-left:0px;width:195px;}#content-right #block-fc_evenement-proposer-un-evenement .supl #legal-wrapper{margin:10px 25px 5px;} - #sidebar-right .form-com p,#content-right .form-com p{background:transparent url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat scroll 0 0;padding-top:11px;text-align:center;color:#C1272D;}#sidebar-right .form-com label,#content-right .form-com label{margin:10px 25px 5px 25px;background:none;text-align:left;color:#4D4D4D;font-size:12px;padding:0;}#sidebar-right .form-com label span,#content-right .form-com label span{color:#C1272D;font-size:13px;}#sidebar-right .form-com input,#sidebar-right .form-com textarea,#content-right .form-com input,#content-right .form-com textarea{margin:0 25px;width:230px;padding:3px 5px;}#content-right .form-com select,#sidebar-right .form-com select{margin:0 25px;width:240px;padding:3px 5px;}#sidebar-right .form-com img,#content-right .form-com img{margin:10px 25px;text-align:center;}#sidebar-right .form-com input.submit,#content-right .form-com input.submit{width:80px;margin-top:20px;}#sidebar-right .form-com input.submit,#content-right .form-com input.submit{background-color:#773587;text-align:center;color:#fff;font-size:13px;font-weight:bold;cursor:pointer;padding:2px 5px;width:80px;}#sidebar-right .form-com input.submit:hover,#content-right .form-com input.submit:hover{background-color:#C1272D;}#content-right .form-com .quoi,#content-right .form-com .quand,#content-right .form-com .ou,#sidebar-right .form-com .quoi,#sidebar-right .form-com .quand,#sidebar-right .form-com .ou{margin-bottom:20px;}#content-right .form-com .quand input,#sidebar-right .form-com .quand input{width:75px;float:left;margin:0 0 0 5px;padding:2px 5px;display:inline;}#content-right .form-com .quand input.submit,#sidebar-right .form-com .quand input.submit{width:22px;height:22px;margin:0 0 0 2px;padding:0;border:none;}#content-right .form-com .quand label,#sidebar-right .form-com .quand label{float:left;margin:5px 0 0 25px;display:inline;}#content-right .form-com .ou .cp,#sidebar-right .form-com .ou .cp{float:left;width:90px;margin:15px 0 0 25px;display:inline;}#content-right .form-com .ou .cp input,#sidebar-right .form-com .ou .cp input{width:70px;margin:0;}#content-right .form-com .ou .cp label,#sidebar-right .form-com .ou .cp label{margin:0;}#content-right .form-com .ou .commune,#sidebar-right .form-com .ou .commune{float:left;width:170px;margin:15px 0 0 0;}#content-right .form-com .ou .commune input,#sidebar-right .form-com .ou .commune input{width:140px;margin:0;}#content-right .form-com .ou .commune label,#sidebar-right .form-com .ou .commune label{margin:0;}#content-right .form-com .desc,#sidebar-right .form-com .desc{margin-bottom:20px;}#content-right .form-com .desc input,#sidebar-right .form-com .desc input{width:160px;float:left;margin:0 0 0 25px;padding:2px 5px;display:inline;}#content-right .form-com .desc input.submit,#sidebar-right .form-com .desc input.submit{width:80px;height:22px;margin:0 0 0 2px;padding:0;border:none;} - #content-right .plus ul{padding-left:20px;padding-right:20px;}#content-right .plus li{clear:left;margin:20px 0 0 0;}#content-right .plus p{float:right;width:140px;margin-right:10px;font-size:11px;color:#666666;display:inline;line-height:14px;}#content-right .plus p a{font-size:12px;display:block;margin:0 0 5px 0;}#content-right .plus p span{font-size:12px;font-style:italic;display:block;margin-top:5px;} - .search-col-right p{background:url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat scroll 0 0;padding:20px 0 0 25px;height:30px;margin:0;}.search-col-right input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:4px 10px 5px 10px;float:left;width:205px;}.search-col-right input.submit{padding:0;border:none;margin:0 0 0 2px;width:26px;height:26px;background-color:#773584;}body.lecture .search-col-right .closure{height:15px;} - .writter{padding:0 16px 0 0;border-right:1px solid #CFCFCF;margin:10px 0;}.book{padding:0 0 0 17px;margin:10px 0;}.who{display:block;font-size:16px;margin-bottom:2px;}body.page-accueil div.view-quelisentils img.imagecache-personne_image_liste,body.node-type-rf-personne div.view-quelisentils img.imagecache-personne_image_liste,body.page-taxonomy-term-131 div.view-quelisentils img.imagecache-personne_image_liste{padding:0 16px 0 0;border-right:1px solid #CFCFCF;margin:10px 0;}body.page-accueil div.view-quelisentils img.imagecache-oeuvre_image_liste,body.node-type-rf-personne div.view-quelisentils img.imagecache-oeuvre_image_liste,body.page-taxonomy-term-131 div.view-quelisentils img.imagecache-oeuvre_image_liste{padding:0 0 0 15px;margin:10px 0;} - .profil-extra img{margin-bottom:20px;}.profil-extra td{padding-bottom:8px;color:#262626;}.profil-extra .ref{width:85px;}.profil-extra .ref.map{width:225px;}.profil-extra .infos{padding-left:10px;} - .oeuvre p{color:#666666;font-size:11px;margin-left:105px;}.oeuvre a.title{display:block;font-size:12px;margin-bottom:3px;}.oeuvre span.format{color:#4D4D4D;font-weight:bold;display:block;margin-bottom:3px;} - .rel-emission .position{position:relative;text-align:right;width:235px;margin-bottom:8px;}.rel-emission .position a{display:block;height:45px;}.rel-emission .position p{position:absolute;top:0;left:0;margin:10px 0 0 5px;font-size:13px;font-weight:bold;color:#fff;z-index:10;width:110px;text-align:left;line-height:13px;}.rel-emission .position .opacity{position:absolute;bottom:0;left:0;display:block;width:120px;height:40px;opacity:0.8;}.rel-emission .position .opacity span{display:none;} - .position .docks{background-color:#29ABE2;}.position .theme1-131{background-color:#D2D721;}.position .theme1-130{background-color:#47758D;}.position .theme1-135{background-color:#1B97CD;}.position .theme1-132{background-color:#EED7A1;}.position .theme1-133{background-color:#EF6F60;}.position .theme1-289{background-color:#FFED00;}.position .theme1-290{background-color:#8E5698;}.position .theme1-134{background-color:#FBB03B;} - - - .part{position:relative;margin-bottom:10px;width:300px;}.part img{border:10px solid #EBEBEB;}.part .opaque{position:absolute;bottom:0;left:0;margin:0 0 10px 10px;height:30px;width:280px;background-color:#000;opacity:0.7;z-index:10;}.part p{color:#fff;font-size:16px;font-weight:bold;position:absolute;bottom:0;left:0;margin:0 0 15px 15px;z-index:20;} - #sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist{padding-bottom:50px;padding-top:5px;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist a{float:none;margin:0;text-align:left;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist .illustration{float:left;margin-right:20px;width:70px;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist a.submit{background:transparent url(/sites/all/themes/franceculture/images/btn-large.png) no-repeat scroll 0 0;color:#FFFFFF;float:right;padding:4px 10px;text-align:center;width:140px;margin-top:20px;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist a.submit:hover{background-position:0 -25px;text-decoration:none;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist div.scrollable-playlist{position:relative;overflow:hidden;height:220px;margin:10px;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist div.scrollable-playlist div.field-items{position:absolute;height:200em;width:260px;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist div.scrollable-playlist div.field-items div.field-item{top:5px;border-bottom:1px solid #CFCFCF;padding:7px 0;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist a.disabled{visibility:hidden !important;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist a.prev{background:#773584 url(/sites/all/themes/franceculture/images/script-scroll-top.png);cursor:pointer;display:block;height:15px;left:5px;margin:40px 0 0 5px;top:0;position:absolute;width:280px;z-index:10;}#sidebar-right div#block-fcbloc-votre-liste-decoute .context.playlist a.next{background:#773584 url(/sites/all/themes/franceculture/images/script-scroll-bottom.png);cursor:pointer;display:block;width:15px;height:15px;position:absolute;bottom:0;left:0;z-index:10;margin-bottom:75px;margin-left:150px;} - - #content-bottom{background:url(/sites/all/themes/franceculture/images/bg_bottom.png) repeat-y 0 0;}#content-bottom .clear-close{background:url(/sites/all/themes/franceculture/images/bg-bottom_bottom.png) no-repeat 0 100%;height:32px;clear:both;}#content-bottom .titre-barre span{background-color:#ebebeb;}#content-bottom ol{margin:10px 15px 0 15px;}#content-bottom li{border-bottom:1px solid #CFCFCF;}#cb-left{background:transparent url(/sites/all/themes/franceculture/images/cb-left_top.png) no-repeat 0 0;}#cb-right{background:transparent url(/sites/all/themes/franceculture/images/cb-right_top.png) no-repeat 0 0;}#cb-left li{margin:0 0 15px 0;padding:0 0 15px 0;}#cb-left .auteur{display:block;margin:10px 0 5px 0;}#cb-right li{list-style-type:decimal;list-style-position:inside;font-weight:bold;color:#032649;margin:0 0 6px 0;padding:0 0 6px 0;}#block-views-lesplusconsultes-block_1{background:transparent url(/sites/all/themes/franceculture/images/cb-right_top.png) no-repeat 0 0;}#block-views-lesplusconsultes-block_1 li{list-style-type:decimal;list-style-position:inside;font-weight:bold;color:#032649;margin:0 0 6px 0;padding:0 0 6px 0;}#block-views-lesplusconsultes-block_1 h2.title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}#block-views-lesplusconsultes-block_1 h2.title span{background-color:#EBEBEB;display:inline-block;padding:0 5px;letter-spacing:0;} - - - body.blogs .blog-home{position:absolute;top:0;right:0;margin-top:-12px;margin-right:-12px;z-index:10;}body.blogs .opacity h1{position:absolute;bottom:0;left:0;margin-bottom:5px;margin-left:15px;display:block;opacity:0.8;color:#fff;padding:15px;line-height:20px;background-color:#29ABE2;font-size:30px;}body.blogs .opacity h1 a{color:#FFF;text-decoration:none;}body.blogs .opacity h1 a.le-blog-de{display:block;font-size:12px;color:#032649;}body.blogs .opacity-bottom{position:absolute;bottom:0;left:0;width:990px;height:5px;opacity:0.8;background-color:#29ABE2;} - body.blogs .list-article{margin-bottom:40px;}body.blogs .list-article li{margin-top:15px;padding-top:10px;border-top:1px solid #CFCFCF;}body.blogs .item-list ul{margin:0;}body.blogs .item-list li{margin:15px 0 0;padding-top:10px;border-top:1px solid #CFCFCF;list-style:none;}.blog-illu{float:left;position:relative;background:url(/sites/all/themes/franceculture/images/blog-ill-top.png) no-repeat 0 0;padding-top:10px;width:100px;margin-right:20px;}.blog-illu .date{position:absolute;top:0;left:0;z-index:20;margin-top:12px;color:#fff;display:block;text-align:center;width:100px;font-size:14px;}.blog-illu .opaque{position:absolute;top:0;left:0;width:100px;height:20px;background-color:#000;opacity:0.7;margin-top:10px;}.blog-illu span{border-bottom:1px solid #CFCFCF;margin-bottom:2px;padding-bottom:2px;font-size:11px;display:block;font-weight:bold;}.blog-illu span.auteur{border-bottom:none;}.blog-infos{float:left;width:520px;}.view-id-personne_fo_fleuve .blog-infos{width:auto;float:none;}.blog-infos p,body.node-type-rf-billet-blog#tinymce p{font-size:13px;color:#262626;line-height:18px;margin-bottom:10px;}body.blogs .pager{clear:left;}body.blogs .form-com{clear:both;}body.blogs #content .blog-infos .illustration{position:relative;float:left;margin:0 15px 25px 0;}body.blogs #content .blog-infos .large{margin-right:0;}body.blogs #content .blog-infos .illustration .opaque{position:absolute;bottom:0;left:0;width:100%;background-color:#000;opacity:0.7;}body.blogs #content .blog-infos .illustration .opaque p{font-weight:bold;color:#fff;font-size:11px;margin:2px 10px;} - #sidebar-right #block-views-864a217bf1f0671a8b7d686e759c3554 .block-content ul.views-summary li{margin-top:0;}#sidebar-right #block-views-864a217bf1f0671a8b7d686e759c3554 .block-content ul.views-summary li ~ li{margin-top:20px;} - #sidebar-right #block-fc_widget_twitter-field_twitter .block-content ul li{margin-top:0;}#sidebar-right #block-fc_widget_twitter-field_twitter .block-content ul li ~ li{margin-top:20px;} - - h1 .more{color:#773584;font-size:12px;font-weight:bold;}h1 .more .result,h1 .more .tag{font-size:24px;margin:0 5px;}.more-infos input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:4px 10px 5px 10px;float:left;width:270px;display:inline;}.more-infos input.submit{padding:0;border:none;margin:0 0 0 2px;width:77px;height:26px;background-color:#773584;}.more-infos input.box{float:left;margin:6px 0 0 20px;display:inline;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;width:15px;height:15px;}.more-infos label.box{float:left;margin:5px 0 0 5px;display:inline;color:#032649;font-size:11px;font-weight:bold;}.trie{margin-top:30px;color:#032649;font-size:11px;font-weight:bold;}.trie a{color:#032649;margin:0 3px;}.trie a.first{margin-left:0;}.trie a.active{color:#773584;}.result li{border-top:1px solid #CFCFCF;margin:0 0 15px 0;padding:10px 0 0 0;clear:both;}.result .illustration{float:right;margin-left:20px;}.result .tagged{background-color:#FFFF00;} - body.page-theme #content-inner .more{color:#773584;font-size:13px;font-weight:bold;margin:10px 0 20px 0;}body.page-theme #content-inner .more select{border-color:#CCCCCC #666666 #666666 #CCCCCC;border-style:solid;border-width:1px;margin-left:10px;padding:2px;width:200px;color:#4D4D4D;font-size:12px;}body.page-theme .list-article li{clear:both;}body.page-theme .list-article li .illustration{float:left;margin-right:10px;} - div#grille-programmes #grille-navigation{position:relative;background-color:#EBEBEB;padding:15px 10px 0 10px;margin:0;}div#grille-programmes h1{color:#773584;padding-bottom:20px;margin-bottom:0;}div#grille-programmes .btn-liste-ecoute{color:#fff;background:url(/sites/all/themes/franceculture/images/btn-liste-ecoute.png) no-repeat 0 0;font-weight:bold;font-size:12px;padding:4px 33px;line-height:15px;width:185px;text-align:center;float:right;display:block;}div#grille-programmes .btn-liste-ecoute:hover{background-position:0 -23px;text-decoration:none;} - div#grille-programmes .script-prog a.prev,div#grille-programmes .script-prog a.prevPage{display:block;width:15px;height:15px;background:url(/sites/all/themes/franceculture/images/script-scroll-left.gif) no-repeat;position:absolute;top:0;left:0;cursor:pointer;z-index:10;margin-top:73px;margin-left:6px;}div#grille-programmes .script-prog a.disabled{visibility:hidden !important;}div#grille-programmes .script-prog a.next,div#grille-programmes .script-read a.nextPage{background:url(/sites/all/themes/franceculture/images/script-scroll-right.gif);display:block;width:15px;height:15px;position:absolute;top:0;right:0;cursor:pointer;z-index:10;margin-top:73px;margin-right:6px;}div#grille-programmes .script-prog div.scrollable{position:relative;overflow:hidden;width:960px;height:31px;margin:0 0 0 5px;background-color:#EBEBEB;}div#grille-programmes #grille-navigation .script-prog ol{margin:0;}div#grille-programmes .script-prog #thumbs{position:absolute;width:10000em;clear:both;left:-1644px;} - div#grille-programmes .script-prog #thumbs li{width:137px;height:31px;cursor:pointer;margin:0;float:left;padding:0;position:relative;line-height:15px;text-align:center;background:url(/sites/all/themes/franceculture/images/li-prog.png) no-repeat 0 0;color:#032649;font-size:15px;font-weight:bold;}div#grille-programmes .script-prog #thumbs li.active{background:url(/sites/all/themes/franceculture/images/li-prog-active.png) no-repeat 0 0;}div#grille-programmes .script-prog #thumbs li a{display:block;height:100%;padding-top:7px;text-transform:lowercase;} - .plage-horaire a.prev,.plage-horaire a.prevPage{display:block;width:15px;height:15px;background:url(/sites/all/themes/franceculture/images/script-scroll-left.gif) no-repeat;position:absolute;top:0;left:0;cursor:pointer;z-index:10;margin-top:73px;margin-left:1px;}.plage-horaire a.disabled{visibility:hidden !important;}.plage-horaire a.next,.plage-horaire a.nextPage{background:url(/sites/all/themes/franceculture/images/script-scroll-right.gif);display:block;width:15px;height:15px;position:absolute;top:0;right:0;cursor:pointer;z-index:10;margin-top:73px;margin-right:1px;}.plage-horaire{width:960px;background-color:#fff;border-right:1px solid #CFCFCF;border-left:1px solid #CFCFCF;border-top:1px solid #CFCFCF;border-bottom:5px solid #C1272D;margin-top:5px;height:125px;padding:0 14px;position:relative;}.plage-horaire .horaire-inner{overflow:hidden;width:960px;height:125px;position:relative;}div#grille-programmes #thumbs2{position:absolute;width:10000em;clear:both;}.plage-horaire li{width:160px;height:125px;float:left;}.plage-horaire li div{width:140px;height:115px;position:relative;float:left;padding:10px 10px 0;}.plage-horaire li p{color:#032649;font-weight:bold;}.plage-horaire li.col-2{width:348px;}.plage-horaire h2{color:#4D4D4D;font-size:12px;font-weight:normal;}.plage-horaire a{display:block;height:100%;}.plage-horaire a:hover{text-decoration:none;}.plage-horaire span{position:absolute;bottom:0;left:0;height:16px;width:159px;background-color:#F9E9E9;font-size:11px;font-weight:bold;color:#ED1C24;display:block;padding:2px 0 2px 5px;}.plage-horaire span a{color:#ED1C24;}.plage-horaire span.second{margin-left:164px;}.plage-horaire .active span{background-color:#ED1C24;color:#fff;}.plage-horaire .active span a{color:#fff;} - .detail-plage{border-left:1px solid #CFCFCF;border-right:1px solid #CFCFCF;border-bottom:1px solid #CFCFCF;background:url(/sites/all/themes/franceculture/images/prog-horaire.png) repeat-x 0 0;padding:2px 15px 20px 15px;margin-bottom:40px;}.detail-plage .heure{color:#C1272D;font-size:18px;font-weight:bold;margin:5px 0 10px 0;}.detail-plage .heure .debut{float:left;}.detail-plage .heure .fin{float:right;}.detail-plage .programme p{padding-top:16px;}.detail-plage .programme img{float:left;margin-right:30px;}.detail-plage .programme h3{color:#C1272D;font-size:11px;font-weight:bold;line-height:11px;}.detail-plage .programme h2{font-size:20px;}.detail-plage .programme .btn-emission{padding:3px 25px 4px;float:right;line-height:15px;}.detail-plage .programme ul{margin:20px 0 0 0;float:left;width:300px;}.detail-plage .programme ul.split{margin-left:30px;}.detail-plage .programme li{border-bottom:1px solid #CFCFCF;margin-bottom:3px;padding-bottom:5px;font-size:11px;line-height:14px;}.detail-plage .programme li a{font-size:12px;}.detail-plage .programme li span{color:#C1272D;font-weight:bold;margin-right:2px;} - .detail-arbo{border:1px solid #CFCFCF;padding:30px;margin-top:5px;}.detail-arbo ul{margin-left:120px;}.detail-arbo li.actionnable{border-top:1px solid #CFCFCF;margin-top:10px;padding-top:10px;position:relative;width:810px;cursor:pointer;}.detail-arbo .action{position:absolute;top:0;right:0;margin:10px 0 0 0;cursor:pointer;}.detail-arbo span{color:#C1272D;font-weight:bold;}.detail-arbo span.plage{font-size:16px;display:block;width:50px;float:left;}.detail-arbo h2{margin-left:55px;}.detail-arbo p{margin-left:55px;color:#333333;font-size:12px;}.detail-arbo li ul{margin-left:55px;}.detail-arbo li li span{margin-right:3px;}.detail-arbo li li p{margin:0;} - body.section-podcasts .attachment-before .view-display-id-attachment_1{position:relative;background-color:#EBEBEB;padding:15px 10px 0 10px;margin:0;}body.section-podcasts .attachment-before .view-display-id-attachment_1{padding-bottom:0;margin-bottom:0;}body.section-podcasts .attachment-before .view-display-id-attachment_1 .view-content{margin:0 0 15px 30px;}body.section-podcasts .attachment-before .view-display-id-attachment_1 .view-content li{display:block;float:left;margin:0 5px;position:relative;}body.section-podcasts li div.content{position:absolute;top:0;left:0;width:176px;border-top:1px solid #000;padding-bottom:15px;background:url(/sites/all/themes/franceculture/images/bandeau-podcast-bottom.gif) no-repeat 0 100%;margin-top:-55px;margin-left:-3px;z-index:100;}body.section-podcasts li div.content p{background:url(/sites/all/themes/franceculture/images/bandeau-podcast-bg.png) repeat-y 0 0;padding:5px 15px;margin:0;font-size:11px;font-weight:bold;line-height:11px;}body.section-podcasts li div.content p .timer{display:block;margin:0;} - body.podcasts .modifier{text-align:right;margin:30px 20px 0 0;height:25px;}body.podcasts .modifier a{color:#fff;background:url(/sites/all/themes/franceculture/images/btn-modifier.png) no-repeat 0 0;padding:5px 18px;float:right;}body.podcasts .modifier a:hover{background-position:0 -25px;text-decoration:none;}body.podcasts .closure{height:60px;background-color:#ebebeb;padding-top:10px;}body.podcasts .closure a{color:#fff;background:url(/sites/all/themes/franceculture/images/ecoute-bg.png) no-repeat 0 0;display:block;text-align:center;width:280px;height:20px;margin:2px 10px;padding-top:2px;}body.podcasts .closure a:hover{background-position:0 -22px;text-decoration:none;} - body.section-podcasts h1{color:#773584;padding-bottom:10px;margin-bottom:0;}body.section-podcasts .primary-tabs{width:970px;height:31px;margin:0;margin-top:10px;}body.section-podcasts .primary-tabs span{float:left;}body.section-podcasts .primary-tabs span a{display:block;text-align:center;font-size:16px;padding-top:5px;}body.section-podcasts .primary-tabs span a:hover{text-decoration:none;}body.section-podcasts .primary-tabs span.themes a{background:url(/sites/all/themes/franceculture/images/tab-theme.png) no-repeat 0 0;width:130px;height:26px;}body.section-podcasts .primary-tabs span.themes a.active{background:url(/sites/all/themes/franceculture/images/tab-theme-active.png) no-repeat 0 0;}body.section-podcasts .primary-tabs span.alpha a{background:url(/sites/all/themes/franceculture/images/tab-alpha.png) no-repeat 0 0;width:200px;height:26px;}body.section-podcasts .primary-tabs span.alpha a.active{background:url(/sites/all/themes/franceculture/images/tab-alpha-active.png) no-repeat 0 0;}body.section-podcasts .primary-tabs span.prod a{background:url(/sites/all/themes/franceculture/images/tab-prod.png) no-repeat 0 0;width:150px;height:26px;}body.section-podcasts .primary-tabs span.prod a.active{background:url(/sites/all/themes/franceculture/images/tab-prod-active.png) no-repeat 0 0;}body.section-podcasts .primary-tabs span.cle{background:url(/sites/all/themes/franceculture/images/tab-cle.png) no-repeat 0 0;width:490px;height:31px;color:#fff;font-size:11px;}body.section-podcasts .primary-tabs span.cle input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:2px 10px 3px 10px;float:left;width:225px;margin:5px 0 0 10px}body.section-podcasts .primary-tabs span.cle input.submit{padding:0;border:none;margin:5px 0 0 2px;width:22px;height:22px;background-color:#773584;}body.section-podcasts .primary-tabs span.cle span{margin:5px 0 0 10px;line-height:12px;}body.section-podcasts .secondary-tabs{margin:10px 0 30px 0;color:#032649;font-weight:bold;}body.section-podcasts .secondary-tabs a{margin:0 5px;letter-spacing:0.2px;} - body.section-podcasts .views-view-grid li img{float:right;margin-left:15px;}body.section-podcasts .views-view-grid li .views-field-title{font-size:16px;margin:0 0 5px 0;}body.section-podcasts .views-view-grid li span{display:block;margin-bottom:5px;letter-spacing:-0.2px;}body.section-podcasts .views-view-grid li span.timer{margin:0 0 5px 0;}body.section-podcasts .views-view-grid li .views-field-field-generique-personne-nid .field-content{display:inline;} - body.section-podcast .article-full{margin-bottom:30px;}body.section-podcast #content-left h2.titre-barre{margin-bottom:30px;}body.section-podcast .article-full h2{font-size:24px;color:#262626;}body.section-podcast .article-full h3{font-size:16px;color:#773584;margin:10px 0 5px 0;}body.section-podcast .article-full p{margin:10px 0 10px 215px;}body.section-podcast .article-full .illustration{float:left;margin:0 15px 25px 0;}body.section-podcast .article-full .instal{background:url(/sites/all/themes/franceculture/images/instal-bg.png) no-repeat 0 0;height:88px;margin:0 0 5px 215px;}body.section-podcast .article-full .instal a{font-size:11px;float:left;display:block;margin-top:10px;text-align:center;}body.section-podcast .article-full .instal a:hover{text-decoration:none;}body.section-podcast .article-full .instal a.itune{width:88px;}body.section-podcast .article-full .instal a.reader{width:85px;}body.section-podcast .article-full .instal a.yahoo{width:85px;}body.section-podcast .article-full .instal a.netvibes{width:85px;}body.section-podcast .article-full .instal a.netvibes span{margin-top:3px;}body.section-podcast .article-full .instal a.lien-rss{width:75px;}body.section-podcast .article-full .instal a.lien-rss span{margin-top:5px;}body.section-podcast .article-full .instal span{display:block;} - body.podcasts .script-vertical h2{margin-bottom:36px;}body.podcasts .script-vertical h2.titre-barre{margin-bottom:5px;}body.podcasts .script-vertical .liste-ecoute{position:relative;}body.podcasts .script-vertical a.prev,body.podcasts .script-vertical a.prevPage{display:block;width:260px;height:15px;background:#773584 url(/sites/all/themes/franceculture/images/script-scroll-top.png) no-repeat;position:absolute;top:0;left:0;cursor:pointer;z-index:10;margin:40px 0 0 20px;}body.podcasts .script-vertical a.disabled{visibility:hidden !important;}body.podcasts .script-vertical a.next,body.podcasts .script-vertical a.nextPage{background:#773584 url(/sites/all/themes/franceculture/images/script-scroll-bottom.png);display:block;width:15px;height:15px;position:absolute;bottom:0;left:0;cursor:pointer;z-index:10;margin-bottom:120px;margin-left:159px;}body.podcasts .script-vertical div.scrollable-vertical{position:relative;overflow:hidden;width:300px;height:421px;margin:0;background:url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat scroll 0 0;}body.podcasts .script-vertical #thumbs-vertical{position:absolute;width:10000em;clear:both;background:none;}body.podcasts .script-vertical #thumbs-vertical li{cursor:pointer;padding:15px 0 5px 0;margin:10px 20px 0 20px;clear:left;width:260px;height:109px;}body.podcasts .script-vertical #thumbs-vertical li .illustration{float:left;}body.podcasts .script-vertical #thumbs-vertical li p{margin-left:60px;}body.podcasts .script-vertical #thumbs-vertical li p a{display:block;margin-bottom:5px;line-height:15px;}body.podcasts .script-vertical #thumbs-vertical li p span{display:block;margin-top:5px;}body.podcasts .script-vertical #thumbs-vertical li p span span{display:inline;margin:0 0 0 5px;} - - - body.emissions #content-top{margin-bottom:-30px;}body.section-emissions .view-header{position:relative;background-color:#EBEBEB;padding:15px 10px 0 10px;margin:0;}body.section-emissions #content #content-inner,body.section-grille-des-programmes #content #content-inner,body.section-programmes #content #content-inner{padding-top:0;}body.section-emissions h1{color:#773584;padding-bottom:10px;margin-bottom:0;} - body.section-emissions .primary-tabs{width:970px;margin:0;}body.section-emissions .primary-tabs span{float:left;}body.section-emissions .primary-tabs span a{display:block;text-align:center;font-size:16px;padding-top:5px;}body.section-emissions .primary-tabs span a:hover{text-decoration:none;}body.section-emissions .primary-tabs span.themes a{background:url(/sites/all/themes/franceculture/images/tab-theme.png) no-repeat 0 0;width:125px;height:26px;}body.section-emissions .primary-tabs span.themes a.active{background:url(/sites/all/themes/franceculture/images/tab-theme-active.png) no-repeat 0 0;}body.section-emissions .primary-tabs span.alpha a{background:url(/sites/all/themes/franceculture/images/tab-alpha.png) no-repeat 0 0;width:200px;height:26px;}body.section-emissions .primary-tabs span.alpha a.active{background:url(/sites/all/themes/franceculture/images/tab-alpha-active.png) no-repeat 0 0;}body.section-emissions .primary-tabs span.prod a{background:url(/sites/all/themes/franceculture/images/tab-prod.png) no-repeat 0 0;width:150px;height:26px;}body.section-emissions .primary-tabs span.prod a.active{background:url(/sites/all/themes/franceculture/images/tab-prod-active.png) no-repeat 0 0;}body.section-emissions .primary-tabs span.cle{background:url(/sites/all/themes/franceculture/images/tab-cle.png) no-repeat 0 0;width:490px;height:31px;color:#fff;font-size:11px;}body.section-emissions .primary-tabs span.cle input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:2px 10px 3px 10px;float:left;width:225px;margin:5px 0 0 10px}body.section-emissions .primary-tabs span.cle input.submit{padding:0;border:none;margin:5px 0 0 2px;width:22px;height:22px;background-color:#773584;}body.section-emissions .primary-tabs span.cle span{margin:5px 0 0 10px;line-height:12px;}body.section-emissions .secondary-tabs{margin:10px 0 30px 0;color:#032649;font-weight:bold;}body.section-emissions .secondary-tabs a{margin:0 5px;letter-spacing:0.2px;} - body.emissions .list-rubrique li h2{margin-bottom:30px;}body.emissions .list-rubrique li h2.titre-barre{font-size:16px;}body.emissions .list-rubrique li li.clear{float:left;width:100%;height:40px;}body.emissions .list-rubrique li li.clear span{display:none;}body.emissions .list-rubrique li li.first{padding-left:0;margin-left:0;border-left:none;}body.emissions .list-rubrique li li{float:left;width:305px;border-left:1px solid #CFCFCF;margin:0 0 0 15px;padding:0 0 0 15px;color:#4D4D4D;font-size:11px;font-weight:bold;line-height:12px;}body.emissions .list-rubrique li li img{margin-bottom:5px;}body.emissions .list-rubrique li li h3{font-size:16px;margin:0 0 5px 0;}body.emissions .list-rubrique li li span{display:block;margin-bottom:5px;letter-spacing:-0.2px;}body.emissions .list-rubrique li li span.date{display:inline;}body.emissions .list-rubrique li li span.timer{margin:0 0 5px 0;display:inline;}body.emissions .list-rubrique li li span.timer img{margin-bottom:0;}body.emissions .list-rubrique li li p{font-weight:normal;margin-top:5px;}body.emissions .list-rubrique li li .rubrique{height:20px;}ul.views-view-grid li{float:left;width:305px;border-left:1px solid #CFCFCF;margin:0 0 0 15px;padding:0 0 0 15px;color:#4D4D4D;font-size:11px;font-weight:bold;line-height:12px;}ul.views-view-grid li.col-1{padding-left:0;margin-left:0;border-left:none;}ul.views-view-grid li.empty{float:left;width:100%;height:40px;}ul.views-view-grid li .rubrique{height:20px;}ul.views-view-grid li h3{font-size:16px;margin:0 0 5px 0;}ul.views-view-grid li span.date{display:inline;}ul.views-view-grid li span.timer{margin:0 0 5px 0;display:inline;}ul.views-view-grid li span.timer img{margin-bottom:0;}ul.views-view-grid li p{font-weight:normal;margin-top:5px;}div.views-view-grid-title{clear:left;margin-bottom:30px;}div.views-view-grid-title h2.titre-barre{font-size:16px;} - body.emissions .article-full{color:#262626;font-size:14px;margin-bottom:40px;}body.emissions .article-full p.theme{font-size:13px;margin-top:30px;}body.emissions .article-full p.theme a{font-size:12px;margin:0 2px;}body.emissions .bandeau{position:relative;margin-bottom:20px;margin-left:15px;}body.emissions .bandeau h1{position:absolute;top:0;left:0;margin-top:10px;margin-left:-10px;display:block;opacity:0.95;height:75px;color:#fff;padding:5px 10px 10px 20px;line-height:20px;max-width:300px;}body.emissions .bandeau h1 span{display:block;font-size:12px;color:#032649;font-weight:bold;}body.emissions .bandeau h1 .site{background:url(/sites/all/themes/franceculture/images/emission.gif) no-repeat 0 0;display:block;font-size:12px;text-align:center;width:132px;height:17px;line-height:15px;}body.emissions .bandeau .illu-small{position:absolute;top:0;right:0;margin:13px 13px 0 0;}body.emissions .bandeau p{background-color:#EBEBEB;color:#032649;padding:2px 10px;font-size:12px;font-weight:bold;}body.emissions .bandeau p span{margin-left:15px;}body.emissions .bandeau h1.docks{background-color:#29ABE2;}body.emissions .bandeau h1.chemins{background-color:#D9E021;}body.emissions .bandeau h1.theme1-131{background-color:#D2D721;}body.emissions .bandeau h1.theme1-130{background-color:#47758D;}body.emissions .bandeau h1.theme1-135{background-color:#1B97CD;}body.emissions .bandeau h1.theme1-132{background-color:#EED7A1;}body.emissions .bandeau h1.theme1-133{background-color:#EF6F60;}body.emissions .bandeau h1.theme1-289{background-color:#FFED00;}body.emissions .bandeau h1.theme1-290{background-color:#8E5698;}body.emissions .bandeau h1.theme1-134{background-color:#FBB03B;}body.emissions .bandeau div.image{height:100px;} - - - .titre-plus{margin:0 0 20px 0;}.titre-plus h2{color:#262626;font-size:24px;line-height:26px;}.titre-plus .date{margin-right:10px;}.titre-plus .listen{float:left;width:90px;text-align:center;}.titre-plus .listen span{color:#C1272D;font-size:11px;display:block;font-weight:bold;}body.emissions #content .rel-doc{margin-bottom:40px;}body.emissions #content .rel-doc li{float:left;width:215px;}body.emissions #content .rel-doc li.clear{float:left;width:100%;height:40px;}body.emissions #content .rel-doc li.clear span{display:none;}body.emissions #content .rel-doc p{float:right;width:110px;margin-right:5px;font-size:12px;color:#666666;display:inline;line-height:14px;}body.emissions #content .rel-doc p a{display:block;}body.emissions #content .rel-doc p span{display:block;margin-bottom:5px;color:#032649;}body.emissions #sidebar-right #block-fcbloc-emission-contact .block-content{padding:15px 0 0;}body.emissions #sidebar-right #block-fcbloc-emission-contact .grippie{width:240px;margin:0 25px;}body.emissions #sidebar-right #block-fcbloc-emission-contact #edit-mollom-captcha-wrapper .description{width:240px;margin:0 25px;} - .node-rf_diffusion .rel-sites a{display:block;}.node-rf_diffusion .rel-sites a.timer{margin-left:0;}.node-rf_diffusion .rel-sites li{margin-bottom:20px;}.node-rf_diffusion .rel-sites li.last{margin-bottom:0;} - span.views-field-field-diffusion-date-debut-fin-value span.date-display-single{font-size:11px;font-weight:bold;} - p.invites{margin-top:15px;} - body.mini-site #content-top{position:relative;background-color:#f1ebf3;padding:15px;margin-bottom:30px;}body.mini-site h1{color:#773584;margin-bottom:0;}body.mini-site .biographie{margin-bottom:20px;}body.mini-site .biographie h2{font-size:24px;line-height:26px;letter-spacing:0.2px;color:#262626;}body.mini-site .biographie p.infos{color:#4D4D4D;font-size:12px;margin-bottom:10px;}body.mini-site .biographie p.infos span{color:#808080;font-style:italic;display:block;}body.mini-site .biographie p{color:#262626;font-size:14px;line-height:18px;} - body.culture #content-top,body.culture-accueil h1#page-title{position:relative;background-color:#f1ebf3;padding:15px 15px 0;margin:0 0 15px 0;border-top:1px #CFCFCF solid;}body.culture #content-top .block{height:auto;min-height:0;margin-bottom:0;}body.culture #content-top #block-fc_cultureac-culture-module{margin:0 -15px;background:white;}body.culture h1{color:#773584;margin:0 0 15px;}body.culture-accueil h1#page-title{padding:15px;}body.culture-accueil h2,body.culture-accueil h3{font-size:16px;}body.culture-accueil .more{font-size:11px;text-align:right;}body.culture-accueil li p{font-size:12px;line-height:15px;}body.culture .view-id-cultureac_term .view-content p.rubrique{clear:left;} - body.section #content-top{position:relative;background-color:#f1ebf3;padding:15px 15px 0 15px;margin:0 0 15px 0;} - body.module #content-top{position:relative;background-color:#f1ebf3;padding:15px 15px 0 15px;margin:0 0 15px 0;} - body.culture .primary-tabs{width:970px;height:31px;margin:0;}body.culture .primary-tabs span{float:left;}body.culture .primary-tabs span a{display:block;text-align:center;font-size:16px;padding-top:5px;}body.culture .primary-tabs span a:hover{text-decoration:none;}body.culture .primary-tabs span a{background:url(/sites/all/themes/franceculture/images/tab-sec.png) no-repeat 0 0;width:240px;height:26px;}body.culture .primary-tabs span a.active{background:url(/sites/all/themes/franceculture/images/tab-sec-active.png) no-repeat 0 0;}body.culture .secondary-tabs{margin:10px 0 30px 0;color:#032649;font-weight:bold;}body.culture .secondary-tabs a{margin:0 5px;letter-spacing:0.2px;} - .first-article{border-right:1px solid #f1ebf3;border-left:1px solid #f1ebf3;border-bottom:1px solid #CFCFCF;margin-bottom:20px;padding:5px 15px 20px;}.first-article img{float:left;margin-right:10px;}.first-article h2{font-size:24px;margin-bottom:10px;color:#262626;}.first-article h3{font-size:14px;margin-bottom:5px;color:#262626;}body.culture .first-article p{font-size:14px;line-height:18px;}body.culture .first-article .sousthemes{margin-bottom:15px;}.first-article p{font-size:12px;color:#262626;line-height:15px;} - body.culture .article-teaser{margin-bottom:20px;}body.culture .article-teaser h2{font-size:24px;margin-bottom:5px;color:#262626;}body.culture .article-teaser p{font-weight:bold;}body.culture .article-full .illustration{float:left;margin:0 15px 25px 0;}body.culture .article-full p,body.node-type-fc-cours#tinymce p{font-size:14px;line-height:18px;color:#262626;} - body.qr .tri-qr{margin-bottom:60px;color:#262626;font-size:14px;}body.qr .tri-qr h2{font-size:24px;line-height:26px;letter-spacing:0.2px;color:#262626;margin-bottom:30px;}body.qr .tri-qr p{display:block;margin:0 0 5px;}body.qr .tri-qr span.floating-select{float:left;width:300px;margin-right:20px;margin-top:20px;}body.qr .tri-qr label{display:block;color:#262626;font-size:14px;margin-bottom:5px;}body.qr .tri-qr select{border-top:1px solid #CCCCCC;border-left:1px solid #CCCCCC;border-bottom:1px solid #666666;border-right:1px solid #666666;padding:2px 10px 3px 10px;width:250px;margin:0 10px 5px 0;}body.qr .tri-qr input.submit{background:url(/sites/all/themes/franceculture/images/btn-modifier.png) no-repeat 0 0;padding:3px 13px 4px;font-weight:bold;color:#fff;border:none;cursor:pointer;}body.qr .tri-qr input.submit:hover{background-position:0 -25px;text-decoration:none;} - body.qr .all-qr{margin-bottom:40px;}body.qr .all-qr .post{margin-bottom:20px;border-bottom:1px solid #CFCFCF;padding-bottom:15px;}body.qr .all-qr .post .submited{color:#000;font-size:12px;margin-bottom:10px;display:block;}body.qr .all-qr .post .submited .quiz{color:#773584;font-size:11px;font-weight:normal;margin-left:10px;}body.qr .all-qr .post .auth{font-weight:bold;color:#032649;}body.qr .all-qr .post .submited .date{margin-left:5px;}body.qr .all-qr .post p{font-size:12px;line-height:15px;color:#262626;margin-left:55px;}body.qr .all-qr .q-r{float:right;margin:00;font-size:12px;font-weight:bold;height:40px;}body.qr .all-qr .q-r span{background:url(/sites/all/themes/franceculture/images/answer-big.png);padding:5px 13px 15px 13px;margin-right:10px;color:#773584;}body.qr .all-qr .q-r a{background:url(/sites/all/themes/franceculture/images/btn-modifier.png) no-repeat 0 0;padding:5px 13px;color:#fff;}body.qr .all-qr .q-r a:hover{background-position:0 -25px;text-decoration:none;}body.qr .all-qr .q-r span.none{background:#e4d7e6 none;padding:5px 13px;} - .validation h2{font-size:24px;color:#262626;margin:20px 0 30px 0;}.validation img{float:left;margin-right:10px;}.validation .end{color:#773584;font-size:20px;margin-bottom:15px;}.validation p{color:#262626;font-size:14px;line-height:18px;margin-bottom:15px;}.validation .score span{color:#929497;font-size:19px;}.validation .liens{margin:30px 0 0 0;}.validation .liens a{background:url(/sites/all/themes/franceculture/images/btn-large.png) no-repeat 0 0;padding:5px 23px;text-align:center;color:#fff;}.validation a.facelien{background:url(/sites/all/themes/franceculture/images/facebook.png) no-repeat 0 0;padding:5px 33px 5px 50px;margin-right:20px;}.validation .form-com{margin:50px 0 20px 0;}.validation .form-com span.floating-select{float:left;width:300px;margin-right:20px;margin-top:20px;}.validation .form-com .desc{color:#4D4D4D;font-size:12px;font-style:italic;} - .quiz-q{margin:40px 0;position:relative;}.quiz-q fieldset{border:3px solid #773584;padding:20px 20px 10px 20px;}.quiz-q legend{font-size:12px;color:#773584;font-weight:bold;padding:0 0.5em;}.quiz-q img{float:left;margin:0 20px 0 0;}.quiz-q h3{color:#262626;font-size:16px;margin-bottom:10px;}.quiz-q p{font-size:14px;color:#262626;}.quiz-q .date{margin-left:5px;}.quiz-q .q-r{margin:20px 0 0 0;font-size:12px;font-weight:bold;float:right;}.quiz-q .q-r span{background:url(/sites/all/themes/franceculture/images/answer-big.png) no-repeat;padding:5px 13px 15px 13px;margin-right:10px;color:#773584;display:inline-block;height:15px;}.quiz-q .q-r a{background:url(/sites/all/themes/franceculture/images/btn-modifier.png) no-repeat 0 0;padding:5px 13px 5px 13px;color:#fff;display:inline-block;margin-bottom:10px;height:15px;}.quiz-q .q-r a:hover{background-position:0 -25px;text-decoration:none;} - .questionnaire{position:relative;margin-left:50px;}.questionnaire h3{color:#4D4D4D;font-size:14px;margin-bottom:10px;}.questionnaire .num{position:absolute;top:0;left:0;margin-left:-50px;color:#A6A8AB;font-size:14px;}.questionnaire img{display:block;margin-bottom:10px;}.questionnaire label{color:#4D4D4D;font-size:12px;}.questionnaire input.form-submit{background:url(/sites/all/themes/franceculture/images/btn-modifier.png) no-repeat scroll 0 0;border:none;color:#FFFFFF;cursor:pointer;font-weight:bold;padding:3px 13px 4px;display:block;margin-top:30px;text-align:center;width:81px;}.questionnaire input.form-submit:hover{background-position:0 -25px;text-decoration:none;}.questionnaire .form-radios,.questionnaire .form-checkboxes,#multichoice-render-question-form .form-radios,#multichoice-render-question-form .form-checkboxes{clear:both;} - body.qr .com{margin-bottom:40px;}body.qr .com .post{margin-bottom:20px;border-bottom:1px solid #CFCFCF;padding-bottom:15px;}body.qr .com .post .submited{color:#000;font-size:14px;margin-bottom:10px;display:block;}body.qr .com .post .submited .quiz{color:#773584;font-size:11px;font-weight:normal;margin-left:10px;}body.qr .com .post .auth{font-weight:bold;color:#032649;}body.qr .com .post .submited .date{margin-left:5px;}body.qr .com .post p{font-size:14px;line-height:18px;color:#262626;margin-left:55px;}body.qr .com .quiz-go{float:right;background:url(/sites/all/themes/franceculture/images/quiz-go.png) no-repeat 0 0;display:block;padding:5px 20px;color:#fff;margin-top:15px;}body.qr .com .quiz-go:hover{background-position:0 -25px;text-decoration:none;}body.qr .com .best{background-color:#f6f1f7;padding:15px 25px;}body.qr .com .best .meilleure{color:#773584;font-size:11px;font-weight:normal;} - .rubrique-culture li{float:left;width:300px;position:relative;height:435px;margin-bottom:20px;}.rubrique-culture li.left{margin-right:40px;}.rubrique-culture li h2,.rubrique-culture li h3{font-size:16px;}.rubrique-culture li p{color:#4D4D4D;}.rubrique-culture li .more{font-size:11px;position:absolute;bottom:0;right:0;} - body.culture .list-rubrique li{margin-top:10px;clear:left;}body.culture .list-rubrique li img.illustration{float:left;margin:0 15px 15px 0;}body.culture .list-rubrique li .auteur{display:block;margin-bottom:15px;} - body.culture .list-article li{border-top:1px solid #CFCFCF;margin-top:5px;padding-top:10px;}body.culture .list-article li.first{border-top-width:0;}body.culture .list-article li img{float:left;margin:0 15px 15px 0;}body.culture .list-article li .auteur{display:block;margin-bottom:15px;} - .rel-quiz{margin:40px 0;clear:both;}.rel-quiz h3{font-size:14px;}.rel-quiz .quiz-go{float:right;background:url(/sites/all/themes/franceculture/images/quiz-go.png) no-repeat 0 0;display:block;padding:5px 16px;color:#fff;margin-top:15px;} - .liste-cours{margin:20px 0;}body.culture .liste-cours li{border-bottom:1px solid #CFCFCF;margin-bottom:15px;padding-bottom:10px;} - - .profil-infos{margin-bottom:30px;}.profil-infos img{float:left;margin-right:10px;}.profil-infos p{color:#262626;margin-bottom:15px;font-size:14px;}.profil-infos a.submit{float:right;background:url(/sites/all/themes/franceculture/images/btn-large.png) no-repeat 0 0;padding:4px 10px;text-align:center;width:140px;color:#fff;}.profil-infos a.submit.larger{background-image:url(/sites/all/themes/franceculture/images/btn-larger.png);width:180px;}.profil-infos a.submit:hover{background-position:0 -25px;text-decoration:none;}.profil-infos a.facebook-modif{float:right;background:url(/sites/all/themes/franceculture/images/btn-fbconnect-modification.png) no-repeat 0 0;padding:3px 5px 3px 25px;text-align:center;width:170px;color:#fff;font-size:11px;}.profil-infos a.facebook-modif:hover{background-position:0 -23px;text-decoration:none;} - .user-lecture{margin-bottom:30px;}.user-lecture img{float:left;margin-right:10px;}.user-lecture h3{font-size:16px;}.user-lecture .date{display:block;}.user-lecture .more{margin:50px 0 0 0;text-align:right;}#fc-quelisentils-que-lisez-vous span.date{display:inline;}.user-lecture .avatars{width:530px;margin:0 0 0 auto;}.user-lecture .avatars li{float:left;width:130px;margin-right:2px;clear:none;padding:0;}.user-lecture .more-review,.user-lecture .more-avatar{clear:both;}.user-lecture .unfold,.view-quelisentils .unfold,#personne-articles .unfold{background:url(/sites/all/themes/franceculture/images/urg-down.png) no-repeat 100% 4px;padding-right:10px;}.user-lecture .fold,.view-quelisentils .fold,#personne-articles .fold{background:url(/sites/all/themes/franceculture/images/urg-up.png) no-repeat 100% 4px;padding-right:10px;} - .user-question{margin-bottom:30px;clear:both;}.user-question ul{margin-top:20px;}.user-question li{width:300px;float:left;}.user-question li.border{padding-left:20px;margin-left:19px;border-left:1px solid #CFCFCF;}.user-question li h3 a{display:block;}.user-question .more-link{margin:20px 0 0 0;text-align:right;clear:left;} - .user-com{margin-bottom:30px;clear:both;}.user-com li{margin-bottom:20px;}.user-com .date{display:block;}.user-com h3 a{display:block;font-size:14px;} - .user-agenda{margin-bottom:30px;}.user-agenda ul{margin-top:20px;}.user-agenda li{width:300px;float:left;padding-bottom:5px;}.user-agenda li.border{padding-left:20px;margin-left:19px;border-left:1px solid #CFCFCF;}.user-agenda li.none{clear:left;}.user-agenda .more{margin:20px 0 0 0;text-align:right;float:right;} - .infos-connexion{margin-bottom:30px;}.infos-connexion h2{margin-bottom:20px;}.infos-connexion label{color:#262626;float:left;margin:0 10px 3px 0;line-height:24px;width:330px;text-align:right;font-size:13px;}.infos-connexion input{border-right:1px solid #CCCCCC;padding:3px 10px;width:280px;margin-bottom:3px;}.infos-connexion .description{margin-left:340px;color:#808080;font-size:12px;font-style:italic;}.infos-connexion span.password-strength,.infos-connexion span.password-confirm,.infos-connexion div.password-description{margin-left:340px;display:none;} - .infos-vous{margin-bottom:30px;}.infos-vous h2{margin-bottom:20px;}.infos-vous img{margin-bottom:3px;margin-left:340px;}.infos-vous label{color:#262626;float:left;margin:0 10px 3px 0;line-height:24px;width:330px;text-align:right;font-size:13px;}.infos-vous label.option{width:640px;font-size:12px;line-height:12px;margin-right:2px;}.infos-vous label.option input{width:15px;margin:0 0 3px 2px;float:right;}.infos-vous input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:3px 10px;width:280px;margin-bottom:3px;}.infos-vous input.submit{padding:0;border:none;margin:0 0 3px 3px;width:71px;height:25px;background-color:#773584;}.infos-vous input.submit-v{padding:0;border:none;margin:20px 20px 3px 3px;width:71px;height:25px;background-color:#773584;float:right;}.infos-vous select{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:3px 10px;width:302px;margin-bottom:3px;}.infos-vous textarea{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:3px 10px;width:280px;margin-bottom:20px;}.infos-vous .grippie{width:300px;margin:0 0 3px 340px;display:inline-block;}.infos-vous .resizable-textarea{display:inline;}.infos-vous .resizable-textarea textarea{width:280px!important;}.infos-vous .description{margin-left:320px;color:#808080;font-size:12px;font-style:italic;}.infos-vous #edit-contact-1-wrapper .description{display:inline-block;} - .infos-vous fieldset{display:none;}.infos-vous input.focusField{color:#fff;}html.js .infos-vous input.form-autocomplete{background-position:100% 6px}html.js .infos-vous input.throbbing{background-position:100% -14px} - - body.page-contact h1#page-title{display:none;}body.page-contact h1{color:#773584;}.ecrire{float:left;width:405px;}.ecrire{margin-bottom:30px;}.ecrire label{color:#262626;float:left;margin:0 10px 3px 0;line-height:24px;width:150px;text-align:right;font-size:13px;font-weight:normal;}.ecrire label.option{float:right;}.ecrire label.option input{width:12px;height:12px;padding:0;}.ecrire input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:3px 10px;width:220px;margin-bottom:3px;}.ecrire select{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:3px 10px;width:242px;margin-bottom:3px;}.ecrire textarea{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:3px 10px;width:220px;}.ecrire input.submit-v{padding:0;border:none;margin:10px 3px 0 3px;width:71px;height:25px;background-color:#773584;float:right;}.ecrire-desc{float:left;margin-left:10px;padding-left:19px;width:220px;border-left:1px solid #CFCFCF;}.ecrire-desc p{margin-bottom:10px;}.ecrire-desc li{margin-bottom:10px;list-style-type:disc;list-style-position:inside;}.ecrire .grippie{width:240px;margin:0 0 3px 160px;display:inline-block;}.ecrire .resizable-textarea{display:inline;}.ecrire .resizable-textarea textarea{width:220px!important;height:50px;}.ecrire .form-item{margin-bottom:0;margin-top:0;}.ecrire input.focusField{color:#fff;} - - body.frequence h1{color:#773584;}body.frequence #content-inner p{color:#262626;margin-bottom:10px;}body.frequence #content-inner label{float:left;margin:0 10px 10px 0;line-height:24px;}body.frequence #content-inner input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:3px 10px 3px 10px;float:left;width:145px;margin-bottom:10px;}body.frequence #content-inner input.submit{padding:0;border:none;margin:0 0 10px 15px;width:103px;height:26px;background-color:#773584;}body.frequence #content-inner p.loc{font-size:14px;border-bottom:1px solid #CFCFCF;padding-bottom:5px;clear:both;}body.frequence #content-inner p.loc span{color:#773584;font-weight:bold;} - - body.section-votre-agenda #content-top{position:relative;background-color:#f1ebf3;padding:15px;margin-bottom:30px;}body.section-votre-agenda h1{color:#773584;margin-bottom:0;}body.section-votre-agenda .script-read a.prev,body.section-votre-agenda .script-read a.prevPage{display:block;width:15px;height:15px;background:url(/sites/all/themes/franceculture/images/script-scroll-left.png) no-repeat;position:absolute;top:0;left:0;cursor:pointer;z-index:10;margin-top:105px;margin-left:-7px;}body.section-votre-agenda .script-read a.disabled{visibility:hidden !important;}body.section-votre-agenda .script-read a.next,body.section-votre-agenda .script-read a.nextPage{background:url(/sites/all/themes/franceculture/images/script-scroll-right.png);display:block;width:15px;height:15px;position:absolute;top:0;right:0;cursor:pointer;z-index:10;margin-top:105px;margin-right:-7px;}body.section-votre-agenda .script-read div.scrollable{position:relative;overflow:hidden;width:960px;height:165px;margin:10px 0 0 0;background-color:#fff;}body.section-votre-agenda #content-top .script-read ol{margin:0;}body.section-votre-agenda .script-read .thumbs{position:absolute;width:10000em;clear:both;}body.section-votre-agenda .script-read .thumbs li{width:210px;height:150px;cursor:pointer;margin:15px 0 0 0;float:left;padding:0 15px 0 15px;position:relative;line-height:15px;}body.section-votre-agenda .script-read .thumbs li .num{position:absolute;bottom:0;left:0;margin:0 15px;}body.section-votre-agenda .script-read .thumbs li img{float:left;margin-right:10px;}body.section-votre-agenda .script-read .thumbs li h2{font-size:12px;line-height:15px;}body.section-votre-agenda div.agenda_error{background:#FFF3F6 url(/sites/all/themes/franceculture/images/error.png) no-repeat .5em .45em;border:1px solid #C00000;color:#C00000;}body.section-votre-agenda div.agenda_error a{text-decoration:underline;}body.section-votre-agenda form input.focusField{color:#fff;} - .board{margin-bottom:60px;}.board form{margin:0;}.board .ou{float:left;width:215px;background-color:#EBEBEB;height:230px;}.board .quand{float:left;width:215px;margin:0 5px;background-color:#EBEBEB;height:230px;}.board .quoi{float:left;width:215px;background-color:#EBEBEB;height:230px;}.board h3{text-align:center;margin-bottom:5px;}.board select{border-top:1px solid #CCCCCC;border-left:1px solid #CCCCCC;border-bottom:1px solid #666666;border-right:1px solid #666666;padding:2px 10px 3px 10px;width:190px;margin:0 10px 5px 10px;}.board label{font-size:14px;color:#4D4D4D;font-weight:normal;}.board .ou img{margin:0 10px;}.board .quand label{float:left;margin:0 3px 10px 10px;}.board .quand input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:2px 10px;float:left;width:150px;margin-bottom:10px;}.board .quand input.submit{padding:0;border:none;margin:0 0 11px 7px;width:22px;height:22px;background-color:#773584;}.board .quoi input{margin-bottom:5px;}.board .quoi label{margin:0 0 5px 5px;}.board .s-submit{padding:0;border:none;margin:20px 0 0 2px;width:103px;height:26px;background-color:#773584;float:right;}.board .quoi label.option{display:block;}.board .ou .form-item{margin:0;}.board .quand #edit-date-min-value-wrapper div.description,.board .quand #edit-date-max-value-wrapper div.description{display:none;} - body.section-votre-agenda .list-article li{border-top:1px solid #CFCFCF;margin-top:5px;padding-top:10px;}body.section-votre-agenda .list-article li img{float:left;margin:0 15px 15px 0;}body.section-votre-agenda .list-article li .auteur{display:block;margin-bottom:15px;} - form#views-exposed-form-evenement-fo-liste-block-1 .views-exposed-form .views-exposed-widget{width:100%;} - - body.node-type-rf-article #content .article-teaser{margin:0 0 20px 0;}body.node-type-rf-article #content .article-teaser p{margin:0 0 10px 0;}body.node-type-rf-article #content .article-teaser .date{display:block;margin:0 0 10px 0;}body.node-type-rf-article #content p{color:#262626;font-size:14px;line-height:18px;}body.node-type-rf-article #content .article-full p,body.node-type-rf-article#tinymce p{margin:0 0 10px 0;}body.node-type-rf-article #content .article-full .large{width:640px;}body.node-type-rf-article #content .article-full .small{width:320px;}body.node-type-rf-article #content .article-full .dnd-drop-wrapper{position:relative;float:left;margin:0 15px 25px 0;}body.node-type-rf-article #content .article-full .opaque p{color:#fff;font-weight:bold;font-style:italic;padding:5px 10px 10px 10px;font-size:12px;margin:0;}body.node-type-rf-article #content .article-full .opaque span{font-style:normal;text-transform:uppercase;font-size:9px;margin-left:5px;}body.node-type-rf-article #content .article-full .video .opaque{margin-bottom:33px;}body.node-type-rf-article #content .article-full p.theme,body.node-type-rf-billet-blog #content p.theme{clear:both;font-size:13px;}body.node-type-rf-article #content .article-full p.theme a,body.node-type-rf-billet-blog #content p.theme a{font-size:12px;margin:0 2px;}body.node-type-rf-article #content .article-full p.auteur{float:right;margin:0 0 8px 0;} - body.node-type-rf-article #content .article-full .list-rubrique li{margin-bottom:20px;}body.node-type-rf-article #content .article-full .list-rubrique li p{color:#4D4D4D;font-size:12px;line-height:14px;margin-bottom:20px;}body.node-type-rf-article #content .article-full .list-rubrique li a.title{font-size:12px;display:block;margin-bottom:5px;}body.node-type-rf-article #content .article-full .list-rubrique li a.timer,body.node-type-rf-article #content .article-full .list-rubrique li span.date{display:block;}body.node-type-rf-article #content .article-full .list-rubrique li .timer{margin:0;}body.node-type-rf-article #content .article-full .list-rubrique li .image{margin-bottom:10px;}body.node-type-rf-article #content .article-full .list-rubrique li .image p{margin:0 0 0 110px;}body.node-type-rf-article #content .article-full .field-field-article-image-page div div{line-height:1px;} - body.node-type-rf-article #content .rel-liens{margin-bottom:0px;}body.node-type-rf-article #content .rel-liens div{margin-bottom:20px;}body.node-type-rf-article #content .rel-liens div a{font-size:12px;display:block;margin:0 0 5px 0;} - body.node-type-rf-article #content .rel-doc{margin-bottom:40px;}body.node-type-rf-article #content .rel-doc li{float:left;width:215px;margin-bottom:20px;}body.node-type-rf-article #content .rel-doc li.clear{float:left;width:100%;height:40px;}body.node-type-rf-article #content .rel-doc p{float:right;width:100px;margin-right:10px;font-size:11px;color:#666666;display:inline;line-height:14px;}body.node-type-rf-article #content .rel-doc p a{font-size:12px;display:block;margin:0 0 5px 0;}body.node-type-rf-article #content .rel-doc p span{font-size:12px;font-style:italic;display:block;margin-top:5px;}.rel-doc .liste-clear{width:100% !important;} - body.section-liste-ecoute h1{background:url(/sites/all/themes/franceculture/images/liste-ecoute-title.png) no-repeat 0 0;color:#fff;text-align:center;height:45px;padding:15px 0 0 45px;}body.section-liste-ecoute #content-inner fieldset,body.section-liste-ecoute #edit-title-wrapper,body.section-liste-ecoute .vertical-tabs{display:none!important;}body.section-liste-ecoute #content #content-right{float:right;}body.section-liste-ecoute #content-right .block{background:url(/sites/all/themes/franceculture/images/leftgris-bg.png) repeat-y 0 0;line-height:14px;}body.section-liste-ecoute #content-right .block .block-inner{background:url(/sites/all/themes/franceculture/images/leftgris-bg-top.png) no-repeat 0 0;padding:5px 0 0 0;}body.section-liste-ecoute #content-right .block .title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 30px 5px;text-align:center;}body.section-liste-ecoute #content-right .block .title{margin:0 10px 5px 10px;}body.section-liste-ecoute #content-right .block .title span{background-color:#ebebeb;padding:0 5px;letter-spacing:0;}body.section-liste-ecoute #content-right .block label{background:#ebebeb url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;padding:10px 0;display:block;margin:2px 0 0 0;text-align:center;}body.section-liste-ecoute #content-right .block ol{background:transparent url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat scroll 0 0;padding-top:1px;}body.section-liste-ecoute #content-right .block ol li{border-bottom:medium none;color:#4d4d4d;font-weight:normal;list-style-position:inside;list-style-type:decimal;margin-top:10px;}body.section-liste-ecoute #content-right .block li{margin:20px 20px 0;padding:0 0 15px 0;}body.section-liste-ecoute #content-right .block .closure{background:url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;height:30px;display:block;margin:5px 0 0 0;} - body.section-liste-ecoute .list-article li{border-bottom:1px solid #CFCFCF;margin-bottom:15px;padding-bottom:15px;}body.section-liste-ecoute table#field_liste_lecture_son_values tr.odd,body.section-liste-ecoute table#field_liste_lecture_son_values tr.even,body.section-liste-ecoute table#field_liste_lecture_abonnements_values tr.odd,body.section-liste-ecoute table#field_liste_lecture_abonnements_values tr.even{background-color:#FFFFFF;}body.section-liste-ecoute table#field_liste_lecture_son_values tr.odd .form-item,body.section-liste-ecoute table#field_liste_lecture_son_values tr.even .form-item{white-space:normal;}body.section-liste-ecoute table#field_liste_lecture_son_values tr.odd.content-multiple-removed-row,body.section-liste-ecoute table#field_liste_lecture_son_values tr.even.content-multiple-removed-row,body.section-liste-ecoute table#field_liste_lecture_abonnements_values tr.odd.content-multiple-removed-row,body.section-liste-ecoute table#field_liste_lecture_abonnements_values tr.even.content-multiple-removed-row{background-color:#FFFFCC;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values .content-multiple-remove-button,body.section-liste-ecoute table#field_liste_lecture_son_values .content-multiple-remove-button{background-image:url(/sites/all/themes/franceculture/images/picto-supprimer.png);height:18px;width:18px;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values .content-multiple-remove-button:hover,body.section-liste-ecoute table#field_liste_lecture_son_values .content-multiple-remove-button:hover{background-position:0 -18px;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values .content-multiple-removed-row .content-multiple-remove-button,body.section-liste-ecoute table#field_liste_lecture_son_values .content-multiple-removed-row .content-multiple-remove-button{background-position:0 -36px;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values .content-multiple-removed-row .content-multiple-remove-button:hover,body.section-liste-ecoute table#field_liste_lecture_son_values .content-multiple-removed-row .content-multiple-remove-button:hover{background-position:0 -54px;}body.section-liste-ecoute table#field_liste_lecture_son_values thead,body.section-liste-ecoute table#field_liste_lecture_abonnements_values thead{display:none;}body.section-liste-ecoute table#field_liste_lecture_son_values td,body.section-liste-ecoute table#field_liste_lecture_abonnements_values td{width:100%;}body.section-liste-ecoute table#field_liste_lecture_son_values td.content-multiple-drag{width:20px;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values td.content-multiple-drag{display:none;}body.section-liste-ecoute table#field_liste_lecture_son_values .illustration{float:left;margin-right:20px;}body.section-liste-ecoute .form-item #autocomplete .reference-autocomplete{background:url(/sites/all/themes/franceculture/images/more-red.png) no-repeat right;padding:2px;margin:0px 2px;}body.section-liste-ecoute #node-form input.focusField,body.section-liste-ecoute #content-left .baladeur input.focusField{color:#fff;}html.js body.section-liste-ecoute input.form-autocomplete{background-position:100% 7px}html.js body.section-liste-ecoute input.throbbing{background-position:100% -14px} - .baladeur{color:#262626;line-height:18px;font-size:14px;width:600px;margin-left:10px;margin-bottom:50px;}body.section-liste-ecoute #content-left .baladeur input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:4px 10px 5px 10px;float:left;width:125px;}body.section-liste-ecoute #content-left .baladeur input.submit{padding:0;border:none;margin:0 0 0 2px;width:120px;height:27px;background-color:#773584;} - body.section-liste-ecoute #content-left input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:4px 10px 5px 10px;float:left;width:330px;}body.section-liste-ecoute #content-left input.submit{padding:0;border:none;margin:0 0 0 2px;width:26px;height:26px;background-color:#773584;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values{margin:20px 0 40px 0;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values tbody{border-top:none;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values td div.noderef-view-wrapper{margin:5px 0;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values td div.noderef-view-wrapper .form-item{white-space:normal;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values td div.noderef-view-wrapper h3{font-size:16px;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values td div.noderef-view-wrapper h3 span{font-size:11px;margin-left:10px;}body.section-liste-ecoute table#field_liste_lecture_abonnements_values td div.noderef-view-wrapper h3 span.author{color:#032649;font-weight:bold;} - - body.lecture h1{position:relative;background-color:#f1ebf3;padding:15px;color:#773584;margin-bottom:15px;}body.page-quelisentils h1,body.page-quelisentils-derniers-avis h1{margin-bottom:0;padding-bottom:0;}body.lecture #content-top{background-color:#f1ebf3;padding:1px 15px 15px;margin-bottom:30px;}body.lecture .script-read a.prev,body.lecture .script-read a.prevPage{display:block;width:15px;height:15px;background:url(/sites/all/themes/franceculture/images/script-scroll-left.png) no-repeat;position:absolute;top:0;left:0;cursor:pointer;z-index:7;margin-top:105px;margin-left:-7px;}body.lecture .script-read a.disabled{visibility:hidden !important;}body.lecture .script-read a.next,body.lecture .script-read a.nextPage{background:url(/sites/all/themes/franceculture/images/script-scroll-right.png);display:block;width:15px;height:15px;position:absolute;top:0;right:0;cursor:pointer;z-index:7;margin-top:105px;margin-right:-7px;}body.lecture .script-read div.scrollable{position:relative;overflow:hidden;width:960px;height:330px;margin:10px 0 0 0;background-color:#fff;}body.lecture #content-top .script-read ol{margin:0;}body.lecture .script-read .thumbs{position:absolute;width:10000em;clear:both;}body.lecture .script-read .thumbs li{width:210px;height:285px;cursor:pointer;margin:15px 0;float:left;padding:0 15px 15px 15px;border-right:1px solid #CFCFCF;position:relative;}body.lecture .script-read .thumbs li .num{position:absolute;bottom:0;left:0;margin:0 15px;}body.lecture .script-read .writter{padding:0;border-right:none;margin:0 5px 5px 0;}body.lecture .script-read .book{padding:0;margin:0 0 5px 5px;}body.lecture #content-top .who-read{margin-top:20px;}body.lecture #content-top .who-read input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:2px 10px 3px 10px;float:left;width:180px}body.lecture #content-top .who-read input.submit{padding:0;border:none;margin:0 0 0 2px;width:22px;height:22px;background-color:#773584;}body.lecture #content-top .who-read label{float:left;margin-right:20px;}body.lecture #content-top .who-read .date{font-size:12px;}body.lecture #content-right .block{background:url(/sites/all/themes/franceculture/images/leftgris-bg.png) repeat-y 0 0;line-height:14px;}body.lecture #content-right .block .block-inner{background:url(/sites/all/themes/franceculture/images/leftgris-bg-top.png) no-repeat 0 0;padding:5px 0 0 0;}body.lecture #content-right .block .title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}body.lecture #content-right .block .title{margin:0 10px 5px 10px;}body.lecture #content-right .block .title span{background-color:#ebebeb;padding:0 5px;letter-spacing:0;}body.lecture #content-right .block .context{padding:0 10px 5px;}body.lecture #content-right .block label{background:#ebebeb url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;padding:10px 0;display:block;margin:2px 0 0 0;text-align:center;}body.lecture #content-right .block .block-content{background:url(/sites/all/themes/franceculture/images/leftgris-ul-top.png) no-repeat 0 0;padding:15px 20px 0;}body.lecture #content-right .block ol li{list-style-type:decimal;list-style-position:inside;margin-top:10px;font-weight:bold;color:#032649;}body.lecture #content-right .block li{border-bottom:1px solid #CFCFCF;margin:20px 0px 0 0px;padding:0 0 15px 0;border-top-width:0;}body.lecture #content-right .block li.first,#sidebar-right .block li.views-row-first{margin-top:0;}body.lecture #content-right .block .closure{background:url(/sites/all/themes/franceculture/images/leftgris-bg-bottom.png) no-repeat 0 100%;height:30px;display:block;margin:5px 0 0 0;} - body.lecture .node-rf_oeuvre{margin-bottom:20px;}body.lecture .node-rf_oeuvre h2.title{font-size:24px;line-height:26px;letter-spacing:0.2px;color:#262626;}body.lecture .node-rf_oeuvre p.infos{color:#4D4D4D;font-size:12px;margin-bottom:10px;}body.lecture .node-rf_oeuvre p.infos span{color:#808080;font-style:italic;display:block;}body.lecture .node-rf_oeuvre p,body.node-type-rf-oeuvre#tinymce p{color:#262626;font-size:14px;line-height:18px;}body.lecture .node-rf_oeuvre .illustration{margin:0 15px 15px 0;float:left;}body.lecture #content-inner .illustration{margin:0 15px 15px 0;float:left;}body.lecture .node-rf_oeuvre .theme a{float:right;font-size:11px;}.node-rf_oeuvre #quelisentils-oeuvre div.view-display-id-block_2{clear:left;padding-top:8px;}.node-rf_oeuvre #quelisentils-oeuvre div.views-row{clear:left;}.node-rf_oeuvre #quelisentils-oeuvre div.views-row p{margin-left:65px;}.node-rf_oeuvre #quelisentils-oeuvre p a{display:block;text-align:right;}.node-rf_oeuvre #quelisentils-oeuvre a.submit{margin-top:10px;text-align:center;}#quelisentils-oeuvre a.submit,#fc-quelisentils-que-lisez-vous a.submit,body.section-quelisentils a.submit{display:block;background:url(/sites/all/themes/franceculture/images/btn-large.png) no-repeat 0 0;padding:4px 10px;text-align:center;width:140px;color:#fff;}#quelisentils-oeuvre a.submit:hover,#fc-quelisentils-que-lisez-vous a.submit:hover,body.section-quelisentils a.submit:hover{background-position:0 -25px;text-decoration:none;}body.section-quelisentils .node-rf_oeuvre .theme a.submit{float:left;} - body.lecture #content .rel-doc{margin-bottom:40px;}body.lecture #content .rel-doc li{float:left;width:215px;padding-left:0;margin-left:0;border-left:0;}body.lecture #content .rel-doc li.clear{float:left;width:100%;height:40px;}body.lecture #content .rel-doc li.clear span{display:none;}body.lecture #content .rel-doc p{margin-right:5px;font-size:12px;color:#666666;line-height:14px;}body.lecture #content .rel-doc p a{display:block;}body.lecture #content .rel-doc p span{display:block;margin-bottom:5px;color:#032649;} - body.lecture #content .com{margin-bottom:40px;}body.lecture #content .com .img-float{margin-bottom:20px;}body.lecture #content .com .post{margin-bottom:20px;clear:left;}body.lecture #content .com .post .submited{color:#000;font-size:14px;margin-bottom:2px;display:block;}body.lecture #content .com .post .auth{font-weight:bold;color:#032649;}body.lecture #content .com .post .submited .date{margin-left:5px;}body.lecture #content .com .post p{font-size:12px;color:#4D4D4D;margin-left:55px;} - #fc-quelisentils-search-form table{width:100%;}#fc-quelisentils-search-form table .form-item{white-space:normal;} - #fc-quelisentils-que-lisez-vous{margin-top:20px;}body.page-accueil #fc-quelisentils-que-lisez-vous #edit-title-wrapper,body.page-accueil #fc-quelisentils-que-lisez-vous #autocomplete{display:block;margin:0;}body.node-type-rf-personne #fc-quelisentils-que-lisez-vous #edit-title-wrapper #edit-title,body.page-accueil #fc-quelisentils-que-lisez-vous #edit-title-wrapper #edit-title,body.page-taxonomy-term-131 #fc-quelisentils-que-lisez-vous #edit-title-wrapper #edit-title{width:178px;}#fc-quelisentils-que-lisez-vous #edit-submit{vertical-align:middle;float:none;border-width:0;width:auto;padding:0 0 0 2px;}#fc-quelisentils-que-lisez-vous #autocomplete img{clear:left;margin-right:5px;}#fc-quelisentils-que-lisez-vous #autocomplete li{height:32px;}#fc-quelisentils-que-lisez-vous #autocomplete{width:auto !important;background:white;}#fc-quelisentils-comment-form #edit-comment{width:650px;} - body.lecture .list-article li{border-top:1px solid #CFCFCF;margin-top:5px;padding-top:10px;}body.lecture .list-article li img{float:left;margin:0 15px 15px 0;}body.lecture .list-article li .auteur{display:block;margin-bottom:15px;} - body.node-type-rf-page h1{color:#773584;}body.node-type-rf-page #content-inner p{color:#262626;margin-bottom:10px;} - body.section-rubrique #content-right h2.title{background:url(/sites/all/themes/franceculture/images/titre-barre.gif) repeat-x 0 2px;color:#773584;font-weight:bold;font-size:13px;padding:0 0 5px 0;text-align:center;}body.section-rubrique #content-right h2.title span{background:#fff none;padding:0 5px;letter-spacing:0;display:inline-block;}body.section-rubrique #content-inner .view-display-id-attachment_1 .list-article{width:400px;} -.script-vertical h2{margin-bottom:36px;}.script-vertical a.prev,.script-vertical a.prevPage{display:block;width:284px;height:15px;background:#773584 url(/sites/all/themes/franceculture/images/script-scroll-top.png) no-repeat;position:absolute;top:0;left:0;cursor:pointer;z-index:10;margin:42px 0 0 24px;}.script-vertical a.disabled{visibility:hidden !important;}.script-vertical a.next,.script-vertical a.nextPage{background:#773584 url(/sites/all/themes/franceculture/images/script-scroll-bottom.png);display:block;width:15px;height:15px;position:absolute;bottom:0;left:0;cursor:pointer;z-index:10;margin-bottom:-5px;margin-left:159px;}.script-vertical div.scrollable-vertical{position:relative;overflow:hidden;width:284px;height:330px;margin:10px 15px 0 15px;}#content-bottom .script-vertical ol{margin:0;}.script-vertical #thumbs-vertical{position:absolute;width:10000em;clear:both;}.script-vertical #thumbs-vertical li{width:284px;height:150px;padding:0 0 5px 0;} - - -.jcarousel-clip{z-index:2;padding:0;margin:0;overflow:hidden;position:relative;width:658px;}.jcarousel-list{z-index:1;overflow:hidden;position:relative;} -#wrap{position:relative;border:1px solid #CFCFCF;}.script .target{padding:5px 0;width:658px;background:url(/sites/all/themes/franceculture/images/script-bg.png) repeat-x 0 20px;margin:0 5px;}.script #mycarousel-prev{display:block;width:15px;height:15px;background:#773584 url(/sites/all/themes/franceculture/images/script-scroll-left.png) no-repeat;position:absolute;top:0;left:0;cursor:pointer;z-index:6;margin-left:-10px;text-indent:-10000px;font-size:0;margin-top:265px;}.script #mycarousel-next{background:#773584 url(/sites/all/themes/franceculture/images/script-scroll-right.png);display:block;width:15px;height:15px;position:absolute;top:0;right:0;cursor:pointer;z-index:6;margin-right:-10px;text-indent:-10000px;font-size:0;margin-top:265px;}.script #thumbs{height:240px;}.script #thumbs li h3{color:#032649;font-size:18px;line-height:16px;margin:10px 0 5px 0;}.script #thumbs li{float:left;width:658px;height:235px;cursor:pointer;padding:0 0 5px 0;}.script #thumbs li img{float:left;margin-right:10px;}.script #thumbs li p a{color:#4D4D4D;font-weight:normal;}.script .jcarousel-control{height:72px;}.script .jcarousel-control span{display:none;}.script .jcarousel-control h3{text-decoration:none;color:#032649;font-weight:bold;padding:0;display:inline;float:left;width:164px;height:65px;}.script .jcarousel-control a{cursor:pointer;padding:0 5px;display:block;color:#032649;width:153px;height:65px;border-right:1px solid #CFCFCF;}.script .jcarousel-control a:hover{text-decoration:none;border-bottom:7px solid #28042D;}.script .jcarousel-control .titre4 a{border-right:none;}.up1 .jcarousel-control .titre1 a{border-bottom:7px solid #28042D;}.up2 .jcarousel-control .titre2 a{border-bottom:7px solid #28042D;}.up3 .jcarousel-control .titre3 a{border-bottom:7px solid #28042D;}.up4 .jcarousel-control .titre4 a{border-bottom:7px solid #28042D;border-right:none;} -.dnd-drop-wrapper{position:relative;float:left;margin:0 15px 25px 0;}.dnd-drop-wrapper .image img{display:block;}.dnd-drop-wrapper .image{display:table;width:1px;}.dnd-drop-wrapper .image .opaque{width:100%;background-color:#000;opacity:0.7;}.dnd-drop-wrapper .image .opaque p{color:#fff;font-weight:bold;font-style:italic;padding:5px 10px 10px 10px;font-size:12px;margin:0;}.dnd-drop-wrapper .image .opaque span{font-style:normal;text-transform:uppercase;font-size:9px;margin-left:5px;}.dnd-library-wrapper div.meta{margin-left:52px;}.node-type-rf-personne .dnd-fields-wrapper .mceLayout,.node-type-rf-personne .dnd-fields-wrapper .mceLayout iframe,.node-type-rf-oeuvre .dnd-fields-wrapper .mceLayout,.node-type-rf-oeuvre .dnd-fields-wrapper .mceLayout iframe,.node-type-rf-evenement .dnd-fields-wrapper .mceLayout,.node-type-rf-evenement .dnd-fields-wrapper .mceLayout iframe{width:400px !important;}.node-type-rf-billet-blog .dnd-fields-wrapper .mceLayout,.node-type-rf-billet-blog .dnd-fields-wrapper .mceLayout iframe{width:520px !important;}.dnd-fields-wrapper .mceLayout,.dnd-fields-wrapper .mceLayout iframe{width:657px !important;}.popups-box .popups-inner .dnd-fields-wrapper .mceLayout,.popups-box .popups-inner .dnd-fields-wrapper .mceLayout iframe{width:100% !important;}.mee-wrap-editor-library{float:none;}body#tinymce p{font-size:14px;}.mee-filter-form fieldset{display:none;} -.dnd-drop-wrapper .atom-Video{width:480px;height:365px;}.dnd-drop-wrapper .atom-SoundSlide{width:560px;height:489px;}.dnd-drop-wrapper .atom-Audio{min-width:300px;min-height:20px;}#tinymce .dnd-drop-wrapper{position:relative;float:left;margin:0 15px 25px 0;border-bottom:green solid 10px;} -div.view-dossier-fo-panes li{clear:both;}div.view-dossier-fo-panes img.imagecache-image_liste{margin-bottom:10px;}div.node-panel p.theme{margin-top:20px;} -form#rf-userregister-form .infos-connexion input,form#fc-userregister-form-userprofile .infos-connexion input{width:200px;margin-bottom:0;}form#rf-userregister-form .infos-connexion input.idleField,form#fc-userregister-form-userprofile .infos-connexion input.idleField{border:1px solid #CCCCCC;}form#rf-userregister-form div.form-item,form#fc-userregister-form-userprofile div.form-item{margin:5px 0;clear:both;}form#rf-userregister-form .infos-connexion label,form#fc-userregister-form-userprofile .infos-connexion label{line-height:13px;width:158px;}form#rf-userregister-form .infos-connexion .description,form#fc-userregister-form-userprofile .infos-connexion .description{clear:both;margin-left:168px;font-size:11px;}form#rf-userregister-form .infos-connexion input.submit-v,form#fc-userregister-form-userprofile .infos-connexion input.submit-v{padding:0;border:none;margin:20px 20px 3px 3px;width:71px;height:25px;background-color:#773584;float:right;}form#rf-userregister-form .infos-connexion label.option,form#fc-userregister-form-userprofile .infos-connexion label.option{width:395px;font-size:12px;line-height:12px;margin-right:2px;display:block;}form#rf-userregister-form .infos-connexion label.option input,form#fc-userregister-form-userprofile .infos-connexion label.option input{width:15px;margin:0 0 3px 2px;float:right;} - -#sidebar-right .block-fc_widget_dailymotion,#sidebar-right .block-fc_widget_deezer{background-image:none;} -#homebox.column-count-2 .homebox-column{width:48%;}#homebox table span a.flag-processed{white-space:nowrap;}#homebox table span.flag-flagged-message{left:-5px;}#homebox table span.flag-unflagged-message{left:-25px;}.portlet-content .views-processed .view-filters{display:none;}#homebox div.view-header{text-align:left;} -body.section-search form#search-form input.form-text{float:left;height:14px;padding:5px;}body.section-search form#search-form input.submit-lancer{float:left;margin-left:3px;clear:right;}body.section-search div.box{clear:both;padding-top:10px;}body.section-search fieldset.search-advanced{clear:both;padding-top:10px;} -.shoutbox-msg blockquote{color:#032649;font-weight:bold;font-size:12px;line-height:17px;} -fieldset.group-mea tr .form-item .description,fieldset.vertical-tabs-group_mea tr .form-item .description{white-space:normal;} -.node-form span.form-required{font-size:17px;}.node-form .form-item .required{background-color:#EBEBEB;border:1px solid #CCCCFF;}a.popups-reference{font-size:13px;line-height:40px;}#node-form #group-diffusion-generique-items{display:none;} -.hierarchical-select-wrapper .hierarchical-select option.has-children{padding-right:14px;} -#fchook-envoyer-diffusion-sms-form input{color:#999999;border-top:1px solid #666666;border-left:1px solid #666666;border-bottom:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:4px 10px 5px 10px;float:left;width:125px;}#fchook-envoyer-diffusion-sms-form input.submit{padding:0;border:none;margin:0 0 0 2px;width:120px;height:27px;background-color:#773584;}#fchook-envoyer-diffusion-sms-form input.focusField{color:#fff;} -.panel-pane.hidden-pane .pane-title:after{content:" statut:masqué";}.panel-pane.changed .pane-title:after{content:" statut:modifications non enregistrées";}.panel-pane.hidden-pane.changed .pane-title:after{content:" statut:masqué & modifié";} -#ui-datepicker-div{width:200px;}.ui-datepicker-next label,.ui-datepicker-prev label{border:1px solid #d3d3d3;cursor:pointer;display:block;font-size:1em;height:1.4em;text-indent:-999999px;width:1.3em;} -#edit-profile-commune-wrapper{display:none;}.label-nowrap{white-space:pre;}body{margin:0;padding:0;background:#fff;}body.blogs{margin:0px 0 0 0;background:#fff none;}body#tinymce,body#mceContentBody,body.mceContentBody,body#nodepicker{background:#fff none;}#page{margin:0 0 20px 0;padding:0;}#header{position:relative;height:155px;}#page{background:#fff url(/sites/all/themes/franceculture/images/body.png) no-repeat 50% -40px;margin:0 0 0px 0;padding:0;}body.blogs #page{background:#fff none;}#page-inner{margin:0 auto;padding:0;width:990px;}#main{width:990px;}#content{width:655px;margin-left:0;margin-right:-990px;float:left;overflow:visible;}body #content-bottom{margin:30px 0 0 0;}#content-top{padding:0 0 20px 0;background-color:#fff;}body #cb-left{width:314px;padding:5px 10px 0;float:left;position:relative;}body #block-views-lesplusconsultes-block_1,body #cb-right{width:314px;padding:5px 10px 0;float:left;}#sidebar-right{width:300px;margin-right:0;float:left;margin-left:690px;margin-right:-990px;overflow:visible;}#footer-top{margin:0 0 0 0;padding:0px 0 8px 0;width:990px;}#footer{color:#fff;height:75px;padding:25px 0 0 0;width:990px;} -body.front #content,body.node-type-panel #content{width:670px;}body.front #content-inner{background:url(/sites/all/themes/franceculture/images/bg-content.png) repeat-y 0 0;}body.front #content-left,body.node-type-panel #content-left{width:400px;padding:0 18px 0 0;float:left;clear:left;}body.front #content-right,body.node-type-panel #content-right{width:235px;padding:0 0 0 17px;float:left;}body.node-type-panel .panel-pane,body.node-type-panel .panel-pane li{clear:both;} -body.no-sidebars #content{width:990px;}body.no-sidebars #content-left{width:655px;padding:0 18px 0 0;float:left;}body.no-sidebars #content-right{width:300px;padding:0 0 0 17px;float:left;} -body.not-front #content{padding-top:20px;position:relative;}body.not-front #content-inner{padding-top:15px;border-top:1px solid #CFCFCF;} -body.section-rubrique #content{width:670px;}body.section-rubrique #content-right{width:234px;padding:0 0 0 35px;float:right;background:#fff url(/sites/all/themes/franceculture/images/bg-content-right.png) repeat-y 0 0;min-height:300px;height:auto !important;height:300px;margin-bottom:20px;}body.section-rubrique #content-inner{border-top-width:0;padding-top:0;}body.section-rubrique h1{border-top:1px solid #CFCFCF;padding-top:15px;} -body.lecture #content-inner{padding-top:0;border-top-width:0;}body.lecture #content-right{float:right;} -body.culture #content-inner{padding-top:0;border-top-width:0;} -body.agenda #content-inner{padding-top:0;} -body.section-podcasts #content-inner,body.section-podcast #content-inner{padding-top:0;}body.podcasts #content-left,body.podcasts #content-right{margin-top:20px;} -div#grille-programmes #content-inner{padding-top:0;} -body.emissions #content-left,body.emissions #content-right{margin-top:20px;}body.emissions #content-inner{padding-top:0;border-top-width:0;} -body.article .article-full #content-left,body.node-type-panel .article-full #content-left{width:310px;padding:0 18px 0 0;float:left;}body.article .article-full #content-right,body.node-type-panel .article-full #content-right{width:310px;padding:0 0 0 17px;float:left;} -body.profil #content{width:670px;}body.profil #content-left{width:400px;padding:0 17px 0 0;float:left;border-right:1px solid #CFCFCF;}body.profil #content-right{width:235px;padding:0 0 0 17px;float:left;}body.node-type-rf-personne #content{width:670px;}body.node-type-rf-personne #content-left{width:400px;padding:0 17px 0 0;float:left;border-right:1px solid #CFCFCF;overflow:hidden;}body.node-type-rf-personne #content-right{width:235px;padding:0 0 0 17px;float:left;}body.node-type-rf-personne #content-inner{border-top-width:0;} -body.node-type-rf-evenement #content{width:670px;}body.node-type-rf-evenement #content-left{width:400px;padding:0 17px 0 0;float:left;border-right:1px solid #CFCFCF;overflow:hidden;}body.node-type-rf-evenement #content-right{width:235px;padding:0 0 0 17px;float:left;} -body.node-type-rf-oeuvre #content{width:670px;}body.node-type-rf-oeuvre #content-left{width:400px;padding:0 17px 0 0;float:left;border-right:1px solid #CFCFCF;overflow:hidden;}body.node-type-rf-oeuvre #content-right{width:235px;padding:0 0 0 17px;float:left;} -body.recherche #content{padding-top:0;position:relative;}body.recherche #content-inner{border-top:none;} -body.mini-site #main{padding-top:90px;position:relative;}body.mini-site #main #content{position:static;padding-top:0;}body.mini-site #main #content #content-inner{border-top:0;}body.mini-site #main #content-top{position:absolute;top:0;left:0;width:960px;margin:20px 0 0 0;} -body.blogs #header{position:relative;height:165px;margin-bottom:20px;}body.blogs #content-inner{padding-top:0;border-top:none;} -body.page-node-edit #content,body.page-node-add #content{width:100%;} -body.section-partenariats #content{width:670px;}body.section-partenariats #content-right{width:234px;padding:0 0 0 35px;float:right;background:#fff url(/sites/all/themes/franceculture/images/bg-content-right.png) repeat-y 0 0;min-height:300px;height:auto !important;height:300px;margin-bottom:20px;}body.section-partenariats #content-inner{border-top-width:0;padding-top:0;}body.section-partenariats h1{border-top:1px solid #CFCFCF;padding-top:15px;} \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/culture_les_retours_du_dimanche.jpg Binary file test/emission_fichiers/culture_les_retours_du_dimanche.jpg has changed diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/direct.png Binary file test/emission_fichiers/direct.png has changed diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/drupal.js --- a/test/emission_fichiers/drupal.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,290 +0,0 @@ -// $Id: drupal.js,v 1.41.2.4 2009/07/21 08:59:10 goba Exp $ - -var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes': {}, 'locale': {} }; - -/** - * Set the variable that indicates if JavaScript behaviors should be applied - */ -Drupal.jsEnabled = true; - -/** - * Attach all registered behaviors to a page element. - * - * Behaviors are event-triggered actions that attach to page elements, enhancing - * default non-Javascript UIs. Behaviors are registered in the Drupal.behaviors - * object as follows: - * @code - * Drupal.behaviors.behaviorName = function () { - * ... - * }; - * @endcode - * - * Drupal.attachBehaviors is added below to the jQuery ready event and so - * runs on initial page load. Developers implementing AHAH/AJAX in their - * solutions should also call this function after new page content has been - * loaded, feeding in an element to be processed, in order to attach all - * behaviors to the new content. - * - * Behaviors should use a class in the form behaviorName-processed to ensure - * the behavior is attached only once to a given element. (Doing so enables - * the reprocessing of given elements, which may be needed on occasion despite - * the ability to limit behavior attachment to a particular element.) - * - * @param context - * An element to attach behaviors to. If none is given, the document element - * is used. - */ -Drupal.attachBehaviors = function(context) { - context = context || document; - // Execute all of them. - jQuery.each(Drupal.behaviors, function() { - this(context); - }); -}; - -/** - * Encode special characters in a plain-text string for display as HTML. - */ -Drupal.checkPlain = function(str) { - str = String(str); - var replace = { '&': '&', '"': '"', '<': '<', '>': '>' }; - for (var character in replace) { - var regex = new RegExp(character, 'g'); - str = str.replace(regex, replace[character]); - } - return str; -}; - -/** - * Translate strings to the page language or a given language. - * - * See the documentation of the server-side t() function for further details. - * - * @param str - * A string containing the English string to translate. - * @param args - * An object of replacements pairs to make after translation. Incidences - * of any key in this array are replaced with the corresponding value. - * Based on the first character of the key, the value is escaped and/or themed: - * - !variable: inserted as is - * - @variable: escape plain text to HTML (Drupal.checkPlain) - * - %variable: escape text and theme as a placeholder for user-submitted - * content (checkPlain + Drupal.theme('placeholder')) - * @return - * The translated string. - */ -Drupal.t = function(str, args) { - // Fetch the localized version of the string. - if (Drupal.locale.strings && Drupal.locale.strings[str]) { - str = Drupal.locale.strings[str]; - } - - if (args) { - // Transform arguments before inserting them - for (var key in args) { - switch (key.charAt(0)) { - // Escaped only - case '@': - args[key] = Drupal.checkPlain(args[key]); - break; - // Pass-through - case '!': - break; - // Escaped and placeholder - case '%': - default: - args[key] = Drupal.theme('placeholder', args[key]); - break; - } - str = str.replace(key, args[key]); - } - } - return str; -}; - -/** - * Format a string containing a count of items. - * - * This function ensures that the string is pluralized correctly. Since Drupal.t() is - * called by this function, make sure not to pass already-localized strings to it. - * - * See the documentation of the server-side format_plural() function for further details. - * - * @param count - * The item count to display. - * @param singular - * The string for the singular case. Please make sure it is clear this is - * singular, to ease translation (e.g. use "1 new comment" instead of "1 new"). - * Do not use @count in the singular string. - * @param plural - * The string for the plural case. Please make sure it is clear this is plural, - * to ease translation. Use @count in place of the item count, as in "@count - * new comments". - * @param args - * An object of replacements pairs to make after translation. Incidences - * of any key in this array are replaced with the corresponding value. - * Based on the first character of the key, the value is escaped and/or themed: - * - !variable: inserted as is - * - @variable: escape plain text to HTML (Drupal.checkPlain) - * - %variable: escape text and theme as a placeholder for user-submitted - * content (checkPlain + Drupal.theme('placeholder')) - * Note that you do not need to include @count in this array. - * This replacement is done automatically for the plural case. - * @return - * A translated string. - */ -Drupal.formatPlural = function(count, singular, plural, args) { - var args = args || {}; - args['@count'] = count; - // Determine the index of the plural form. - var index = Drupal.locale.pluralFormula ? Drupal.locale.pluralFormula(args['@count']) : ((args['@count'] == 1) ? 0 : 1); - - if (index == 0) { - return Drupal.t(singular, args); - } - else if (index == 1) { - return Drupal.t(plural, args); - } - else { - args['@count['+ index +']'] = args['@count']; - delete args['@count']; - return Drupal.t(plural.replace('@count', '@count['+ index +']')); - } -}; - -/** - * Generate the themed representation of a Drupal object. - * - * All requests for themed output must go through this function. It examines - * the request and routes it to the appropriate theme function. If the current - * theme does not provide an override function, the generic theme function is - * called. - * - * For example, to retrieve the HTML that is output by theme_placeholder(text), - * call Drupal.theme('placeholder', text). - * - * @param func - * The name of the theme function to call. - * @param ... - * Additional arguments to pass along to the theme function. - * @return - * Any data the theme function returns. This could be a plain HTML string, - * but also a complex object. - */ -Drupal.theme = function(func) { - for (var i = 1, args = []; i < arguments.length; i++) { - args.push(arguments[i]); - } - - return (Drupal.theme[func] || Drupal.theme.prototype[func]).apply(this, args); -}; - -/** - * Parse a JSON response. - * - * The result is either the JSON object, or an object with 'status' 0 and 'data' an error message. - */ -Drupal.parseJson = function (data) { - if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) { - return { status: 0, data: data.length ? data : Drupal.t('Unspecified error') }; - } - return eval('(' + data + ');'); -}; - -/** - * Freeze the current body height (as minimum height). Used to prevent - * unnecessary upwards scrolling when doing DOM manipulations. - */ -Drupal.freezeHeight = function () { - Drupal.unfreezeHeight(); - var div = document.createElement('div'); - $(div).css({ - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: $('body').css('height') - }).attr('id', 'freeze-height'); - $('body').append(div); -}; - -/** - * Unfreeze the body height - */ -Drupal.unfreezeHeight = function () { - $('#freeze-height').remove(); -}; - -/** - * Wrapper around encodeURIComponent() which avoids Apache quirks (equivalent of - * drupal_urlencode() in PHP). This function should only be used on paths, not - * on query string arguments. - */ -Drupal.encodeURIComponent = function (item, uri) { - uri = uri || location.href; - item = encodeURIComponent(item).replace(/%2F/g, '/'); - return (uri.indexOf('?q=') != -1) ? item : item.replace(/%26/g, '%2526').replace(/%23/g, '%2523').replace(/\/\//g, '/%252F'); -}; - -/** - * Get the text selection in a textarea. - */ -Drupal.getSelection = function (element) { - if (typeof(element.selectionStart) != 'number' && document.selection) { - // The current selection - var range1 = document.selection.createRange(); - var range2 = range1.duplicate(); - // Select all text. - range2.moveToElementText(element); - // Now move 'dummy' end point to end point of original range. - range2.setEndPoint('EndToEnd', range1); - // Now we can calculate start and end points. - var start = range2.text.length - range1.text.length; - var end = start + range1.text.length; - return { 'start': start, 'end': end }; - } - return { 'start': element.selectionStart, 'end': element.selectionEnd }; -}; - -/** - * Build an error message from ahah response. - */ -Drupal.ahahError = function(xmlhttp, uri) { - if (xmlhttp.status == 200) { - if (jQuery.trim(xmlhttp.responseText)) { - var message = Drupal.t("An error occurred. \n@uri\n@text", {'@uri': uri, '@text': xmlhttp.responseText }); - } - else { - var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri }); - } - } - else { - var message = Drupal.t("An HTTP error @status occurred. \n@uri", {'@uri': uri, '@status': xmlhttp.status }); - } - return message.replace(/\n/g, '
'); -} - -// Global Killswitch on the element -$(document.documentElement).addClass('js'); -// Attach all behaviors. -$(document).ready(function() { - Drupal.attachBehaviors(this); -}); - -/** - * The default themes. - */ -Drupal.theme.prototype = { - - /** - * Formats text for emphasized display in a placeholder inside a sentence. - * - * @param str - * The text to format (plain-text). - * @return - * The formatted text (html). - */ - placeholder: function(str) { - return '' + Drupal.checkPlain(str) + ''; - } -}; diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/fc_antidot_recherche.js --- a/test/emission_fichiers/fc_antidot_recherche.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +0,0 @@ -// integration du suggest (module antidot) -Drupal.behaviors.fc_antidot_recherche = function (){ - - // recupère l'adresse du proxy - var urlP = Drupal.settings.adresseProxy; -var as_pos = 0; -var as_pos2 = 0; - /** - * traitement de la sujestion sur le bloc de recherche - * pour économiser des appels à antidot - * la requete est lancée si l'utilisateur saisi plus de 3 lettres - * elle n'est pas lancée si : - * la dernière requete a retourné 0 ou un resultat et que le mot actuel est semblable au mot précedent+1car - */ - var expression = new RegExp("^[\\s!&\"'(\\-\\_)=$^\*!:;,~~#{\\[\\|`\\\\^@\\]}¤£µ%§/.?<>\\+]*$", "g"); - - // - $('#search_top_page').keyup(function(e){ - if(e.keyCode>=48 || e.keyCode == 8){ - var queryBox = $('#search_top_page').val(); - // active le bouton de recherche en fonction de la pressence de mot clé - if(expression.test(queryBox)){ - $('#search_top_page-wrapper #edit-submit').attr('disabled', 'disabled'); - }else{ - $('#search_top_page-wrapper #edit-submit').removeAttr('disabled'); - } - - - var prec = ""; - if(jQuery.trim(queryBox).length > 2){ - if($('#SuggestPopupBox').length == 0){ - $('#search_top_page-wrapper').append('
'); - // pour le stockage de la requete precedente - $('#search_top_page-wrapper').append(''); - }else{ - $('#SuggestPopupBox').css("display", 'block'); - prec = $('#SuggestPrecBox').text(); - } - //si la recerche précédente avait la même racine et moins de 2 reponses on ne lance pas la requete - - if ($('#SuggestPopupBox ul li').length < 2 && prec !="" && queryBox.indexOf(prec) == 0){ - - var suj = $('#SuggestPopupBox ul li').text(); - // si la sugestion est vide ou si elle n'est pas conforme au mot on cache la zone - if ( prec == "" || suj=="" || suj.indexOf(queryBox) !=0 ){ - $('#SuggestPopupBox').css("display", 'none'); - } - } else { - $('#SuggestPrecBox').text(queryBox); - // récupère le resultat de la sujestion - - $.getJSON(urlP+"?afs:service=254&afs:feed=chaineC&afs:query="+queryBox,function(data){ - // s'il y a des sujestions on les traites puis affiche - if(data[1].length > 0){ - $('#SuggestPopupBox').text(""); - var liste =""; - $.each(data[1], function(i, item) { - liste += "
  • "+item+"
  • "; - }); - $('#SuggestPopupBox').append("
      "+liste+"
    "); - // place dans la barre de recherche au clic sur une suj et reinitialise le bloc de recherche - - $('#SuggestPopupBox ul li').click(function(){ - var reponse = $(this).text(); - $('#search_top_page').val(reponse); - $('#SuggestPopupBox').text(""); - $('#SuggestPopupBox').css("display", 'none'); - $('#SuggestPrecBox').text(""); - }); - - }else{ - // sinon on masque le champ - $('#SuggestPopupBox').text(""); - $('#SuggestPopupBox').css("display", 'none'); - } - }); - } - $('#SuggestPrecBox').text(queryBox); - }else{ - $('#SuggestPopupBox').text(""); - $('#SuggestPopupBox').css("display", 'none'); - $('#SuggestPrecBox').text(""); - - } - } - }); -/* fin traitement de la sujestion sur le bloc de recherche */ -$('#search_top_page').keypress(function(e){ - - if($('#SuggestPopupBox').text()!=''){ - switch(e.keyCode){ - //down - case 40: - if(as_pos<$('#SuggestPopupBox ul li').length){ - $('#SuggestPopupBox ul li:nth-child('+as_pos+')').removeClass('active'); - as_pos++; - $('#SuggestPopupBox ul li:nth-child('+as_pos+')').addClass('active'); - var donne = $('#SuggestPopupBox ul li:nth-child('+as_pos+')').text(); - $('#search_top_page').val(donne); - } - break; - //up - case 38: - if(as_pos>0){ - $('#SuggestPopupBox ul li:nth-child('+as_pos+')').removeClass('active'); - as_pos--; - $('#SuggestPopupBox ul li:nth-child('+as_pos+')').addClass('active'); - var donne = $('#SuggestPopupBox ul li:nth-child('+as_pos+')').text(); - $('#search_top_page').val(donne); - } - break; - } - - } -}); -// -$('body').click(function(){ - $('#SuggestPopupBox').text(""); - $('#SuggestPopupBox').css("display", 'none'); - $('#SuggestPrecBox').text(""); - $('#SuggestPopupPage').text(""); - $('#SuggestPopupPage').css("display", 'none'); - $('#SuggestPrecPage').text(""); - as_pos = 0; - as_pos2 = 0; -}); - - -$('#edit-keys').keypress(function(e){ - - if($('#SuggestPopupPage').text()!=''){ - switch(e.keyCode){ - case 40: - if(as_pos2<$('#SuggestPopupPage ul li').length){ - $('#SuggestPopupPage ul li:nth-child('+as_pos2+')').removeClass('active'); - as_pos2++; - $('#SuggestPopupPage ul li:nth-child('+as_pos2+')').addClass('active'); -var donne = $('#SuggestPopupPage ul li:nth-child('+as_pos2+')').text(); - $('#edit-keys').val(donne); - } - break; - case 38: - if(as_pos2>0){ - $('#SuggestPopupPage ul li:nth-child('+as_pos2+')').removeClass('active'); - as_pos2--; - $('#SuggestPopupPage ul li:nth-child('+as_pos2+')').addClass('active'); -var donne = $('#SuggestPopupPage ul li:nth-child('+as_pos2+')').text(); - $('#edit-keys').val(donne); - } - break; - } - } -}); - - -/* traitement de la sujestion sur la page de recherche */ - $('#edit-keys').keyup(function(e){ - if(e.keyCode>=48 || e.keyCode == 8){ - var queryPage = $('#edit-keys').val(); - var expression = new RegExp("^[\\s!&\"'(\\-\\_)=$^\*!:;,~~#{\\[\\|`\\\\^@\\]}¤£µ%§/.?<>\\+]*$", "g"); - - // active le bouton de recherche en fonction de la pressence de mot clé - if(expression.test(queryPage)){ - $('#submit_resultat_page').attr('disabled', 'disabled'); - }else{ - $('#submit_resultat_page').removeAttr('disabled'); - - } - - var precPage = ""; - if(jQuery.trim(queryPage).length > 2){ - if($('#SuggestPopupPage').length == 0){ - $('#edit-keys-wrapper').append('
    '); - // pour le stockage de la requete precedente - $('#edit-keys-wrapper').append(''); - }else{ - $('#SuggestPopupPage').css("display", 'block'); - precPage = $('#SuggestPrecPage').text(); - } - //si la recerche précédente avait la même racine et moins de 2 reponses on ne lance pas la requete - if ($('#SuggestPopupPage ul li').length < 2 && precPage !="" && queryPage.indexOf(precPage) == 0){ - - var sujPage = $('#SuggestPopupPage ul li').text(); - // si la sugestion est vide ou si elle n'est pas conforme au mot on cache la zone - if ( precPage == "" || sujPage =="" || suj.indexOf(queryPage) !=0 ){ - $('#SuggestPopupPage').css("display", 'none'); - } - } else { - $('#SuggestPrecPage').text(queryPage); - // récupère le resultat de la sujestion - $.getJSON(urlP+"?afs:service=254&afs:feed=chaineC&afs:query="+queryPage,function(data){ - // s'il y a des sujestions on les traites puis affiche - if(data[1].length > 0){ - $('#SuggestPopupPage').text(""); - var liste =""; - $.each(data[1], function(i, item) { - liste += "
  • "+item+"
  • "; - }); - $('#SuggestPopupPage').append("
      "+liste+"
    "); - // place dans la barre de recherche au clic sur une suj et reinitialise le bloc de recherche - $('#SuggestPopupPage ul li').click(function(){ - var reponse = $(this).text(); - $('#edit-keys').val(reponse); - $('#SuggestPopupPage').text(""); - $('#SuggestPopupPage').css("display", 'none'); - $('#SuggestPrecPage').text(""); - }); - - }else{ - // sinon on masque le champ - $('#SuggestPopupPage').text(""); - $('#SuggestPopupPage').css("display", 'none'); - } - }); - } - $('#SuggestPrecPage').text(queryPage); - }else{ - $('#SuggestPopupPage').text(""); - $('#SuggestPopupPage').css("display", 'none'); - $('#SuggestPrecPage').text(""); - } -} - }); - -/* fin traitement de la sujestion sur la page de recherche */ - - - // surligner les résultats - var key = $('#edit-keys').val(); - if (!key) { - return; - } - var tableau = key.split(' '); - var key2 = ''; - for (var i=0;i=3){ - key2 += tableau[i] + ' '; - } - } - var options = {exact:"exact",style_name_suffix:false,style_name:"tagged",keys:key2}; - jQuery(document).SearchHighlight(options); - -}; - - - diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/fc_bloc_direct.js --- a/test/emission_fichiers/fc_bloc_direct.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -Drupal.behaviors.fcBlocDirect = function(context) { - // Set up interval - if (context == document && typeof(Drupal.settings.rf_bloc_suppress) == 'undefined') { // Only one is enough - var fcBlocDirectUpdateInterval = setInterval('fcBlocDirectUpdate()', Drupal.settings.fc_bloc_direct.interval); - if (Drupal.settings.fc_bloc_direct.refresh_on_load === 1) { - fcBlocDirectUpdate(); - }; - }; -}; - -// Interval callback -function fcBlocDirectUpdate() { - var url = Drupal.settings.basePath + 'fc_bloc_direct/refresh'; - $.ajax({ - method: 'get', - url : url, - dataType : 'json', - error: function(xhr) { - // Do nothing in production mode - // Drupal.CTools.AJAX.handleErrors(xhr, url); - }, - success: Drupal.CTools.AJAX.respond - }); -}; diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/fc_widget_twitter.js --- a/test/emission_fichiers/fc_widget_twitter.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -function twitterCallback2(twitters) { - var statusHTML = []; - var username = ""; - for (var i=0; i]*[^.,;'">\:\s\<\>\)\]\!])/g, function(url) { - return ''+url+''; - }).replace(/\B@([_a-z0-9]+)/ig, function(reply) { - return reply.charAt(0)+''+reply.substring(1)+''; - }); - statusHTML.push('
  • '+status+''+relative_time(twitters[i].created_at)+'
  • '); - } - document.getElementById('twitter_update_list_'+username).innerHTML = statusHTML.join(''); -} - -function relative_time(time_value) { - var values = time_value.split(" "); - time_value = values[1] + " " + values[2] + ", " + values[5] + " " + values[3]; - var parsed_date = Date.parse(time_value); - var relative_to = (arguments.length > 1) ? arguments[1] : new Date(); - var delta = parseInt((relative_to.getTime() - parsed_date) / 1000); - delta = delta + (relative_to.getTimezoneOffset() * 60); - - if (delta < 60) { - return " il y a moins d'une minute"; - } else if(delta < 120) { - return ' il y a une minute'; - } else if(delta < (60*60)) { - return ' il y a '+(parseInt(delta / 60)).toString() + ' minutes '; - } else if(delta < (120*60)) { - return ' il y a une heure'; - } else if(delta < (24*60*60)) { - return ' il y a ' + (parseInt(delta / 3600)).toString() + ' heures'; - } else if(delta < (48*60*60)) { - return ' il y a un jour'; - } else { - return ' il y a '+(parseInt(delta / 86400)).toString() + ' jours'; - } - } \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/fivestar.js --- a/test/emission_fichiers/fivestar.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,394 +0,0 @@ -/** - * Modified Star Rating - jQuery plugin - * - * Copyright (c) 2006 Wil Stuckey - * - * Original source available: http://sandbox.wilstuckey.com/jquery-ratings/ - * Extensively modified by Lullabot: http://www.lullabot.com - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -/** - * Create a degradeable star rating interface out of a simple form structure. - * Returns a modified jQuery object containing the new interface. - * - * @example jQuery('form.rating').fivestar(); - * @cat plugin - * @type jQuery - * - */ -(function($){ // Create local scope. - /** - * Takes the form element, builds the rating interface and attaches the proper events. - * @param {Object} $obj - */ - var buildRating = function($obj){ - var $widget = buildInterface($obj), - $stars = $('.star', $widget), - $cancel = $('.cancel', $widget), - $summary = $('.fivestar-summary', $obj), - feedbackTimerId = 0, - summaryText = $summary.html(), - summaryHover = $obj.is('.fivestar-labels-hover'), - currentValue = $("select", $obj).val(), - cancelTitle = $('label', $obj).html(), - voteTitle = cancelTitle != Drupal.settings.fivestar.titleAverage ? cancelTitle : Drupal.settings.fivestar.titleUser, - voteChanged = false; - - // Record star display. - if ($obj.is('.fivestar-user-stars')) { - var starDisplay = 'user'; - } - else if ($obj.is('.fivestar-average-stars')) { - var starDisplay = 'average'; - currentValue = $("input[name=vote_average]", $obj).val(); - } - else if ($obj.is('.fivestar-combo-stars')) { - var starDisplay = 'combo'; - } - else { - var starDisplay = 'none'; - } - - // Smart is intentionally separate, so the average will be set if necessary. - if ($obj.is('.fivestar-smart-stars')) { - var starDisplay = 'smart'; - } - - // Record text display. - if ($summary.size()) { - var textDisplay = $summary.attr('class').replace(/.*?fivestar-summary-([^ ]+).*/, '$1').replace(/-/g, '_'); - } - else { - var textDisplay = 'none'; - } - - // Add hover and focus events. - $stars - .mouseover(function(){ - event.drain(); - event.fill(this); - }) - .mouseout(function(){ - event.drain(); - event.reset(); - }); - $stars.children() - .focus(function(){ - event.drain(); - event.fill(this.parentNode) - }) - .blur(function(){ - event.drain(); - event.reset(); - }).end(); - - // Cancel button events. - $cancel - .mouseover(function(){ - event.drain(); - $(this).addClass('on') - }) - .mouseout(function(){ - event.reset(); - $(this).removeClass('on') - }); - $cancel.children() - .focus(function(){ - event.drain(); - $(this.parentNode).addClass('on') - }) - .blur(function(){ - event.reset(); - $(this.parentNode).removeClass('on') - }).end(); - - // Click events. - $cancel.click(function(){ - currentValue = 0; - event.reset(); - voteChanged = false; - // Inform a user that his vote is being processed - if ($("input.fivestar-path", $obj).size() && $summary.is('.fivestar-feedback-enabled')) { - setFeedbackText(Drupal.settings.fivestar.feedbackDeletingVote); - } - // Save the currentValue in a hidden field. - $("select", $obj).val(0); - // Update the title. - cancelTitle = starDisplay != 'smart' ? cancelTitle : Drupal.settings.fivestar.titleAverage; - $('label', $obj).html(cancelTitle); - // Update the smart classes on the widget if needed. - if ($obj.is('.fivestar-smart-text')) { - $obj.removeClass('fivestar-user-text').addClass('fivestar-average-text'); - $summary[0].className = $summary[0].className.replace(/-user/, '-average'); - textDisplay = $summary.attr('class').replace(/.*?fivestar-summary-([^ ]+).*/, '$1').replace(/-/g, '_'); - } - if ($obj.is('.fivestar-smart-stars')) { - $obj.removeClass('fivestar-user-stars').addClass('fivestar-average-stars'); - } - // Submit the form if needed. - $("input.fivestar-path", $obj).each(function() { - var token = $("input.fivestar-token", $obj).val(); - $.ajax({ - type: 'GET', - data: { token: token }, - dataType: 'xml', - url: this.value + '/' + 0, - success: voteHook - }); - }); - return false; - }); - $stars.click(function(){ - currentValue = $('select option', $obj).get($stars.index(this) + $cancel.size() + 1).value; - // Save the currentValue to the hidden select field. - $("select", $obj).val(currentValue); - // Update the display of the stars. - voteChanged = true; - event.reset(); - // Inform a user that his vote is being processed. - if ($("input.fivestar-path", $obj).size() && $summary.is('.fivestar-feedback-enabled')) { - setFeedbackText(Drupal.settings.fivestar.feedbackSavingVote); - } - // Update the smart classes on the widget if needed. - if ($obj.is('.fivestar-smart-text')) { - $obj.removeClass('fivestar-average-text').addClass('fivestar-user-text'); - $summary[0].className = $summary[0].className.replace(/-average/, '-user'); - textDisplay = $summary.attr('class').replace(/.*?fivestar-summary-([^ ]+).*/, '$1').replace(/-/g, '_'); - } - if ($obj.is('.fivestar-smart-stars')) { - $obj.removeClass('fivestar-average-stars').addClass('fivestar-user-stars'); - } - // Submit the form if needed. - $("input.fivestar-path", $obj).each(function () { - var token = $("input.fivestar-token", $obj).val(); - $.ajax({ - type: 'GET', - data: { token: token }, - dataType: 'xml', - url: this.value + '/' + currentValue, - success: voteHook - }); - }); - return false; - }); - - var event = { - fill: function(el){ - // Fill to the current mouse position. - var index = $stars.index(el) + 1; - $stars - .children('a').css('width', '100%').end() - .filter(':lt(' + index + ')').addClass('hover').end(); - // Update the description text and label. - if (summaryHover && !feedbackTimerId) { - var summary = $("select option", $obj)[index + $cancel.size()].text; - var value = $("select option", $obj)[index + $cancel.size()].value; - $summary.html(summary != index + 1 ? summary : ' '); - $('label', $obj).html(voteTitle); - } - }, - drain: function() { - // Drain all the stars. - $stars - .filter('.on').removeClass('on').end() - .filter('.hover').removeClass('hover').end(); - // Update the description text. - if (summaryHover && !feedbackTimerId) { - var cancelText = $("select option", $obj)[1].text; - $summary.html(($cancel.size() && cancelText != 0) ? cancelText : ' '); - if (!voteChanged) { - $('label', $obj).html(cancelTitle); - } - } - }, - reset: function(){ - // Reset the stars to the default index. - var starValue = currentValue/100 * $stars.size(); - var percent = (starValue - Math.floor(starValue)) * 100; - $stars.filter(':lt(' + Math.floor(starValue) + ')').addClass('on').end(); - if (percent > 0) { - $stars.eq(Math.floor(starValue)).addClass('on').children('a').css('width', percent + "%").end().end(); - } - // Restore the summary text and original title. - if (summaryHover && !feedbackTimerId) { - $summary.html(summaryText ? summaryText : ' '); - } - if (voteChanged) { - $('label', $obj).html(voteTitle); - } - else { - $('label', $obj).html(cancelTitle); - } - } - }; - - var setFeedbackText = function(text) { - // Kill previous timer if it isn't finished yet so that the text we - // are about to set will not get cleared too early. - feedbackTimerId = 1; - $summary.html(text); - }; - - /** - * Checks for the presence of a javascript hook 'fivestarResult' to be - * called upon completion of a AJAX vote request. - */ - var voteHook = function(data) { - var returnObj = { - result: { - count: $("result > count", data).text(), - average: $("result > average", data).text(), - summary: { - average: $("summary average", data).text(), - average_count: $("summary average_count", data).text(), - user: $("summary user", data).text(), - user_count: $("summary user_count", data).text(), - combo: $("summary combo", data).text(), - count: $("summary count", data).text() - } - }, - vote: { - id: $("vote id", data).text(), - tag: $("vote tag", data).text(), - type: $("vote type", data).text(), - value: $("vote value", data).text() - }, - display: { - stars: starDisplay, - text: textDisplay - } - }; - // Check for a custom callback. - if (window.fivestarResult) { - fivestarResult(returnObj); - } - // Use the default. - else { - fivestarDefaultResult(returnObj); - } - // Update the summary text. - summaryText = returnObj.result.summary[returnObj.display.text]; - if ($(returnObj.result.summary.average).is('.fivestar-feedback-enabled')) { - // Inform user that his/her vote has been processed. - if (returnObj.vote.value != 0) { // check if vote has been saved or deleted - setFeedbackText(Drupal.settings.fivestar.feedbackVoteSaved); - } - else { - setFeedbackText(Drupal.settings.fivestar.feedbackVoteDeleted); - } - // Setup a timer to clear the feedback text after 3 seconds. - feedbackTimerId = setTimeout(function() { clearTimeout(feedbackTimerId); feedbackTimerId = 0; $summary.html(returnObj.result.summary[returnObj.display.text]); }, 2000); - } - // Update the current star currentValue to the previous average. - if (returnObj.vote.value == 0 && (starDisplay == 'average' || starDisplay == 'smart')) { - currentValue = returnObj.result.average; - event.reset(); - } - }; - - event.reset(); - return $widget; - }; - - /** - * Accepts jQuery object containing a single fivestar widget. - * Returns the proper div structure for the star interface. - * - * @return jQuery - * @param {Object} $widget - * - */ - var buildInterface = function($widget){ - var $container = $('
    '); - var $options = $("select option", $widget); - var size = $('option', $widget).size() - 1; - var cancel = 1; - for (var i = 1, option; option = $options[i]; i++){ - if (option.value == "0") { - cancel = 0; - $div = $(''); - } - else { - var zebra = (i + cancel - 1) % 2 == 0 ? 'even' : 'odd'; - var count = i + cancel - 1; - var first = count == 1 ? ' star-first' : ''; - var last = count == size + cancel - 1 ? ' star-last' : ''; - $div = $(''); - } - $container.append($div[0]); - } - $container.addClass('fivestar-widget-' + (size + cancel - 1)); - // Attach the new widget and hide the existing widget. - $('select', $widget).after($container).css('display', 'none'); - return $container; - }; - - /** - * Standard handler to update the average rating when a user changes their - * vote. This behavior can be overridden by implementing a fivestarResult - * function in your own module or theme. - * @param object voteResult - * Object containing the following properties from the vote result: - * voteResult.result.count The current number of votes for this item. - * voteResult.result.average The current average of all votes for this item. - * voteResult.result.summary.average The textual description of the average. - * voteResult.result.summary.user The textual description of the user's current vote. - * voteResult.vote.id The id of the item the vote was placed on (such as the nid) - * voteResult.vote.type The type of the item the vote was placed on (such as 'node') - * voteResult.vote.tag The multi-axis tag the vote was placed on (such as 'vote') - * voteResult.vote.average The average of the new vote saved - * voteResult.display.stars The type of star display we're using. Either 'average', 'user', or 'combo'. - * voteResult.display.text The type of text display we're using. Either 'average', 'user', or 'combo'. - */ - function fivestarDefaultResult(voteResult) { - // Update the summary text. - $('div.fivestar-summary-'+voteResult.vote.tag+'-'+voteResult.vote.id).html(voteResult.result.summary[voteResult.display.text]); - // If this is a combo display, update the average star display. - if (voteResult.display.stars == 'combo') { - $('div.fivestar-form-'+voteResult.vote.id).each(function() { - // Update stars. - var $stars = $('.fivestar-widget-static .star span', this); - var average = voteResult.result.average/100 * $stars.size(); - var index = Math.floor(average); - $stars.removeClass('on').addClass('off').css('width', 'auto'); - $stars.filter(':lt(' + (index + 1) + ')').removeClass('off').addClass('on'); - $stars.eq(index).css('width', ((average - index) * 100) + "%"); - // Update summary. - var $summary = $('.fivestar-static-form-item .fivestar-summary', this); - if ($summary.size()) { - var textDisplay = $summary.attr('class').replace(/.*?fivestar-summary-([^ ]+).*/, '$1').replace(/-/g, '_'); - $summary.html(voteResult.result.summary[textDisplay]); - } - }); - } - }; - - /** - * Set up the plugin - */ - $.fn.fivestar = function() { - var stack = []; - this.each(function() { - var ret = buildRating($(this)); - stack.push(ret); - }); - return stack; - }; - - // Fix ie6 background flicker problem. - if ($.browser.msie == true) { - try { - document.execCommand('BackgroundImageCache', false, true); - } catch(err) {} - } - - Drupal.behaviors.fivestar = function(context) { - $('div.fivestar-form-item:not(.fivestar-processed)', context).addClass('fivestar-processed').fivestar(); - $('input.fivestar-submit', context).css('display', 'none'); - } - -})(jQuery); \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/footer.js --- a/test/emission_fichiers/footer.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -function boutonHautDePage(){ - $("#top-page").click(function() { - var hauteur = 0; - $('html,body').animate({scrollTop: hauteur}, 1000); - }); - return false; -} -// -Drupal.behaviors.franceculture_header_footer = function (){ - boutonHautDePage(); -} diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/fr_4fb8f115d8d263374d07dafa1b2a40b5.js --- a/test/emission_fichiers/fr_4fb8f115d8d263374d07dafa1b2a40b5.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -Drupal.locale = { 'pluralFormula': function($n) { return Number(($n!=1)); }, 'strings': {"Unspecified error":"Erreur non sp\u00e9cifi\u00e9e","Save":"Enregistrer","Cancel":"Annuler","Continue":"Continuer","Required":"Obligatoire","Optional":"Facultatif","Published":"Publi\u00e9","Edit":"Modifier","Promoted to front page":"Promu en page d'accueil","Create new revision":"Cr\u00e9er une r\u00e9vision","Select all rows in this table":"S\u00e9lectionner toutes les lignes du tableau","Deselect all rows in this table":"D\u00e9s\u00e9lectionner toutes les lignes du tableau","None":"Aucun","Removed":"Supprim\u00e9","Drag to re-order":"Cliquer-d\u00e9poser pour r\u00e9-organiser","Changes made in this table will not be saved until the form is submitted.":"Les modifications r\u00e9alis\u00e9es sur cette table ne seront enregistr\u00e9s que lorsque le formulaire sera soumis.","The changes to these blocks will not be saved until the \x3cem\x3eSave blocks\x3c\/em\x3e button is clicked.":"N'oubliez pas de cliquer sur \x3cem\x3eEnregistrer les blocs\x3c\/em\x3e pour confirmer les modifications apport\u00e9es ici.","jQuery UI Tabs: Mismatching fragment identifier.":"Onglets d'interface jQuery : identifiant de fragment ne correspondant pas.","jQuery UI Tabs: Not enough arguments to add tab.":"Onglets d'interface jQuery : pas assez d'arguments pour ajouter l'onglet.","Automatic alias":"Alias automatique","Split summary at cursor":"Cr\u00e9er un r\u00e9sum\u00e9 \u00e0 partir du curseur","Join summary":"Fusionner le r\u00e9sum\u00e9 et le corps du message","The selected file %filename cannot not be uploaded. Only files with the following extensions are allowed: %extensions.":"Le fichier s\u00e9lectionn\u00e9 %filename n'a pas pu \u00eatre t\u00e9l\u00e9vers\u00e9. Seuls les fichiers poss\u00e9dant les extensions suivantes sont autoris\u00e9s : %extensions.","Testing clean URLs...":"Test des URLs simplifi\u00e9es...","Your server has been successfully tested to support this feature.":"Le test a r\u00e9ussi. Votre serveur supporte cette fonctionnalit\u00e9.","Your system configuration does not currently support this feature. The \x3ca href=\"http:\/\/drupal.org\/node\/15365\"\x3ehandbook page on Clean URLs\x3c\/a\x3e has additional troubleshooting information.":"La configuration de votre syst\u00e8me ne supporte pas cette fonctionnalit\u00e9. La \x3ca href=\"http:\/\/drupal.org\/node\/15365\"\x3epage du manuel sur les URLs simplifi\u00e9es\x3c\/a\x3e apporte une aide suppl\u00e9mentaire.","Remove this item":"Supprimer cet \u00e9l\u00e9ment","An error occurred. \n@uri\n@text":"Une erreur s'est produite. \n@uri\n@text","An error occurred. \n@uri\n(no information available).":"Une erreur s'est produite. \n@uri\n(aucune information suppl\u00e9mentaire)","An HTTP error @status occurred. \n@uri":"Une erreur HTTP @status s'est produite. \n@uri","1 attachment":["@count fichier attach\u00e9","@count fichiers attach\u00e9s"],"Close":"Fermer","An error occured while trying to save you settings.":"Une erreur est survenue lors de la sauvegarde de vos param\u00e8tres.","Not in book":"Pas dans le livre","New book":"Nouveau livre","By @name on @date":"Par @name le @date","By @name":"Par @name","Sticky on top of lists":"Epingl\u00e9 en haut des listes","Not in menu":"Pas dans le menu","No attachments":"Aucune pi\u00e8ce jointe","Alias: @alias":"Alias : @alias","No alias":"Aucun alias","No flags":"Aucun flag","No terms":"Aucun terme","An error occurred at ":"Une erreur s'est produite \u00e0","Don't create new revision":"Ne pas cr\u00e9er de nouvelle r\u00e9vision","An error occurred at @path.":"Une erreur est survenu \u00e0 @path.","Save and send":"Sauvegarder et envoyer","Save and send test":"Sauvegarder et envoyer un test","Loading...":"Chargement...","Received an invalid response from the server.":"Nous avons re\u00e7u une r\u00e9ponse non valide de la part du serveur.","The link cannot be inserted because the parent window cannot be found.":"Le lien ne peut \u00eatre ins\u00e9r\u00e9 parce que la fen\u00eatre parente ne peut \u00eatre trouv\u00e9e.","Check all items in this group":"Cocher tous les \u00e9l\u00e9ments de ce groupe","Toggle the values of all items in this group":"Changer les valeurs de tous les \u00e9l\u00e9ments de ce groupe","Uncheck all items in this group":"D\u00e9cocher tous les \u00e9l\u00e9ments de ce groupe","Uncheck all":"D\u00e9cocher tout","Toggle":"Changer","Check all":"Tout cocher","Bad Response form submission":"Le formulaire n'a pu \u00eatre enregistr\u00e9, peut-\u00eatre n'avez-vous pas \"ajouter\" une image ?"} }; \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/franceculture.png Binary file test/emission_fichiers/franceculture.png has changed diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/high.js --- a/test/emission_fichiers/high.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){17.2m.27=6(b){4 c=b.2g||1j.22;5(!c&&b.J==Y)x F;j.A=$.2a({E:"E",1h:\'21\',1b:1T},b);5(b.C)j.C.1O(b.C);4 q=b.J!=Y?b.J.K().X(/[\\s,\\+\\.]+/):j.V(c,j.C);5(q&&q.1y("")){j.1v(q);x F.G(6(){4 a=F;5(a==1j)a=$("P")[0];j.1n(a,q)})}1l x F};4 j={A:{},m:[],C:[[/^9:\\/\\/(k\\.)?23\\./i,/q=([^&]+)/i],[/^9:\\/\\/(k\\.)?B\\.1X\\./i,/p=([^&]+)/i],[/^9:\\/\\/(k\\.)?B\\.1S\\./i,/q=([^&]+)/i],[/^9:\\/\\/(k\\.)?B\\.1R\\./i,/1Q=([^&]+)/i],[/^9:\\/\\/(k\\.)?B\\.1P\\./i,/1N=([^&]+)/i],[/^9:\\/\\/(k\\.)?1M\\.Z/i,/q=([^&]+)/i],[/^9:\\/\\/(k\\.)?1L\\./i,/q=([^&]+)/i],[/^9:\\/\\/(k\\.)?1K\\./i,/q=([^&]+)/i],[/^9:\\/\\/(k\\.)?B\\.1H\\./i,/q=([^&]+)/i],[/^9:\\/\\/(k\\.)?1G\\./i,/q=([^&]+)/i],[/^9:\\/\\/(k\\.)?1F\\.Z/i,/([^\\?\\/]+)(?:\\?.*)$/i]],N:{},V:6(b,c){b=1D(b);4 d=1A;$.G(c,6(i,n){5(n[0].1w(b)){4 a=b.v(n[1]);5(a){d=a[1].K();x 2k}}});5(d){d=d.Q(/(\\\'|")/,\'\\$1\');d=d.X(/[\\s,\\+\\.]+/)}x d},H:[[/[\\1r-\\1q\\1s-\\2c]/7,\'a\'],[/[\\1o\\29-\\1m]/7,\'c\'],[/[\\28-\\26]/7,\'e\'],[/[\\25-\\1i]/7,\'i\'],[/\\1g/7,\'n\'],[/[\\24-\\1f\\1t]/7,\'o\'],[/[\\1e-\\20]/7,\'s\'],[/[\\1Y-\\1c]/7,\'t\'],[/[\\1U-\\1a]/7,\'u\'],[/\\19/7,\'y\'],[/[\\16\\15\\14\\13]/7,\'\\\'\']],L:/[\\16\\15\\1r-\\1q\\1o-\\1i\\1g-\\1f\\1t-\\1a\\19\\1s-\\1m\\1e-\\1c\\14\\13]/7,M:6(q){j.L.11=0;5(j.L.1w(q)){12(4 i=0,l=j.H.z;i\'+g.1p(v.r,v[0].z)+"";r=v.r+v[0].z}5(h){h+=g.2e(r);4 i=$.2d([],$(""+h+"")[0].R);S+=i.z-1;e+=i.z-1;$(f).2l(i).2b()}}1l{5(f.O==1&&f.2n.B(j.W)==-1)j.T(f,b,c)}}}}}})(17)',62,148,'||||var|if|function|ig||http|||||||||||www||regex|||||index||||match||return||length|options|search|engines|elHighlight|exact|this|each|regexAccent|span|keys|toLowerCase|matchAccent|replaceAccent|subs|nodeType|body|replace|childNodes|endIndex|hiliteTree|noHighlight|decodeURL|nosearch|split|undefined|com|escapeRegEx|lastIndex|for|u2019|u2018|x92|x91|jQuery|case|xFF|xDC|style_name_suffix|u0167|highlight|u015A|xD6|xD1|style_name|xCF|document|whole|else|u010D|hiliteElement|xC7|substr|xC5|xC0|u0100|xD8|textNoAcc|buildReplaceTools|test|nohighlight|join|break|null|textarea|cript|decodeURIComponent|gi|technorati|alltheweb|lycos|switch|push|feedster|altavista|ask|userQuery|unshift|aol|query|live|msn|true|xD9|new|RegExp|yahoo|u0162|tyle|u0161|hilite|referrer|google|xD2|xCC|xCB|SearchHighlight|xC8|u0106|extend|remove|u0105|merge|substring|class|debug_referrer|exec|while|data|false|before|fn|nodeName'.split('|'),0,{})) diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/inscription.png Binary file test/emission_fichiers/inscription.png has changed diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/jquery.js --- a/test/emission_fichiers/jquery.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/** - * jQuery.timers - Timer abstractions for jQuery - * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) - * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/). - * Date: 2009/02/08 - * - * @author Blair Mitchelmore - * @version 1.1.2 - * - **/ - -jQuery.fn.extend({ - everyTime: function(interval, label, fn, times, belay) { - return this.each(function() { - jQuery.timer.add(this, interval, label, fn, times, belay); - }); - }, - oneTime: function(interval, label, fn) { - return this.each(function() { - jQuery.timer.add(this, interval, label, fn, 1); - }); - }, - stopTime: function(label, fn) { - return this.each(function() { - jQuery.timer.remove(this, label, fn); - }); - } -}); - -jQuery.event.special - -jQuery.extend({ - timer: { - global: [], - guid: 1, - dataKey: "jQuery.timer", - regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/, - powers: { - // Yeah this is major overkill... - 'ms': 1, - 'cs': 10, - 'ds': 100, - 's': 1000, - 'das': 10000, - 'hs': 100000, - 'ks': 1000000 - }, - timeParse: function(value) { - if (value == undefined || value == null) - return null; - var result = this.regex.exec(jQuery.trim(value.toString())); - if (result[2]) { - var num = parseFloat(result[1]); - var mult = this.powers[result[2]] || 1; - return num * mult; - } else { - return value; - } - }, - add: function(element, interval, label, fn, times, belay) { - var counter = 0; - - if (jQuery.isFunction(label)) { - if (!times) - times = fn; - fn = label; - label = interval; - } - - interval = jQuery.timer.timeParse(interval); - - if (typeof interval != 'number' || isNaN(interval) || interval <= 0) - return; - - if (times && times.constructor != Number) { - belay = !!times; - times = 0; - } - - times = times || 0; - belay = belay || false; - - var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {}); - - if (!timers[label]) - timers[label] = {}; - - fn.timerID = fn.timerID || this.guid++; - - var handler = function() { - if (belay && this.inProgress) - return; - this.inProgress = true; - if ((++counter > times && times !== 0) || fn.call(element, counter) === false) - jQuery.timer.remove(element, label, fn); - this.inProgress = false; - }; - - handler.timerID = fn.timerID; - - if (!timers[label][fn.timerID]) - timers[label][fn.timerID] = window.setInterval(handler,interval); - - this.global.push( element ); - - }, - remove: function(element, label, fn) { - var timers = jQuery.data(element, this.dataKey), ret; - - if ( timers ) { - - if (!label) { - for ( label in timers ) - this.remove(element, label, fn); - } else if ( timers[label] ) { - if ( fn ) { - if ( fn.timerID ) { - window.clearInterval(timers[label][fn.timerID]); - delete timers[label][fn.timerID]; - } - } else { - for ( var fn in timers[label] ) { - window.clearInterval(timers[label][fn]); - delete timers[label][fn]; - } - } - - for ( ret in timers[label] ) break; - if ( !ret ) { - ret = null; - delete timers[label]; - } - } - - for ( ret in timers ) break; - if ( !ret ) - jQuery.removeData(element, this.dataKey); - } - } - } -}); - -jQuery(window).bind("unload", function() { - jQuery.each(jQuery.timer.global, function(index, item) { - jQuery.timer.remove(item); - }); -}); \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/jquery_002.js --- a/test/emission_fichiers/jquery_002.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. - * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. - * - * Version: 3.0.2 - * - * Requires: 1.2.2+ - */ - -(function($) { - -var types = ['DOMMouseScroll', 'mousewheel']; - -$.event.special.mousewheel = { - setup: function() { - if ( this.addEventListener ) - for ( var i=types.length; i; ) - this.addEventListener( types[--i], handler, false ); - else - this.onmousewheel = handler; - }, - - teardown: function() { - if ( this.removeEventListener ) - for ( var i=types.length; i; ) - this.removeEventListener( types[--i], handler, false ); - else - this.onmousewheel = null; - } -}; - -$.fn.extend({ - mousewheel: function(fn) { - return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); - }, - - unmousewheel: function(fn) { - return this.unbind("mousewheel", fn); - } -}); - - -function handler(event) { - var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true; - - event = $.event.fix(event || window.event); - event.type = "mousewheel"; - - if ( event.wheelDelta ) delta = event.wheelDelta/120; - if ( event.detail ) delta = -event.detail/3; - - // Add events and delta to the front of the arguments - args.unshift(event, delta); - - return $.event.handle.apply(this, args); -} - -})(jQuery); \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/jquery_003.js --- a/test/emission_fichiers/jquery_003.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,457 +0,0 @@ -/** - * jquery.scrollable 1.0.2. Put your HTML scroll. - * - * Copyright (c) 2009 Tero Piirainen - * http://flowplayer.org/tools/scrollable.html - * - * Dual licensed under MIT and GPL 2+ licenses - * http://www.opensource.org/licenses - * - * Launch : March 2008 - * Version : 1.0.2 - Tue Feb 24 2009 10:52:08 GMT-0000 (GMT+00:00) - */ -(function($) { - - function fireEvent(opts, name, self, arg) { - var fn = opts[name]; - - if ($.isFunction(fn)) { - try { - return fn.call(self, arg); - - } catch (error) { - if (opts.alert) { - alert("Error calling scrollable." + name + ": " + error); - } else { - throw error; - } - return false; - } - } - return true; - } - - var current = null; - - - // constructor - function Scrollable(root, conf) { - - // current instance - var self = this; - if (!current) { current = self; } - - // horizontal flag - var horizontal = !conf.vertical; - - - // wrap (root elements for items) - var wrap = $(conf.items, root); - - // current index - var index = 0; - - - // get handle to navigational elements - var navi = root.siblings(conf.navi).eq(0); - var prev = root.siblings(conf.prev).eq(0); - var next = root.siblings(conf.next).eq(0); - var prevPage = root.siblings(conf.prevPage).eq(0); - var nextPage = root.siblings(conf.nextPage).eq(0); - - - // methods - $.extend(self, { - - getVersion: function() { - return [1, 0, 1]; - }, - - getIndex: function() { - return index; - }, - - getConf: function() { - return conf; - }, - - getSize: function() { - return self.getItems().size(); - }, - - getPageAmount: function() { - return Math.ceil(this.getSize() / conf.size); - }, - - getPageIndex: function() { - return Math.ceil(index / conf.size); - }, - - getRoot: function() { - return root; - }, - - getItemWrap: function() { - return wrap; - }, - - getItems: function() { - return wrap.children(); - }, - - /* all seeking functions depend on this */ - seekTo: function(i, time, fn) { - - // default speed - time = time || conf.speed; - - // function given as second argument - if ($.isFunction(time)) { - fn = time; - time = conf.speed; - } - - if (i < 0) { i = 0; } - if (i > self.getSize() - conf.size) { return self; } - - var item = self.getItems().eq(i); - if (!item.length) { return self; } - - // onBeforeSeek - if (fireEvent(conf, "onBeforeSeek", self, i) === false) { - return self; - } - - if (horizontal) { - var left = -(item.outerWidth(true) * i); - wrap.animate({left: left}, time, conf.easing, fn ? function() { fn.call(self); } : null); - - } else { - var top = -(item.outerHeight(true) * i); // wrap.offset().top - item.offset().top; - wrap.animate({top: top}, time, conf.easing, fn ? function() { fn.call(self); } : null); - } - - - // navi status update - if (navi.length) { - var klass = conf.activeClass; - var page = Math.ceil(i / conf.size); - page = Math.min(page, navi.children().length - 1); - navi.children().removeClass(klass).eq(page).addClass(klass); - } - - // prev buttons disabled flag - if (i === 0) { - prev.add(prevPage).addClass(conf.disabledClass); - } else { - prev.add(prevPage).removeClass(conf.disabledClass); - } - - // next buttons disabled flag - if (i >= self.getSize() - conf.size) { - next.add(nextPage).addClass(conf.disabledClass); - } else { - next.add(nextPage).removeClass(conf.disabledClass); - } - - current = self; - index = i; - - // onSeek after index being updated - fireEvent(conf, "onSeek", self, i); - - return self; - - }, - - move: function(offset, time, fn) { - var to = index + offset; - if (conf.loop && to > (self.getSize() - conf.size)) { - to = 0; - } - return this.seekTo(to, time, fn); - }, - - next: function(time, fn) { - return this.move(1, time, fn); - }, - - prev: function(time, fn) { - return this.move(-1, time, fn); - }, - - movePage: function(offset, time, fn) { - return this.move(conf.size * offset, time, fn); - }, - - setPage: function(page, time, fn) { - var size = conf.size; - var index = size * page; - var lastPage = index + size >= this.getSize(); - if (lastPage) { - index = this.getSize() - conf.size; - } - return this.seekTo(index, time, fn); - }, - - prevPage: function(time, fn) { - return this.setPage(this.getPageIndex() - 1, time, fn); - }, - - nextPage: function(time, fn) { - return this.setPage(this.getPageIndex() + 1, time, fn); - }, - - begin: function(time, fn) { - return this.seekTo(0, time, fn); - }, - - end: function(time, fn) { - return this.seekTo(this.getSize() - conf.size, time, fn); - }, - - reload: function() { - return load(); - }, - - click: function(index, time, fn) { - - var item = self.getItems().eq(index); - var klass = conf.activeClass; - - if (!item.hasClass(klass) && (index >= 0 || index < this.getSize())) { - self.getItems().removeClass(klass); - item.addClass(klass); - var delta = Math.floor(conf.size / 2); - var to = index - delta; - - // next to last item must work - if (to > self.getSize() - conf.size) { to--; } - - if (to !== index) { - return this.seekTo(to, time, fn); - } - } - - return self; - } - - }); - - - // mousewheel - if ($.isFunction($.fn.mousewheel)) { - root.bind("mousewheel.scrollable", function(e, delta) { - // opera goes to opposite direction - var step = $.browser.opera ? 1 : -1; - - self.move(delta > 0 ? step : -step, 50); - return false; - }); - } - - // prev button - prev.addClass(conf.disabledClass).click(function() { - self.prev(); - }); - - - // next button - next.click(function() { - self.next(); - }); - - // prev page button - nextPage.click(function() { - self.nextPage(); - }); - - - // next page button - prevPage.addClass(conf.disabledClass).click(function() { - self.prevPage(); - }); - - - // keyboard - if (conf.keyboard) { - - // unfortunately window.keypress does not work on IE. - $(window).unbind("keypress.scrollable").bind("keypress.scrollable", function(evt) { - - var el = current; - if (!el) { return; } - - if (horizontal && (evt.keyCode == 37 || evt.keyCode == 39)) { - el.move(evt.keyCode == 37 ? -1 : 1); - return evt.preventDefault(); - } - - if (!horizontal && (evt.keyCode == 38 || evt.keyCode == 40)) { - el.move(evt.keyCode == 38 ? -1 : 1); - return evt.preventDefault(); - } - - return true; - - }); - } - - // navi - function load() { - - navi.each(function() { - - var nav = $(this); - - // generate new entries - if (nav.is(":empty") || nav.data("me") == self) { - - nav.empty(); - nav.data("me", self); - - for (var i = 0; i < self.getPageAmount(); i++) { - - var item = $("<" + conf.naviItem + "/>").attr("href", i).click(function(e) { - var el = $(this); - el.parent().children().removeClass(conf.activeClass); - el.addClass(conf.activeClass); - self.setPage(el.attr("href")); - return e.preventDefault(); - }); - - if (i === 0) { item.addClass(conf.activeClass); } - nav.append(item); - } - - // assign onClick events to existing entries - } else { - - // find a entries first -> syntaxically correct - var els = nav.children(); - - els.each(function(i) { - var item = $(this); - item.attr("href", i); - if (i === 0) { item.addClass(conf.activeClass); } - - item.click(function() { - nav.find("." + conf.activeClass).removeClass(conf.activeClass); - item.addClass(conf.activeClass); - self.setPage(item.attr("href")); - }); - - }); - } - - }); - - - // item.click() - if (conf.clickable) { - self.getItems().each(function(index, arg) { - var el = $(this); - if (!el.data("set")) { - el.bind("click.scrollable", function() { - self.click(index); - }); - el.data("set", true); - } - }); - } - - - // hover - if (conf.hoverClass) { - self.getItems().hover(function() { - $(this).addClass(conf.hoverClass); - }, function() { - $(this).removeClass(conf.hoverClass); - }); - } - - return self; - } - - load(); - - - // interval stuff - var timer = null; - - function setTimer() { - timer = setInterval(function() { - self.next(); - - }, conf.interval); - } - - if (conf.interval > 0) { - - root.hover(function() { - clearInterval(timer); - }, function() { - setTimer(); - }); - - setTimer(); - } - - } - - - // jQuery plugin implementation - jQuery.prototype.scrollable = function(conf) { - - // already constructed --> return API - var api = this.eq(typeof conf == 'number' ? conf : 0).data("scrollable"); - if (api) { return api; } - - - var opts = { - - // basics - size: 5, - vertical:false, - clickable: true, - loop: false, - interval: 0, - speed: 400, - keyboard: true, - - // other - activeClass:'active', - disabledClass: 'disabled', - hoverClass: null, - easing: 'swing', - - // navigational elements - items: '.items', - prev: '.prev', - next: '.next', - prevPage: '.prevPage', - nextPage: '.nextPage', - navi: '.navi', - naviItem: 'a', - - - // callbacks - onBeforeSeek: null, - onSeek: null, - alert: true - }; - - - $.extend(opts, conf); - - this.each(function() { - var el = new Scrollable($(this), opts); - $(this).data("scrollable", el); - }); - - return this; - - }; - - -})(jQuery); diff -r f11b234497f7 -r 61c384dda19e test/emission_fichiers/jquery_004.js --- a/test/emission_fichiers/jquery_004.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/*! -* jQuery Form Plugin -* version: 2.43 (12-MAR-2010) -* @requires jQuery v1.3.2 or later -* -* Examples and documentation at: http://malsup.com/jquery/form/ -* Dual licensed under the MIT and GPL licenses: -* http://www.opensource.org/licenses/mit-license.php -* http://www.gnu.org/licenses/gpl.html -*/ -(function(b){function o(){if(b.fn.ajaxSubmit.debug){var a="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log)window.console.log(a);else window.opera&&window.opera.postError&&window.opera.postError(a)}}b.fn.ajaxSubmit=function(a){function d(){function r(){var p=h.attr("target"),n=h.attr("action");j.setAttribute("target",z);j.getAttribute("method")!="POST"&&j.setAttribute("method","POST");j.getAttribute("action")!=g.url&&j.setAttribute("action",g.url);g.skipEncodingOverride|| -h.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});g.timeout&&setTimeout(function(){C=true;s()},g.timeout);var m=[];try{if(g.extraData)for(var u in g.extraData)m.push(b('').appendTo(j)[0]);t.appendTo("body");t.data("form-plugin-onload",s);j.submit()}finally{j.setAttribute("action",n);p?j.setAttribute("target",p):h.removeAttr("target");b(m).remove()}}function s(){if(!D){var p=true;try{if(C)throw"timeout";var n,m;m=v.contentWindow? -v.contentWindow.document:v.contentDocument?v.contentDocument:v.document;var u=g.dataType=="xml"||m.XMLDocument||b.isXMLDoc(m);o("isXml="+u);if(!u&&(m.body==null||m.body.innerHTML=="")){if(--G){o("requeing onLoad callback, DOM not available");setTimeout(s,250);return}o("Could not access iframe DOM after 100 tries.");return}o("response detected");D=true;i.responseText=m.body?m.body.innerHTML:null;i.responseXML=m.XMLDocument?m.XMLDocument:m;i.getResponseHeader=function(H){return{"content-type":g.dataType}[H]}; -if(g.dataType=="json"||g.dataType=="script"){var E=m.getElementsByTagName("textarea")[0];if(E)i.responseText=E.value;else{var F=m.getElementsByTagName("pre")[0];if(F)i.responseText=F.innerHTML}}else if(g.dataType=="xml"&&!i.responseXML&&i.responseText!=null)i.responseXML=A(i.responseText);n=b.httpData(i,g.dataType)}catch(B){o("error caught:",B);p=false;i.error=B;b.handleError(g,i,"error",B)}if(p){g.success(n,"success");w&&b.event.trigger("ajaxSuccess",[i,g])}w&&b.event.trigger("ajaxComplete",[i,g]); -w&&!--b.active&&b.event.trigger("ajaxStop");if(g.complete)g.complete(i,p?"success":"error");setTimeout(function(){t.removeData("form-plugin-onload");t.remove();i.responseXML=null},100)}}function A(p,n){if(window.ActiveXObject){n=new ActiveXObject("Microsoft.XMLDOM");n.async="false";n.loadXML(p)}else n=(new DOMParser).parseFromString(p,"text/xml");return n&&n.documentElement&&n.documentElement.tagName!="parsererror"?n:null}var j=h[0];if(b(":input[name=submit]",j).length)alert('Error: Form elements must not be named "submit".'); -else{var g=b.extend({},b.ajaxSettings,a),q=b.extend(true,{},b.extend(true,{},b.ajaxSettings),g),z="jqFormIO"+(new Date).getTime(),t=b('
    -
    -
    - - - - -
    retour en haut de page - -
    - -
    -
    -
    -
    - -
    - -
    -

    Les Retours du dimanche - - par Caroline - Broué, Hervé -Gardette - Le site de l'émission -

    -
    - Les Retours du 
-dimanche - -
    -

    le dimanche de 18h10 à 19h

    -
    -
    - -
    -
    -
    - -
    - -
    - - -
    -
    - - Ecoutez l'émission - - 50 minutes -
    -

    - Le salaire de la politique ; les vuvuzelas ; l'actualité -politique belge - 0 - -

    -

    - 20.06.2010 - 18:10 -

    -
    -
    - - -
    -
    -
    -
    - - -
    - -

    le sociologue Alain Garrigou ©Radio -France

    -
    - - -

    Au sommaire des Retours du dimanche :

     

    La - - - revue -d'actualités : rappel des petits et grands évènements de la semaine. : il - faut reconnaître un mérite à Raymond Domenech et à ses joueurs...

     

    L'entretien - - - - : "Le salaire de la politique", après que la question de la rémunération des -politiques a été posée par le -premier ministre cette semaine. Invité : l'historien -et professeur en science politique Alain Garrigou, -auteur de Mourir pour des Idées, la vie posthume d'Alphone Baudin, - paru aux éditions Les Belles Lettres en avril 2010.

     

     

    - - - - - - -
    - - - - - - -
    - -

    La - revue de -presse : les vuvuzelas comme phénomène identitaire, ces - trompettes qui occupent le fond sonore de tous les matchs de la coupe -du monde de football qui se déroule en ce moment en Afrique du Sud.
    -
    La bulle sonore : Patrick Roegiers pour revenir - sur l'actualité politique en Belgique. Notre invité -est romancier, auteur de La Belgique, Le roman d'un pays, paru -chez Découvertes Gallimard en 2005, et Le mal du pays, autoportrait -de la Belgique, publié au Seuil en 2003. Il a récemment publié La - Nuit du Monde, au Seuil en janvier 2010.

     

    - La -chronique d'Anthony Bellanger de Courrier - -International.

    -


    Et comme chaque semaine : le sujet choisi par l'invité, notre -choix pour -la semaine à venir...

    -
    -
    -
    - -

    Invités :
    - Alain -Garrigou, professeur agrégé d'histoire et docteur en science -politique à l'université de Paris-X Nanterre
    Patrick - Roegiers

    -

    Thèmes : - Information| Débat| - Gouvernement| - Histoire

    - -
    -
    -
    -

    0 commentaire

    -
    -

    Votre commentaire

    -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    - -

    Enregistrement des -données…

    - - -
    -
    -
    - -
    -
    - - - -
    -
    -
    - - - -
    -
    - - -
    - - - - -
    -
    - - - - -
    -
    - - - - - - - - - - - - - - -
    \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/indexFC2.htm --- a/test/indexFC2.htm Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1974 +0,0 @@ - - - - - - - - - - - Le salaire de la politique ; les vuvuzelas ; l'actualité -politique belge - Information - France Culture - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - -
    retour en haut de page - -
    - -
    -
    -
    -
    - -
    - -
    -

    Les Retours du dimanche - - par Caroline - Broué, Hervé -Gardette - Le site de l'émission -

    -
    - Les Retours du 
-dimanche - -
    -

    le dimanche de 18h10 à 19h

    -
    -
    - -
    -
    -
    - -
    - -
    - - -
    -
    - - Ecoutez l'émission - - 50 minutes -
    -

    - Le salaire de la politique ; les vuvuzelas ; l'actualité -politique belge - 0 - -

    -

    - 20.06.2010 - 18:10 -

    -
    -
    - - -
    -
    -
    -
    - - -
    - -

    le sociologue Alain Garrigou ©Radio -France

    -
    - - -

    Au sommaire des Retours du dimanche :

     

    La - - - revue -d'actualités : rappel des petits et grands évènements de la semaine. : il - faut reconnaître un mérite à Raymond Domenech et à ses joueurs...

     

    L'entretien - - - - : "Le salaire de la politique", après que la question de la rémunération des -politiques a été posée par le -premier ministre cette semaine. Invité : l'historien -et professeur en science politique Alain Garrigou, -auteur de Mourir pour des Idées, la vie posthume d'Alphone Baudin, - paru aux éditions Les Belles Lettres en avril 2010.

     

     

    - - - - - - -
    - - - - - - -
    - -

    La - revue de -presse : les vuvuzelas comme phénomène identitaire, ces - trompettes qui occupent le fond sonore de tous les matchs de la coupe -du monde de football qui se déroule en ce moment en Afrique du Sud.
    -
    La bulle sonore : Patrick Roegiers pour revenir - sur l'actualité politique en Belgique. Notre invité -est romancier, auteur de La Belgique, Le roman d'un pays, paru -chez Découvertes Gallimard en 2005, et Le mal du pays, autoportrait -de la Belgique, publié au Seuil en 2003. Il a récemment publié La - Nuit du Monde, au Seuil en janvier 2010.

     

    - La -chronique d'Anthony Bellanger de Courrier - -International.

    -


    Et comme chaque semaine : le sujet choisi par l'invité, notre -choix pour -la semaine à venir...

    -
    -
    -
    - -

    Invités :
    - Alain -Garrigou, professeur agrégé d'histoire et docteur en science -politique à l'université de Paris-X Nanterre
    Patrick - Roegiers

    -

    Thèmes : - Information| Débat| - Gouvernement| - Histoire

    - -
    -
    -
    -

    0 commentaire

    -
    -

    Votre commentaire

    -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    - -

    Enregistrement des -données…

    - - -
    -
    -
    - -
    -
    - - - -
    -
    -
    - - - -
    -
    - - -
    - - - - -
    -
    - - - - -
    -
    - - - - - - - - - - - - - - -
    \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/allocine_test/AcPlayer_v3.0_new.swf Binary file test/integration/allocine_dossier_independant/allocine_test/AcPlayer_v3.0_new.swf has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/allocine_test/avatar.png Binary file test/integration/allocine_dossier_independant/allocine_test/avatar.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/allocine_test/data_cinecast_new.xml --- a/test/integration/allocine_dossier_independant/allocine_test/data_cinecast_new.xml Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Publicité : votre vidéo commence dans | secondes]]> - - - - \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/allocine_test/skin_fr.swf Binary file test/integration/allocine_dossier_independant/allocine_test/skin_fr.swf has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/LdtPlayer.css --- a/test/integration/allocine_dossier_independant/css/LdtPlayer.css Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,529 +0,0 @@ -/* Some general styling classes */ - -.Ldt-floatClear { - display: block; width: 100%; height: 0; clear: both; -} - -ul.Ldt-floatList { - padding: 0; margin: 0; list-style: none; -} - -.Ldt-floatList li { - float: left; -} - -/* */ - -#demo-frame > div.demo { padding: 5px !important; }; - -button.ui-button-icon-only { - height:1.5em; - width:1.5em; -} - -#Ldt-loader { - background:url(imgs/loader.gif) center no-repeat; - text-indent: -9999px; - position: absolute; -} - -/* general class for all buttons */ -.Ldt-button { - -} - -.Ldt-SegmentsWidget { - /* overflow: auto; /* clear the floats */ - margin-top: 1px; - padding-bottom: 8px; /* FIXME: only a temporary fix. This should be put into the layout manager. */ -} - -.Ldt-iri-chapter { - position: absolute; - height: 10px; - border-right: 1px solid white; -} - -.Ldt-SegmentPositionMarker { - position: absolute; - z-index: 100; - width: 1px; - height: 10px; - background-color: white; -} -.tooltip { - display:none; - background:transparent url(imgs/black_arrow_mini.png); - font-size:12px; - height:55px; - width:180px; - padding:10px; - padding-left:15px; - padding-top:15px; - padding-right:15px; - color:#000; - font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; -} -#Ldt-Root{ - font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; -} -#Ldt-Hat{ - height:3px; -} - -.Ldt-AnnotationsWidget { - font-size: 12px; - font-family: "Arial", "Verdana", "sans-serif"; - background-color:#eeeeee; -} - -.Ldt-AnnotationContent { - padding:5px; - padding-left: 12px; - -} - -.Ldt-fbShare { - display: block; - float: left; - width: 24px; - height: 24px; - background:url('imgs/facebook.png'); -} - -.Ldt-TwShare { - display: block; - float: left; - width: 24px; - height: 24px; - background:url('imgs/twitter.png'); -} - -.Ldt-GplusShare { - display: block; - float: left; - width: 24px; - height: 24px; - background:url('imgs/google.png'); -} - -.Ldt-SaTitle{ - padding-top:2px; - padding-bottom:3px; - font-size: 12pt; - color : #0068c4; -} - -.Ldt-SaDescription{ - font-size:12px; -} - -.Ldt-SaKeywords { - font-weight:bold; - font-size:10px; -} - -.Ldt-AnnotationShareIcons { - float:right; - position: relative; -} - - -#Ldt-PlaceHolder{ - position:absolue; - float:none; -} - -.Ldt-Segments{ - float:left; - font-size: 62.5%; -} - -.Ldt-mode-radio{ - visibility:hidden; - height:0px; - display:none -} - -.Ldt-cleaner { - clear:both; -} - -.cleaner { - clear:both; -} - -.share { - background:url('imgs/widget20.png') no-repeat scroll 0 0 transparent ; - display:block; - height:16px; - line-height:16px !important; - overflow:hidden; - width:16px; - float:left; - cursor:pointer; - margin:2px; -} -.shareFacebook{ - background-position:0 -704px; -} -.shareMySpace{ - background-position:0 -736px; -} -.shareTwitter{ - background-position:0 -1072px; -} -.shareGoogle{ - background-position:0 -752px; -} -.shareDelicious{ - background-position:0 -672px; -} -.shareJamesPot{ - background-position:0 -1808px; -} - -.tip{ - position: absolute; - padding : 3px; - z-index: 10000000000; - max-width: 200px; - background: transparent url("imgs/black_arrow_long.png"); - font-size: 12px; - height: 115px; - width: 180px; - padding: 15px 15px 20px; - color: #ffffff; - font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; - overflow:hidden; -} - -.tipcolor { - float: left; margin: 2px 4px 2px 0; -} - -.tip img { - max-width: 140px; max-height: 70px; margin: 0 20px; -} - - - -/* sparkline widget */ -.Ldt-sparklineWidget { - position: relative; - margin-bottom: 5px; -} - -.Ldt-sparkLinePositionMarker { - position: absolute; - top: 0px; - width: 0px; - background-color: #333333; - border-right: solid 1px pink; - z-index: 3; - opacity: 0.2; -} - -.Ldt-sparkLine { - position: absolute; - top: 0px; -} - -.Ldt-sparkLineClickOverlay { - position: absolute; - width: 640px; - height: 60px; - z-index: 4; - top: 0px; - opacity: 0.3; -} - -/* CINECAST Annotation Widget block */ - -.Ldt-createAnnotationWidget { - width: 610px; padding-bottom: 10px; clear: both; - color: #fff; - background: url(img-cinecast/createannbgd.png) no-repeat bottom right; -} - -.Ldt-createAnnotation-DoubleBorder { - width: 590px; position: relative; clear: both; - background: url(img-cinecast/createannbgd.png) no-repeat top left; - padding: 20px 10px 0; - min-height: 150px; -} -/* */ - -.Ldt-createAnnotation-Title { - font-size: 12pt; - color : #0068c4; - float: left; - margin-right: 5px; -} - -.Ldt-createAnnotation-TimeFrame { - font-size: 12pt; - color : #ff5589; - float: left; -} -.Ldt-createAnnotation-Container { - float: left; width: 100%; clear: both; -} - -.Ldt-createAnnotation-userAvatar { - float: right; - width: 80px; - height: 64px; - border: 1px #ffffff; - margin: 5px 0; -} - -.Ldt-createAnnotation-userAvatar img { - margin: 0 auto; - display: block; - max-width: 100%; - max-height: 100%; -} - -.Ldt-createAnnotationWidget .Ldt-floatClear { - height: 30px; background: url(img-cinecast/logo.iri.small.png) left no-repeat; -} - -/* CINECAST HIDE ARROW */ - -.Ldt-createAnnotation-profileArrow { - display: none; -} - -/* CINECAST SPECIFIC TEXTAREA */ - -.Ldt-createAnnotation-Description { - float: left; background: url(img-cinecast/textarea.png); border: none; margin: 0; padding: 4px 8px 4px 4px; width: 493px; height: 68px; - resize: none; -} -/* */ - -.Ldt-createAnnotation-btnblock { -} - -.Ldt-createAnnotation-btnblock label { - float: left; margin-top: 20px; width: 480px; font-size: 14px; color: #ffffff; -} - -/* CINECAST SPECIFIC TAG BUTTONS */ - -.Ldt-createAnnotation-keywords ul { - width: 100%; clear: both; -} - -.Ldt-createAnnotation-keywords li { - border: none; margin: 0 10px 5px 0; height: 23px; padding: 0 0 0 15px; - background: url(img-cinecast/tag.png) left top no-repeat; - cursor: pointer; -} - -.Ldt-createAnnotation-keyword-button { - font-size: 13px; color: #ffffff; width: 170px; text-shadow: 1px 1px 1px #000000; - height: 23px; padding: 0 5px 0 0; border: none; margin: 0; - background: url(img-cinecast/tag.png) right top no-repeat; - cursor: pointer; -} - -.Ldt-createAnnotation-keywords li:hover { - background-position: left -23px; -} - -.Ldt-createAnnotation-keywords li:hover .Ldt-createAnnotation-keyword-button { - background-position: right -23px; -} - -.Ldt-createAnnotation-keywords li.Ldt-createAnnotation-active-button { - background-position: left -46px; margin: 0 0 5px 0; -} - -.Ldt-createAnnotation-keywords li.Ldt-createAnnotation-active-button .Ldt-createAnnotation-keyword-button { - background-position: right -46px; padding: 0 15px 0 0; width: 180px; -} -/* */ - -/* CINECAST SUBMIT BUTTON */ - -.Ldt-createAnnotation-submitButton { - float: right; - width: 96px; - height: 34px; - background: url(img-cinecast/greenbutton.png); - border: none; - margin: 8px 0; - font-size: 13px; - text-transform: uppercase; - cursor: pointer; -} - -.Ldt-createAnnotation-submitButton:hover { - background-position: 0 -34px; -} - -/* */ - -.Ldt-createAnnotation-endScreen { - background-color: #ffffff; - margin-left: 5px; - margin-right: 5px; - border: 1px solid #d6d6d6; - padding: 10px; - font-size: 13px; - font-weight: bold; - color : #f7268e; - text-align: center; -} - -.Ldt-createAnnotation-errorMessage { - color: #D93C71; -} - -.Ldt-createAnnotation-Minimize { - position: relative; - float: right; - height: 17px; - width: 17px; - right: 0px; - background:url('imgs/minimize.png'); -} - -/* */ - -.Ldt-createAnnotation-spinner { - display: inline; - width: 16px; - height: 16px; - background-image('imgs/spinner.gif'); -} - -.Ldt-createAnnotation-endScreen-TweetLink { - width: 54px; - height: 20px; - background-image('imgs/tweet_button.png'); -} - -.Ldt-createAnnotation-endScreen-FbLink { - width: 55px; - height: 20px; - background-image('imgs/facebook_button.png'); -} - -.Ldt-createAnnotation-endScreen-GplusLink { - width: 50px; - height: 20px; - background-image('imgs/gplus_button.png'); -} -/* AnnotationsListWidget */ - -.Ldt-AnnotationsListWidget { - font-size: 12px; - font-family: "Arial", "Verdana", "sans-serif"; -} - -.Ldt-AnnotationsList-ul { - list-style: none; - padding: 0 3px; -} - -.Ldt-AnnotationsList-li { - float: left; width: 100%; clear: both; - margin: 2px 0; padding: 2px 0; - position: relative; - min-height: 70px; - background: #000000; -} - -.Ldt-AnnotationsList-li:hover { - background-color: #333333; -} - -.Ldt-AnnotationsListWidget a { - text-decoration: none; -} - -.Ldt-AnnotationsListWidget a:hover { - text-decoration: underline; -} - -.Ldt-AnnotationsList-Thumbnail { - border: none; - float: left; - max-width: 75px; - max-height: 48px; -} - -.Ldt-AnnotationsList-Duration { - color : #ffffff; - position: absolute; top: 55px; left: 5px; text-align: center; -} - -.Ldt-AnnotationsList-TcSeparator, .Ldt-AnnotationsList-End { - display: none; -} - -.Ldt-AnnotationsList-Title { - font-size: 13px; - margin: 0 0 2px 80px; - color: #ffffff; -} - -.Ldt-AnnotationsList-Description { - font-style: italic; - margin: 0 0 2px 80px; -} - -.Ldt-AnnotationsList-Description a { - color: #dddddd; -} - -.Ldt-AnnotationsList-Tags { - float: left; clear: both; padding: 0; margin: 2px 0 0 80px; list-style: none; -} - -.Ldt-AnnotationsList-Tag-Li { - float: left; border: none; margin: 0 0 0 5px; height: 23px; padding: 0 0 0 20px; - background: url(img-cinecast/tag.png) left top no-repeat; - cursor: pointer; -} - -.Ldt-AnnotationsList-Tag-Div { - font-size: 13px; color: #ffffff; text-shadow: 1px 1px 1px #000000; - height: 19px; padding: 4px 5px 0 0; border: none; margin: 0; - background: url(img-cinecast/tag.png) right top no-repeat; - cursor: pointer; -} - -.Ldt-createAnnotation-moar-keywordz { - float: right; font-size: 13px; color: #ffffff; text-shadow: 1px 1px 1px #000000; cursor: pointer; - width: 140px; height: 23px; background: url(img-cinecast/moar.png); border: none; margin: 0 15px; -} - -.Ldt-createAnnotation-moar-keywordz:hover { - background-position: bottom; -} - -/* Tagcloud */ - -.Ldt-TagCloud { - font-family: "PT Sans", Arial, Helvetica, sans-serif; -} - -.Ldt-TagCloud ul { - list-style: none; padding: 0; margin: 5px; text-align: center; -} - -.Ldt-TagCloud li { - display: inline-block; margin: 2px; cursor:pointer; cursor:hand; -} - -.Ldt-TagCloud li:hover { - color: #0099ff; -} - -.Ldt-TagCloud-actif { - color: #c000c0; -} diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/controlbarbgd.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/controlbarbgd.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/controlbarspacer.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/controlbarspacer.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/createannbgd.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/createannbgd.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/greenbutton.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/greenbutton.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/logo.iri.small.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/logo.iri.small.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/moar.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/moar.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/player-sprites.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/player-sprites.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/sliderpos.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/sliderpos.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/tag.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/tag.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/img-cinecast/textarea.png Binary file test/integration/allocine_dossier_independant/css/img-cinecast/textarea.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/annotate_arrow.png Binary file test/integration/allocine_dossier_independant/css/imgs/annotate_arrow.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/arrow.png Binary file test/integration/allocine_dossier_independant/css/imgs/arrow.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/black.png Binary file test/integration/allocine_dossier_independant/css/imgs/black.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/black_arrow.png Binary file test/integration/allocine_dossier_independant/css/imgs/black_arrow.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/black_arrow_big.png Binary file test/integration/allocine_dossier_independant/css/imgs/black_arrow_big.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/black_arrow_long.png Binary file test/integration/allocine_dossier_independant/css/imgs/black_arrow_long.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/black_big.png Binary file test/integration/allocine_dossier_independant/css/imgs/black_big.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/delicious.png Binary file test/integration/allocine_dossier_independant/css/imgs/delicious.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/facebook.png Binary file test/integration/allocine_dossier_independant/css/imgs/facebook.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/facebook_button.png Binary file test/integration/allocine_dossier_independant/css/imgs/facebook_button.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/google.png Binary file test/integration/allocine_dossier_independant/css/imgs/google.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/gplus_button.png Binary file test/integration/allocine_dossier_independant/css/imgs/gplus_button.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/grey_arrow_Show.png Binary file test/integration/allocine_dossier_independant/css/imgs/grey_arrow_Show.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/left_edge_arrow.png Binary file test/integration/allocine_dossier_independant/css/imgs/left_edge_arrow.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/left_handle.gif Binary file test/integration/allocine_dossier_independant/css/imgs/left_handle.gif has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/linkedin.png Binary file test/integration/allocine_dossier_independant/css/imgs/linkedin.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/loader.gif Binary file test/integration/allocine_dossier_independant/css/imgs/loader.gif has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/minimize.png Binary file test/integration/allocine_dossier_independant/css/imgs/minimize.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/player_gradient.png Binary file test/integration/allocine_dossier_independant/css/imgs/player_gradient.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/polemic_buttons_sprite.png Binary file test/integration/allocine_dossier_independant/css/imgs/polemic_buttons_sprite.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/purple_arrow_Show.png Binary file test/integration/allocine_dossier_independant/css/imgs/purple_arrow_Show.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/reply_sprite.png Binary file test/integration/allocine_dossier_independant/css/imgs/reply_sprite.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/retweet_sprite.png Binary file test/integration/allocine_dossier_independant/css/imgs/retweet_sprite.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/right_edge_arrow.png Binary file test/integration/allocine_dossier_independant/css/imgs/right_edge_arrow.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/right_handle.gif Binary file test/integration/allocine_dossier_independant/css/imgs/right_handle.gif has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/spinner.gif Binary file test/integration/allocine_dossier_independant/css/imgs/spinner.gif has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/submit_annotation.png Binary file test/integration/allocine_dossier_independant/css/imgs/submit_annotation.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/transBlack.png Binary file test/integration/allocine_dossier_independant/css/imgs/transBlack.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/tweet_button.png Binary file test/integration/allocine_dossier_independant/css/imgs/tweet_button.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/twitter.png Binary file test/integration/allocine_dossier_independant/css/imgs/twitter.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/user_default_icon.png Binary file test/integration/allocine_dossier_independant/css/imgs/user_default_icon.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/video_sequence.png Binary file test/integration/allocine_dossier_independant/css/imgs/video_sequence.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/white.png Binary file test/integration/allocine_dossier_independant/css/imgs/white.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/white_arrow.png Binary file test/integration/allocine_dossier_independant/css/imgs/white_arrow.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/white_arrow_big.png Binary file test/integration/allocine_dossier_independant/css/imgs/white_arrow_big.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/white_arrow_long.png Binary file test/integration/allocine_dossier_independant/css/imgs/white_arrow_long.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/white_arrow_mini.png Binary file test/integration/allocine_dossier_independant/css/imgs/white_arrow_mini.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/white_big.png Binary file test/integration/allocine_dossier_independant/css/imgs/white_big.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/widget20.png Binary file test/integration/allocine_dossier_independant/css/imgs/widget20.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/css/imgs/wire_pattern.png Binary file test/integration/allocine_dossier_independant/css/imgs/wire_pattern.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/LdtPlayer-release.js --- a/test/integration/allocine_dossier_independant/js/LdtPlayer-release.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6255 +0,0 @@ -/* - * - * Copyright 2010-2012 Institut de recherche et d'innovation - * contributor(s) : Karim Hamidou, Samuel Huron, Raphael Velt, Thibaut Cavalie - * - * contact@iri.centrepompidou.fr - * http://www.iri.centrepompidou.fr - * - * This software is a computer program whose purpose is to show and add annotations on a video . - * This software is governed by the CeCILL-C license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL-C - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL-C license and that you accept its terms. -*/ -/*! LAB.js (LABjs :: Loading And Blocking JavaScript) - v2.0.3 (c) Kyle Simpson - MIT License -*/ - -(function(global){ - var _$LAB = global.$LAB, - - // constants for the valid keys of the options object - _UseLocalXHR = "UseLocalXHR", - _AlwaysPreserveOrder = "AlwaysPreserveOrder", - _AllowDuplicates = "AllowDuplicates", - _CacheBust = "CacheBust", - /*!START_DEBUG*/_Debug = "Debug",/*!END_DEBUG*/ - _BasePath = "BasePath", - - // stateless variables used across all $LAB instances - root_page = /^[^?#]*\//.exec(location.href)[0], - root_domain = /^\w+\:\/\/\/?[^\/]+/.exec(root_page)[0], - append_to = document.head || document.getElementsByTagName("head"), - - // inferences... ick, but still necessary - opera_or_gecko = (global.opera && Object.prototype.toString.call(global.opera) == "[object Opera]") || ("MozAppearance" in document.documentElement.style), - -/*!START_DEBUG*/ - // console.log() and console.error() wrappers - log_msg = function(){}, - log_error = log_msg, -/*!END_DEBUG*/ - - // feature sniffs (yay!) - test_script_elem = document.createElement("script"), - explicit_preloading = typeof test_script_elem.preload == "boolean", // http://wiki.whatwg.org/wiki/Script_Execution_Control#Proposal_1_.28Nicholas_Zakas.29 - real_preloading = explicit_preloading || (test_script_elem.readyState && test_script_elem.readyState == "uninitialized"), // will a script preload with `src` set before DOM append? - script_ordered_async = !real_preloading && test_script_elem.async === true, // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order - - // XHR preloading (same-domain) and cache-preloading (remote-domain) are the fallbacks (for some browsers) - xhr_or_cache_preloading = !real_preloading && !script_ordered_async && !opera_or_gecko - ; - -/*!START_DEBUG*/ - // define console wrapper functions if applicable - if (global.console && global.console.log) { - if (!global.console.error) global.console.error = global.console.log; - log_msg = function(msg) { global.console.log(msg); }; - log_error = function(msg,err) { global.console.error(msg,err); }; - } -/*!END_DEBUG*/ - - // test for function - function is_func(func) { return Object.prototype.toString.call(func) == "[object Function]"; } - - // test for array - function is_array(arr) { return Object.prototype.toString.call(arr) == "[object Array]"; } - - // make script URL absolute/canonical - function canonical_uri(src,base_path) { - var absolute_regex = /^\w+\:\/\//; - - // is `src` is protocol-relative (begins with // or ///), prepend protocol - if (/^\/\/\/?/.test(src)) { - src = location.protocol + src; - } - // is `src` page-relative? (not an absolute URL, and not a domain-relative path, beginning with /) - else if (!absolute_regex.test(src) && src.charAt(0) != "/") { - // prepend `base_path`, if any - src = (base_path || "") + src; - } - // make sure to return `src` as absolute - return absolute_regex.test(src) ? src : ((src.charAt(0) == "/" ? root_domain : root_page) + src); - } - - // merge `source` into `target` - function merge_objs(source,target) { - for (var k in source) { if (source.hasOwnProperty(k)) { - target[k] = source[k]; // TODO: does this need to be recursive for our purposes? - }} - return target; - } - - // does the chain group have any ready-to-execute scripts? - function check_chain_group_scripts_ready(chain_group) { - var any_scripts_ready = false; - for (var i=0; i 0) { - for (var i=0; i=0;) { - val = queue.shift(); - $L = $L[val.type].apply(null,val.args); - } - return $L; - }, - - // rollback `[global].$LAB` to what it was before this file was loaded, the return this current instance of $LAB - noConflict:function(){ - global.$LAB = _$LAB; - return instanceAPI; - }, - - // create another clean instance of $LAB - sandbox:function(){ - return create_sandbox(); - } - }; - - return instanceAPI; - } - - // create the main instance of $LAB - global.$LAB = create_sandbox(); - - - /* The following "hack" was suggested by Andrea Giammarchi and adapted from: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html - NOTE: this hack only operates in FF and then only in versions where document.readyState is not present (FF < 3.6?). - - The hack essentially "patches" the **page** that LABjs is loaded onto so that it has a proper conforming document.readyState, so that if a script which does - proper and safe dom-ready detection is loaded onto a page, after dom-ready has passed, it will still be able to detect this state, by inspecting the now hacked - document.readyState property. The loaded script in question can then immediately trigger any queued code executions that were waiting for the DOM to be ready. - For instance, jQuery 1.4+ has been patched to take advantage of document.readyState, which is enabled by this hack. But 1.3.2 and before are **not** safe or - fixed by this hack, and should therefore **not** be lazy-loaded by script loader tools such as LABjs. - */ - (function(addEvent,domLoaded,handler){ - if (document.readyState == null && document[addEvent]){ - document.readyState = "loading"; - document[addEvent](domLoaded,handler = function(){ - document.removeEventListener(domLoaded,handler,false); - document.readyState = "complete"; - },false); - } - })("addEventListener","DOMContentLoaded"); - -})(this);/* - mustache.js — Logic-less templates in JavaScript - - See http://mustache.github.com/ for more info. -*/ - -var Mustache = function () { - var _toString = Object.prototype.toString; - - Array.isArray = Array.isArray || function (obj) { - return _toString.call(obj) == "[object Array]"; - } - - var _trim = String.prototype.trim, trim; - - if (_trim) { - trim = function (text) { - return text == null ? "" : _trim.call(text); - } - } else { - var trimLeft, trimRight; - - // IE doesn't match non-breaking spaces with \s. - if ((/\S/).test("\xA0")) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; - } else { - trimLeft = /^\s+/; - trimRight = /\s+$/; - } - - trim = function (text) { - return text == null ? "" : - text.toString().replace(trimLeft, "").replace(trimRight, ""); - } - } - - var escapeMap = { - "&": "&", - "<": "<", - ">": ">", - '"': '"', - "'": ''' - }; - - function escapeHTML(string) { - return String(string).replace(/&(?!\w+;)|[<>"']/g, function (s) { - return escapeMap[s] || s; - }); - } - - var regexCache = {}; - var Renderer = function () {}; - - Renderer.prototype = { - otag: "{{", - ctag: "}}", - pragmas: {}, - buffer: [], - pragmas_implemented: { - "IMPLICIT-ITERATOR": true - }, - context: {}, - - render: function (template, context, partials, in_recursion) { - // reset buffer & set context - if (!in_recursion) { - this.context = context; - this.buffer = []; // TODO: make this non-lazy - } - - // fail fast - if (!this.includes("", template)) { - if (in_recursion) { - return template; - } else { - this.send(template); - return; - } - } - - // get the pragmas together - template = this.render_pragmas(template); - - // render the template - var html = this.render_section(template, context, partials); - - // render_section did not find any sections, we still need to render the tags - if (html === false) { - html = this.render_tags(template, context, partials, in_recursion); - } - - if (in_recursion) { - return html; - } else { - this.sendLines(html); - } - }, - - /* - Sends parsed lines - */ - send: function (line) { - if (line !== "") { - this.buffer.push(line); - } - }, - - sendLines: function (text) { - if (text) { - var lines = text.split("\n"); - for (var i = 0; i < lines.length; i++) { - this.send(lines[i]); - } - } - }, - - /* - Looks for %PRAGMAS - */ - render_pragmas: function (template) { - // no pragmas - if (!this.includes("%", template)) { - return template; - } - - var that = this; - var regex = this.getCachedRegex("render_pragmas", function (otag, ctag) { - return new RegExp(otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" + ctag, "g"); - }); - - return template.replace(regex, function (match, pragma, options) { - if (!that.pragmas_implemented[pragma]) { - throw({message: - "This implementation of mustache doesn't understand the '" + - pragma + "' pragma"}); - } - that.pragmas[pragma] = {}; - if (options) { - var opts = options.split("="); - that.pragmas[pragma][opts[0]] = opts[1]; - } - return ""; - // ignore unknown pragmas silently - }); - }, - - /* - Tries to find a partial in the curent scope and render it - */ - render_partial: function (name, context, partials) { - name = trim(name); - if (!partials || partials[name] === undefined) { - throw({message: "unknown_partial '" + name + "'"}); - } - if (!context || typeof context[name] != "object") { - return this.render(partials[name], context, partials, true); - } - return this.render(partials[name], context[name], partials, true); - }, - - /* - Renders inverted (^) and normal (#) sections - */ - render_section: function (template, context, partials) { - if (!this.includes("#", template) && !this.includes("^", template)) { - // did not render anything, there were no sections - return false; - } - - var that = this; - - var regex = this.getCachedRegex("render_section", function (otag, ctag) { - // This regex matches _the first_ section ({{#foo}}{{/foo}}), and captures the remainder - return new RegExp( - "^([\\s\\S]*?)" + // all the crap at the beginning that is not {{*}} ($1) - - otag + // {{ - "(\\^|\\#)\\s*(.+)\\s*" + // #foo (# == $2, foo == $3) - ctag + // }} - - "\n*([\\s\\S]*?)" + // between the tag ($2). leading newlines are dropped - - otag + // {{ - "\\/\\s*\\3\\s*" + // /foo (backreference to the opening tag). - ctag + // }} - - "\\s*([\\s\\S]*)$", // everything else in the string ($4). leading whitespace is dropped. - - "g"); - }); - - - // for each {{#foo}}{{/foo}} section do... - return template.replace(regex, function (match, before, type, name, content, after) { - // before contains only tags, no sections - var renderedBefore = before ? that.render_tags(before, context, partials, true) : "", - - // after may contain both sections and tags, so use full rendering function - renderedAfter = after ? that.render(after, context, partials, true) : "", - - // will be computed below - renderedContent, - - value = that.find(name, context); - - if (type === "^") { // inverted section - if (!value || Array.isArray(value) && value.length === 0) { - // false or empty list, render it - renderedContent = that.render(content, context, partials, true); - } else { - renderedContent = ""; - } - } else if (type === "#") { // normal section - if (Array.isArray(value)) { // Enumerable, Let's loop! - renderedContent = that.map(value, function (row) { - return that.render(content, that.create_context(row), partials, true); - }).join(""); - } else if (that.is_object(value)) { // Object, Use it as subcontext! - renderedContent = that.render(content, that.create_context(value), - partials, true); - } else if (typeof value == "function") { - // higher order section - renderedContent = value.call(context, content, function (text) { - return that.render(text, context, partials, true); - }); - } else if (value) { // boolean section - renderedContent = that.render(content, context, partials, true); - } else { - renderedContent = ""; - } - } - - return renderedBefore + renderedContent + renderedAfter; - }); - }, - - /* - Replace {{foo}} and friends with values from our view - */ - render_tags: function (template, context, partials, in_recursion) { - // tit for tat - var that = this; - - var new_regex = function () { - return that.getCachedRegex("render_tags", function (otag, ctag) { - return new RegExp(otag + "(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?" + ctag + "+", "g"); - }); - }; - - var regex = new_regex(); - var tag_replace_callback = function (match, operator, name) { - switch(operator) { - case "!": // ignore comments - return ""; - case "=": // set new delimiters, rebuild the replace regexp - that.set_delimiters(name); - regex = new_regex(); - return ""; - case ">": // render partial - return that.render_partial(name, context, partials); - case "{": // the triple mustache is unescaped - case "&": // & operator is an alternative unescape method - return that.find(name, context); - default: // escape the value - return escapeHTML(that.find(name, context)); - } - }; - var lines = template.split("\n"); - for(var i = 0; i < lines.length; i++) { - lines[i] = lines[i].replace(regex, tag_replace_callback, this); - if (!in_recursion) { - this.send(lines[i]); - } - } - - if (in_recursion) { - return lines.join("\n"); - } - }, - - set_delimiters: function (delimiters) { - var dels = delimiters.split(" "); - this.otag = this.escape_regex(dels[0]); - this.ctag = this.escape_regex(dels[1]); - }, - - escape_regex: function (text) { - // thank you Simon Willison - if (!arguments.callee.sRE) { - var specials = [ - '/', '.', '*', '+', '?', '|', - '(', ')', '[', ']', '{', '}', '\\' - ]; - arguments.callee.sRE = new RegExp( - '(\\' + specials.join('|\\') + ')', 'g' - ); - } - return text.replace(arguments.callee.sRE, '\\$1'); - }, - - /* - find `name` in current `context`. That is find me a value - from the view object - */ - find: function (name, context) { - name = trim(name); - - // Checks whether a value is thruthy or false or 0 - function is_kinda_truthy(bool) { - return bool === false || bool === 0 || bool; - } - - var value; - - // check for dot notation eg. foo.bar - if (name.match(/([a-z_]+)\./ig)) { - var childValue = this.walk_context(name, context); - if (is_kinda_truthy(childValue)) { - value = childValue; - } - } else { - if (is_kinda_truthy(context[name])) { - value = context[name]; - } else if (is_kinda_truthy(this.context[name])) { - value = this.context[name]; - } - } - - if (typeof value == "function") { - return value.apply(context); - } - if (value !== undefined) { - return value; - } - // silently ignore unkown variables - return ""; - }, - - walk_context: function (name, context) { - var path = name.split('.'); - // if the var doesn't exist in current context, check the top level context - var value_context = (context[path[0]] != undefined) ? context : this.context; - var value = value_context[path.shift()]; - while (value != undefined && path.length > 0) { - value_context = value; - value = value[path.shift()]; - } - // if the value is a function, call it, binding the correct context - if (typeof value == "function") { - return value.apply(value_context); - } - return value; - }, - - // Utility methods - - /* includes tag */ - includes: function (needle, haystack) { - return haystack.indexOf(this.otag + needle) != -1; - }, - - // by @langalex, support for arrays of strings - create_context: function (_context) { - if (this.is_object(_context)) { - return _context; - } else { - var iterator = "."; - if (this.pragmas["IMPLICIT-ITERATOR"]) { - iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator; - } - var ctx = {}; - ctx[iterator] = _context; - return ctx; - } - }, - - is_object: function (a) { - return a && typeof a == "object"; - }, - - /* - Why, why, why? Because IE. Cry, cry cry. - */ - map: function (array, fn) { - if (typeof array.map == "function") { - return array.map(fn); - } else { - var r = []; - var l = array.length; - for(var i = 0; i < l; i++) { - r.push(fn(array[i])); - } - return r; - } - }, - - getCachedRegex: function (name, generator) { - var byOtag = regexCache[this.otag]; - if (!byOtag) { - byOtag = regexCache[this.otag] = {}; - } - - var byCtag = byOtag[this.ctag]; - if (!byCtag) { - byCtag = byOtag[this.ctag] = {}; - } - - var regex = byCtag[name]; - if (!regex) { - regex = byCtag[name] = generator(this.otag, this.ctag); - } - - return regex; - } - }; - - return({ - name: "mustache.js", - version: "0.5.0-dev", - - /* - Turns a template and view into HTML - */ - to_html: function (template, view, partials, send_fun) { - var renderer = new Renderer(); - if (send_fun) { - renderer.send = send_fun; - } - renderer.render(template, view || {}, partials); - if (!send_fun) { - return renderer.buffer.join("\n"); - } - } - }); -}(); -// Underscore.js 1.2.3 -// (c) 2009-2011 Jeremy Ashkenas, DocumentCloud Inc. -// Underscore is freely distributable under the MIT license. -// Portions of Underscore are inspired or borrowed from Prototype, -// Oliver Steele's Functional, and John Resig's Micro-Templating. -// For all details and documentation: -// http://documentcloud.github.com/underscore -(function(){function r(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== -c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&r(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(m.call(a,h)&&(f++,!(g=m.call(c,h)&&r(a[h],c[h],d))))break;if(g){for(h in c)if(m.call(c, -h)&&!f--)break;g=!f}}d.pop();return g}var s=this,F=s._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,G=k.concat,H=k.unshift,l=p.toString,m=p.hasOwnProperty,v=k.forEach,w=k.map,x=k.reduce,y=k.reduceRight,z=k.filter,A=k.every,B=k.some,q=k.indexOf,C=k.lastIndexOf,p=Array.isArray,I=Object.keys,t=Function.prototype.bind,b=function(a){return new n(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else typeof define==="function"&& -define.amd?define("underscore",function(){return b}):s._=b;b.VERSION="1.2.3";var j=b.each=b.forEach=function(a,c,b){if(a!=null)if(v&&a.forEach===v)a.forEach(c,b);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a==null&&(a=[]);if(x&&a.reduce===x)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(y&&a.reduceRight===y)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g, -c,d,e):b.reduce(g,c)};b.find=b.detect=function(a,c,b){var e;D(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(z&&a.filter===z)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(A&&a.every===A)return a.every(c, -b);j(a,function(a,g,h){if(!(e=e&&c.call(b,a,g,h)))return o});return e};var D=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(B&&a.some===B)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return q&&a.indexOf===q?a.indexOf(c)!=-1:b=D(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(c.call?c||a:a[c]).apply(a, -d)})};b.pluck=function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex= -function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after= -function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=I||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)m.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){j(i.call(arguments, -1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return r(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(m.call(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a=== -Object(a)};b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!m.call(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)== -"[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.noConflict=function(){s._=F;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),function(c){J(c, -b[c]=a[c])})};var K=0;b.uniqueId=function(a){var b=K++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape,function(a,b){return"',_.escape("+b.replace(/\\'/g,"'")+"),'"}).replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g, -"'")+",'"}).replace(d.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};var n=function(a){this._wrapped=a};b.prototype=n.prototype;var u=function(a,c){return c?b(a).chain():a},J=function(a,c){n.prototype[a]=function(){var a=i.call(arguments);H.call(a,this._wrapped);return u(c.apply(b, -a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];n.prototype[a]=function(){b.apply(this._wrapped,arguments);return u(this._wrapped,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];n.prototype[a]=function(){return u(b.apply(this._wrapped,arguments),this._chain)}});n.prototype.chain=function(){this._chain=true;return this};n.prototype.value=function(){return this._wrapped}}).call(this); -/* main file */ -// Why is it called main ? It only loads the libs ! - -if ( window.IriSP === undefined && window.__IriSP === undefined ) { - /** - @class - the object under which everything goes. - */ - IriSP = {}; - - /** Alias to IriSP for backward compatibility */ - __IriSP = IriSP; -} - -/* underscore comes bundled with the player and we need - it ASAP, so load it that way -*/ - -IriSP._ = window._.noConflict(); -IriSP.underscore = IriSP._; - -IriSP.getLib = function(lib) { - return ( - IriSP.libFiles.useCdn && typeof IriSP.libFiles.cdn[lib] == "string" - ? IriSP.libFiles.cdn[lib] - : ( - typeof IriSP.libFiles.locations[lib] == "string" - ? IriSP.libFiles.locations[lib] - : ( - typeof IriSP.libFiles.inDefaultDir[lib] == "string" - ? IriSP.libFiles.defaultDir + IriSP.libFiles.inDefaultDir[lib] - : null - ) - ) - ) -} - -IriSP.loadLibs = function( config, metadata_url, callback ) { - // Localize jQuery variable - IriSP.jQuery = null; - var $L = $LAB.script(IriSP.getLib("jQuery")).script(IriSP.getLib("swfObject")).wait() - .script(IriSP.getLib("jQueryUI")); - - if (config.player.type === "jwplayer" || config.player.type === "allocine") { - // load our popcorn.js lookalike - $L.script(IriSP.getLib("jwplayer")); - } else { - // load the real popcorn - $L.script(IriSP.getLib("popcorn")).script(IriSP.getLib("popcorn.code")); - if (config.player.type === "youtube") { - $L.script(IriSP.getLib("popcorn.youtube")); - } - if (config.player.type === "vimeo") - $L.script(IriSP.getLib("popcorn.vimeo")); - - /* do nothing for html5 */ - } - - /* widget specific requirements */ - for (var idx in config.gui.widgets) { - if (config.gui.widgets[idx].type === "PolemicWidget" || - config.gui.widgets[idx].type === "StackGraphWidget" || - config.gui.widgets[idx].type === "SparklineWidget") { - $L.script(IriSP.getLib("raphael")); - } - if (config.gui.widgets[idx].type === "TraceWidget") { - $L.script(IriSP.getLib("tracemanager")) - } - } - - // same for modules - /* - for (var idx in config.modules) { - if (config.modules[idx].type === "PolemicWidget") - $L.script(IriSP.getLib("raphaelJs")); - } - */ - - $L.wait(function() { - IriSP.jQuery = window.jQuery.noConflict( true ); - - var css_link_jquery = IriSP.jQuery( "", { - rel: "stylesheet", - type: "text/css", - href: IriSP.getLib("cssjQueryUI"), - 'class': "dynamic_css" - } ); - var css_link_custom = IriSP.jQuery( "", { - rel: "stylesheet", - type: "text/css", - href: config.gui.css, - 'class': "dynamic_css" - } ); - - css_link_jquery.appendTo('head'); - css_link_custom.appendTo('head'); - - IriSP.setupDataLoader(); - IriSP.__dataloader.get(metadata_url, - function(data) { - /* save the data so that we could re-use it to - configure the video - */ - IriSP.__jsonMetadata = data; - callback.call(window) }); - }); -}; -IriSP.annotation_template = "{{! template for an annotation displayed in a segmentWidget }}
    "; -IriSP.annotationWidget_template = "{{! template for the annotation widget }}
    "; -IriSP.annotation_loading_template = "{{! template shown while the annotation widget is loading }}
     
    Chargement...
    "; -IriSP.annotationsListWidget_template = "{{! template for the annotation list widget }}
    "; -IriSP.arrowWidget_template = "
    "; -IriSP.createAnnotationWidget_template = "{{! template for the annotation creation widget }}
    {{^cinecast_version}}
    {{/cinecast_version}}
    {{#show_from_field}} {{/show_from_field}}
    {{^user_avatar}} {{/user_avatar}} {{#user_avatar}} {{/user_avatar}}
    {{#tags.length}}
      {{#tags}}
    • {{/tags}}
    {{#random_tags}} {{/random_tags}} {{/tags.length}} {{#polemic_mode}} {{#polemics.length}}
      {{#polemics}}
    • {{/polemics}}
    {{/polemics.length}} {{/polemic_mode}}
    "; -IriSP.createAnnotation_errorMessage_template = "

    {{l10n.empty_annotation}}

    "; -IriSP.loading_template = "
    {{l10n.loading_wait}}
    "; -IriSP.overlay_marker_template = "{{! the template for the small bars which is z-indexed over our segment widget }}
    "; -IriSP.player_template = "{{! template for the radio player }}
    {{^disable_annotate_btn}}
    {{/disable_annotate_btn}} {{^disable_search_btn}}
    {{/disable_search_btn}}
    00:00
    /
    00:00
    "; -IriSP.search_template = "{{! template for the search container }}
    "; -IriSP.share_template = "{{! social network sharing template }} "; -IriSP.sliceWidget_template = "{{! template for the slice widget }}
    {{! the whole bar }}
    {{! the zone which represents our slice }}
    "; -IriSP.sliderWidget_template = "{{! template for the slider widget - it's composed of two divs we one overlayed on top of the other }}
    "; -IriSP.tooltip_template = "{{! template used by the jquery ui tooltip }}
    {{title}}
    {{begin}} : {{end}}
    {{description}}
    "; -IriSP.tooltipWidget_template = "{{! template for the tooltip widget }}
    "; -IriSP.tweetWidget_template = "{{! template for the tweet widget }}";/* utils.js - various utils that don't belong anywhere else */ - -/* trace function, for debugging */ - -IriSP.traceNum = 0; -IriSP.trace = function( msg, value ) { -/* - if( IriSP.config.gui.debug === true ) { - IriSP.traceNum += 1; - IriSP.jQuery( "
    "+IriSP.traceNum+" - "+msg+" : "+value+"
    " ).appendTo( "#Ldt-output" ); - } -*/ -}; - -/* used in callbacks - because in callbacks we lose "this", - we need to have a special function which wraps "this" in - a closure. This way, the -*/ -IriSP.wrap = function (obj, fn) { - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return fn.apply(obj, args); - } -} - -/* convert a time to a percentage in the media */ -IriSP.timeToPourcent = function(time, timetotal){ - var time = Math.abs(time); - var timetotal = Math.abs(timetotal); - - return Math.floor((time/timetotal) * 100); -}; - -IriSP.padWithZeros = function(num) { - if (Math.abs(num) < 10) { - return "0" + num.toString(); - } else { - return num.toString(); - } -}; - -/* convert a number of milliseconds to a tuple of the form - [hours, minutes, seconds] -*/ -IriSP.msToTime = function(ms) { - return IriSP.secondsToTime(ms / 1000); -} -/* convert a number of seconds to a tuple of the form - [hours, minutes, seconds] -*/ -IriSP.secondsToTime = function(secs) { - var hours = Math.abs(parseInt( secs / 3600 ) % 24); - var minutes = Math.abs(parseInt( secs / 60 ) % 60); - var seconds = parseFloat(Math.abs(secs % 60).toFixed(0)); - - var toString_fn = function() { - var ret = ""; - if (hours > 0) - ret = IriSP.padWithZeros(this.hours) + ":"; - ret += IriSP.padWithZeros(this.minutes) + ":" + IriSP.padWithZeros(this.seconds); - - return ret; - } - return {"hours" : hours, "minutes" : minutes, "seconds" : seconds, toString: toString_fn}; -}; - -/* format a tweet - replaces @name by a link to the profile, #hashtag, etc. */ -IriSP.formatTweet = function(tweet) { - /* - an array of arrays which hold a regexp and its replacement. - */ - var regExps = [ - /* copied from http://codegolf.stackexchange.com/questions/464/shortest-url-regex-match-in-javascript/480#480 */ - [/((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/gi, "$1"], - [/@(\w+)/gi, "@$1"], // matches a @handle - [/#(\w+)/gi, "#$1"],// matches a hashtag - [/(\+\+)/gi, "$1"], - [/(--)/gi, "$1"], - [/(==)/gi, "$1"], - [/(\?\?)/gi, "$1"] - ]; - - var i = 0; - for(i = 0; i < regExps.length; i++) { - tweet = tweet.replace(regExps[i][0], regExps[i][1]); - } - - return tweet; -}; - -IriSP.countProperties = function(obj) { - var count = 0; - - for(var prop in obj) { - if(obj.hasOwnProperty(prop)) - ++count; - } - - return count; -}; - -// conversion de couleur Decimal vers HexaDecimal || 000 si fff -IriSP.DEC_HEXA_COLOR = function (dec) { - var val = +dec; - var str = val.toString(16); - var zeroes = ""; - if (str.length < 6) { - for (var i = 0; i < 6 - str.length; i++) - zeroes += "0"; - } - return zeroes + str; -}; - -/* shortcut to have global variables in templates */ -IriSP.templToHTML = function(template, values) { - var params = IriSP.underscore.extend( - { "defaults" : IriSP.default_templates_vars, - "l10n" : IriSP.i18n.getMessages() - }, - values); - return Mustache.to_html(template, params); -}; - -/* we need to be stricter than encodeURIComponent, - because of twitter -*/ -IriSP.encodeURI = function(str) { - return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28'). - replace(/\)/g, '%29').replace(/\*/g, '%2A'); -} - -IriSP.jqEscape = function(text) { - return text.replace(/(:|\.)/g,'\\$1') -} - -IriSP.jqId = function (text) { - return IriSP.jQuery('#' + IriSP.jqEscape(text)); - } - -IriSP.__guidCounter = 0; -IriSP.guid = function(prefix) { - IriSP.__guidCounter += 1; - return prefix + IriSP.__guidCounter; -}; - -/** returns an url to share on facebook */ -IriSP.mkFbUrl = function(url, text) { - if (typeof(text) === "undefined") - text = "I'm watching "; - - return "http://www.facebook.com/share.php?u=" + IriSP.encodeURI(text) + IriSP.shorten_url(url); -}; - -/** returns an url to share on twitter */ -IriSP.mkTweetUrl = function(url, text) { - if (typeof(text) === "undefined") - text = "I'm watching "; - - return "http://twitter.com/home?status=" + IriSP.encodeURI(text) + IriSP.shorten_url(url); -}; - -/** returns an url to share on google + */ -IriSP.mkGplusUrl = function(url, text) { - return "https://plusone.google.com/_/+1/confirm?hl=en&url=" + IriSP.shorten_url(url); -}; - -/** test if a value is null or undefined */ -IriSP.null_or_undefined = function(val) { - return (typeof(val) === "undefined" || val === null); -}; - -/** get a property that can have multiple names **/ - -IriSP.get_aliased = function(_obj, _aliases) { - for (var _i = 0; _i < _aliases.length; _i++) { - if (typeof _obj[_aliases[_i]] !== "undefined") { - return _obj[_aliases[_i]]; - } - } - return null; -} - -/** issue a call to an url shortener and return the shortened url */ -IriSP.shorten_url = function(url) { - return encodeURIComponent(url); -}; - - -/* for ie compatibility -if (Object.prototype.__defineGetter__&&!Object.defineProperty) { - Object.defineProperty=function(obj,prop,desc) { - if ("get" in desc) obj.__defineGetter__(prop,desc.get); - if ("set" in desc) obj.__defineSetter__(prop,desc.set); - } -} -*/ - -/* Creates regexps from text */ -IriSP.regexpFromText = function(_text) { - return new RegExp('(' + _text.replace(/(\W)/gim,'\\$1') + ')','gim'); -} -/* wrapper that simulates popcorn.js because - popcorn is a bit unstable at the time */ - -IriSP.PopcornReplacement = { -}; - -/** base class for our popcorn-compatible players. - */ -IriSP.PopcornReplacement.player = function(container, options) { - /* the jwplayer calls the callbacks in the global space so we need to - preserve them using IriSP.wrap */ - this.callbacks = { - onReady: IriSP.wrap(this, this.__initApi), - onTime: IriSP.wrap(this, this.__timeHandler), - onPlay: IriSP.wrap(this, this.__playHandler), - onPause: IriSP.wrap(this, this.__pauseHandler), - onSeek: IriSP.wrap(this, this.__seekHandler) - }; - - this.media = { - "paused": true, - "muted": false - }; - - this.container = container.slice(1); //eschew the '#' - - this.msgPump = {}; /* dictionnary used to receive and send messages */ - this.__codes = []; /* used to schedule the execution of a piece of code in - a segment (similar to the popcorn.code plugin). */ - - this._options = options; - -}; - -IriSP.PopcornReplacement.player.prototype.listen = function(msg, callback) { - if (!this.msgPump.hasOwnProperty(msg)) - this.msgPump[msg] = []; - - this.msgPump[msg].push(callback); -}; - -IriSP.PopcornReplacement.player.prototype.trigger = function(msg, params) { - if (!this.msgPump.hasOwnProperty(msg)) - return; - - var d = this.msgPump[msg]; - - for(var i = 0; i < d.length; i++) { - d[i].call(window, params); - } - -}; - -IriSP.PopcornReplacement.player.prototype.guid = function(prefix) { - var str = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); - return v.toString(16); - }); - - return prefix + str; -}; - -/** init the api after that flash player has been setup - called by the callback - defined by the embedded flash player -*/ -IriSP.PopcornReplacement.player.prototype.__initApi = function() { - this.trigger("loadedmetadata"); // we've done more than loading metadata of course, - // but popcorn doesn't need to know more. - this.media.muted = this.playerFns.getMute(); - /* some programmed segments are supposed to be run at the beginning */ - var i = 0; - for(i = 0; i < this.__codes.length; i++) { - var c = this.__codes[i]; - if (0 == c.start) { - c.onStart(); - } - - if (0 == c.end) { - c.onEnd(); - } - } -}; - -/* -IriSP.PopcornReplacement.jwplayer = function(container, options) { - IriSP.PopcornReplacement._container = container.slice(1); //eschew the '#' - options.events = { - onReady: IriSP.PopcornReplacement.__initApi, - onTime: IriSP.PopcornReplacement.__timeHandler, - onPlay: IriSP.PopcornReplacement.__playHandler, - onPause: IriSP.PopcornReplacement.__pauseHandler, - onSeek: IriSP.PopcornReplacement.__seekHandler - } - - jwplayer(IriSP.PopcornReplacement._container).setup(options); - IriSP.PopcornReplacement.media.duration = options.duration; - return IriSP.PopcornReplacement; -}; -*/ - -IriSP.PopcornReplacement.player.prototype.currentTime = function(time) { - if (typeof(time) === "undefined") { - return this.playerFns.getPosition(); - } else { - var currentTime = +time; - this.playerFns.seek(currentTime); - return currentTime; - } -}; - -IriSP.PopcornReplacement.player.prototype.play = function() { - this.media.paused = false; - this.trigger("play"); - //IriSP.PopcornReplacement.trigger("playing"); - this.playerFns.play(); -}; - -IriSP.PopcornReplacement.player.prototype.pause = function() { -// if ( !this.media.paused ) { - this.media.paused = true; - this.trigger( "pause" ); - this.playerFns.pause(); -// } -}; - -IriSP.PopcornReplacement.player.prototype.muted = function(val) { - if (typeof(val) !== "undefined") { - - if (this.playerFns.getMute() !== val) { - if (val) { - this.playerFns.setMute(true); - this.media.muted = true; - } else { - this.playerFns.setMute(false); - this.media.muted = false; - } - - this.trigger( "volumechange" ); - } - - return this.playerFns.getMute(); - } else { - return this.playerFns.getMute(); - } -}; - -IriSP.PopcornReplacement.player.prototype.volume = function(val) { - if (typeof this.playerFns.getVolume == "undefined" || typeof this.playerFns.setVolume == "undefined") { - return false; - } - var _vol = this.playerFns.getVolume(); - if (typeof(val) !== "undefined" && parseFloat(val) !== NaN) { - val = Math.max(0, Math.min(1, val)); - if (parseFloat(val) != parseFloat(_vol)) { - this.playerFns.setVolume(val); - this.trigger("volumechange"); - _vol = this.playerFns.getVolume(); - } - } - return _vol; -}; - -IriSP.PopcornReplacement.player.prototype.mute = IriSP.PopcornReplacement.player.prototype.muted; - -IriSP.PopcornReplacement.player.prototype.code = function(options) { - this.__codes.push(options); - return this; -}; - -/* called everytime the player updates itself - (onTime event) - */ - -IriSP.PopcornReplacement.player.prototype.__timeHandler = function(event) { - var pos = event.position; - - var i = 0; - for(i = 0; i < this.__codes.length; i++) { - var c = this.__codes[i]; - - if (pos >= c.start && pos < c.end && - pos - 1 <= c.start) { - c.onStart(); - } - - if (pos > c.start && pos > c.end && - pos - 1 <= c.end) { - c.onEnd(); - } - - } - - this.trigger("timeupdate"); -}; - -IriSP.PopcornReplacement.player.prototype.__seekHandler = function(event) { - var i = 0; - - for(i = 0; i < this.__codes.length; i++) { - var c = this.__codes[i]; - - if (event.position >= c.start && event.position < c.end) { - c.onEnd(); - } - } - - for(i = 0; i < this.__codes.length; i++) { - var c = this.__codes[i]; - - if (typeof(event.offset) === "undefined") - event.offset = 0; - - if (event.offset >= c.start && event.offset < c.end) { - c.onStart(); - } - - } - - /* this signal sends as an extra argument the position in the video. - As far as I know, this argument is not provided by popcorn */ - this.trigger("seeked", event.offset); -}; - -IriSP.PopcornReplacement.player.prototype.__playHandler = function(event) { - this.media.paused = false; - this.trigger("play"); -}; - -IriSP.PopcornReplacement.player.prototype.__pauseHandler = function(event) { - this.media.paused = true; - this.trigger("pause"); -}; - -IriSP.PopcornReplacement.player.prototype.roundTime = function() { - var currentTime = this.currentTime(); - return Math.round(currentTime); -};/* data.js - this file deals with how the players gets and sends data */ - -IriSP.DataLoader = function() { - this._cache = {}; - - /* - A structure to hold callbacks for specific urls. We need it because - ajax calls are asynchronous, so it means that sometimes we ask - multiple times for a ressource because the first call hasn't been - received yet. - */ - this._callbacks = {}; -}; - -IriSP.DataLoader.prototype.get = function(url, callback, force_reload) { - var base_url = url.split("&")[0]; - if (typeof force_reload != "undefined" && force_reload && this._cache.hasOwnProperty(base_url)) { - delete this._cache[base_url] - } - if (this._cache.hasOwnProperty(base_url)) { - callback(this._cache[base_url]); - } else { - if (!this._callbacks.hasOwnProperty(base_url)) { - this._callbacks[base_url] = [callback]; - /* we need a closure because this gets lost when it's called back */ - - // uncomment you don't want to use caching. - // IriSP.jQuery.get(url, callback); - - var func = function(data) { - this._cache[base_url] = data; - var i = 0; - - for (i = 0; i < this._callbacks[base_url].length; i++) { - this._callbacks[base_url][i](this._cache[base_url]); - } - delete this._callbacks[base_url]; - }; - - /* automagically choose between json and jsonp */ - if (url.indexOf(document.location.hostname) === -1 && - url.indexOf("http://") !== -1 /* not a relative url */ ) { - // we contacting a foreign domain, use JSONP - - IriSP.jQuery.get(url, {}, IriSP.wrap(this, func), "jsonp"); - } else { - - // otherwise, hey, whatever rows your boat - IriSP.jQuery.get(url, IriSP.wrap(this, func)); - } - - } else { - /* simply push the callback - it'll get called when the ressource - has been received */ - - this._callbacks[base_url].push(callback); - - } - } -} - -/* the base abstract "class" */ -IriSP.Serializer = function(DataLoader, url) { - this._DataLoader = DataLoader; - this._url = url; - this._data = []; -}; - -IriSP.Serializer.prototype.serialize = function(data) { }; -IriSP.Serializer.prototype.deserialize = function(data) {}; - -IriSP.Serializer.prototype.currentMedia = function() { -}; - -IriSP.Serializer.prototype.getDuration = function() { -}; - -IriSP.Serializer.prototype.sync = function(callback) { - this._DataLoader.get(this._url, callback, force_refresh); -}; - -IriSP.SerializerFactory = function(DataLoader) { - this._dataloader = DataLoader; -}; - -IriSP.SerializerFactory.prototype.getSerializer = function(metadataOptions) { - /* This function returns serializer set-up with the correct - configuration - takes a metadata struct describing the metadata source - */ - - if (metadataOptions === undefined) - /* return an empty serializer */ - return IriSP.Serializer("", ""); - - switch(metadataOptions.type) { - case "json": - return new IriSP.JSONSerializer(this._dataloader, metadataOptions.src); - break; - - case "dummy": /* only used for unit testing - not defined in production */ - return new IriSP.MockSerializer(this._dataloader, metadataOptions.src); - break; - - case "empty": - return new IriSP.Serializer("", "empty"); - break; - - default: - return undefined; - } -}; -IriSP.language = 'en'; - -IriSP.libFiles = { - defaultDir : "js/libs/", - inDefaultDir : { - jQuery : "jquery.min.js", - jQueryUI : "jquery-ui.min.js", - jQueryToolTip : "jquery.tools.min.js", - swfObject : "swfobject.js", - cssjQueryUI : "jquery-ui.css", - popcorn : "popcorn.js", - jwplayer : "jwplayer.js", - raphael : "raphael.js", - "popcorn.mediafragment" : "popcorn.mediafragment.js", - "popcorn.code" : "popcorn.code.js", - "popcorn.jwplayer" : "popcorn.jwplayer.js", - "popcorn.youtube" : "popcorn.youtube.js", - "tracemanager" : "tracemanager.js" - }, - locations : { - // use to define locations outside defautl_dir - }, - cdn : { - jQueryUI : "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.js", - jQueryToolTip : "http://cdn.jquerytools.org/1.2.4/all/jquery.tools.min.js", - swfObject : "http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js", - cssjQueryUI : "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css" - }, - useCdn : false -} - -IriSP.widgetsDefaults = { - "LayoutManager" : { - spacer_div_height : 0 - }, - "PlayerWidget" : { - - }, - "AnnotationsWidget" : { - "share_text" : "I'm watching " - }, - "TweetsWidget" : { - default_profile_picture : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png", - tweet_display_period : 10000 // how long do we show a tweet ? - }, - "SliderWidget" : { - minimize_period : 850 // how long does the slider stays maximized after the user leaves the zone ? - }, - "SegmentsWidget" : { - cinecast_version : false - }, - "createAnnotationWidget" : { - tags : [ - { - "id" : "digitalstudies", - "meta" : { - "description" : "#digital-studies" - } - }, - { - "id" : "amateur", - "meta" : { - "description" : "#amateur" - }, - } - ], - remote_tags : false, - random_tags : false, - show_from_field : false, - disable_share : false, - polemic_mode : true, /* enable polemics ? */ - polemics : [{ - "className" : "positive", - "keyword" : "++" - }, { - "className" : "negative", - "keyword" : "--" - }, { - "className" : "reference", - "keyword" : "==" - }, { - "className" : "question", - "keyword" : "??" - }], - cinecast_version : false, /* put to false to enable the platform version, true for the festival cinecast one. */ - - /* where does the widget PUT the annotations - this is a mustache template. id refers to the id of the media ans is filled - by the widget. - */ - api_endpoint_template : "", // platform_url + "/ldtplatform/api/ldt/annotations/{{id}}.json", - api_method : "PUT" - }, - "SparklineWidget" : { - lineColor : "#7492b4", - fillColor : "#aeaeb8", - lineWidth : 2 - }, - "AnnotationsListWidget" : { - ajax_mode : true, /* use ajax to get information about the annotations. - if set to false, only search in the annotations for the - current project. */ - /* the platform generates some funky urls. We replace them afterwards to point to the - correct place - this setting will probably be overwritten by the platform - implementers. - Note that the player has to replace the variables between {{ and }} by its own values. - */ - ajax_url : "", //platform_url + "/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}", - ajax_granularity : 10000, /* how much ms should we look before and after the current timecode */ - default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png", - project_url : "", //platform_url + "/ldtplatform/ldt/front/player/" - /* the beginning of a link to the new front */ - cinecast_version : false, - refresh_interval : 10000 - }, - "StackGraphWidget" : { - defaultcolor : "#585858", - tags : [ - { - "keywords" : [ "++" ], - "description" : "positif", - "color" : "#1D973D" - }, - { - "keywords" : [ "--" ], - "description" : "negatif", - "color" : "#CE0A15" - }, - { - "keywords" : [ "==" ], - "description" : "reference", - "color" : "#C5A62D" - }, - { - "keywords" : [ "??" ], - "description" : "question", - "color" : "#036AAE" - } - ], - streamgraph : false - } -}/* the widget classes and definitions */ - -/** - * @class Widget is an "abstract" class. It's mostly used to define some properties common to every widget. - * - * Note that widget constructors are never called directly by the user. Instead, the widgets are instantiated by functions - * defined in init.js - * - * @constructor - * @param Popcorn a reference to the popcorn Object - * @param config configuration options for the widget - * @param Serializer a serializer instance from which the widget reads data fromCharCode -*/ -IriSP.Widget = function(Popcorn, config, Serializer) { - - if (config === undefined || config === null) { - config = {} - } - - this._Popcorn = Popcorn; - this._config = config; - this._serializer = Serializer; - - if (config.hasOwnProperty("container")) { - this._id = config.container; - this.selector = IriSP.jQuery("#" + this._id); - } - - if (config.hasOwnProperty("spacer")) { - this._spacerId = config.spacer; - this.spacer = IriSP.jQuery("#" + this._spacerId); - } - - - if (config.hasOwnProperty("width")) { - // this.width and not this._width because we consider it public. - this.width = config.width; - } - - if (config.hasOwnProperty("height")) { - this.height = config.height; - } - - if (config.hasOwnProperty("heightmax")) { - this.heightmax = config.heightmax; - } - - if (config.hasOwnProperty("widthmax")) { - this.widthmax = config.widthmax; - } - - if (config.hasOwnProperty("layoutManager")) { - this.layoutManager = config.layoutManager; - } - if (typeof this.selector != "undefined") { - this.selector.addClass("Ldt-TraceMe").addClass("Ldt-Widget"); - this.selector.attr("widget-type", this._config.type); - } - - // Parsing Widget Defaults - var _this = this; - - if (typeof config.type == "string" && typeof IriSP.widgetsDefaults[config.type] == "object") { - IriSP._(IriSP.widgetsDefaults[config.type]).each(function(_v, _k) { - if (typeof config[_k] != "undefined") { - _this[_k] = config[_k]; - } else { - _this[_k] = _v; - } - }); - } - -}; - - -IriSP.Widget.prototype.currentMedia = function() { - return this._serializer.currentMedia(); -} - -IriSP.Widget.prototype.getDuration = function() { - return this._serializer.getDuration(); -} - -/** - * This method responsible of drawing a widget on screen. - */ -IriSP.Widget.prototype.draw = function() { - /* implemented by "sub-classes" */ -}; - -/** - * Optional method if you want your widget to support redraws. - */ -IriSP.Widget.prototype.redraw = function() { - /* implemented by "sub-classes" */ -}; -/* modules are non-graphical entities, similar to widgets */ - -IriSP.Module = function(Popcorn, config, Serializer) { - - if (config === undefined || config === null) { - config = {} - } - - this._Popcorn = Popcorn; - this._config = config; - this._serializer = Serializer; -}; -/* layout.js - very basic layout management */ - -/** - @class a layout manager manages a div and the layout of objects - inside it. -*/ -IriSP.LayoutManager = function(options) { - this._Popcorn = null; - this._widgets = []; - - this._div = "LdtPlayer"; - this._width = 640; - - if (options === undefined) { - options = {}; - }; - - if (options.hasOwnProperty('container')) { - this._div = options.container; - } - - if (options.hasOwnProperty('width')) { - this._width = options.width; - } - - if (options.hasOwnProperty('height')) { - this._height = options.height; - } - - /* this is a shortcut */ - this.selector = IriSP.jQuery("#" + this._div); - - this.selector.css({ - "width": this._width, - "clear": "both" - }); - - if (this._height !== undefined) - this.selector.css("height", this._height); -}; - -/** - Set the popcorn instance used by the manager. - - we need this special setter because of a chicken and egg problem : - we want the manager to use popcorn but the popcorn div will be managed - by the manager. So we need a way to set the instance the manager uses -*/ - -IriSP.LayoutManager.prototype.setPopcornInstance = function(popcorn) { - this._Popcorn = popcorn; -} - -/** create a subdiv with an unique id, and a spacer div as well. - @param widgetName the name of the widget. - @return an array of the form [createdivId, spacerdivId]. -*/ -IriSP.LayoutManager.prototype.createDiv = function(widgetName) { - if (typeof(widgetName) === "undefined") - widgetName = ""; - - var newDiv = IriSP.guid(this._div + "_widget_" + widgetName + "_"); - var spacerDiv = IriSP.guid("LdtPlayer_spacer_"); - this._widgets.push([widgetName, newDiv]); - - var divTempl = "
    "); - - if (options.hasOwnProperty("width")) - IriSP.jQuery("#" + containerDiv).css("width", options.width); - - if (options.hasOwnProperty("height")) - IriSP.jQuery("#" + containerDiv).css("height", options.height); - - pop = Popcorn("#" + tmpId); - break; - - case "jwplayer": - var opts = IriSP.jQuery.extend({}, options); - delete opts.container; - delete opts.type; - - - /* Try to guess options.file and options.streamer only if file and streamer - are not already defined in the configuration */ - if (options.provider === "rtmp" && !opts.hasOwnProperty("file") && !opts.hasOwnProperty("streamer")) { - /* exit if we can't access the metadata */ - if (typeof(IriSP.__jsonMetadata) === "undefined") { - break; - }; - - // the json format is totally illogical - //opts.streamer = IriSP.__jsonMetadata["medias"][0]["meta"]["item"]["value"]; - //var source = IriSP.__jsonMetadata["medias"][0]["href"]; - - // the source if a full url but jwplayer wants an url relative to the - // streamer url, so we've got to remove the common part. - //opts.file = source.slice(opts.streamer.length); - - /* sometimes we get served a file with a wrong path and streamer. - as a streamer is of the form rtmp://domain/path/ and the media is - the rest, we uglily do this : - */ - opts.file = ""; - opts.streamer = ""; - var fullPath = IriSP.get_aliased(IriSP.__jsonMetadata["medias"][0], ["href","url"]); - - if (fullPath === null) { - console.log("no url or href field defined in the metadata."); - } - - var pathSplit = fullPath.split('/'); - - for (var i = 0; i < pathSplit.length; i++) { - if (i < 4) { - opts.streamer += pathSplit[i] + "/"; - } else { - opts.file += pathSplit[i]; - /* omit the last slash if we're on the last element */ - if (i < pathSplit.length - 1) - opts.file += "/"; - } - } - } else { - /* other providers type, video for instance - - pass everything as is */ - } - - if (!options.hasOwnProperty("flashplayer")) { - opts.flashplayer = IriSP.jwplayer_swf_path; - } - - if (!options.hasOwnProperty("controlbar.position")) { - opts["controlbar.position"] = "none"; - } - - pop = new IriSP.PopcornReplacement.jwplayer("#" + containerDiv, opts); - break; - - case "youtube": - var opts = IriSP.jQuery.extend({}, options); - delete opts.container; - opts.controls = 0; - opts.autostart = false; - templ = "width: {{width}}px; height: {{height}}px;"; - var str = Mustache.to_html(templ, {width: opts.width, height: opts.height}); - // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div. - IriSP.jQuery("#" + containerDiv).attr("style", str); - - pop = Popcorn.youtube("#" + containerDiv, opts.video, opts); - break; - - case "dailymotion": - pop = new IriSP.PopcornReplacement.dailymotion("#" + containerDiv, options); - break; - - case "allocine": - /* pass the options as-is to the allocine player and let it handle everything */ - pop = new IriSP.PopcornReplacement.allocine("#" + containerDiv, options); - break; - - default: - pop = undefined; - }; - - return pop; -}; - -/** Configure the gui and instantiate the widgets passed as parameters - @param guiOptions the gui object as seen in the examples. - */ -IriSP.configureWidgets = function (popcornInstance, layoutManager, guiOptions) { - - var serialFactory = new IriSP.SerializerFactory(IriSP.__dataloader); - var params = {width: guiOptions.width, height: guiOptions.height}; - - var default_options = guiOptions.default_options; - if (IriSP.null_or_undefined(default_options)) - default_options = {}; - - var ret_widgets = []; - var index; - - for (index = 0; index < guiOptions.widgets.length; index++) { - var widget = IriSP.instantiateWidget(popcornInstance, serialFactory, layoutManager, guiOptions.widgets[index], default_options); - - ret_widgets.push(widget); - }; - - return ret_widgets; -}; - -/** configure modules. @see configureWidgets */ -IriSP.configureModules = function (popcornInstance, modulesList) { - if (IriSP.null_or_undefined(modulesList)) - return; - - var serialFactory = new IriSP.SerializerFactory(IriSP.__dataloader); - var ret_modules = []; - var index; - - for (index = 0; index < modulesList.length; index++) { - var moduleConfig = modulesList[index]; - - var serializer = serialFactory.getSerializer(moduleConfig.metadata); - var module = new IriSP[moduleConfig.type](popcornInstance, moduleConfig, serializer); - ret_modules.push(module); - }; - - return ret_modules; -}; - -/** instantiate a widget - only called by configureWidgets, never by the user. Handles widget - dependencies. - @param popcornInstance popcorn instance the widget will user - @param serialFactory serializer factory to instantiate the widget with - @param layoutManager layout manager - @param widgetConfig configuration options for the widget - @param defaultOptions a dictionnary with some options defined for every widget. - */ -IriSP.instantiateWidget = function(popcornInstance, serialFactory, layoutManager, widgetConfig, defaultOptions) { - - if (IriSP.null_or_undefined(defaultOptions)) - defaultOptions = {}; - - widgetConfig = IriSP.underscore.defaults(widgetConfig, defaultOptions); - - var arr = IriSP.jQuery.extend({}, widgetConfig); - - /* create a div for those widgets who didn't already specify a container; */ - if (!arr.hasOwnProperty("container")) { - /* create div returns us a container for the widget and a spacer */ - var ret = layoutManager.createDiv(widgetConfig.type); - var container = ret[0]; - var spacer = ret[1]; - arr.container = container; - arr.spacer = spacer; - arr.layoutManager = layoutManager; - } - var serializer = serialFactory.getSerializer(widgetConfig.metadata); - - if (typeof serializer == "undefined") - debugger; - - // instantiate the object passed as a string - var widget = new IriSP[widgetConfig.type](popcornInstance, arr, serializer); - - if (widgetConfig.hasOwnProperty("requires")) { - // also create the widgets this one depends on. - // the dependency widget is available in the parent widget context as - // this.WidgetName (for instance, this.TipWidget); - - var i = 0; - for(i = 0; i < widgetConfig.requires.length; i++) { - var widgetName = widgetConfig.requires[i]["type"], - _configobj = IriSP.jQuery.extend({}, widgetConfig.requires[i]), - _div = document.createElement('div'), - _container = IriSP.guid(arr.container + '_' + widgetName + '_'); - _configobj.container = _container; - _div.id = _container; - widget.selector.append(_div); - widget[widgetName] = IriSP.instantiateWidget(popcornInstance, serialFactory, layoutManager, _configobj, defaultOptions); - } - } - - serializer.sync(IriSP.wrap(widget, function() { this.draw(); })); - return widget; -}; - -/** single point of entry for the metadataplayer */ -IriSP.initPlayer = function(config, metadata_url) { - document.getElementById(config.gui.container).innerHTML = IriSP.templToHTML(IriSP.loading_template, config.gui); - IriSP.loadLibs(config, metadata_url, - function() { - - var layoutManager = new IriSP.LayoutManager(config.gui); - - var pop = IriSP.configurePopcorn(layoutManager, config.player); - - IriSP._widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); - IriSP._modules = IriSP.configureModules(pop, config.modules); - IriSP.jQuery('#Ldt-loader').detach(); - }); -};IriSP.I18n = function() { - this.messages = {}; - this.base_lang = 'en'; -} - -IriSP.I18n.prototype.getLanguage = function(lang) { - var _lang = ( - typeof lang != "undefined" - ? lang - : ( - typeof IriSP.language != "undefined" - ? IriSP.language - : this.base_lang - ) - ); - return ( - typeof this.messages[_lang] == "object" - ? _lang - : ( - typeof this.messages[this.base_lang] == "object" - ? this.base_lang - : null - ) - ) -} - -IriSP.I18n.prototype.getMessages = function(lang) { - var _lang = this.getLanguage(lang); - return ( - _lang != null - ? this.messages[_lang] - : {} - ); -} - -IriSP.I18n.prototype.getMessage = function(message, lang) { - var _msgs = this.getMessages(lang); - return ( - typeof _msgs[message] != "undefined" - ? _msgs[message] - : message - ) -} - -IriSP.I18n.prototype.addMessage = function(lang, messagekey, messagevalue) { - if (typeof this.messages[lang] == "undefined") { - this.messages[lang] = {}; - } - this.messages[lang][messagekey] = messagevalue; -} - -IriSP.I18n.prototype.addMessages = function(messagesObj) { - var _this = this; - IriSP.underscore(messagesObj).each(function(_messages, _lang) { - IriSP.underscore(_messages).each(function(_value, _key) { - _this.addMessage(_lang, _key, _value); - }) - }); -} - -IriSP.i18n = new IriSP.I18n(); - -IriSP.i18n.addMessages({ - "fr": { - "loading_wait": "Chargement en cours, veuillez patienter…" - }, - "en": { - "loading_wait": "Loading, please wait…" - } -}) -/* To wrap a player the develop should create a new class derived from -the IriSP.PopcornReplacement.player and defining the correct functions */ - -/** allocine player wrapper */ -IriSP.PopcornReplacement.allocine = function(container, options) { -// console.log("Calling allocine player"); - /* appel du parent pour initialiser les structures communes à tous les players */ - IriSP.PopcornReplacement.player.call(this, container, options); - - var _this = this; - - /* Définition des fonctions de l'API - */ - - this.playerFns = { - play : function() { - return _this.apiCall("play"); - }, - pause : function() { - return _this.apiCall("pause"); - }, - getPosition : function() { - return _this.apiCall("getSeek","return") || 0; - }, - seek : function(pos) { - return _this.apiCall("seek",pos); - }, - getMute : function() { - return _this.apiCall("getMute","return"); - }, - setMute : function(p) { - return _this.apiCall("setMute", p); - } - } - - window.onReady = IriSP.wrap(this, this.ready); - window.onAllocineStateChange = IriSP.wrap(this, this.stateHandler); - window.onTime = IriSP.wrap(this, this.progressHandler); - - var _videoUrl = ( - typeof options.directVideoPath == "string" - ? options.directVideoPath - : IriSP.get_aliased(IriSP.__jsonMetadata["medias"][0], ["href","url"]) - ); - var _flashVars = { - "streamFMS" : true, - "adVast" : false, - "lg" : "fr_cinecast", - "autoPlay" : options.autoPlay, - "directVideoTitle" : "", - "urlAcData" : options.urlAcData, - "directVideoPath" : _videoUrl, - "host" : "http://allocine.fr" - } - - if (typeof IriSP.__jsonMetadata["medias"][0].meta == "object" && typeof IriSP.__jsonMetadata["medias"][0].meta.subtitles == "string") { - _flashVars.subTitlePath = IriSP.__jsonMetadata["medias"][0].meta.subtitles; - } - - - var params = { - "allowScriptAccess" : "always", - "wmode": "opaque", - "flashvars" : IriSP.jQuery.param(_flashVars), - "allowfullscreen" : true - }; - var atts = { - id : this.container - }; - swfobject.embedSWF(options.acPlayerUrl, this.container, options.width, options.height, "10", null, null, params, atts); - -}; - -IriSP.PopcornReplacement.allocine.prototype = new IriSP.PopcornReplacement.player("", {}); - -IriSP.PopcornReplacement.allocine.prototype.ready = function() { - this.player = document.getElementById(this.container); - this.player.addEventListener("onStateChange", "onAllocineStateChange"); - this.player.cueVideoByUrl(this._options.video); - this.callbacks.onReady(); -}; - -IriSP.PopcornReplacement.allocine.prototype.progressHandler = function(progressInfo) { - this.callbacks.onTime({ - position: progressInfo.mediaTime - }); -} - - -IriSP.PopcornReplacement.allocine.prototype.apiCall = function(_method, _arg) { - if (this.player) { - try { - if (typeof _arg == "undefined") { - return this.player.sendToActionScript(_method); - } else { - return this.player.sendToActionScript(_method, _arg); - } - } catch(e) { - console.error('Exception while requesting AcPlayer for "' + _method + (typeof _arg == "undefined" ? '' : '" with argument "' + _arg ) + '"\n', e); - return false; - } - } else { - return false; - } -} - -IriSP.PopcornReplacement.allocine.prototype.stateHandler = function(state) { - console.log("stateHandler"); - switch(state) { - case 1: - this.callbacks.onPlay(); - break; - - case 2: - this.callbacks.onPause(); - break; - - case 3: - this.callbacks.onSeek({ - position: this.player.getCurrentTime() - }); - break; - - /* - case 5: - this.callbacks.onReady(); - break; - */ - } - -};/* To wrap a player the develop should create a new class derived from -the IriSP.PopcornReplacement.player and defining the correct functions */ - -/** jwplayer player wrapper */ -IriSP.PopcornReplacement.dailymotion = function(container, options) { - console.log("Calling"); - /* appel du parent pour initialiser les structures communes à tous les players */ - IriSP.PopcornReplacement.player.call(this, container, options); - - var _this = this; - - /* Définition des fonctions de l'API - */ - - this.playerFns = { - play : function() { - if (_this.player) { - return _this.player.playVideo(); - } else { - return false; - } - }, - pause : function() { - if (_this.player) { - return _this.player.pauseVideo(); - } else { - return false; - } - }, - getPosition : function() { - if (_this.player) { - return _this.player.getCurrentTime(); - } else { - return 0; - } - }, - seek : function(pos) { - if (_this.player) { - return _this.player.seekTo(pos); - } else { - return false; - } - }, - getMute : function() { - if (_this.player) { - return _this.player.isMuted(); - } else { - return false; - } - }, - setMute : function(p) { - if (_this.player) { - if (p) { - _this.player.mute(); - } - else { - _this.player.unMute(); - } - } - }, - getVolume : function() { - if (_this.player) { - return _this.player.getVolume() / 100; - } else { - return false; - } - }, - setVolume : function(p) { - if (_this.player) { - _this.player.setVolume(Math.floor(100 * p)); - } - }, - } - - window.onDailymotionPlayerReady = IriSP.wrap(this, this.ready); - window.onDailymotionStateChange = IriSP.wrap(this, this.stateHandler); - window.onDailymotionVideoProgress = IriSP.wrap(this, this.progressHandler); - - var params = { - "allowScriptAccess" : "always", - "wmode": "opaque" - }; - var atts = { - id : this.container - }; - swfobject.embedSWF("http://www.dailymotion.com/swf?chromeless=1&enableApi=1", this.container, options.width, options.height, "8", null, null, params, atts); - -}; - -IriSP.PopcornReplacement.dailymotion.prototype = new IriSP.PopcornReplacement.player("", {}); - -IriSP.PopcornReplacement.dailymotion.prototype.ready = function() { - - this.player = document.getElementById(this.container); - - this.player.addEventListener("onStateChange", "onDailymotionStateChange"); - this.player.addEventListener("onVideoProgress", "onDailymotionVideoProgress"); - this.player.cueVideoByUrl(this._options.video); - - this.callbacks.onReady(); -}; - -IriSP.PopcornReplacement.dailymotion.prototype.progressHandler = function(progressInfo) { - - this.callbacks.onTime({ - position: progressInfo.mediaTime - }); -} - -IriSP.PopcornReplacement.dailymotion.prototype.stateHandler = function(state) { - - switch(state) { - case 1: - this.callbacks.onPlay(); - break; - - case 2: - this.callbacks.onPause(); - break; - - case 3: - this.callbacks.onSeek({ - position: this.player.getCurrentTime() - }); - break; - - /* - case 5: - this.callbacks.onReady(); - break; - */ - } - -};/* To wrap a player the develop should create a new class derived from - the IriSP.PopcornReplacement.player and defining the correct functions */ - -/** jwplayer player wrapper */ -IriSP.PopcornReplacement.jwplayer = function(container, options) { - /* appel du parent pour initialiser les structures communes à tous les players */ - IriSP.PopcornReplacement.player.call(this, container, options); - - this.media.duration = options.duration; /* optional */ - - /* Définition des fonctions de l'API - */ - this.playerFns = { - play: function() { return jwplayer(this.container).play(); }, - pause: function() { return jwplayer(this.container).pause(); }, - getPosition: function() { return jwplayer(this.container).getPosition(); }, - seek: function(pos) { return jwplayer(this.container).seek(pos); }, - getMute: function() { return jwplayer(this.container).getMute() }, - setMute: function(p) { return jwplayer(this.container).setMute(p); }, - getVolume: function() { return jwplayer(this.container).getVolume() / 100; }, - setVolume: function(p) { return jwplayer(this.container).setVolume(Math.floor(100*p)); } - } - - options.events = this.callbacks; - - jwplayer(this.container).setup(options); -}; - -IriSP.PopcornReplacement.jwplayer.prototype = new IriSP.PopcornReplacement.player("", {}); -/* embed module - listens and relay hash changes to a parent window. */ - -IriSP.EmbedModule = function(Popcorn, config, Serializer) { - IriSP.Module.call(this, Popcorn, config, Serializer); - - window.addEventListener('message', IriSP.wrap(this, this.handleMessages), false); - this._Popcorn.listen("IriSP.Mediafragment.hashchange", IriSP.wrap(this, this.relayChanges)); -}; - -IriSP.EmbedModule.prototype = new IriSP.Module(); - -IriSP.EmbedModule.prototype.handleMessages = function(e) { - if (e.data.type === "hashchange") { - window.location.hash = e.data.value; - } -}; - -IriSP.EmbedModule.prototype.relayChanges = function(newHash) { - window.parent.postMessage({type: "hashchange", value: newHash}, "*"); - return; -};/* mediafragment module */ - -IriSP.MediaFragment = function(Popcorn, config, Serializer) { - IriSP.Module.call(this, Popcorn, config, Serializer); - - this.mutex = false; /* a mutex because we access the url from two different functions */ - - this._Popcorn.listen( "loadedmetadata", IriSP.wrap(this,this.advanceTime)); - this._Popcorn.listen( "pause", IriSP.wrap(this,this.updateTime)); - this._Popcorn.listen( "seeked", IriSP.wrap(this,this.updateTime)); - this._Popcorn.listen( "IriSP.PolemicTweet.click", IriSP.wrap(this,this.updateAnnotation)); - this._Popcorn.listen( "IriSP.SegmentsWidget.click", IriSP.wrap(this,this.updateAnnotation)); - - window.onhashchange = IriSP.wrap(this, this.advanceTime); -}; - -IriSP.MediaFragment.prototype = new IriSP.Module(); - -IriSP.MediaFragment.prototype.advanceTime = function() { - var url = window.location.href; - - if ( url.split( "#" )[ 1 ] != null ) { - pageoffset = url.split( "#" )[1]; - - if ( pageoffset.substring(0, 2) === "t=") { - // timecode - if ( pageoffset.substring( 2 ) != null ) { - var offsettime = pageoffset.substring( 2 ); - this._Popcorn.currentTime( parseFloat(offsettime) ); - - /* we have to trigger this signal manually because of a - bug in the jwplayer */ - this._Popcorn.trigger("seeked", parseFloat(offsettime)); - } - } else if ( pageoffset.substring(0, 3) === "id=") { - // annotation - var annotationId = pageoffset.substring( 3 ); - // there's no better way than that because - // of possible race conditions - this._serializer.sync(IriSP.wrap(this, function() { - this.lookupAnnotation.call(this, annotationId); - })); - } - } -}; - -/** handler for the seeked signal. It may have or may have not an argument. - @param time if not undefined, the time we're seeking to -*/ -IriSP.MediaFragment.prototype.updateTime = function(time) { - if (this.mutex === true) { - return; - } - - var history = window.history; - if ( !history.pushState ) { - return false; - } - - if (IriSP.null_or_undefined(time) || typeof(time) != "number") { - var ntime = this._Popcorn.currentTime().toFixed(2) - } else { - var ntime = time.toFixed(2); - } - - // used to relay the new hash to the embedder - this._Popcorn.trigger("IriSP.Mediafragment.hashchange", "#t=" + ntime); - - splitArr = window.location.href.split( "#" ) - history.replaceState( {}, "", splitArr[0] + "#t=" + ntime ); -}; - - -IriSP.MediaFragment.prototype.updateAnnotation = function(annotationId) { - var _this = this; - this.mutex = true; - - var history = window.history; - if ( !history.pushState ) { - return false; - } - - - // used to relay the new hash to the embedder - this._Popcorn.trigger("IriSP.Mediafragment.hashchange", "#id=" + annotationId); - - splitArr = window.location.href.split( "#" ) - history.replaceState( {}, "", splitArr[0] + "#id=" + annotationId); - - - // reset the mutex afterwards to prevent the module from reacting to his own changes. - window.setTimeout(function() { _this.mutex = false }, 50); -}; - -// lookup and seek to the beginning of an annotation -IriSP.MediaFragment.prototype.lookupAnnotation = function(annotationId) { - var _this = this; - this.mutex = true; - - var annotation = undefined; - var annotations = this._serializer._data.annotations; - - var i; - for (i = 0; i < annotations.length; i++) { - if (annotations[i].id === annotationId) { - annotation = annotations[i]; - break; - } - } - - if (typeof(annotation) !== "undefined") { - this._Popcorn.currentTime(annotation.begin / 1000); - - /* we have to trigger this signal manually because of a - bug in the jwplayer */ - this._Popcorn.trigger("seeked", annotation.begin / 1000); - this._Popcorn.trigger("IriSP.Mediafragment.showAnnotation", annotationId); - } - - window.setTimeout(function() { _this.mutex = false }, 50); -}; -IriSP.AnnotationsListWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - this.__counter = 0; - this.__oldList = []; - this.searchRe = null; - this._ajax_cache = []; - var _this = this; - - this._Popcorn.listen("IriSP.search", function(searchString) { - _this.searchHandler(searchString); - }); - this._Popcorn.listen("IriSP.search.closed", function() { - _this.searchHandler(false); - }); - this._Popcorn.listen("IriSP.search.cleared", function() { - _this.searchHandler(false); - }); -}; - - -IriSP.AnnotationsListWidget.prototype = new IriSP.Widget(); - -IriSP.AnnotationsListWidget.prototype.clear = function() { -}; - -IriSP.AnnotationsListWidget.prototype.clearWidget = function() { -}; - -IriSP.AnnotationsListWidget.prototype.searchHandler = function(searchString) { - this.searchRe = (searchString && searchString.length) ? IriSP.regexpFromText(searchString) : null; - if (this.ajax_mode && !this.cinecast_version) { - var _this = this, - _annotations = ( - this.searchRe === null - ? this._ajax_cache - : IriSP.underscore.filter(this._ajax_cache, function(_a) { - return (_this.searchRe.test(_a.desc) || _this.searchRe.test(_a.title)); - }) - ); - this.do_redraw(_annotations); - if (_annotations.length) { - this._Popcorn.trigger("IriSP.search.matchFound"); - } else { - this._Popcorn.trigger("IriSP.search.noMatchFound"); - } - } else { - this.drawList(); - } -} - -/** effectively redraw the widget - called by drawList */ -IriSP.AnnotationsListWidget.prototype.do_redraw = function(list) { - var _html = IriSP.templToHTML( - IriSP.annotationsListWidget_template, { - annotations: list - }), - _this = this; - - this.selector.html(_html); - - this.selector.find('.Ldt-AnnotationsList-Tag-Li').click(function() { - _this._Popcorn.trigger("IriSP.search.triggeredSearch", IriSP.jQuery(this).text().trim()); - }) - - if (this.searchRe !== null) { - this.selector.find(".Ldt-AnnotationsList-Title a, .Ldt-AnnotationsList-Description") - .each(function() { - var _$ = IriSP.jQuery(this); - _$.html(_$.text().trim().replace(_this.searchRe, '$1')) - }) - } -}; - -IriSP.AnnotationsListWidget.prototype.transformAnnotation = function(a) { - var _this = this; - return { - "id" : a.id, - "title": this.cinecast_version ? IriSP.get_aliased(a.meta, ['creator_name', 'creator']) : a.content.title, - "desc" : this.cinecast_version ? a.content.data : a.content.description, - "begin": IriSP.msToTime(a.begin), - "end" : IriSP.msToTime(a.end), - "thumbnail" : (typeof a.meta == "object" && typeof a.meta.thumbnail == "string") ? a.meta.thumbnail : this.default_thumbnail, - "url" : (typeof a.meta == "object" && typeof a.meta.url == "string") ? a.meta.url : null, - "created_at" :(typeof a.meta == "object" && typeof a.meta.created == "string") ? Date.parse(a.meta.created.replace(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}\:\d{2}\:\d{2}).*$/,"$2/$3/$1 $4 UTC+0000")) : null, - "tags": typeof a.tags == "object" - ? IriSP.underscore(a.tags) - .chain() - .map(function(_t) { - if (typeof _t == "string") { - return _t.replace(/^.*:/,'#'); - } else { - if (typeof _t['id-ref'] != "undefined") { - var _f = IriSP.underscore.find(_this._serializer._data.tags, function(_tag) { - return _tag.id == _t['id-ref']; - }); - if (typeof _f != "undefined") { - return IriSP.get_aliased(_f.meta, ['dc:title', 'title']); - } - } - } - return null; - }) - .filter(function(_t) { - return _t !== null && _t !== "" - }) - .value() - : [] - } -} - -/** draw the annotation list */ -IriSP.AnnotationsListWidget.prototype.drawList = function(force_redraw) { - var _this = this; - -// var view_type = this._serializer.getContributions(); - var annotations = this._serializer._data.annotations; - var currentTime = this._Popcorn.currentTime(); - var list = []; - -/* if (typeof(view_type) === "undefined") { - return; -} */ - for (i = 0; i < annotations.length; i++) { - var obj = this.transformAnnotation(annotations[i]); - obj.iterator = i; - obj.distance = Math.abs((annotations[i].end + annotations[i].begin) / 2000 - currentTime); - if (!this.cinecast_version || annotations[i].type == "cinecast:UserAnnotation") { - list.push(obj); - } - - } - - if (this.searchRe !== null) { - list = list.filter(function(_a) { - return (_this.searchRe.test(_a.desc) || _this.searchRe.test(_a.title)); - }); - if (list.length) { - this._Popcorn.trigger("IriSP.search.matchFound"); - } else { - this._Popcorn.trigger("IriSP.search.noMatchFound"); - } - } - list = IriSP.underscore(list) - .chain() - .sortBy(function(_o) { - return _o.distance; - }) - .first(10) - .sortBy(function(_o) { - return (_this.cinecast_version ? - _o.created_at : _o.iterator); - }) - .value(); - var idList = IriSP.underscore.pluck(list, "id").sort(); - - if (!IriSP.underscore.isEqual(this.__oldList, idList) || this.lastSearch !== this.searchRe || typeof(force_redraw) !== "undefined") { - this.do_redraw(list); - this.__oldList = idList; - this.lastSearch = this.searchRe; - } - /* save for next call */ - - -}; - -IriSP.AnnotationsListWidget.prototype.ajaxRedraw = function(timecode) { - - /* the seeked signal sometimes passes an argument - depending on if we're using - our popcorn lookalike or the real thing - if it's the case, use it as it's - more precise than currentTime which sometimes contains the place we where at */ - if (IriSP.null_or_undefined(timecode) || typeof(timecode) != "number") { - var tcode = this._Popcorn.currentTime(); - } else { - var tcode = timecode; - } - - - /* the platform gives us a special url - of the type : http://path/{{media}}/{{begin}}/{{end}} - we double the braces using regexps and we feed it to mustache to build the correct url - we have to do that because the platform only knows at run time what view it's displaying. - */ - - var media_id = this.currentMedia()["id"]; - var duration = this.getDuration(); - - var begin_timecode = (Math.floor(tcode) - 300) * 1000; - if (begin_timecode < 0) - begin_timecode = 0; - - var end_timecode = (Math.floor(tcode) + 300) * 1000; - if (end_timecode > duration) - end_timecode = duration; - - var templ = Mustache.to_html(this.ajax_url, {media: media_id, begin: begin_timecode, - end: end_timecode}); - - /* we create on the fly a serializer to get the ajax */ - var serializer = new IriSP.JSONSerializer(IriSP.__dataloader, templ); - serializer.sync(IriSP.wrap(this, function(json) { this.processJson(json, serializer) })); -}; - -/** process the received json - it's a bit hackish */ -IriSP.AnnotationsListWidget.prototype.processJson = function(json, serializer) { - /* FIXME: DRY the whole thing */ - var annotations = serializer._data.annotations; - if (IriSP.null_or_undefined(annotations)) - return; - - /* - commented in case we wanted to discriminate against some annotation types. - var view_types = serializer.getIds("Contributions"); - */ - var l = []; - - var media = this.currentMedia()["id"]; - - for (i = 0; i < annotations.length; i++) { - var obj = this.transformAnnotation(annotations[i]) - if (typeof obj.url == "undefined" || !obj.url) { - /* only if the annotation isn't present in the document create an - external link */ - if (this.annotations_ids.indexOf(obj.id.toLowerCase()) == -1) { - // braindead url; jacques didn't want to create a new one in the platform, - // so we append the cutting id to the url. - obj.url = this.project_url + "/" + media + "/" + - annotations[i].meta.project + "/" + - annotations[i].meta["id-ref"] + '#id=' + annotations[i].id; - - // obj.url = document.location.href.split("#")[0] + "/" + annotation.meta.project; - } - } - l.push(obj); - } - this._ajax_cache = l; - this.do_redraw(l); -}; -IriSP.AnnotationsListWidget.prototype.draw = function() { - - /* build a table of the annotations present in the document for faster - lookup - */ - this.annotations_ids = IriSP.underscore(this._serializer._data.annotations).map(function(_a) { - return _a.id.toLowerCase(); - }); - - var _this = this; - - if (!this.ajax_mode || this.cinecast_version) { - var _throttled = IriSP.underscore.throttle(function() { - _this.drawList(); - }, 1500); - _throttled(); - this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation", _throttled); - this._Popcorn.listen("timeupdate", _throttled); - if (this.cinecast_version) { - window.setInterval(function() { - var _tmpSerializer = new IriSP.JSONSerializer(IriSP.__dataloader, _this._config.metadata.src, true); - _tmpSerializer.sync(function(json) { - IriSP.underscore(json.annotations).each(function(_a) { - var _j = _this.annotations_ids.indexOf(_a.id); - if (_j == -1) { - _this._serializer._data.annotations.push(_a); - _this.annotations_ids.push(_a.id); - } else { - _this._serializer._data.annotations[_j] = _a; - } - _throttled(); - }); - }, true); // true is for force_refresh - },this.refresh_interval); - } - } else { - /* update the widget when the video has finished loading and when it's seeked and paused */ - this._Popcorn.listen("seeked", IriSP.wrap(this, this.ajaxRedraw)); - this._Popcorn.listen("loadedmetadata", IriSP.wrap(this, this.ajaxRedraw)); - this._Popcorn.listen("paused", IriSP.wrap(this, this.ajaxRedraw)); - - this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation", IriSP.wrap(this, this.ajaxRedraw)); - } - -};/* Internationalization for this widget */ - -IriSP.i18n.addMessages( - { - "fr": { - "keywords": "Mots-clés" - }, - "en": { - "keywords": "Keywords" - } - } -); - -IriSP.AnnotationsWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - /* flag used when we're creating an annotation */ - this._hidden = false; -}; - - -IriSP.AnnotationsWidget.prototype = new IriSP.Widget(); - -IriSP.AnnotationsWidget.prototype.clear = function() { - this.selector.find(".Ldt-SaTitle").text(""); - this.selector.find(".Ldt-SaDescription").text(""); - this.selector.find(".Ldt-SaKeywordText").text(""); -}; - -IriSP.AnnotationsWidget.prototype.displayAnnotation = function(annotation) { - var title = annotation.content.title; - var description = annotation.content.description; - var keywords = ""; - var begin = +annotation.begin / 1000; - var end = +annotation.end / 1000; - var duration = this.getDuration(); - var tags = ""; - - var title_templ = "{{title}} - ( {{begin}} - {{end}} )"; - var endstr = Mustache.to_html(title_templ, {title: title, begin: IriSP.secondsToTime(begin), end: IriSP.secondsToTime(end)}); - - this.selector.find(".Ldt-SaTitle").text(endstr); - this.selector.find(".Ldt-SaDescription").text(description); - - - if (!IriSP.null_or_undefined(annotation.tags) && !IriSP.null_or_undefined(this._serializer._data.tags)) { - /* save the tag id and keywords in a unique structure */ - var tag_list = {}; - for (var i = 0; i < this._serializer._data.tags.length; i++) { - var id = this._serializer._data.tags[i]["id"]; - var keyword = IriSP.get_aliased(this._serializer._data.tags[i]["meta"], ["dc:title", "title"]); - - tag_list[id] = keyword; - } - - /* then browse the list of defined tags for the current annotation */ - for (var i = 0; i < annotation.tags.length; i++) { - if (tag_list.hasOwnProperty(annotation.tags[i]["id-ref"])) - tags += tag_list[annotation.tags[i]["id-ref"]] + ", "; - } - } - - tags = IriSP.i18n.getMessage("keywords") + ": " + tags.slice(0, tags.length - 2); - - this.selector.find(".Ldt-SaKeywords").text(tags); - - // update sharing buttons - var url = document.location.href + "#id=" + annotation.id; - this.selector.find(".Ldt-fbShare").attr("href", IriSP.mkFbUrl(url, this.share_text)); - this.selector.find(".Ldt-TwShare").attr("href", IriSP.mkTweetUrl(url, this.share_text)); - this.selector.find(".Ldt-GplusShare").attr("href", IriSP.mkGplusUrl(url, this.share_text)); -}; - -IriSP.AnnotationsWidget.prototype.clearWidget = function() { - /* retract the pane between two annotations */ - this.selector.find(".Ldt-SaTitle").text(""); - this.selector.find(".Ldt-SaDescription").text(""); - this.selector.find(".Ldt-SaKeywordText").html(""); - this.selector.find(".Ldt-ShowAnnotation").slideUp(); -}; - -IriSP.AnnotationsWidget.prototype.draw = function() { - var _this = this; - - var annotationMarkup = IriSP.templToHTML(IriSP.annotationWidget_template); - this.selector.append(annotationMarkup); - - this._Popcorn.listen("IriSP.AnnotationsWidget.show", - IriSP.wrap(this, this.show)); - this._Popcorn.listen("IriSP.AnnotationsWidget.hide", - IriSP.wrap(this, this.hide)); - - var legal_ids = []; - if (typeof(this._serializer.getChapitrage()) !== "undefined") - legal_ids.push(this._serializer.getChapitrage()); - else - legal_ids = this._serializer.getNonTweetIds(); - - var annotations = this._serializer._data.annotations; - var i; - - for (i in annotations) { - var annotation = annotations[i]; - var begin = Math.round((+ annotation.begin) / 1000); - var end = Math.round((+ annotation.end) / 1000); - - if (typeof(annotation.meta) !== "undefined" && typeof(annotation.meta["id-ref"]) !== "undefined" - && !IriSP.underscore.include(legal_ids, annotation.meta["id-ref"])) { - continue; - } - - - var conf = {start: begin, end: end, - onStart: - function(annotation) { - return function() { - _this.displayAnnotation(annotation); - - } }(annotation), - onEnd: - function() { _this.clearWidget.call(_this); } - }; - this._Popcorn = this._Popcorn.code(conf); - } - -}; - -IriSP.AnnotationsWidget.prototype.hide = function() { - if (this._hidden == false) { - this.selector.hide(); - this._hidden = true; - } -}; - -IriSP.AnnotationsWidget.prototype.show = function() { - if (this._hidden == true) { - this.selector.show(); - this._hidden = false; - } -};IriSP.ArrowWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - - this._oldAnnotation = null; - this._blockArrow = false; -}; - - -IriSP.ArrowWidget.prototype = new IriSP.Widget(); - -IriSP.ArrowWidget.prototype.clear = function() { - -}; - -IriSP.ArrowWidget.prototype.clearWidget = function() { -}; - -IriSP.ArrowWidget.prototype.draw = function() { - var templ = Mustache.to_html(IriSP.arrowWidget_template, {}); - this.selector.append(templ); - this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.timeUpdateHandler)); - this._Popcorn.listen("IriSP.ArrowWidget.blockArrow", IriSP.wrap(this, this.blockArrow)); - this._Popcorn.listen("IriSP.ArrowWidget.releaseArrow", IriSP.wrap(this, this.releaseArrow)); - -}; - -IriSP.ArrowWidget.prototype.timeUpdateHandler = function(percents) { - if (this._blockArrow) - return; - - var currentTime = this._Popcorn.currentTime(); - var currentAnnotation = this._serializer.currentChapitre(currentTime); - if (IriSP.null_or_undefined(currentAnnotation)) { - var c_annots = this._serializer.currentAnnotation(currentTime) - if (c_annots.length != 0) - var currentAnnotation = c_annots[0]; // FIXME : use the others ? - else - return; - } - - /* move the arrow only if the current annotation changes */ - if (currentAnnotation != this._oldAnnotation) { - var begin = (+ currentAnnotation.begin) / 1000; - var end = (+ currentAnnotation.end) / 1000; - - var duration = this.getDuration() / 1000; - var middle_time = (begin + end) / 2; - var percents = middle_time / duration; - - // we need to apply a fix because the arrow has a certain length - // it's half the length of the arrow (27 / 2). We need to convert - // it in percents though. - var totalWidth = this.selector.width(); - var pixels = percents * totalWidth; - var correction = (27 / 2); - var corrected_pixels = pixels - correction; - - /* make sure that the arrow is aligned with the pattern - of the widget under it */ - if (corrected_pixels % 3 != 0) - corrected_pixels -= (corrected_pixels % 3 - 1); - - /* don't move out of the screen */ - if (corrected_pixels <= 0) - corrected_pixels = 0; - - if (corrected_pixels <= 15) { - this.selector.children(".Ldt-arrowWidget").removeClass("Ldt-arrowLeftEdge Ldt-arrowCenter Ldt-arrowRightEdge") - .addClass("Ldt-arrowLeftEdge"); - } else if (corrected_pixels >= totalWidth - 25) { - this.selector.children(".Ldt-arrowWidget").removeClass("Ldt-arrowLeftEdge Ldt-arrowCenter Ldt-arrowRightEdge") - .addClass("Ldt-arrowRightEdge"); - } else { - this.selector.children(".Ldt-arrowWidget").removeClass("Ldt-arrowLeftEdge Ldt-arrowCenter Ldt-arrowRightEdge") - .addClass("Ldt-arrowCenter"); - } - - this.selector.children(".Ldt-arrowWidget").animate({"left" : corrected_pixels + "px"}); - - this._oldAnnotation = currentAnnotation; - } -}; - -/** Block the arrow for instance when the user is annotating */ -IriSP.ArrowWidget.prototype.blockArrow = function() { - this._blockArrow = true; -}; - -IriSP.ArrowWidget.prototype.releaseArrow = function() { - this._blockArrow = false; -}; -/* Internationalization for this widget */ - -IriSP.i18n.addMessages( - { - "en": { - "submit": "Submit", - "add_keywords": "Add keywords", - "add_polemic_keywords": "Add polemic keywords", - "your_name": "Your name", - "type_here": "Type your annotation here.", - "wait_while_processed": "Please wait while your request is being processed...", - "error_while_contacting": "An error happened while contacting the server. Your annotation has not been saved.", - "empty_annotation": "Your annotation is empty. Please write something before submitting.", - "annotation_saved": "Thank you, your annotation has been saved.", - "share_annotation": "Would you like to share it on social networks ?", - "share_on": "Share on", - "more_tags": "More tags" - }, - "fr": { - "submit": "Envoyer", - "add_keywords": "Ajouter des mots-clés", - "add_polemic_keywords": "Ajouter des mots-clés polémiques", - "your_name": "Votre nom", - "type_here": "Rédigez votre annotation ici.", - "wait_while_processed": "Veuillez patienter pendant le traitement de votre requête...", - "error_while_contacting": "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée", - "empty_annotation": "Votre annotation est vide. Merci de rédiger un texte avant de l'envoyer.", - "annotation_saved": "Merci, votre annotation a été enregistrée.", - "share_annotation": "Souhaitez-vous la partager sur les réseaux sociaux ?", - "share_on": "Partager sur", - "more_tags": "Plus de mots-clés" - } - } -); - -IriSP.createAnnotationWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - this._hidden = true; - - if (!IriSP.null_or_undefined(IriSP.user)) { - if (!IriSP.null_or_undefined(IriSP.user.avatar)) { - this.user_avatar = IriSP.user.avatar; - } - if (!IriSP.null_or_undefined(IriSP.user.name)) { - this.user_name = IriSP.user.name; - } - } - - /* variables to save the current position of the slicer */ - if (this.cinecast_version) { - this.sliceLeft = 0; - this.sliceWidth = 0; - } -}; - - -IriSP.createAnnotationWidget.prototype = new IriSP.Widget(); - -IriSP.createAnnotationWidget.prototype.clear = function() { - this.selector.find(".Ldt-SaTitle").text(""); - this.selector.find(".Ldt-SaDescription").text(""); - this.selector.find(".Ldt-SaKeywordText").text(""); -}; - -IriSP.createAnnotationWidget.prototype.draw = function() { - var _this = this; - if (typeof this.remote_tags == "object") { - IriSP.jQuery.getJSON((typeof this.remote_tags.alias == "string" ? this.remote_tags.alias : this.remote_tags.url), function(_json) { - _this.tags = _json.tags; - _this.drawCallback(); - }); - } else { - this.drawCallback(); - } -} - -IriSP.createAnnotationWidget.prototype.drawCallback = function() { - var _this = this; - - var annotationMarkup = IriSP.templToHTML(IriSP.createAnnotationWidget_template, - this); - - this.selector.append(annotationMarkup); - - if (!this.cinecast_version) - this.selector.hide(); - else { - this.showStartScreen(); - } - - if (this.random_tags) { - this.selector.find(".Ldt-createAnnotation-keywords li").hide(); - this.showMoreTags(); - this.selector.find('.Ldt-createAnnotation-moar-keywordz').click(function() { - _this.showMoreTags(); - }) - } - // Add onclick event to both polemic and keywords buttons - - this.selector.find(".Ldt-createAnnotation-keyword-button, .Ldt-createAnnotation-polemic-button").click(function() { - _this.addKeyword(IriSP.jQuery(this).text()); - return false; - }); - - // js_mod is a custom event because there's no simple way to test for a js - // change in a textfield. - this.selector.find(".Ldt-createAnnotation-Description") - .bind("propertychange keyup input paste click js_mod", IriSP.wrap(this, this.handleTextChanges)); - - /* the cinecast version of the player is supposed to pause when the user clicks on the button */ - - /* the cinecast version expects the user to comment on a defined segment. - As the widget is always shown, we need a way to update it's content as - time passes. We do this like we did with the annotationsWidget : we schedule - a .code start function which will be called at the right time. - */ - if (this.cinecast_version) { - var legal_ids; - if (typeof(this._serializer.getChapitrage()) !== "undefined") - legal_id = this._serializer.getChapitrage(); - else - legal_id = this._serializer.getNonTweetIds()[0]; - - var annotations = this._serializer._data.annotations; - var i; - - for (i in annotations) { - var annotation = annotations[i]; - if (typeof(annotation.meta) !== "undefined" && typeof(annotation.meta["id-ref"]) !== "undefined" - && legal_id !== annotation.meta["id-ref"]) { - continue; - } - - code = {start: annotation.begin / 1000, end: annotation.end / 1000, - onStart: function(annotation) { return function() { - if (typeof(annotation.content) !== "undefined") - _this.selector.find(".Ldt-createAnnotation-Title").html(annotation.content.title); - - _this._currentAnnotation = annotation; - var beginTime = IriSP.msToTime(annotation.begin); - var endTime = IriSP.msToTime(annotation.end); - var timeTemplate = IriSP.templToHTML("- ({{begin}} - {{ end }})", {begin: beginTime, end: endTime }); - _this.selector.find(".Ldt-createAnnotation-TimeFrame").html(timeTemplate); - } }(annotation) - }; - - this._Popcorn.code(code); - } - } - - this.selector.find(".Ldt-createAnnotation-submitButton").click(IriSP.wrap(this, this.handleButtonClick)); - - if (!this.cinecast_version) { - this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", - IriSP.wrap(this, this.handleAnnotateSignal)); - - // handle clicks on the cancel button too. - this.selector.find(".Ldt-createAnnotation-Minimize").click(IriSP.wrap(this, - function() { - // we've got to simulate the pressing of the button because there's no - // other way to minimize the widget and show the widgets that were hidden - // same time - this._Popcorn.trigger("IriSP.PlayerWidget.AnnotateButton.clicked"); - } - )); - } -}; - -IriSP.createAnnotationWidget.prototype.showMoreTags = function() { - for (var j=0; j < this.random_tags; j++) { - var _jq = this.selector.find(".Ldt-createAnnotation-keywords li:hidden"); - if (_jq.length > 1) { - IriSP.jQuery(_jq[Math.floor(_jq.length*Math.random())]).show(); - } else { - _jq.show(); - break; - } - } - if (this.selector.find(".Ldt-createAnnotation-keywords li:hidden").length == 0) { - this.selector.find('.Ldt-createAnnotation-moar-keywordz').hide(); - } -} - -/* Handles adding keywords and polemics */ -IriSP.createAnnotationWidget.prototype.addKeyword = function(_keyword) { - var _field = this.selector.find(".Ldt-createAnnotation-Description"), - _rx = IriSP.regexpFromText(_keyword), - _contents = _field.val(); - _contents = ( _rx.test(_contents) - ? _contents.replace(_rx,"").replace(" "," ").trim() - : _contents.trim() + " " + _keyword - ); - _field.val(_contents.trim()).trigger("js_mod"); -} - -/** handles clicks on the annotate button. Works only for the non-cinecast version */ -IriSP.createAnnotationWidget.prototype.handleAnnotateSignal = function() { - - if (this._hidden == false && this._state == 'startScreen') { - this.selector.hide(); - this._hidden = true; - - // free the arrow. - this._Popcorn.trigger("IriSP.ArrowWidget.releaseArrow"); - this._Popcorn.trigger("IriSP.SliceWidget.hide"); - this._Popcorn.trigger("IriSP.AnnotationsWidget.show"); - - } else { - this._Popcorn.trigger("IriSP.AnnotationsWidget.hide"); - this.showStartScreen(); - this.selector.show(); - this._hidden = false; - var currentTime = this._Popcorn.currentTime(); - - // block the arrow. - this._Popcorn.trigger("IriSP.ArrowWidget.blockArrow"); - - var duration = this.getDuration(); - - var currentChapter = this._serializer.currentChapitre(currentTime); - - if (IriSP.null_or_undefined(currentChapter)) { - var left = this.selector.width() / 2; - var width = this.selector.width() / 10; - } else { - var left = (currentChapter.begin / duration) * this.selector.width(); - var width = (currentChapter.end / duration) * this.selector.width() - left; - } - - // slider position and length is kept in percents. - this.sliceLeft = (left / this.selector.width()) * 100; - this.sliceWidth = (width / this.selector.width()) * 100; - - this._Popcorn.trigger("IriSP.SliceWidget.position", [left, width]); - this._Popcorn.listen("IriSP.SliceWidget.zoneChange", IriSP.wrap(this, this.handleSliderChanges)); - this._Popcorn.trigger("IriSP.SliceWidget.show"); - - if (!IriSP.null_or_undefined(currentChapter)) { - this.selector.find(".Ldt-createAnnotation-Title").html(currentChapter.content.title); - - this._currentcurrentChapter = currentChapter; - var beginTime = IriSP.msToTime(currentChapter.begin); - var endTime = IriSP.msToTime(currentChapter.end); - var timeTemplate = IriSP.templToHTML("- ({{begin}} - {{ end }})", {begin: beginTime, end: endTime }); - this.selector.find(".Ldt-createAnnotation-TimeFrame").html(timeTemplate); - } - } -}; - - -/** watch for changes in the textfield and change the buttons accordingly */ -IriSP.createAnnotationWidget.prototype.handleTextChanges = function(event) { - var contents = this.selector.find(".Ldt-createAnnotation-Description").val(); - if (this.cinecast_version) { - this._Popcorn.pause(); - } - this.selector.find(".Ldt-createAnnotation-btnblock button").each(function() { - var _rx = IriSP.regexpFromText(IriSP.jQuery(this).text()); - if (_rx.test(contents)) { - IriSP.jQuery(this).parent().addClass("Ldt-createAnnotation-active-button"); - } else { - IriSP.jQuery(this).parent().removeClass("Ldt-createAnnotation-active-button"); - } - }); - -}; - -IriSP.createAnnotationWidget.prototype.showStartScreen = function() { - this.selector.find(".Ldt-createAnnotation-screen").hide(); - this.selector.find(".Ldt-createAnnotation-startScreen").show(); - - var jqTextfield = this.selector.find(".Ldt-createAnnotation-Description"); // handle on the textfield. used for the closure - - /* test if the browser supports the placeholder attribute */ - if (!IriSP.null_or_undefined(jqTextfield.get(0).placeholder)) { - jqTextfield.attr("placeholder", IriSP.i18n.getMessage('type_here')); - } else { - jqTextfield.val(IriSP.i18n.getMessage('type_here')); - jqTextfield.one("click", IriSP.wrap(this, function() { jqTextfield.val(""); })); - } - - - - this._state = "startScreen"; -}; - -IriSP.createAnnotationWidget.prototype.showWaitScreen = function() { - this.selector.find(".Ldt-createAnnotation-screen").hide(); - this.selector.find(".Ldt-createAnnotation-waitScreen").show(); - this._state = "waitScreen"; -}; - -IriSP.createAnnotationWidget.prototype.showErrorScreen = function() { - this.selector.find(".Ldt-createAnnotation-screen").hide(); - this.selector.find(".Ldt-createAnnotation-errorScreen").show(); - this._state = "errorScreen"; - var _this = this; - window.setTimeout(function() { _this.showStartScreen(); }, 2000); -}; - -/** update show the final screen with links to share the created annotation */ -IriSP.createAnnotationWidget.prototype.showEndScreen = function(annotation) { - this.selector.find(".Ldt-createAnnotation-screen").hide(); - - if (this.cinecast_version) { - this.selector.find(".Ldt-createAnnotation-Title").parent().show(); - } - - var url = ( (typeof annotation.meta == "object" && typeof annotation.meta.url == "string" && annotation.meta.url.length) - ? annotation.meta.url - : ( document.location.href + "#id=" + annotation.id ) ); - var twStatus = IriSP.mkTweetUrl(url); - var gpStatus = IriSP.mkGplusUrl(url); - var fbStatus = IriSP.mkFbUrl(url); - - this.selector.find(".Ldt-createAnnotation-endScreen-TweetLink").attr("href", twStatus); - this.selector.find(".Ldt-createAnnotation-endScreen-FbLink").attr("href", fbStatus); - this.selector.find(".Ldt-createAnnotation-endScreen-GplusLink").attr("href", gpStatus); - - this.selector.find(".Ldt-createAnnotation-endScreen").show(); - this._state = "endScreen"; -}; - -/** handle clicks on "send annotation" button */ -IriSP.createAnnotationWidget.prototype.handleButtonClick = function(event) { - var _this = this; - var textfield = this.selector.find(".Ldt-createAnnotation-Description"); - var contents = textfield.val(); - - if (contents === "") { - if (this.selector.find(".Ldt-createAnnotation-errorMessage").length === 0) { - this.selector.find(".Ldt-createAnnotation-Container") - .after(IriSP.templToHTML(IriSP.createAnnotation_errorMessage_template)); - textfield.css("background-color", "#d93c71"); - } else { - this.selector.find(".Ldt-createAnnotation-errorMessage").show(); - } - - textfield.one("js_mod propertychange keyup input paste", IriSP.wrap(this, function() { - var contents = textfield.val(); - - if (contents !== "") { - this.selector.find(".Ldt-createAnnotation-errorMessage").hide(); - textfield.css("background-color", ""); - } - })); - } else { - this.showWaitScreen(); - - this.sendLdtData(contents, function(annotation) { - if (_this.cinecast_version) { - if (_this._Popcorn.media.paused) - _this._Popcorn.play(); - } - - if (_this._state == "waitScreen") { - _this.showEndScreen(annotation); - if (_this.cinecast_version) { - window.setTimeout(function() { _this.showStartScreen(); }, 5000); - } - } - // hide the slicer widget - if (!_this.cinecast_version) { - _this._Popcorn.trigger("IriSP.SliceWidget.hide"); - } - }); - } -}; - -IriSP.createAnnotationWidget.prototype.handleSliderChanges = function(params) { - this.sliceLeft = params[0]; - this.sliceWidth = params[1]; -}; - -IriSP.createAnnotationWidget.prototype.sendLdtData = function(contents, callback) { - var _this = this; - var apiJson = { - format : "http://advene.org/ns/cinelab/", - annotations : [ - {} - ], - meta: {}}; - var annotation = apiJson.annotations[0]; - - annotation.media = this.currentMedia()["id"]; - - if (this.cinecast_version) { - annotation.begin = Math.round(this._Popcorn.currentTime() * 1000); - annotation.end = annotation.begin; - } else { - var duration = this.getDuration(); - annotation.begin = +((duration * (this.sliceLeft / 100)).toFixed(0)); - annotation.end = +((duration * ((this.sliceWidth + this.sliceLeft) / 100)).toFixed(0)); - } - - // boundary checks - annotation.begin = Math.max(0, annotation.begin); - annotation.end = Math.min(this.getDuration(), annotation.end); - - annotation.type = ( this.cinecast_version ? "cinecast:UserAnnotation" : ( this._serializer.getContributions() || "" )); - if (typeof(annotation.type) === "undefined") - annotation.type = ""; - - annotation.type_title = "Contributions"; - annotation.content = {}; - annotation.content.data = contents; - if (this.cinecast_version) { - var _extract = IriSP.underscore(this._serializer._data.annotations) - .filter(function(_a) { - return (_a.begin <= annotation.begin && _a.end >= annotation.begin && _a.type == "cinecast:MovieExtract"); - }) - if (_extract.length) { - annotation.extract = _extract[0].id; - } - } - - var meta = apiJson.meta; - - - var _username = this.selector.find(".Ldt-createAnnotation-userName").val(); - meta.creator = ( - (_username && _username.length) - ? _username - : ( - (!IriSP.null_or_undefined(IriSP.user) && !IriSP.null_or_undefined(IriSP.user.name)) - ? IriSP.user.name - : "Anonymous user" - ) - ); - - meta.created = Date().toString(); - - var _tags = []; - IriSP._(this.tags).each(function(_v) { - var _rx = IriSP.regexpFromText(_v.meta.description); - if (_rx.test(contents)) { - _tags.push(_v.id); - } - }); - - if (typeof this.remote_tags == "object") { - _tags = IriSP._(_tags).map(function(_t) { - return _this.remote_tags.id + ':' + _t - }); - if (typeof apiJson.imports == "undefined") { - apiJson.imports = []; - } - apiJson.imports.push({ - "id" : this.remote_tags.id, - "url" : this.remote_tags.url - }) - } - annotation.tags = IriSP.underscore.uniq(_tags); - - var jsonString = JSON.stringify(apiJson); - var project_id = this._serializer._data.meta.id; - - //TODO: extract magic url - var url = Mustache.to_html(this.api_endpoint_template, - {id: project_id}); - - IriSP.jQuery.ajax({ - url: url, - type: this.api_method, - contentType: 'application/json', - data: jsonString, - //dataType: 'json', - success: IriSP.wrap(this, function(json, textStatus, XMLHttpRequest) { - /* add the annotation to the annotation and tell the world */ - var annotation = json.annotations[0]; - - if (!this.cinecast_version) { - /* if the media doesn't have a contributions line, we need to add one */ - if (typeof(this._serializer.getContributions()) === "undefined") { - /* set up a basic view */ - var tmp_view = {"dc:contributor": "perso", "dc:creator": "perso", "dc:title": "Contributions", - "id": json.annotations[0].type} - - - IriSP.get_aliased(this._serializer._data, ["annotation_types", "annotation-types"]).push(tmp_view); - } - - delete annotation.tags; - annotation.content.description = annotation.content.data; - annotation.content.title = ""; - delete annotation.content.data; - annotation.id = json.annotations[0].id; - - annotation.meta = meta; - annotation.meta["id-ref"] = json.annotations[0]["type"]; - } else { - annotation.type = "cinecast:UserAnnotation"; - } - annotation.is_new = true; - // everything is shared so there's no need to propagate the change - _this._serializer._data.annotations.push(annotation); - _this._Popcorn.trigger("IriSP.createAnnotationWidget.addedAnnotation", annotation); - this.selector.find(".Ldt-createAnnotation-Description").val("").trigger("js_mod"); - callback(annotation); - }), - error: - function(jqXHR, textStatus, errorThrown) { - console.log("an error occured while contacting " - + url + " and sending " + jsonString + textStatus ); - _this.showErrorScreen(); } }); -};IriSP.HelloWorldWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); -} - -IriSP.HelloWorldWidget.prototype = new IriSP.Widget(); - -IriSP.HelloWorldWidget.prototype.draw = function() { - this.selector - .html('Hello, world') - .css({ - "text-align" : "center", - "padding": "10px 0", - "font-size" : "14px" - }); - - console.log(this); -} -/* Internationalization for this widget */ - -IriSP.i18n.addMessages( - { - "en": { - "play_pause": "Play/Pause", - "mute_unmute": "Mute/Unmute", - "play": "Play", - "pause": "Pause", - "mute": "Mute", - "unmute": "Unmute", - "annotate": "Annotate", - "search": "Search", - "elapsed_time": "Elapsed time", - "total_time": "Total time", - "volume": "Volume", - "volume_control": "Volume control" - }, - "fr": { - "play_pause": "Lecture/Pause", - "mute_unmute": "Couper/Activer le son", - "play": "Lecture", - "pause": "Pause", - "mute": "Couper le son", - "unmute": "Activer le son", - "annotate": "Annoter", - "search": "Rechercher", - "elapsed_time": "Durée écoulée", - "total_time": "Durée totale", - "volume": "Niveau sonore", - "volume_control": "Réglage du niveau sonore" - } - } -); - - -IriSP.PlayerWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - - this._searchBlockOpen = false; - this._searchLastValue = ""; -}; - -IriSP.PlayerWidget.prototype = new IriSP.Widget(); - -IriSP.PlayerWidget.prototype.draw = function() { - var self = this; - var width = this.width; - var height = this.height; - var heightS = this.height-20; - - var playerTempl = IriSP.templToHTML(IriSP.player_template, this._config); - this.selector.append(playerTempl); - - this.selector.children(".Ldt-controler").show(); - - // handle clicks by the user on the video. - this._Popcorn.listen("play", IriSP.wrap(this, this.playButtonUpdater)); - this._Popcorn.listen("pause", IriSP.wrap(this, this.playButtonUpdater)); - - this._Popcorn.listen("volumechange", IriSP.wrap(this, this.volumeUpdater)); - - this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.timeDisplayUpdater)); - // update the time display for the first time. - this._Popcorn.listen("loadedmetadata", IriSP.wrap(this, this.timeDisplayUpdater)); - - this._Popcorn.listen("IriSP.search.matchFound", IriSP.wrap(this, this.searchMatch)); - this._Popcorn.listen("IriSP.search.noMatchFound", IriSP.wrap(this, this.searchNoMatch)); - this._Popcorn.listen("IriSP.search.triggeredSearch", IriSP.wrap(this, this.triggeredSearch)); - - - this.selector.find(".Ldt-CtrlPlay").click(function() { self.playHandler.call(self); }); - this.selector.find(".Ldt-CtrlAnnotate").click(function() - { self._Popcorn.trigger("IriSP.PlayerWidget.AnnotateButton.clicked"); }); - this.selector.find(".Ldt-CtrlSearch").click(function() { self.searchButtonHandler.call(self); }); - - var _volctrl = this.selector.find(".Ldt-Ctrl-Volume-Control"); - this.selector.find('.Ldt-CtrlSound') - .click(function() { self.muteHandler.call(self); } ) - .mouseover(function() { - _volctrl.show(); - }) - .mouseout(function() { - _volctrl.hide(); - }); - _volctrl.mouseover(function() { - _volctrl.show(); - }).mouseout(function() { - _volctrl.hide(); - }); - - /* - var searchButtonPos = this.selector.find(".Ldt-CtrlSearch").position(); - var searchBox = Mustache.to_html(IriSP.search_template, {margin_left : searchButtonPos.left + "px"}); - this.selector.find(".Ldt-CtrlSearch").after(searchBox); - */ - - // trigger an IriSP.PlayerWidget.MouseOver to the widgets that are interested (i.e : sliderWidget) - this.selector.hover(function() { self._Popcorn.trigger("IriSP.PlayerWidget.MouseOver"); }, - function() { self._Popcorn.trigger("IriSP.PlayerWidget.MouseOut"); }); - this.selector.find(".Ldt-Ctrl-Volume-Cursor").draggable({ - axis: "x", - drag: function(event, ui) { - var _vol = Math.max(0, Math.min( 1, ui.position.left / (ui.helper.parent().width() - ui.helper.outerWidth()))); - ui.helper.attr("title",IriSP.i18n.getMessage('volume')+': ' + Math.floor(100*_vol) + '%'); - self._Popcorn.volume(_vol); - }, - containment: "parent" - }); - - setTimeout(function() { - self.volumeUpdater(); - }, 1000); /* some player - jwplayer notable - save the state of the mute button between sessions */ -}; - -/* Update the elasped time div */ -IriSP.PlayerWidget.prototype.timeDisplayUpdater = function() { - - if (this._previousSecond === undefined) { - this._previousSecond = this._Popcorn.roundTime(); - } - else { - /* we're still in the same second, so it's not necessary to update time */ - if (this._Popcorn.roundTime() == this._previousSecond) - return; - - } - - // we get it at each call because it may change. - var duration = this.getDuration() / 1000; - var totalTime = IriSP.secondsToTime(duration); - var elapsedTime = IriSP.secondsToTime(this._Popcorn.currentTime()); - - this.selector.find(".Ldt-ElapsedTime").html(elapsedTime.toString()); - this.selector.find(".Ldt-TotalTime").html(totalTime.toString()); - this._previousSecond = this._Popcorn.roundTime(); -}; - -/* update the icon of the button - separate function from playHandler - because in some cases (for instance, when the user directly clicks on - the jwplayer window) we have to change the icon without playing/pausing -*/ -IriSP.PlayerWidget.prototype.playButtonUpdater = function() { - var status = this._Popcorn.media.paused; - - if ( status == true ){ - /* the background sprite is changed by adding/removing the correct classes */ - this.selector.find(".Ldt-CtrlPlay").attr("title", IriSP.i18n.getMessage('play')); - this.selector.find(".Ldt-CtrlPlay").removeClass("Ldt-CtrlPlay-PauseState").addClass("Ldt-CtrlPlay-PlayState"); - } else { - this.selector.find(".Ldt-CtrlPlay").attr("title", IriSP.i18n.getMessage('pause')); - this.selector.find(".Ldt-CtrlPlay").removeClass("Ldt-CtrlPlay-PlayState").addClass("Ldt-CtrlPlay-PauseState"); - } - - return; -}; - - -IriSP.PlayerWidget.prototype.playHandler = function() { - var status = this._Popcorn.media.paused; - - if ( status == true ){ - this._Popcorn.play(); - } else { - this._Popcorn.pause(); - } -}; - -IriSP.PlayerWidget.prototype.muteHandler = function() { - this._Popcorn.mute(!this._Popcorn.muted()); -}; - -IriSP.PlayerWidget.prototype.volumeUpdater = function() { - var _muted = this._Popcorn.muted(), - _vol = this._Popcorn.volume(); - if (_vol === false) { - _vol = .5; - } - var _soundCtl = this.selector.find(".Ldt-CtrlSound"); - _soundCtl.removeClass("Ldt-CtrlSound-Mute Ldt-CtrlSound-Half Ldt-CtrlSound-Full"); - if (_muted) { - _soundCtl.attr("title", IriSP.i18n.getMessage('unmute')) - .addClass("Ldt-CtrlSound-Mute"); - } else { - _soundCtl.attr("title", IriSP.i18n.getMessage('mute')) - .addClass(_vol < .5 ? "Ldt-CtrlSound-Half" : "Ldt-CtrlSound-Full" ) - } - var _cursor = this.selector.find(".Ldt-Ctrl-Volume-Cursor"); - _cursor.css({ - "left": ( _muted ? 0 : Math.floor(_vol * (_cursor.parent().width() - _cursor.outerWidth())) ) + "px" - }) -}; - -IriSP.PlayerWidget.prototype.showSearchBlock = function() { - var self = this; - - if (this._searchBlockOpen == false) { - this.selector.find(".LdtSearch").show("blind", { direction: "horizontal"}, 100); - this.selector.find(".LdtSearchInput").css('background-color','#fff'); - - this._searchBlockOpen = true; - this.selector.find(".LdtSearchInput").bind('keyup', null, function() { self.searchHandler.call(self); } ); - this.selector.find(".LdtSearchInput").focus(); - - // we need this variable because some widget can find a match in - // their data while at the same time other's don't. As we want the - // search field to become green when there's a match, we need a - // variable to remember that we had one. - this._positiveMatch = false; - - // tell the world the field is open - this._Popcorn.trigger("IriSP.search.open"); - } -}; - -IriSP.PlayerWidget.prototype.hideSearchBlock = function() { - if (this._searchBlockOpen == true) { - this._searchLastValue = this.selector.find(".LdtSearchInput").attr('value'); - this.selector.find(".LdtSearchInput").attr('value',''); - this.selector.find(".LdtSearch").hide("blind", { direction: "horizontal"}, 75); - - // unbind the watcher event. - this.selector.find(".LdtSearchInput").unbind('keypress set'); - this._searchBlockOpen = false; - - this._positiveMatch = false; - - this._Popcorn.trigger("IriSP.search.closed"); - } -}; - -/** react to clicks on the search button */ -IriSP.PlayerWidget.prototype.searchButtonHandler = function() { - var self = this; - - /* show the search field if it is not shown */ - if ( this._searchBlockOpen == false ) { - this.showSearchBlock(); - this.selector.find(".LdtSearchInput").attr('value', this._searchLastValue); - this._Popcorn.trigger("IriSP.search", this._searchLastValue); // trigger the search to make it more natural. - } else { - this.hideSearchBlock(); - } -}; - -/** this handler is called whenever the content of the search - field changes */ -IriSP.PlayerWidget.prototype.searchHandler = function() { - this._searchLastValue = this.selector.find(".LdtSearchInput").attr('value'); - this._positiveMatch = false; - - // do nothing if the search field is empty, instead of highlighting everything. - if (this._searchLastValue == "") { - this._Popcorn.trigger("IriSP.search.cleared"); - this.selector.find(".LdtSearchInput").css('background-color',''); - } else { - this._Popcorn.trigger("IriSP.search", this._searchLastValue); - } -}; - -/** - handler for the IriSP.search.found message, which is sent by some views when they - highlight a match. -*/ -IriSP.PlayerWidget.prototype.searchMatch = function() { - this._positiveMatch = true; - this.selector.find(".LdtSearchInput").css('background-color','#e1ffe1'); -}; - -/** the same, except that no value could be found */ -IriSP.PlayerWidget.prototype.searchNoMatch = function() { - if (this._positiveMatch !== true) - this.selector.find(".LdtSearchInput").css('background-color', "#d62e3a"); -}; - -/** react to an IriSP.Player.triggeredSearch - that is, when - a widget ask the PlayerWidget to do a search on his behalf */ -IriSP.PlayerWidget.prototype.triggeredSearch = function(searchString) { - this.showSearchBlock(); - this.selector.find(".LdtSearchInput").attr('value', searchString); - this._Popcorn.trigger("IriSP.search", searchString); // trigger the search to make it more natural. -}; - - -/* - * - * Copyright 2010 Institut de recherche et d'innovation - * contributor(s) : Samuel Huron - * - * contact@iri.centrepompidou.fr - * http://www.iri.centrepompidou.fr - * - * This software is a computer program whose purpose is to show and add annotations on a video . - * This software is governed by the CeCILL-C license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL-C - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL-C license and that you accept its terms. -*/ -// CHART TIMELINE / VERSION PROTOTYPE :: - -/** the polemic widget */ -IriSP.PolemicWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - - this.userPol = new Array(); - this.userNoPol = new Array(); - this.userst = new Array(); - this.numberOfTweet = 0; - this.Users; - this.TweetPolemic; - this.yMax = this.height; - this.PaperSlider; - this.heightOfChart; - this.tweets = new Array(); - this.svgElements = {}; - - this.oldSearchMatches = []; -}; - -IriSP.PolemicWidget.prototype = new IriSP.Widget(); - -IriSP.PolemicWidget.prototype.draw = function() { - - // variable - // yMax - - var self = this; - var yCoef = 2; // coef for height of 1 tweet - var frameSize = 5; // frame size - var margin = 1; // marge between frame - var lineSize = this.width; // timeline pixel width - var nbrframes = lineSize/frameSize; // frame numbers - var numberOfTweet = 0; // number of tweet overide later - var duration = this.getDuration(); // timescale width - var frameLength = lineSize / frameSize; // frame timescale - var timeline; - var colors = new Array("","#1D973D","#036AAE","#CE0A15","#C5A62D","#585858"); - - // array - //var tweets = new Array(); - var element = new Array(); - var cluster = new Array(); - var frames = new Array(frameLength); - var slices = new Array(); - - - // Classes ======================================================================= - var Frames = function(){ - - var Myclusters; - var x; - var y; - var width; - var height; - }; - Frames = function(json){ - // make my clusters - // ou Frame vide - }; - Frames.prototype.draw = function(){ - }; - Frames.prototype.zoom = function(){ - }; - Frames.prototype.inside = function(){ - }; - var Clusters = function(){ - var Object; - var yDist; - var x; - var y; - var width; - var height; - }; - Clusters = function(json){ - // make my object - }; - var Tweet = function(){ - }; - // Classes ======================================================================= - - // Refactoring (parametere) ************************************************************ - // color translastion - var qTweet_0 =0; - var qTweet_Q =0; - var qTweet_REF=0; - var qTweet_OK =0; - var qTweet_KO =0; - function colorTranslation(value){ - if(value == "Q"){ - qTweet_Q+=1; - return 2; - }else if(value =="REF"){ - qTweet_REF+=1; - return 4; - }else if(value =="OK"){ - qTweet_OK+=1; - return 1; - }else if(value =="KO"){ - qTweet_KO+=1; - return 3; - }else if(value ==""){ - qTweet_0+=1; - return 5; - } - } - - - this._serializer.sync(function(data) { loaded_callback.call(self, data); return; }); - - function loaded_callback (json) { - var view_type = this._serializer.getTweets(); - - - if (typeof(view_type) === "undefined") { - var view_type = this._serializer.getTweetIds()[0]; - if (typeof(view_type) === "undefined") { - // default to guessing if nothing else works. - var view = json.views[0]; - - if(typeof(view.annotation_types) !== "undefined") { - /* we need to be backward compatible with the old files which used to - feature only two lines : Chapitrage and Tweets. We've added a - "Contributions" line so we need to discriminate against that */ - if (view.annotation_types.length === 2 && typeof(this._serializer.getContributions()) === "undefined") { - var view_type = view.annotation_types[1]; - } else { - console.log("PolemicWidget: invalid file - minimizing"); - return; - } - } - } - } - - // Make and define the Raphael area - this.paper = Raphael(document.getElementById(this._id), this._config.width, this._config.height); - - // event handlers - this._Popcorn.listen("IriSP.search", IriSP.wrap(this, function(searchString) { this.searchHandler(searchString); })); - this._Popcorn.listen("IriSP.search.closed", IriSP.wrap(this, this.searchFieldClosedHandler)); - this._Popcorn.listen("IriSP.search.cleared", IriSP.wrap(this, this.searchFieldClearedHandler)); - this.selector.mouseleave(IriSP.wrap(this, function() { self.TooltipWidget.hide.call(self.TooltipWidget); })); - this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.sliderUpdater)); - this._Popcorn.listen("IriSP.Mediafragment.showAnnotation", IriSP.wrap(this, this.showAnnotation)); - - for(var i = 0; i < json.annotations.length; i++) { - var item = json.annotations[i]; - var MyTime = Math.floor(item.begin/duration*lineSize); - var Myframe = Math.floor(MyTime/lineSize*frameLength); - - if (typeof(item.meta) !== "undefined" - && typeof(item.meta["id-ref"]) !== "undefined" - && item.meta["id-ref"] === view_type) { - - var MyTJson = {}, - _source = IriSP.get_aliased(item.meta, ['dc:source', 'source']); - if (_source !== null) { - var MyTJson = JSON.parse(_source['content']); - } - - if (item.content['polemics'] != undefined - && item.content['polemics'][0] != null) { - - // a tweet can have many polemics at the same time. - for(var j=0; j max) { - max = moy; - } - } - - var tweetDrawed = new Array(); - var TweetHeight = 5; - var newHeight = TweetHeight * max + 10; - - - if (newHeight > this.height) { - this.paper.setSize(this.width, newHeight); - this.height = newHeight; - console.log("resizeing"); - } - - - // DRAW TWEETS ============================================ - for(var i = 0; i < nbrframes; i++) { - var addEheight = 5; - if (frames[i] != undefined){ - // by type - - for (var j = 6; j > -1; j--) { - if (frames[i].qualifVol[j] != undefined) { - // show tweet by type - for (var k = 0; k < frames[i].mytweetsID.length; k++) { - - if (frames[i].mytweetsID[k].qualification == j) { - var x = i * frameSize; - var y = this.height - addEheight; - - if (this.yMax > y) { - this.yMax = y; - } - - /* some tweets seem to be duplicated - so we make a check before - creating a new rect */ - if (this.svgElements.hasOwnProperty(frames[i].mytweetsID[k].cinecast_id)) - continue; - - var e = this.paper.rect(x, y, frameSize - margin, TweetHeight /* height */) - .attr({stroke:"#00","stroke-width":0.1, fill: colors[j]}); - - addEheight += TweetHeight; - - /* stick a lot of things into e because that's the easiest way - to do it */ - e.color = colors[j]; - e.time = frames[i].mytweetsID[k].timeframe; - e.title = frames[i].mytweetsID[k].title; - e.id = frames[i].mytweetsID[k].cinecast_id; - this.svgElements[e.id] = e; - - IriSP.jQuery(e.node).mouseenter(function(element) { return function (_e) { - self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), element.attrs.x + element.attrs.width / 2, element.attrs.y - 2); - element.displayed = true; - self._Popcorn.trigger("IriSP.TraceWidget.MouseEvents", { - "widget" : "StackGraphWidget", - "type": "mousemove", - "x": _e.pageX, - "y": _e.pageY, - "annotation_id": element.id - }); - }}(e)).mousedown(function(element) { return function () { - self._Popcorn.currentTime(element.time/1000); - self._Popcorn.trigger("IriSP.PolemicTweet.click", element.id); - } - }(e)); - - IriSP.jQuery(e.node).attr('id', 't' + k + ''); - IriSP.jQuery(e.node).attr('title', frames[i].mytweetsID[k].title); - IriSP.jQuery(e.node).attr('begin', frames[i].mytweetsID[k].timeframe); - } - } - } - } - } - - } - // DRAW UI :: resize border and bgd - this.paperBackground = this.paper.rect(0, 0, this.width, this.height).attr({fill:"#F8F8F8","stroke-width":0.1,opacity: 1}); - - // outer borders - this.outerBorders = []; - this.outerBorders.push(this.paper.rect(0, this.height - 1, this.width, 1).attr({fill:"#ababab",stroke: "none",opacity: 1})); - this.outerBorders.push(this.paper.rect(0, 0, this.width, 1).attr({fill:"#ababab",stroke: "none",opacity: 1})); - - // inner borders - this.innerBorders = []; - this.innerBorders.push(this.paper.rect(1, this.height - 2, this.width, 1).attr({fill:"#efefef",stroke: "none",opacity: 1})); - this.innerBorders.push(this.paper.rect(1, 1, this.width, 1).attr({fill:"#efefef",stroke: "none",opacity: 1})); - this.innerBorders.push(this.paper.rect(1, 1, 1, this.height - 2).attr({fill:"#d0d1d1",stroke: "none",opacity: 0.8})); - this.innerBorders.push(this.paper.rect(this.width - 2, 1, 1, this.height - 2).attr({fill:"#efefef",stroke: "none",opacity: 1})); - - - - this.paperSlider = this.paper.rect(0, 0, 0, this.height).attr({fill:"#D4D5D5", stroke: "none", opacity: 1}); - - // the small white line displayed over the slider. - this.sliderTip = this.paper.rect(0, 0, 1, this.height).attr({fill:"#fc00ff", stroke: "none", opacity: 1}); - // decalage - // tweetSelection = this.paper.rect(-100,-100,5,5).attr({fill:"#fff",stroke: "none",opacity: 1}); - - - this.paperSlider.toBack(); - this.paperBackground.toBack(); - this.sliderTip.toFront(); - } - - -} - -/** update the positionMarker as time passes */ -IriSP.PolemicWidget.prototype.sliderUpdater = function() { - - var time = +this._Popcorn.currentTime(); - var duration = this.getDuration(); - - this.paperSlider.attr("width", time * (this.width / (duration / 1000))); - - this.sliderTip.attr("x", time * (this.width / (duration / 1000))); -}; - -/** reacts to IriSP.search events */ -IriSP.PolemicWidget.prototype.searchHandler = function(searchString) { - if (searchString == "") - return; - - var matches = this._serializer.searchTweetsOccurences(searchString); - - if (IriSP.countProperties(matches) > 0) { - this._Popcorn.trigger("IriSP.search.matchFound"); - } else { - this._Popcorn.trigger("IriSP.search.noMatchFound"); - } - - - // decrease the opacity of the other elements. - for (var id in this.svgElements) { - var e = this.svgElements[id]; - e.attr({fill: e.color, opacity: 0.4}); - } - - - for (var id in matches) { - if (this.svgElements.hasOwnProperty(id)) { - var e = this.svgElements[id]; - this.svgElements[id].attr({fill: "#fc00ff", opacity: 1}); - } - } - - this.oldSearchMatches = matches; -}; - -/** reacts to IriSP.search.cleared messages */ -IriSP.PolemicWidget.prototype.searchFieldClearedHandler = function() { - for (var id in this.svgElements) { - var e = this.svgElements[id]; - e.attr({fill: e.color, opacity: 1}); - } -}; - -/** reacts to IriSP.search.closed messages by clearing the highlighted elements */ -IriSP.PolemicWidget.prototype.searchFieldClosedHandler = function() { - for (var id in this.svgElements) { - var e = this.svgElements[id]; - e.attr({fill: e.color, opacity: 1}); - } - -}; - -IriSP.PolemicWidget.prototype.showAnnotation = function(id) { - if (this.svgElements.hasOwnProperty(id)) { - var e = this.svgElements[id]; - this.TooltipWidget.show(e.title, e.attr("fill"), e.x - 103, e.y - 160); - } -}; -IriSP.SegmentsWidget = function(Popcorn, config, Serializer) { - - var self = this; - IriSP.Widget.call(this, Popcorn, config, Serializer); - this.oldSearchMatches = []; - - // event handlers - this._Popcorn.listen("IriSP.search", function(searchString) { self.searchHandler.call(self, searchString); }); - this._Popcorn.listen("IriSP.search.closed", function() { self.searchFieldClosedHandler.call(self); }); - this._Popcorn.listen("IriSP.search.cleared", function() { self.searchFieldClearedHandler.call(self); }); - - this.defaultColors = ["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"] -}; - -IriSP.SegmentsWidget.prototype = new IriSP.Widget(); - -IriSP.SegmentsWidget.prototype.draw = function() { - - var self = this; - var annotations = this._serializer._data.annotations; - - this.selector.addClass("Ldt-SegmentsWidget"); - this.selector.append(Mustache.to_html(IriSP.overlay_marker_template)); - - this.positionMarker = this.selector.find(".Ldt-SegmentPositionMarker"); - - this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.positionUpdater)); - var duration = this.getDuration(); - - if (this.cinecast_version) { - var segments_annotations = IriSP.underscore.filter( - this._serializer._data.annotations, - function(_a) { - return _a.type == "cinecast:MovieExtract"; - } - ); - } - else { - - var view_type = this._serializer.getChapitrage(); - if (typeof(view_type) === "undefined") { - view_type = this._serializer.getNonTweetIds()[0]; - } - - - var i = 0; - - var segments_annotations = []; - - for (i = 0; i < annotations.length; i++) { - var annotation = annotations[i]; - - /* filter the annotations whose type is not the one we want */ - if (view_type != "" && typeof(annotation.meta) !== "undefined" && typeof(annotation.meta["id-ref"]) !== "undefined" - && annotation.meta["id-ref"] != view_type) { - continue; - } - - segments_annotations.push(annotation); - } -} - var _w = this.selector.width(); - var lastSegment = IriSP.underscore.max(segments_annotations, function(annotation) { return annotation.end; }); - - for (i = 0; i < segments_annotations.length; i++) { - - var annotation = segments_annotations[i]; - var begin = (+ annotation.begin); - var end = (+ annotation.end); - var id = annotation.id; - - var startPixel = Math.floor(_w * (begin / duration)); - - var endPixel = Math.floor(_w * (end / duration)); - if (annotation.id !== lastSegment.id) - var pxWidth = endPixel - startPixel -1; - else - /* the last segment has no segment following it */ - var pxWidth = endPixel - startPixel; - - var divTitle = this.cinecast_version - ? annotation.content.data - : annotation.content.title + ( annotation.content.title ? "
    " : "" ) + annotation.content.description.replace(/(^.{120,140})[\s].+$/,'$1…'); - - var thumbUrl = annotation.meta.thumbnail || ''; - - var hexa_color = typeof(annotation.content.color) !== "undefined" - ? '#' + IriSP.DEC_HEXA_COLOR(annotation.content.color) - : typeof(annotation.color) !== "undefined" - ? '#' + IriSP.DEC_HEXA_COLOR(annotation.color) - : this.defaultColors[i % this.defaultColors.length]; - - /* - if (hexa_color === "FFCC00") - hexa_color = "333"; - */ - if (hexa_color.length == 5) - hexa_color = hexa_color + '00'; - - - var annotationTemplate = Mustache.to_html(IriSP.annotation_template, - {"divTitle" : divTitle, "id" : id, "startPixel" : startPixel, - "pxWidth" : pxWidth, "hexa_color" : hexa_color, - "seekPlace" : Math.round(begin/1000), "thumbnailUrl": thumbUrl}); - - - this.selector.append(annotationTemplate); - - /* add a special class to the last segment and change its border */ - if (annotation.id === lastSegment.id) { - IriSP.jqId(id).addClass("Ldt-lastSegment").css("border-color", hexa_color); - } - } - // react to mediafragment messages. - this._Popcorn.listen("IriSP.Mediafragment.showAnnotation", - function(id, divTitle) { - - var divObject = IriSP.jqId(id); - if (divObject.length) { - divObject.fadeTo(0,1); - var offset_x = divObject.position().left + divObject.outerWidth() / 2; - self.TooltipWidget.show(divObject.attr("title"), IriSP.jQuery(this).css("background-color"), offset_x, 0); - IriSP.jQuery(document).one("mousemove", function() { divObject.fadeTo(0,.5); - self.TooltipWidget.hide(); }); - } - }); - - this.selector.find(".Ldt-iri-chapter") - .fadeTo(0, .5) - .click(function() { - self._Popcorn.trigger("IriSP.SegmentsWidget.click", this.id); - self._Popcorn.currentTime(IriSP.jQuery(this).attr("data-seek")); - }) - .mouseover( function(event) { - var divObject = IriSP.jQuery(this); - divObject.fadeTo(0,1); - var offset_x = divObject.position().left + divObject.outerWidth() / 2; - var thumb = divObject.attr("thumbnail-url"); - var txt = divObject.attr("title") + (thumb && thumb.length ? '
    ' : ''); - self.TooltipWidget.show(txt, IriSP.jQuery(this).css("background-color"), offset_x, 0); - }) - .mouseout(function(){ - IriSP.jQuery(this).fadeTo(0,.5); - self.TooltipWidget.hide(); - }); -}; - -/* restores the view after a search */ -IriSP.SegmentsWidget.prototype.clear = function() { - this.selector.children(".Ldt-iri-chapter").fadeTo(0,.5); -}; - -IriSP.SegmentsWidget.prototype.clickHandler = function(annotation) { - this._Popcorn.trigger("IriSP.SegmentsWidget.click", annotation.id); - var begin = (+ annotation.begin) / 1000; - this._Popcorn.currentTime(Math.round(begin)); -}; - -IriSP.SegmentsWidget.prototype.searchHandler = function(searchString) { - - if (searchString == "") - return; - - var matches = this._serializer.searchOccurences(searchString); - - if (IriSP.countProperties(matches) > 0) { - this._Popcorn.trigger("IriSP.search.matchFound"); - } else { - this._Popcorn.trigger("IriSP.search.noMatchFound"); - } - - // un-highlight all the blocks - this.selector.children(".Ldt-iri-chapter").css("opacity", 0.1); - - // then highlight the ones with matches. - for (var id in matches) { - var factor = 0.5 + matches[id] * 0.2; - this.selector.find("#"+id).dequeue(); - this.selector.find("#"+id).animate({opacity:factor}, 200); - } - - - this.oldSearchMatches = matches; -}; - -IriSP.SegmentsWidget.prototype.searchFieldClearedHandler = function() { - this.clear(); -}; - -IriSP.SegmentsWidget.prototype.searchFieldClosedHandler = function() { - this.clear(); -}; - -IriSP.SegmentsWidget.prototype.positionUpdater = function() { - var duration = this.getDuration() / 1000; - var time = this._Popcorn.currentTime(); - //var position = ((time / duration) * 100).toFixed(2); - var position = ((time / duration) * 100).toFixed(2); - - this.positionMarker.css("left", position + "%"); -}; - -IriSP.SegmentsWidget.prototype.showAnnotation = function() { - -}; -/** A widget to create a new segment */ -IriSP.SliceWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - -}; - -IriSP.SliceWidget.prototype = new IriSP.Widget(); - -IriSP.SliceWidget.prototype.draw = function() { - var templ = Mustache.to_html(IriSP.sliceWidget_template); - this.selector.append(templ); - - this.sliceZone = this.selector.find(".Ldt-sliceZone"); - - /* global variables used to keep the position and width - of the zone. - */ - this.zoneLeft = 0; - this.zoneWidth = 0; - - this.leftHandle = this.selector.find(".Ldt-sliceLeftHandle"); - this.rightHandle = this.selector.find(".Ldt-sliceRightHandle"); - - var left = this.selector.offset().left; - var top = this.selector.offset().top; - - // a bug in firefox makes it use the wrong format - if (!IriSP.jQuery.browser.mozilla) { - // contain the handles correctly - we cannot set - // containment: parent because it wouldn't allow to select the - // whole slice, so we have to compute a box in which the slice is - // allowed to move. - var containment = [left - 8, top, this.selector.width() + left, top]; - - // var containment = [left - 16, top, this.selector.width() + left - 8, top]; - this.leftHandle.draggable({axis: "x", - drag: IriSP.wrap(this, this.leftHandleDragged), - containment: containment - }); - - containment = [left, top, this.selector.width() + left, top]; - // containment = [left, top, this.selector.width() + left - 8, top]; - this.rightHandle.draggable({axis: "x", - drag: IriSP.wrap(this, this.rightHandleDragged), - containment: containment - }); - - } else { // firefox - // we need to define a containment specific to firefox. - - var containment = [left - 16, top, this.selector.width() + left - 8, top]; - this.leftHandle.draggable({axis: "x", - drag: IriSP.wrap(this, this.leftHandleDragged), - containment: containment - }); - - containment = [left, top, this.selector.width() + left - 8, top]; - this.rightHandle.draggable({axis: "x", - drag: IriSP.wrap(this, this.rightHandleDragged), - containment: containment - }); - } - - this.leftHandle.css("position", "absolute"); - this.rightHandle.css("position", "absolute"); - - this._Popcorn.listen("IriSP.SliceWidget.position", - IriSP.wrap(this, this.positionSliceHandler)); - - this._Popcorn.listen("IriSP.SliceWidget.show", IriSP.wrap(this, this.show)); - this._Popcorn.listen("IriSP.SliceWidget.hide", IriSP.wrap(this, this.hide)); - this.selector.hide(); -}; - -/** responds to an "IriSP.SliceWidget.position" message - @param params an array with the first element being the left distance in - percents and the second element the width of the slice in pixels -*/ -IriSP.SliceWidget.prototype.positionSliceHandler = function(params) { - left = params[0]; - width = params[1]; - - this.zoneLeft = left; - this.zoneWidth = width; - this.sliceZone.css("left", left + "px"); - this.sliceZone.css("width", width + "px"); - this.leftHandle.css("left", (left - 7) + "px"); - this.rightHandle.css("left", left + width + "px"); - - this._leftHandleOldLeft = left - 7; - this._rightHandleOldLeft = left + width; -}; - -/** handle a dragging of the left handle */ -IriSP.SliceWidget.prototype.leftHandleDragged = function(event, ui) { - /* we have a special variable, this._leftHandleOldLeft, to keep the - previous position of the handle. We do that to know in what direction - is the handle being dragged - */ - - var currentX = this.leftHandle.offset().left; - var rightHandleX = Math.floor(this.rightHandle.position()["left"]); - - var container_offset = this.selector.offset().left; - - if (Math.floor(ui.position.left) >= rightHandleX - 7) { - /* prevent the handle from moving past the right handle */ - ui.position.left = rightHandleX - 7; - } - - this.zoneWidth = rightHandleX - Math.floor(ui.position.left) - 7; - this.zoneLeft = Math.floor(ui.position.left) + 8; - - this.sliceZone.css("width", this.zoneWidth); - this.sliceZone.css("left", this.zoneLeft + "px"); - - this._leftHandleOldLeft = ui.position.left; - this.broadcastChanges(); - -}; - -/** handle a dragging of the right handle */ -IriSP.SliceWidget.prototype.rightHandleDragged = function(event, ui) { - /* we have a special variable, this._leftHandleOldLeft, to keep the - previous position of the handle. We do that to know in what direction - is the handle being dragged - */ - - var currentX = this.leftHandle.position()["left"]; - var leftHandleX = Math.floor(this.leftHandle.position()["left"]); - - var container_offset = this.selector.offset().left + this.selector.width(); - - if (Math.floor(ui.position.left) < leftHandleX + 7) { - /* prevent the handle from moving past the left handle */ - ui.position.left = leftHandleX + 7; - } - - this.zoneWidth = Math.floor(ui.position.left) - (leftHandleX + 7); - - this.sliceZone.css("width", this.zoneWidth); - //this.sliceZone.css("left", this.zoneLeft + "px"); - this._rightHandleOldLeft = Math.floor(this._rightHandleOldLeft); - this.broadcastChanges(); -}; - -/** tell to the world that the coordinates of the slice have - changed -*/ -IriSP.SliceWidget.prototype.broadcastChanges = function() { - var leftPercent = (this.zoneLeft / this.selector.width()) * 100; - var zonePercent = (this.zoneWidth / this.selector.width()) * 100; - - this._Popcorn.trigger("IriSP.SliceWidget.zoneChange", [leftPercent, zonePercent]); -}; - -IriSP.SliceWidget.prototype.show = function() { - this.selector.show(); -}; - -IriSP.SliceWidget.prototype.hide = function() { - this.selector.hide(); -};IriSP.SliderWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); -}; - -IriSP.SliderWidget.prototype = new IriSP.Widget(); - -IriSP.SliderWidget.prototype.draw = function() { - var self = this; - - this.selector.append(Mustache.to_html(IriSP.sliderWidget_template, {})); - this.selector.addClass("Ldt-SliderMinimized"); - - this.sliderBackground = this.selector.find(".Ldt-sliderBackground"); - this.sliderForeground = this.selector.find(".Ldt-sliderForeground"); - this.positionMarker = this.selector.find(".Ldt-sliderPositionMarker"); - - - // a special variable to stop methods from tinkering - // with the positionMarker when the user is dragging it - this.draggingOngoing = false; - - // another special variable used by the timeout handler to - // open or close the slider. - this.sliderMaximized = false; - this.timeOutId = null; - - - this.positionMarker.draggable({axis: "x", - start: IriSP.wrap(this, this.positionMarkerDraggingStartedHandler), - stop: IriSP.wrap(this, this.positionMarkerDraggedHandler), - containment: "parent" - }); - this.positionMarker.css("position", "absolute"); - - this.sliderBackground.click(function(event) { self.backgroundClickHandler.call(self, event); }); - this.sliderForeground.click(function(event) { self.foregroundClickHandler.call(self, event); }); - - this.selector.hover(IriSP.wrap(this, this.mouseOverHandler), IriSP.wrap(this, this.mouseOutHandler)); - - // update the positions - this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.sliderUpdater)); - - // special messages : - this._Popcorn.listen("IriSP.PlayerWidget.MouseOver", IriSP.wrap(this, this.mouseOverHandler)); - this._Popcorn.listen("IriSP.PlayerWidget.MouseOut", IriSP.wrap(this, this.mouseOutHandler)); -}; - -/* update the slider and the position marker as time passes */ -IriSP.SliderWidget.prototype.sliderUpdater = function() { - if(this.draggingOngoing || this._disableUpdate) - return; - - var time = this._Popcorn.currentTime(); - - var duration = this.getDuration() / 1000; - var percents = time / duration; - - /* we do these complicated calculations to center exactly - the position Marker */ - - var divWidth = this.selector.width(); - var pixels = Math.floor(this.selector.width() * percents); - var positionMarker_width = this.positionMarker.width(); - var correction = (positionMarker_width / 2); - - /* check that we don't leave the left side */ - var newPos = pixels - correction; - if (newPos <= 0) - newPos = 0; - - /* check that we don't leave the right side */ - var rightEdgePos = pixels + 1 * correction; - - if (rightEdgePos >= divWidth) - newPos = divWidth - 1 * correction - 1; - - this.sliderForeground.css("width", pixels + "px"); - this.positionMarker.css("left", newPos + "px"); - -}; - -IriSP.SliderWidget.prototype.backgroundClickHandler = function(event) { - /* this piece of code is a little bit convoluted - here's how it works : - we want to handle clicks on the progress bar and convert those to seeks in the media. - However, jquery only gives us a global position, and we want a number of pixels relative - to our container div, so we get the parent position, and compute an offset to this position, - and finally compute the progress ratio in the media. - Finally we multiply this ratio with the duration to get the correct time - */ - - var parentOffset = this.sliderBackground.parent().offset(); - var width = this.sliderBackground.width(); - var relX = event.pageX - parentOffset.left; - - var duration = this.getDuration() / 1000; - var newTime = ((relX / width) * duration).toFixed(2); - - this._Popcorn.currentTime(newTime); -}; - -/* same function as the previous one, except that it handles clicks - on the foreground element */ -IriSP.SliderWidget.prototype.foregroundClickHandler = function(event) { - var parentOffset = this.sliderForeground.parent().offset(); - var width = this.sliderBackground.width(); - var relX = event.pageX - parentOffset.left; - - var duration = this.getDuration() / 1000; - var newTime = ((relX / width) * duration).toFixed(2); - - this._Popcorn.currentTime(newTime); -}; - -/* handles mouse over the slider */ -IriSP.SliderWidget.prototype.mouseOverHandler = function(event) { - - if (this.timeOutId !== null) { - window.clearTimeout(this.timeOutId); - } - - this.sliderMaximized = true; - - this.sliderBackground.animate({"height": "9px"}, 100); - this.sliderForeground.animate({"height": "9px"}, 100); - this.positionMarker.animate({"height": "9px", "width": "9px"}, 100); - //this.positionMarker.css("margin-top", "-4px"); - -// this.selector.removeClass("Ldt-SliderMinimized"); -// this.selector.addClass("Ldt-SliderMaximized"); -}; - -/* handles when the mouse leaves the slider */ -IriSP.SliderWidget.prototype.mouseOutHandler = function(event) { - - this.timeOutId = window.setTimeout(IriSP.wrap(this, this.minimizeOnTimeout), - this.minimize_period); -}; - -IriSP.SliderWidget.prototype.minimizeOnTimeout = function(event) { - this.sliderBackground.animate({"height": "5px"}, 100); - this.sliderForeground.animate({"height": "5px"}, 100); - this.positionMarker.animate({"height": "5px", "width": "5px"}, 100); - this.positionMarker.css("margin-top", "0px"); - this.sliderMinimized = true; - -// this.selector.removeClass("Ldt-SliderMaximized"); -// this.selector.addClass("Ldt-SliderMinimized"); - -}; - -// called when the user starts dragging the position indicator -IriSP.SliderWidget.prototype.positionMarkerDraggingStartedHandler = function(event, ui) { - this.draggingOngoing = true; -}; - -IriSP.SliderWidget.prototype.positionMarkerDraggedHandler = function(event, ui) { - -/* this._disableUpdate = true; // disable slider position updates while dragging is ongoing. - window.setTimeout(IriSP.wrap(this, function() { this._disableUpdate = false; }), 500); -*/ - var parentOffset = this.sliderForeground.parent().offset(); - var width = this.sliderBackground.width(); - var relX = event.originalEvent.pageX - parentOffset.left; - - var duration = this.getDuration() / 1000; - var newTime = ((relX / width) * duration).toFixed(2); - this._Popcorn.currentTime(newTime); - - this.draggingOngoing = false; -}; - -/** @class The constructor for the sparkline widget */ -IriSP.SparklineWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - - this._oldAnnotation = null; - this._results = []; - - this.slices = this._config.slices || Math.floor(this.width/20); - if (!this.width) { - this.width = this.selector.width(); - } - if (!this.height) { - this.height = 40; - } - this.selector.css("height", this.height + "px"); - if (this._config.background) { - this.selector.css("background", this._config.background); - } -}; - - -IriSP.SparklineWidget.prototype = new IriSP.Widget(); - -IriSP.SparklineWidget.prototype.clear = function() { - -}; - -/** draw the sparkline using jquery sparkline */ -IriSP.SparklineWidget.prototype.draw = function() { - this.duration = this.getDuration(); - this.paper = new Raphael(this.selector[0], this.width, this.height); - var _this = this; - - var views = this._serializer._data.views; - var stat_view; - if (!IriSP.null_or_undefined(views)) { - for (var i = 0; i < views.length; i++) { - var view = views[i]; - if (view.id === "stat") { - stat_view = view; - break; - } - } - } - - var _ = IriSP.underscore; - // If we've found the correct view, feed the directly the data from the view - // to jquery sparkline. Otherwise, compute it ourselves. - if (!IriSP.null_or_undefined(stat_view)) { - //console.log("sparklinewidget : using stats embedded in the json"); - var _results = stat_view.meta.stat.split(","); - } else { - var _annotations = this._serializer._data.annotations, - _sliceDuration = Math.floor( this.duration / this.slices), - _results = _(_.range(this.slices)).map(function(_i) { - return _(_annotations).filter(function(_a){ - return (_a.begin <= (1 + _i) * _sliceDuration) && (_a.end >= _i * _sliceDuration) - }).length; - }); - } - var _max = Math.max(1, _(_results).max()), - _h = this.height, - _scale = (_h - this.lineWidth) / _max, - _width = this.width / this.slices, - _y = _(_results).map(function(_v) { - return _h - (_scale * _v); - }), - _d = _(_y).reduce(function(_memo, _v, _k) { - return _memo + ( _k - ? 'C' + (_k * _width) + ' ' + _y[_k - 1] + ' ' + (_k * _width) + ' ' + _v + ' ' + ((_k + .5) * _width) + ' ' + _v - : 'M0 ' + _v + 'L' + (.5*_width) + ' ' + _v ) - },'') + 'L' + this.width + ' ' + _y[_y.length - 1], - _d2 = _d + 'L' + this.width + ' ' + this.height + 'L0 ' + this.height; - this.paper.path(_d2).attr({ - "stroke" : "none", - "fill" : this.fillColor - }); - - this.paper.path(_d).attr({ - "fill" : "none", - "stroke" : this.lineColor, - "stroke-width" : this.lineWidth - }); - - this.rectangleProgress = this.paper.rect(0,0,0,this.height) - .attr({ - "stroke" : "none", - "fill" : "#808080", - "opacity" : .3 - }); - this.ligneProgress = this.paper.path("M0 0L0 "+this.height).attr({"stroke":"#ff00ff", "line-width" : 2}); - // save the results in an array so that we can re-use them when a new annotation - // is added. - this._results = _results; - - this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.timeUpdateHandler)); -// this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation", IriSP.wrap(this, this.handleNewAnnotation)); - - this.selector.click(IriSP.wrap(this, this.clickHandler)); -}; - -/** react to a timeupdate event */ -IriSP.SparklineWidget.prototype.timeUpdateHandler = function() { - var _currentTime = this._Popcorn.currentTime(), - _x = (1000 * _currentTime / this.duration) * this.width; - this.rectangleProgress.attr({ - "width" : _x - }); - this.ligneProgress.attr({ - "path" : "M" + _x + " 0L" + _x + " " + this.height - }); - -} - -/** handle clicks on the widget */ -IriSP.SparklineWidget.prototype.clickHandler = function(event) { - var relX = event.pageX - this.selector.offset().left; - var newTime = ((relX / this.width) * this.duration/1000).toFixed(2); - - this._Popcorn.trigger("IriSP.SparklineWidget.clicked", newTime); - this._Popcorn.currentTime(newTime); -}; - -/** react when a new annotation is added */ -IriSP.SparklineWidget.prototype.handleNewAnnotation = function(annotation) { -// var num_columns = this._results.length; -// var duration = this._serializer.getDuration(); -// var time_step = Math.round(duration / num_columns); /* the time interval between two columns */ -// var begin = +annotation.begin; -// var end = +annotation.end; -// -// /* increment all the values between the beginning and the end of the annotation */ -// var index_begin = Math.floor(begin / time_step); -// var index_end = Math.floor(end / time_step); -// -// for (var i = index_begin; i < Math.min(index_end, this._results.length); i++) { -// this._results[i]++; -// } -// -// this.selector.find(".Ldt-sparkLine").sparkline(this._results, {lineColor: "#7492b4", fillColor: "#aeaeb8", -// spotColor: "#b70056", -// width: this.width, height: this.height}); -};IriSP.StackGraphWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); -} - -IriSP.StackGraphWidget.prototype = new IriSP.Widget(); - -IriSP.StackGraphWidget.prototype.draw = function() { - var _ = IriSP._; - this.height = this._config.height || 50; - this.width = this.selector.width(); - this.slices = this._config.slices || ~~(this.width/(this.streamgraph ? 20 : 5)); - _(this.tags).each(function(_a) { - _a.regexp = new RegExp(_(_a.keywords).map(function(_k) { - return _k.replace(/([\W])/gm,'\\$1'); - }).join("|"),"im") - }); - this.paper = new Raphael(this.selector[0], this.width, this.height); - this.groups = []; - this.duration = this.getDuration(); - - var _annotationType = this._serializer.getTweets(), - _sliceDuration = ~~ ( this.duration / this.slices), - _annotations = this._serializer._data.annotations, - _groupedAnnotations = _(_.range(this.slices)).map(function(_i) { - return _(_annotations).filter(function(_a){ - return (_a.begin <= (1 + _i) * _sliceDuration) && (_a.end >= _i * _sliceDuration) - }); - }), - _max = IriSP._(_groupedAnnotations).max(function(_g) { - return _g.length - }).length, - _scale = this.height / _max, - _width = this.width / this.slices, - _showTitle = !this._config.excludeTitle, - _showDescription = !this._config.excludeDescription; - - - var _paths = _(this.tags).map(function() { - return []; - }); - _paths.push([]); - - for (var i = 0; i < this.slices; i++) { - var _group = _groupedAnnotations[i]; - if (_group) { - var _vol = _(this.tags).map(function() { - return 0; - }); - for (var j = 0; j < _group.length; j++){ - var _txt = (_showTitle ? _group[j].content.title : '') + ' ' + (_showDescription ? _group[j].content.description : '') - var _tags = _(this.tags).map(function(_tag) { - return (_txt.search(_tag.regexp) == -1 ? 0 : 1) - }), - _nbtags = _(_tags).reduce(function(_a,_b) { - return _a + _b; - }, 0); - if (_nbtags) { - IriSP._(_tags).each(function(_v, _k) { - _vol[_k] += (_v / _nbtags); - }); - } - } - var _nbtags = _(_vol).reduce(function(_a,_b) { - return _a + _b; - }, 0), - _nbneutre = _group.length - _nbtags, - _h = _nbneutre * _scale, - _base = this.height - _h; - if (!this.streamgraph) { - this.paper.rect(i * _width, _base, _width - 1, _h ).attr({ - "stroke" : "none", - "fill" : this.defaultcolor - }); - } - _paths[0].push(_base); - for (var j = 0; j < this.tags.length; j++) { - _h = _vol[j] * _scale; - _base = _base - _h; - if (!this.streamgraph) { - this.paper.rect(i * _width, _base, _width - 1, _h ).attr({ - "stroke" : "none", - "fill" : this.tags[j].color - }); - } - _paths[j+1].push(_base); - } - this.groups.push(_(_vol).map(function(_v) { - return _v / _group.length; - })) - } else { - for (var j = 0; j < _paths.length; j++) { - _paths[j].push(this.height); - } - this.groups.push(_(this.tags).map(function() { - return 0; - })); - } - } - - if (this.streamgraph) { - for (var j = _paths.length - 1; j >= 0; j--) { - var _d = _(_paths[j]).reduce(function(_memo, _v, _k) { - return _memo + ( _k - ? 'C' + (_k * _width) + ' ' + _paths[j][_k - 1] + ' ' + (_k * _width) + ' ' + _v + ' ' + ((_k + .5) * _width) + ' ' + _v - : 'M0 ' + _v + 'L' + (.5*_width) + ' ' + _v ) - },'') + 'L' + this.width + ' ' + _paths[j][_paths[j].length - 1] + 'L' + this.width + ' ' + this.height + 'L0 ' + this.height; - this.paper.path(_d).attr({ - "stroke" : "none", - "fill" : (j ? this.tags[j-1].color : this.defaultcolor) - }); - } - } - this.rectangleFocus = this.paper.rect(0,0,_width,this.height) - .attr({ - "stroke" : "none", - "fill" : "#ff00ff", - "opacity" : 0 - }) - this.rectangleProgress = this.paper.rect(0,0,0,this.height) - .attr({ - "stroke" : "none", - "fill" : "#808080", - "opacity" : .3 - }); - this.ligneProgress = this.paper.path("M0 0L0 "+this.height).attr({"stroke":"#ff00ff", "line-width" : 2}) - - this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.timeUpdateHandler)); - var _this = this; - this.selector - .click(IriSP.wrap(this, this.clickHandler)) - .mousemove(function(_e) { - _this.updateTooltip(_e); - // Trace - var relX = _e.pageX - _this.selector.offset().left; - var _duration = _this.getDuration(); - var _time = parseInt((relX / _this.width) * _duration); - _this._Popcorn.trigger("IriSP.TraceWidget.MouseEvents", { - "widget" : "StackGraphWidget", - "type": "mousemove", - "x": _e.pageX, - "y": _e.pageY, - "time": _time - }); - - }) - .mouseout(function() { - _this.TooltipWidget.hide(); - _this.rectangleFocus.attr({ - "opacity" : 0 - }) - }) -} - -IriSP.StackGraphWidget.prototype.timeUpdateHandler = function() { - var _currentTime = this._Popcorn.currentTime(), - _x = (1000 * _currentTime / this.duration) * this.width; - this.rectangleProgress.attr({ - "width" : _x - }); - this.ligneProgress.attr({ - "path" : "M" + _x + " 0L" + _x + " " + this.height - }) -} - -IriSP.StackGraphWidget.prototype.clickHandler = function(event) { - /* Ctrl-C Ctrl-V'ed from another widget - */ - - var relX = event.pageX - this.selector.offset().left; - var newTime = ((relX / this.width) * this.duration/1000).toFixed(2); - this._Popcorn.trigger("IriSP.StackGraphWidget.clicked", newTime); - this._Popcorn.currentTime(newTime); -}; - -IriSP.StackGraphWidget.prototype.updateTooltip = function(event) { - var _segment = Math.max(0,Math.min(this.groups.length - 1, Math.floor(this.slices * (event.pageX - this.selector.offset().left)/this.width))), - _valeurs = this.groups[_segment], - _width = this.width / this.slices, - _html = '
      ' + IriSP._(this.tags).map(function(_tag, _i) { - return '
    • ' - + ~~(100 * _valeurs[_i]) - + '% de ' - + _tag.description - + '
    • '; - }).join('') + '
    '; - this.TooltipWidget._shown = false; // Vraiment, on ne peut pas ouvrir le widget s'il n'est pas encore ouvert ? - this.TooltipWidget.show('','',(_segment + .5)* this.width / this.slices, 0); - this.TooltipWidget.selector.find(".tip").html(_html); - this.rectangleFocus.attr({ - "x" : _segment * _width, - "opacity" : .4 - }) -} - -IriSP.TagCloudWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); -} - -IriSP.TagCloudWidget.prototype = new IriSP.Widget(); - -IriSP.TagCloudWidget.prototype.draw = function() { - - var _urlRegExp = /https?:\/\/[0-9a-zA-Z\.%\/-_]+/g, - _stopWords = [ - 'aussi', 'and', 'avec', 'aux', 'bien', 'car', 'cette', 'comme', 'dans', 'donc', 'des', 'elle', 'encore', 'entre', 'est', - 'être', 'eux', 'faire', 'fait', 'http', 'ici', 'ils', 'les', 'leur', 'leurs', 'mais', 'mes', 'même', 'mon', 'notre', - 'non', 'nos', 'nous', 'ont', 'par', 'pas', 'peu', 'peut', 'plus', 'pour', 'que', 'qui', 'sans', 'ses' ,'son', 'sont', 'sur', - 'tes', 'très', 'the', 'ton', 'tous', 'tout', 'une', 'votre', 'vos', 'vous' ], - _regexpword = /[^\s\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»:\/]{3,}/g, - _words = {}, - _showTitle = !this._config.excludeTitle, - _showDescription = !this._config.excludeDescription, - _excludePattern = this._config.excludePattern || null, - _tagCount = this._config.tagCount || 30; - if (typeof this._config.excludeWords !== "undefined" && this._config.excludeWords.length) { - IriSP._(this._config.excludeWords).each(function(_w) { - _stopWords.push(_w.toLowerCase()); - }); - } - - IriSP._(this._serializer._data.annotations).each(function(_annotation) { - if (_annotation.content && _annotation.content.description) { - var _txt = (_showTitle ? _annotation.content.title : '') + ' ' + (_showDescription ? _annotation.content.description : '') - IriSP._(_txt.toLowerCase().replace(_urlRegExp, '').match(_regexpword)).each(function(_mot) { - if (_stopWords.indexOf(_mot) == -1 && (_excludePattern == null || !_excludePattern.test(_mot))) { - _words[_mot] = 1 + (_words[_mot] || 0); - } - }) - } - }); - - _words = IriSP._(_words) - .chain() - .map(function(_v, _k) { - return { - "word" : _k, - "count" : _v - } - }) - .filter(function(_v) { - return _v.count > 2; - }) - .sortBy(function(_v) { - return - _v.count; - }) - .first(_tagCount) - .value(); - var _max = _words[0].count, - _min = Math.min(_words[_words.length - 1].count, _max - 1), - _scale = 16 / Math.sqrt(_max - _min), - _this = this, - _html = '
      ' - + IriSP._(_words) - .chain() - .shuffle() - .map(function(_word) { - var _size = 10 + _scale * Math.sqrt(_word.count - _min); - return '
    • ' - + _word.word - + '
    • ' - }) - .value() - .join("") - + '
    '; - this.selector - .addClass("Ldt-TagCloud") - .html(_html); - this.selector.find("li").click(function() { - var _txt = this.textContent.replace(/(^[\s]+|[\s]+$)/g,''); - _this._Popcorn.trigger("IriSP.search.triggeredSearch", _txt); - }); - this._Popcorn.listen("IriSP.search", IriSP.wrap(this, function(searchString) { - var _rgxp = new RegExp("(" + searchString.replace(/(\W)/g,'\\$1') + ")","gi"); - this.selector.find("li").each(function(_i, _e) { - _e.innerHTML = searchString.length ? - _e.textContent.replace(_rgxp,'$1') - : _e.textContent; - }); - })); - this._Popcorn.listen("IriSP.search.closed", IriSP.wrap(this, this.endsearch)); - this._Popcorn.listen("IriSP.search.cleared", IriSP.wrap(this, this.endsearch)); -} - -IriSP.TagCloudWidget.prototype.endsearch = function() { - this.selector.find("li").each(function(_i, _e) { - _e.innerHTML = _e.textContent; - }); -} -/* this widget displays a small tooltip */ -IriSP.TooltipWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - this._shown = false; - this._displayedText = ""; - this._hideTimeout = -1; -}; - - -IriSP.TooltipWidget.prototype = new IriSP.Widget(); - -IriSP.TooltipWidget.prototype.draw = function() { - var templ = Mustache.to_html(IriSP.tooltipWidget_template); - // position the widget absolutely relative to document. --- NOOOO !!!! - this.selector.css({ - "position": "absolute", - "top": 0, - "left": 0 - }); - this.selector.parent().css({ - "position": "relative" - }); - this.selector.append(templ); - var _this = this; - this.selector.mouseover(function() { - _this.hide(); - }); - this.hide(); - -}; - -IriSP.TooltipWidget.prototype.clear = function() { - this.selector.find(".tiptext").html(""); -}; - -IriSP.TooltipWidget.prototype.show = function(text, color, x, y) { - - if (this._displayedText == text && this._shown) - return; - - this.selector.find(".tipcolor").css("background-color", color); - this._displayedText = text; - this.selector.find(".tiptext").html(text); - - var _tip = this.selector.find(".tip"); - _tip.show(); - _tip.css({ - "left": Math.floor(x - _tip.outerWidth() / 2)+"px", - "top": Math.floor(y - _tip.outerHeight())+"px" - }); - this._shown = true; -}; - -IriSP.TooltipWidget.prototype.hide = function() { - this.selector.find(".tip").hide(); - this._shown = false; -};IriSP.TraceWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - this.lastEvent = ""; - var _this = this, - _listeners = { - "IriSP.createAnnotationWidget.addedAnnotation" : 0, - "IriSP.search.open" : 0, - "IriSP.search.closed" : 0, - "IriSP.search" : 0, - "IriSP.search.cleared" : 0, - "IriSP.search.matchFound" : 0, - "IriSP.search.noMatchFound" : 0, - "IriSP.search.triggeredSearch" : 0, - "IriSP.TraceWidget.MouseEvents" : 0, - "play" : 0, - "pause" : 0, - "volumechange" : 0, - "seeked" : 0, - "play" : 0, - "pause" : 0, - "timeupdate" : 2000 - }; - IriSP._(_listeners).each(function(_ms, _listener) { - var _f = function(_arg) { - _this.eventHandler(_listener, _arg); - } - if (_ms) { - _f = IriSP.underscore.throttle(_f, _ms); - } - _this._Popcorn.listen(_listener, _f); - }); - this._Popcorn.listen("timeupdate", IriSP.underscore.throttle(function(_arg) { - _this.eventHandler(_listener, _arg); - })); - - this.tracer = IriSP.TraceManager(IriSP.jQuery).init_trace("test", this._config); - this.tracer.set_default_subject("default_subject"); - this.tracer.trace("StartTracing", { "hello": "world" }); - -} - -IriSP.TraceWidget.prototype = new IriSP.Widget(); - -IriSP.TraceWidget.prototype.draw = function() { - this.mouseLocation = ''; - var _this = this; - IriSP.jQuery(".Ldt-Widget").bind("click mouseover mouseout dragstart dragstop", function(_e) { - var _widget = IriSP.jQuery(this).attr("widget-type"), - _class = _e.target.className; - var _data = { - "type": _e.type, - "x": _e.clientX, - "y": _e.clientY, - "widget": _widget - } - if (typeof _class == "string" && _class.indexOf('Ldt-TraceMe') != -1) { - var _name = _e.target.localName, - _id = _e.target.id, - _text = _e.target.textContent.trim(), - _title = _e.target.title, - _value = _e.target.value; - _data.target = _name + (_id.length ? '#' + IriSP.jqEscape(_id) : '') + (_class.length ? ('.' + IriSP.jqEscape(_class).replace(/\s/g,'.')).replace(/\.Ldt-(Widget|TraceMe)/g,'') : ''); - if (typeof _title == "string" && _title.length && _title.length < 140) { - _data.title = _title; - } - if (typeof _text == "string" && _text.length && _text.length < 140) { - _data.text = _text; - } - if (typeof _value == "string" && _value.length) { - _data.value = _value; - } - _this._Popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); - } else { - //console.log(_e.type+','+_this.mouseLocation+','+_widget); - if (_e.type == "mouseover") { - if (_this.mouseLocation != _widget) { - _this._Popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); - } else { - if (typeof _this.moTimeout != "undefined") { - clearTimeout(_this.moTimeout); - delete _this.moTimeout; - } - } - } - if (_e.type == "click") { - _this._Popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); - } - if (_e.type == "mouseout") { - if (typeof _this.moTimeout != "undefined") { - clearTimeout(_this.moTimeout); - } - _this.moTimeout = setTimeout(function() { - if (_data.widget != _this.mouseLocation) { - _this._Popcorn.trigger('IriSP.TraceWidget.MouseEvents', _data); - } - },100); - } - } - _this.mouseLocation = _widget; - }); -} - -IriSP.TraceWidget.prototype.eventHandler = function(_listener, _arg) { - var _traceName = 'Mdp_'; - if (typeof _arg == "string" || typeof _arg == "number") { - _arg = { "value" : _arg } - } - if (typeof _arg == "undefined") { - _arg = {} - } - switch(_listener) { - case 'IriSP.TraceWidget.MouseEvents': - _traceName += _arg.widget + '_' + _arg.type; - delete _arg.widget; - delete _arg.type; - break; - case 'timeupdate': - case 'play': - case 'pause': - _arg.time = this._Popcorn.currentTime() * 1000; - case 'seeked': - case 'volumechange': - _traceName += 'Popcorn_' + _listener; - break; - default: - _traceName += _listener.replace('IriSP.','').replace('.','_'); - } - this.lastEvent = _traceName; - this.tracer.trace(_traceName, _arg); - if (this._config.js_console) { - console.log("tracer.trace('" + _traceName + "', " + JSON.stringify(_arg) + ");"); - } -} -/* a widget that displays tweet - used in conjunction with the polemicWidget */ - -IriSP.TweetsWidget = function(Popcorn, config, Serializer) { - IriSP.Widget.call(this, Popcorn, config, Serializer); - - this._displayingTweet = false; - this._timeoutId = undefined; - this._hidden = false; /* hidden means that the createAnnotationWidget is shown */ -}; - - -IriSP.TweetsWidget.prototype = new IriSP.Widget(); - - -IriSP.TweetsWidget.prototype.drawTweet = function(annotation) { - if (this._hidden) - return; - - var title = IriSP.formatTweet(annotation.content.title); - var img = annotation.content.img.src; - if (typeof(img) === "undefined" || img === "" || img === "None") { - img = this.default_profile_picture; - } - - var imageMarkup = IriSP.templToHTML("user image", - {src : img}); - - if (typeof(IriSP.get_aliased(annotation.meta, ["dc:source", "source"]).content) !== "undefined") { - var tweetContents = JSON.parse(IriSP.get_aliased(annotation.meta, ["dc:source", "source"]).content); - var creator = tweetContents.user.screen_name; - var real_name = tweetContents.user.name; - - imageMarkup = IriSP.templToHTML("user image", - {src : img, creator: creator}); - - var formatted_date = new Date(tweetContents.created_at).toLocaleDateString(); - title = IriSP.templToHTML("@{{creator}} - " + - "
    {{real_name}}
    " + - "
    {{{ contents }}}
    " + - "
    {{ date }}
    ", - {creator: creator, real_name: real_name, contents : title, date : formatted_date}); - - this.selector.find(".Ldt-TweetReply").attr("href", "http://twitter.com/home?status=@" + creator + ":%20"); - - - var rtText = Mustache.to_html("http://twitter.com/home?status=RT @{{creator}}: {{text}}", - {creator: creator, text: IriSP.encodeURI(annotation.content.title)}); - this.selector.find(".Ldt-Retweet").attr("href", rtText); - } - - this.selector.find(".Ldt-tweetContents").html(title); - this.selector.find(".Ldt-tweetAvatar").html(imageMarkup); - this.selector.show("blind", 250); -}; - -IriSP.TweetsWidget.prototype.displayTweet = function(annotation) { - if (this._displayingTweet === false) { - this._displayingTweet = true; - } else { - window.clearTimeout(this._timeoutId); - } - - this.drawTweet(annotation); - - var time = this._Popcorn.currentTime(); - this._timeoutId = window.setTimeout(IriSP.wrap(this, this.clearPanel), this.tweet_display_period); -}; - - -IriSP.TweetsWidget.prototype.clearPanel = function() { - this._displayingTweet = false; - this._timeoutId = undefined; - this.closePanel(); - -}; - -IriSP.TweetsWidget.prototype.closePanel = function() { - if (this._timeoutId != undefined) { - /* we're called from the "close window" link */ - /* cancel the timeout */ - window.clearTimeout(this._timeoutId); - this._timeoutId = null; - } - - this.selector.hide("blind", 400); - -}; - -/* cancel the timeout if the user clicks on the keep panel open button */ -IriSP.TweetsWidget.prototype.keepPanel = function() { - if (this._timeoutId != undefined) { - /* we're called from the "close window" link */ - /* cancel the timeout */ - window.clearTimeout(this._timeoutId); - this._timeoutId = null; - } -}; - -IriSP.TweetsWidget.prototype.draw = function() { - var _this = this; - - var tweetMarkup = IriSP.templToHTML(IriSP.tweetWidget_template, {"share_template" : IriSP.share_template}); - this.selector.append(tweetMarkup); - this.selector.hide(); - this.selector.find(".Ldt-tweetWidgetMinimize").click(IriSP.wrap(this, this.closePanel)); - this.selector.find(".Ldt-tweetWidgetKeepOpen").click(IriSP.wrap(this, this.keepPanel)); - - this._Popcorn.listen("IriSP.PolemicTweet.click", IriSP.wrap(this, this.PolemicTweetClickHandler)); - this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked", - IriSP.wrap(this, this.handleAnnotateSignal)); -}; - -IriSP.TweetsWidget.prototype.PolemicTweetClickHandler = function(tweet_id) { - var index, annotation; - for (index in this._serializer._data.annotations) { - annotation = this._serializer._data.annotations[index]; - - if (annotation.id === tweet_id) - break; - } - - if (annotation.id !== tweet_id) - /* we haven't found it */ - return; - - this.displayTweet(annotation); - return; -}; - -/** handle clicks on the annotate button by hiding/showing itself */ -IriSP.TweetsWidget.prototype.handleAnnotateSignal = function() { - if (this._hidden == false) { - this.selector.hide(); - this._hidden = true; - } else { - if (this._displayingTweet !== false) - this.selector.show(); - - - this._hidden = false; - } -};/** @class This class implement a serializer for the JSON-Cinelab format - @params DataLoader a dataloader reference - @url the url from which to get our cinelab - */ -IriSP.JSONSerializer = function(DataLoader, url) { - IriSP.Serializer.call(this, DataLoader, url); -}; - -IriSP.JSONSerializer.prototype = new IriSP.Serializer(); - -/** serialize data */ -IriSP.JSONSerializer.prototype.serialize = function(data) { - return JSON.stringify(data); -}; - -/** deserialize data */ -IriSP.JSONSerializer.prototype.deserialize = function(data) { - return JSON.parse(data); -}; - -/** load JSON-cinelab data and also sort the annotations by start time - @param callback function to call when the data is ready. - */ -IriSP.JSONSerializer.prototype.sync = function(callback, force_refresh) { - /* we don't have to do much because jQuery handles json for us */ - - var self = this; - - var fn = function(data) { - //TODO: seems taht data can be null here - if (data !== null) { - self._data = data; - if (typeof(self._data["annotations"]) === "undefined" || - self._data["annotations"] === null) - self._data["annotations"] = []; - - // sort the data too - self._data["annotations"].sort(function(a, b) - { var a_begin = +a.begin; - var b_begin = +b.begin; - return a_begin - b_begin; - }); - } - callback(data); - }; - this._DataLoader.get(this._url, fn, force_refresh); -}; - -/** @return the metadata about the media being read FIXME: always return the first media. */ -IriSP.JSONSerializer.prototype.currentMedia = function() { - return (typeof this._data.medias == "object" && this._data.medias.length) ? this._data.medias[0] : IriSP.__jsonMetadata.medias[0]; -}; - -IriSP.JSONSerializer.prototype.getDuration = function() { - var _m = this.currentMedia(); - if (_m === null || typeof _m.meta == "undefined") { - return 0; - } - return +(IriSP.get_aliased(_m.meta, ["dc:duration", "duration"]) || 0); -} - - -/** searches for an annotation which matches title, description and keyword - "" matches any field. - Note: it ignores tweets. - @return a list of matching ids. -*/ -IriSP.JSONSerializer.prototype.searchAnnotations = function(title, description, keyword) { - /* we can have many types of annotations. We want search to only look for regular segments */ - /* the next two lines are a bit verbose because for some test data, _serializer.data.view is either - null or undefined. - */ - var view; - - if (typeof(this._data.views) !== "undefined" && this._data.views !== null) - view = this._data.views[0]; - - var searchViewType = ""; - - if(typeof(view) !== "undefined" && typeof(view.annotation_types) !== "undefined" && view.annotation_types.length > 1) { - searchViewType = view.annotation_types[0]; - } - - var filterfn = function(annotation) { - if( searchViewType != "" && - typeof(annotation.meta) !== "undefined" && - typeof(annotation.meta["id-ref"]) !== "undefined" && - annotation.meta["id-ref"] !== searchViewType) { - return true; // don't pass - } else { - return false; - } - }; - - return this.searchAnnotationsFilter(title, description, keyword, filterfn); - -}; - -/* only look for tweets */ -IriSP.JSONSerializer.prototype.searchTweets = function(title, description, keyword) { - /* we can have many types of annotations. We want search to only look for regular segments */ - /* the next two lines are a bit verbose because for some test data, _serializer.data.view is either - null or undefined. - */ - - var searchViewType = this.getTweets(); - if (typeof(searchViewType) === "undefined") { - var view; - - if (typeof(this._data.views) !== "undefined" && this._data.views !== null) - view = this._data.views[0]; - - if(typeof(view) !== "undefined" && typeof(view.annotation_types) !== "undefined" && view.annotation_types.length > 1) { - searchViewType = view.annotation_types[0]; - } - } - var filterfn = function(annotation) { - if( searchViewType != "" && - typeof(annotation.meta) !== "undefined" && - typeof(annotation.meta["id-ref"]) !== "undefined" && - annotation.meta["id-ref"] === searchViewType) { - return false; // pass - } else { - return true; - } - }; - - return this.searchAnnotationsFilter(title, description, keyword, filterfn); - -}; - -/** - search an annotation according to its title, description and keyword - @param filter a function to filter the results with. Used to select between annotation types. - */ -IriSP.JSONSerializer.prototype.searchAnnotationsFilter = function(title, description, keyword, filter) { - - var rTitle; - var rDescription; - var rKeyword; - /* match anything if given the empty string */ - if (title == "") - title = ".*"; - if (description == "") - description = ".*"; - if (keyword == "") - keyword = ".*"; - - rTitle = new RegExp(title, "i"); - rDescription = new RegExp(description, "i"); - rKeyword = new RegExp(keyword, "i"); - - var ret_array = []; - - var i; - for (i in this._data.annotations) { - var annotation = this._data.annotations[i]; - - /* filter the annotations whose type is not the one we want */ - if (filter(annotation)) { - continue; - } - - if (rTitle.test(annotation.content.title) && - rDescription.test(annotation.content.description)) { - /* FIXME : implement keyword support */ - ret_array.push(annotation); - } - } - - return ret_array; -}; - -/** breaks a string in words and searches each of these words. Returns an array - of objects with the id of the annotation and its number of occurences. - - @param searchString a string of words. - FIXME: optimize ? seems to be n^2 in the worst case. -*/ -IriSP.JSONSerializer.prototype.searchOccurences = function(searchString) { - var ret = { }; - var keywords = searchString.split(/\s+/); - - for (var i in keywords) { - var keyword = keywords[i]; - - // search this keyword in descriptions and title - var found_annotations = [] - found_annotations = found_annotations.concat(this.searchAnnotations(keyword, "", "")); - found_annotations = found_annotations.concat(this.searchAnnotations("", keyword, "")); - - for (var j in found_annotations) { - var current_annotation = found_annotations[j]; - - if (!ret.hasOwnProperty(current_annotation.id)) { - ret[current_annotation.id] = 1; - } else { - ret[current_annotation.id] += 1; - } - - } - - }; - - return ret; -}; - -/** breaks a string in words and searches each of these words. Returns an array - of objects with the id of the annotation and its number of occurences. - - FIXME: optimize ? seems to be n^2 in the worst case. -*/ -IriSP.JSONSerializer.prototype.searchTweetsOccurences = function(searchString) { - var ret = { }; - var keywords = searchString.split(/\s+/); - - for (var i in keywords) { - var keyword = keywords[i]; - - // search this keyword in descriptions and title - var found_annotations = [] - found_annotations = found_annotations.concat(this.searchTweets(keyword, "", "")); - found_annotations = found_annotations.concat(this.searchTweets("", keyword, "")); - - for (var j in found_annotations) { - var current_annotation = found_annotations[j]; - - if (!ret.hasOwnProperty(current_annotation.id)) { - ret[current_annotation.id] = 1; - } else { - ret[current_annotation.id] += 1; - } - - } - - }; - - return ret; -}; - -/** returns all the annotations that are displayable at the moment - NB: only takes account the first type of annotations - ignores tweets - currentTime is in seconds. - - @param currentTime the time at which we search. - @param (optional) the if of the type of the annotations we want to get. - */ - -IriSP.JSONSerializer.prototype.currentAnnotations = function(currentTime, id) { - var view; - var currentTimeMs = 1000 * currentTime; - - if (typeof(id) === "undefined") { - var legal_ids = this.getNonTweetIds(); - } else { - legal_ids = [id]; - } - - var ret_array = []; - - var i; - - for (i in this._data.annotations) { - var annotation = this._data.annotations[i]; - - if (IriSP.underscore.include(legal_ids, annotation.meta["id-ref"]) && - annotation.begin <= currentTimeMs && - annotation.end >= currentTimeMs) - ret_array.push(annotation); - } - - if (ret_array == []) { - console.log("ret_array empty, ", legal_ids); - } - - return ret_array; -}; - -/** return the current chapitre - @param currentTime the current time, in seconds. -*/ -IriSP.JSONSerializer.prototype.currentChapitre = function(currentTime) { - return this.currentAnnotations(currentTime, this.getChapitrage())[0]; -}; - -/** returns a list of ids of tweet lines (aka: groups in cinelab) */ -IriSP.JSONSerializer.prototype.getTweetIds = function() { - if (IriSP.null_or_undefined(this._data.lists) || IriSP.null_or_undefined(this._data.lists) || - IriSP.null_or_undefined(this._data.views) || IriSP.null_or_undefined(this._data.views[0])) - return []; - - - /* Get the displayable types - We've got to jump through a few hoops because the json sometimes defines - fields with underscores and sometimes with dashes - */ - var annotation_types = IriSP.get_aliased(this._data.views[0], ["annotation_types", "annotation-types"]); - if (annotation_types === null) { - console.log("neither view.annotation_types nor view.annotation-types are defined"); - return; - } - - var available_types = IriSP.get_aliased(this._data, ["annotation_types", "annotation-types"]); - if (available_types === null) { - console.log("neither view.annotation_types nor view.annotation-types are defined"); - return; - } - - var potential_types = []; - - // Get the list of types which contain "Tw" in their content - for (var i = 0; i < available_types.length; i++) { - if (/Tw/i.test(IriSP.get_aliased(available_types[i], ['dc:title', 'title']))) { - potential_types.push(available_types[i].id); - } - } - - // Get the intersection of both. - var tweetsId = IriSP.underscore.intersection(annotation_types, potential_types); - - return tweetsId; -}; - -/** this function returns a list of lines which are not tweet lines */ -IriSP.JSONSerializer.prototype.getNonTweetIds = function() { - if (IriSP.null_or_undefined(this._data.lists) || IriSP.null_or_undefined(this._data.lists) || - IriSP.null_or_undefined(this._data.views) || IriSP.null_or_undefined(this._data.views[0])) - return []; - - /* Get the displayable types - We've got to jump through a few hoops because the json sometimes defines - fields with underscores and sometimes with dashes - */ - var annotation_types = IriSP.get_aliased(this._data.views[0], ["annotation_types", "annotation-types"]); - if (annotation_types === null) { - console.log("neither view.annotation_types nor view.annotation-types are defined"); - return; - } - - var available_types = IriSP.get_aliased(this._data, ["annotation_types", "annotation-types"]); - if (available_types === null) { - console.log("neither view.annotation_types nor view.annotation-types are defined"); - return; - } - - var potential_types = []; - - // Get the list of types which do not contain "Tw" in their content - for (var i = 0; i < available_types.length; i++) { - if (!(/Tw/i.test(IriSP.get_aliased(available_types[i], ['dc:title', 'title'])))) { - potential_types.push(available_types[i].id); - } - } - - // Get the intersection of both. - var nonTweetsId = IriSP.underscore.intersection(annotation_types, potential_types); - - return nonTweetsId; - -}; - -/** return the id of the ligne de temps which contains name - @param name of the ligne de temps -*/ -IriSP.JSONSerializer.prototype.getId = function(name) { - var available_types = IriSP.get_aliased(this._data, ["annotation_types", "annotation-types"]); - - if (available_types == null) - return; - - name = name.toUpperCase(); - var e; - e = IriSP.underscore.find(available_types, - function(entry) { - if (IriSP.get_aliased(entry, ['dc:title', 'title']) === null) - return false; - return (entry["dc:title"].toUpperCase().indexOf(name) !== -1); - }); - - if (typeof(e) === "undefined") - return; - - var id = e.id; - - return id; -}; - -/** return the list of id's of the ligne de temps which contains name - @param name of the ligne de temps -*/ -IriSP.JSONSerializer.prototype.getIds = function(name) { - var available_types = IriSP.get_aliased(this._data, ["annotation_types", "annotation-types"]); - - if (available_types == null) - return; - - name = name.toUpperCase(); - var e = []; - e = IriSP.underscore.filter(available_types, - function(entry) { return (IriSP.get_aliased(entry, ['dc:title', 'title']).toUpperCase().indexOf(name) !== -1) }); - return IriSP.underscore.pluck(e, "id"); -}; - -/** return the id of the ligne de temps named "Chapitrage" */ -IriSP.JSONSerializer.prototype.getChapitrage = function() { - var val = this.getId("Chapitrage"); - if (typeof(val) === "undefined") - val = this.getId("Chapter"); - if (typeof(val) === "undefined") - val = this.getId("Chapit"); - if (typeof(val) === "undefined") - val = this.getId("Chap"); - - return val; -}; - -/** return the id of the ligne de temps named "Tweets" */ -IriSP.JSONSerializer.prototype.getTweets = function() { - var val = this.getId("Tweets"); - if (typeof(val) === "undefined") - val = this.getId("Tweet"); - if (typeof(val) === "undefined") - val = this.getId("Twitter"); - if (typeof(val) === "undefined") - val = this.getId("twit"); - if (typeof(val) === "undefined") - val = this.getId("Polemic"); - - return val; -}; - -/** return the id of the ligne de temps named "Contributions" */ -IriSP.JSONSerializer.prototype.getContributions = function() { - var val = this.getId("Contribution"); - if (typeof(val) === "undefined") - val = this.getId("Particip"); - if (typeof(val) === "undefined") - val = this.getId("Contr"); - if (typeof(val) === "undefined") - val = this.getId("Publ"); - - return val; -}; \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-bg_flat_0_aaaaaa_40x100.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-bg_flat_0_aaaaaa_40x100.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-bg_flat_75_ffffff_40x100.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-bg_flat_75_ffffff_40x100.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_55_fbf9ee_1x400.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_55_fbf9ee_1x400.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_65_ffffff_1x400.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_65_ffffff_1x400.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_75_dadada_1x400.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_75_dadada_1x400.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_75_e6e6e6_1x400.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_75_e6e6e6_1x400.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_95_fef1ec_1x400.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-bg_glass_95_fef1ec_1x400.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-bg_highlight-soft_75_cccccc_1x100.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-bg_highlight-soft_75_cccccc_1x100.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-icons_222222_256x240.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-icons_222222_256x240.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-icons_2e83ff_256x240.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-icons_2e83ff_256x240.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-icons_454545_256x240.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-icons_454545_256x240.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-icons_888888_256x240.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-icons_888888_256x240.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/images/ui-icons_cd0a0a_256x240.png Binary file test/integration/allocine_dossier_independant/js/libs/images/ui-icons_cd0a0a_256x240.png has changed diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/jquery-ui.css --- a/test/integration/allocine_dossier_independant/js/libs/jquery-ui.css Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,570 +0,0 @@ -/* - * jQuery UI CSS Framework @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } -/* - * jQuery UI Accordion @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Accordion#theming - */ -/* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; }/* - * jQuery UI Autocomplete @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -/* - * jQuery UI Button @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Button#theming - */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ -/* - * jQuery UI Datepicker @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker#theming - */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - display: none; /*sorry for IE5*/ - display/**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/* - * jQuery UI Dialog @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog#theming - */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/* - * jQuery UI Progressbar @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar#theming - */ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* - * jQuery UI Resizable @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizable#theming - */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* - * jQuery UI Selectable @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectable#theming - */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } -/* - * jQuery UI Slider @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider#theming - */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* - * jQuery UI Tabs @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs#theming - */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/* - * jQuery UI CSS Framework @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/ - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } -.ui-widget-content a { color: #222222/*{fcContent}*/; } -.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } -.ui-widget-header a { color: #222222/*{fcHeader}*/; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } -.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } -.ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } -.ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } -.ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } -.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; border-radius: 4px/*{cornerRadius}*/; } - -/* Overlays */ -.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } -.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/jquery-ui.min.js --- a/test/integration/allocine_dossier_independant/js/libs/jquery-ui.min.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,784 +0,0 @@ -/*! - * jQuery UI 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.13", -keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus(); -b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this, -"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection", -function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth, -outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,"tabindex"),d=isNaN(b); -return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e= -0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= -false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); -;/* - * jQuery UI Position 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Position - */ -(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, -left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= -k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= -m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= -d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= -a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), -g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); -;/* - * jQuery UI Draggable 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Draggables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== -"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= -this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options;this.helper= -this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); -this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a); -this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b= -d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop", -a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== -a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a= -{left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&& -d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a= -this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions= -{width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+ -d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!="hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"), -10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height- -this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&& -d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0], -this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1];h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left< -g[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"); -this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.13"}); -d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var h=d.data(this,"sortable");if(h&&!h.options.disabled){c.sortables.push({instance:h,shouldRevert:h.options.revert});h.refreshPositions();h._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver= -0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs= -c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a, -true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver= -0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor= -a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable"); -if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e=j&&f<=l||h>=j&&h<=l||fl)&&(e>= -i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), -top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= -this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", -nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d
    ');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== -String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); -this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy(); -var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a= -false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"}); -this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff= -{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis]; -if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing= -false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height); -c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size, -d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidthb.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width= -a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b= -this.helper||this.element,a=0;a
    ');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left- -c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this, -arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement, -element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.13"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})}; -if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"), -p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options, -c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName), -g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"), -10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0, -top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h; -g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left: -0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position")); -if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&& -!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost== -"string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid; -var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b, -10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery); -;/* - * jQuery UI Selectable 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), -selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("
    ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, -c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting", -c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= -this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.righti||a.bottomb&&a.rightg&&a.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable"); -this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a=== -"disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&& -!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top, -left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]}; -this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!= -document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a); -return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0], -e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset(); -c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"): -this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null, -dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")}, -toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith(); -if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), -this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b= -this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f= -d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")|| -0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out", -a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h- -f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g- -this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this, -this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop", -a,this._uiHash());for(e=0;e li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); -a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); -if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", -function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a= -this.options;if(a.icons){c("").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"); -this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); -b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target); -a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ -c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options; -if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); -if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(), -e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight|| -e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false", -"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.13", -animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/); -f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide", -paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery); -;/* - * jQuery UI Autocomplete 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.position.js - */ -(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g= -false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!= -a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)}; -this.menu=d("
      ").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& -a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); -d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& -b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= -this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, -"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); -(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", --1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); -this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b, -this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| -this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| -this.first()?":last":":first"))},hasScroll:function(){return this.element.height()").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,f=d.primary&&d.secondary,e=[];if(d.primary||d.secondary){if(this.options.text)e.push("ui-button-text-icon"+(f?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("");d.secondary&&b.append("");if(!this.options.text){e.push(f?"ui-button-icons-only": -"ui-button-icon-only");this.hasTitle||b.attr("title",c)}}else e.push("ui-button-text-only");b.addClass(e.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()}, -destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery); -;/* - * jQuery UI Dialog 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.button.js - * jquery.ui.draggable.js - * jquery.ui.mouse.js - * jquery.ui.position.js - * jquery.ui.resizable.js - */ -(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false, -position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
      ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+ -b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
      ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g), -h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id", -e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); -a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!== -b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+= -1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target=== -f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
      ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a, -function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", -handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition, -originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize", -f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "): -[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f); -if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"): -e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a= -this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height- -b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.13",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "), -create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()
      ").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(), -height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight); -b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a
      ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(a.range==="min"||a.range==="max"?" ui-slider-range-"+a.range:""))}for(var j=c.length;j"); -this.handles=c.add(d(e.join("")).appendTo(b.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle", -g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!b.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");i=b._start(g,l);if(i===false)return}break}m=b.options.step;i=b.options.values&&b.options.values.length? -(h=b.values(l)):(h=b.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=b._valueMin();break;case d.ui.keyCode.END:h=b._valueMax();break;case d.ui.keyCode.PAGE_UP:h=b._trimAlignValue(i+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=b._trimAlignValue(i-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===b._valueMax())return;h=b._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===b._valueMin())return;h=b._trimAlignValue(i- -m);break}b._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(g,k);b._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy(); -return this},_mouseCapture:function(b){var a=this.options,c,f,e,j,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(a.range===true&&this.values(1)===a.min){g+=1;e=d(this.handles[g])}if(this._start(b,g)===false)return false; -this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();a=e.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-e.width()/2,top:b.pageY-a.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(b){var a= -this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;if(this.orientation==="horizontal"){a= -this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a); -c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var f;if(this.options.values&&this.options.values.length){f=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>f||a===1&&c1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max}, -_refreshValue:function(){var b=this.options.range,a=this.options,c=this,f=!this._animateOff?a.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},a.animate); -if(h===1)c.range[f?"animate":"css"]({width:e-g+"%"},{queue:false,duration:a.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},a.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:a.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1, -1)[f?"animate":"css"]({width:e+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.13"})})(jQuery); -;/* - * jQuery UI Tabs 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
      ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
    • #{label}
    • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& -e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= -d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| -(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); -this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= -this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); -if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); -this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ -g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", -function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; -this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= --1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; -d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= -d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, -e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); -j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); -if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, -this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, -load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, -"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, -url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.13"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k
      '))}function N(a){return a.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a", -"mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",function(){if(!d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); -d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==B)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.13"}});var z=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)}, -_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a, -b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('
      '))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", -function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker); -if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f==""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]); -return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a); -if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d(''); -this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/ -2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a, -"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled= -false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled= -true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false; -for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a); -d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");H(b.settings,c?c.apply(a,[a,b]):{});b.lastVal= -null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos= -null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0], -top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover"); -c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"); -a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]}, -_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e- -g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst= -null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, -_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"): -0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear= -false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay= -d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a); -else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b= -a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort, -g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!= -c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames, -h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+112?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear|| -a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay? -new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a)); -n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m, -g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+r+"":f?"":''+r+"";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&& -a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
      '+(c?h:"")+(this._isInRange(a,r)?'":"")+(c?"":h)+"
      ":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),C=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='
      '+(/all|left/.test(t)&&x==0?c? -f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'
      ';var D=j?'":"";for(t=0;t<7;t++){var q=(t+h)%7;D+="=5?' class="ui-datepicker-week-end"':"")+'>'+s[q]+""}y+=D+"";D=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay, -D);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;D=l?6:Math.ceil((t+D)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q";var R=!j?"":'";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[q]):[true,""],F=q.getMonth()!=g,L=F&&!K||!I[0]||k&&qo;R+='";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}y+=R+""}g++;if(g>11){g=0;m++}y+="
      '+this._get(a,"weekHeader")+"
      '+this._get(a,"calculateWeek")(q)+""+(F&&!C?" ":L?''+q.getDate()+ -"":''+q.getDate()+"")+"
      "+(l?"
      "+(i[0]>0&&G==i[1]-1?'
      ':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'': -"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
      ',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)? -r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+= -(h||!(j&&l)?" ":"")+o;k+="
      ";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a, -"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a, -b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!= -"string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay)); -return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&& -arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.13";window["DP_jQuery_"+z]=d})(jQuery); -;/* - * jQuery UI Progressbar 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
      ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); -this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* -this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.13"})})(jQuery); -;/* - * jQuery UI Effects 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/ - */ -jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], -16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, -a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= -a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", -"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, -0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, -211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, -d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easding:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})}; -f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this, -[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.13",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}); -c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c, -a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments); -a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%", -"pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d* -((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/= -e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/= -e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ -e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); -;/* - * jQuery UI Effects Fade 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fade - * - * Depends: - * jquery.effects.core.js - */ -(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); -;/* - * jQuery UI Effects Fold 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fold - * - * Depends: - * jquery.effects.core.js - */ -(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], -10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); -;/* - * jQuery UI Effects Highlight 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Highlight - * - * Depends: - * jquery.effects.core.js - */ -(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& -this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); -;/* - * jQuery UI Effects Pulsate 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Pulsate - * - * Depends: - * jquery.effects.core.js - */ -(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); -b.dequeue()})})}})(jQuery); -; \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/jquery.min.js --- a/test/integration/allocine_dossier_independant/js/libs/jquery.min.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
      a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
      "+""+"
      ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
      t
      ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
      ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

      ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
      ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
      ","
      "],thead:[1,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],col:[2,"","
      "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
      ","
      "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
      ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/jquery.sparkline.js --- a/test/integration/allocine_dossier_independant/js/libs/jquery.sparkline.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1271 +0,0 @@ -/** -* -* jquery.sparkline.js -* -* v1.6 -* (c) Splunk, Inc -* Contact: Gareth Watts (gareth@splunk.com) -* http://omnipotent.net/jquery.sparkline/ -* -* Generates inline sparkline charts from data supplied either to the method -* or inline in HTML -* -* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag -* (Firefox 2.0+, Safari, Opera, etc) -* -* License: New BSD License -* -* Copyright (c) 2010, Splunk Inc. -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, -* are permitted provided that the following conditions are met: -* -* * Redistributions of source code must retain the above copyright notice, -* this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the following disclaimer in the documentation -* and/or other materials provided with the distribution. -* * Neither the name of Splunk Inc nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Usage: -* $(selector).sparkline(values, options) -* -* If values is undefined or set to 'html' then the data values are read from the specified tag: -*

      Sparkline: 1,4,6,6,8,5,3,5

      -* $('.sparkline').sparkline(); -* There must be no spaces in the enclosed data set -* -* Otherwise values must be an array of numbers or null values -*

      Sparkline: This text replaced if the browser is compatible

      -* $('#sparkline1').sparkline([1,4,6,6,8,5,3,5]) -* $('#sparkline2').sparkline([1,4,6,null,null,5,3,5]) -* -* Values can also be specified in an HTML comment, or as a values attribute: -*

      Sparkline:

      -*

      Sparkline:

      -* $('.sparkline').sparkline(); -* -* For line charts, x values can also be specified: -*

      Sparkline: 1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5

      -* $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ]) -* -* By default, options should be passed in as teh second argument to the sparkline function: -* $('.sparkline').sparkline([1,2,3,4], {type: 'bar'}) -* -* Options can also be set by passing them on the tag itself. This feature is disabled by default though -* as there's a slight performance overhead: -* $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true}) -*

      Sparkline: loading

      -* Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionPrefix) -* -* Supported options: -* lineColor - Color of the line used for the chart -* fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart -* width - Width of the chart - Defaults to 3 times the number of values in pixels -* height - Height of the chart - Defaults to the height of the containing element -* chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied -* chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied -* chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax -* chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied -* chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied -* composite - If true then don't erase any existing chart attached to the tag, but draw -* another chart over the top - Note that width and height are ignored if an -* existing chart is detected. -* tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values' -* enableTagOptions - Whether to check tags for sparkline options -* tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark' -* -* There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default), -* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box' -* line - Line chart. Options: -* spotColor - Set to '' to not end each line in a circular spot -* minSpotColor - If set, color of spot at minimum value -* maxSpotColor - If set, color of spot at maximum value -* spotRadius - Radius in pixels -* lineWidth - Width of line in pixels -* normalRangeMin -* normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal" -* or expected range of values -* normalRangeColor - Color to use for the above bar -* drawNormalOnTop - Draw the normal range above the chart fill color if true -* defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart -* -* bar - Bar chart. Options: -* barColor - Color of bars for postive values -* negBarColor - Color of bars for negative values -* zeroColor - Color of bars with zero values -* nullColor - Color of bars with null values - Defaults to omitting the bar entirely -* barWidth - Width of bars in pixels -* colorMap - Optional mappnig of values to colors to override the *BarColor values above -* can be an Array of values to control the color of individual bars -* barSpacing - Gap between bars in pixels -* zeroAxis - Centers the y-axis around zero if true -* -* tristate - Charts values of win (>0), lose (<0) or draw (=0) -* posBarColor - Color of win values -* negBarColor - Color of lose values -* zeroBarColor - Color of draw values -* barWidth - Width of bars in pixels -* barSpacing - Gap between bars in pixels -* colorMap - Optional mappnig of values to colors to override the *BarColor values above -* can be an Array of values to control the color of individual bars -* -* discrete - Options: -* lineHeight - Height of each line in pixels - Defaults to 30% of the graph height -* thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor -* thresholdColor -* -* bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ... -* options: -* targetColor - The color of the vertical target marker -* targetWidth - The width of the target marker in pixels -* performanceColor - The color of the performance measure horizontal bar -* rangeColors - Colors to use for each qualitative range background color -* -* pie - Pie chart. Options: -* sliceColors - An array of colors to use for pie slices -* offset - Angle in degrees to offset the first slice - Try -90 or +90 -* -* box - Box plot. Options: -* raw - Set to true to supply pre-computed plot points as values -* values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier -* When set to false you can supply any number of values and the box plot will -* be computed for you. Default is false. -* showOutliers - Set to true (default) to display outliers as circles -* outlierIRQ - Interquartile range used to determine outliers. Default 1.5 -* boxLineColor - Outline color of the box -* boxFillColor - Fill color for the box -* whiskerColor - Line color used for whiskers -* outlierLineColor - Outline color of outlier circles -* outlierFillColor - Fill color of the outlier circles -* spotRadius - Radius of outlier circles -* medianColor - Line color of the median line -* target - Draw a target cross hair at the supplied value (default undefined) -* -* -* -* Examples: -* $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false }); -* $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 }); -* $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }): -* $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' }); -* $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' }); -* $('#pie').sparkline([1,1,2], { type:'pie' }); -*/ - - -(function($) { - - /* - * Default configuration settings - */ - var defaults = { - // Settings common to most/all chart types - common: { - type : 'line', - lineColor : '#00f', - fillColor : '#cdf', - defaultPixelsPerValue : 3, - width : 'auto', - height : 'auto', - composite : false, - tagValuesAttribute: 'values', - tagOptionsPrefix: 'spark', - enableTagOptions: false - }, - // Defaults for line charts - line: { - spotColor : '#f80', - spotRadius : 1.5, - minSpotColor : '#f80', - maxSpotColor : '#f80', - lineWidth: 1, - normalRangeMin : undefined, - normalRangeMax : undefined, - normalRangeColor : '#ccc', - drawNormalOnTop: false, - chartRangeMin : undefined, - chartRangeMax : undefined, - chartRangeMinX : undefined, - chartRangeMaxX : undefined - }, - // Defaults for bar charts - bar: { - barColor : '#00f', - negBarColor : '#f44', - zeroColor: undefined, - nullColor: undefined, - zeroAxis : undefined, - barWidth : 4, - barSpacing : 1, - chartRangeMax: undefined, - chartRangeMin: undefined, - chartRangeClip: false, - colorMap : undefined - }, - // Defaults for tristate charts - tristate: { - barWidth : 4, - barSpacing : 1, - posBarColor: '#6f6', - negBarColor : '#f44', - zeroBarColor : '#999', - colorMap : {} - }, - // Defaults for discrete charts - discrete: { - lineHeight: 'auto', - thresholdColor: undefined, - thresholdValue : 0, - chartRangeMax: undefined, - chartRangeMin: undefined, - chartRangeClip: false - }, - // Defaults for bullet charts - bullet: { - targetColor : 'red', - targetWidth : 3, // width of the target bar in pixels - performanceColor : 'blue', - rangeColors : ['#D3DAFE', '#A8B6FF', '#7F94FF' ], - base : undefined // set this to a number to change the base start number - }, - // Defaults for pie charts - pie: { - sliceColors : ['#f00', '#0f0', '#00f'] - }, - // Defaults for box plots - box: { - raw: false, - boxLineColor: 'black', - boxFillColor: '#cdf', - whiskerColor: 'black', - outlierLineColor: '#333', - outlierFillColor: 'white', - medianColor: 'red', - showOutliers: true, - outlierIQR: 1.5, - spotRadius: 1.5, - target: undefined, - targetColor: '#4a2', - chartRangeMax: undefined, - chartRangeMin: undefined - } - }; - - // Provide a cross-browser interface to a few simple drawing primitives - var VCanvas_base, VCanvas_canvas, VCanvas_vml; - $.fn.simpledraw = function(width, height, use_existing) { - if (use_existing && this[0].VCanvas) { - return this[0].VCanvas; - } - if (width === undefined) { - width=$(this).innerWidth(); - } - if (height === undefined) { - height=$(this).innerHeight(); - } - if ($.browser.hasCanvas) { - return new VCanvas_canvas(width, height, this); - } else if ($.browser.msie) { - return new VCanvas_vml(width, height, this); - } else { - return false; - } - }; - - var pending = []; - - - $.fn.sparkline = function(uservalues, userOptions) { - return this.each(function() { - var options = new $.fn.sparkline.options(this, userOptions); - var render = function() { - var values, width, height; - if (uservalues==='html' || uservalues===undefined) { - var vals = this.getAttribute(options.get('tagValuesAttribute')); - if (vals===undefined || vals===null) { - vals = $(this).html(); - } - values = vals.replace(/(^\s*\s*$)|\s+/g, '').split(','); - } else { - values = uservalues; - } - - width = options.get('width')=='auto' ? values.length*options.get('defaultPixelsPerValue') : options.get('width'); - if (options.get('height') == 'auto') { - if (!options.get('composite') || !this.VCanvas) { - // must be a better way to get the line height - var tmp = document.createElement('span'); - tmp.innerHTML = 'a'; - $(this).html(tmp); - height = $(tmp).innerHeight(); - $(tmp).remove(); - } - } else { - height = options.get('height'); - } - - $.fn.sparkline[options.get('type')].call(this, values, options, width, height); - }; - // jQuery 1.3.0 completely changed the meaning of :hidden :-/ - if (($(this).html() && $(this).is(':hidden')) || ($.fn.jquery < "1.3.0" && $(this).parents().is(':hidden')) || !$(this).parents('body').length) { - pending.push([this, render]); - } else { - render.call(this); - } - }); - }; - - $.fn.sparkline.defaults = defaults; - - - $.sparkline_display_visible = function() { - for (var i=pending.length-1; i>=0; i--) { - var el = pending[i][0]; - if ($(el).is(':visible') && !$(el).parents().is(':hidden')) { - pending[i][1].call(el); - pending.splice(i, 1); - } - } - }; - - - /** - * User option handler - */ - var UNSET_OPTION = {}; - var normalizeValue = function(val) { - switch(val) { - case 'undefined': - val = undefined; - break; - case 'null': - val = null; - break; - case 'true': - val = true; - break; - case 'false': - val = false; - break; - default: - var nf = parseFloat(val); - if (val == nf) { - val = nf; - } - } - return val; - }; - $.fn.sparkline.options = function(tag, userOptions) { - var extendedOptions; - this.userOptions = userOptions = userOptions || {}; - this.tag = tag; - this.tagValCache = {}; - var defaults = $.fn.sparkline.defaults; - var base = defaults.common; - this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix); - - var tagOptionType = this.getTagSetting('type'); - if (tagOptionType === UNSET_OPTION) { - extendedOptions = defaults[userOptions.type || base.type]; - } else { - extendedOptions = defaults[tagOptionType]; - } - this.mergedOptions = $.extend({}, base, extendedOptions, userOptions); - }; - - - $.fn.sparkline.options.prototype.getTagSetting = function(key) { - var val, i, prefix = this.tagOptionsPrefix; - if (prefix === false || prefix === undefined) { - return UNSET_OPTION; - } - if (this.tagValCache.hasOwnProperty(key)) { - val = this.tagValCache.key; - } else { - val = this.tag.getAttribute(prefix + key); - if (val === undefined || val === null) { - val = UNSET_OPTION; - } else if (val.substr(0, 1) == '[') { - val = val.substr(1, val.length-2).split(','); - for(i=val.length; i--;) { - val[i] = normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g, '')); - } - } else if (val.substr(0, 1) == '{') { - var pairs= val.substr(1, val.length-2).split(','); - val = {}; - for(i=pairs.length; i--;) { - var keyval = pairs[i].split(':', 2); - val[keyval[0].replace(/(^\s*)|(\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g, '')); - } - } else { - val = normalizeValue(val); - } - this.tagValCache.key = val; - } - return val; - }; - - $.fn.sparkline.options.prototype.get = function(key) { - var tagOption = this.getTagSetting(key); - if (tagOption !== UNSET_OPTION) { - return tagOption; - } - return this.mergedOptions[key]; - }; - - - /** - * Line charts - */ - $.fn.sparkline.line = function(values, options, width, height) { - var xvalues = [], yvalues = [], yminmax = []; - for (var i=0; imaxy) { - maxy = normalRangeMax; - } - } - if (options.get('chartRangeMin')!==undefined && (options.get('chartRangeClip') || options.get('chartRangeMin')maxy)) { - maxy = options.get('chartRangeMax'); - } - if (options.get('chartRangeMinX')!==undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX')maxx)) { - maxx = options.get('chartRangeMaxX'); - } - var rangex = maxx-minx === 0 ? 1 : maxx-minx; - var rangey = maxy-miny === 0 ? 1 : maxy-miny; - var vl = yvalues.length-1; - - if (vl<1) { - this.innerHTML = ''; - return; - } - - var target = $(this).simpledraw(width, height, options.get('composite')); - if (target) { - var canvas_width = target.pixel_width; - var canvas_height = target.pixel_height; - var canvas_top = 0; - var canvas_left = 0; - - var spotRadius = options.get('spotRadius'); - if (spotRadius && (canvas_width < (spotRadius*4) || canvas_height < (spotRadius*4))) { - spotRadius = 0; - } - if (spotRadius) { - // adjust the canvas size as required so that spots will fit - if (options.get('minSpotColor') || (options.get('spotColor') && yvalues[vl]==miny)) { - canvas_height -= Math.ceil(spotRadius); - } - if (options.get('maxSpotColor') || (options.get('spotColor') && yvalues[vl]==maxy)) { - canvas_height -= Math.ceil(spotRadius); - canvas_top += Math.ceil(spotRadius); - } - if (options.get('minSpotColor') || options.get('maxSpotColor') && (yvalues[0]==miny || yvalues[0]==maxy)) { - canvas_left += Math.ceil(spotRadius); - canvas_width -= Math.ceil(spotRadius); - } - if (options.get('spotColor') || (options.get('minSpotColor') || options.get('maxSpotColor') && (yvalues[vl]==miny||yvalues[vl]==maxy))) { - canvas_width -= Math.ceil(spotRadius); - } - } - - - canvas_height--; - - var drawNormalRange = function() { - if (normalRangeMin!==undefined) { - var ytop = canvas_top+Math.round(canvas_height-(canvas_height*((normalRangeMax-miny)/rangey))); - var height = Math.round((canvas_height*(normalRangeMax-normalRangeMin))/rangey); - target.drawRect(canvas_left, ytop, canvas_width, height, undefined, options.get('normalRangeColor')); - } - }; - - if (!options.get('drawNormalOnTop')) { - drawNormalRange(); - } - - var path = []; - var paths = [path]; - var x, y, vlen=yvalues.length; - for(i=0; i maxy) { - y=maxy; - } - if (!path.length) { - // previous value was null - path.push([canvas_left+Math.round((x-minx)*(canvas_width/rangex)), canvas_top+canvas_height]); - } - path.push([canvas_left+Math.round((x-minx)*(canvas_width/rangex)), canvas_top+Math.round(canvas_height-(canvas_height*((y-miny)/rangey)))]); - } - } - var lineshapes = []; - var fillshapes = []; - var plen=paths.length; - for(i=0; i2) { - // else we want the first value - path[0] = [ path[0][0], path[1][1] ]; - } - lineshapes.push(path); - } - - // draw the fill first, then optionally the normal range, then the line on top of that - plen = fillshapes.length; - for(i=0; imax)) { - max = options.get('chartRangeMax'); - } - var zeroAxis = options.get('zeroAxis'); - if (zeroAxis === undefined) { - zeroAxis = min<0; - } - var range = max-min === 0 ? 1 : max-min; - - var colorMapByIndex, colorMapByValue; - if ($.isArray(options.get('colorMap'))) { - colorMapByIndex = options.get('colorMap'); - colorMapByValue = null; - } else { - colorMapByIndex = null; - colorMapByValue = options.get('colorMap'); - } - - var target = $(this).simpledraw(width, height, options.get('composite')); - if (target) { - var color, - canvas_height = target.pixel_height, - yzero = min<0 && zeroAxis ? canvas_height-Math.round(canvas_height * (Math.abs(min)/range))-1 : canvas_height-1; - - for(i=values.length; i--;) { - var x = i*(options.get('barWidth')+options.get('barSpacing')), - y, - val = values[i]; - if (val===null) { - if (options.get('nullColor')) { - color = options.get('nullColor'); - val = (zeroAxis && min<0) ? 0 : min; - height = 1; - y = (zeroAxis && min<0) ? yzero : canvas_height - height; - } else { - continue; - } - } else { - if (val < min) { - val=min; - } - if (val > max) { - val=max; - } - color = (val < 0) ? options.get('negBarColor') : options.get('barColor'); - if (zeroAxis && min<0) { - height = Math.round(canvas_height*((Math.abs(val)/range)))+1; - y = (val < 0) ? yzero : yzero-height; - } else { - height = Math.round(canvas_height*((val-min)/range))+1; - y = canvas_height-height; - } - if (val===0 && options.get('zeroColor')!==undefined) { - color = options.get('zeroColor'); - } - if (colorMapByValue && colorMapByValue[val]) { - color = colorMapByValue[val]; - } else if (colorMapByIndex && colorMapByIndex.length>i) { - color = colorMapByIndex[i]; - } - if (color===null) { - continue; - } - } - target.drawRect(x, y, options.get('barWidth')-1, height-1, color, color); - } - } else { - // Remove the tag contents if sparklines aren't supported - this.innerHTML = ''; - } - }; - - - /** - * Tristate charts - */ - $.fn.sparkline.tristate = function(values, options, width, height) { - values = $.map(values, Number); - width = (values.length * options.get('barWidth')) + ((values.length-1) * options.get('barSpacing')); - - var colorMapByIndex, colorMapByValue; - if ($.isArray(options.get('colorMap'))) { - colorMapByIndex = options.get('colorMap'); - colorMapByValue = null; - } else { - colorMapByIndex = null; - colorMapByValue = options.get('colorMap'); - } - - var target = $(this).simpledraw(width, height, options.get('composite')); - if (target) { - var canvas_height = target.pixel_height, - half_height = Math.round(canvas_height/2); - - for(var i=values.length; i--;) { - var x = i*(options.get('barWidth')+options.get('barSpacing')), - y, color; - if (values[i] < 0) { - y = half_height; - height = half_height-1; - color = options.get('negBarColor'); - } else if (values[i] > 0) { - y = 0; - height = half_height-1; - color = options.get('posBarColor'); - } else { - y = half_height-1; - height = 2; - color = options.get('zeroBarColor'); - } - if (colorMapByValue && colorMapByValue[values[i]]) { - color = colorMapByValue[values[i]]; - } else if (colorMapByIndex && colorMapByIndex.length>i) { - color = colorMapByIndex[i]; - } - if (color===null) { - continue; - } - target.drawRect(x, y, options.get('barWidth')-1, height-1, color, color); - } - } else { - // Remove the tag contents if sparklines aren't supported - this.innerHTML = ''; - } - }; - - - /** - * Discrete charts - */ - $.fn.sparkline.discrete = function(values, options, width, height) { - values = $.map(values, Number); - width = options.get('width')=='auto' ? values.length*2 : width; - var interval = Math.floor(width / values.length); - - var target = $(this).simpledraw(width, height, options.get('composite')); - if (target) { - var canvas_height = target.pixel_height, - line_height = options.get('lineHeight') == 'auto' ? Math.round(canvas_height * 0.3) : options.get('lineHeight'), - pheight = canvas_height - line_height, - min = Math.min.apply(Math, values), - max = Math.max.apply(Math, values); - if (options.get('chartRangeMin')!==undefined && (options.get('chartRangeClip') || options.get('chartRangeMin')max)) { - max = options.get('chartRangeMax'); - } - var range = max-min; - - for(var i=values.length; i--;) { - var val = values[i]; - if (val < min) { - val=min; - } - if (val > max) { - val=max; - } - var x = (i*interval), - ytop = Math.round(pheight-pheight*((val-min)/range)); - target.drawLine(x, ytop, x, ytop+line_height, (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor')); - } - } else { - // Remove the tag contents if sparklines aren't supported - this.innerHTML = ''; - } - - }; - - - /** - * Bullet charts - */ - $.fn.sparkline.bullet = function(values, options, width, height) { - values = $.map(values, Number); - // target, performance, range1, range2, range3 - - width = options.get('width')=='auto' ? '4.0em' : width; - - var target = $(this).simpledraw(width, height, options.get('composite')); - if (target && values.length>1) { - var canvas_width = target.pixel_width-Math.ceil(options.get('targetWidth')/2), - canvas_height = target.pixel_height, - min = Math.min.apply(Math, values), - max = Math.max.apply(Math, values); - - if (options.get('base') === undefined) { - min = min < 0 ? min : 0; - } else { - min = options.get('base'); - } - var range = max-min; - - // draw range values - for(var i=2, vlen=values.length; i1) { - var canvas_width = target.pixel_width, - canvas_height = target.pixel_height, - radius = Math.floor(Math.min(canvas_width, canvas_height)/2), - total = 0, - next = 0, - circle = 2*Math.PI; - - for(var i=values.length; i--;) { - total += values[i]; - } - - if (options.get('offset')) { - next += (2*Math.PI)*(options.get('offset')/360); - } - var vlen = values.length; - for(i=0; i 0) { // avoid divide by zero - end = next + (circle*(values[i]/total)); - } - target.drawPieSlice(radius, radius, radius, start, end, undefined, options.get('sliceColors')[i % options.get('sliceColors').length]); - next = end; - } - } - }; - - - /** - * Box plots - */ - var quartile = function(values, q) { - if (q==2) { - var vl2 = Math.floor(values.length/2); - return values.length % 2 ? values[vl2] : (values[vl2]+values[vl2+1])/2; - } else { - var vl4 = Math.floor(values.length/4); - return values.length % 2 ? (values[vl4*q]+values[vl4*q+1])/2 : values[vl4*q]; - } - }; - - $.fn.sparkline.box = function(values, options, width, height) { - values = $.map(values, Number); - width = options.get('width')=='auto' ? '4.0em' : width; - - var minvalue = options.get('chartRangeMin')===undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'), - maxvalue = options.get('chartRangeMax')===undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'), - target = $(this).simpledraw(width, height, options.get('composite')), - vlen = values.length, - lwhisker, loutlier, q1, q2, q3, rwhisker, routlier; - - if (target && values.length>1) { - var canvas_width = target.pixel_width, - canvas_height = target.pixel_height; - if (options.get('raw')) { - if (options.get('showOutliers') && values.length>5) { - loutlier=values[0]; lwhisker=values[1]; q1=values[2]; q2=values[3]; q3=values[4]; rwhisker=values[5]; routlier=values[6]; - } else { - lwhisker=values[0]; q1=values[1]; q2=values[2]; q3=values[3]; rwhisker=values[4]; - } - } else { - values.sort(function(a, b) { return a-b; }); - q1 = quartile(values, 1); - q2 = quartile(values, 2); - q3 = quartile(values, 3); - var iqr = q3-q1; - if (options.get('showOutliers')) { - lwhisker=undefined; rwhisker=undefined; - for(var i=0; i q1-(iqr*options.get('outlierIQR'))) { - lwhisker = values[i]; - } - if (values[i] < q3+(iqr*options.get('outlierIQR'))) { - rwhisker = values[i]; - } - } - loutlier = values[0]; - routlier = values[vlen-1]; - } else { - lwhisker = values[0]; - rwhisker = values[vlen-1]; - } - } - - var unitsize = canvas_width / (maxvalue-minvalue+1), - canvas_left = 0; - if (options.get('showOutliers')) { - canvas_left = Math.ceil(options.get('spotRadius')); - canvas_width -= 2*Math.ceil(options.get('spotRadius')); - unitsize = canvas_width / (maxvalue-minvalue+1); - if (loutlier < lwhisker) { - target.drawCircle((loutlier-minvalue)*unitsize+canvas_left, canvas_height/2, options.get('spotRadius'), options.get('outlierLineColor'), options.get('outlierFillColor')); - } - if (routlier > rwhisker) { - target.drawCircle((routlier-minvalue)*unitsize+canvas_left, canvas_height/2, options.get('spotRadius'), options.get('outlierLineColor'), options.get('outlierFillColor')); - } - } - - // box - target.drawRect( - Math.round((q1-minvalue)*unitsize+canvas_left), - Math.round(canvas_height*0.1), - Math.round((q3-q1)*unitsize), - Math.round(canvas_height*0.8), - options.get('boxLineColor'), - options.get('boxFillColor')); - // left whisker - target.drawLine( - Math.round((lwhisker-minvalue)*unitsize+canvas_left), - Math.round(canvas_height/2), - Math.round((q1-minvalue)*unitsize+canvas_left), - Math.round(canvas_height/2), - options.get('lineColor')); - target.drawLine( - Math.round((lwhisker-minvalue)*unitsize+canvas_left), - Math.round(canvas_height/4), - Math.round((lwhisker-minvalue)*unitsize+canvas_left), - Math.round(canvas_height-canvas_height/4), - options.get('whiskerColor')); - // right whisker - target.drawLine(Math.round((rwhisker-minvalue)*unitsize+canvas_left), - Math.round(canvas_height/2), - Math.round((q3-minvalue)*unitsize+canvas_left), - Math.round(canvas_height/2), - options.get('lineColor')); - target.drawLine( - Math.round((rwhisker-minvalue)*unitsize+canvas_left), - Math.round(canvas_height/4), - Math.round((rwhisker-minvalue)*unitsize+canvas_left), - Math.round(canvas_height-canvas_height/4), - options.get('whiskerColor')); - // median line - target.drawLine( - Math.round((q2-minvalue)*unitsize+canvas_left), - Math.round(canvas_height*0.1), - Math.round((q2-minvalue)*unitsize+canvas_left), - Math.round(canvas_height*0.9), - options.get('medianColor')); - if (options.get('target')) { - var size = Math.ceil(options.get('spotRadius')); - target.drawLine( - Math.round((options.get('target')-minvalue)*unitsize+canvas_left), - Math.round((canvas_height/2)-size), - Math.round((options.get('target')-minvalue)*unitsize+canvas_left), - Math.round((canvas_height/2)+size), - options.get('targetColor')); - target.drawLine( - Math.round((options.get('target')-minvalue)*unitsize+canvas_left-size), - Math.round(canvas_height/2), - Math.round((options.get('target')-minvalue)*unitsize+canvas_left+size), - Math.round(canvas_height/2), - options.get('targetColor')); - } - } else { - // Remove the tag contents if sparklines aren't supported - this.innerHTML = ''; - } - }; - - - // Setup a very simple "virtual canvas" to make drawing the few shapes we need easier - // This is accessible as $(foo).simpledraw() - - if ($.browser.msie && !document.namespaces.v) { - document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML'); - } - - if ($.browser.hasCanvas === undefined) { - var t = document.createElement('canvas'); - $.browser.hasCanvas = t.getContext!==undefined; - } - - VCanvas_base = function(width, height, target) { - }; - - VCanvas_base.prototype = { - init : function(width, height, target) { - this.width = width; - this.height = height; - this.target = target; - if (target[0]) { - target=target[0]; - } - target.VCanvas = this; - }, - - drawShape : function(path, lineColor, fillColor, lineWidth) { - alert('drawShape not implemented'); - }, - - drawLine : function(x1, y1, x2, y2, lineColor, lineWidth) { - return this.drawShape([ [x1,y1], [x2,y2] ], lineColor, lineWidth); - }, - - drawCircle : function(x, y, radius, lineColor, fillColor) { - alert('drawCircle not implemented'); - }, - - drawPieSlice : function(x, y, radius, startAngle, endAngle, lineColor, fillColor) { - alert('drawPieSlice not implemented'); - }, - - drawRect : function(x, y, width, height, lineColor, fillColor) { - alert('drawRect not implemented'); - }, - - getElement : function() { - return this.canvas; - }, - - _insert : function(el, target) { - $(target).html(el); - } - }; - - VCanvas_canvas = function(width, height, target) { - return this.init(width, height, target); - }; - - VCanvas_canvas.prototype = $.extend(new VCanvas_base(), { - _super : VCanvas_base.prototype, - - init : function(width, height, target) { - this._super.init(width, height, target); - this.canvas = document.createElement('canvas'); - if (target[0]) { - target=target[0]; - } - target.VCanvas = this; - $(this.canvas).css({ display:'inline-block', width:width, height:height, verticalAlign:'top' }); - this._insert(this.canvas, target); - this.pixel_height = $(this.canvas).height(); - this.pixel_width = $(this.canvas).width(); - this.canvas.width = this.pixel_width; - this.canvas.height = this.pixel_height; - $(this.canvas).css({width: this.pixel_width, height: this.pixel_height}); - }, - - _getContext : function(lineColor, fillColor, lineWidth) { - var context = this.canvas.getContext('2d'); - if (lineColor !== undefined) { - context.strokeStyle = lineColor; - } - context.lineWidth = lineWidth===undefined ? 1 : lineWidth; - if (fillColor !== undefined) { - context.fillStyle = fillColor; - } - return context; - }, - - drawShape : function(path, lineColor, fillColor, lineWidth) { - var context = this._getContext(lineColor, fillColor, lineWidth); - context.beginPath(); - context.moveTo(path[0][0]+0.5, path[0][1]+0.5); - for(var i=1, plen=path.length; i'; - this.canvas.insertAdjacentHTML('beforeEnd', groupel); - this.group = $(this.canvas).children()[0]; - }, - - drawShape : function(path, lineColor, fillColor, lineWidth) { - var vpath = []; - for(var i=0, plen=path.length; i' + - ' '; - this.group.insertAdjacentHTML('beforeEnd', vel); - }, - - drawCircle : function(x, y, radius, lineColor, fillColor) { - x -= radius+1; - y -= radius+1; - var stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="1" strokeColor="'+lineColor+'" '; - var fill = fillColor === undefined ? ' filled="false"' : ' fillColor="'+fillColor+'" filled="true" '; - var vel = ''; - this.group.insertAdjacentHTML('beforeEnd', vel); - - }, - - drawPieSlice : function(x, y, radius, startAngle, endAngle, lineColor, fillColor) { - if (startAngle == endAngle) { - return; // VML seems to have problem when start angle equals end angle. - } - if ((endAngle - startAngle) == (2*Math.PI)) { - startAngle = 0.0; // VML seems to have a problem when drawing a full circle that doesn't start 0 - endAngle = (2*Math.PI); - } - - var startx = x + Math.round(Math.cos(startAngle) * radius); - var starty = y + Math.round(Math.sin(startAngle) * radius); - var endx = x + Math.round(Math.cos(endAngle) * radius); - var endy = y + Math.round(Math.sin(endAngle) * radius); - - // Prevent very small slices from being mistaken as a whole pie - if (startx==endx && starty==endy && (endAngle-startAngle) < Math.PI) { - return; - } - - var vpath = [ x-radius, y-radius, x+radius, y+radius, startx, starty, endx, endy ]; - var stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="1" strokeColor="'+lineColor+'" '; - var fill = fillColor === undefined ? ' filled="false"' : ' fillColor="'+fillColor+'" filled="true" '; - var vel = '' + - ' '; - this.group.insertAdjacentHTML('beforeEnd', vel); - }, - - drawRect : function(x, y, width, height, lineColor, fillColor) { - return this.drawShape( [ [x, y], [x, y+height], [x+width, y+height], [x+width, y], [x, y] ], lineColor, fillColor); - } - }); - -})(jQuery); diff -r f11b234497f7 -r 61c384dda19e test/integration/allocine_dossier_independant/js/libs/jquery.tools.min.js --- a/test/integration/allocine_dossier_independant/js/libs/jquery.tools.min.js Fri Apr 27 19:18:21 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -/* - * jQuery Tools 1.2.5 - The missing UI library for the Web - * - * [jquery, toolbox.flashembed, toolbox.history, toolbox.expose, toolbox.mousewheel, tabs, tabs.slideshow, tooltip, tooltip.slide, tooltip.dynamic, scrollable, scrollable.autoscroll, scrollable.navigator, overlay, overlay.apple, dateinput, rangeinput, validator] - * - * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE. - * - * http://flowplayer.org/tools/ - * - * jQuery JavaScript Library v1.4.2 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://docs.jquery.com/License - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * ----- - * - - - * jquery.event.wheel.js - rev 1 - * Copyright (c) 2008, Three Dub Media (http://threedubmedia.com) - * Liscensed under the MIT License (MIT-LICENSE.txt) - * http://www.opensource.org/licenses/mit-license.php - * Created: 2008-07-01 | Updated: 2008-07-14 - * - * ----- - * - * File generated: Tue Sep 21 12:33:09 GMT 2010 - */ -(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, -Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& -(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, -a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== -"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, -function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
      a"; -var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, -parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= -false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= -s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, -applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; -else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, -a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== -w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, -cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= -c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); -a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, -function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); -k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), -C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= -e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& -f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; -if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", -e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, -"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, -d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, -e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); -t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| -g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, -text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, -setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= -h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== -"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, -h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& -q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

      ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); -(function(){var g=s.createElement("div");g.innerHTML="
      ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: -function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= -{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", -d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
      ","
      "],thead:[1,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],col:[2,"","
      "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
      ","
      "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, -""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); -return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", -""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= -c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? -c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= -function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= -Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, -"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= -a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= -a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== -"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
      ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, -serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), -function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, -global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& -e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? -"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== -false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= -false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", -c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| -d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); -g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== -1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== -"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; -if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== -"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| -c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; -this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= -this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, -e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
      "; -a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); -c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, -d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- -f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": -"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in -e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); -(function(){function f(a,b){if(b)for(var c in b)if(b.hasOwnProperty(c))a[c]=b[c];return a}function l(a,b){var c=[];for(var d in a)if(a.hasOwnProperty(d))c[d]=b(a[d]);return c}function m(a,b,c){if(e.isSupported(b.version))a.innerHTML=e.getHTML(b,c);else if(b.expressInstall&&e.isSupported([6,65]))a.innerHTML=e.getHTML(f(b,{src:b.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else{if(!a.innerHTML.replace(/\s/g,"")){a.innerHTML="

      Flash version "+b.version+ -" or greater is required

      "+(g[0]>0?"Your version is "+g:"You have no flash plugin installed")+"

      "+(a.tagName=="A"?"

      Click here to download latest version

      ":"

      Download latest version from here

      ");if(a.tagName=="A")a.onclick=function(){location.href=k}}if(b.onFail){var d=b.onFail.call(this);if(typeof d=="string")a.innerHTML=d}}if(i)window[b.id]=document.getElementById(b.id);f(this,{getRoot:function(){return a},getOptions:function(){return b},getConf:function(){return c}, -getApi:function(){return a.firstChild}})}var i=document.all,k="http://www.adobe.com/go/getflashplayer",n=typeof jQuery=="function",o=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,j={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}}); -window.flashembed=function(a,b,c){if(typeof a=="string")a=document.getElementById(a.replace("#",""));if(a){if(typeof b=="string")b={src:b};return new m(a,f(f({},j),b),c)}};var e=f(window.flashembed,{conf:j,getVersion:function(){var a,b;try{b=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(c){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"))&&a.GetVariable("$version")}catch(d){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"))&&a.GetVariable("$version")}catch(h){}}}return(b= -o.exec(b))?[b[1],b[3]]:[0,0]},asString:function(a){if(a===null||a===undefined)return null;var b=typeof a;if(b=="object"&&a.push)b="array";switch(b){case "string":a=a.replace(new RegExp('(["\\\\])',"g"),"\\$1");a=a.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+a+'"';case "array":return"["+l(a,function(d){return e.asString(d)}).join(",")+"]";case "function":return'"function()"';case "object":b=[];for(var c in a)a.hasOwnProperty(c)&&b.push('"'+c+'":'+e.asString(a[c]));return"{"+b.join(",")+"}"}return String(a).replace(/\s/g, -" ").replace(/\'/g,'"')},getHTML:function(a,b){a=f({},a);var c='';a.width=a.height=a.id=a.w3c=a.src=null;a.onFail=a.version=a.expressInstall=null;for(var d in a)if(a[d])c+= -'';a="";if(b){for(var h in b)if(b[h]){d=b[h];a+=h+"="+(/function|object/.test(typeof d)?e.asString(d):d)+"&"}a=a.slice(0,-1);c+='"}c+="";return c},isSupported:function(a){return g[0]>a[0]||g[0]==a[0]&&g[1]>=a[1]}}),g=e.getVersion();if(n){jQuery.tools=jQuery.tools||{version:"1.2.5"};jQuery.tools.flashembed={conf:j};jQuery.fn.flashembed=function(a,b){return this.each(function(){$(this).data("flashembed",flashembed(this, -a,b))})}}})(); -(function(b){function h(c){if(c){var a=d.contentWindow.document;a.open().close();a.location.hash=c}}var g,d,f,i;b.tools=b.tools||{version:"1.2.5"};b.tools.history={init:function(c){if(!i){if(b.browser.msie&&b.browser.version<"8"){if(!d){d=b("