function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false}
else {return true}
}
}
function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}
function verifyPW(field1, field2, result_id, match_html, nomatch_html) {
this.field1 = field1;
this.field2 = field2;
this.result_id = result_id;
this.match_html = match_html;
this.nomatch_html = nomatch_html;
this.check = function() {
// Make sure we don't cause an error
// for browsers that do not support getElementById
if (!this.result_id) { return false; }
if (!document.getElementById){ return false; }
r = document.getElementById(this.result_id);
if (!r){ return false; }
if (this.field1.value != "" && this.field1.value == this.field2.value) {
r.innerHTML = this.match_html;
} else {
r.innerHTML = this.nomatch_html;
}
}
}
//Gets the browser specific XmlHttpRequest Object
function getXmlHttpRequestObject() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest(); //Not IE
} else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP"); //IE
} else {
//Display your error message here.
//and inform the user they might want to upgrade
//their browser.
alert("Your browser doesn't support the XmlHttpRequest object. Better upgrade to Firefox or IE 6+.");
}
}
//Get our browser specific XmlHttpRequest object.
var receiveReq = getXmlHttpRequestObject();
//Initiate the asyncronous request.
function displayForm(spanname) {
//Check to see if the XmlHttpRequests state is finished.
if (receiveReq.readyState == 4) {
//Set the contents of our span element to the result of the asyncronous call.
document.getElementById(spanname).innerHTML = receiveReq.responseText;
}
}
function slinkMenu(fieldName) {
//If our XmlHttpRequest object is not in the middle of a request, start the new asyncronous call.
// catName = document.cat_form.catName.value;
// var smenu = "slink-" + slinkID ;
catID = document.getElementById(fieldName).value;
if (receiveReq.readyState == 4 || receiveReq.readyState == 0) {
//Setup the connection as a GET call to SayHello.html.
//True explicity sets the request to asyncronous (default).
var spanname = "menu-" + fieldName;
var file_to_open = "./ajax.php?a=slinkmenu&f=" + fieldName + "&c=" + catID;
receiveReq.open("GET", file_to_open, true);
//Set the function that will be called when the XmlHttpRequest objects state changes.
receiveReq.onreadystatechange = function(){displayForm(spanname)};
//Make the actual request.
receiveReq.send(null);
}
}
function postLike(itemid, likestatus, style) {
if (receiveReq.readyState == 4 || receiveReq.readyState == 0) {
var file_to_open = "./submit.php?function=like&style=" + style + "&id=" + itemid + "&v=" + likestatus;
receiveReq.open("GET", file_to_open, true);
receiveReq.onreadystatechange = function(){displayLike(itemid)};
receiveReq.send(null);
}
}
function postWatch(itemid, watchstatus) {
if (receiveReq.readyState == 4 || receiveReq.readyState == 0) {
var file_to_open = "./submit.php?function=watch&item_id=" + itemid + "&s=" + watchstatus;
var watchspan = "watch-" + itemid;
receiveReq.open("GET", file_to_open, true);
receiveReq.onreadystatechange = function(){displayLike(watchspan)};
receiveReq.send(null);
}
}
function displayLike(spanname) {
if (receiveReq.readyState == 4) {
document.getElementById(spanname).innerHTML = receiveReq.responseText;
}
}
function listItem(hash, listid, style){
var hash_array = hash.split(":");
$("#ra_list_link"+listid).load('./submit.php?function=list&style=' + style + '&item_id='+hash_array[2]+'&list_id='+listid+'&c='+hash_array[1]);
// $("#ra_list_link"+listid).empty();
}
function ra_rate_item(item_hash, rating){
jQuery('#ra_rating_'+item_hash).empty().html('saving...');
jQuery.post('./submit.php?function=item_rate&a=rate&item_hash='+item_hash+'&rating='+rating, function(data){
$('#ra_rating_'+item_hash).empty().html(data);
});
}
function ra_unrate_item(item_hash){
$.post('./submit.php?function=item_rate&a=delete&item_hash=ra_rating_'+item_hash, function(data){
$('#ra_rating_'+item_hash).empty().html(data);
});
}
function confirmSubmit(message)
{
var agree=confirm(message);
if (agree)
return true ;
else
return false ;
}
function ra_qvote(qhash, vote){
var res = qhash.split(":");
$.get("./submit.php?function=qvote&hash="+qhash+"&v="+vote, function(data){
$('#ra_score_q'+res[2]).empty().html(data);
});
}
function ra_avote(qhash, vote){
var res = qhash.split(":");
$.get("./submit.php?function=qvote&hash="+qhash+"&v="+vote, function(data){
$('#ra_helpful_a'+res[2]).empty().html('Thank you for the feedback.');
});
}
function ra_qanswer_form(qhash){
var res = qhash.split(":");
$('#ra_qaform_q'+res[2]).toggle();
}
function openModal() {
document.getElementById("st_modal1").style.display = "block";
googletag.cmd.push(function() { deployads.push(function() { deployads.gpt.display('div-gpt-ad-1320346148266-2'); }); });
jQuery(document).keyup(function(e) {
if (e.keyCode === 27){closeModal();}
if (e.keyCode === 39){loadSlide( jQuery( '#st_next_id' ).val(), jQuery( '#st_gallery_id' ).val() );}
if (e.keyCode === 37){loadSlide( jQuery( '#st_prev_id' ).val(), jQuery( '#st_gallery_id' ).val() );}
});
}
function closeModal() {
document.getElementById("st_modal1").style.display = "none";
}
function loadSlide(id, gallery){
// jQuery('.st_lightbox_info_div').empty().html('Loading...');
jQuery('#st_slide_img img').attr('src', 'https://images.singletracks.com/graphics/spacer.gif').css('height', 'auto').css('width', '100%');
jQuery.getJSON(ajaxurl + '?action=st_functions_get_photo&gallery='+gallery+'&photo_id='+id, function(data){
jQuery('#st_slide_img img').attr('src', data.meta.file_name );
jQuery('#st_prev_id').val( data.prev );
jQuery('#st_next_id').val( data.next );
jQuery('#st_gallery_id').val( gallery );
jQuery('.st_prev_slide').attr('onclick', 'loadSlide('+data.prev+', "'+gallery+'")' );
jQuery('.st_next_slide').attr('onclick', 'loadSlide('+data.next+', "'+gallery+'")' );
jQuery('#st_embed_forum').html( "[url=https://www.singletracks.com/photo.php?c="+data.catid+"&p="+id+"][img]"+data.meta.file_name+"[/img][/url]" );
jQuery('#st_embed_html').html( "<a href='https://www.singletracks.com/photo.php?c="+data.catid+"&p="+id+"'><img src='"+data.meta.file_name+"' border='0' /></a>" );
jQuery('#st_slide_img').show();
photo_height = parseInt( data.meta.img_dims.split(':')[1] );
topmargin = ( 800 - photo_height ) / 2;
if ( topmargin < 0 ){topmargin = 0;}
imagenewheight = jQuery( '#st_slide_img img' ).width() * data.meta.img_dims.split(':')[1] / data.meta.img_dims.split(':')[0];
topmargin = ( 800 - imagenewheight ) / 2;
if ( topmargin < 0 ){topmargin = 0;}
if ( imagenewheight > 800 ){
jQuery('#st_slide_img img').css('height', '800px').css('width', 'auto');
topmargin = 0;
}
jQuery('#st_photo_comments').empty();
jQuery('#st_slides_cached').append(" ");
jQuery('#st_photog_avatar').attr('src', data.user.avatar);
jQuery('#st_photog_name').text(data.user.name);
jQuery('#st_photog_name').attr('href', './profile.php?u='+data.meta.user_id);
jQuery('#st_photo_date').text( data.meta.date_format );
jQuery('#st_photo_rating').empty().html( data.meta.rating_img );
jQuery('#st_photo_caption').empty().html( '' + data.meta.caption + ' ' );
photohash = data.meta.reverse_hash;
jQuery('#st_photo_caption').append( data.edit_link );
if ( data.my_rating > 0 ){jQuery('#st_photo_rating_option').hide();} else {jQuery('#st_photo_rating_option').show();}
if ( typeof data.comments === 'object' && data.comments !== null ){
jQuery.each( data.comments, function( key, comment ) {
if ( comment.edit_url != 0 ){ edit_link = " edit ";}
else {edit_link = '';}
jQuery('#st_photo_comments').append("
");
console.log( comment.comment );
});
}
if ( typeof data.tags === 'object' && data.tags !== null ){
linkarray = [];
jQuery.each( data.tags, function( key, tag ) {
linkarray.push( ""+tag[0]+" " );
});
jQuery('#st_photo_tags').html( linkarray.join( ", " ) );
}
jQuery('#st_photo_rateit').empty().html(" ");
var i;
var classes = ["", "one", "two", "three", "four", "five"];
for ( i=1; i <= 5; i++ ){
jQuery('#st_rating_list').append(''+i+' ');
}
// googletag.pubads().refresh(slots['div-gpt-ad-1320346148266-2']);
jQuery('#st_slide_img img').css('margin-top', topmargin);
});
}
jQuery(function() {
jQuery( "#st_comment_form" ).submit(function( event ) {
mycomment = jQuery( '#st_photo_comment_text').val();
jQuery( '#st_photo_comment_text').prop( 'disabled', true );
jQuery.post( ajaxurl+'?action=st_functions_save_comment', { comment: mycomment, item_hash: photohash }, function( data ){
console.log( data );
jQuery( '#st_photo_comment_text').prop( 'disabled', false ).val('');
jQuery( '#st_photo_comments' ).append('Me : '+mycomment+'
');
var commentDiv = document.getElementById("st_photo_comments");
commentDiv.scrollTop = commentDiv.scrollHeight;
}, 'json');
event.preventDefault();
});
});
function scrollToAnchor(aid){
var aTag = $("a[name='"+ aid +"']");
$('html,body').animate({scrollTop: aTag.offset().top},'slow');
}
function st_load_more_reviews(start, itemid, collectid){
jQuery.getJSON(ajaxurl+"?action=st_functions_get_reviews&item_id="+itemid+"&start="+start+"&collect_id="+collectid, function (data){
jQuery('#more_reviews_block').append(data.code);
jQuery('#more_reviews_btn'+start).hide();
});
}
jQuery(function() {
'use strict';
if ( jQuery('#st_right_ad1').length && typeof jQuery('[data-sticky_column]').stick_in_parent === 'function' ){
function activeStickyKit() {
jQuery('[data-sticky_column]').stick_in_parent({
offset_top: 120,
parent: '[data-sticky_parent]',
spacer: ".sticky-spacer",
});
// bootstrap col position
jQuery('[data-sticky_column]')
.on('sticky_kit:bottom', function(e) {
var monkey = e.target;
jQuery(this).parent().css('position', 'relative');
jQuery(monkey).css('left', st_ad_left_posn-st_ad_parent_left_posn);
})
.on('sticky_kit:stick', function(e) {
var monkey = e.target;
jQuery(monkey).css('left', st_ad_left_posn);
})
.on('sticky_kit:unstick', function(e) {
var monkey = e.target;
jQuery(monkey).css('left', st_ad_left_posn);
jQuery(monkey).css('position', 'static');
})
.on('sticky_kit:unbottom', function(e) {
var monkey = e.target;
jQuery(monkey).css('left', st_ad_left_posn);
jQuery(this).parent().css('position', 'relative');
});
};
activeStickyKit();
function detachStickyKit() {
jQuery('[data-sticky_column]').trigger("sticky_kit:detach");
};
// stop sticky kit
// based on your window width
var screen = 992;
var windowHeight, windowWidth;
windowWidth = jQuery(window).width();
if ((windowWidth < screen)) {
detachStickyKit();
} else {
activeStickyKit();
}
// windowSize
// window resize
function windowSize() {
windowHeight = window.innerHeight ? window.innerHeight : jQuery(window).height();
windowWidth = window.innerWidth ? window.innerWidth : jQuery(window).width();
}
windowSize();
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};
jQuery(window).resize(debounce(function(){
windowSize();
jQuery(document.body).trigger("sticky_kit:recalc");
if (windowWidth < screen) {
detachStickyKit();
} else {
activeStickyKit();
}
}, 250));
var ad_offsets = jQuery('#st_right_ad1').offset();
var st_ad_left_posn = ad_offsets.left;
var ad_offsets_parent = jQuery('#st_ad_row_parent').offset();
var st_ad_parent_left_posn = ad_offsets_parent.left;
/* this was throwing an error; not sure if it's even necessary?
jQuery("[data-sticky_column]").each(function(){
posn = jQuery(this);
posn.data('fixed', posn.offset().left); // Left value for fixed position
posn.data('absolute', posn.position().left); // Left value for absolute (on bottom)
});
*/
}
jQuery('.st_login_form input').addClass("form-control");
jQuery('.login-username input').attr("placeholder", "Email Address");
jQuery('.login-password input').attr("placeholder", "Password");
jQuery('.login-submit input[type="submit"]').addClass('btn btn-primary');
jQuery('.login-password').after('Lost password?
');
jQuery(".st_caption_shortcode_fix").unwrap();
jQuery("img.alignnone").css('margin-bottom', '20px').unwrap('p');
jQuery("a img.alignnone").css('margin-bottom', '20px').unwrap().unwrap('p');
// jQuery('p img.alignnone').parentsUntil('p > *').addBack().unwrap();
jQuery('.ra_featured_card').click( function(){
location.href = jQuery( this ).data('url');
});
});
function st_functions_multiple_text_input_add(field_name){
var n = jQuery('#'+field_name+'_wrapper input').length + 1;
jQuery('#'+field_name+'_wrapper').append("");
}
function st_functions_multiple_text_input_remove(field_name, index){
jQuery('#'+field_name+'_input_'+ index).remove();
}
function st_functions_set_reply_id(reply_id){
location.replace("#st_top_of_comment_form");
jQuery('#comment_parent').val(reply_id);
}
/**
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML=" ",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);
/* Modernizr 2.7.2 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML=" ",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b