/*************************************************
**  jQuery Masonry version 1.2.0
**  copyright David DeSandro, licensed GPL & MIT
**  http://desandro.com/resources/jquery-masonry
**************************************************/
;(function($){var n=$.event,resizeTimeout;n.special["smartresize"]={setup:function(){$(this).bind("resize",n.special.smartresize.handler)},teardown:function(){$(this).unbind("resize",n.special.smartresize.handler)},handler:function(a,b){var c=this,args=arguments;a.type="smartresize";if(resizeTimeout)clearTimeout(resizeTimeout);resizeTimeout=setTimeout(function(){jQuery.event.handle.apply(c,args)},b==="execAsap"?0:100)}};$.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])};$.fn.masonry=function(l,m){function getBricks(a,b){a.$bricks=b.itemSelector==undefined?b.$brickParent.children():b.$brickParent.find(b.itemSelector)}function placeBrick(a,b,c,d,e,f){var g=0;for(i=0;i<b;i++){if(c[i]<c[g])g=i}var h={left:e.colW*g+e.posLeft,top:c[g]};if(e.masoned&&f.animate){a.animate(h,{duration:f.animationOptions.duration,easing:f.animationOptions.easing,complete:f.animationOptions.complete,step:f.animationOptions.step,queue:f.animationOptions.queue,specialEasing:f.animationOptions.specialEasing})}else{a.css(h)}for(i=0;i<d;i++){e.colY[g+i]=c[g]+a.outerHeight(true)}};function masonrySetup(a,b,c){getBricks(c,b);if(b.columnWidth==undefined){c.colW=c.masoned?a.data('masonry').colW:c.$bricks.outerWidth(true)}else{c.colW=b.columnWidth}c.colCount=Math.floor(a.width()/c.colW);c.colCount=Math.max(c.colCount,1)};function masonryArrange(e,f,g){if(!g.masoned)e.css('position','relative');if(!g.masoned||f.appendedContent!=undefined){g.$bricks.css('position','absolute')}var h=$('<div />');e.prepend(h);g.posTop=Math.round(h.position().top);g.posLeft=Math.round(h.position().left);h.remove();if(g.masoned&&f.appendedContent!=undefined){g.colY=e.data('masonry').colY;for(i=e.data('masonry').colCount;i<g.colCount;i++){g.colY[i]=g.posTop}}else{g.colY=[];for(i=0;i<g.colCount;i++){g.colY[i]=g.posTop}}if(f.singleMode){g.$bricks.each(function(){var a=$(this);placeBrick(a,g.colCount,g.colY,1,g,f)})}else{g.$bricks.each(function(){var a=$(this);var b=Math.ceil(a.outerWidth(true)/g.colW);b=Math.min(b,g.colCount);if(b==1){placeBrick(a,g.colCount,g.colY,1,g,f)}else{var c=g.colCount+1-b;var d=[0];for(i=0;i<c;i++){d[i]=0;for(j=0;j<b;j++){d[i]=Math.max(d[i],g.colY[i+j])}}placeBrick(a,c,d,b,g,f)}})}g.wallH=0;for(i=0;i<g.colCount;i++){g.wallH=Math.max(g.wallH,g.colY[i])}var k={height:g.wallH-g.posTop};if(g.masoned&&f.animate){e.animate(k,{duration:f.animationOptions.duration,easing:f.animationOptions.easing,complete:f.animationOptions.complete,step:f.animationOptions.step,queue:f.animationOptions.queue,specialEasing:f.animationOptions.specialEasing})}else{e.css(k)}if(!g.masoned)e.addClass('masoned');m.call(g.$bricks);e.data('masonry',g)};function masonryResize(a,b,c){c.masoned=a.data('masonry')!=undefined;var d=a.data('masonry').colCount;masonrySetup(a,b,c);if(c.colCount!=d)masonryArrange(a,b,c)};return this.each(function(){var a=$(this);var b=$.extend({},$.masonry);b.masoned=a.data('masonry')!=undefined;var c=b.masoned?a.data('masonry').options:{};var d=$.extend({},b.defaults,c,l);b.options=d.saveOptions?d:c;m=m||function(){};if(b.masoned&&d.appendedContent!=undefined){d.$brickParent=d.appendedContent}else{d.$brickParent=a}getBricks(b,d);if(b.$bricks.length){masonrySetup(a,d,b);masonryArrange(a,d,b);var e=c.resizeable;if(!e&&d.resizeable){$(window).bind('smartresize.masonry',function(){masonryResize(a,d,b)})}if(e&&!d.resizeable)$(window).unbind('smartresize.masonry')}else{return this}})};$.masonry={defaults:{singleMode:false,columnWidth:undefined,itemSelector:undefined,appendedContent:undefined,saveOptions:true,resizeable:true,animate:false,animationOptions:{}},colW:undefined,colCount:undefined,colY:undefined,wallH:undefined,masoned:undefined,posTop:0,posLeft:0,options:undefined,$bricks:undefined,$brickParent:undefined}})(jQuery);


$(document).ready(function() {
   $("#y_url").change(function() {
   $("#site_url").hide("slow");
   var url=this.value;
     $.post("?", {site_check: url}, function(xml) {
       // format and output result
	   if($("status", xml).text()!="-1"){
		$("#site_url").html($("msg", xml).text());
		$("#site_url").append('<a href="http://85.25.9.83/artviper.php?url='+url+'&q=90&h=180&w=240&sdx=1024&sdy=768&userID=WT_SH_D34AC948" title="Click here to update your thumbnail!" target="_blank"><img style="float:right; width:240px; height:180px; margin:4px;" src="http://85.25.9.83/artviper.php?url='+url+'&q=90&h=180&w=240&sdx=1024&sdy=768&userID=WT_SH_D34AC948" alt="loading preview"/></a> ');
	   }
	   else{
			$("#site_url").html($("msg", xml).text());
	   }
	   $("#site_url").show("slow");
     });
	


	});
	
	$(".site_thumb a").fadeTo("fast", 1.0);
	$(".site_thumb a").hover(function(){
		$(this).fadeTo("fast", 0.5);
		},function(){
		$(this).fadeTo("fast", 1.0);
	});
	
	/* var catList = "";
	 $.post("?", {cat_list: "all"}, function(text) {
		catList = text;
	 });
	 var data=catList.split('|');
	 
	$("#Category").autocomplete(data);*/
	
	$(".site_thumb img").lazyload({
		placeholder : "http://cssbased.com/images/logo.png",
		threshold : 200
	});

$("#linklist1 a").attr("target","blank");
$("div.site_thumb a").attr("target","blank");

jQuery('#cssSites').masonry({ 
			animate: true,
			itemSelector: '.aCssSite'
		});


 });
 
 /* ------------------------------------------------------------------------
	Class: prettyPhoto
	Use: prettyOverlay clone for jQuery
	Author: Stephane Caron (http://www.no-margin-for-errors.com)
	Version: 1.0
------------------------------------------------------------------------- */

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(P).1E(6(){4.1j()});4={g:{\'j\':\'1F\',\'I\':1G},1j:6(){4.o=[];$("a[1d^=\'1H\']").1I(6(){4.o[4.o.1k]=1e;$(1e).Q(\'R\',6(){4.1l(1e);J S})});$(m).1J(6(){4.11()});$(m).1f(6(){4.11();4.1m()})},1l:6(a){4.12=a;1n=$(a).k(\'1d\');1o=/\\[(?:.*)\\]/;1p=1o.1K(1n);4.K=0;4.v=0;4.t=0;4.w=S;1L(i=0;i<4.o.1k;i++){q($(4.o[i]).k(\'1d\').1M(1p)!=-1){4.K++;q(4.K>1)4.w=1N;q($(4.o[i]).k(\'u\')==$(a).k(\'u\')){4.v=4.K;4.t=i}}};4.1q(4.w);$(\'3.5 r.1g\').1O(\'<r>\'+4.v+\'</r>\'+\'/\'+4.K);4.11();$(\'3.5 #T\').L();$(\'.U\').V();4.13()},A:6(){4.t++;4.v++;$(\'3.5 #T\').M(4.g[\'j\'],6(){$(\'.U\').V();4.13()});$(\'3.5 .B\').M(4.g[\'j\']);$(\'3.5 .l\').M(4.g[\'j\'],6(){4.14()})},C:6(){4.t--;4.v--;$(\'3.5 #T\').M(4.g[\'j\'],6(){$(\'.U\').V();4.13()});$(\'3.5 .B\').M(4.g[\'j\']);$(\'3.5 .l\').M(4.g[\'j\'],6(){4.14()})},14:6(){(4.v==4.K)?$(\'3.5 a.A\').L():$(\'3.5 a.A\').V();(4.v==1)?$(\'3.5 a.C\').L():$(\'3.5 a.C\').V();$(\'3.5 r.1g r\').W(4.v);q(4.w){q($(4.o[4.t]).k(\'15\')){$(\'3.5 .D\').W($(4.o[4.t]).k(\'15\'))}16{$(\'3.5 .D\').W(\'\')}}16{q($(4.o[4.t]).k(\'15\')){$(\'3.5 .D\').W($(4.12).k(\'15\'))}16{$(\'3.5 .D\').W(\'\')}}},11:6(){q($(\'3.5\').1P()>0){E a=4.1h();$(\'3.5\').h({\'x\':($(m).7()/2)+a[\'N\']-($(\'3.5\').7()/2),\'y\':($(m).8()/2)+a[\'X\']-($(\'3.5\').8()/2)})}},13:6(){4.14();s=1Q 1R();$(\'3.5 .Y\').h(\'1S\',\'1T\');(4.w)?$(\'3.5 #17\').k(\'Z\',$(4.o[4.t]).k(\'u\')):$(\'3.5 #17\').k(\'Z\',$(4.12).k(\'u\'));s.1U=6(){E a=4.1f(s.8,s.7);s.8=a[\'8\'];s.7=a[\'7\'];1V(\'4.1r(s.8,s.7,\'+a["F"]+\',\'+a["G"]+\',\'+a["1W"]+\')\',1X)};(4.w)?s.Z=$(4.o[4.t]).k(\'u\'):s.Z=$(4.12).k(\'u\')},1r:6(a,b,c,d,e){$(\'3.5 .Y\').1s({\'7\':10},4.g[\'j\']);E f=4.1h();$(\'3.5\').1s({\'x\':f[\'N\']+(($(m).7()/2)-(d/2)),\'y\':(($(m).8()/2)-(c/2)),\'8\':c},4.g[\'j\'],6(){$(\'#17\').k({\'8\':a,\'7\':b});4.1t();$(\'3.5 .B\').7(b).8(a);$(\'3.5 #T\').1i(4.g[\'j\'])})},1t:6(){$(\'.U\').L();q(4.w)$(\'3.5 .B\').1i(4.g[\'j\']);$(\'3.5 .l\').1i(4.g[\'j\'])},1q:6(){1u="<3 9=\'z\'></3>";$(\'1v\').1w(1u);$(\'3.z\').h(\'7\',$(P).7());$(\'.z\').Q(\'R\',6(){4.H()});5=\'<3 9="5"><3 9="x"><3 9="y"></3><3 9="1x"></3><3 9="18"></3></3><3 9="Y"><3 9="U"></3><3 9="B"><a 9="A" u="#">A</a><a 9="C" u="#">C</a></3><3 1y="T"><1Y 1y="17" Z="" /></3><3 9="l 1Z"><a 9="H" u="#">20</a><p 9="D"></p><p 9="1z"><r 9="1g"><r>0</r>/<r 9="21">0</r></r></p></3></3><3 9="19"><3 9="y"></3><3 9="1x"></3><3 9="18"></3></3></3>\';$(\'1v\').1w(5);$(\'.5\').h({\'1A\':0});$(\'a.H\').Q(\'R\',6(){4.H();J S});$(\'.5 .C\').Q(\'R\',6(){4.C();J S});$(\'.5 .A\').Q(\'R\',6(){4.A();J S});$(\'.B\').h({\'O-y\':4.g[\'I\']/2,\'O-18\':4.g[\'I\']/2});q(!4.w){$(\'.B\').L();$(\'.1z\').L()};$(\'3.z\').h(\'1A\',0);$(\'3.z\').1a(4.g[\'j\'],0.22,6(){$(\'3.5\').1a(4.g[\'j\'],1,6(){$(\'3.5\').k(\'23\',\'y:\'+$(\'3.5\').h(\'y\')+\';x:\'+$(\'3.5\').h(\'x\')+\';\')})})},1f:6(a,b){$(\'3.5 .l\').8(a);$(\'3.5 .l p.D\').8(a-n($(\'3.5 a.H\').h(\'8\')));G=n($(\'3.5 .l\').7())+n($(\'3.5 .l\').h(\'O-x\'))+n($(\'3.5 .l\').h(\'O-19\'))+n($(\'3.5 .x\').7())+n($(\'3.5 .19\').7());10=n($(\'3.5 .l\').7())+n($(\'3.5 .l\').h(\'O-x\'))+n($(\'3.5 .l\').h(\'O-19\'));F=n($(\'3.5 .Y\').h("I-y"))+n($(\'3.5 .Y\').h("I-18"))+4.g[\'I\'];E c=a;E d=b;q((F+a)>$(m).8()||(G+b)>$(m).7()){E e=(a+F+1B)/$(m).8();E f=(b+G+1B)/$(m).7();q(f>e){c=1b.1c(a*(1/f));d=1b.1c(b*(1/f))}16{c=1b.1c(a*(1/e));d=1b.1c(b*(1/e))}};G+=d;10+=d;F+=c;$(\'3.5 .l\').8(c);$(\'3.5 .l p.D\').8(c-n($(\'3.5 a.H\').h(\'8\')));J{8:c,7:d,G:G,F:F,10:10}},1m:6(){$(\'3.z\').h({\'7\':$(P).7(),\'8\':$(m).8()})},1h:6(){N=m.24||P.1C.N||0;X=m.25||P.1C.X||0;J{N:N,X:X}},H:6(){$(\'3.5\').1a(4.g[\'j\'],0,6(){$(\'3.z\').1a(4.g[\'j\'],0,6(){$(\'3.z\').1D();$(\'3.5\').1D()})})}}',62,130,'|||div|prettyPhoto|pictureHolder|function|height|width|class|||||||options|css||animationSpeed|attr|details|window|parseFloat|imagesArray||if|span|imgPreloader|arrayPosition|href|setPosition|isSet|top|left|prettyPhotoOverlay|next|hoverContainer|previous|description|var|containerWidth|containerHeight|close|padding|return|setCount|hide|fadeOut|scrollTop|margin|document|bind|click|false|fullResImageContainer|loaderIcon|show|text|scrollLeft|content|src|contentHeight|centerPicture|caller|preload|checkPosition|title|else|fullResImage|right|bottom|fadeTo|Math|round|rel|this|resize|currentText|getScroll|fadeIn|init|length|open|resizeOverlay|theRel|galleryRegExp|theGallery|buildOverlay|showimage|animate|shownav|backgroundDiv|body|append|middle|id|currentTextHolder|opacity|100|documentElement|remove|ready|fast|40|prettyOverlay|each|scroll|exec|for|indexOf|true|html|size|new|Image|overflow|hidden|onload|setTimeout|contentWidth|500|img|clearfix|Close|total|35|style|pageYOffset|pageXOffset'.split('|'),0,{}))
