/*
 adaacommunity: Version 0.0.1
 api_ax_hovering: Version 0.0.3
 api_ax_mediaQuery: Version 0.0.2
 api_ax_url: Version 0.0.1
 G8_Searchfields_ax: Version 0.0.3
 api_plug_throttle_debounce 1.1
*/
(function(){window.G8=window.G8||{};this.ax_jqxtnd=G8.ax_jqxtnd;this.dbg=ax_jqxtnd.dbg;this.mD=ax_jqxtnd.makeDiv;this.prxy=ax_jqxtnd.prxy;var la=function h(){function a(d){var e=$(d.target);d=d.data.callback;d(e)}function c(d,e){$(document).bind(d,{callback:e},a)}return{addListener:c}}(),va=function h(){function a(){if(!T){B(true);L();ga();S();c();e();J();n();T=true;s()}}function c(){$("#quicklink_currYear").bindOnce("click",{mode:"currYear"},i);$("#quicklink_winners").bindOnce("click",{mode:"winners"},
i);$("#quicklink_yearbooks").bindOnce("click",{mode:"yearbooks"},i)}function d(){$("#quicklink_currYear,#quicklink_winners,#quicklink_yearbooks").imgSetLo()}function e(){}function i(b){var g=b.data.mode;w="quicklink_"+g;g=="currYear"?$("#quicklink_currYear").imgSetAct():$("#quicklink_currYear").imgSetLo();g=="winners"?$("#quicklink_winners").imgSetAct():$("#quicklink_winners").imgSetLo();g=="yearbooks"?$("#quicklink_yearbooks").imgSetAct():$("#quicklink_yearbooks").imgSetLo();b=q;var j=[];$.each(b,
function(t,r){t=r;r=false;if(g=="currYear"){if(t.year.hasStr(String(y)))r=true}else if(g=="winners"){if(t.isWinner)r=true}else if(g=="yearbooks")if(t.isYearbook)r=true;r&&j.push(t)});var k;if(g=="winners"){var m=[];$.each(j,function(t,r){r.year==y&&m.push(r)});if(m.length){k=m[Math.floor(m.length/2)].id;k=Y(j,k)}}Z(j,k);G(j);k={};aa(j,k);$("#paneFiltersInner .filterBox").each(function(){var t=$(this);t.trigger("clearFilter")});$("#fieldFreeSearch").trigger("clearFilter");D()}function n(){o();$("input,select").bindOnce("focus, click",
l).bindOnce("blur",o)}function o(){ha.enableKeyControls()}function l(){ha.disableKeyControls()}function s(){ta.initMediaQuery({maxHeight:750,cssClass:"mediaQuery_smallHeight"})}function B(b){if(b){b=$("#adaaworldPreloader");b.length||(b=$(mD({id:"adaaworldPreloader"},'<img src="'+G8.gallery.staticRessourcePathPrefix+'style/img/preloader.gif">')).appendTo("body"));b.setPosTo($(window),"CENTERX","CENTERY").fadeInXB(300)}else $("#adaaworldPreloader").fadeOutXB(300)}function z(){function b(p,u){return p.year-
u.year}function g(p,u){return t[p.category]-t[u.category]}function j(p,u){return p.winner-u.winner}function k(p,u){aTitle=p.title;bTitle=u.title;if(aTitle==bTitle){p.isGroupMember=true;u.isGroupMember=true}return aTitle==bTitle?0:aTitle>bTitle?1:-1}function m(p){return p.isYearbook?-1:1}var t={};t["0"]=0;$.each(x,function(p,u){$.each(u,function(E){t[E]=Math.random()})});var r=q;r.sort(b);r=M(r,"year");$.each(r,function(p,u){u=u;r[p].sort(g);r[p]=M(u,"category");$.each(r[p],function(E,F){F=F;var oa=
r[p][E][0].category==0;if(oa)r[p][E].sort(m);else{r[p][E].sort(j);r[p][E]=M(F,"winner");$.each(r[p][E],function(ia){r[p][E][ia].sort(k)})}})});q=U(r)}function M(b,g){var j=[];j.push([]);var k=j[j.length-1],m;$.each(b,function(t,r){t=r[g];if(m===undefined)m=t;if(t!=m){m=t;j.push([]);k=j[j.length-1]}k.push(r)});return j}function U(b,g){var j=g?g:[];$.each(b,function(k,m){if($.isArray(m))j=U(m,j);else j.push(m)});return j}function N(b){if(!b||b==""){dbg("ERROR: ajax return empty. data:",b);return false}else{b=
v(b);if(!b.AUTHED||b.AUTHED==0)dbg("ERROR: ajax authed=0 or not set. json:",b);return b}}function J(){$.post(V,{action:26,complete:true},function(b){b=N(b);q=[];b.USERS&&b.USERS.users&&$.each(b.USERS.users,function(k,m){k=ma(m);k.type==1&&k.id!=1&&k.offline!=1&&q.push(k)});z();var g,j=pa.getQueryVal("showYear");if(j){w="yearOnly";g=[];$.each(q,function(k,m){m.year==j&&g.push(m)});W(g)}else $.post(V,{action:61},function(k){k=N(k);var m=k.VAR&&k.VAR.hilightedId?k.VAR.hilightedId:false;if(k=k.VAR&&k.VAR.searchResultIds?
k.VAR.searchResultIds:false){k=k;g=[];$.each(k,function(E,F){$.each(q,function(oa,ia){F==ia.id&&g.push(ia)})});if(m&&g.length){var t=false;$.each(k,function(E,F){if(m==F){t=true;return false}});t||(g=q)}g.length||(g=q);if(g.length<q.length)w="subset"}else g=q;var r;if(m){r=m;r=Y(g,r)}else{var p=0,u;$.each(g,function(E,F){if(F.year>p){p=F.year;u=[]}u&&F.year==p&&u.push(E)});if(u.length)r=u[Math.floor(u.length/2)]}W(g,r)})})}function Y(b,g){var j;$.each(b,function(k,m){if(m.id==g){j=k;return false}});
return j}function ja(){w="normal"}function W(b,g){B(false);Z(b,g);aa(b);ba(false);G(b)}function ma(b){b=b||{};var g={id:b[0],url:b[1],name:String(ax_jqxtnd.unescapeHtml(b[2])),imgId:b[3],lastUpdated:b[4],UPState:b[5],fState:b[6],contentImgStack:b[9],winner:b[10],year:b[11],category:b[12],realname:String(b[13]),school:b[14],country:String(b[15]),title:String(ax_jqxtnd.unescapeHtml(b[16])),type:String(b[17]),additional:String(b[18]),offline:b[19],isYearbook:b[2].toLowerCase().indexOf("yearbook")!=-1,
isWinner:b[10]==1||b[10]==3||b[10]==5,img:"http://www.adaagallery.com/script.php?action=8&showimg="+b[3]+"&type=normal",link:"http://"+b[1],winnerStr:O(b[10])?String(O(b[10])):"",categoryStr:P(b[12])?String(P(b[12])):"",countryStr:Q(b[15])?String(Q(b[15])):"",schoolStr:K(b[14])?String(K(b[14])):""};if(b[18])b[18]=b[18].replace(/&#38;/g,"&");b=b[18]&&b[18].indexOf("{")!=-1?v(b[18]):{};if(b.submissionImgs){if(b.submissionImgs.length>0)g.submissionImg1=b.submissionImgs[0];if(b.submissionImgs.length>
1)g.submissionImg2=b.submissionImgs[1];if(b.submissionImgs.length>2)g.submissionImg3=b.submissionImgs[2]}if(b.venue)g.venue=b.venue;return g}function Z(b,g){ha.showCoverflowedData(b,g)}function na(b){b.preventDefault();ja();d();b=Y(q,ha.getCurrentUserId());W(q,b)}function aa(b,g){if(!$("#frmResults").find("#lineShowAll").length){var j=$(mD({id:"lineShowAll"},'<a href="" id="linkShowAll">show all</a>'));j.find("#linkShowAll").bind("click",na);$("#frmResults").find("#lineDisplayingResults").after(j)}b=
b.length;j="";if(g){if(g.country)j+=(j.length?" / ":"")+g.country;if(g.school)j+=(j.length?" / ":"")+g.school;if(g.category)j+=(j.length?" / ":"")+g.category;if(g.year){j+=j.length?" / ":"";if(g.year.length==1)j+=g.year[0];else{j+=g.year[0]+", "+g.year[1];if(g.year.length>2)j+="..."}}}g=b+" all-time finalists";if(w=="quicklink_currYear")g=b+" finalists "+y;else if(w=="quicklink_winners")g=b+" all-time winners";else if(w=="quicklink_yearbooks")g=b+" yearbooks";else if(w=="yearOnly")g=b+" finalists "+
pa.getQueryVal("showYear");else if(b<q.length){g=b==1?" search result":" search results";g=b+g}$("#frmResults").find("#lineTotalResults").html(g).end().find("#lineDisplayingResults").html("filtering: "+j).end();$("#frmResults").find("#linkShowAll").tgl(w.hasStr("yearOnly","subset","quicklink_currYear","quicklink_winners","quicklink_yearbooks"))}function ba(b){var g=ca();$("#lineDisplayingResults").tgl(b&&g)}function ca(){return $(".filterBox").filter(function(){return $(this).data("filterActive")}).length}
function v(b){try{return eval("("+b+")")}catch(g){dbg("ERROR: malformed json string",b);return{}}}function L(){$(".js_filterCountry").find(".selectPlaceholder").after('<select name="country"></select>').remove();var b=$(".js_filterCountry").find("select");b.append($('<option class="optionAll"></option>').val("").html("All countries"));$.each(qa,function(k,m){k=k;m=m;b.append($("<option></option>").val(k).html(m))});$(".js_filterSchool").find(".selectPlaceholder").after('<select name="school"></select>').remove();
var g=$(".js_filterSchool").find("select");g.append($('<option class="optionAll"></option>').val("").html("All schools"));$.each(ra,function(k,m){k=k;m=m;g.append($("<option></option>").val(k).html(m))});$(".js_filterCategory").find(".selectPlaceholder").after('<select name="category"></select>').remove();var j=$(".js_filterCategory").find("select");j.append($('<option class="optionAll"></option>').val("").html("All categories"));$.each(R,function(k,m){var t="";k=k;m=m;$.each(m,function(r,p){r=p.ids.join(",");
t+=r+","});t=t.slice(0,-1);j.append($('<option class="superCategory"></option>').val(t).html(k));$.each(m,function(r,p){r=p.ids.join(",");p=p.name;j.append($("<option></option>").val(r).html(p))})});$("#paneFiltersInner .filterBox").each(function(){var k=new sa($(this));A.push(k)})}function ga(){var b=$("#btnTglFilters").attr("alt","show filter options").attr("title","show filter options");b.bind("click",da)}function da(b){var g=$("#paneFilters"),j=$("#btnTglFilters");if(g.is(":hidden")){g.fadeInXB(300);
j.imgSetExp().attr("alt","hide filter options").attr("title","hide filter options");ba(false);b.stopPropagation();$(document).bind("click",ea);$("#frmCoverflow").bind("mousewheel",C)}else{g.fadeOutXB(300);j.imgSetCol().attr("alt","show filter options").attr("title","show filter options");ba(true);b.stopPropagation();$(document).unbind("click",ea);$("#frmCoverflow").unbind("mousewheel",C)}}function ea(b){b=$(b.target);b.isOrIsChildOf($("#paneFilters"))||$("#btnTglFilters").trigger("click")}function C(){$("#btnTglFilters").trigger("click")}
function S(){$("#fieldFreeSearch").bind("changedSearch",$.debounce(f,H)).bind("clearSearch",X).val("")}function H(){var b=$(this);b.inpReadVal();fa()}function X(){$(this);fa()}function I(b){var g=b.find("input[type=checkbox]").length?"checkbox":b.find("select").length?"select":b.find("input[type=text]").length?"text":"",j;if(g=="checkbox")if(b.find("input[type=checkbox]:checked").length==b.find("input[type=checkbox]").length)j=false;else{var k=[];b.find("input[type=checkbox]:checked").each(function(){var m=
$(this);k.push(m.val())});j=k}else if(g=="select"){b=b.find("select");b=b.val();if(b.indexOf(",")!=-1)b=b.split(",");j=b}else if(g=="text"){b=b.find("input[type=text]");j=b=b.inpReadVal();if(j=="")j=false}return j}function Q(b){return qa[b]}function K(b){return ra[b]}function P(b){var g;$.each(x,function(j,k){if(k[b]){g=k[b];return false}});return g}function O(b){return ua[b]}function fa(){ja();d();var b=q,g=I($("#boxFieldFreeSearch")),j=I($(".js_filterCategory")),k=I($(".js_filterCountry")),m=I($(".js_filterYear")),
t=I($(".js_filterSchool")),r=[];$.each(b,function(p,u){p=u;u=false;if(g){if(p.name.hasStr(g)||p.title.hasStr(g)||p.categoryStr.hasStr(g)||p.schoolStr.hasStr(g)||p.countryStr.hasStr(g)||p.year.hasStr(g)||p.link.hasStr(g))u=true}else u=true;if(j)p.category.hasStrExact(j)||(u=false);if(k)p.country.hasStrExact(k)||(u=false);if(t)p.school.hasStrExact(t)||(u=false);if(m)p.year.hasStr(m)||(u=false);u&&r.push(p)});Z(r);G(r);b={};if(j)b.category=$(".js_filterCategory").find("select").find("option:selected").html();
if(k)b.country=Q(k);if(t)b.school=K(t);if(m)b.year=m;aa(r,b);D()}function D(){var b=$("#btnTglFilters");ca()?b.switchSrc("_nofilter","_filtered"):b.switchSrc("_filtered","_nofilter")}function G(b,g){var j={action:60,key:"searchResultIds"};$.each(b,function(k,m){j["var["+k+"]"]=m.id});$.post(V,j,function(k){N(k);g&&g()})}var V=location.href.hasStr("localhost","das-labor.net")?"scriptworld.php":"http://www.adaagallery.com/scriptworld.php",T=false,f=500,q,A=[],y=2011,w="normal",x={"Traditional media categories":{1:"Print",
2:"Print Design",3:"Print Design Multi-Page",4:"Print Design Single-Page",5:"Print Communications",17:"Print Communications - Single-Page",18:"Print Communications - Multi-Page",6:"Print Collaboration",7:"Print Media",8:"Photography",9:"Digital Photography",10:"Digital Photography / Imaging",11:"Illustration",12:"Digital Illustration",13:"Environmental Graphics",14:"Packaging",15:"Environmental Graphics and Packaging",16:"Self-Expression",19:"Innovation in Traditional Media in Education"},"Video and Motion categories":{101:"Video",
102:"Animation",103:"Live Action",104:"Motion Graphics",105:"Experimental Design",106:"Broadcast Design",109:"Innovation in Motion and Video in Education"},"Interactive media categories":{201:"Interactive Design",202:"Web Design",203:"Web",204:"Interactive and Web Design",205:"Designer/Developer Collaboration",206:"Digital Media",207:"Time-Based Media",208:"Browser Based Design",209:"Non-Browser Based Design",210:"Application Development",211:"Installation Design",212:"Mobile Design",108:"Game Design",
107:"Innovation in Interactive Media in Education"}},R={"Traditional media categories":[{name:"Print Communications",ids:[1,2,3,4,5,6,7,17,18]},{name:"Photography",ids:[8,9,10]},{name:"Illustration",ids:[11,12]},{name:"Environmental Graphics and Packaging",ids:[13,14,15]},{name:"Self-Expression",ids:[16]},{name:"Innovation in Traditional Media in Education",ids:[19]}],"Video and Motion categories":[{name:"Video",ids:[101]},{name:"Animation",ids:[102]},{name:"Live Action",ids:[103]},{name:"Motion Graphics",
ids:[104]},{name:"Experimental Design",ids:[105]},{name:"Broadcast Design",ids:[106]},{name:"Innovation in Motion and Video in Education",ids:[109]}],"Interactive media categories":[{name:"Interactive and Web Design",ids:[201,202,203,204]},{name:"Designer/Developer Collaboration",ids:[205]},{name:"Digital Media",ids:[206]},{name:"Time-Based Media",ids:[207]},{name:"Browser Based Design",ids:[208]},{name:"Non-Browser Based Design",ids:[209]},{name:"Application Development",ids:[210]},{name:"Installation Design",
ids:[211]},{name:"Mobile Design",ids:[212]},{name:"Game Design and Development",ids:[108]},{name:"Innovation in Interactive Media in Education",ids:[107]}]},qa={14:"Australia",1:"Canada",15:"China",2:"France",3:"Germany",16:"Hong Kong",4:"Italy",13:"Japan",5:"Korea",6:"Portugal",7:"Spain",8:"Sweden",9:"Switzerland",10:"Taiwan",11:"United Kingdom",12:"United States",13:"Russia",14:"China"},ua={1:"Winner",2:"Finalist",3:"Winner Most Creative",4:"Finalist Most Creative",5:"Winner Most Professional",
6:"Finalist Most Professional"},ra={2:"Academy of Art and Design Offenbach am Main",3:"Academy of Art College",4:"Academy of Art University",6:"Anhalt University of Applied Sciences",7:"Art Center College of Design",8:"Atlanta College of Art",10:"BAU, Escola Superior de Disseny",11:"Braunschweig University of Art",12:"Brigham Young University",120:"British Higher School of Art and Design",13:"California College of Arts and Crafts",14:"California Institute of the Arts",15:"Carnegie Mellon University",
16:"Central Saint Martins College of Art and Design",125:"City University of Hong Kong, School of Creative Media",18:"College of Design, Kook-min University",124:"College for Creative Studies",20:"Columbia College Chicago",22:"Coventry U. School of Art & Design",115:"Dankook",24:"Dortmund University of Applied Science and Arts",25:"Drexel University",26:"Duke University",126:"East Tennessee State University",27:"Ecole Intuit/lab",31:"Ewha Womans University and Chung-ang University",128:"Fachhochschule Potsdam",
33:"Fachhochschule W\u00fcrzburg-Schweinfurt",34:"FH Dortmund",35:"FH Mainz, University of Applied Sciences",36:"Filmakademie Baden-W\u00fcrttemberg",37:"Fort Hays State University",39:"Full Sail University",40:"George Brown College",42:"Gobelins",44:"Hamburg University of Applied Sciences",111:"Hamburger Technische Kunstschule",45:"HDK School of Design and Crafts at G\u00f6teborg University",46:"Hongik University",47:"Indiana University",49:"Iuav University of Venice",51:"Keimyung university",52:"Kendall College of Art and Design",
53:"Kingston University",54:"Kookmin University",55:"Kutztown University",110:"L\u2019\u00c9cole de design Nantes Atlantique",56:"London College of Communication",58:"Maryland Institute College of Art",59:"Massachusetts College of Art",60:"Mingchi University of Technology",61:"Minneapolis College of Art and Design",130:"Moore College of Art and Design",62:"New York University",112:"North Carolina State University",118:"Ohio University",123:"Ontario College of Art and Design University",65:"Parsons The New School for Design",
66:"Pratt Institute",68:"Rhode Island School of Design",69:"Ringling School of Art and Design",71:"Rochester Institute of Technology",72:"Royal College of Art",74:"San Jose State University",75:"Savannah College of Art and Design",76:"School for Applied Sciences \u2014 Aachen, Germany",77:"School of the Art Institute of Chicago",78:"School of Visual Arts",79:"Seoul National University",114:"Swinburne University",81:"Tama Art University",129:"Temple University",84:"The Massachusetts College of Art and Design",
85:"Tyler School of Art, Temple University",86:"UCLA School of Arts and Architecture",127:"Umea Institute of Design, Umea University, Sweden",87:"Universidade de Coimbra",117:"Universit\u00e9 du Qu\u00e9bec \u00e0 Montr\u00e9al",89:"Universit\u00e9 Marc Bloch",90:"University of Applied Sciences Augsburg",91:"University of Applied Sciences Schw\u00e4bisch Gm\u00fcnd",93:"University of California Los Angeles",95:"University of Illinois at Chicago",122:"University of Louisiana",113:"University of North Texas",
96:"University of Notre Dame",98:"University of Stuttgart",99:"University of the Applied Sciences and Arts in Zurich",101:"University of Washington",119:"University of Southern California",102:"University of Wisconsin, Madison",103:"University of Wisconsin-Stout",106:"Vancouver Film School",108:"Yale University School of Art",131:"York University",109:"York University/Sheridan College"};la.addListener("domChange",a);return{doFiltering:fa}}();(function h(){function a(o){$Self("img[src*='_lo.'],img[src*='_hi.'],img[src*='_act.']",
o).bindOnce("mouseenter",d).bindOnce("mouseleave",e).each(function(){c($(this).attr("src"))});$Self(".js_remoteHoverBox",o).bind("mouseenter",i).bind("mouseleave",n)}function c(o){var l=/_(lo|hi|act)\./;o=[o.replace(l,"_lo."),o.replace(l,"_hi.")];$.each(o,function(s,B){$("<img />").one("load",function(){$(this).remove()}).attr("src",B)})}function d(){var o=$(this);o.imgFilterNonAct().imgSetHi()}function e(){var o=$(this);o.imgFilterNonAct().imgSetLo()}function i(){var o=$(this);o=o.find(".js_remoteHoverImg");
o.imgFilterNonAct().imgSetHi()}function n(){var o=$(this);o=o.find(".js_remoteHoverImg");o.imgFilterNonAct().imgSetLo()}la.addListener("domChange hoverInit",a);return{}})();var ta=function h(){function a(l){var s=(new Date).getTime(),B=$('<div class="testMediaQuery'+s+'"></div>').css({visibility:"hidden",position:"absolute"}).appendTo("body"),z=document.createElement("style");z.setAttribute("type","text/css");z.setAttribute("media",l);z=$(z).prependTo("head");styleS=document.styleSheets[0];if(styleS.cssRules&&
!styleS.cssRules.length||styleS.rules&&!styleS.rules.length)if(styleS.insertRule)styleS.insertRule(".testMediaQuery"+s+" {display:none !important;}",styleS.cssRules.length);else styleS.addRule&&styleS.addRule(".testMediaQuery"+s,"display:none");l=B.css("display")==="none";B.remove();z.remove();return l}function c(){return a("only all")}function d(l){if(n==undefined)n=c();if(!n){o=l;$(window).bind("resize",$.throttle(300,e));i()}}function e(){i()}function i(){var l=o,s=$(window).height(),B=$(window).width(),
z=true;if(l.maxHeight&&s>l.maxHeight)z=false;if(l.minHeight&&s<l.minHeight)z=false;if(l.maxWidth&&B>l.maxWidth)z=false;if(l.minWidth&&B<l.minWidth)z=false;$("body").tglClass(l.cssClass,z)}var n,o;return{initMediaQuery:d}}(),pa=function h(){function a(i){var n=document.createElement("a");n.href=i;return i=n.href}function c(i){i=i.match(/[^>]*(?=<\/title>)/);document.title=i}function d(i){var n=window.location.search.substring(1);n=n.split("&");var o;$.each(n,function(l,s){l=s.split("=");if(l[0]==i){o=
l.length>1?l[1]:"";return false}});return o}function e(i){var n=i.substring(i.lastIndexOf("/")+1),o=location.href.replace(location.hash,"");o=o.substring(0,o.lastIndexOf("/")+1);i=i.replace(o,"");return{filename:n,currBasePath:o,relativePath:i}}return{qualifyUri:a,changeTitle:c,getQueryVal:d,parseUrl:e}}();(function h(){function a(){$(".js_textSearchField").each(function(){var l=$(this);if(!l.parent().find(".js_textSearchBtnClrSearch").length){var s=$('<img src="'+o.btnImgPath+'" class="js_textSearchBtnClrSearch js_iActObj" alt="'+
o.btnAltText+'" title="'+o.btnAltText+'" />').data("textsearchField",l).hide().trigger("hoverInit").bind("click",n);l.data("textsearchBtn",s).parent().append(s);l.bind("focus",d).bind("blur",e).bind("clearFilter",c)}})}function c(){var l=$(this),s=l.data("textsearchBtn");l.val("");s.hide()}function d(){var l=$(this);l.bind("keyup",i)}function e(){var l=$(this);l.unbind("keyup",i)}function i(){var l=$(this),s=l.data("textsearchBtn");l.val(l.inpReadVal());s.tgl(l.val()!="");l.trigger("changedSearch")}
function n(){var l=$(this),s=l.data("textsearchField");s.val("");l.hide();s.trigger("clearSearch")}var o={btnAltText:"clear search",btnImgPath:G8.gallery.staticRessourcePathPrefix+"style/img/btn_clear_search_lo.png"};la.addListener("domChange",a);return{}})();(function(h,a){var c=h.jQuery||h.Cowboy||(h.Cowboy={}),d;c.throttle=d=function(e,i,n,o){function l(){function z(){B=+new Date;n.apply(U,J)}function M(){s=a}var U=this,N=+new Date-B,J=arguments;o&&!s&&z();s&&clearTimeout(s);if(o===a&&N>e)z();
else if(i!==true)s=setTimeout(o?M:z,o===a?e-N:e)}var s,B=0;if(typeof i!=="boolean"){o=n;n=i;i=a}if(c.guid)l.guid=n.guid=n.guid||c.guid++;return l};c.debounce=function(e,i,n){return n===a?d(e,i,false):d(e,n,i!==false)}})(this);var ha=function h(){function a(f,q){T||c();fa=0;C=false;X.empty();I.stopp().hide();K.add(P).add(O).stopp().hide().unbind("load");W();L=f;H=L.length;S=[];if(f.length){G.tgl(f.length>1);D.bindOnce("mousewheel",$.throttle(v.mousewheelSkipTime,d));D.bindOnce("mousewheel",e);f=q!==
undefined&&q>=0&&q<H?q:Math.floor(H/2);ga=X.width();ea=270;da=252;J(f)}else G.hide()}function c(){T=true;D=$("#frmCoverflow");var f=mD({id:"coverflowStatus"},mD({id:"flowStatus_name_title"},'<span id="flowStatus_name"></span>'," ",'<span id="flowStatus_title"></span>'),mD({id:"flowStatus_winner_category"},'<span id="flowStatus_winner"></span>'," ",'<span id="flowStatus_category"></span>'),mD({id:"flowStatus_school_country_year"}))+mD({id:"coverflowBadgeBox"},mD({id:"itemBadge"}))+mD({id:"coverflowImgBox"})+
mD({id:"coverflowSubmissionImgBox"})+mD({id:"coverflowControls"});D.empty().append(f);X=D.find("#coverflowImgBox");G=D.find("#coverflowControls");I=D.find("#coverflowStatus");_glo_badgeBox=D.find("#coverflowBadgeBox");Q=D.find("#coverflowSubmissionImgBox");$.browser.mozilla&&I.find("#flowStatus_category").addClass("isFF");K=$('<img src="" class="submissionImg clickable" alt="" />').css({display:"inline"}).hide().appendTo(Q).bindOnce("click",s);P=$('<img src="" class="submissionImg clickable" alt="" />').css({display:"inline"}).hide().appendTo(Q).bindOnce("click",
s);O=$('<img src="" class="submissionImg clickable" alt="" />').css({display:"inline"}).hide().appendTo(Q).bindOnce("click",s);G.hide();$('<img src="'+G8.gallery.staticRessourcePathPrefix+'style/img/icon_previtem_lo.png" id="btnCoverflowPrev" class="clickable" />').appendTo(G).bindOnce("click",z);$('<img src="'+G8.gallery.staticRessourcePathPrefix+'style/img/icon_nextitem_lo.png" id="btnCoverflowNext" class="clickable" />').appendTo(G).bindOnce("click",M)}function d(f,q){f.preventDefault();f=C-q;
if(f<0)f=0;if(f>H-1)f=H-1;J(f)}function e(f){f.preventDefault()}function i(f){return C-v.sideDisplayedItems<=f&&f<=C+v.sideDisplayedItems}function n(f){return f="reflect_mod.php?img="+f.replace(/&/g,"%26")}function o(f){S[f]=$('<img src="'+n(L[f].img)+'" class="reflect coverflowItem clickable" alt="" />').css({position:"absolute"}).appendTo(X).bindOnce("click",l).data("imgIndex",f);return S[f]}function l(){var f=$(this);f=f.data("imgIndex");f==C?B(f):J(f)}function s(){B(C)}function B(f){f=L[f].link;
location.href=f}function z(){var f=C-1;if(f<0)f=0;J(f)}function M(){var f=C+1;if(f>H-1)f=H-1;J(f)}function U(f){function q(){$(this);y++;if(y==A){f.submissionImg1&&K.tglFadeIn(v.itemAnimationTime);f.submissionImg2&&P.tglFadeIn(v.itemAnimationTime);f.submissionImg3&&O.tglFadeIn(v.itemAnimationTime)}}var A=0,y=0;f.submissionImg1&&A++;f.submissionImg2&&A++;f.submissionImg3&&A++;f.submissionImg1?K.stopp().hide().unbind("load").bind("load",q).attr("src",n(f.submissionImg1)):K.stopp().hide();f.submissionImg2?
P.stopp().hide().unbind("load").bind("load",q).attr("src",n(f.submissionImg2)):P.stopp().hide();f.submissionImg3?O.stopp().hide().unbind("load").bind("load",q).attr("src",n(f.submissionImg3)):O.stopp().hide()}function N(f){var q=f.name,A=f.title&&f.title!="0"?'"'+f.title.truncate(v.maxTitleLength,"...")+'"':"",y=f.winnerStr;if(f.isGroupMember)y="Group-"+y;var w=f.categoryStr,x="";x+=f.schoolStr?f.schoolStr+" / ":"";x+=f.countryStr?f.countryStr+", ":"";x+=f.year?f.year:"";I.attr("class","statusCategory_"+
f.category).stopp().hide().tglFadeInXB(v.itemAnimationTime).find("#flowStatus_name").html(q).end().find("#flowStatus_title").html(A).end().find("#flowStatus_winner").html(y).end().find("#flowStatus_category").html(w).end().find("#flowStatus_school_country_year").html(x)}function J(f){if(f!==C){C=f;var q=L[f];V=q.id;Y();N(q);U(q);var A=ga/2;$.each(L,function(y){var w=S[y];if(!w&&i(y)){w=o(y);w.css({zIndex:0,bottom:200,height:0,width:0,left:A})}if(w){var x=Z(y,f);w.stopp().css({zIndex:x.zIndex}).animate({height:ea*
x.scale,width:da*x.scale,left:A+x.xPos-da*x.scale/2,bottom:x.bottom},v.itemAnimationTime,"easeOutQuart",function(){if(!i(y)){w.remove();S[y]=null}f==y&&ja(q)})}})}}function Y(){W()}function ja(f){ma(f)}function W(){_glo_badgeBox.stopp().hide()}function ma(f){f.isWinner&&_glo_badgeBox.stopp().hide().tglFadeInXB(v.badgeAnimationTime).attr("class","statusCategory_"+f.category)}function Z(f,q){var A,y,w,x;x=v.sideDisplayedItems;A=H;if(f<q||f>q){var R;if(f<q){R=q-f-1;A=f+1}else{R=f-q-1;A=A-R-1}y=$.easing.easeOutCubic(1,
R,v.minX,v.maxX-v.minX,x);w=$.easing.easeOutCubic(1,x-R-1,v.minScale,v.maxScale-v.minScale,x);x=$.easing.easeOutQuart(1,x-R-1,v.minAlpha,v.maxAlpha-v.minAlpha,x);if(f<q)y*=-1}else{y=0;w=1;A=A;x=1}f=v.origBottomHeight-v.origBottomHeight*w;f+=v.yPerspectivePixels-w*v.yPerspectivePixels;return{xPos:y,scale:w,zIndex:A,alpha:x,bottom:f}}function na(){return V}function aa(){$(document).bindOnce("keydown",$.throttle(v.keySkipTime,ca))}function ba(){$(document).unbind("keydown",ca)}function ca(f){if(T){var q=
f.which;if(q==13)B(C);else if(q==37)z(f);else q==39&&M(f)}}var v={sideDisplayedItems:4,origBottomHeight:70,yPerspectivePixels:100,maxScale:0.8,minScale:0.1,minAlpha:0.2,maxAlpha:0.8,maxX:450,minX:250,itemAnimationTime:700,badgeAnimationTime:250,mousewheelSkipTime:250,keySkipTime:250,maxTitleLength:50},L,ga,da,ea,C,S,H,X,I,Q,K,P,O,fa,D,G,V,T=false;return{showCoverflowedData:a,getCurrentUserId:na,enableKeyControls:aa,disableKeyControls:ba}}();jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,
{def:"easeOutQuad",swing:function(h,a,c,d,e){return jQuery.easing[jQuery.easing.def](h,a,c,d,e)},easeInQuad:function(h,a,c,d,e){return d*(a/=e)*a+c},easeOutQuad:function(h,a,c,d,e){return-d*(a/=e)*(a-2)+c},easeInOutQuad:function(h,a,c,d,e){if((a/=e/2)<1)return d/2*a*a+c;return-d/2*(--a*(a-2)-1)+c},easeInCubic:function(h,a,c,d,e){return d*(a/=e)*a*a+c},easeOutCubic:function(h,a,c,d,e){return d*((a=a/e-1)*a*a+1)+c},easeInOutCubic:function(h,a,c,d,e){if((a/=e/2)<1)return d/2*a*a*a+c;return d/2*((a-=
2)*a*a+2)+c},easeInQuart:function(h,a,c,d,e){return d*(a/=e)*a*a*a+c},easeOutQuart:function(h,a,c,d,e){return-d*((a=a/e-1)*a*a*a-1)+c},easeInOutQuart:function(h,a,c,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+c;return-d/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(h,a,c,d,e){return d*(a/=e)*a*a*a*a+c},easeOutQuint:function(h,a,c,d,e){return d*((a=a/e-1)*a*a*a*a+1)+c},easeInOutQuint:function(h,a,c,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+c;return d/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(h,a,c,d,e){return-d*
Math.cos(a/e*(Math.PI/2))+d+c},easeOutSine:function(h,a,c,d,e){return d*Math.sin(a/e*(Math.PI/2))+c},easeInOutSine:function(h,a,c,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+c},easeInExpo:function(h,a,c,d,e){return a==0?c:d*Math.pow(2,10*(a/e-1))+c},easeOutExpo:function(h,a,c,d,e){return a==e?c+d:d*(-Math.pow(2,-10*a/e)+1)+c},easeInOutExpo:function(h,a,c,d,e){if(a==0)return c;if(a==e)return c+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+c;return d/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(h,
a,c,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+c},easeOutCirc:function(h,a,c,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+c},easeInOutCirc:function(h,a,c,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+c;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(h,a,c,d,e){h=1.70158;var i=0,n=d;if(a==0)return c;if((a/=e)==1)return c+d;i||(i=e*0.3);if(n<Math.abs(d)){n=d;h=i/4}else h=i/(2*Math.PI)*Math.asin(d/n);return-(n*Math.pow(2,10*(a-=1))*Math.sin((a*e-h)*2*Math.PI/i))+c},easeOutElastic:function(h,
a,c,d,e){h=1.70158;var i=0,n=d;if(a==0)return c;if((a/=e)==1)return c+d;i||(i=e*0.3);if(n<Math.abs(d)){n=d;h=i/4}else h=i/(2*Math.PI)*Math.asin(d/n);return n*Math.pow(2,-10*a)*Math.sin((a*e-h)*2*Math.PI/i)+d+c},easeInOutElastic:function(h,a,c,d,e){h=1.70158;var i=0,n=d;if(a==0)return c;if((a/=e/2)==2)return c+d;i||(i=e*0.3*1.5);if(n<Math.abs(d)){n=d;h=i/4}else h=i/(2*Math.PI)*Math.asin(d/n);if(a<1)return-0.5*n*Math.pow(2,10*(a-=1))*Math.sin((a*e-h)*2*Math.PI/i)+c;return n*Math.pow(2,-10*(a-=1))*Math.sin((a*
e-h)*2*Math.PI/i)*0.5+d+c},easeInBack:function(h,a,c,d,e,i){if(i==undefined)i=1.70158;return d*(a/=e)*a*((i+1)*a-i)+c},easeOutBack:function(h,a,c,d,e,i){if(i==undefined)i=1.70158;return d*((a=a/e-1)*a*((i+1)*a+i)+1)+c},easeInOutBack:function(h,a,c,d,e,i){if(i==undefined)i=1.70158;if((a/=e/2)<1)return d/2*a*a*(((i*=1.525)+1)*a-i)+c;return d/2*((a-=2)*a*(((i*=1.525)+1)*a+i)+2)+c},easeInBounce:function(h,a,c,d,e){return d-jQuery.easing.easeOutBounce(h,e-a,0,d,e)+c},easeOutBounce:function(h,a,c,d,e){return(a/=
e)<1/2.75?d*7.5625*a*a+c:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(h,a,c,d,e){if(a<e/2)return jQuery.easing.easeInBounce(h,a*2,0,d,e)*0.5+c;return jQuery.easing.easeOutBounce(h,a*2-e,0,d,e)*0.5+d*0.5+c}});(function(h){h.event.special.mousewheel={setup:function(){var a=h.event.special.mousewheel.handler;h.browser.mozilla&&h(this).bind("mousemove.mousewheel",function(c){h.data(this,"mwcursorposdata",
{pageX:c.pageX,pageY:c.pageY,clientX:c.clientX,clientY:c.clientY})});if(this.addEventListener)this.addEventListener(h.browser.mozilla?"DOMMouseScroll":"mousewheel",a,false);else this.onmousewheel=a},teardown:function(){var a=h.event.special.mousewheel.handler;h(this).unbind("mousemove.mousewheel");if(this.removeEventListener)this.removeEventListener(h.browser.mozilla?"DOMMouseScroll":"mousewheel",a,false);else this.onmousewheel=function(){};h.removeData(this,"mwcursorposdata")},handler:function(a){var c=
Array.prototype.slice.call(arguments,1);a=h.event.fix(a||window.event);h.extend(a,h.data(this,"mwcursorposdata")||{});var d=0;if(a.wheelDelta)d=a.wheelDelta/120;if(a.detail)d=-a.detail/3;a.data=a.data||{};a.type="mousewheel";c.unshift(d);c.unshift(a);return h.event.handle.apply(this,c)}};h.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);var sa=function h(a){this._glo_textDebounceTime=
500;this._glo_filterType=a.find("input[type=checkbox]").length?"checkbox":a.find("select").length?"select":a.find("input[type=text]").length?"text":"";var c=$('<img title="clear search" alt="clear search" class="js_filterBtnClrSearch js_iActObj" src="'+G8.gallery.staticRessourcePathPrefix+'style/img/btn_clear_search_lo.png">').hide().trigger("hoverInit").bindProxy("click",this._clk_clearFilter,this);a.prepend(c);if(this._glo_filterType=="checkbox"){a.find("input[type=checkbox]").bindProxy("click",
this._clk_filterCheckbox,this).attr("checked",true);a.find("label").bindProxy("click",this._clk_checkboxLabel,this)}else if(this._glo_filterType=="select")a.find("select").bindProxy("change keyup",this._chg_filterSelect,this).attr("selectedIndex",0);else this._glo_filterType=="text"&&a.find("input[type=text]").bindProxy("focus",this._foc_filterField,this).bindProxy("blur",this._blr_filterField,this).val("");a.bindProxy("clearFilter",this._cus_forceClearFilter,this);this._glo_clearFilterBtnObj=c;this._glo_filterBoxObj=
a;return this};sa.prototype={_foc_filterField:function h(a){a=$(a.currentTarget);a.bindProxy("keyup.filterField",$.debounce(this._glo_textDebounceTime,this._kyU_keyupInFilterField),this)},_blr_filterField:function h(a){a=$(a.currentTarget);a.unbind("keyup.filterField")},_kyU_keyupInFilterField:function h(a){a=$(a.currentTarget);a.val(a.inpReadVal());this._changeFilter()},_chg_filterSelect:function h(){this._changeFilter()},_clk_filterCheckbox:function h(){this._changeFilter()},_changeFilter:function h(){var a=
this._glo_filterBoxObj,c=this._glo_clearFilterBtnObj,d=this._glo_filterType,e=false;if(d=="checkbox")e=a.find("input[type=checkbox]:not(:checked)").length?true:false;else if(d=="select")e=a.find("select").attr("selectedIndex")!=0?true:false;else if(d=="text")e=a.find("input[type=text]").inpReadVal()!=""?true:false;a.data("filterActive",e);c.tgl(e);va.doFiltering()},_clk_clearFilter:function h(){var a=this._glo_filterBoxObj,c=this._glo_filterType;if(c=="checkbox")a.find("input[type=checkbox]").attr("checked",
true);else if(c=="select")a.find("select").attr("selectedIndex",0);else c=="text"&&a.find("input[type=text]").val("");this._changeFilter()},_cus_forceClearFilter:function h(){var a=this._glo_filterBoxObj,c=this._glo_filterType,d=this._glo_clearFilterBtnObj;if(c=="checkbox")a.find("input[type=checkbox]").attr("checked",true);else if(c=="select")a.find("select").attr("selectedIndex",0);else c=="text"&&a.find("input[type=text]").val("");a.data("filterActive",false);d.tgl(false)},_clk_checkboxLabel:function h(a){var c=
$(a.currentTarget);a=this._glo_filterBoxObj;c=c.prev("input[type=checkbox]");a=a.find("input[type=checkbox]");a.attr("checked",false);c.attr("checked",true);this._changeFilter()}};var ka=function h(){};ka.prototype={initPage:function h(){$.event.trigger("domChange")}};ka=new ka;$(function(){ka.initPage()})})();

