/*
 * target.textResizeDetector
 * @author Lenny Burdette lburdette@schematic.com
 * @fileoverview Rewritten text resize detector to remove jQuery dependency.
 * Doesn't work in Opera.
 * @usage 
 * 
 * 		target.textResizeDetector.init("id-of-dom-element", function(event, initialSize) {
 * 			event.subscribe(textSizeChangeHandler);	
 *		});
 * 
 * Previous license:
 * 
 * Copyright (c) 2008 Tom Deater (http://www.tomdeater.com)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Renamed to "onTextResize" for a more descriptive name
 * Modified to check if the browser either zooms or text-resizes
 * (Does not fire if browser uses zoom)
 *
 * uses an iframe, sized in ems, to detect text size changes then trigger a "textresize" event
 * heavily based on code by Hedger Wang: http://www.hedgerwow.com/360/dhtml/js-onfontresize.html
 *
 * "textresize" event is triggered on the document object
 * subscribe to event using: $(document).bind("textresize", function (event, data) {});
 * "data" contains the current size of 1 em unit (in pixels)
 * 
 */
window.target=window.target||{};target.textResizeDetector=function(){var a=YAHOO,k=a.util.Event,e=a.env.ua;if(e.opera){return null}var i=new YAHOO.util.CustomEvent("fontsizechange");var d="target.textResizeDetector.event";var c;var l={};var b="target.textResizeDetector.setSize";function j(m,n){f(m);h();n(i,l)}function f(m){c=document.createElement("iframe");c.src="/wp-content/themes/boutique-blog/blank.html";c.id="frame-onTextResize"+new Date().getTime();c.title="empty";c.frameborder=0;var n={width:"100em",height:"10px",position:"absolute",borderWidth:0,top:"-9999px",left:"-9999px"};for(var o in n){c.style[o]=n[o]}m.appendChild(c)}function h(){if(e.ie){k.on(c,"resize",g)}else{var o=c.contentWindow||c.contentDocument||c.document;o=o.document||o;var n=c.contentWindow;var m='style="width:100%;height:100%;padding:0;margin:0;overflow:hidden;"';o.open();o.write("<html "+m+"><body "+m+"></body></html>");o.close();k.on(n,"resize",g)}l=c.offsetWidth/100}function g(){l=c.offsetWidth/100;i.fire(l)}return{init:function(n,m){k.onAvailable(n,function(){j(document.getElementById(n),m)})},event:i,getSize:function(){return l},setSize:function(m){l=m}}}();