jQuery.noConflict();
//Mathias Bynens Smooth Scrolling jQuery Plugin v1.1
(function(a){a.fn.smoothScroll=function(c){var b={speed:400};if(c){a.extend(b,c)}a(this).find('a[href*=#]').click(function(e){e.preventDefault();if(location.pathname.replace(/^\//,'')===this.pathname.replace(/^\//,'')&&location.hostname===this.hostname){var d=a(this.hash);if(d.length){a('html, body').animate({scrollTop:d.offset().top},b.speed,function(){location.hash=d.attr('id')})}}});return this}})(jQuery);
//slimbox
(function(w){var E=w(window),u,f,F=-1,n,x,D,v,y,L,r,m=!window.XMLHttpRequest,s=[],l=document.documentElement,k={},t=new Image(),J=new Image(),H,a,g,p,I,d,G,c,A,K;w(function(){w("body").append(w([H=w('<div id="lbOverlay" />')[0],a=w('<div id="lbCenter" />')[0],G=w('<div id="lbBottomContainer" />')[0]]).css("display","none"));g=w('<div id="lbImage" />').appendTo(a).append(p=w('<div style="position: relative;" />').append([I=w('<a id="lbPrevLink" href="#" />').click(B)[0],d=w('<a id="lbNextLink" href="#" />').click(e)[0]])[0])[0];c=w('<div id="lbBottom" />').appendTo(G).append([w('<a id="lbCloseLink" href="#" />').add(H).click(C)[0],A=w('<div id="lbCaption" />')[0],K=w('<div id="lbNumber" />')[0],w('<div style="clear: both;" />')[0]])[0]});w.slimbox=function(O,N,M){u=w.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},M);if(typeof O=="string"){O=[[O,N]];N=0}y=E.scrollTop()+(E.height()/2);L=u.initialWidth;r=u.initialHeight;w(a).css({top:Math.max(0,y-(r/2)),width:L,height:r,marginLeft:-L/2}).show();v=m||(H.currentStyle&&(H.currentStyle.position!="fixed"));if(v){H.style.position="absolute"}w(H).css("opacity",u.overlayOpacity).fadeIn(u.overlayFadeDuration);z();j(1);f=O;u.loop=u.loop&&(f.length>1);return b(N)};w.fn.slimbox=function(M,P,O){P=P||function(Q){return[Q.href,Q.title]};O=O||function(){return true};var N=this;return N.unbind("click").click(function(){var S=this,U=0,T,Q=0,R;T=w.grep(N,function(W,V){return O.call(S,W,V)});for(R=T.length;Q<R;++Q){if(T[Q]==S){U=Q}T[Q]=P(T[Q],Q)}return w.slimbox(T,U,M)})};function z(){var N=E.scrollLeft(),M=E.width();w([a,G]).css("left",N+(M/2));if(v){w(H).css({left:N,top:E.scrollTop(),width:M,height:E.height()})}}function j(M){if(M){w("object").add(m?"select":"embed").each(function(O,P){s[O]=[P,P.style.visibility];P.style.visibility="hidden"})}else{w.each(s,function(O,P){P[0].style.visibility=P[1]});s=[]}var N=M?"bind":"unbind";E[N]("scroll resize",z);w(document)[N]("keydown",o)}function o(O){var N=O.keyCode,M=w.inArray;return(M(N,u.closeKeys)>=0)?C():(M(N,u.nextKeys)>=0)?e():(M(N,u.previousKeys)>=0)?B():false}function B(){return b(x)}function e(){return b(D)}function b(M){if(M>=0){F=M;n=f[F][0];x=(F||(u.loop?f.length:0))-1;D=((F+1)%f.length)||(u.loop?0:-1);q();a.className="lbLoading";k=new Image();k.onload=i;k.src=n}return false}function i(){a.className="";w(g).css({backgroundImage:"url("+n+")",visibility:"hidden",display:""});w(p).width(k.width);w([p,I,d]).height(k.height);w(A).html(f[F][1]||"");w(K).html((((f.length>1)&&u.counterText)||"").replace(/{x}/,F+1).replace(/{y}/,f.length));if(x>=0){t.src=f[x][0]}if(D>=0){J.src=f[D][0]}L=g.offsetWidth;r=g.offsetHeight;var M=Math.max(0,y-(r/2));if(a.offsetHeight!=r){w(a).animate({height:r,top:M},u.resizeDuration,u.resizeEasing)}if(a.offsetWidth!=L){w(a).animate({width:L,marginLeft:-L/2},u.resizeDuration,u.resizeEasing)}w(a).queue(function(){w(G).css({width:L,top:M+r,marginLeft:-L/2,visibility:"hidden",display:""});w(g).css({display:"none",visibility:"",opacity:""}).fadeIn(u.imageFadeDuration,h)})}function h(){if(x>=0){w(I).show()}if(D>=0){w(d).show()}w(c).css("marginTop",-c.offsetHeight).animate({marginTop:0},u.captionAnimationDuration);G.style.visibility=""}function q(){k.onload=null;k.src=t.src=J.src=n;w([a,g,c]).stop(true);w([I,d,g,G]).hide()}function C(){if(F>=0){q();F=x=D=-1;w(a).hide();w(H).stop().fadeOut(u.overlayFadeDuration,j)}return false}})(jQuery);
//tooltips
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}(';(8($){j e={},9,m,B,A=$.2u.2g&&/29\\s(5\\.5|6\\.)/.1M(1H.2t),M=12;$.k={w:12,1h:{Z:25,r:12,1d:19,X:"",G:15,E:15,16:"k"},2s:8(){$.k.w=!$.k.w}};$.N.1v({k:8(a){a=$.1v({},$.k.1h,a);1q(a);g 2.F(8(){$.1j(2,"k",a);2.11=e.3.n("1g");2.13=2.m;$(2).24("m");2.22=""}).21(1e).1U(q).1S(q)},H:A?8(){g 2.F(8(){j b=$(2).n(\'Y\');4(b.1J(/^o\\(["\']?(.*\\.1I)["\']?\\)$/i)){b=1F.$1;$(2).n({\'Y\':\'1D\',\'1B\':"2r:2q.2m.2l(2j=19, 2i=2h, 1p=\'"+b+"\')"}).F(8(){j a=$(2).n(\'1o\');4(a!=\'2f\'&&a!=\'1u\')$(2).n(\'1o\',\'1u\')})}})}:8(){g 2},1l:A?8(){g 2.F(8(){$(2).n({\'1B\':\'\',Y:\'\'})})}:8(){g 2},1x:8(){g 2.F(8(){$(2)[$(2).D()?"l":"q"]()})},o:8(){g 2.1k(\'28\')||2.1k(\'1p\')}});8 1q(a){4(e.3)g;e.3=$(\'<t 16="\'+a.16+\'"><10></10><t 1i="f"></t><t 1i="o"></t></t>\').27(K.f).q();4($.N.L)e.3.L();e.m=$(\'10\',e.3);e.f=$(\'t.f\',e.3);e.o=$(\'t.o\',e.3)}8 7(a){g $.1j(a,"k")}8 1f(a){4(7(2).Z)B=26(l,7(2).Z);p l();M=!!7(2).M;$(K.f).23(\'W\',u);u(a)}8 1e(){4($.k.w||2==9||(!2.13&&!7(2).U))g;9=2;m=2.13;4(7(2).U){e.m.q();j a=7(2).U.1Z(2);4(a.1Y||a.1V){e.f.1c().T(a)}p{e.f.D(a)}e.f.l()}p 4(7(2).18){j b=m.1T(7(2).18);e.m.D(b.1R()).l();e.f.1c();1Q(j i=0,R;(R=b[i]);i++){4(i>0)e.f.T("<1P/>");e.f.T(R)}e.f.1x()}p{e.m.D(m).l();e.f.q()}4(7(2).1d&&$(2).o())e.o.D($(2).o().1O(\'1N://\',\'\')).l();p e.o.q();e.3.P(7(2).X);4(7(2).H)e.3.H();1f.1L(2,1K)}8 l(){B=S;4((!A||!$.N.L)&&7(9).r){4(e.3.I(":17"))e.3.Q().l().O(7(9).r,9.11);p e.3.I(\':1a\')?e.3.O(7(9).r,9.11):e.3.1G(7(9).r)}p{e.3.l()}u()}8 u(c){4($.k.w)g;4(c&&c.1W.1X=="1E"){g}4(!M&&e.3.I(":1a")){$(K.f).1b(\'W\',u)}4(9==S){$(K.f).1b(\'W\',u);g}e.3.V("z-14").V("z-1A");j b=e.3[0].1z;j a=e.3[0].1y;4(c){b=c.2o+7(9).E;a=c.2n+7(9).G;j d=\'1w\';4(7(9).2k){d=$(C).1r()-b;b=\'1w\'}e.3.n({E:b,14:d,G:a})}j v=z(),h=e.3[0];4(v.x+v.1s<h.1z+h.1n){b-=h.1n+20+7(9).E;e.3.n({E:b+\'1C\'}).P("z-14")}4(v.y+v.1t<h.1y+h.1m){a-=h.1m+20+7(9).G;e.3.n({G:a+\'1C\'}).P("z-1A")}}8 z(){g{x:$(C).2e(),y:$(C).2d(),1s:$(C).1r(),1t:$(C).2p()}}8 q(a){4($.k.w)g;4(B)2c(B);9=S;j b=7(2);8 J(){e.3.V(b.X).q().n("1g","")}4((!A||!$.N.L)&&b.r){4(e.3.I(\':17\'))e.3.Q().O(b.r,0,J);p e.3.Q().2b(b.r,J)}p J();4(7(2).H)e.3.1l()}})(2a);',62,155,'||this|parent|if|||settings|function|current||||||body|return|||var|tooltip|show|title|css|url|else|hide|fade||div|update||blocked|||viewport|IE|tID|window|html|left|each|top|fixPNG|is|complete|document|bgiframe|track|fn|fadeTo|addClass|stop|part|null|append|bodyHandler|removeClass|mousemove|extraClass|backgroundImage|delay|h3|tOpacity|false|tooltipText|right||id|animated|showBody|true|visible|unbind|empty|showURL|save|handle|opacity|defaults|class|data|attr|unfixPNG|offsetHeight|offsetWidth|position|src|createHelper|width|cx|cy|relative|extend|auto|hideWhenEmpty|offsetTop|offsetLeft|bottom|filter|px|none|OPTION|RegExp|fadeIn|navigator|png|match|arguments|apply|test|http|replace|br|for|shift|click|split|mouseout|jquery|target|tagName|nodeType|call||mouseover|alt|bind|removeAttr|200|setTimeout|appendTo|href|MSIE|jQuery|fadeOut|clearTimeout|scrollTop|scrollLeft|absolute|msie|crop|sizingMethod|enabled|positionLeft|AlphaImageLoader|Microsoft|pageY|pageX|height|DXImageTransform|progid|block|userAgent|browser'.split('|'),0,{}));
//oembed
(function(d){d.fn.oembed=function(g,f,h){f=d.extend(true,d.fn.oembed.defaults,f);return this.each(function(){var i=d(this),j=(g!=null)?g:i.attr("href"),k;if(!h){h=function(m,l){d.fn.oembed.insertCode(m,f.embedMethod,l)}}if(j!=null){k=e(j);if(k!=null){k.params=c(f[k.name])||{};k.maxWidth=f.maxWidth;k.maxHeight=f.maxHeight;k.embedCode(i,j,h);return}}h(i,null)})};d.fn.oembed.defaults={maxWidth:null,maxHeight:null,embedMethod:"replace"};d.fn.oembed.insertCode=function(g,h,f){if(f==null){return}switch(h){case"auto":if(g.attr("href")!=null){d.fn.oembed.insertCode(g,"append",f)}else{d.fn.oembed.insertCode(g,"replace",f)}break;case"replace":g.replaceWith(f.code);break;case"fill":g.html(f.code);break;case"append":var i=g.next();if(i==null||!i.hasClass("oembed-container")){i=g.after('<div class="oembed-container"></div>').next(".oembed-container");if(f!=null&&f.provider_name!=null){i.toggleClass("oembed-container-"+f.provider_name)}}i.html(f.code);break}};d.fn.oembed.getPhotoCode=function(f,h){var i=h.title?h.title:"";i+=h.author_name?" - "+h.author_name:"";i+=h.provider_name?" - "+h.provider_name:"";var g='<div><a href="'+f+'" target="_blank"><img src="'+h.url+'" alt="'+i+'"/></a></div>';if(h.html){g+="<div>"+h.html+"</div>"}return g};d.fn.oembed.getVideoCode=function(f,h){var g=h.html;return g};d.fn.oembed.getRichCode=function(f,h){var g=h.html;return g};d.fn.oembed.getGenericCode=function(f,h){var i=(h.title!=null)?h.title:f,g='<a href="'+f+'">'+i+"</a>";if(h.html){g+="<div>"+h.html+"</div>"}return g};d.fn.oembed.isAvailable=function(f){var g=e(f);return(g!=null)};function e(f){for(var g=0;g<b.length;g++){if(b[g].matches(f)){return b[g]}}return null}function c(h){if(h==null){return null}var g={};for(var f in h){if(f!=null){g[f.toLowerCase()]=h[f]}}return g}var b=[new a("fivemin","5min.com"),new a("amazon","amazon.com"),new a("flickr","flickr","http://flickr.com/services/oembed","jsoncallback"),new a("googlevideo","video.google."),new a("hulu","hulu.com"),new a("imdb","imdb.com"),new a("metacafe","metacafe.com"),new a("qik","qik.com"),new a("revision3","revision3.com"),new a("slideshare","slideshare.net"),new a("twitpic","twitpic.com"),new a("viddler","viddler.com"),new a("vimeo","vimeo.com","http://vimeo.com/api/oembed.json"),new a("wikipedia","wikipedia.org"),new a("wordpress","wordpress.com"),new a("youtube","youtube.com"),new a("vids.myspace.com","vids.myspace.com","http://vids.myspace.com/index.cfm?fuseaction=oembed"),new a("screenr","screenr.com","http://screenr.com/api/oembed.json")];function a(f,g,i,h){this.name=f;this.urlPattern=g;this.oEmbedUrl=(i!=null)?i:"http://oohembed.com/oohembed/";this.callbackparameter=(h!=null)?h:"callback";this.maxWidth=500;this.maxHeight=400;this.matches=function(j){return j.indexOf(this.urlPattern)>=0};this.getRequestUrl=function(m){var k=this.oEmbedUrl;if(k.indexOf("?")<=0){k=k+"?"}else{k=k+"&"}var j="";if(this.maxWidth!=null&&this.params.maxwidth==null){this.params.maxwidth=this.maxWidth}if(this.maxHeight!=null&&this.params.maxheight==null){this.params.maxheight=this.maxHeight}for(var l in this.params){if(l==this.callbackparameter){continue}if(this.params[l]!=null){j+="&"+escape(l)+"="+this.params[l]}}k+="format=json&url="+escape(m)+j+"&"+this.callbackparameter+"=?";return k};this.embedCode=function(j,l,m){var k=this.getRequestUrl(l);d.getJSON(k,function(q){var n=d.extend(q);var p,o=q.type;switch(o){case"photo":n.code=d.fn.oembed.getPhotoCode(l,q);break;case"video":n.code=d.fn.oembed.getVideoCode(l,q);break;case"rich":n.code=d.fn.oembed.getRichCode(l,q);break;default:n.code=d.fn.oembed.getGenericCode(l,q);break}m(j,n)})}}})(jQuery);
//calls
jQuery(document).ready(function($){
    $('html').smoothScroll(); 
    $(".oembed").oembed();
	$(".atags")
		.fadeTo("fast", 0.5)
		.hover(function(){  $(this).fadeTo("fast", 1.0); },function(){  $(this).fadeTo("fast", 0.5); });	
    $("a[rel^='lightbox']").slimbox();
    $(".social").each(function(){
		var aurl=$(this).parent().find('.title a').attr('href'); 
		$(this).parent().find('.header').append('<span class="ifb2"><fb:like href="'+aurl+'" layout="button_count" show_faces="false" font="tahoma"></fb:like></span>'); 
	});
	$('#commentarea').show(); 
    $('#commentoggle')
		.show()
		.click(function(){ $('#commentarea').toggle();});
    $(".imgport ul li")
		.fadeTo("fast", 0.4)
		.hover(function(){  $(this).fadeTo("fast", 1.0); },function(){  $(this).fadeTo("fast", 0.4); })
		.tooltip({track: true,delay: 0,showURL: false,fixPNG: true, bodyHandler: function() {return $(this).find('img').attr("alt");},});
});
/*FB*/
window.fbAsyncInit = function(){FB.init({appId: '166683204074', status: true, cookie: true, xfbml: true}); };
(function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
}());
