$(document).ready(function(){sevenUp.plugin.black.test({});$(".headerButton").hover(function(){$(this).toggleClass("buttonHover")});$(".buttonCustom").click(function(){$("#dialogMyAccount").dialog({title:"New user / Registered user",modal:true,draggable:false,resizable:false,width:350,height:131});return false});$(".buttonLoginNew").click(function(){Recaptcha.create("6LfUSLoSAAAAAKc2isU-DO7SP9j31An6WzCP1Nqf","recaptcha_div",{theme:"red"});$("#dialogMyAccount").dialog("close");$("#dialogNew").dialog({title:"Registering New User",modal:true,draggable:false,resizable:false,width:340,open:function(){$("#inputLogin").focus()}});return false});$("#dialogNew #sendButton").one("click",a);function a(){$("#dialogNew #sendButton").css({"background-color":"gray"}).val("Checking...");$.getJSON("/new/&callback=?",$("#dialogNew > form").serialize(),function(d){if(d.error==false){$("#dialogNew #sendButton").one("click",a);var c=$("#resendlink").attr("href");c=c.replace(/xxx$/,encodeURIComponent(d.email));$("#resendlink").attr("href",c).one("click",function(){$this=$(this);$.getJSON($this.attr("href"));$this.css({"text-decoration":"none"}).html("Email sent");$this.attr("href","#");return false});$("#dialogNew").dialog("close");$("#dialogAccountCreated").dialog({title:"Account created successfully",modal:true,draggable:false,resizable:false,width:340})}else{$("#dialogNew #sendButton").one("click",a);Recaptcha.create("6LfUSLoSAAAAAKc2isU-DO7SP9j31An6WzCP1Nqf","recaptcha_div",{theme:"red"});$(".errorMessage").html("");if(b(d.loginError)){$("#loginError").html("("+d.loginError+")")}if(b(d.emailError)){$("#emailError").html("("+d.emailError+")")}if(b(d.passError)){$("#passError").html("("+d.passError+")")}if(b(d.passCError)){$("#passCError").html("("+d.passCError+")")}if(b(d.questionError)){$("#questionError").html("("+d.questionError+")")}}$("#dialogNew #sendButton").css({"background-color":"#363636"}).val("Send")})}function b(){var d=arguments;var c=d.length;var e=0;while(e!=c){try{if(typeof(d[e])=="undefined"){return false}else{e++}}catch(f){return false}}return true}});var plug1234GetPlugVar;var plugChatInTheme="plugchatin";var clip="";$(document).ready(function(){if($.cookies.get("plugChatTheme")!=null){plugChatInTheme=$.cookies.get("plugChatTheme");$("#plug1234-sitempthemechange").html($("#plug1234-sitempthemechange").html().replace(/plugChatInTheme \= \"[a-z|\-]+\"/,'plugChatInTheme = "'+plugChatInTheme+'"'))}$("#plug1234-sitempthemechange").data("themechanged",plugChatInTheme);var a=plug1234GetPlugVar();var g=$("#themeslist");g.html("");for(var f in a.themesList){var d=$("<div></div>").addClass("themecol").appendTo(g);var e=$("<div></div>").addClass("plug1234-ui-corner-top plug1234-content").css({cursor:"pointer",clear:"left",height:"26px",width:(plugChatInTheme==a.themesList[f])?(264)+"px":(284)+"px",margin:"4px 0 2px 5px","font-family":a.css.jQueryUI[a.themesList[f]]["font-family"],border:a.css.jQueryUI[a.themesList[f]]["ui-widget-header"]["css-border"],color:a.css.jQueryUI[a.themesList[f]]["ui-widget-header"]["css-color"],background:a.css.jQueryUI[a.themesList[f]]["ui-widget-header"]["css-background"],"float":"left"}).appendTo(d);if(plugChatInTheme==a.themesList[f]){$("<div></div>").attr("id","plug1234-theme-selected").css({width:"12px",height:"10px",margin:"14px 59px 0 0","background-image":"url(http://static.plugchat.in/images/admin/site/tables/approved.gif)","background-position":"0 0","float":"right"}).addClass("plug1234-content-icon plug1234-ui-icon-check").appendTo(d)}$("<div></div>").css({margin:"2px 2px 0 0","float":"right"}).html(a.themesList[f]).appendTo(e);d.bind("click",function(){$("#plug1234-theme-selected").remove();$("#wrapper .fadeWrapper #themeslist .themecol > div").width(284);$(this).find("> div").width(264);$("<div></div>").attr("id","plug1234-theme-selected").css({width:"12px",height:"10px",margin:"14px 59px 0 0","background-image":"url(http://static.plugchat.in/images/admin/site/tables/approved.gif)","background-position":"0 0","float":"right"}).addClass("plug1234-content-icon plug1234-ui-icon-check").appendTo($(this))})}$("#scroll-left").hover(function(){$(this).toggleClass("buttonHover")}).one("click",function(){c("left")});$("#scroll-right").hover(function(){$(this).toggleClass("buttonHover")}).one("click",function(){c("right")});function c(k){var h=$(".fadeWrapper").scrollLeft();var i=0;if(h==0&&k=="left"){i=1400}else{if(h>=1400&&k=="right"){i=0}else{if(k=="right"){i=h+350}else{i=h-350}}}var j=30;if(k=="right"){$(".fadeWrapper").animate({scrollLeft:i},500,"swing",function(){$("#scroll-right").one("click",function(){c("right")});$("#themeslist").animate({"margin-top":j},200,"swing")})}else{$(".fadeWrapper").animate({scrollLeft:i},500,"swing",function(){$("#scroll-left").one("click",function(){c("left")});$("#themeslist").animate({"margin-top":j},200,"swing")})}}ZeroClipboard.setMoviePath("http://static.plugchat.in/js/ZeroClipboard/ZeroClipboard.swf");clip=new ZeroClipboard.Client();var b='<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"><\/script><script type="text/javascript">var plugChatInTheme = "THEMEOVERRIDE";<\/script><script type="text/javascript" src="http://static.plugchat.in/js/plugchatin-en.min.js"><\/script>';b=b.replace(/THEMEOVERRIDE/,plugChatInTheme);clip.setText(b);clip.setHandCursor(true);clip.glue("copyCode");clip.addEventListener("mouseOver",function(i){var h='<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"><\/script><script type="text/javascript">var plugChatInTheme = "THEMEOVERRIDE";<\/script><script type="text/javascript" src="http://static.plugchat.in/js/plugchatin-en.min.js"><\/script>';h=h.replace(/THEMEOVERRIDE/,$("#plug1234-sitempthemechange").data("themechanged"));clip.setText(h);$("#copyCode").toggleClass("buttonHover")});clip.addEventListener("mouseOut",function(h){$("#copyCode").toggleClass("buttonHover")});$(".sidebarLanguage").click(function(){var h=$(".sidebarLanguageItems");if(h.is(":visible")){h.slideUp("fast")}else{h.slideDown("fast")}})});
