/*** (c) 2008 Copyright WebCollage, Inc. All Rights Reserved. Protected by US Patent 6,865,593 and pending patent applications ***/
//------------------- prefix.js Begin -------------------
if (typeof _wcroot == "undefined")
{

//------------------- prefix.js End -------------------
//------------------- jquery/jquery-1.4.2.min.js Begin -------------------
/*!
 * jQuery JavaScript Library v1.4.2
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Sat Feb 13 22:33:48 2010 -0500
 */
(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<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\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<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
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="<input type='radio' name='radiotest' checked='checked'/>";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<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-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<d;j++){var i=
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=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<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=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<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-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;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){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<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=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 h<l[3]-0},gt:function(g,h,l){return h>l[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<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/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<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";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="<a href='#'></a>";
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="<p class='TEST'></p>";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="<div class='test e'></div><div class='test'></div>";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<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},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<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-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=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_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<div>","</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;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||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;e<j;e++){var i=(e>0?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]==="<table>"&&!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=/<script(.|\s)*?\/script>/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("<div />").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<b;a++){var d=c.data(this[a],"olddisplay");
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").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<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
this.each(function(){for(var f=d.length-1;f>=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.length;b++)a[b]()||a.splice(b--,1);a.length||
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
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);

//------------------- jquery/jquery-1.4.2.min.js End -------------------
//------------------- jquery/renameJquery.js Begin -------------------

_wcjq = jQuery.noConflict(true);

//------------------- jquery/renameJquery.js End -------------------
//------------------- flowplayer/flowplayer-3.2.2.min.js Begin -------------------
/* 
 * flowplayer.js 3.2.2. The Flowplayer API
 * 
 * Copyright 2010 Flowplayer Oy
 * 
 * This file is part of Flowplayer.
 * 
 * Flowplayer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Flowplayer 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Date: 2010-05-20 17:15:38 +0000 (Thu, 20 May 2010)
 * Revision: 480 
 */
(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.slice(0,q)||"*";var o=s.slice(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).slice(2,10)}var h=function(t,r,s){var q=this,p={},u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.slice(0,v.length-1);var w="onBefore"+v.slice(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var o=this,s={},u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var z=q._api().fp_getPlugin(p);if(!z){return}i(o,z);delete o.methods;if(!u){m(z.methods,function(){var B=""+this;o[B]=function(){var C=[].slice.call(arguments);var D=q._api().fp_invoke(p,B,C);return D==="undefined"||D===undefined?o:D}});u=true}}var A=s[w];if(A){var y=A.apply(o,v);if(w.slice(0,1)=="_"){delete s[w]}return y}return o}})};function b(q,G,t){var w=this,v=null,D=false,u,s,F=[],y={},x={},E,r,p,C,o,A;i(w,{id:function(){return E},isLoaded:function(){return(v!==null&&v.fp_play!=undefined&&!D)},getParent:function(){return q},hide:function(H){if(H){q.style.height="0px"}if(w.isLoaded()){v.style.height="0px"}return w},show:function(){q.style.height=A+"px";if(w.isLoaded()){v.style.height=o+"px"}return w},isHidden:function(){return w.isLoaded()&&parseInt(v.style.height,10)===0},kill:function(){for(var i=0;i<a.length;++i)if(a[i]===w){delete(a[i]);for (var j=i+1;j<a.length;++j)a[j-1]=a[j];a.pop();}},load:function(J){if(!w.isLoaded()&&w._fireEvent("onBeforeLoad")!==false){var H=function(){u=q.innerHTML;if(u&&!flashembed.isSupported(G.version)){q.innerHTML=""}flashembed(q,G,{config:t});if(J){J.cached=true;j(x,"onLoad",J)}};var I=0;m(a,function(){this.unload(function(K){if(++I==a.length){H()}})})}return w},unload:function(J){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(J){J(false)}return w}if(u.replace(/\s/g,"")!==""){if(w._fireEvent("onBeforeUnload")===false){if(J){J(false)}return w}D=true;try{if(v){v.fp_close();w._fireEvent("onUnload")}}catch(H){}var I=function(){v=null;q.innerHTML=u;D=false;if(J){J(true)}};setTimeout(I,50)}else{if(J){J(false)}}return w},getClip:function(H){if(H===undefined){H=C}return F[H]},getCommonClip:function(){return s},getPlaylist:function(){return F},getPlugin:function(H){var J=y[H];if(!J&&w.isLoaded()){var I=w._api().fp_getPlugin(H);if(I){J=new l(H,I,w);y[H]=J}}return J},getScreen:function(){return w.getPlugin("screen")},getControls:function(){return w.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return w.getPlugin("logo")._fireEvent("onUpdate")}catch(H){}},getPlay:function(){return w.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(H){return H?k(t):t},getFlashParams:function(){return G},loadPlugin:function(K,J,M,L){if(typeof M=="function"){L=M;M={}}var I=L?e():"_";w._api().fp_loadPlugin(K,J,M,I);var H={};H[I]=L;var N=new l(K,null,w,H);y[K]=N;return N},getState:function(){return w.isLoaded()?v.fp_getState():-1},play:function(I,H){var J=function(){if(I!==undefined){w._api().fp_play(I,H)}else{w._api().fp_play()}};if(w.isLoaded()){J()}else{if(D){setTimeout(function(){w.play(I,H)},50)}else{w.load(function(){J()})}}return w},getVersion:function(){var I="flowplayer.js 3.2.0";if(w.isLoaded()){var H=v.fp_getVersion();H.push(I);return H}return I},_api:function(){if(!w.isLoaded()){throw"Flowplayer "+w.id()+" not loaded when calling an API method"}return v},setClip:function(H){w.setPlaylist([H]);return w},getIndex:function(){return p}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var H="on"+this;if(H.indexOf("*")!=-1){H=H.slice(0,H.length-1);var I="onBefore"+H.slice(2);w[I]=function(J){j(x,I,J);return w}}w[H]=function(J){j(x,H,J);return w}});m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","),function(){var H=this;w[H]=function(J,I){if(!w.isLoaded()){return w}var K=null;if(J!==undefined&&I!==undefined){K=v["fp_"+H](J,I)}else{K=(J===undefined)?v["fp_"+H]():v["fp_"+H](J)}return K==="undefined"||K===undefined?w:K}});w._fireEvent=function(Q){if(typeof Q=="string"){Q=[Q]}var R=Q[0],O=Q[1],M=Q[2],L=Q[3],K=0;if(t.debug){g(Q)}if(!w.isLoaded()&&R=="onLoad"&&O=="player"){v=v||c(r);o=v.clientHeight;m(F,function(){this._fireEvent("onLoad")});m(y,function(S,T){T._fireEvent("onUpdate")});s._fireEvent("onLoad")}if(R=="onLoad"&&O!="player"){return}if(R=="onError"){if(typeof O=="string"||(typeof O=="number"&&typeof M=="number")){O=M;M=L}}if(R=="onContextMenu"){m(t.contextMenu[O],function(S,T){T.call(w)});return}if(R=="onPluginEvent"||R=="onBeforePluginEvent"){var H=O.name||O;var I=y[H];if(I){I._fireEvent("onUpdate",O);return I._fireEvent(M,Q.slice(3))}return}if(R=="onPlaylistReplace"){F=[];var N=0;m(O,function(){F.push(new h(this,N++,w))})}if(R=="onClipAdd"){if(O.isInStream){return}O=new h(O,M,w);F.splice(M,0,O);for(K=M+1;K<F.length;K++){F[K].index++}}var P=true;if(typeof O=="number"&&O<F.length){C=O;var J=F[O];if(J){P=J._fireEvent(R,M,L)}if(!J||P!==false){P=s._fireEvent(R,M,L,J)}}m(x[R],function(){P=this.call(w,O,M);if(this.cached){x[R].splice(K,1)}if(P===false){return false}K++});return P};function B(){if($f(q)){$f(q).getParent().innerHTML="";p=$f(q).getIndex();a[p]=w}else{a.push(w);p=a.length-1}A=parseInt(q.style.height,10)||q.clientHeight;E=q.id||"fp"+e();r=G.id||E+"_api";G.id=r;t.playerId=E;if(typeof t=="string"){t={clip:{url:t}}}if(typeof t.clip=="string"){t.clip={url:t.clip}}t.clip=t.clip||{};if(q.getAttribute("href",2)&&!t.clip.url){t.clip.url=q.getAttribute("href",2)}s=new h(t.clip,-1,w);t.playlist=t.playlist||[t.clip];var H=0;m(t.playlist,function(){var J=this;if(typeof J=="object"&&J.length){J={url:""+J}}m(t.clip,function(K,L){if(L!==undefined&&J[K]===undefined&&typeof L!="function"){J[K]=L}});t.playlist[H]=J;J=new h(J,H,w);F.push(J);H++});m(t,function(J,K){if(typeof K=="function"){if(s[J]){s[J](K)}else{j(x,J,K)}delete t[J]}});m(t.plugins,function(J,K){if(K){y[J]=new l(J,K,w)}});if(!t.plugins||t.plugins.controls===undefined){y.controls=new l("controls",null,w)}y.canvas=new l("canvas",null,w);function I(J){if(!w.isLoaded()&&w._fireEvent("onBeforeClick")!==false){w.load()}return f(J)}u=q.innerHTML;if(u.replace(/\s/g,"")!==""){if(q.addEventListener){q.addEventListener("click",I,false)}else{if(q.attachEvent){q.attachEvent("onclick",I)}}}else{if(q.addEventListener){q.addEventListener("click",f,false)}w.load()}}if(typeof q=="string"){var z=c(q);if(!z){throw"Flowplayer cannot access element: "+q}else{q=z;B()}}else{B()}}var a=[];function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:true},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:o,t,q)}}else{if(o){return new b(o,t,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var h=document.all,j="http://www.adobe.com/go/getflashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={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};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function i(l,f){if(f){for(key in f){if(f.hasOwnProperty(key)){l[key]=f[key]}}}return l}function a(f,n){var m=[];for(var l in f){if(f.hasOwnProperty(l)){m[l]=n(f[l])}}return m}window.flashembed=function(f,m,l){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(!f){return}if(typeof m=="string"){m={src:m}}return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(n){try{var l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=l&&l.GetVariable("$version")}catch(m){}}f=e.exec(f);return f?[f[1],f[3]]:[0,0]},asString:function(l){if(l===null||l===undefined){return null}var f=typeof l;if(f=="object"&&l.push){f="array"}switch(f){case"string":l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+l+'"';case"array":return"["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return'"function()"';case"object":var m=[];for(var n in l){if(l.hasOwnProperty(n)){m.push('"'+n+'":'+g.asString(l[n]))}}return"{"+m.join(",")+"}"}return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n='<object width="'+o.width+'" height="'+o.height+'" id="'+o.id+'" name="'+o.id+'"';if(o.cachebusting){o.src+=((o.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(o.w3c||!h){n+=' data="'+o.src+'" type="application/x-shockwave-flash"'}else{n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}n+=">";if(o.w3c||h){n+='<param name="movie" value="'+o.src+'" />'}o.width=o.height=o.id=o.w3c=o.src=null;o.onFail=o.version=o.expressInstall=null;for(var m in o){if(o[m]){n+='<param name="'+m+'" value="'+o[m]+'" />'}}var p="";if(l){for(var f in l){if(l[f]){var q=l[f];p+=f+"="+(/function|object/.test(typeof q)?g.asString(q):q)+"&"}}p=p.slice(0,-1);n+='<param name="flashvars" value=\''+p+"' />"}n+="</object>";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion();function d(f,n,m){if(g.isSupported(n.version)){try{f.innerHTML = g.getHTML(n,m);}catch(ex){if(typeof _wcjq!="undefined"){_wcjq(f).html(g.getHTML(n,m));}else{$(f).html(g.getHTML(n,m));}}}else{if(n.expressInstall&&g.isSupported([6,65])){f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="<h2>Flash version "+n.version+" or greater is required</h2><h3>"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"</h3>"+(f.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+j+"'>here</a></p>");if(f.tagName=="A"){f.onclick=function(){location.href=j;return false;}}}if(n.onFail){var l=n.onFail.call(this);if(typeof l=="string"){f.innerHTML=l}}}}if(h){window[n.id]=document.getElementById(n.id)}i(this,{getRoot:function(){return f},getOptions:function(){return n},getConf:function(){return m},getApi:function(){return f.firstChild}})}if(c){jQuery.tools=jQuery.tools||{version:"3.2.0"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}})();
//------------------- flowplayer/flowplayer-3.2.2.min.js End -------------------
//------------------- flowplayer/flowplayer.controls-3.0.2.js Begin -------------------
/**
 * flowplayer.controls 3.0.2. Flowplayer JavaScript plugin.
 * 
 * This file is part of Flowplayer, http://flowplayer.org
 *
 * Author: Tero Piirainen, <info@flowplayer.org>
 * Copyright (c) 2008 Flowplayer Ltd
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * SEE: http://www.opensource.org/licenses
 * 
 * Date: 2008-11-25 11:29:03 -0500 (Tue, 25 Nov 2008)
 * Revision: 1424 
 */

(function ($, $f){
$f.addPlugin("controls", function(wrap, options) {
  
    
//{{{ private functions
    
  function fixE(e) {
    if (typeof e == 'undefined') { e = window.event; }
    if (typeof e.layerX == 'undefined') { e.layerX = e.offsetX; }
    if (typeof e.layerY == 'undefined') { e.layerY = e.offsetY; }
    return e;
  }
  
  function w(e) {
    return e.clientWidth;  
  }
  
  function offset(e) {
    return e.offsetLeft;  
  }
  
  /* a generic dragger utility for hoirzontal dragging */
  function Draggable(o, min, max, offset) { 
    
    var dragging = false;
    
    function foo() { }
    
    o.onDragStart  = o.onDragStart || foo;
    o.onDragEnd    = o.onDragEnd    || foo;
    o.onDrag      = o.onDrag      || foo;  
    
    function move(x) {
      // must be withing [min, max]
      if (x > max) { return false; }
      if (x < min) { return false; } 
      o.style.left = x + "px";  
      return true;
    }
    
    function end() {
      document.onmousemove = null;
      document.onmouseup   = null;
      o.onDragEnd(parseInt(o.style.left, 10));
      dragging = false;
    }

    function drag(e) {
      e = fixE(e); 
      var x = e.clientX - offset; 
      if (move(x)) {
        dragging = true;
        o.onDrag(x);    
      } 
      return false;
    }
    
    o.onmousedown = function(e)  {
      e = fixE(e);
      o.onDragStart(parseInt(o.style.left, 10)); 
      document.onmousemove    = drag;
      document.onmouseup    = end;
      return false;  
    };
    
    this.dragTo = function(x) {
      if (move(x)) {
        o.onDragEnd(x);    
      }  
    };
    
    this.setMax = function(val) {
      max = val;  
    };
    
    this.isDragging = function() {
      return dragging;  
    };

    return this; 
  }

  function extend(to, from) {
    if (from) {
      for (key in from) {
        if (key) {
          to[key] = from[key];    
        } 
      }
    }
  }
  
  function byClass(name) {
    var els = wrap.getElementsByTagName("*");    
    var re = new RegExp("(^|\\s)" + name + "(\\s|$)");
    for (var i = 0; i < els.length; i++) {
      if (re.test(els[i].className)) {
        return els[i];
      }
    }
  }
  
  // prefix integer with zero when nessessary 
  function pad(val) {
    val = parseInt(val, 10);
    return val >= 10 ? val : "0" + val;
  }
  
  // display seconds in hh:mm:ss format
  function toTime(sec) {
    
    var h = Math.floor(sec / 3600);
    var min = Math.floor(sec / 60);
    sec = sec - (min * 60);
    
    if (h >= 1) {
      min -= h * 60;
      return pad(h) + ":" + pad(min) + ":" + pad(sec);
    }
    
    return pad(min) + ":" + pad(sec);
  }
  
  function getTime(duration) {
    return "<strong>" + toTime(duration) + "</strong>";  
  }
  
//}}}
  
  
  var self = this;
  
  var opts = {
    playHeadClass: 'playhead',
    trackClass: 'track',
    playClass: 'play',
    pauseClass: 'pause',
    bufferClass: 'buffer',
    progressClass: 'progress',
    
    timeClass: 'time',
    muteClass: 'mute',
    unmuteClass: 'unmute',
    duration: 0,    
    
    template: '<a class="play" href="javascript:void(0)">pause / play</a>' + 
           '<div class="track">' +
             '<div class="buffer"></div>' +
             '<div class="progress"></div>' +
             '<div class="playhead"></div>' +
           '</div>' + 
           '<div class="time"></div>' +
           '<a class="mute" href="javascript:void(0)">mute</a>'         
  };
  
  extend(opts, options);
  
  if (typeof wrap == 'string') {
    wrap = document.getElementById(wrap);
  }
  
  if (!wrap) { return;  }
  
  // inner HTML
  if (!wrap.innerHTML.replace(/\s/g, '')) {
    $(wrap).html(opts.template);    
  }   
  
  // get elements 
  var play = byClass(opts.playClass);
  var ball = byClass(opts.playHeadClass);
  var bufferBar = byClass(opts.bufferClass);
  var progressBar = byClass(opts.progressClass);
  var track = byClass(opts.trackClass);
  var time = byClass(opts.timeClass);
  var mute = byClass(opts.muteClass);

  $(play).css({left: "0px"});
  if (opts.cssUseImportant)
    $(track).attr("style", "left:" + w(play) + "px;  width:" + (w(wrap) - w(play) - w(time) - w(mute)) + "px !important");
  else
    $(track).css({left: w(play) + "px", width: (w(wrap) - w(play) - w(time) - w(mute)) + "px"});
  $(time).css({left: (w(play) +  w(track)) + "px"});
  $(mute).css({left: (w(play) +  w(track) + w(time)) + "px"})
  
  // initial time
  $(time).html(getTime(opts.duration));
  
  // get dimensions 
  var trackWidth = w(track);
  var ballWidth = w(ball); 
  
  // initialize draggable playhead
  var head = new Draggable(ball, 0, 0, offset(wrap) + offset(track) + (ballWidth / 2)); 
  
  // track click moves playHead  
  track.onclick = function(e) {
    e = fixE(e);
    if (e.target == ball) { return false; }
    head.dragTo(e.layerX - ballWidth / 2);
  };
  
  play.onclick = function() {
    if (self.isLoaded()) {
      self.toggle();    
    } else {
      self.play();  
    }            
  };
  
  // mute/unmute button
  mute.onclick = function() {
    if (self.getStatus().muted)  {
      self.unmute();  
    } else {
      self.mute();  
    }
  };

  // setup timer
  var timer = null;
  
  function getMax(len, total) {
    var x = parseInt(Math.min(len / total * trackWidth, trackWidth - ballWidth / 2), 10);
    return isNaN(x) ? 0 : x;   
  }
  
  self.onStart(function(clip) {
    $(time).html(getTime(clip.duration || 0));  
  });
  
  self.onBegin(function(clip) {
    play.className = opts.pauseClass;
    
    $(time).html(getTime(clip.duration || 0));  

    // clear previous timer    
    clearInterval(timer);
     
    // begin timer    
    timer = setInterval(function()  {      
      try
      {
        var status = self.getStatus();      
      }
      catch(e)
      {
        clearInterval(timer);
        return;
      }

      if (status.time === undefined) {
        clearInterval(timer);
        return;
      }
      
      // buffer width
      var x = getMax(status.bufferEnd, clip.duration || 0);
      if (opts.cssUseImportant)
        $(bufferBar).attr("style", "width:" + x + "px !important");
      else
        bufferBar.style.width = x + "px";
      head.setMax(x);  
    
      
      
      // progress width
      if (!self.isPaused() && !head.isDragging()) {
        x = getMax(status.time, clip.duration || 0);
        if (opts.cssUseImportant)
          $(progressBar).attr("style", "width:" + x + "px !important");
        else
          progressBar.style.width = x + "px";
        ball.style.left = (x -ballWidth / 2) + "px";
      }
      
    }, 500);
  });

  self.onStop(function(){
    clearInterval(timer);  
  });
  
  // pause / resume states  
  self.onPause(function() {
    play.className = opts.playClass;
  });

  self.onResume(function() {
    play.className = opts.pauseClass;
  });
  
  
  // mute / unmute states  
  self.onMute(function() {
    mute.className = opts.unmuteClass;
  });

  self.onUnmute(function() {
    mute.className = opts.muteClass;
  });
  
  
  // clear timer when clip ends  
  self.onFinish(function(clip) {    
    clearInterval(timer);  
    play.className = opts.playClass;
    if (opts.cssUseImportant)
      $(progressBar).attr("style", "width: 0px !important");
    else
      progressBar.style.width = "0px";
    ball.style.left = "0px";
    if (self.isLoaded()) {
      self.seek(0);    
    } 
  }); 

  self.onUnload(function() {
    $(time).html(getTime(opts.duration));  
    clearInterval(timer);  
    play.className = opts.playClass;
    if (opts.cssUseImportant)
      $(progressBar).attr("style", "width: 0px !important");
    else
      progressBar.style.width = "0px";
    ball.style.left = "0px";
  });
  
  
  ball.onDragEnd = function(x) {
    var to = parseInt(x / trackWidth  * 100, 10) + "%";
    if (opts.cssUseImportant)
      $(progressBar).attr("style", "width:" + x + "px !important");
    else
      progressBar.style.width = x + "px";
    if (self.isLoaded()) {
      self.seek(to);    
    } 
  };
  
  ball.onDrag = function(x) {
    if (opts.cssUseImportant)
      $(progressBar).attr("style", "width:" + x + "px !important");
    else
      progressBar.style.width = x + "px";  
  };

  
  // return player instance to enable plugin chaining
  return self;
  
});
})

//------------------- flowplayer/flowplayer.controls-3.0.2.js End -------------------
//------------------- flowplayer/controls-inline-params.js Begin -------------------
(_wcjq, flowplayer);
//------------------- flowplayer/controls-inline-params.js End -------------------
//------------------- tour/tour.js Begin -------------------
(function($, $f) {
  $.fn.tour = function (logicalState, settings)
  {
    var jsonAccess = null;

    if (typeof settings == "string")
    {
      jsonAccess = document.getElementsByTagName('body').item(0)[settings];
      settings = $.extend({}, jsonAccess().settings);
    }
    else if (typeof settings == "function")
    {
      $.fn.tour.parentAccess = settings;
      settings = settings().settings;
    }

    var presets = $.extend(true, {}, $.fn.tour.defaults);

    if (settings.flowPlayerControls && settings.flowPlayerControls == "embedded")
      delete(presets.flowPlayersOptions.plugins.controls);

    if (typeof settings == "object")
      settings = $.extend(true, {}, presets, settings || {});

    if ($.browser.msie && $.browser.version.split(".")[0] == "6")
    {
      (function (s)
      {
        for (var i in s)
          if (typeof s[i] == "string" && i == "src")
            s[i] = s[i].replace(/\.png$/, ".gif");
          else if (typeof s[i] == "object")
            arguments.callee(s[i]);
      })(settings);
    }

    this.addClass(settings.cssPrefix + "tour").css(
      {
        width: settings.size.width + "px",
        height: settings.size.height + "px"
      }
    );

    return this.each(function() {
      init ($(this), logicalState, settings, jsonAccess);
    });
  };

  $.fn.tour.defaults =
  {
    size: {width: 800, height: 450},
    directory: {width: 270, height: 390, left: 5, top: 25},
    view: {width: 500, height: 390, top: 25, right: 25},
    hotspotDetails: {width: 394, maxHeight: 444, minHeight: 250, sideMargin: 3},
    usage: {bottom: 10, left: 5},
    frame: {src: "res/corners/corner-${d}.png", width: 14},
    underConstruction: {src: "res/underConstruction.jpg", width: 800, height: 450},
    loading: {src: "res/loading.gif", width: 64, height: 64},
    close: {src: "res/close.gif", width: 15, height: 14},
    detailsViewHotspot: {src: "res/marker.png", width: 22, height: 22},
    line: {src: "res/lineBg.png", height: 7},
    directoryViewHotspotDigits: {src: "res/hotspotDigits.png", width: 34, height: 34, digitVariations: 3},
    navigatorSprite: {src: "res/navigatorSprite.png", width: 11, height: 11},
    mainImageMargin: 0,
    hotspotsInNavigator: 8,
    animationSpeed: {imageSwitch: 400, panAndZoom: 800},
    scripts: [],
    styles: [],
    jScrollPane: {
      showArrows:true,
      scrollbarWidth: 15,
      arrowSize: 14,
      scrollbarOnLeft:true,
      scrollbarMargin: 0
    },
    texts: {
      loading: "Loading<br>Please wait...",
      featuresList: "Feature List",
      featuresListTitle: "",
      firstTitle: "First",
      previousTitle: "Previous",
      nextTitle: "Next",
      lastTitle: "Last",
      closeTitle: "Close",
      viewImageTitle: "View ${number}",
      usageMessage: "Click a feature from the list or a number in the picture to view details"
    },
    flowPlayerParams: {
      src: "/_wc/default-defs/resources/common/flowplayer.unlimited-3.2.2.swf",
      cachebusting: false,
      wmode: "Transparent"
    },
    flowPlayersOptions: {
      clip: {
        autoPlay: true,
        autoBuffering: true,
        scaling: "fit"
      },
      plugins: {
        controls:  {
          url: 'flowplayer.controls-3.2.1.swf',
          right: 0,
          bottom: 0,
          width: 52,
          height: 26,
          opacity: 0.9,
          backgroundGradient: "low",

          // controlbar buttons
          all: false,
          fullscreen: true,
          tooltips: null
        }
      },
      play: {
        url: 'res/playButtonOver.png',
        width: 64,
        height: 64,
        opacity: 1.2
      }
    },
    flowPlayerControls: "html",
    cssPrefix      : "wct-"
  };

  $.fn.tour.widgetHtml = "\
    <div width='100%' height='100%' class='${css-prefix}widget'>\
      <div class='${css-prefix}outer-directory'>\
        <div>\
          <div class='${css-prefix}directory'></div>\
        </div>\
      </div>\
      <div class='${css-prefix}view-wrapper'>\
      </div>\
      <div class='${css-prefix}details-frame'>\
        <div>\
          <div>\
            <div>\
            </div>\
          </div>\
        </div>\
        <div>\
          <div>\
            <div class='${css-prefix}outer-hotspot-details'>\
              <div class='${css-prefix}hotspot-details'>\
                <div class='${css-prefix}navigator'></div>\
                <div class='${css-prefix}hotspot-media'></div>\
                <div class='${css-prefix}line'></div>\
                <div class='${css-prefix}marker'></div>\
              </div>\
            </div>\
          </div>\
        </div>\
        <div>\
          <div>\
            <div>\
            </div>\
          </div>\
        </div>\
      </div>\
      <div class='${css-prefix}usage'></div>\
    </div>";

  function init (sourceHtmlElement, logicalState, settings, jsonAccess)
  {
    var object = {
      widget : {
        widgetOuterDirectory : null,
        widgetDirectory : null,
        widgetViewWrapper : null,
        widgetDetailsFrame : null,
        widgetOuterHotspotDetails : null,
        widgetHotspotDetails : null,
        widgetNavigator : null,
        widgetHotspotMedia : null,
        widgetLine : null,
        widgetMarker : null,
        widgetUsage : null
      },

      hotspots: [],
      views: [],
      allViews: [],
      loadingView: {},
      navItems: {},
      idMap: {},
      json: null,

      state : {
        currentViewIndex: 0,
        currentState : "",
        keyboardFocus : -1
      }
    };

//** Utility functions
    function randomId (prefix)
    {
      return prefix + ("" + Math.random()).substr(2);
    }

    function scriptSrc (scriptUrl)
    {
      var randomSuffix = "";

      if (typeof settings.versionForJs != "undefined")
        if (settings.versionForJs == "randomize")
          randomSuffix = "?rnd=" + randomId("");
        else
          randomSuffix = "?rnd=" + settings.versionForJs;

      return "<script src='" + scriptUrl + randomSuffix + "'><\/script>\n";
    }

    function styleSrc (styleUrl)
    {
      return "<link rel='stylesheet' href='" + styleUrl + "'>\n";
    }

    function px (num)
    {
      return (num > 0 ? "" + Math.round(num) : "-" + Math.round(-num)) + "px";
    }

    function hsid(id)
    {
      return "hs" + (id + 1);
    }

    function freemarkerReplace (t, map)
    {
      var s = t;
      for (var k in map)
        s = s.replace(new RegExp("\\${" + k + "}", "g"), map[k]);
      return s;
    }

    function isValidString (str)
    {
      return !(typeof str == "undefined" || str == null || str == "");
    }

    function findHotspotNumberForId (id)
    {
      var idEntry = object.idMap[id];

      if (typeof idEntry == "undefined")
        return -1;

      return $.inArray(idEntry.hotspot, object.hotspots);
    }

    function findViewNumberForHotspot (hotspotNumber)
    {
      return $.inArray(object.hotspots[hotspotNumber].view, object.views);
    }

    function gotoHotspot (hotspot)
    {
      if (typeof hotspot == "string")
        updateLogicalState(hotspot);
      else
        updateLogicalState(object.hotspots[hotspot].id);
    }

    function animationOptions (duration, queue)
    {
      return {
        duration: duration,
        easing: "swing",
        queue: queue
      };
    }

    function reportEvent (event, parameters)
    {
      if (typeof settings.reportEvent === "function")
      {
        if (parameters)
          settings.reportEvent(event, parameters);
        else
          settings.reportEvent(event);
      }
    }

    function getHotspotCaption (hotspotNumber)
    {
      var views = object.json.views;

      for (var v = 0; v < views.length; ++v)
        for (var h = 0; h < views[v].hotspots.length; ++h)
          if (hotspotNumber == 0)
            return views[v].hotspots[h].caption;
          else
            --hotspotNumber;
      return "";
    }

//** Runtime functions
    function updateLogicalState (logicalState)
    {
      if (object.state.currentState == logicalState)
        return;

      if (logicalState == "")
        switchToDirectoryView();
      else
      {
        var hotspotNumber = findHotspotNumberForId(logicalState);
        if (hotspotNumber == -1)
          return;

        zoomToHotspot(hotspotNumber, true);
      }

      object.state.currentState = logicalState;

      if (typeof settings.stateChange == "function")
        settings.stateChange(logicalState);
    }

    function switchToDirectoryView ()
    {
      hideHotspotDetails();
      hideGenericMarkers();

      var callbackAfterAnimation =
      {
        complete: function () {
          object.widget.widgetOuterDirectory.show();
          if (object.widget.widgetDirectory.parent().get(0).scrollTo)
            object.widget.widgetDirectory.parent().get(0).scrollTo("tr:first");
          switchToView(0);
          object.widget.widgetUsage.show();
          showNumericMarkers();
        }
      };

      $.each(object.views, function()
        {
          if (!this.imageLoaded)
            return;

          var theImg = this.image

          var newWidth = this.sizeParams.adjustedWidth;
          var newHeight = this.sizeParams.adjustedHeight;

          theImg.animate (
            {
              width: newWidth,
              height: newHeight
            },
            animationOptions(settings.animationSpeed.panAndZoom, false)
          );

          this.div.animate (
            {
              left: Math.round((settings.view.width - this.sizeParams.adjustedWidth) / 2),
              top: Math.round((settings.view.height - this.sizeParams.adjustedHeight) / 2)
            },
            animationOptions(settings.animationSpeed.panAndZoom, false)
          );
        }
      );
      object.widget.widgetViewWrapper.animate(
        {
          right: settings.view.right
        },
        $.extend(animationOptions(settings.animationSpeed.panAndZoom, false), callbackAfterAnimation)
      );
    }

    function highlightHotspot (hotspotNumber)
    {
      var viewNumber = findViewNumberForHotspot(hotspotNumber);
      switchToView(viewNumber, settings.animationSpeed.imageSwitch);

      var variation = 0, direction = 1;
      object.hotspotTimer = setInterval(function(){
        variation += direction;
        object.hotspots[hotspotNumber].inView.image1.css({"margin-top": px(-variation * settings.directoryViewHotspotDigits.height)});
        if (variation == 0 || variation == (settings.directoryViewHotspotDigits.digitVariations - 1))
          direction *= -1;
      }, 150);
      object.hotspots[hotspotNumber].inDirectory.numberLink.addClass(settings.cssPrefix + "highlighted");
      object.hotspots[hotspotNumber].inDirectory.textLink.addClass(settings.cssPrefix + "highlighted");
    }

    function unhighlightHotspot ()
    {
      if (object.hotspotTimer)
      {
        clearInterval(object.hotspotTimer);
        delete(object.hotspotTimer);
      }
      $.each(object.hotspots, function()
        {
          this.inView.image1.css({"margin-top": px(0)});
          this.inDirectory.numberLink.removeClass(settings.cssPrefix + "highlighted");
          this.inDirectory.textLink.removeClass(settings.cssPrefix + "highlighted");
        });
    }

    // The whole mess with the nowSwitching and next is to prevent race condition when switchToView
    // is called again before it finished the previous switch, in this case when it finishes it
    // will switch to the most-lately requested view (remembered by viewNumber)
    function switchToView (viewNumber, animationSpeed)
    {
      var me = arguments.callee;

      if (typeof me.nowSwitching != "undefined" && me.nowSwitching)
      {
        me.next = viewNumber;
        return;
      }

      object.state.currentViewIndex = viewNumber;
      var view = null;
      if (object.views[viewNumber].imageLoaded)
      {
        if (!object.views[viewNumber].reported)
          reportEvent("tour-main-image-view", {asset: object.views[viewNumber].image.attr("src"), view: viewNumber + 1});
        object.views[viewNumber].reported |= true;
        view = object.views[viewNumber].div;
      }
      else
        view = object.loadingView.div;

      if (view.is(":hidden"))
      {
        me.nowSwitching = true;

        object.widget.widgetViewWrapper.find("." + settings.cssPrefix + "view:visible").animate(
          {
            opacity: "hide"
          }, animationOptions(animationSpeed, false)
        );
        view.animate(
          {
            opacity: "show"
          },
          $.extend(animationOptions(animationSpeed, false),
            {
              complete: function()
              {
                me.nowSwitching = false;
                if (typeof me.next != "undefined" && me.next != -1)
                {
                  var tmp = me.next;
                  me.next = -1;
                  me(tmp);
                }
              }
            }
          )
        );
      }
    }

    function handleKeyboardFocus (hotspotNumber)
    {
      object.state.keyboardFocus = hotspotNumber;

      unhighlightHotspot();

      if (hotspotNumber != -1)
        highlightHotspot(hotspotNumber);
    }

    function zoomToHotspot (hotspotNumber, hideDetailsWhileZooming)
    {
      if (!object.hotspots[hotspotNumber].reported)
        reportEvent("tour-hotspot-zoom", {view: findViewNumberForHotspot(hotspotNumber) + 1, hotspot: hotspotNumber + 1});
      object.hotspots[hotspotNumber].reported |= true;
      hideNumericMarkers();
      object.widget.widgetOuterDirectory.hide();
      object.widget.widgetUsage.hide();
      if (hideDetailsWhileZooming)
        hideHotspotDetails();
      hideGenericMarkers();

      var viewNumber = findViewNumberForHotspot(hotspotNumber);

      switchToView(viewNumber, settings.animationSpeed.panAndZoom);

      var hotspotData = object.hotspots[hotspotNumber].inView;
      var widgetViewWrapper = object.widget.widgetViewWrapper;

      var callbackAfterAnimation =
      {
        complete: function () {
          if (hideDetailsWhileZooming)
            showHotspotDetails(hotspotNumber, hotspotData.dir, false);
          showGenericMarker(hotspotNumber, hotspotData.dir);
          focusAndHighlightHotspotNumber(object, hotspotNumber);
        }
      };

      $.each(object.views, function()
        {
          if (!this.imageLoaded)
            return;

          var theImg = this.image

          var newWidth = this.sizeParams.originalWidth;
          var newHeight = this.sizeParams.originalHeight;

          theImg.animate (
            {
              width: newWidth,
              height: newHeight
            },
            animationOptions(settings.animationSpeed.panAndZoom, false)
          );

          var xCenter = hotspotData.x * newWidth;
          var yCenter = hotspotData.y * newHeight;

          var newLeft = (widgetViewWrapper.width() / 2) - xCenter;
          var newTop = (widgetViewWrapper.height() / 2) - yCenter;

          this.div.animate (
            {
              left: newLeft,
              top: newTop
            },
            animationOptions(settings.animationSpeed.panAndZoom, false)
          );
        }
      );

      if (hotspotData.dir == "right")
        widgetViewWrapper.animate(
          {
            right : (widgetViewWrapper.parent().width() - widgetViewWrapper.width())
          },
          $.extend(animationOptions(settings.animationSpeed.panAndZoom, false), callbackAfterAnimation)
        );
      else
        widgetViewWrapper.animate(
          {
            right : 0
          },
          $.extend(animationOptions(settings.animationSpeed.panAndZoom, false), callbackAfterAnimation)
        );
    }

    function showNumericMarkers ()
    {
      $.each(object.hotspots, function()
        {
          this.inView.a.show().css({visibility: "visible"});
        }
      );
    }

    function hideNumericMarkers ()
    {
      $.each(object.hotspots, function()
        {
          // visibility is set to hidden due to strange IE7 behavior were sometimes markers of one specific view do not disappear although their display is none
          this.inView.a.hide().css({visibility: "hidden"});
        }
      );
    }

    function focusAndHighlightHotspotNumber (object, hotspotNumber)
    {
      $.each(object.hotspots, function()
        {
          this.inNavigator.div.addClass(settings.cssPrefix + "nav-text").removeClass(settings.cssPrefix + "nav-selected");
        }
      );

      object.hotspots[hotspotNumber].inNavigator.div.addClass(settings.cssPrefix + "nav-selected").removeClass(settings.cssPrefix + "nav-text");

      var nOfLinks = object.hotspots.length;

      if(hotspotNumber > 0)
      {
        object.navItems.firstItem.img.removeClass(settings.cssPrefix + "nav-disabled").addClass(settings.cssPrefix + "nav-enabled");
        object.navItems.firstItem.a.unbind('click').click(function(){gotoHotspot(0);});
        object.navItems.previousItem.img.removeClass(settings.cssPrefix + "nav-disabled").addClass(settings.cssPrefix + "nav-enabled");
        object.navItems.previousItem.a.unbind('click').click(function(){gotoHotspot(hotspotNumber - 1);});
      }
      else
      {
        object.navItems.firstItem.img.removeClass(settings.cssPrefix + "nav-enabled").addClass(settings.cssPrefix + "nav-disabled");
        object.navItems.firstItem.a.unbind('click');
        object.navItems.previousItem.img.removeClass(settings.cssPrefix + "nav-enabled").addClass(settings.cssPrefix + "nav-disabled");
        object.navItems.previousItem.a.unbind('click');
      }
      if (hotspotNumber < nOfLinks - 1)
      {
        object.navItems.lastItem.img.removeClass(settings.cssPrefix + "nav-disabled").addClass(settings.cssPrefix + "nav-enabled");
        object.navItems.lastItem.a.unbind('click').click(function(){gotoHotspot(nOfLinks - 1);});
        object.navItems.nextItem.img.removeClass(settings.cssPrefix + "nav-disabled").addClass(settings.cssPrefix + "nav-enabled");
        object.navItems.nextItem.a.unbind('click').click(function(){gotoHotspot(hotspotNumber + 1);});
      }
      else
      {
        object.navItems.lastItem.img.removeClass(settings.cssPrefix + "nav-enabled").addClass(settings.cssPrefix + "nav-disabled");
        object.navItems.lastItem.a.unbind('click');
        object.navItems.nextItem.img.removeClass(settings.cssPrefix + "nav-enabled").addClass(settings.cssPrefix + "nav-disabled");
        object.navItems.nextItem.a.unbind('click');
      }

      var fromLink = 0
      var toLink = nOfLinks - 1;

      if (nOfLinks > settings.hotspotsInNavigator)
      {
        var leftSteps = Math.floor((settings.hotspotsInNavigator - 1) / 2);
        var rightSteps = Math.ceil((settings.hotspotsInNavigator - 1) / 2);

        if (hotspotNumber <= leftSteps)
          toLink = settings.hotspotsInNavigator - 1;
        else if (hotspotNumber >= nOfLinks - rightSteps)
          fromLink = nOfLinks - settings.hotspotsInNavigator;
        else
        {
          fromLink = hotspotNumber - leftSteps;
          toLink = hotspotNumber + rightSteps;
        }
      }

      var heightOfBar = 0;
      $.each(object.hotspots, function(index)
        {
          if (index >= fromLink  && index <= toLink)
          {
            this.inNavigator.a.css({display:"block"});
            heightOfBar = Math.max(heightOfBar, this.inNavigator.div.height());
          }
          else
            this.inNavigator.a.css({display:"none"});
        }
      );
      $.each(object.navItems, function()
        {
          if (this.img)
          {
            this.a.css("margin-top", px((heightOfBar - this.a.height()) / 2));
          }
        }
      );
    }

    function showGenericMarker (hotspotNumber, direction)
    {
      var markerHyperlinkWrapper = object.hotspots[hotspotNumber].inView.div;

      markerHyperlinkWrapper.append(object.widget.widgetLine);
      markerHyperlinkWrapper.append(object.widget.widgetMarker);
      showWidgetLine(direction);
      showWidgetMarker();
    }

    function showWidgetLine (direction)
    {
      var directionCss = {};
      directionCss[direction == "left" ? "right" : "left"] = px(0);
      directionCss[direction] = null;
      object.widget.widgetLine.css(directionCss);
      object.widget.widgetLine.show("normal");
    }

    function showWidgetMarker ()
    {
      object.widget.widgetMarker.show();
    }

    function hideGenericMarkers (hotspotNumber)
    {
      object.widget.widgetLine.hide();
      object.widget.widgetMarker.hide();
    }

    function showHotspotDetails (hotspotNumber, direction, quick)
    {
      if (quick || ($.browser.msie && parseInt($.browser.version.split(".")[0]) > 6 && parseInt($.browser.version.split(".")[0]) < 9))
        object.widget.widgetDetailsFrame.show();
      else
        object.widget.widgetDetailsFrame.fadeIn("normal");

      var dirClass = settings.cssPrefix + "hotspot-details-" + direction;

      var directionCss = {};
      directionCss[direction] = px(settings.hotspotDetails.sideMargin);
      object.widget.widgetDetailsFrame.css({left:null, right:null}).css(directionCss);
      object.widget.widgetDetailsFrame.css("height", px(settings.hotspotDetails.maxHeight))
      object.widget.widgetOuterHotspotDetails.css("height", px(settings.hotspotDetails.maxHeight - 2 * settings.frame.width));
      object.widget.widgetHotspotDetails.css("height", px(settings.hotspotDetails.maxHeight - 2 * settings.frame.width));

      object.hotspots[hotspotNumber].inDetailsView.media.inject(object.widget.widgetHotspotMedia,
                                                                object.widget.widgetHotspotMedia.width(),
                                                                Math.round((settings.hotspotDetails.maxHeight - 2 * settings.frame.width) / 2),
                                                                function(){
        hideHotspotDetails(hotspotNumber);
        showHotspotDetails(hotspotNumber, direction, true);
      });

      var widgetHotspotBody = object.hotspots[hotspotNumber].inDetailsView.div.clone().wrap($("<div><div class='" + settings.cssPrefix + "hotspot-body'></div></div>")).parent();

      widgetHotspotBody.css({overflow: "auto", "word-wrap": "break-word", position: "relative", clear: "both"}); // do not remove the position:relative, without it IE renders the font in a distorted fashion

      object.widget.widgetHotspotDetails.append(widgetHotspotBody.parent());

      var hotspotDetailsPaddingMarginAndBorderHeight = object.widget.widgetHotspotDetails.outerHeight(true) - object.widget.widgetHotspotDetails.height();
      var heightAvaiableForBody = object.widget.widgetOuterHotspotDetails.height() -
                                    (hotspotDetailsPaddingMarginAndBorderHeight +
                                     object.widget.widgetNavigator.outerHeight(true) +
                                     object.widget.widgetHotspotMedia.outerHeight(true));
      var currentBodyHeight = widgetHotspotBody.parent().outerHeight(true);
      if (currentBodyHeight > heightAvaiableForBody)
      {
        widgetHotspotBody.parent().css({height: px(heightAvaiableForBody), overflow: "hidden"});
        widgetHotspotBody.parent().jScrollPane(settings.jScrollPane);
      }
      else{
        widgetHotspotBody.css({"margin-left": px(0), "padding-left": px(0)});
        var deltaHeight = heightAvaiableForBody - currentBodyHeight;
        var newHeight = Math.max(object.widget.widgetOuterHotspotDetails.height() - deltaHeight, settings.hotspotDetails.minHeight - 2 * settings.frame.width);
        object.widget.widgetDetailsFrame.css("height", px(newHeight + 2 * settings.frame.width))
        object.widget.widgetOuterHotspotDetails.css("height", px(newHeight));
        object.widget.widgetHotspotDetails.css("height", px(newHeight));
      }
    }

    function hideHotspotDetails (hotspotNumber)
    {
      object.widget.widgetDetailsFrame.hide();
      if (typeof hotspotNumber != "undefined")
        object.hotspots[hotspotNumber].inDetailsView.media.remove();
      else
        $.each(object.hotspots, function()
          {
            this.inDetailsView.media.remove();
          }
        );
      var toRemove = object.widget.widgetHotspotDetails.find("." + settings.cssPrefix + "hotspot-body");
      if (toRemove.size() == 0)
        return;
      while (toRemove.parent().get(0) != object.widget.widgetHotspotDetails.get(0))
        toRemove = toRemove.parent();
      toRemove.remove();
    }

// media renderers here:

    object.noneMediaRenderer = function ()
    {
      var media = {
        destinationElement: null,
        handler: {
          inject : function (destinationElement, maxWidth, maxHeight)
          {
            destinationElement.hide();
            media.destinationElement = destinationElement;
          },
          remove : function ()
          {
            if (media.destinationElement)
            {
              media.destinationElement.show();
              media.destinationElement = null;
            }
          }
        }
      };
      return media.handler;
    }

    object.imageMediaRenderer = function (mediaJson, hotspotNumber, settings)
    {
      var media = {
        image: $("<img>"),
        loaded: false,
        destinationElement: null,
        readjustDetailView: null,

        handler: {
          inject : function(destinationElement, maxWidth, maxHeight, readjustDetailView)
          {
            media.destinationElement = destinationElement;
            if (!media.loaded)
            {
              var loadingImage = $("<img>").attr({
                src: settings.loading.src,
                width: settings.loading.width,
                height: settings.loading.height
              });
              var loadingDiv = $("<div>" + settings.texts.loading + "</div>").addClass(settings.cssPrefix + "loading-message");
              destinationElement.append($("<center>").append(loadingImage).append(loadingDiv));
              media.readjustDetailView = readjustDetailView;
              return;
            }
            var widthFactor = maxWidth / media.origWidth;
            var heightFactor = maxHeight / media.origHeight;
            var factor = Math.min(widthFactor, heightFactor, 1);
            media.image.attr(
              {
                width: (media.origWidth * factor),
                height: (media.origHeight * factor)
              }
            );
            destinationElement.append(media.image);
          },
          remove : function()
          {
            media.readjustDetailView = null;
            if (media.destinationElement != null)
            {
              media.destinationElement.children().remove();
              media.destinationElement = null;
            }
          }
        },

        init: function (mediaJson, hotspotNumber)
        {
          media.image.load(function()
            {
              var img = media.image.get(0);
              $.extend(media, {loaded: true, origWidth: img.width, origHeight: img.height});
              if (media.readjustDetailView)
              {
                media.readjustDetailView();
                media.readjustDetailView = null;
              }
            }
          );

          var titleAlt = isValidString(mediaJson.alt) ? mediaJson.alt : getHotspotCaption(hotspotNumber);

          media.image.attr(
            {
              title: titleAlt,
              alt: titleAlt,
              src: mediaJson.src
            }
          );
        }
      };

      media.init(mediaJson, hotspotNumber);
      return media.handler;
    }

    object.videoMediaRenderer = function (mediaJson, hotspotNumber, settings)
    {
      var media = {
        video: null,
        destinationElement: null,
        serial: 0,
        reported: false,

        handler: {
          inject: function(destinationElement, maxWidth, maxHeight)
          {
            if (!media.reported)
              reportEvent("asset-view", {asset: media.src, view: findViewNumberForHotspot(hotspotNumber) + 1, hotspot: hotspotNumber + 1});
            media.reported |= true;

            var widthFactor = maxWidth / media.origWidth;
            var heightFactor = maxHeight / media.origHeight;
            var factor = Math.min(widthFactor, heightFactor, 1);
            var videoContainer = $("<div/>").addClass(settings.cssPrefix + "hotspot-video").attr({
                id: settings.cssPrefix + "hotspot-video" + media.serial
              }).css({
                display: "block",
                width: px(media.origWidth * factor),
                height: px(media.origHeight * factor)
              });
            media.destinationElement = $(destinationElement).append(videoContainer);
            if (settings.flowPlayerControls == "html")
              media.destinationElement.append($("<div/>").addClass(settings.cssPrefix + "hotspot-video-control").attr({
                  id: settings.cssPrefix + "hotspot-video-control" + media.serial
                }).css({
                  width: px(media.origWidth * factor)
                }));
            media.player = $f(settings.cssPrefix + "hotspot-video" + media.serial, $.extend(true, {}, settings.flowPlayerParams), $.extend(true, {clip:{url:media.src}}, settings.flowPlayersOptions));
            if (settings.flowPlayerControls == "html")
              media.player.controls(settings.cssPrefix + "hotspot-video-control" + media.serial, media.duration ? {duration: media.duration} : {});
            $.each("Begin,Stop,Pause,Resume,Finish".split(","), function(){
              var actionName = this.toLowerCase();
              media.player["on" + this](function(clip){
                var status = media.player.getStatus();
                var params = {
                              asset: media.src,
                              "localtimestamp": new Date().valueOf(),
                              view: findViewNumberForHotspot(hotspotNumber) + 1,
                              hotspot: hotspotNumber + 1
                            };
                if (status.time)
                  params["videotime"] = status.time;
                if (clip && clip.duration)
                  params.duration = clip.duration;
                reportEvent("tour-video-action-" + actionName, params);
              });
            });
          },
          remove : function()
          {
            if (media.destinationElement != null)
            {
              media.player.stop();
              media.player.kill();
              media.destinationElement.find("object").remove(); // the flash object should be removed first otherwise IE8 throws an exception upon the next remove
              media.destinationElement.children().remove();
              media.destinationElement = null;
            }
          }
        },

        init: function (mediaJson, hotspotNumber)
        {
          $.extend(media,{
              origWidth: mediaJson.width,
              origHeight: mediaJson.height,
              src: mediaJson.src,
              serial: randomId("")
            }
          );
          if (typeof mediaJson.duration != "undefined")
            media.duration = mediaJson.duration;
        }
      };

      media.init(mediaJson, hotspotNumber);
      return media.handler;
    }

//** Setup functions

    function setupUnderConstruction ()
    {
      sourceHtmlElement.append($("<img>").
        attr({src: settings.underConstruction.src}).
        css({
          width: px(settings.size.width),
          height: px(settings.size.height)
        }));
    }

    function setupWidgetShortcuts (html)
    {
      object.widget.widgetOuterDirectory = html.find("." + settings.cssPrefix + "outer-directory");
      object.widget.widgetDirectory = html.find("." + settings.cssPrefix + "directory");
      object.widget.widgetViewWrapper = html.find("." + settings.cssPrefix + "view-wrapper");
      object.widget.widgetOuterHotspotDetails = html.find("." + settings.cssPrefix + "outer-hotspot-details");
      object.widget.widgetDetailsFrame = html.find("." + settings.cssPrefix + "details-frame");
      object.widget.widgetHotspotDetails = html.find("." + settings.cssPrefix + "hotspot-details");
      object.widget.widgetNavigator = html.find("." + settings.cssPrefix + "navigator");
      object.widget.widgetHotspotMedia = html.find("." + settings.cssPrefix + "hotspot-media");
      object.widget.widgetLine = html.find("." + settings.cssPrefix + "line");
      object.widget.widgetMarker = html.find("." + settings.cssPrefix + "marker");
      object.widget.widgetUsage = html.find("." + settings.cssPrefix + "usage");

      object.widget.widgetUsage.html(settings.texts.usageMessage);
    }

    function setupWidgetStyles (widgetRoot)
    {
      if ($.browser.msie)
        widgetRoot.addClass(settings.cssPrefix + "msie" + $.browser.version.split(".")[0]);
      else if ($.browser.mozilla)
        widgetRoot.addClass(settings.cssPrefix + "mozilla");
      else if ($.browser.safari)
        widgetRoot.addClass(settings.cssPrefix + "safari");

      object.widget.widgetOuterDirectory.css(
        {
          position: "absolute",
          top: px(settings.directory.top),
          left: px(settings.directory.left),
          width: px(settings.directory.width),
          height: px(settings.directory.height)
        }
      );
      object.widget.widgetDirectory.parent().css(
        {
          width: "100%",
          height: "100%"
        }
      );
      object.widget.widgetDirectory.css(
        {
          width: "auto",
          height: "auto"
        }
      );
      object.widget.widgetDetailsFrame.css(
        {
          position: "absolute",
          top: px((settings.size.height - settings.hotspotDetails.maxHeight) / 2),
          width: px((settings.hotspotDetails.width)),
          height: px((settings.hotspotDetails.maxHeight))
        }
      );

      var innerFrameDivs = object.widget.widgetDetailsFrame.find("div");
      var url = "url('" + settings.frame.src + "') ";
      var width = px(settings.hotspotDetails.width - settings.frame.width);
      var padding = px(settings.frame.width);

      innerFrameDivs.eq(0).css({background: freemarkerReplace(url, {d: "tl"}) + "no-repeat scroll 0 0 transparent",
                                "padding-left": padding,
                                width: width});

      innerFrameDivs.eq(1).css({background: freemarkerReplace(url, {d: "tr"}) + "no-repeat scroll right 0 transparent",
                                "padding-right": padding});

      innerFrameDivs.eq(2).css({background: freemarkerReplace(url, {d: "t"}) + "repeat-x scroll 0 0 transparent",
                                "padding-top": padding});

      innerFrameDivs.eq(3).css({background: freemarkerReplace(url, {d: "l"}) + "repeat-y scroll 0 0 transparent",
                                "padding-left": padding,
                                width: width});

      innerFrameDivs.eq(4).css({background: freemarkerReplace(url, {d: "r"}) + "repeat-y scroll right 0 transparent",
                                "padding-right": padding});

      innerFrameDivs.eq(5).css({overflow: "hidden"});

      innerFrameDivs.eq(11).css({background: freemarkerReplace(url, {d: "bl"}) + "no-repeat scroll 0 0 transparent",
                                "padding-left": padding,
                                width: width});

      innerFrameDivs.eq(12).css({background: freemarkerReplace(url, {d: "br"}) + "no-repeat scroll right 0 transparent",
                                "padding-right": padding});

      innerFrameDivs.eq(13).css({background: freemarkerReplace(url, {d: "b"}) + "repeat-x scroll 0 0 transparent",
                                "padding-top": padding});

      object.widget.widgetNavigator.css({
        float: "left",
        width: "100%"
      });

      object.widget.widgetHotspotMedia.css({clear: "both"});

      object.widget.widgetNavigator.css({
        float: "left",
        width: "100%"
      });

      object.widget.widgetDetailsFrame.hide();
      object.widget.widgetViewWrapper.css({
        position: "absolute",
        top: px(settings.view.top),
        right: px(settings.view.right),
        width: px(settings.view.width),
        height: px(settings.view.height)
      });

      object.widget.widgetHotspotMedia.css({width: "100%"});

      object.widget.widgetMarker.css(
        {
          position: "absolute",
          width: px(settings.detailsViewHotspot.width),
          height: px(settings.detailsViewHotspot.height),
          "margin-left": px(-settings.detailsViewHotspot.width / 2),
          "margin-top": px(-settings.detailsViewHotspot.height / 2),
          background: "url('" + settings.detailsViewHotspot.src + "')"
        }
      );

      object.widget.widgetLine.css(
        {
          position: "absolute",
          top: px(-settings.line.height / 2),
          height: px(settings.line.height),
          "line-height": px(settings.line.height),
          "font-size": px(0),
          background: "url('" + settings.line.src + "') repeat-x scroll 0 0 transparent",
          width: px((settings.size.width - settings.view.width / 2 - settings.hotspotDetails.width + 0.5 * settings.frame.width - settings.hotspotDetails.sideMargin))
        }
      );

      object.widget.widgetUsage.css({
          position: "absolute",
          bottom: settings.usage.bottom,
          left: settings.usage.left
        }
      );
    }

    function setupDirectory (json)
    {
      var directoryTable = $("<table></table>").attr({
          cellspacing: 0,
          cellpadding: 0
        }).addClass(settings.cssPrefix + "list");

      object.widget.widgetDirectory.append(directoryTable);

      var index = 0;
      var newView = false;
      for (var v = 0; v < json.views.length; ++v)
      {
        for (var h = 0; h < json.views[v].hotspots.length; ++h)
        {
          var lastInview = h == json.views[v].hotspots.length - 1;
          object.hotspots.push({reported: false});
          setupDirectoryListItem(json.views[v].hotspots[h].caption, index++, directoryTable, newView, lastInview);
          newView = false;
        }
        newView = true;
      }
    }

    function setupDirectoryListItem (listItemText, listItemIndex, directoryTable, newView, lastInview)
    {
      var directoryRow = $("<tr><td></td><td></td></tr>").addClass(settings.cssPrefix + "list-item");

      var hotspoTextLink = $("<a>" + listItemText + "</a>").attr({href: "javascript:void(0)"}).click(function(){gotoHotspot(listItemIndex);});

      directoryRow.find("td").eq(1).addClass(settings.cssPrefix + "list-item-text").append(hotspoTextLink);

      directoryTable.append(directoryRow);

      object.idMap[hsid(listItemIndex)] = {hotspot: object.hotspots[listItemIndex]};
      object.hotspots[listItemIndex].id = hsid(listItemIndex);
      object.hotspots[listItemIndex].inDirectory = {textLink: hotspoTextLink};

      var markerHyperlink = $("<a>" + (listItemIndex + 1) + "</a>");
      markerHyperlink.attr({
        href: "javascript:void(0)",
        tabIndex: -1
      }).click(function(){gotoHotspot(listItemIndex);});

      directoryRow.find("td").eq(0).addClass(settings.cssPrefix + "list-item-digit").append(markerHyperlink);

      object.hotspots[listItemIndex].inDirectory.numberLink = markerHyperlink;

      directoryRow.find("a").focus(function () {
        handleKeyboardFocus(listItemIndex);
      }).blur(function () {
        handleKeyboardFocus(-1);
      });

      if (newView)
        directoryRow.addClass(settings.cssPrefix + "list-in-new-view")
      if (lastInview)
        directoryRow.addClass(settings.cssPrefix + "list-last-in-view")

      setupHover(directoryRow.find("a"), listItemIndex);
    }

    function setupViews (json)
    {
      setupLoadingView();
      var hotspotStart = 0;
      $.each(json.views, function(viewNumber) {
        object.views.push({reported: false});
        object.allViews.push(object.views[object.views.length-1]);
        setupOneView(this, viewNumber, hotspotStart);
        hotspotStart += this.hotspots.length;
      });
      object.allViews.push(object.loadingView);
    }

    function setupLoadingView ()
    {
      var div = $("<div class='" + settings.cssPrefix + "view'></div>").css({
        position: "absolute",
        left: px(((settings.view.width - settings.loading.width) / 2)),
        top: px(((settings.view.height - settings.loading.height) / 2)),
        display: "none"
      });

      setTimeout(function(){
        if (!object.views[object.state.currentViewIndex].imageLoaded)
          div.show().animate({
            left: Math.round((settings.view.width - div.width()) / 2),
            top: Math.round((settings.view.height - div.height()) / 2)
          }, animationOptions(settings.animationSpeed.panAndZoom / 2, false));
      }, 1000);

      object.loadingView.div = div;

      object.loadingView.image = $("<img>").attr(
        {
          src: settings.loading.src,
          width: settings.loading.width,
          height: settings.loading.height
        }
      );
      object.loadingView.sizeParams = {
          originalWidth: settings.loading.width,
          originalHeight: settings.loading.height,
          adjustedWidth: settings.loading.width,
          adjustedHeight: settings.loading.height
      };
      var loadingDiv = $("<div>" + settings.texts.loading + "</div>").addClass(settings.cssPrefix + "loading-message");
      object.loadingView.imageLoaded = true;
      object.loadingView.div.append(object.loadingView.image.wrap("<center>").parent()).append(loadingDiv);
      object.widget.widgetViewWrapper.append(object.loadingView.div);
    }

    function setupOneView (viewJson, viewNumber, hotspotStart)
    {
      var view = $("<div class='" + settings.cssPrefix + "view'></div>");
      view.css({
        position: "absolute",
        left: px(((settings.view.width - settings.loading.width) / 2)),
        top: px(((settings.view.height - settings.loading.height) / 2))
      });
      object.views[viewNumber].div = view;
      view.hide();
      object.widget.widgetViewWrapper.append(view);

      setupViewMainImage(viewJson.image, view, viewNumber);
      setupViewHotspots(viewJson.hotspots, view, viewNumber, hotspotStart);
    }

    function imageLoaded (object, viewNumber, theImage)
    {
      var rawImage = theImage.get(0);

      var ratio = calculateZoomOutRatio(rawImage);

      object.views[viewNumber].sizeParams = {
          originalWidth: rawImage.width,
          originalHeight: rawImage.height,
          adjustedWidth: rawImage.width * ratio,
          adjustedHeight: rawImage.height * ratio
      };

      theImage.attr(
        {
          width: object.views[viewNumber].sizeParams.adjustedWidth,
          height: object.views[viewNumber].sizeParams.adjustedHeight
        }
      )

      object.views[viewNumber].imageLoaded = true;

      object.views[viewNumber].div.css({
        left: px((settings.view.width - object.views[viewNumber].sizeParams.adjustedWidth) / 2),
        top: px((settings.view.height - object.views[viewNumber].sizeParams.adjustedHeight) / 2)
      });

      $.each(object.hotspots, function()
        {
          if (this.viewNumber == viewNumber)
            this.inView.div.show();
        }
      );
      object.views[viewNumber].div.append(theImage);

      if (object.state.currentViewIndex == viewNumber)
        if (object.state.currentState == "")
          switchToView(viewNumber, settings.animationSpeed.imageSwitch);
        else
          zoomToHotspot(findHotspotNumberForId(object.state.currentState), false);
    }

    function setupViewMainImage (imageJson, view, viewNumber)
    {
      var cleanDomImage = $("<img/>");

      cleanDomImage.load(function()
        {
          imageLoaded(object, viewNumber, cleanDomImage);
        }
      );

      var titleAlt = imageJson.alt ? imageJson.alt : freemarkerReplace(settings.texts.viewImageTitle, {number: viewNumber + 1});

      cleanDomImage.attr({
        title: titleAlt,
        alt: titleAlt
      });

      if ($.browser.msie)
        setTimeout(function(){cleanDomImage.attr("src", imageJson.src);}, 100);
      else
        cleanDomImage.attr("src", imageJson.src);

      object.views[viewNumber].image = cleanDomImage;
    }

    function calculateZoomOutRatio (goodImg)
    {
      var imageWidth = goodImg.width;
      var imageHeight = goodImg.height;

      var viewWidth = object.widget.widgetViewWrapper.width() - 2 * settings.mainImageMargin;
      var viewHeight = object.widget.widgetViewWrapper.height() - 2 * settings.mainImageMargin;

      var wRatio = viewWidth / imageWidth;
      var hRatio = viewHeight / imageHeight;

      var ratio = (wRatio < hRatio) ? wRatio : hRatio;

      return ratio < 1 ? ratio : 1;
    }

    function setupViewHotspots (hotspotsJason, view, viewNumber, hotspotStart)
    {
      $.each (hotspotsJason, function () {
        object.hotspots[hotspotStart].viewNumber = viewNumber;
        object.hotspots[hotspotStart].view = object.views[viewNumber];
        setupAddHotspot(view, this, hotspotStart++);
      });
    }

    function setupAddHotspot (view, hotspotJson, markerNumber)
    {
      var xPercent = "" + (hotspotJson.x * 100) + "%";
      var yPercent = "" + (hotspotJson.y * 100) + "%";

      var markerHyperlink = $("<a></a>");
      markerHyperlink.attr({
        href: "javascript:void(0)",
        tabIndex: -1
      }).click(function(){gotoHotspot(markerNumber);});
      setupHover(markerHyperlink, markerNumber);
      setupAddPrettyMarker(markerHyperlink, markerNumber, hotspotJson.caption);

      markerHyperlinkWrapper = $("<div></div>");

      markerHyperlinkWrapper.css({
        position: "absolute",
        top: yPercent,
        left: xPercent
      }).hide();

      markerHyperlinkWrapper.append(markerHyperlink);

      view.append(markerHyperlinkWrapper)

      var images = markerHyperlink.find("img");
      object.hotspots[markerNumber].inView = {
        image1: images.eq(0),
        div: markerHyperlinkWrapper,
        a: markerHyperlink,
        dir: hotspotJson.direction,
        x: hotspotJson.x,
        y: hotspotJson.y
      };
    }

    function setupAddPrettyMarker (hyperlink, markerNumber, caption)
    {
      var img = $("<img>").attr({
        src : settings.directoryViewHotspotDigits.src,
        alt : (markerNumber + 1),
        title: caption
      }).css({
        "margin-left" : px(-settings.directoryViewHotspotDigits.width * markerNumber)
      });

      hyperlink.css({
        top: px(-settings.directoryViewHotspotDigits.height / 2),
        left: px(-settings.directoryViewHotspotDigits.width / 2),
        width: px(settings.directoryViewHotspotDigits.width),
        height: px(settings.directoryViewHotspotDigits.height),
        overflow: "hidden",
        position: "absolute"
      }).append(img);
    }

    function setupHover (item, hotspotNumber)
    {
      item.hover(
        function ()
        {
          if (object.state.keyboardFocus != -1)
            unhighlightHotspot();

          highlightHotspot(hotspotNumber);
        },
        function ()
        {
          unhighlightHotspot();

          if (object.state.keyboardFocus != -1)
            highlightHotspot(object.state.keyboardFocus);
        }
      );
    }

    function setupNavigator (json)
    {
      object.navItems.home =
        setupNavigatorTextLink(object, settings.texts.featuresList, "", settings.texts.featuresListTitle, settings.cssPrefix + "nav-home");
      object.navItems.firstItem =
        setupNavigatorImageLink(object, 0, 0, settings.texts.firstTitle, settings.cssPrefix + "nav-first");
      object.navItems.previousItem =
        setupNavigatorImageLink(object, 1, "", settings.texts.previousTitle, settings.cssPrefix + "nav-hotspot-previous");
      var i = 0;
      for (var v = 0; v < json.views.length; ++v)
        for (var h = 0; h < json.views[v].hotspots.length; ++h, ++i)
        {
          object.hotspots[i].inNavigator =
            setupNavigatorTextLink(object, "" + (i + 1), i, json.views[v].hotspots[h].caption, settings.cssPrefix + "nav-hotspot");
        }
      object.navItems.nextItem =
        setupNavigatorImageLink(object, 2, "", settings.texts.nextTitle, settings.cssPrefix + "nav-hotspot-next");
      object.navItems.lastItem =
        setupNavigatorImageLink(object, 3, object.hotspots.length - 1, settings.texts.lastTitle, settings.cssPrefix + "nav-last");
      object.navItems.close =
        setupNavigatorCloseButton(object, "", settings.texts.closeTitle, settings.cssPrefix + "nav-close");
    }

    function setupNavATag (hs)
    {
      var a = $("<a></a>").attr({href : "javascript:void(0)"}).css({
        overflow: "hidden",
        position: "relative",
        display: "block",
        "float": "left"
      }).click(function(){gotoHotspot(hs);});
      return a;
    }

    function setupNavigatorTextLink (object, linkText, hs, title, cssClass)
    {
      var a = setupNavATag(hs);
      a.addClass(cssClass);

      var div = $("<div>" + linkText + "</div>");
      div.attr({
        title: title
      });
      div.addClass(settings.cssPrefix + "nav-text")
      div.css({"white-space": "nowrap"});
      a.append(div);
      object.widget.widgetNavigator.append(a);
      return {a: a, div: div};
    }

    function setupNavigatorImageLink (object, itemNumberInSprite, hs, title, cssClass)
    {
      var a = setupNavATag(hs);
      a.addClass(cssClass);
      a.css({width: px(settings.navigatorSprite.width), height: px(settings.navigatorSprite.height)});

      var img = $("<img>");
      img.attr({
        title: title,
        src: settings.navigatorSprite.src
      });
      img.css({
        "margin-left": -(settings.navigatorSprite.width) * itemNumberInSprite,
        position: "absolute"
      });
      a.append(img);
      object.widget.widgetNavigator.append(a);
      return {a: a, img:img};
    }

    function setupNavigatorCloseButton (object, hs, title, cssClass)
    {
      var a = setupNavATag(hs);
      a.addClass(cssClass);
      a.css({width: px(settings.close.width), height: px(settings.close.height), "float": "right"});

      var img = $("<img>");
      img.attr({
        title: title,
        src: settings.close.src
      });
      img.css({
        position: "absolute"
      });
      a.append(img);
      object.widget.widgetNavigator.append(a);
      return {a: a, img:img};
    }

    function setupHotspotDetails (json)
    {
      var index = 0;
      for (var v = 0; v < json.views.length; ++v)
        for (var h = 0; h < json.views[v].hotspots.length; ++h, ++index)
        {
          object.hotspots[index].inDetailsView = {div: $(json.views[v].hotspots[h].description).prepend("<h3>" +(index+1) + ". " + json.views[v].hotspots[h].caption + "</h3>")};
          var mediaJson = json.views[v].hotspots[h].media;
          var renderer = mediaJson.type + "MediaRenderer";
          object.hotspots[index].inDetailsView.media = object[renderer](mediaJson, index, settings);
        }
    }

//** init
    function init ()
    {
      if (object.json.views.length == 0)
      {
        setupUnderConstruction();
        return;
      }

      var widgetRoot = $(freemarkerReplace($.fn.tour.widgetHtml, {"css-prefix": settings.cssPrefix})).css({
        width: "100%",
        height: "100%",
        position: "relative",
        overflow: "hidden",
        visibility: "inherit"
      });

      setupWidgetShortcuts(widgetRoot);
      setupWidgetStyles(widgetRoot);

      setupDirectory(object.json);
      setupViews(object.json);
      setupNavigator(object.json);
      setupHotspotDetails(object.json);

      sourceHtmlElement.append(widgetRoot);
      object.widget.widgetDirectory.parent().jScrollPane(settings.jScrollPane);

      updateLogicalState(logicalState);
    }

//** JSON convertion functions
    function convertToJson (sourceHtmlElement)
    {
      var rv = {views: []};
      $("table." + settings.cssPrefix + "data>tbody>tr", sourceHtmlElement).each(function()
      {
        rv.views.push(convertViewToJson($(this)));
      });
      return rv;
    }

    function convertViewToJson (viewHtml)
    {
      var rv = {image: convertViewImageToJason($("th>img", viewHtml)), hotspots: []};
      $("td>div", viewHtml).each(function()
      {
        rv.hotspots.push(convertHotspotToJson($(this)));
      });
      return rv;
    }

    function convertViewImageToJason (imageHtml)
    {
      var rv = {};
      rv.src = imageHtml.attr("src");
      if (imageHtml.attr("alt"))
        rv.alt = imageHtml.attr("alt");
      if (imageHtml.attr("width"))
        rv.width = 1 * imageHtml.attr("width");
      if (imageHtml.attr("height"))
        rv.height = 1 * imageHtml.attr("height");
      return rv;
    }

    function convertHotspotToJson (hotspotHtml)
    {
      var rv = {
        caption: $("h3", hotspotHtml).eq(0).text(),
        direction: hotspotHtml.attr("data-dir"),
        x: 1 * hotspotHtml.attr("data-x"),
        y: 1 * hotspotHtml.attr("data-y"),
        description: "<div><div>" + hotspotHtml.children("div." + settings.cssPrefix + "description").html() + "</div></div>",
        media: convertMediaToJason(hotspotHtml.children("div." + settings.cssPrefix + "media"))
      };
      return rv;
    }

    function convertMediaToJason (mediaHtml)
    {
      if (mediaHtml.size() == 0)
        return {type: "none"};

      var rv = {type: mediaHtml.attr("type")};

      mediaHtml = $("img,wcvideo", mediaHtml).eq(0);

      $.extend(rv, {
        width: 1 * mediaHtml.attr("width"),
        height: 1 * mediaHtml.attr("height"),
        src: mediaHtml.attr("src")
      });

      if (mediaHtml.attr("alt"))
        rv.alt = mediaHtml.attr("alt");

      if (rv.type == "video" && mediaHtml.attr("duration"))
        rv.duration = 1 * mediaHtml.attr("duration");

      return rv;
    }

    function prepareForIframeInjection (container, settingsOverride)
    {
      var body = $("body").get(0);
      var rv = null;

      if (typeof container == "string" && typeof body[container] == "function")
      {
        var origRv = body[container]();
        rv = {
          json: origRv.json,
          settings: $.extend({}, origRv.settings, settingsOverride),
          accessId: origRv.accessId + "inFrame",
          origContainer: origRv.origContainer
        };
      }
      else
      {
        rv = {
          json: object.json,
          settings: $.extend({}, settings, settingsOverride),
          accessId: container.attr("id"),
          origContainer: container
        };
      }

      body[rv.accessId] = function(){
        return rv;
      };

      return rv.accessId;
    }

    function putInIframe (logicalState, container, tourAccess)
    {
      var theFrame = $("<iframe frameBorder=\"0\" scrolling=\"no\">").attr({
        width: settings.size.width,
        height: settings.size.height
      }).css({
        border: 0,
        overflow: "hidden"
      });

      container.append(theFrame);

//      theFrame.get(0).contentWindow.onunload = function() // TODO: works only for firefox - reloads the tour when the iframe is reloaded due to disconnection from the dom
//      {
//        theFrame.remove();
//        setTimeout(function(){putInIframe (logicalState, container, tourAccess);}, 100);
//      };

      var doc = null;
      var domainSetter = "";
      function f1()
      {
        try
        {
          doc = theFrame.get(0).contentWindow.document;
        }
        catch (e)
        {
          domainSetter = "document.domain='" + container.get(0).document.domain + "';"
          theFrame.get(0).src = "javascript:void((function(){document.open();" + domainSetter + "document.write('<!DOCTYPE html>');document.close();})())";
          doc = theFrame.get(0).contentWindow.document;
        }
        doc.close();
        doc.open();
        var html = "<!DOCTYPE HTML>\n<html style='margin:0;padding:0;overflow:hidden'>\n<head>\n";
        html += "<script>\n\
                    WebCollageTourLoad = function ($){\n\
                      $(function()\n\
                      {\n" + domainSetter + "\
                        var tourAccess = window.parent.document.getElementsByTagName('body').item(0)['" + tourAccess + "'];\n\
                        $('div#" + settings.cssPrefix + "tour').tour('" + logicalState + "', tourAccess);\n\
                      });\n\
                    };\n\
                  <\/script>\n";
  
        $.each(settings.styles, function(){html += styleSrc(this);})
        $.each(settings.scripts, function(){html += scriptSrc(this);})
  
        html += "</head>\n<body style='margin:0;padding:0'>\n<div id='" + settings.cssPrefix + "tour'></div>\n</body>\n</html>";
        doc.write(html);
        doc.close();
      }
      try
      {
        f1();
      }
      catch (e)
      {
        // for some browsers (IE6 included) the contentWindow should not yet be accessed immedietly after setting its src
        // so we need to relinquish control back to the browser and then retry
        setTimeout(f1, 0);  
      }
    }

// Init code

    if (jsonAccess)
      object.json = jsonAccess().json;
    else if ($.fn.tour.parentAccess)
      object.json = $.fn.tour.parentAccess().json;
    else if (typeof settings.json != "undefined")
      object.json = settings.json;
    else
    {
      object.json = convertToJson(sourceHtmlElement);
      sourceHtmlElement.children().remove();
    }

    if (settings.prepareJsonOnly)
    {
      prepareForIframeInjection(sourceHtmlElement, {prepareJsonOnly: false});
      return sourceHtmlElement;
    }
    else if (settings.inIframe)
    {
      if (jsonAccess)
        putInIframe(logicalState, sourceHtmlElement, prepareForIframeInjection(jsonAccess().accessId, {inIframe:false}));
      else
        putInIframe(logicalState, sourceHtmlElement, prepareForIframeInjection(sourceHtmlElement, {inIframe:false}));
      return sourceHtmlElement;
    }

    if ($.fn.tour.parentAccess)
      $.fn.tour.parentAccess().origContainer.get(0).tourTo = function(logicalState)
      {
        updateLogicalState(logicalState);
      };
    else
      sourceHtmlElement[0].tourTo = function(logicalState)
      {
        updateLogicalState(logicalState);
      };

    init();

    return sourceHtmlElement;
  }

  if (typeof WebCollageTourLoad == "function")
    WebCollageTourLoad($);

})
//------------------- tour/tour.js End -------------------
//------------------- tour/inline-params.js Begin -------------------
(_wcjq, null);
//------------------- tour/inline-params.js End -------------------
//------------------- highslide/highslide3318.js Begin -------------------
// ------------------------------------------- HIGHSLIDE BEGIN -----------------------------------

var _wchs={graphicsDir:'highslide/graphics/',restoreCursor:'zoomout.cur',expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,restoreTitle:'Click to close image. Use arrow keys for next and previous.',loadingText:'Loading...',loadingTitle:'Click to cancel',loadingOpacity:0.75,outlineWhileAnimating:2,outlineStartOffset:3,enableKeyListener:true,previousText:'Previous',nextText:'Next',moveText:'Move',closeText:'Close',closeTitle:'Click to close',resizeTitle:'Resize',allowWidthReduction:false,allowHeightReduction:true,preserveContent:true,objectLoadTime:'before',slideshowGroup:null,minWidth:200,minHeight:200,outlineType:'drop-shadow',wrapperClassName:'wchs-wrapper',expanders:[],overrides:['outlineType','outlineWhileAnimating','contentId','width','height','allowWidthReduction','allowHeightReduction','preserveContent','objectWidth','objectHeight','objectLoadTime','swfObject','wrapperClassName','minWidth','minHeight','slideshowGroup','easing','easingClose','fadeInOut'],pendingOutlines:{},sleeping:[],clones:{},ie:(document.all&&!window.opera),safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(id){return document.getElementById(id);},push:function(arr,val){arr[arr.length]=val;},createElement:function(tag,attribs,styles,parent,nopad){var el=document.createElement(tag);if(attribs)_wchs.setAttribs(el,attribs);if(nopad)_wchs.setStyles(el,{padding:0,border:'none',margin:0});if(styles)_wchs.setStyles(el,styles);if(parent)parent.appendChild(el);return el;},setAttribs:function(el,attribs){for(var x in attribs)el[x]=attribs[x];},setStyles:function(el,styles){for(var x in styles){try{if(_wchs.ie&&x=='opacity'){if(styles[x]>0.99)el.style.removeAttribute('filter');else el.style.filter='alpha(opacity='+(styles[x]*100)+')';}
else el.style[x]=styles[x];}
catch(e){}}},ieVersion:function(){var arr=navigator.appVersion.split("MSIE");return arr[1]?parseFloat(arr[1]):null;},getPageSize:function(){var iebody=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;var width=_wchs.ie?iebody.clientWidth:(document.documentElement.clientWidth||self.innerWidth),height=_wchs.ie?iebody.clientHeight:self.innerHeight;return{width:width,height:height,scrollLeft:_wchs.ie?iebody.scrollLeft:pageXOffset,scrollTop:_wchs.ie?iebody.scrollTop:pageYOffset}},position:function(el){var p={x:el.offsetLeft,y:el.offsetTop};while(el.offsetParent){el=el.offsetParent;p.x+=el.offsetLeft;p.y+=el.offsetTop;if(el!=document.body&&el!=document.documentElement){p.x-=el.scrollLeft;p.y-=el.scrollTop;}}
return p;},expand:function(a,params,custom){if(a.getParams)return params;try{new _wchs.Expander(a,params,custom);return false;}catch(e){return true;}},htmlExpand:function(a,params,custom){if(a.getParams)return params;for(var i=0;i<_wchs.sleeping.length;i++){if(_wchs.sleeping[i]&&_wchs.sleeping[i].a==a){_wchs.sleeping[i].awake();_wchs.sleeping[i]=null;return false;}}
try{_wchs.hasHtmlexpanders=true;new _wchs.Expander(a,params,custom,'html');return false;}catch(e){return true;}},getElementByClass:function(el,tagName,className){var els=el.getElementsByTagName(tagName);for(var i=0;i<els.length;i++){if((new RegExp(className)).test(els[i].className)){return els[i];}}
return null;},getSelfRendered:function(){var s='<div class="wchs-header"><ul>'
+'<li class="wchs-previous"><a onclick="return _wchs.previous(this)" href="#">'+_wchs.previousText+'</a></li>'
+'<li class="wchs-next"><a onclick="return _wchs.next(this)" href="#">'+_wchs.nextText+'</a></li>'
+'<li class="wchs-move"><a href="#" onclick="return false">'+_wchs.moveText+'</a></li>'
+'<li class="wchs-close"><a onclick="return _wchs.close(this)" title="'+_wchs.closeTitle+'" href="#">'
+_wchs.closeText+'</a></li>'
+'</ul></div>'
+'<div class="wchs-body"></div>'
+'<div class="wchs-footer"><div>'
+'<span class="wchs-resize" title="'+_wchs.resizeTitle+'"><span></span></span>'
+'</div></div>';return _wchs.createElement('div',{className:'wchs-html-content',innerHTML:s});},getAdjacentAnchor:function(key,op){var aAr=document.getElementsByTagName('A'),hsAr={},activeI=-1,j=0;for(var i=0;i<aAr.length;i++){if(_wchs.isHsAnchor(aAr[i])&&((_wchs.expanders[key].slideshowGroup==_wchs.getParam(aAr[i],'slideshowGroup')))){hsAr[j]=aAr[i];if(_wchs.expanders[key]&&aAr[i]==_wchs.expanders[key].a){activeI=j;}
j++;}}
return hsAr[activeI+op]||null;},getParam:function(a,param){a.getParams=a.onclick;var p=a.getParams?a.getParams():null;a.getParams=null;return(p&&typeof p[param]!='undefined')?p[param]:(typeof _wchs[param]!='undefined'?_wchs[param]:null);},getSrc:function(a){var src=_wchs.getParam(a,'src');if(src)return src;return a.href;},getNode:function(id){var node=_wchs.$(id),clone=_wchs.clones[id],a={};if(!node&&!clone)return null;if(!clone){clone=node.cloneNode(true);clone.id='';_wchs.clones[id]=clone;return node;}else{return clone.cloneNode(true);}},purge:function(d){var a=d.attributes,i,l,n;if(a){l=a.length;for(var i=0;i<l;i+=1){if(a[i]){n=a[i].name;if(typeof d[n]==='function'){d[n]=null;}}}}
a=d.childNodes;if(a){l=a.length;for(var i=0;i<l;i+=1)_wchs.purge(d.childNodes[i]);}},discardElement:function(d){if(_wchs.ie)_wchs.purge(d);_wchs.garbageBin.appendChild(d);_wchs.garbageBin.innerHTML='';},previousOrNext:function(el,op){var exp=_wchs.last=_wchs.getExpander(el);try{var adj=_wchs.upcoming=_wchs.getAdjacentAnchor(exp.key,op);adj.onclick();}catch(e){}
try{exp.close();}catch(e){}
return false;},previous:function(el){return _wchs.previousOrNext(el,-1);},next:function(el){return _wchs.previousOrNext(el,1);},keyHandler:function(e){if(!e)e=window.event;if(!e.target)e.target=e.srcElement;if(e.target.form)return true;var op=null;switch(e.keyCode){case 32:case 34:case 39:case 40:op=1;break;case 8:case 33:case 37:case 38:op=-1;break;case 27:case 13:op=0;}
if(op!==null){_wchs.removeEventListener(document,'keydown',_wchs.keyHandler);if(!_wchs.enableKeyListener)return true;if(e.preventDefault)e.preventDefault();else e.returnValue=false;if(op==0){try{_wchs.getExpander().close();}catch(e){}
return false;}else{return _wchs.previousOrNext(_wchs.focusKey,op);}}
return true;},getWrapperKey:function(element){var el,re=/^wchs-wrapper-([0-9]+)$/;el=element;while(el.parentNode){if(el.id&&re.test(el.id))return el.id.replace(re,"$1");el=el.parentNode;}
el=element;while(el.parentNode){if(el.tagName&&_wchs.isHsAnchor(el)){for(var key=0;key<_wchs.expanders.length;key++){var exp=_wchs.expanders[key];if(exp&&exp.a==el)return key;}}
el=el.parentNode;}
return null;},getExpander:function(el){if(typeof el=='undefined')return _wchs.expanders[_wchs.focusKey]||null;if(typeof el=='number')return _wchs.expanders[el]||null;if(typeof el=='string')el=_wchs.$(el);return _wchs.expanders[_wchs.getWrapperKey(el)]||null;},isHsAnchor:function(a){return(a.onclick&&a.onclick.toString().replace(/\s/g,' ').match(/_wchs.(htmlE|e)xpand/));},addEventListener:function(el,event,func){try{el.addEventListener(event,func,false);}catch(e){try{el.detachEvent('on'+event,func);el.attachEvent('on'+event,func);}catch(e){el['on'+event]=func;}}},removeEventListener:function(el,event,func){try{el.removeEventListener(event,func,false);}catch(e){try{el.detachEvent('on'+event,func);}catch(e){el['on'+event]=null;}}},genContainer:function(){if(!_wchs.container){_wchs.container=_wchs.createElement('div',null,{position:'absolute',left:0,top:0,width:'100%',zIndex:_wchs.zIndexCounter},document.body,true);_wchs.loading=_wchs.createElement('a',{className:'wchs-loading',title:_wchs.loadingTitle,innerHTML:_wchs.loadingText,href:'javascript:void(0)'},{position:'absolute',opacity:_wchs.loadingOpacity,left:'-9999px',zIndex:1},_wchs.container);_wchs.garbageBin=_wchs.createElement('div',null,{display:'none'},_wchs.container);_wchs.clearing=_wchs.createElement('div',null,{clear:'both',paddingTop:'1px'},null,true);Math.linearTween=function(t,b,c,d){return c*t/d+b;};Math.easeInQuad=function(t,b,c,d){return c*(t/=d)*t+b;};}},close:function(el){var exp=_wchs.getExpander(el);if(exp)exp.close();return false;}};_wchs.Outline=function(outlineType,onLoad){this.onLoad=onLoad;this.outlineType=outlineType;var v=_wchs.ieVersion(),tr;this.hasAlphaImageLoader=_wchs.ie&&v>=5.5&&v<7;if(!outlineType){if(onLoad)onLoad();return;}
_wchs.genContainer();this.table=_wchs.createElement('table',{cellSpacing:0},{visibility:'hidden',position:'absolute',borderCollapse:'collapse'},_wchs.container,true);var tbody=_wchs.createElement('tbody',null,null,this.table,1);this.td=[];for(var i=0;i<=8;i++){if(i%3==0)tr=_wchs.createElement('tr',null,{height:'auto'},tbody,true);this.td[i]=_wchs.createElement('td',null,null,tr,true);var style=i!=4?{lineHeight:0,fontSize:0}:{position:'relative'};_wchs.setStyles(this.td[i],style);}
this.td[4].className=outlineType;this.preloadGraphic();};_wchs.Outline.prototype={preloadGraphic:function(){var src=_wchs.graphicsDir+(_wchs.outlinesDir||"outlines/")+this.outlineType+".png";var appendTo=_wchs.safari?_wchs.container:null;this.graphic=_wchs.createElement('img',null,{position:'absolute',left:'-9999px',top:'-9999px'},appendTo,true);var pThis=this;this.graphic.onload=function(){pThis.onGraphicLoad();};this.graphic.src=src;},onGraphicLoad:function(){var o=this.offset=this.graphic.width/4,pos=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],dim={height:(2*o)+'px',width:(2*o)+'px'};for(var i=0;i<=8;i++){if(pos[i]){if(this.hasAlphaImageLoader){var w=(i==1||i==7)?'100%':this.graphic.width+'px';var div=_wchs.createElement('div',null,{width:'100%',height:'100%',position:'relative',overflow:'hidden'},this.td[i],true);_wchs.createElement('div',null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:'absolute',width:w,height:this.graphic.height+'px',left:(pos[i][0]*o)+'px',top:(pos[i][1]*o)+'px'},div,true);}else{_wchs.setStyles(this.td[i],{background:'url('+this.graphic.src+') '+(pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});}
if(window.opera&&(i==3||i==5))
_wchs.createElement('div',null,dim,this.td[i],true);_wchs.setStyles(this.td[i],dim);}}
this.graphic=null;if(_wchs.pendingOutlines[this.outlineType])_wchs.pendingOutlines[this.outlineType].destroy();_wchs.pendingOutlines[this.outlineType]=this;if(this.onLoad)this.onLoad();},setPosition:function(exp,x,y,w,h,vis){if(vis)this.table.style.visibility=(h>=4*this.offset)?'visible':'hidden';this.table.style.left=(x-this.offset)+'px';this.table.style.top=(y-this.offset)+'px';this.table.style.width=(w+2*(exp.offsetBorderW+this.offset))+'px';w+=2*(exp.offsetBorderW-this.offset);h+=+2*(exp.offsetBorderH-this.offset);this.td[4].style.width=w>=0?w+'px':0;this.td[4].style.height=h>=0?h+'px':0;if(this.hasAlphaImageLoader)this.td[3].style.height=this.td[5].style.height=this.td[4].style.height;},destroy:function(hide){if(hide)this.table.style.visibility='hidden';else _wchs.discardElement(this.table);}};_wchs.Expander=function(a,params,custom,contentType){this.a=a;this.custom=custom;this.contentType=contentType||'image';this.isHtml=(contentType=='html');this.isImage=!this.isHtml;_wchs.genContainer();var key=this.key=_wchs.expanders.length;for(var i=0;i<_wchs.overrides.length;i++){var name=_wchs.overrides[i];this[name]=params&&typeof params[name]!='undefined'?params[name]:_wchs[name];}
var el=this.thumb=((params&&params.thumbnailId)?_wchs.$(params.thumbnailId):null)||a.getElementsByTagName('img')[0]||a;this.thumbsUserSetId=el.id||a.id;for(var i=0;i<_wchs.expanders.length;i++){if(_wchs.expanders[i]&&_wchs.expanders[i].a==a){_wchs.expanders[i].focus();return false;}}
for(var i=0;i<_wchs.expanders.length;i++){if(_wchs.expanders[i]&&_wchs.expanders[i].thumb!=el&&!_wchs.expanders[i].onLoadStarted){_wchs.expanders[i].cancelLoading();}}
_wchs.expanders[this.key]=this;if(_wchs.expanders[key-1])_wchs.expanders[key-1].close();if(typeof _wchs.focusKey!='undefined'&&_wchs.expanders[_wchs.focusKey])
_wchs.expanders[_wchs.focusKey].close();var pos=_wchs.position(el);this.thumbWidth=el.width?el.width:el.offsetWidth;this.thumbHeight=el.height?el.height:el.offsetHeight;this.thumbLeft=pos.x;this.thumbTop=pos.y;this.thumbOffsetBorderW=(this.thumb.offsetWidth-this.thumbWidth)/2;this.thumbOffsetBorderH=(this.thumb.offsetHeight-this.thumbHeight)/2;this.wrapper=_wchs.createElement('div',{id:'wchs-wrapper-'+this.key,className:this.wrapperClassName},{visibility:'hidden',position:'absolute',zIndex:_wchs.zIndexCounter++},null,true);if(this.contentType=='image'&&this.outlineWhileAnimating==2)
this.outlineWhileAnimating=0;if(_wchs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+'Create']();}else if(!this.outlineType){this[this.contentType+'Create']();}else{this.displayLoading();var exp=this;new _wchs.Outline(this.outlineType,function(){exp.connectOutline();exp[exp.contentType+'Create']();});}
return true;};_wchs.Expander.prototype={/*stop downloading movie on close*/onBeforeClose:function(){try{if (typeof _wchs.player != 'undefined') {_wchs.player._api().fp_close();_wchs.player.kill();delete _wchs.player;};}catch(e){}}, connectOutline:function(x,y){var w=_wchs.pendingOutlines[this.outlineType];this.objOutline=w;w.table.style.zIndex=this.wrapper.style.zIndex;_wchs.pendingOutlines[this.outlineType]=null;},displayLoading:function(){if(this.onLoadStarted||this.loading)return;this.originalCursor=this.a.style.cursor;this.a.style.cursor='wait';this.loading=_wchs.loading;var exp=this;this.loading.onclick=function(){exp.cancelLoading();};this.loading.style.top=(this.thumbTop
+(this.thumbHeight-this.loading.offsetHeight)/2)+'px';var exp=this,left=(this.thumbLeft+this.thumbOffsetBorderW
+(this.thumbWidth-this.loading.offsetWidth)/2)+'px';setTimeout(function(){if(exp.loading)exp.loading.style.left=left},100);},imageCreate:function(){var exp=this;var img=document.createElement('img');this.content=img;img.onload=function(){if(_wchs.expanders[exp.key])exp.contentLoaded();};img.onclick=function(){try{exp.close();}catch(e){}};if(_wchs.blockRightClick)img.oncontextmenu=function(){return false;};img.className='wchs-image';img.style.visibility='hidden';img.style.display='block';img.style.position='absolute';img.style.maxWidth='none';img.style.zIndex=3;img.title=_wchs.restoreTitle;if(_wchs.safari)_wchs.container.appendChild(img);if(_wchs.ie&&_wchs.flushImgSize)img.src=null;img.src=_wchs.getSrc(this.a);this.displayLoading();},htmlCreate:function(){this.content=_wchs.getNode(this.contentId);if(!this.content)
this.content=_wchs.getSelfRendered();this.innerContent=this.content;if(this.swfObject||this.objectType=='iframe')this.setObjContainerSize(this.innerContent);_wchs.container.appendChild(this.wrapper);_wchs.setStyles(this.wrapper,{position:'static',padding:'0 '+_wchs.marginRight+'px 0 '+_wchs.marginLeft+'px'});this.content=_wchs.createElement('div',{className:'wchs-html'},{position:'relative',zIndex:3,overflow:'hidden'},this.wrapper);this.mediumContent=_wchs.createElement('div',null,null,this.content,1);this.mediumContent.appendChild(this.innerContent);_wchs.setStyles(this.innerContent,{position:'relative'});this.innerContent.className+=' wchs-display-block';if(this.width)this.innerContent.style.width=this.width+'px';if(this.height)this.innerContent.style.height=this.height+'px';if(this.innerContent.offsetWidth<this.minWidth)
this.innerContent.style.width=this.minWidth+'px';this.contentLoaded();},contentLoaded:function(){try{if(!this.content)return;this.content.onload=null;if(this.onLoadStarted)return;else this.onLoadStarted=true;if(this.loading){_wchs.setStyles(this.loading,{left:'-9999px',top:'-9999px'});this.loading=null;this.a.style.cursor=this.originalCursor||'';}
this.marginBottom=_wchs.marginBottom;if(this.isImage){this.newWidth=this.content.width;this.newHeight=this.content.height;this.fullExpandWidth=this.newWidth;this.fullExpandHeight=this.newHeight;this.content.style.width=this.thumbWidth+'px';this.content.style.height=this.thumbHeight+'px';}else if(this.htmlGetSize)this.htmlGetSize();this.wrapper.appendChild(this.content);this.content.style.position='relative';this.wrapper.style.left=this.thumbLeft+'px';this.wrapper.style.top=this.thumbTop+'px';_wchs.container.appendChild(this.wrapper);this.offsetBorderW=(this.content.offsetWidth-this.thumbWidth)/2;this.offsetBorderH=(this.content.offsetHeight-this.thumbHeight)/2;var modMarginRight=_wchs.marginRight+2*this.offsetBorderW;this.marginBottom+=2*this.offsetBorderH;var ratio=this.newWidth/this.newHeight;var minWidth=this.newWidth;var minHeight=this.newHeight;var justify={x:'auto',y:'auto'};var page=_wchs.getPageSize();this.x={min:parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW,span:this.newWidth,minSpan:(this.newWidth<minWidth)?this.newWidth:minWidth,marginMin:_wchs.marginLeft,marginMax:modMarginRight,scroll:page.scrollLeft,clientSpan:page.width,thumbSpan:this.thumbWidth};var oldRight=this.x.min+parseInt(this.thumbWidth);this.x=this.justify(this.x);this.y={min:parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH,span:this.newHeight,minSpan:this.newHeight<minHeight?this.newHeight:minHeight,marginMin:_wchs.marginTop,marginMax:this.marginBottom,scroll:page.scrollTop,clientSpan:page.height,thumbSpan:this.thumbHeight};var oldBottom=this.y.min+parseInt(this.thumbHeight);this.y=this.justify(this.y);if(this.isHtml)this.htmlSizeOperations();var x=this.x;var y=this.y;this.show();}catch(e){window.location.href=_wchs.getSrc(this.a);}},setObjContainerSize:function(parent,auto){var c=_wchs.getElementByClass(parent,'DIV','wchs-body');if(this.swfObject){c.style.width=this.swfObject.attributes.width+'px';c.style.height=this.swfObject.attributes.height+'px';}},writeExtendedContent:function(){if(this.hasExtendedContent)return;var exp=this;this.body=_wchs.getElementByClass(this.innerContent,'DIV','wchs-body');if(this.objectType=='iframe'){this.displayLoading();this.ruler=_wchs.clearing.cloneNode(1);this.body.appendChild(this.ruler);this.newWidth=this.innerContent.offsetWidth;if(!this.objectWidth)this.objectWidth=this.ruler.offsetWidth;var hDiff=this.innerContent.offsetHeight-this.body.offsetHeight;var h=this.objectHeight||(_wchs.getPageSize()).height-hDiff-_wchs.marginTop-_wchs.marginBottom;var src=_wchs.ie6SSL?' src="blank.htm" ':'';var tag=_wchs.ie?'<iframe name="hsIframe'+this.key+'" '+src+'/>':'iframe';this.iframe=_wchs.createElement(tag,{name:'hsIframe'+this.key,frameBorder:0,allowTransparency:true,key:this.key},{width:this.objectWidth+'px',height:h+'px'},this.body);if(this.objectLoadTime=='before')
_wchs.addEventListener(this.iframe,'load',function(){if(_wchs.expanders[exp.key])_wchs.expanders[exp.key].contentLoaded();});if(_wchs.safari)this.iframe.src=null;this.iframe.src=_wchs.getSrc(this.a);if(this.objectLoadTime=='after')this.correctIframeSize();}else if(this.swfObject){this.body.id=this.body.id||'_wchs-flash-id-'+this.key;this.swfObject.write(this.body.id);}
this.hasExtendedContent=true;},htmlGetSize:function(){this.innerContent.appendChild(_wchs.clearing);if(!this.newWidth)this.newWidth=this.innerContent.offsetWidth;this.newHeight=this.innerContent.offsetHeight;this.innerContent.removeChild(_wchs.clearing);if(_wchs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)){this.newHeight=parseInt(this.innerContent.currentStyle.height);}
_wchs.setStyles(this.wrapper,{position:'absolute',padding:'0'});_wchs.setStyles(this.content,{width:this.thumbWidth+'px',height:this.thumbHeight+'px'});},htmlSizeOperations:function(){this.setObjContainerSize(this.innerContent);if(this.swfObject&&this.objectLoadTime=='before')this.writeExtendedContent();if(this.x.span<this.newWidth&&!this.allowWidthReduction)this.x.span=this.newWidth;if(this.y.span<this.newHeight&&!this.allowHeightReduction)this.y.span=this.newHeight;this.scrollerDiv=this.innerContent;_wchs.setStyles(this.mediumContent,{width:this.x.span+'px',position:'relative',left:(this.x.min-this.thumbLeft)+'px',top:(this.y.min-this.thumbTop)+'px'});_wchs.setStyles(this.innerContent,{border:'none',width:'auto',height:'auto'});var node=_wchs.getElementByClass(this.innerContent,'DIV','wchs-body');if(node&&!this.swfObject&&this.objectType!='iframe'){var cNode=node;node=_wchs.createElement(cNode.nodeName,null,{overflow:'hidden'},null,true);cNode.parentNode.insertBefore(node,cNode);node.appendChild(_wchs.clearing);node.appendChild(cNode);var wDiff=this.innerContent.offsetWidth-node.offsetWidth;var hDiff=this.innerContent.offsetHeight-node.offsetHeight;node.removeChild(_wchs.clearing);var kdeBugCorr=_wchs.safari||navigator.vendor=='KDE'?1:0;_wchs.setStyles(node,{width:(this.x.span-wDiff-kdeBugCorr)+'px',height:(this.y.span-hDiff)+'px',overflow:'auto',position:'relative'});if(kdeBugCorr&&cNode.offsetHeight>node.offsetHeight){node.style.width=(parseInt(node.style.width)+kdeBugCorr)+'px';}
this.scrollingContent=node;this.scrollerDiv=this.scrollingContent;}
if(!this.scrollingContent&&this.y.span<this.mediumContent.offsetHeight)this.scrollerDiv=this.content;if(this.scrollerDiv==this.content&&!this.allowWidthReduction&&this.objectType!='iframe'){this.x.span+=17;}
if(this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight){var delta = this.scrollerDiv.offsetHeight - this.scrollerDiv.parentNode.offsetHeight;if(delta>5){setTimeout("try { _wchs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",_wchs.expandDuration);}}},justify:function(p){var tgt,dim=p==this.x?'x':'y';var hasMovedMin=false;p.min=Math.round(p.min-((p.span-p.thumbSpan)/2));if(p.min<p.scroll+p.marginMin){p.min=p.scroll+p.marginMin;hasMovedMin=true;}
if(p.min+p.span>p.scroll+p.clientSpan-p.marginMax){if(hasMovedMin){}else if(p.span<p.clientSpan-p.marginMin-p.marginMax){p.min=p.scroll+p.clientSpan-p.span-p.marginMin-p.marginMax;}else{p.min=p.scroll+p.marginMin;}}
if(p.min<p.marginMin){tmpMin=p.min;p.min=p.marginMin;}
return p;},show:function(){var imgPos={x:this.x.min-20,y:this.y.min-20,w:this.x.span+40,h:this.y.span+40};_wchs.hideSelects=(_wchs.ie&&_wchs.ieVersion()<7);if(_wchs.hideSelects)this.showHideElements('SELECT','hidden',imgPos);_wchs.hideIframes=((window.opera&&navigator.appVersion<9)||navigator.vendor=='KDE'||(_wchs.ie&&_wchs.ieVersion()<5.5));if(_wchs.hideIframes)this.showHideElements('IFRAME','hidden',imgPos);if(_wchs.geckoMac)this.showHideElements('*','hidden',imgPos);this.changeSize(1,{x:this.thumbLeft+this.thumbOffsetBorderW-this.offsetBorderW,y:this.thumbTop+this.thumbOffsetBorderH-this.offsetBorderH,w:this.thumbWidth,h:this.thumbHeight,imgW:this.thumbWidth,o:_wchs.outlineStartOffset},{x:this.x.min,y:this.y.min,w:this.x.span,h:this.y.span,imgW:this.x.imgSpan,o:this.objOutline?this.objOutline.offset:0},_wchs.expandDuration,_wchs.expandSteps);},changeSize:function(up,from,to,dur,steps){if(up&&this.objOutline&&!this.outlineWhileAnimating)
this.objOutline.setPosition(this,this.x.min,this.y.min,this.x.span,this.y.span);else if(!up&&this.objOutline){if(this.outlineWhileAnimating)this.objOutline.setPosition(this,from.x,from.y,from.w,from.h);else this.objOutline.destroy((this.isHtml&&this.preserveContent));}
if(this.fadeInOut){from.op=up?0:1;to.op=up;}
var t,exp=this,easing=Math[this.easing]||Math.easeInQuad;if(!up)easing=Math[this.easingClose]||easing;for(var i=1;i<=steps;i++){t=Math.round(i*(dur/steps));(function(){var pI=i,size={};for(var x in from){size[x]=easing(t,from[x],to[x]-from[x],dur);if(/[xywh]/.test(x))size[x]=Math.round(size[x]);}
setTimeout(function(){if(up&&pI==1){exp.content.style.visibility='visible';exp.a.className+=' wchs-active-anchor';}
exp.setSize(size);},t);})();}
if(up){setTimeout(function(){if(exp.objOutline)exp.objOutline.table.style.visibility="visible";},t);setTimeout(function(){exp.afterExpand();},t+50);}
else setTimeout(function(){exp.afterClose();},t);},setSize:function(to){try{if(this.isHtml){_wchs.setStyles(this.content,{width:to.w+'px',height:to.h+'px'});_wchs.setStyles(this.mediumContent,{left:(this.x.min-to.x)+'px',top:(this.y.min-to.y)+'px'});this.innerContent.style.visibility='visible';}else{this.wrapper.style.width=(to.w+2*this.offsetBorderW)+'px';this.content.style.width=((to.imgW&&!isNaN(to.imgW))?to.imgW:to.w)+'px';if(_wchs.safari)this.content.style.maxWidth=this.content.style.width;this.content.style.height=to.h+'px';}
if(to.op)_wchs.setStyles(this.wrapper,{opacity:to.op});if(this.objOutline&&this.outlineWhileAnimating){var o=this.objOutline.offset-to.o;this.objOutline.setPosition(this,to.x+o,to.y+o,to.w-2*o,to.h-2*o,1);}
_wchs.setStyles(this.wrapper,{'visibility':'visible','left':to.x+'px','top':to.y+'px'});}catch(e){window.location.href=_wchs.getSrc(this.a);}},afterExpand:function(){this.isExpanded=true;this.focus();if(this.isHtml&&this.objectLoadTime=='after')this.writeExtendedContent();if(this.isHtml){}
if(!this.caption)this.prepareNextOutline();},prepareNextOutline:function(){var key=this.key;var outlineType=this.outlineType;new _wchs.Outline(outlineType);},cancelLoading:function(){_wchs.expanders[this.key]=null;this.a.style.cursor=this.originalCursor;if(this.loading)_wchs.loading.style.left='-9999px';},showHideElements:function(tagName,visibility,imgPos){var els=document.getElementsByTagName(tagName);var prop=tagName=='*'?'overflow':'visibility';for(var i=0;i<els.length;i++){if(prop=='visibility'||(document.defaultView.getComputedStyle(els[i],"").getPropertyValue('overflow')=='auto'||els[i].getAttribute('hidden-by')!=null)){var hiddenBy=els[i].getAttribute('hidden-by');if(visibility=='visible'&&hiddenBy){hiddenBy=hiddenBy.replace('['+this.key+']','');els[i].setAttribute('hidden-by',hiddenBy);if(!hiddenBy)els[i].style[prop]=els[i].origProp;}else if(visibility=='hidden'){var elPos=_wchs.position(els[i]);elPos.w=els[i].offsetWidth;elPos.h=els[i].offsetHeight;var clearsX=(elPos.x+elPos.w<imgPos.x||elPos.x>imgPos.x+imgPos.w);var clearsY=(elPos.y+elPos.h<imgPos.y||elPos.y>imgPos.y+imgPos.h);var wrapperKey=_wchs.getWrapperKey(els[i]);if(!clearsX&&!clearsY&&wrapperKey!=this.key){if(!hiddenBy){els[i].setAttribute('hidden-by','['+this.key+']');els[i].origProp=els[i].style[prop];els[i].style[prop]='hidden';}else if(!hiddenBy.match('['+this.key+']')){els[i].setAttribute('hidden-by',hiddenBy+'['+this.key+']');}}else if(hiddenBy=='['+this.key+']'||_wchs.focusKey==wrapperKey){els[i].setAttribute('hidden-by','');els[i].style[prop]=els[i].origProp||'';}else if(hiddenBy&&hiddenBy.match('['+this.key+']')){els[i].setAttribute('hidden-by',hiddenBy.replace('['+this.key+']',''));}}}}},focus:function(){this.wrapper.style.zIndex=_wchs.zIndexCounter++;if(this.isImage){this.content.title=_wchs.restoreTitle;_wchs.styleRestoreCursor=window.opera?'pointer':'url('+_wchs.graphicsDir+_wchs.restoreCursor+'), pointer';if(_wchs.ie&&_wchs.ieVersion()<6)_wchs.styleRestoreCursor='hand';this.content.style.cursor=_wchs.styleRestoreCursor;}
_wchs.focusKey=this.key;_wchs.addEventListener(document,'keydown',_wchs.keyHandler);},close:function(){if(this.isClosing||!this.isExpanded)return;this.isClosing=true;if (typeof this.onBeforeClose == 'function') this.onBeforeClose();_wchs.removeEventListener(document,'keydown',_wchs.keyHandler);try{if(this.isHtml)this.htmlPrepareClose();this.content.style.cursor='default';this.changeSize(0,{x:this.x.min,y:this.y.min,w:this.x.span,h:parseInt(this.content.style.height),imgW:this.x.imgSpan,o:this.objOutline?this.objOutline.offset:0},{x:this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,y:this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,w:this.thumbWidth,h:this.thumbHeight,imgW:this.thumbWidth,o:_wchs.outlineStartOffset},_wchs.restoreDuration,_wchs.restoreSteps);}catch(e){this.afterClose();}},htmlPrepareClose:function(){if(_wchs.geckoMac){if(!_wchs.mask)_wchs.mask=_wchs.createElement('div',null,{position:'absolute'},_wchs.container);_wchs.setStyles(_wchs.mask,{width:this.x.span+'px',height:this.y.span+'px',left:this.x.min+'px',top:this.y.min+'px',display:'block'});}
if(this.swfObject)try{if (this.swfObject.getAttribute) _wchs.$(this.swfObject.getAttribute('id')).StopPlay();}catch(e){}
if(this.objectLoadTime=='after'&&!this.preserveContent)this.destroyObject();if(this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent)
this.scrollerDiv.style.overflow='hidden';},destroyObject:function(){if(_wchs.ie&&this.iframe)
try{this.iframe.contentWindow.document.body.innerHTML='';}catch(e){}
this.body.innerHTML='';},sleep:function(){if(this.objOutline)this.objOutline.table.className='wchs-display-none';this.wrapper.className+=' wchs-display-none';_wchs.push(_wchs.sleeping,this);},awake:function(){_wchs.expanders[this.key]=this;if(_wchs.focusKey!=this.key){try{_wchs.expanders[_wchs.focusKey].close();}catch(e){}}
this.wrapper.className=this.wrapper.className.replace(/wchs-display-none/,'');var z=_wchs.zIndexCounter++;this.wrapper.style.zIndex=z;this.isClosing=false;var o=this.objOutline||0;if(o){if(!this.outlineWhileAnimating)o.table.style.visibility='hidden';o.table.className=null;o.table.style.zIndex=z;}
this.show();},afterClose:function(){this.a.className=this.a.className.replace('wchs-active-anchor','');if(_wchs.hideSelects)this.showHideElements('SELECT','visible');if(_wchs.hideIframes)this.showHideElements('IFRAME','visible');if(_wchs.geckoMac)this.showHideElements('*','visible');if(this.isHtml&&this.preserveContent)this.sleep();else{if(this.objOutline&&this.outlineWhileAnimating)this.objOutline.destroy();_wchs.discardElement(this.wrapper);}
if(_wchs.mask)_wchs.mask.style.display='none';_wchs.expanders[this.key]=null;}};
_wchs.allowMultipleInstances = false;
_wchs.enableKeyListener = true;
_wchs.showCredits = false;
// ------------------------------------------- HIGHSLIDE END -----------------------------------
//------------------- highslide/highslide3318.js End -------------------
//------------------- swfobject/swfobject22.js Begin -------------------
// ------------------------------------------- SWFOBJECT BEGIN -----------------------------------
/**
 *  SWFObject v2.2 <http://code.google.com/p/swfobject/> 
 *  is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
 */
if(typeof _wcde=="undefined"){var _wcde=new Object()}_wcde.SWFObject=function(){var w="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",ON_READY_STATE_CHANGE="onreadystatechange",win=window,doc=document,nav=navigator,plugin=false,domLoadFnArr=[main],regObjArr=[],objIdArr=[],listenersArr=[],storedAltContent,storedAltContentId,storedCallbackFn,storedCallbackObj,isDomLoaded=false,isExpressInstallActive=false,dynamicStylesheet,dynamicStylesheetMedia,autoHideShow=true,ua=function(){var b=typeof doc.getElementById!=w&&typeof doc.getElementsByTagName!=w&&typeof doc.createElement!=w,u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=!+"\v1",playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=w&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=w&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){plugin=true;ie=false;d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/[a-zA-Z]/.test(d)?parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof win.ActiveXObject!=w){try{var a=new ActiveXObject(SHOCKWAVE_FLASH_AX);if(a){d=a.GetVariable("$version");if(d){ie=true;d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}}catch(e){}}return{w3:b,pv:playerVersion,wk:webkit,ie:ie,win:windows,mac:mac}}(),onDomLoad=function(){if(!ua.w3){return}if((typeof doc.readyState!=w&&doc.readyState=="complete")||(typeof doc.readyState==w&&(doc.getElementsByTagName("body")[0]||doc.body))){callDomLoadFunctions()}if(!isDomLoaded){if(typeof doc.addEventListener!=w){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,false)}if(ua.ie&&ua.win){doc.attachEvent(ON_READY_STATE_CHANGE,function(){if(doc.readyState=="complete"){doc.detachEvent(ON_READY_STATE_CHANGE,arguments.callee);callDomLoadFunctions()}});if(win==top){(function(){if(isDomLoaded){return}try{doc.documentElement.doScroll("left")}catch(e){setTimeout(arguments.callee,0);return}callDomLoadFunctions()})()}}if(ua.wk){(function(){if(isDomLoaded){return}if(!/loaded|complete/.test(doc.readyState)){setTimeout(arguments.callee,0);return}callDomLoadFunctions()})()}addLoadEvent(callDomLoadFunctions)}}();function callDomLoadFunctions(){if(isDomLoaded){return}try{var t=doc.getElementsByTagName("body")[0].appendChild(createElement("span"));t.parentNode.removeChild(t)}catch(e){return}isDomLoaded=true;var a=domLoadFnArr.length;for(var i=0;i<a;i++){domLoadFnArr[i]()}}function addDomLoadEvent(a){if(isDomLoaded){a()}else{domLoadFnArr[domLoadFnArr.length]=a}}function addLoadEvent(a){if(typeof win.addEventListener!=w){win.addEventListener("load",a,false)}else if(typeof doc.addEventListener!=w){doc.addEventListener("load",a,false)}else if(typeof win.attachEvent!=w){addListener(win,"onload",a)}else if(typeof win.onload=="function"){var b=win.onload;win.onload=function(){b();a()}}else{win.onload=a}}function main(){if(plugin){testPlayerVersion()}else{matchVersions()}}function testPlayerVersion(){var b=doc.getElementsByTagName("body")[0];var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);var t=b.appendChild(o);if(t){var a=0;(function(){if(typeof t.GetVariable!=w){var d=t.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");ua.pv=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}else if(a<10){a++;setTimeout(arguments.callee,10);return}b.removeChild(o);t=null;matchVersions()})()}else{matchVersions()}}function matchVersions(){var a=regObjArr.length;if(a>0){for(var i=0;i<a;i++){var b=regObjArr[i].id;var c=regObjArr[i].callbackFn;var d={success:false,id:b};if(ua.pv[0]>0){var e=getElementById(b);if(e){if(hasPlayerVersion(regObjArr[i].swfVersion)&&!(ua.wk&&ua.wk<312)){setVisibility(b,true);if(c){d.success=true;d.ref=getObjectById(b);c(d)}}else if(regObjArr[i].expressInstall&&canExpressInstall()){var f={};f.data=regObjArr[i].expressInstall;f.width=e.getAttribute("width")||"0";f.height=e.getAttribute("height")||"0";if(e.getAttribute("class")){f.styleclass=e.getAttribute("class")}if(e.getAttribute("align")){f.align=e.getAttribute("align")}var g={};var p=e.getElementsByTagName("param");var h=p.length;for(var j=0;j<h;j++){if(p[j].getAttribute("name").toLowerCase()!="movie"){g[p[j].getAttribute("name")]=p[j].getAttribute("value")}}showExpressInstall(f,g,b,c)}else{displayAltContent(e);if(c){c(d)}}}}else{setVisibility(b,true);if(c){var o=getObjectById(b);if(o&&typeof o.SetVariable!=w){d.success=true;d.ref=o}c(d)}}}}}function getObjectById(a){var r=null;var o=getElementById(a);if(o&&o.nodeName=="OBJECT"){if(typeof o.SetVariable!=w){r=o}else{var n=o.getElementsByTagName(OBJECT)[0];if(n){r=n}}}return r}function canExpressInstall(){return!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)&&!(ua.wk&&ua.wk<312)}function showExpressInstall(a,b,c,d){isExpressInstallActive=true;storedCallbackFn=d||null;storedCallbackObj={success:false,id:c};var e=getElementById(c);if(e){if(e.nodeName=="OBJECT"){storedAltContent=abstractAltContent(e);storedAltContentId=null}else{storedAltContent=e;storedAltContentId=c}a.id=EXPRESS_INSTALL_ID;if(typeof a.width==w||(!/%$/.test(a.width)&&parseInt(a.width,10)<310)){a.width="310"}if(typeof a.height==w||(!/%$/.test(a.height)&&parseInt(a.height,10)<137)){a.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var f=ua.ie&&ua.win?"ActiveX":"PlugIn",fv="MMredirectURL="+win.location.toString().replace(/&/g,"%26")+"&MMplayerType="+f+"&MMdoctitle="+doc.title;if(typeof b.flashvars!=w){b.flashvars+="&"+fv}else{b.flashvars=fv}if(ua.ie&&ua.win&&e.readyState!=4){var g=createElement("div");c+="SWFObjectNew";g.setAttribute("id",c);e.parentNode.insertBefore(g,e);e.style.display="none";(function(){if(e.readyState==4){e.parentNode.removeChild(e)}else{setTimeout(arguments.callee,10)}})()}createSWF(a,b,c)}}function displayAltContent(a){if(ua.ie&&ua.win&&a.readyState!=4){var b=createElement("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(abstractAltContent(a),b);a.style.display="none";(function(){if(a.readyState==4){a.parentNode.removeChild(a)}else{setTimeout(arguments.callee,10)}})()}else{a.parentNode.replaceChild(abstractAltContent(a),a)}}function abstractAltContent(a){var b=createElement("div");if(ua.win&&ua.ie){b.innerHTML=a.innerHTML}else{var d=a.getElementsByTagName(OBJECT)[0];if(d){var c=d.childNodes;if(c){var e=c.length;for(var i=0;i<e;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){b.appendChild(c[i].cloneNode(true))}}}}}return b}function createSWF(a,b,c){var r,el=getElementById(c);if(ua.wk&&ua.wk<312){return r}if(el){if(typeof a.id==w){a.id=c}if(ua.ie&&ua.win){var d="";for(var i in a){if(a[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){b.movie=a[i]}else if(i.toLowerCase()=="styleclass"){d+=' class="'+a[i]+'"'}else if(i.toLowerCase()!="classid"){d+=' '+i+'="'+a[i]+'"'}}}var e="";for(var j in b){if(b[j]!=Object.prototype[j]){e+='<param name="'+j+'" value="'+b[j]+'" />'}}_wcjq("#"+c).replaceWith('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+d+'>'+e+'</object>');objIdArr[objIdArr.length]=a.id;r=getElementById(a.id)}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in a){if(a[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",a[m])}else if(m.toLowerCase()!="classid"){o.setAttribute(m,a[m])}}}for(var n in b){if(b[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,b[n])}}el.parentNode.replaceChild(o,el);r=o}}return r}function createObjParam(a,b,c){var p=createElement("param");p.setAttribute("name",b);p.setAttribute("value",c);a.appendChild(p)}function removeSWF(a){var b=getElementById(a);if(b&&b.nodeName=="OBJECT"){if(ua.ie&&ua.win){b.style.display="none";(function(){if(b.readyState==4){removeObjectInIE(a)}else{setTimeout(arguments.callee,10)}})()}else{b.parentNode.removeChild(b)}}}function removeObjectInIE(a){var b=getElementById(a);if(b){for(var i in b){if(typeof b[i]=="function"){b[i]=null}}b.parentNode.removeChild(b)}}function getElementById(a){var b=null;try{b=doc.getElementById(a)}catch(e){}return b}function createElement(a){return doc.createElement(a)}function addListener(a,b,c){a.attachEvent(b,c);listenersArr[listenersArr.length]=[a,b,c]}function hasPlayerVersion(a){var b=ua.pv,v=a.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(b[0]>v[0]||(b[0]==v[0]&&b[1]>v[1])||(b[0]==v[0]&&b[1]==v[1]&&b[2]>=v[2]))?true:false}function createCSS(a,b,c,d){if(ua.ie&&ua.mac){return}var h=doc.getElementsByTagName("head")[0];if(!h){return}var m=(c&&typeof c=="string")?c:"screen";if(d){dynamicStylesheet=null;dynamicStylesheetMedia=null}if(!dynamicStylesheet||dynamicStylesheetMedia!=m){var s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media",m);dynamicStylesheet=h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=w&&doc.styleSheets.length>0){dynamicStylesheet=doc.styleSheets[doc.styleSheets.length-1]}dynamicStylesheetMedia=m}if(ua.ie&&ua.win){if(dynamicStylesheet&&typeof dynamicStylesheet.addRule==OBJECT){dynamicStylesheet.addRule(a,b)}}else{if(dynamicStylesheet&&typeof doc.createTextNode!=w){dynamicStylesheet.appendChild(doc.createTextNode(a+" {"+b+"}"))}}}function setVisibility(a,b){if(!autoHideShow){return}var v=b?"visible":"hidden";if(isDomLoaded&&getElementById(a)){getElementById(a).style.visibility=v}else{createCSS("#"+a,"visibility:"+v)}}function urlEncodeIfNecessary(s){var a=/[\\\"<>\.;]/;var b=a.exec(s)!=null;return b&&typeof encodeURIComponent!=w?encodeURIComponent(s):s}var x=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var a=listenersArr.length;for(var i=0;i<a;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var b=objIdArr.length;for(var j=0;j<b;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in _wcde.SWFObject){_wcde.SWFObject[l]=null}_wcde.SWFObject=null})}}();return{registerObject:function(a,b,c,d){if(ua.w3&&a&&b){var e={};e.id=a;e.swfVersion=b;e.expressInstall=c;e.callbackFn=d;regObjArr[regObjArr.length]=e;setVisibility(a,false)}else if(d){d({success:false,id:a})}},getObjectById:function(a){if(ua.w3){return getObjectById(a)}},embedSWF:function(d,e,f,g,h,l,m,n,o,p){var q={success:false,id:e};if(ua.w3&&!(ua.wk&&ua.wk<312)&&d&&e&&f&&g&&h){setVisibility(e,false);addDomLoadEvent(function(){f+="";g+="";var a={};if(o&&typeof o===OBJECT){for(var i in o){a[i]=o[i]}}a.data=d;a.width=f;a.height=g;var b={};if(n&&typeof n===OBJECT){for(var j in n){b[j]=n[j]}}if(m&&typeof m===OBJECT){for(var k in m){if(typeof b.flashvars!=w){b.flashvars+="&"+k+"="+m[k]}else{b.flashvars=k+"="+m[k]}}}if(hasPlayerVersion(h)){var c=createSWF(a,b,e);if(a.id==e){setVisibility(e,true)}q.success=true;q.ref=c}else if(l&&canExpressInstall()){a.data=l;showExpressInstall(a,b,e,p);return}else{setVisibility(e,true)}if(p){p(q)}})}else if(p){p(q)}},switchOffAutoHideShow:function(){autoHideShow=false},ua:ua,getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(a,b,c){if(ua.w3){return createSWF(a,b,c)}else{return undefined}},showExpressInstall:function(a,b,c,d){if(ua.w3&&canExpressInstall()){showExpressInstall(a,b,c,d)}},removeSWF:function(a){if(ua.w3){removeSWF(a)}},createCSS:function(a,b,c,d){if(ua.w3){createCSS(a,b,c,d)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(a){var q=doc.location.search||doc.location.hash;if(q){if(/\?/.test(q)){q=q.split("?")[1]}if(a==null){return urlEncodeIfNecessary(q)}var b=q.split("&");for(var i=0;i<b.length;i++){if(b[i].substring(0,b[i].indexOf("="))==a){return urlEncodeIfNecessary(b[i].substring((b[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive){var a=getElementById(EXPRESS_INSTALL_ID);if(a&&storedAltContent){a.parentNode.replaceChild(storedAltContent,a);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}if(storedCallbackFn){storedCallbackFn(storedCallbackObj)}}isExpressInstallActive=false}}}}();
// ------------------------------------------- SWFOBJECT END -----------------------------------
//------------------- swfobject/swfobject22.js End -------------------
// ------------------------------------------- PARTNER-SETUP BEGIN -----------------------------------

wcpartnersetup = {
  localization:
  {
    language_code: "en",
    country_code: "us",
    agegatemessage: "You must certify your age before viewing this clip.",    
    agegatesubmessage: "Please enter your birthdate",  
    agegateunderage: "You must be at least 17 years old to watch this clip.",   
    agegateinvaliddate: "You must enter a valid date.",
    agegatesubmit: "Continue",
    agegatemonthname: "MM",     
    agegatemonthorder: 1,     
    agegatedayname: "DD",     
    agegatedayorder: 2,     
    agegateyearname: "YYYY",
    agegateyearorder: 3,
    tour_texts: {
      featuresListTitle: "",
      loading: "Loading<br>Please wait...",
      startPppTour: "Click to Play",
      featuresList: "Feature List",
      lastTitle: "Last",
      usageMessage: "Click a feature from the list or a number in the picture to view details",
      firstTitle: "First",
      closeTitle: "Close",
      nextTitle: "Next",
      viewImageTitle: "View ${number}",
      previousTitle: "Previous"},
    iframe_texts: {
      playIframeText: "Play",
      iframeCenterPlayButtonText: "Click to Play",
      stopIframeText: "Stop"}
  }
};

//------------------------------------------- PARTNER-SETUP END -----------------------------------

//------------------- wcroot.js Begin -------------------
_wcroot =  {};

_wcroot.gettargetenvironment = function ()
{
  return (typeof _wccontent.environment != 'undefined') ? _wccontent.environment : "live";
}

_wcroot.getscheme  = function ()
{
  return (typeof _wccontent.scheme != "undefined") ? _wccontent.scheme : "http";
}

_wcroot.getcontentgatewayurl = function ()
{
  if(typeof _wccontent.contentgatewayurl != 'undefined')
  {
    return (_wccontent.contentgatewayurl.substring(0, 4) == "http") ? _wccontent.contentgatewayurl : _wcroot.getscheme() + "://" + _wccontent.contentgatewayurl;
  }
  else
  {
    return (_wcroot.getscheme() == 'http') ? "http://content.webcollage.net" : "https://scontent.webcollage.net";
  } 
}

_wcroot.getalertloggerdomain = function ()
{
  return (typeof _wccontent.alertloggerdomain != "undefined") ? _wccontent.alertloggerdomain : "alerts.webcollage.net";
}

_wcroot.geteventloggerdomain = function ()
{
  return (typeof _wccontent.eventloggerdomain != "undefined") ? _wccontent.eventloggerdomain : "rel.webcollage.net";
}

_wcroot.enablereporting = function ()
{
  var enableReporting = (typeof _wccontent.enablereporting != "undefined") ? _wccontent.enablereporting : true;
  return _wcroot.gettargetenvironment() == "live" && enableReporting; 
}

_wcroot.enablealerts = function ()
{
  return _wcroot.gettargetenvironment() == "live"; 
}

_wcroot.MEDIAPLAYER = "player_4_5.swf";
_wcroot.RESOURCEBASE = _wcroot.getcontentgatewayurl() + "/" + _wccontent.site + "/resources/connections/aplus/";
_wcroot.REPORTING_URL_TEMPLATE = _wcroot.getscheme() + "://" + _wcroot.geteventloggerdomain() + "/apps/el?e=${event}&module=${module}&channel-product-id=${cpi}&wcpc=${wcpc}&partnerid=${site}&page-session-id=${pagesessionid}${others}"
_wcroot.PLAY_BUTTON_URL = _wcroot.RESOURCEBASE + "images/play.png";
_wcroot.DEFAULT_POSTER_URL = _wcroot.RESOURCEBASE + "images/default-poster.png";

_wcroot.mediaplayerurl = _wcroot.RESOURCEBASE + "flash/" + _wcroot.MEDIAPLAYER;

_wcroot.pagesessionid = ("" + Math.random()).substr(2);
_wcroot.reportingimages = [];
_wcroot.vieweventcomplete = false;

_wchs.graphicsDir = _wcroot.RESOURCEBASE + "images/hsgraphics/";
_wchs.outlineType = 'rounded-white';

_wcroot.getcssurl = function()
{
  return _wcroot.RESOURCEBASE + "css/" + ((_wcroot.getscheme() == "https") ? "aplus@s.css" : "aplus.css") + _wccontent.renderers.apluscss_sig;
}

_wcroot.popup = function()
{
  if(typeof _wcsite.popup == 'function')
    return _wcsite.popup();
    
  return '<div class="wchs-html-content">\n\
  <div class="wchs-header">\n\
  <ul>\n\
  <li class="wchs-close">\n\
  <a href="javascript:;">\n\
  <img border="0" src="' + _wchs.graphicsDir + 'close.gif" onclick="_wcroot.closeExpander();">\n\
  </a>\n\
  </li>\n\
  </ul>\n\
  </div>\n\
  <div class="wchs-body"></div>\n\
  \n\
  <div class="wchs-footer" style="padding-top:20px">\n\
  \n\
  <div style="text-align:right">\n\
  <img src="' + _wcroot.RESOURCEBASE + "images/" + 'powered-by.gif">\n\
  </div>\n\
  </div>\n\
  </div>\n\
  ';
}

_wcroot.closeExpander = function ()
{
  try {
    _wchs.getExpander().close();
  }
  catch(e){}
}

_wcroot.ready = function ()
{
  var success = true;

  if (_wcroot.abtest.enabled())
  {
    if (_wcroot.abtest.getdecision() != _wcroot.abtest.HIDE)
      success = _wcroot.injectandinitdisplay();
      
    if (success)
      _wcroot.abtest.init();
  }
  else
  {
    success = _wcroot.injectandinitdisplay();
  }

  if (!success)
  {
    _wcroot.handleinjectionerror();
  } 
}

_wcroot.injectandinitdisplay = function ()
{
  var success = false;
  
  if(_wcroot.contentalreadyinjected())
  {
    success = true;
  }  
  else if(_wcroot.existscontenttoinject())
  {
    success = _wcroot.injectaplus();
  }

  if(success && _wcroot.shouldbeinitialized())
  { 
    _wcroot.viewevent();
    _wcroot.addratingquestion();
    _wcroot.initzooms();
    _wcroot.initinlinemovies();
    _wcroot.initinlineflashes();
    _wcroot.initinlineiframes();
  }
 
  _wcroot.afterinjectionisdone();
  _wcroot.injectSmartButton();    
  
  return success;
}

_wcroot.contentalreadyinjected = function ()
{
  var p = _wcjq("#wc-aplus");
  return p.size() > 0;
}

_wcroot.shouldbeinitialized = function ()
{
  var p = _wcjq("#wc-aplus");
  var q = _wcjq(".wchs");

  return (p.size() > 0 && q.size() == 0);
}

_wcroot.existscontenttoinject = function ()
{
  return typeof _wccontent.aplus.html != 'undefined';
}

_wcroot.injectaplus = function ()
{
  var success = false;
 
  if(_wccontent.replacesitecontent.enabled)
  {
    if(typeof _wcsite.injectaplusoverride != 'undefined')
    {
      success = _wcsite.injectaplusoverride(_wccontent.aplus.html);
    }
    else
    {
      success = _wcsite.injectaplus(_wccontent.aplus.html);
    }
  }
  else if(typeof _wcsite.injectaplusappend != 'undefined')
  {
    success = _wcsite.injectaplusappend(_wccontent.aplus.html);
  }
    
  if (success)
  {
    _wcroot.addcss(_wcroot.getcssurl());
  }
    
  return success;
}

_wcroot.openmore = function (a)
{
  window.open(a.href, "_blank", "width=500,height=500,menubar=no,resizable=yes,scrollbars=yes,left=40,top=40,toolbar=no");

  return false;
}

_wcroot.vieweventonload = function ()
{
  _wcroot.vieweventcomplete = true;
}

_wcroot.viewevent = function ()
{
  for(var i=0; i<_wccontent.aplus.modulewcpcpairs.length; i++)
  { 
    _wcroot.reportevent("aplus-view", _wcroot.vieweventonload, _wccontent.site, _wccontent.aplus.modulewcpcpairs[i].module, _wccontent.cpi, 
      _wccontent.aplus.modulewcpcpairs[i].wcpc, {});
  }
}

_wcroot.zoomevent = function (url, module, wcpc)
{
  _wcroot.reportevent("aplus-zoom", null, _wccontent.site, module, _wccontent.cpi, wcpc, {obj: url});
}

_wcroot.freemarkerreplace = function (t, map)
{
  var s = t;
  for (var k in map)
    s = s.replace("${" + k + "}", map[k]);
  return s;
}

_wcroot.reportingeventurl = function (site, event, module, cpi, wcpc, others)
{
  var map = {};
  map.module = module;
  map.event = event;
  map.cpi = escape(cpi);
  map.wcpc = wcpc;
  map.site = site;
  map.pagesessionid = _wcroot.pagesessionid;
  map.others = "&content-package=ppp";
  
  if (event != "aplus-view")
    map.others += "&allow-pc=false&allow-tc=false";
    
  for (var k in others)
    map.others += "&" + escape(k) + "=" + escape(others[k]);
  return _wcroot.freemarkerreplace(_wcroot.REPORTING_URL_TEMPLATE, map) + "&rand=" + Math.round(Math.random() * 1000000);
}

_wcroot.reportevent = function (event, onloadfunc, site, module, cpi, wcpc, others)
{
  if(_wcroot.enablereporting())
  {
    var img = new Image();
    
    if (typeof(onloadfunc) != "undefined")
      img.onload = onloadfunc;
      
    img.src = _wcroot.reportingeventurl(site, event, module, cpi, wcpc, others);
    _wcroot.reportingimages.push(img);
  }
}

_wcroot.handleinjectionerror = function ()
{
  if(!_wccontent.replacesitecontent.enabled && typeof _wcsite.injectaplusappend != 'undefined')
  {
    _wcroot.injectionerror("failed-to-inject-ppp-incrementally");
  }
  else
  {
    _wcroot.injectionerror("failed-to-inject-ppp-content");
  }
}

_wcroot.injectionerror = function (event)
{
  if(_wcroot.enablealerts())
  {
    var u = _wcroot.getscheme() + "://" + _wcroot.getalertloggerdomain() + "/alerts/logger?alert=" + event + "&cpi="
     + escape(_wccontent.cpi) + "&partner=" + escape(_wccontent.site) + "&rand=" +
     Math.round(Math.random() * 1000000);
    
    var img = new Image();
    img.src = u;
    _wcroot.reportingimages.push(img);
  }
}

_wcroot.addcssUsingLinkInjection = function (url)
{
  if (_wcjq("link[href="+url+"]").size() == 0)
  {
    var e = document.createElement("link");
    e.setAttribute("rel", "stylesheet");
    e.setAttribute("type", "text/css");
    e.setAttribute("href", url);
    document.getElementsByTagName("head").item(0).appendChild(e)
  }
}

_wcroot.cssAlreadyImported = function (url)
{
  for (var i = 0; i < document.styleSheets.length; ++i)
    for (var j = 0; j < document.styleSheets[i].imports.length; ++j)
      if (document.styleSheets[i].imports[j].href == url)
        return true;
  return false;
}

_wcroot.findStylesheetThatsAvailableForImport = function ()
{
  for (var i = 0; i < document.styleSheets.length; ++i)
    if (document.styleSheets[i].imports.length < 31)
      return i;
  return -1;
}

_wcroot.addcss = function (url)
{
  var slot = -1;
  try
  {
    if (_wcjq.browser.msie)
    {
      if (document.styleSheets.length < 31) // IE has a limit of 31 CSSs, if this limit is exceeded we need to add the link as an import.
        _wcroot.addcssUsingLinkInjection(url);
      else if (!_wcroot.cssAlreadyImported(url) && (slot = _wcroot.findStylesheetThatsAvailableForImport()) != -1)
        document.styleSheets[slot].addImport(url);
    }
    else
      _wcroot.addcssUsingLinkInjection(url);
  }
  catch (ex)
  {
    //ILB
  }
}

_wcroot.decorate = function (e)
{
  var posterClass = e.attr("class");
  var useDefaultPoster = (posterClass == "wc-default-flash-poster" || posterClass == "wc-default-video-poster" || posterClass == "wc-default-iframe-poster");
  var url = "" + e.attr("wcobj");
  var width = e.attr("width");
  var height = e.attr("height");
  var widthStyle = "width: " + width + "px !important;";
  var heightStyle = "height: " + height + "px !important;";
  var cssClass = e.parent().attr("class");
  var resourceType = _wcroot.getExt(e);
  
  e.wrap('<div><div></div></div>');

  var t = e.parent().parent();
  
  if (resourceType == "image") 
  {
    var imageButtonOver = _wcroot.RESOURCEBASE + "images/image-gallery/enlarge.png";

    if (_wcjq.browser.msie && _wcjq.browser.version.split(".")[0] == "6")
      imageButtonOver = imageButtonOver.replace(/\.png$/, ".gif");
    
    t.attr("style", "position:relative!important;");
    t.append("<div class='wc-enlage-image' style='position:absolute!important;left:5px;bottom:5px;width:24px!important;height:24px!important;overflow:hidden!important'><a href='javascript:void(0);'><img src='" + imageButtonOver + "'/></a></div>");
  }  
  
  if (useDefaultPoster)
  { 
    e.removeAttr("width");
    e.removeAttr("height");
    e.attr("src", _wcroot.PLAY_BUTTON_URL);
    e.attr({style: "position: absolute !important; top: " + eval((height - 40) / 2) + "px !important; left: " + eval((width - 40) / 2) + "px !important;"});
    
    var s = e.parent();
    s.attr("style", "position: relative ! important; " + widthStyle + "" + heightStyle + "background-image: url('" + _wcroot.DEFAULT_POSTER_URL + "') ! important;");
  }

  var p = t.parent();
  p.attr("style", widthStyle);
    
  if (cssClass && cssClass.indexOf("wc-center-align") >= 0)
  {
    if (p.parent().attr("style"))
      p.parent().attr("style", "text-align: center !important;" + p.parent().attr("style")); // for IE
    else
      p.parent().attr("style", "text-align: center !important;"); // for IE
  }
  
  p.find("div").each( function ()
  {
    var e = _wcjq(this);
    var style = e.attr("style");
    if (style)
    {
      if (style.indexOf("width") == -1)
        e.attr("style", widthStyle + heightStyle + style);
    }
    else
      e.attr("style", widthStyle + heightStyle);
  });
  
  return t;
}

_wcroot.renderinlinetour = function (e)
{
  var resourcePrefix = _wcroot.RESOURCEBASE + "images/tour/";
  var flashPrefix = _wcroot.RESOURCEBASE + "flash/";
  var tourId = e.attr("wcobj-id");
  var moduleId = e.attr("module-id");
  var wcpc = e.attr("wcpc");
  
  _wcjq("img[wc-use-missing-view-image='true']", e.parent()).each(function () {
    _wcjq(this).attr("src", resourcePrefix + "missingView.jpg");
  });
  
  if (e.attr("wc-use-under-construction-poster") == "true")
    e.attr("src", resourcePrefix + "underConstruction.jpg");
   
  e.prev("div#" + tourId).tour("", 
  {
    inIframe: true,
    prepareJsonOnly: true,
    scripts: [_wccontent.renderers.tour],
    styles: [_wccontent.renderers.tourcss],
    frame: {src: resourcePrefix + "corners/corner-${d}.png"},
    loading: {src: resourcePrefix + "loading.gif"},
    close: {src: resourcePrefix + "close.gif"},
    underConstruction: {src: resourcePrefix + "underConstruction.jpg"},
    detailsViewHotspot: {src: resourcePrefix + "marker.png"},
    line: {src: resourcePrefix + "lineBg.png"},
    directoryViewHotspotDigits: {src: resourcePrefix + "hotspotDigits.png"},
    directoryViewHotspotHover: {src: resourcePrefix + "hotspotHover.gif"},
    navigatorSprite: {src: resourcePrefix + "navigatorSprite.png"},
    flowPlayersOptions: {play: {url: resourcePrefix + "playButtonOver.png"}} ,
    flowPlayerParams: {src: flashPrefix + "flowplayer.unlimited-3.2.2.swf", cachebusting: false},
    reportEvent: function (event, parameters)
    {
      var params = _wcjq.extend({}, parameters, {"package":"ppp"});

      _wcroot.reportevent(event, null, _wccontent.site, moduleId, _wccontent.cpi, wcpc, params);
    },
    texts: wcpartnersetup.localization.tour_texts
  }).hide();
  return resourcePrefix + "buttonOverForPPP.png"; 
}

_wcroot.finishtourdecoration = function (t, tourButtonOver, top, left)
{
  if (_wcjq.browser.msie && _wcjq.browser.version.split(".")[0] == "6")
    tourButtonOver = tourButtonOver.replace(/\.png$/, ".gif");
  t.css({position: "relative"});
  t.append("\
           <div class='wc-play-button' style='position: absolute; top: " + top + "px; left: " + left + "px; z-index: auto; width: 117px !important; height: 117px !important; overflow: hidden !important'>\
           <img src='" + tourButtonOver + "' style='border: 0 none !important'/>\
           <div style='position: absolute; z-index: auto; top: 84px; left:10px; width: 97px !important; height:25px !important;'>\
           <div style='font: 11px arial !important; color: white !important; text-align: center !important; margin: auto !important;'>" + wcpartnersetup.localization.tour_texts.startPppTour + "</div>\
           </div>\
           </div>");
           var d = t.find("div.wc-play-button div div");
           d.attr({style: d.attr("style") + "; margin-top: "+Math.round((25-d.height())/2)+"px !important"});
}

_wcroot.finishiframedecoration = function (t, top, left)
{
  var iframeButtonOver = _wcroot.RESOURCEBASE + "images/iframe/buttonOverForPPP.png";
  
  if (_wcjq.browser.msie && _wcjq.browser.version.split(".")[0] == "6")
    iframeButtonOver = iframeButtonOver.replace(/\.png$/, ".gif");
  t.css({position: "relative"});
  t.append("\
<div class='wc-play-button' style='position: absolute; top: " + top + "px; left: " + left + "px; z-index: auto; width: 117px !important; height: 117px !important; overflow: hidden !important'>\
  <img src='" + iframeButtonOver + "' style='border: 0 none !important'/>\
  <div style='position: absolute; z-index: auto; top: 84px; left:10px; width: 97px !important; height:25px !important;'>\
    <div style='font: 11px arial !important; color: white !important; text-align: center !important; margin: auto !important;'>" + wcpartnersetup.localization.iframe_texts.iframeCenterPlayButtonText + "</div>\
  </div>\
</div>");
  var d = t.find("div.wc-play-button div div");
  d.attr({style: d.attr("style") + "; margin-top: "+Math.round((25-d.height())/2)+"px !important"});
}

_wcroot.initzooms = function ()
{
  var template = _wcjq(_wcroot.popup()).attr("id", "wczoom");
  document.getElementsByTagName("body").item(0).appendChild(template.get(0))

  _wcjq("img[wcobj]").each(function () {
    var e = _wcjq(this);
    var w = null;
    var tourButtonOver = null;
    
    var resourceType = _wcroot.getExt(e);
    
    if((resourceType == "flash" || resourceType == "iframe") && e.attr("width") == e.attr("wcobj-width"))
      return;

    if(resourceType == "tour")
      tourButtonOver = _wcroot.renderinlinetour(e);

    if(resourceType != "pdf")
    {
      w = _wcroot.decorate(e);
        
      (w || e).addClass("wchs");     
      (w || e).click(function () {_wcroot.zoom(e)});
    }

    if (w != null)
    {
      var fd = w.find("div:first");
      if (fd.size() > 0)
      {
        fd.addClass("wc-thumb-image");
        if (resourceType == "tour")
          _wcroot.finishtourdecoration(fd, tourButtonOver, Math.round((1*e.attr("height")-117)/2), Math.round((1*e.attr("width")-117)/2));
        else if (resourceType == "iframe")
          _wcroot.finishiframedecoration(fd, Math.round((1*e.attr("height")-117)/2), Math.round((1*e.attr("width")-117)/2));
      }
    }
  });

  _wcjq("a.wc-document-view-link").each(function () {
    var t = _wcjq(this);
    var p = t.parent().parent().find('img');
    
    p.addClass("wchs");
    p.click(function () {_wcroot.zoom(p)});
    t.click(function () {_wcroot.zoom(p)});
  });
}

_wcroot.initinlinemovies = function()
{
  if (_wcsite.useJWPlayer)
    _wcroot.initinlinemoviesJWPlayer();
  else
    _wcroot.initinlinemoviesFlowPlayer()
}

_wcroot.initinlinemoviesJWPlayer = function()
{
  _wcjq("div[wc-movie]").each(function () {
    var e = _wcjq(this);
    
    if (e.parent().attr("id") != "wc-inline-video")
      return;
  
    var movieUrl = e.attr("wc-movie");
    var movieId = e.attr("wc-movie-id");
    var w = e.attr("wc-movie-width");
    var h = e.attr("wc-movie-height");
    
    var params = {"allowScriptAccess" : "always", "base" : _wcroot.mediaplayerurl, "wmode" : "opaque", "allowFullScreen" : "true"};       
    var vars = {"file" : movieUrl, "type" : "video", "image" : e.attr("wc-thumbnail"), "autostart" : "false", "width" : w, "height" : h};
    
    if (_wcroot.enablereporting())
    {
      vars.plugins = "reporting.swf&reporting.wcpc=" + e.attr("wcpc") + "&reporting.cpi=" + _wccontent.cpi + "&reporting.site=" + _wccontent.site + "&reporting.module=" + e.attr("module-id") + "&reporting.movieurl=" + movieUrl + "&reporting.scheme=" + _wcroot.getscheme() + "&reporting.eventloggerdomain=" + _wcroot.geteventloggerdomain();
    }
    
    var attributes = {"id" : "wc-player-" + movieId, "name" : "wc-player-" + movieId};
    
    _wcde.SWFObject.embedSWF(_wcroot.mediaplayerurl, "wc-video-" + movieId + "-div", parseInt(w), parseInt(h) + 18, "8", "expressInstall.swf", vars, params, attributes); 
  });
}

_wcroot.initinlinemoviesFlowPlayer = function()
{
  var resourcePrefix = _wcroot.RESOURCEBASE + "images/";
  var flashPrefix = _wcroot.RESOURCEBASE + "flash/";

  _wcjq("div[wc-movie]").each(function () {
    var e = _wcjq(this);
    
    if (e.parent().attr("id") != "wc-inline-video")
      return;
    
    try
    {
      e.parent().css("display", "table"); // the try/catch is for IE6/7 which do not support this CSS property
    }
    catch(ex){}
    
    var flowPlayerParams = {
      src : flashPrefix + "flowplayer.unlimited-3.2.2.swf",
      wmode: "Transparent",
      cachebusting: false
    };

    var flowPlayersOptions = {
      clip: {
        autoPlay: true,
        autoBuffering: true,
        scaling: "fit"
      },
      plugins: {
        controls:  null
      },
      play: {
        url: resourcePrefix + "play.png",
        width: 40,
        height: 40
      }
    };
    
    var obj = {
        container : e,
        id : e.attr("id"),
        movieUrl : e.attr("wc-movie"),
        movieWidth : e.attr("wc-movie-width"),
        movieHeight : e.attr("wc-movie-height"),
        wcpc : e.attr("wcpc"), 
        moduleId : e.attr("module-id")
    }
    
    var id =          e.attr("id");
    var thumbnail =   e.attr("wc-thumbnail");
    var movieUrl =    e.attr("wc-movie");
    var movieWidth =  e.attr("wc-movie-width");
    var movieHeight = e.attr("wc-movie-height");
    var wcpc =        e.attr("wcpc");
    var moduleId =    e.attr("module-id");
    var playTop =     (movieHeight - flowPlayersOptions.play.height) >> 1;
    var playLeft =    (movieWidth - flowPlayersOptions.play.width) >> 1;

    var jit = "\
<div style=\"position: relative ! important; height: " + movieHeight + "px ! important; width: " + movieWidth + "px ! important; background-color: black ! important;\" id=\"" + id + "-movie\">\
  <img src=\"" + thumbnail + "\" style=\"height: " + movieHeight + "px ! important; width: " + movieWidth + "px ! important;\">\
  <img class=\"wc-floating-play-button\" style=\"position: absolute ! important; top: " + playTop + "px ! important; left: " + playLeft + "px ! important;\" src=\"" + flowPlayersOptions.play.url + "\">\
</div>\
";
    var bar = "\
<div style=\"height: 20px ! important; width: " + movieWidth + "px ! important; overflow: hidden ! important;\" class=\"wc-video-controls\" id=\"" + id + "-ctrl\">\
  <a href=\"javascript:void(0)\" class=\"play\" style=\"left: 0px;\">pause / play</a>\
  <div style=\"left: 23px\" class=\"playhead\"></div>\
  <div class=\"time\" style=\"right: 20px;\"><strong>00:00</strong></div>\
  <a href=\"javascript:void(0)\" class=\"mute\" style=\"right: 0px;\">mute</a>\
</div>\
";
    e.html(jit).append(bar);
    
    
    
    var startTheMovieInIframe = function () {
      _wcroot.playMovieInIframe(obj);
    }
    
    var startTheMovieAfterAgeGate = function (clicked)
    {
      if (_wcroot.needAgeGate("flashvideo"))
        _wcroot.verifyMature(clicked, startTheMovieInIframe);
      else
        startTheMovieInIframe();
    }
    var theImg = e.find("#" + id + "-movie img");
    theImg.click(function(){startTheMovieAfterAgeGate(theImg.eq(0));});
    e.find("#" + id + "-ctrl a.play").click(function(){startTheMovieAfterAgeGate(theImg.eq(0));});
  });
}

_wcroot.injectSmartButton = function ()
{
  if (!_wcroot.abtest.enabled() && typeof _wccontent.enablesmartbuttons != "undefined" && _wccontent.enablesmartbuttons)
  {
    if (_wcjq('#wc-smartbutton').size() > 0)
      return;
    
    var _wcscript = document.createElement('script');
    _wcscript.setAttribute("type","text/javascript");
    _wcscript.setAttribute("src", _wcroot.getcontentgatewayurl() + '/' + _wccontent.site + '/sb-for-ppp?ird=true&channel-product-id=' + _wccontent.cpi);
    _wcscript.setAttribute("id", "wc-smartbutton");
    
    document.getElementsByTagName('head')[0].appendChild(_wcscript);
  }
  
}

_wcroot.initinlineflashes = function()
{
  _wcjq("div.wc-inline-flash-wrapper img.wc-default-flash-poster").each(function () {
    var t = _wcjq(this);
    var width = t.attr("width");
    var height = t.attr("height");
    
    t.wrap("<div></div>");
    var p = t.parent();
    
    p.attr({style: "position: relative ! important; width:" + width + "px !important; height: " + height + "px !important; background-image: url('" + _wcroot.DEFAULT_POSTER_URL + "') ! important;"});
    
    t.removeAttr("width");
    t.removeAttr("height");
    t.attr("src", _wcroot.PLAY_BUTTON_URL);
    t.attr({style: "position: absolute !important; top: " + eval((height - 40) / 2) + "px !important; left: " + eval((width - 40) / 2) + "px !important;"});   
  });
  
  _wcjq("a.wc-start-flash-player-link").each(function () {
    var a = _wcjq(this);
    a.html("<img src='" + _wcroot.RESOURCEBASE + "images/non-auto-play-arrow.gif' />" + a.text() + "");
  });
  
  _wcjq("a.wc-stop-flash-player-link").each(function () {
    var a = _wcjq(this);
    a.html("<img src='" + _wcroot.RESOURCEBASE + "images/non-auto-play-stop.gif' />" + a.text() + "");
  });
}

_wcroot.initinlineiframes = function()
{
  _wcjq("div.wc-iframe-poster").each(function () {
    var t = _wcjq(this);
    var w = parseInt(t.width());
    var h = parseInt(t.height());
    var top = (h-117) >> 1;
    var left = (w-117) >> 1;
    var id = t.attr("data-id");
    var iframeButtonOver = _wcroot.RESOURCEBASE + "images/iframe/buttonOverForPPP.png";
    
    if (_wcjq.browser.msie && _wcjq.browser.version.split(".")[0] == "6")
      iframeButtonOver = iframeButtonOver.replace(/\.png$/, ".gif");
    t.append("\
  <div class='wc-play-button' style='position: absolute; top: " + top + "px; left: " + left + "px; z-index: auto; width: 117px !important; height: 117px !important; overflow: hidden !important'>\
    <img src='" + iframeButtonOver + "' style='border: 0 none !important'/>\
    <div style='position: absolute; z-index: auto; top: 84px; left:10px; width: 97px !important; height:25px !important;'>\
      <div style='font: 11px arial !important; color: white !important; text-align: center !important; margin: auto !important;'>" + wcpartnersetup.localization.iframe_texts.iframeCenterPlayButtonText + "</div>\
    </div>\
  </div>");
    t.attr("data-visible-style", t.attr("style"));

    t.click(function(){_wcroot.startinlineiframe(id);});
    var d = t.find("div.wc-play-button div div");
    d.attr({style: d.attr("style") + "; margin-top: " + ((25-d.height()) >> 1) +"px !important"});
  });

  _wcjq("a.wc-start-iframe-link").each(function () {
    var a = _wcjq(this);
    a.html("<img src='" + _wcroot.RESOURCEBASE + "images/non-auto-play-arrow.gif' />" + a.text() + "");
  });
  
  _wcjq("a.wc-stop-iframe-link").each(function () {
    var a = _wcjq(this);
    a.html("<img src='" + _wcroot.RESOURCEBASE + "images/non-auto-play-stop.gif' />" + a.text() + "");
  });
}

_wcroot.mediaTypes =
{
  "image/*" : "image",
  "video/x-flv" : "flashvideo",
  "application/x-shockwave-flash" : "flash",
  "application/pdf" : "pdf",
  "video/x-tour" : "tour",
  "text/html" : "iframe"
};

_wcroot.getExt = function (obj)
{
  var url = "" + obj.attr("wcobj");
  var ext = "";

  var type = obj.attr("wcobj-type");
  if (typeof(type) != 'undefined' && typeof(_wcroot.mediaTypes[type]) != 'undefined')
    ext = _wcroot.mediaTypes[type];
  else
    ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
  return ext;
}

_wcroot.mediaTypesRequireEsrb =
{
  flashvideo: true,
  flv: true,
  flash: true,
  swf: true,
  iframe: true
};

_wcroot.zoom = function (clicked)
{
  try
  {
    var url = "" + clicked.attr("wcobj");
    var ext = _wcroot.getExt(clicked);

    _wcroot.zoomevent(url, clicked.attr("module-id"), clicked.attr("wcpc"));

    var w = clicked.attr("wcobj-width");
    var h = clicked.attr("wcobj-height");

    if (_wcroot.needAgeGate(ext))
      _wcroot.verifyMature(clicked.parent(), function(){
    _wcroot["zoom" + ext](clicked, parseInt(w), parseInt(h));
      });
    else
      _wcroot["zoom" + ext](clicked, parseInt(w), parseInt(h));
  }
  catch(e){}

  return false;
}

_wcroot.needAgeGate = function (ext)
{
  var cookie = _wcroot.getCookie("wc-age-gate");
  cookie = cookie ? cookie : "";
  
  return _wccontent.esrbrating == "M" && cookie != "passed" && _wcroot.mediaTypesRequireEsrb[ext];
}

_wcroot.verifyMature = function (clicked, zoomFunction)
{
  var tourId = clicked.attr("wcobj-id");
  
  _wchs.htmlExpand(clicked.get(0),
    {
      contentId: "wczoom",
      swfObject : {
        write : function (id)
        {
          var root = _wcjq("<form class=\"age-gate\">\n" +
                           "  <p class=\"age-gate-message\">\n" +
                           "    " + wcpartnersetup.localization.agegatemessage + "\n" +
                           "  </p>\n" +
                           "  <p class=\"age-gate-submessage\">\n" +
                           "    " + wcpartnersetup.localization.agegatesubmessage + "\n" +
                           "  </p>\n" +
                           "  <p class=\"age-gate-underage\" style=\"display:none\">\n" +
                           "    <span>" + wcpartnersetup.localization.agegateunderage + "</span>\n" +
                           "  </p>\n" +
                           "  <p class=\"age-gate-invalid-date\" style=\"display:none\">\n" +
                           "    <span>" + wcpartnersetup.localization.agegateinvaliddate + "</span>\n" +
                           "  </p>\n" +
                           "  <div>\n" +
                           "    <select class=\"age-gate-month\" name=\"month\"><option class=\"age-gate-month\" default=\"true\" value=\"-1\">" + wcpartnersetup.localization.agegatemonthname + "</option></select>\n" +
                           "    <select class=\"age-gate-day\" name=\"day\"><option class=\"age-gate-day\" default=\"true\" value=\"-1\">" + wcpartnersetup.localization.agegatedayname + "</option></select>\n" +
                           "    <select class=\"age-gate-year\" name=\"year\"><option class=\"age-gate-year\" default=\"true\" value=\"-1\">" + wcpartnersetup.localization.agegateyearname + "</option></select>\n" +
                           "    <input class=\"age-gate-submit\" type=\"submit\" value=\" " + wcpartnersetup.localization.agegatesubmit + " \"></input>\n" +
                           "  </div>\n" +
                           "</form>");
          
          _wcjq("#" + id).
            attr("style", "border: 1px solid #CCCCCC !important; margin: 4px !important; height: 160px !important;").
            append(root);
            
          for (var i = 1; i <= 12; ++i)
            _wcjq("select.age-gate-month", root).append("<option value=\"" + (i-1) + "\">" + i + "</option>");
          for (var i = 1; i <= 31; ++i)
            _wcjq("select.age-gate-day", root).append("<option value=\"" + i + "\">" + i + "</option>");
          var thisYear = new Date().getFullYear();
          for (var i = 0; i <= 120; ++i)
            _wcjq("select.age-gate-year", root).append("<option value=\"" + (thisYear - i) + "\">" + (thisYear - i) + "</option>");
          _wcjq("select.age-gate-month", root).change(function(){_wcjq("option.age-gate-month", root).remove();});
          _wcjq("select.age-gate-day", root).change(function(){_wcjq("option.age-gate-day", root).remove();});
          _wcjq("select.age-gate-year", root).change(function(){_wcjq("option.age-gate-year", root).remove();});

          root.submit(function()
          {
            var birthDate;
            if ((birthDate = _wcroot.convertToDate(_wcjq("select.age-gate-month", root).val(), _wcjq("select.age-gate-day", root).val(), _wcjq("select.age-gate-year", root).val())) == -1)
            {
              _wcjq(".age-gate-underage", root).hide();
              _wcjq(".age-gate-invalid-date", root).show();
            }
            else if (_wcroot.verifyAge(birthDate))
            {
              _wcroot.setCookie("wc-age-gate", "passed", "/");
              _wcroot.closeExpander();
              zoomFunction();
            }
            else
            {
              _wcjq(".age-gate-invalid-date", root).hide();
              _wcjq(".age-gate-underage", root).show();
            }
            return false;
          });
        },
        attributes : {
          width : 600,
          height : 250
        }
      },
      preserveContent: false,
      allowSizeReduction: false,
      width: 600,
      height: 250
    });
}

_wcroot.verifyAge = function (birthDate)
{
  var when17 = new Date(birthDate.getFullYear() + 17, birthDate.getMonth(), birthDate.getDate());
  return when17 < new Date();
}

_wcroot.convertToDate = function (mm, dd, yyyy)
{
  try
  {
    var month = new Number(mm);
    var day = new Number(dd);
    var year = new Number(yyyy);
    var date = new Date(year, month, day);
    if (year > 0 && month >= 0 && day > 0 && year == date.getFullYear() && month == date.getMonth() && day == date.getDate())
      return date;
  }
  catch (e){}
  return -1;
}


_wcroot.zoompdf = function (clicked, w, h)
{
  var viewportwidth;
  var viewportheight;
  var widthtoreduce;

  if (typeof window.innerWidth != 'undefined')
  {
      viewportwidth = window.innerWidth;
      viewportheight = window.innerHeight;
      widthtoreduce = 70;
  }
  else if (typeof document.documentElement != 'undefined' && 
    typeof document.documentElement.clientWidth != 'undefined' && 
      document.documentElement.clientWidth != 0)
  {
     viewportwidth = document.documentElement.clientWidth,
     viewportheight = document.documentElement.clientHeight
     widthtoreduce = 50;
  }
  else
  {
     viewportwidth = document.body.clientWidth,
     viewportheight = document.body.clientHeight
     widthtoreduce = 50;
  }

  _wcroot.zoomswf(clicked, viewportwidth - widthtoreduce, viewportheight - 128);
}

_wcroot.zoomtour = function (clicked, w, h)
{
  var tourId = clicked.attr("wcobj-id");
  
  _wchs.htmlExpand(clicked.get(0),
    {
      contentId: "wczoom",
      swfObject : {
        write : function (id)
        {
          _wcjq("#" + id).
            attr("style", "border: 1px solid #CCCCCC !important; margin: 4px !important;")
              .tour("", tourId);
        },
        attributes : {
          width : w,
          height : h
        }
      },
      preserveContent: false,
      allowSizeReduction: false,
      width: w + 18,
      height: h + 90 + 18
    });
}

_wcroot.zoomjpg = _wcroot.zoomgif = _wcroot.zoompng = _wcroot.zoomimage = function (clicked, w, h)
{
  _wchs.htmlExpand(clicked.get(0),
    {
      contentId: "wczoom",
      swfObject : {
        write : function (id)
        {
          var t = _wcjq("#" + id);
          t.html("<img src='" + clicked.attr("wcobj") + "' width='" + w + "' height='" + h + "'>");
        },
        attributes : {
          width : w,
          height : h
        }
      },
      preserveContent: false,
      allowSizeReduction: false,
      width: w,
      height: parseInt(h) + 90
    });
}

_wcroot.zoomswf = _wcroot.zoomflash = function (clicked, w, h, extravars, swf, base)
{ 
  _wchs.htmlExpand(clicked.get(0),
    {
      contentId: "wczoom",
      swfObject : {
        write : function (id)
        {
          _wcjq("#" + id).html("<div class='wcswf' style='width:" + w +"px; height:" + h + "px;'><div id='wcf" + id + "'><div class='wc-no-flash-error'>You either have JavaScript turned off or an old version of Adobe's Flash Player." +
                               "<br/><a href='http://www.macromedia.com/go/getflashplayer/' target='_blank'>Get the latest Flash player</a></div></div></div>");

          if (!base)
          {
            base = clicked.attr("wcobj-base");
            
            if(!base)
              base = clicked.attr("wcobj");
          }
          
          var isFlash = false;
          var type = clicked.attr("wcobj-type");  
                  
          if (typeof(type) != 'undefined' && typeof(_wcroot.mediaTypes[type]) != 'undefined' && _wcroot.mediaTypes[type] == 'flash')
          {
            isFlash = true;
          }
          
          if(!swf)
          {
            swf = clicked.attr("wcobj");           
          }
                  
          var vars = _wcjq.extend(eval(clicked.attr("wcobj-flashvars")), extravars);
          var params = _wcjq.extend(eval(clicked.attr("wcobj-params")),{"play": true, "wmode" : "opaque", "allowfullscreen" : "true", "allowScriptAccess" : "always", "base" : base});
          var attributes = {id: "wcfo" + id};

          if (swf.lastIndexOf(_wcroot.MEDIAPLAYER) + _wcroot.MEDIAPLAYER.length == swf.length)
          {
            vars.width = w;
            vars.height = h;
            vars.type = "video";
          }

          _wcde.SWFObject.embedSWF(swf, "wcf" + id, w, h, "8", "expressInstall.swf", vars, params, attributes);
          
          if (isFlash && clicked.attr("wcobj-enable-preloader") == 'true')
          {
            _wcroot.largeflashpreloader(id, w, h);
          }
          
        },
        attributes : {
          width : w + 2,
          height : h + 2
        }
      },
      preserveContent: false,
      allowSizeReduction: false,
      objectLoadTime: "after",
      width: w + 2,
      height: h + 90
    });
}

_wcroot.largeflashpreloader = function (id, flashWidth, flashHeight)
{
    var flash = _wcjq('#wcfo' + id);

    var div = flash.parent();
    flash = flash.get(0);
    
    var img = _wcjq("<img class='wc-loading-image' />");
    img.attr('src', _wcroot.RESOURCEBASE + "images/hourGlass.gif");
    
    var left = (parseInt(flashWidth) - 48)/2;
    var top = (parseInt(flashHeight) - 48)/2;
    var style = 'margin-left:' + left + 'px !important; margin-top:' + top + 'px !important;';      
    img.attr('style', style); 
   
    var outerIntervalId = setInterval(function() {
                      if (typeof flash == 'undefined' || typeof flash.PercentLoaded != 'function')
                      {
                        clearInterval(outerIntervalId);
                        return;
                      }
                      
                      var percentLoaded = parseInt(flash.PercentLoaded());
                      
                      if (95 > percentLoaded && percentLoaded >= 0)
                      {
                        _wcjq('#wcfo' + id).attr('style', 'visibility:hidden !important');
                        div.prepend(img);
                          
                          var innerIntervalId = setInterval(function()
                          {
                             if (parseInt(flash.PercentLoaded()) >= 95)
                             {
                                clearInterval(innerIntervalId);
                                _wcjq('#wcfo' + id).attr('style', 'visibility:visible !important');
                                _wcjq('.wc-loading-image').remove();
                             }  
                          }, 200);
                        
                      }
                      clearInterval(outerIntervalId);
                    }, 1000);
}

_wcroot.zoomiframe = function (clicked, w, h)
{
  _wchs.htmlExpand(clicked.get(0),
     {
       contentId: "wczoom",
       swfObject : {
         write : function (id)
         {
           var obj = {
             id : id,
             iframeUrl : clicked.attr("wcobj"),
             iframeWidth : clicked.attr("wcobj-width"),
             iframeHeight : clicked.attr("wcobj-height"),
             wcpc : clicked.attr("wcpc"), 
             moduleId : clicked.attr("module-id")
           }

            _wcroot.playIframeInOverlay(obj)
         },
         attributes : {
           width : w,
           height : h
         }
       },
       preserveContent: false,
       allowSizeReduction: false,
       width: w,
       height: parseInt(h) + 90
     });
}

_wcroot.playIframeInOverlay = function(obj) {

  var id =          obj["id"];
  var iframeUrl =    obj["iframeUrl"];
  var iframeWidth =  obj["iframeWidth"];
  var iframeHeight = obj["iframeHeight"];
  var wcpc =        obj["wcpc"];
  var moduleId =    obj["moduleId"];
  var container =   obj["container"] || _wcjq("#" + id);

  var doc = null;
  var domainSetter = "";
  var theFrame = _wcjq("<iframe frameBorder=\"0\" scrolling=\"no\">").attr({
      src: iframeUrl,
      width: iframeWidth,
      height: iframeHeight
    }).css({
      border: 0,
      overflow: "hidden"
    });
  
  container.children().remove();
  container.append(theFrame);
}

_wcroot.zoomflv = _wcroot.zoomflashvideo = function (clicked, w, h)
{
  if (_wcsite.useJWPlayer)
    _wcroot.zoomflashvideoJWPlayer(clicked, w, h);
  else
    _wcroot.zoomflashvideoFlowPlayer(clicked, w, h)
}

_wcroot.getzoomflvparams = function (clicked)
{
  var params = {};
  params.autostart = true;
  params.overstretch = "none";
  var url = clicked.attr("wcobj");
  var uparts = _wcroot.urlparts(url);
  if (uparts.scheme == "rtmp")
  {
    var lastsegmentbegin = uparts.path.lastIndexOf("/");
    params.file = uparts.path.substring(lastsegmentbegin + 1);
    params.streamer = "rtmp://" + uparts.authority + "/" + uparts.path.substring(0, lastsegmentbegin);
  }
  else
  {
    params.file = url;
  }
  return params;
}

_wcroot.zoomflashvideoJWPlayer = function (clicked, w, h)
{
  _wcroot.zoomswf(clicked, w, h + 18, _wcroot.getzoomflvparams(clicked), _wcroot.mediaplayerurl, _wcroot.mediaplayerurl);
}

_wcroot.zoomflashvideoFlowPlayer = function (clicked, w, h)
{
  var resourcePrefix = _wcroot.RESOURCEBASE + "images/";
  var flashPrefix = _wcroot.RESOURCEBASE + "flash/";
  
  _wchs.htmlExpand(clicked.get(0),
     {
       contentId: "wczoom",
       swfObject : {
         write : function (id)
         {
           var obj = {
             id : id,
             movieUrl : clicked.attr("wcobj"),
             movieWidth : clicked.attr("wcobj-width"),
             movieHeight : clicked.attr("wcobj-height"),
             wcpc : clicked.attr("wcpc"), 
             moduleId : clicked.attr("module-id")
           }

            _wcroot.playMovieInIframe(obj)
         },
         attributes : {
           width : w,
           height : parseInt(h) + 20
         }
       },
       preserveContent: false,
       allowSizeReduction: false,
       width: w,
       height: parseInt(h) + 90 + 20
     });
}

_wcroot.urlparts = function (url)
{
  var p = {scheme: "", authority: "", path: "", query: "", params: {}, fragment: ""};
  var se = url.indexOf("://", 0);
  p.scheme = url.substring(0, se);
  var ai = se + 3;
  var pi = url.indexOf("/", ai) + 1;
  var qi = url.indexOf("?", ai) + 1;
  var fi = url.indexOf("#", ai) + 1;

  if (fi > 0  && qi > fi)
    qi = 0;

  p.authority = url.substring(ai, pi - 1);

  if (qi > 0)
    p.path = url.substring(pi, qi - 1);
  else if (fi > 0)
    p.path = url.substring(pi, fi - 1);
  else if (pi < url.length)
    p.path = url.substring(pi);

  if (qi > 0)
  {
    if (fi > 0)
      p.query = url.substring(qi, fi - 1);
    else if (qi < url.length)
      p.query = url.substring(qi);
  }

  if (fi > 0 && fi < url.length)
    p.fragment = url.substring(fi);

  if (p.query != "")
  {
    qps = p.query.split("&");
    for (var i = 0; i < qps.length; ++i)
    {
      var qpsp = qps[i].indexOf("=");
      var qpnm = qpsp == -1 ? qps[i] : qps[i].substring(0, qpsp);
      var qpvl = qpsp == -1 ? "" : qps[i].substring(qpsp + 1);
      p.params[unescape(qpnm)] = unescape(qpvl);
    }
  }
  return p;
}

_wcroot.urlparam = function (urlParts, name)
{
  if (typeof(urlParts.params[name]) != "undefined")
    return urlParts.params[name];
  return "";
}

_wcroot.getCookie = function (name)
{
  var cookie = document.cookie;
  if (cookie != null)
  {
    var begin = cookie.indexOf(name + "=");
    if (begin != -1)
    {
      begin += name.length + 1;
      var end = cookie.indexOf(';', begin);
      var val = (end == -1) ? cookie.substring(begin) : cookie.substring(begin, end);

      return val;
    }
  }
  return null;
}

_wcroot.setCookie = function (name, value, path, ttl)
{
  var theCookie = name + "=" + value;
  if (path)
    theCookie += ";path=" + path;
  if (ttl)
  {
    var exp = new Date();
    exp.setTime(exp.getTime() + ttl);
    theCookie += ";expires=" + exp.toGMTString();
  }
  document.cookie = theCookie;
}

_wcroot.abtest = {};

_wcroot.abtest.DEFAULT_HIDE_FACTOR = 0.5;
_wcroot.abtest.DEFAULT_TEST_ID = "000";
_wcroot.abtest.HIDE = "hide";
_wcroot.abtest.DISPLAY = "display";

_wcroot.abtest.decisionreported = false;
_wcroot.abtest.a2creported = false;
_wcroot.abtest.initialized = false;

_wcroot.abtest.enabled = function ()
{
  return typeof(_wcsite.abtest) != "undefined" &&
         typeof(_wcsite.abtest.hooka2c) != "undefined" &&
         typeof(_wccontent.abtest) != "undefined" &&
         typeof(_wccontent.abtest.enabled) != "undefined" &&
         _wccontent.abtest.enabled;
}

_wcroot.abtest.cookieprefix = function ()
{
  var testid = typeof(_wccontent.abtest.testid) == "undefined" ? _wcroot.abtest.DEFAULT_TEST_ID : _wccontent.abtest.testid;
  return "wcabtest-" + _wccontent.site + "-" + testid + "=";
}

_wcroot.abtest.setdecision = function (decision)
{
  var exp = new Date();
  exp.setTime(exp.getTime() + 180*24*60*60*1000);
  document.cookie = _wcroot.abtest.cookieprefix() + decision + ";path=/;expires=" + exp.toGMTString();
}

_wcroot.abtest.getdecision = function ()
{
  // From URL parameter
  var up = _wcroot.urlparts(location.href);
  var p = _wcroot.urlparam(up, "ab-test");
  if (p != "")
  {
    _wcroot.abtest.setdecision(p);
    return p;
  }

  // From cookie
  var cookie = document.cookie;
  if (cookie != null)
  {
    var prefix = _wcroot.abtest.cookieprefix();
    var begin = cookie.indexOf(prefix);
    if (begin != -1)
    {
      begin += prefix.length;
      var end = cookie.indexOf(';', begin);
      var val = (end == -1) ? cookie.substring(begin) : cookie.substring(begin, end);
      if (val != "")
      {
        _wcroot.abtest.setdecision(val);
        return val;
      }
    }
  }

  // Create new decision
  var rnd = (Math.random() > _wcroot.abtest.hidefactor()) ?  _wcroot.abtest.DISPLAY : _wcroot.abtest.HIDE;
  _wcroot.abtest.setdecision(rnd);
  return rnd;
}

_wcroot.abtest.hidefactor = function ()
{
  return (typeof(_wccontent.abtest.hidefactor) != "undefined") ? _wccontent.abtest.hidefactor: _wcroot.abtest.DEFAULT_HIDE_FACTOR;
}

_wcroot.abtest.reportdecision = function ()
{
  if (!_wcroot.abtest.decisionreported)
  {
    var d = _wcroot.abtest.getdecision(_wccontent.cpi);
    if (d == _wcroot.abtest.DISPLAY && !_wcroot.vieweventcomplete)
    {
      setTimeout(_wcroot.abtest.reportdecision, 1000);
    }
    else
    {
      for(var i=0; i<_wccontent.aplus.modulewcpcpairs.length; i++)
      {    
        _wcroot.reportevent("abtest-button-" + d, null, _wccontent.site, _wccontent.aplus.modulewcpcpairs[i].module, _wccontent.cpi, 
          _wccontent.aplus.modulewcpcpairs[i].wcpc, {origin: "product"});       
      }
      
       _wcroot.abtest.decisionreported = true;
    }
  }
}

_wcroot.abtest.reporta2c = function (onloadfunc)
{
  if (!_wcroot.abtest.a2creported)
  {
    for(var i=0; i<_wccontent.aplus.modulewcpcpairs.length; i++)
    {
      _wcroot.reportevent("abtest-button-" + _wcroot.abtest.getdecision(_wccontent.cpi) + "-add-to-cart", onloadfunc, _wccontent.site, 
        _wccontent.aplus.modulewcpcpairs[i].module, _wccontent.cpi, _wccontent.aplus.modulewcpcpairs[i].wcpc, {origin: "product"});
    }
    
    _wcroot.abtest.a2creported = true;
  }
}

_wcroot.abtest.reportinitfailed = function ()
{
  if(_wcroot.getalertloggerdomain() == null)
    return;
  
  _wcroot.abtest.initfailedrprtimg = new Image();
  _wcroot.abtest.initfailedrprtimg.src = _wcroot.getscheme() + "://" + _wcroot.getalertloggerdomain() + "/alerts/logger?alert=error-failed-to-hook-a2c&partner=" + 
  _wccontent.site + "&scheme" + _wcroot.getscheme() + "&cpi=" + escape(_wccontent.cpi) + "&url=" + escape(location.href) + 
  "&hook-tries=20&hook-try-interval=1000&rand=" + Math.round(Math.random() * 1000000);
}

_wcroot.abtest.init = function ()
{
  try
  {
    if (_wcroot.abtest.initialized)
      return;

    _wcroot.abtest.initialized = _wcsite.abtest.hooka2c();
    if (_wcroot.abtest.initialized)
      _wcroot.abtest.reportdecision();
    else
      _wcroot.abtest.reportinitfailed(_wccontent.site, _wccontent.cpi);
  }
  catch (e)
  {
  }
}

_wcroot.beforeCreateScreenshot = function()
{
  var completelyLoadedImages = 0;
  var notCompletelyLoadedImages = 0;
  
  var images = _wcjq('#wc-aplus img');
  
  for(var i=0; i<images.length; i++)
  {
    if(!images[i].complete)
      notCompletelyLoadedImages++;
    else
      completelyLoadedImages++;
  }
  
  if(notCompletelyLoadedImages > 0)
    _wcroot.injectErrorMessageBeforeCreateScreenshot(completelyLoadedImages, notCompletelyLoadedImages);
}

_wcroot.injectErrorMessageBeforeCreateScreenshot = function(completelyLoadedImages, notCompletelyLoadedImages)
{  
  var p = _wcjq('#wc-aplus');
  var errorMessage = "Failed to load all images! " + completelyLoadedImages + ' images were loaded completely! ' + notCompletelyLoadedImages + ' images were not loaded completely!'; 
 
  p.append("<div id='wc-create-screenshot-error'>" + errorMessage + "</div>");
}

_wcroot.beforepartneronload = function ()
{
  if (typeof _wcsite != 'undefined' && typeof _wcsite.beforepartneronload == 'function')
  {
    _wcsite.beforepartneronload();
  }
}

_wcroot.afterinjectionisdone = function ()
{
  if (typeof _wcsite != 'undefined' && typeof _wcsite.afterinjectionisdone == 'function')
  {
    _wcsite.afterinjectionisdone();
  }
}

_wcroot.afterpartneronload = function ()
{
  if (typeof _wcsite != 'undefined' && typeof _wcsite.afterpartneronload == 'function')
  {
    _wcsite.afterpartneronload();
  }
}

_wcroot.watchinlineflashmovie = function (id)
{
  var startTheMovie = function()
  {
    _wcjq("#wc-flash-" + id + "-div").html(_wcroot.getMissingAdobeFlashPlayerErrorMessageDiv());     
    var clicked = _wcjq("#wc-flash-" + id + "-div").parent().parent().find("img:first");

    var swf  = clicked.attr("wcobj");
    var base = clicked.attr("wcobj-base");

    if(!base)
    {
      base = swf;
    }

    var vars = eval(clicked.attr("wcobj-flashvars"));
    var params = _wcjq.extend(eval(clicked.attr("wcobj-params")),{"play": true, "wmode" : "opaque", "allowfullscreen" : "true", "allowScriptAccess" : "always", "base" : base});
    var attributes = {id: "wc-flash-" + id + "-div"};

    var w = clicked.attr("wcobj-width");
    var h = clicked.attr("wcobj-height");

    _wcde.SWFObject.embedSWF(swf, "wc-flash-" + id + "-div", w, h, "8", "expressInstall.swf", vars, params, attributes);
    _wcjq("#wc-flash-" + id + "-div").parent().attr({style: 'display:inline !important'});      

    _wcjq("#wc-flash-" + id + "-play-div").attr({style: 'display:none !important'});
    _wcjq("#wc-flash-" + id + "-stop-div").attr({style: 'display:block !important'});

    if (clicked.attr("class") == 'wc-default-flash-poster')
    {
      clicked.parent().attr({style: 'display:none !important'});
    }
    else
    {
      clicked.attr({style: 'display:none !important'});
    }

    _wcroot.zoomevent(swf, clicked.attr("module-id"), clicked.attr("wcpc"));
  }

  if (_wcroot.needAgeGate("flashvideo"))
    _wcroot.verifyMature(_wcjq("#wc-flash-" + id + "-div").parent().parent(), startTheMovie);
  else
    startTheMovie();
}

_wcroot.stopinlineflashmovie = function (id)
{   
  var clicked = _wcjq("#wc-flash-" + id + "-div").parent().parent().find("img:first");
  
  var w = clicked.attr("wcobj-width");
  var h = clicked.attr("wcobj-height");
  
  if (clicked.attr("class") == "wc-default-flash-poster")
  {
    clicked.parent().attr({style: "position: relative !important; width: " + w + "px !important; height: " + h + "px !important; background-image: url('" + _wcroot.DEFAULT_POSTER_URL + "') !important"});
  }
  else
  {
    clicked.attr({style: 'display:inline !important'});
  }
  
  _wcjq("#wc-flash-" + id + "-div").replaceWith("<div id='wc-flash-" + id + "-div'></div>");
  _wcjq("#wc-flash-" + id + "-div").parent().attr({ style: "width: " + w + "px !important; height: " + h + "px !important; display:none !important"});
  
  _wcjq("#wc-flash-" + id + "-play-div").attr({style: 'display:block !important'});
  _wcjq("#wc-flash-" + id + "-stop-div").attr({style: 'display:none !important'});
}

_wcroot.getMissingAdobeFlashPlayerErrorMessageDiv = function ()
{
  var missingAdobeFlashPalyerDiv = "<div class='wc-no-flash-error'>You either have JavaScript turned off or an old version of Adobe's Flash Player." +
                                   "<br/><a href='http://www.macromedia.com/go/getflashplayer/' target='_blank'>Get the latest Flash player</a></div>"
 
  return _wcjq("" + missingAdobeFlashPalyerDiv);
}

_wcroot.addratingquestion = function ()
{
  _wcjq(".wc-rating-answer-yes-wrapper").click(function() {
    _wcroot.answerratingquestion(_wcjq(this));
  });
  
  _wcjq(".wc-rating-answer-no-wrapper").click(function() {
    _wcroot.answerratingquestion(_wcjq(this));
  });
}

_wcroot.answerratingquestion = function (e)
{
  for(var i=0; i<_wccontent.aplus.modulewcpcpairs.length; i++)
  { 
    _wcroot.reportevent(e.attr("wc-event"), _wcroot.vieweventonload, _wccontent.site, _wccontent.aplus.modulewcpcpairs[i].module, _wccontent.cpi, 
      _wccontent.aplus.modulewcpcpairs[i].wcpc, {});
  }
  
  _wcjq(".wc-rating-question-text").hide();
  _wcjq(".wc-rating-answer-yes-wrapper").hide();
  _wcjq(".wc-rating-answer-no-wrapper").hide();
  _wcjq(".wc-rating-answers-separator").hide();
  
  var p = _wcjq(".wc-rating-question-response");
  p.removeAttr("style");
  
  setTimeout(function() {
    p.fadeOut(1000);
  }, 2000);  
}


_wcroot.playMovieInIframe = function(obj) {

  var id =          obj["id"];
  var movieUrl =    obj["movieUrl"];
  var movieWidth =  obj["movieWidth"];
  var movieHeight = obj["movieHeight"];
  var wcpc =        obj["wcpc"];
  var moduleId =    obj["moduleId"];
  var container =   obj["container"] || _wcjq("#" + id);

  var doc = null;
  var domainSetter = "";
  var theFrame = _wcjq("<iframe frameBorder=\"0\" scrolling=\"no\">").attr({
      width: movieWidth,
      height: parseInt(movieHeight, 10)  + 20
    }).css({
      border: 0,
      overflow: "hidden"
    });
  
  function f1()
  {
    var html = [];
    try
    {
      doc = theFrame.get(0).contentWindow.document;
    }
    catch (e)
    {
      domainSetter = "document.domain='" + container.get(0).document.domain + "';"
      theFrame.get(0).src = [ "javascript:void((function(){document.open();" , domainSetter , "document.write('<!DOCTYPE html>');document.close();})())" ].join("");
      doc = theFrame.get(0).contentWindow.document;
    }
    doc.close();
    doc.open();

    var html = [
      "<!DOCTYPE HTML>\n",
      "<html style='margin:0;padding:0;overflow:hidden'>\n",
      "<head>\n" ,
      "  <link href='", _wcroot.getcssurl(), "' rel='stylesheet' type='text/css'>",
      "  <script type='text/javascript'>\n",
      "    WebCollageInFrameMovieLoad = function ($){\n" ,
      "        $(function()\n",
      "        {\n ",
                 domainSetter, "\n",
      "          $('.wc-movie-wrapper').inframeMovie('", movieUrl, "', '", moduleId, "','", wcpc, "', { flowPlayerParams: { src: '", _wcroot.RESOURCEBASE, "flash/flowplayer.unlimited-3.2.2.swf'}, flowPlayerOptions:{play : {url : '", _wcroot.RESOURCEBASE ,"images/play.png' }}});\n",
      "        });\n",
      "      };\n",
      "    <\/script>\n",
      "    <script type='text/javascript' src='" , _wccontent.renderers.inframemovie ? _wccontent.renderers.inframemovie : _wcroot.RESOURCEBASE + "js/inframemovie.js" , "'><\/script>\n",
      "  </head>\n",
      "  <body style='margin:0!important;padding:0!important;' id='wc-aplus'>\n",
      "    <div class='wc-movie-wrapper' >\n",
      "      <div class='wc-movie-container' id='" , container.attr("id") , "-movie' style='position:relative !important; height:", movieHeight, "px !important; width:", movieWidth , "px!important; background-color: black !important; '></div>",
      "      <div class='wc-movie-controls wc-video-controls' id='", container.attr("id") , "-ctrl'  class='wc-video-controls' style='height: 20px !important; width: ", movieWidth , "px!important; overflow: hidden !important;'></div>\n",
      "    </div>\n",
      "  </body>\n",
      "</html>"
    ].join("");
    
    doc.write(html);
    doc.close();
  }


  container.children().remove();
  container.append(theFrame);

  try
  {
    f1();
  }
  catch (e)
  {
    // for some browsers (IE6 included) the contentWindow should not yet be accessed immedietly after setting its src
    // so we need to relinquish control back to the browser and then retry
    setTimeout(f1, 0);  
  }
}

_wcroot.startinlineiframe = function (id)
{
  var startTheFrame = function()
  {
    var theIframeDiv = _wcjq("#wc-iframe-" + id + "-div");
    var clicked = theIframeDiv.parent().parent().find("img.wc-iframe-poster");

    var src  = clicked.attr("wcobj");

    var attributes = {id: "wc-iframe-" + id + "-div"};

    var w = clicked.attr("wcobj-width");
    var h = clicked.attr("wcobj-height");

    theIframeDiv.html("<iframe frameBorder=\"0\" scrolling=\"no\" style=\"border:0!important;overflow:hidden!important;width:" + w + "px!important;height:" + h + "px!important;\"></iframe>" );
    _wcjq("iframe", theIframeDiv).attr("src", src);
    theIframeDiv.parent().show();

    theIframeDiv.parent().attr({style: 'display:inline !important'});      

    _wcjq("#wc-iframe-" + id + "-play-div").attr({style: 'display:none !important'});
    _wcjq("#wc-iframe-" + id + "-stop-div").attr({style: 'display:block !important'});

    clicked.parent().attr({style: 'display:none !important'});

    _wcroot.zoomevent(src, clicked.attr("module-id"), clicked.attr("wcpc"));
  }

  if (_wcroot.needAgeGate("iframe"))
    _wcroot.verifyMature(_wcjq("#wc-iframe-" + id + "-div").parent().parent(), startTheFrame);
  else
    startTheFrame();
}

_wcroot.stopinlineiframe = function (id)
{   
  var clicked = _wcjq("#wc-iframe-" + id + "-div").parent().parent().find("img.wc-iframe-poster");
  
  var w = clicked.attr("wcobj-width");
  var h = clicked.attr("wcobj-height");
  
  clicked.parent().attr({style: clicked.parent().attr("data-visible-style")});
  
  _wcjq("#wc-iframe-" + id + "-div iframe").remove();
  _wcjq("#wc-iframe-" + id + "-div").parent().hide();
  
  _wcjq("#wc-iframe-" + id + "-play-div").attr({style: 'display:block !important'});
  _wcjq("#wc-iframe-" + id + "-stop-div").attr({style: 'display:none !important'});
}


// Highslide license key, do not remove: b2fb6f433e2445439ff08d45eb75a017

_wcroot.oldwinonload = window.onload;
_wcroot.orig_wchs = _wchs;
_wchs = {};
_wcsite = {};

//------------------- wcroot.js End -------------------
//------------------- wcsite.js Begin -------------------
_wcsite.injectaplusoverride  = function (html)
{
}

_wcsite.injectaplusappend = function(html)
{
}
//------------------- wcsite.js End -------------------
//------------------- suffix.js Begin -------------------
_wchs = _wcroot.orig_wchs;

window.onload = function()
{
  var rv;
  if (typeof _wcroot.oldwinonload == "function")
  {
    _wcroot.beforepartneronload();
    rv = _wcroot.oldwinonload.apply(this, arguments);
    _wcroot.afterpartneronload();
  }
    
  _wcjq("#wczoom li.wchs-close>img").click(_wcroot.closeExpander);
  
  if(typeof rv != "undefined")
    return rv; 
}


if (typeof wcsbLoad != "undefined")
{
  if (wcsbLoad.documentLoaded)
    _wcroot.ready();
  else
    _wcjq(_wcroot.ready);
}
else if (typeof _wcsite.readytoinject != "undefined")
{
  if (_wcroot.existscontenttoinject() && _wcsite.readytoinject())
    _wcroot.ready();
  else
    _wcjq(_wcroot.ready);
}
else
  _wcjq(_wcroot.ready);

} //closes the if (typeof _wcroot == "undefined") in the prefix

//------------------- suffix.js End -------------------

