var mainDomain="sexplicy.net";var testDomain="sexplicy.net";var ajaxDir="/wp-content/themes/sexplicy/ajax/";var streamServer="http://stream."+mainDomain;var staticServer="http://static."+mainDomain;function isID(a){if($("#"+a).length>0){return true}else{return false}}function noUser(){return isID("login")}function goReg(){window.location.href="http://"+testDomain+"/anmelden"}function openCam(a){openWindow(a,"SEXPLiCYLiveCam",720,795)}function openWindow(d,b,a,c){posX=(screen.width/2)-(a/2);posY=(screen.height/2)-(c/2)-70;if(posY<0){posY=0}window.open(d,b,"width="+a+",height="+c+",left="+posX+",screenX="+posX+",top="+posY+",screenY="+posY+",toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0")}function playCam(e,c){var d="cam-"+e;var b="cam"+e;var a=c.split("_");streamPlayer(b,d,streamServer+"/cams/"+a[0]+"/"+a[1]+"/preview.flv",306,250,50,"","true","none","false")}function playMovie(){var b=$("#video-stream").attr("rel");var c=$("#video-uri").attr("rel");var a=c.split(",");if(c[0]){streamPlayer("playMovie","video-stream",streamServer+"/movie/"+a[0]+"/"+a[1]+"/"+b+"/videos/stream.mp4",974,500,80,"mp4","","","",b)}else{}}function playGallery(a){if(noUser()){goReg()}else{PicLensLite.start({feedUrl:"http://"+testDomain+"/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid="+a+"&mode=gallery"})}}function dlMovie(b){if(noUser()){goReg();return false}var a=$("div[id*='single-post-']").attr("id").replace(/[^0-9]/g,"");window.location.href="http://"+mainDomain+ajaxDir+"download.php?get="+a+"&quali="+b}function streamPlayer(g,d,m,n,i,o,a,j,k,c,l){if(a==""){a="flv"}if(j==""){j="false"}if(k==""){k="bottom"}var b={quality:"high",streamer:"lighttpd",file:m,autostart:j,volume:o,type:a,javascriptid:g,stretching:"fill",controlbar:k,icons:c,skin:staticServer+"%2Fswf%2Fstylish.swf",abouttext:"SEXPLiCY Adult Entertainment",aboutlink:"http%3a%2f%2f"+mainDomain+"%2f"};var e={wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always",allownetworking:"all"};if(typeof l!="undefined"&&l!=""){var f={wmode:"opaque",rel:l}}else{var f={wmode:"opaque"}}swfobject.embedSWF(staticServer+"/swf/player.swf",d,n,i,"9.0.0","expressInstall.swf",b,e,f)}function logedIn(){jQuery(document).ready(function(a){$form=a("#login_window");if(a("input[name='log']",$form).val().length>2&&a("input[name='pwd']",$form).val().length>2){a.post("/wp-content/themes/sexplicy/login.php",{log:a('input[name="log"]',$form).val(),pwd:a('input[name="pwd"]',$form).val()},function(b){if(typeof b.error!="undefined"){alert(b.error)}else{if(typeof b.status!="undefined"&&b.status==100){window.location.href="/"}else{alert("Ein bisher noch unbekannter Login Fehler ist aufgetreten.")}}},"json")}else{alert("Bitte alle Felder ausfüllen.")}})}function sendUserAction(c,a,b){$data="do="+c+"&value="+a;$.post(ajaxDir+"/setting.php",$data,function(d){if(typeof b!="undefined"&&b!=""){b(d)}})}function hideDownloadHinweis(){sendUserAction("download-hinweis",1);$(".download-hinweis").fadeOut();return false}jQuery(document).ready(function(c){c("#menu ul li.dd").hover(function(){c(this).addClass("hover");c("table:first",this).css("visibility","visible")},function(){c(this).removeClass("hover");c("table:first",this).css("visibility","hidden")});if(c("#content-body").is(".single-movie")){playMovie();c(".multi-movie-download").bind("click",function(){c(".multi-download-files").toggle("fast")});if(c(".multi-download-files").length>0){c(".multi-download-files td div a").bind("click",function(){dlMovie(c(this).attr("rel"))})}}if(c("#posts").is(".index-gallery")){c(".entry").bind("click",function(){if(noUser()){goReg()}else{playGallery(c(this).attr("name"))}})}if(c("#posts").is(".index-livecams")){var e;var a;c(".entry").bind("mouseenter",function(){e=c(this).attr("rel");a=c(this).attr("name");playCam(e,a)}).bind("mouseleave",function(){e=c(this).attr("rel");c("#camwrap-"+e).html('<div id="cam-'+e+'"><!-- --></div>')}).bind("click",function(){if(noUser()){goReg()}else{a=c(this).attr("name");theCam=a.split("_");openCam("http://"+testDomain+"/livecam/"+theCam[0]+"/"+theCam[1])}})}if(c("#login").length>0){c("#login, #login-fadebg, #login_window .close").click(function(){if(c("#login.off").length>0){c("#login-fadebg").css({height:((typeof c("body")[0].scrollHeight!="undefined")?c("body")[0].scrollHeight:1280)+"px",}).fadeIn();c("#login-wrap").fadeIn();c("#login").removeClass("off").addClass("active")}else{c("#login").removeClass("active").addClass("off");c("#login-fadebg").fadeOut();c("#login-wrap").fadeOut()}}).mouseover(function(){c("#login").addClass("over")}).mouseout(function(){c("#login").removeClass("over")});c("#login_window input").bind("keyup","return",function(){logedIn()})}if(c("#bossknopf").length>0){c("#bossknopf_active").click(function(){c("body").hide();window.location.href="http://www.google.de"});c("#bossknopf").click(function(){if(c("#bossknopf.off").length>0){c("#panik-wrap").fadeIn();c("html").bind("keyup","space",function(){c("body").hide();window.location.href="http://www.google.de"});c(this).removeClass("off").addClass("active")}else{c("#panik-wrap").fadeOut();c("html").unbind("keyup");c(this).removeClass("active").addClass("off")}}).mouseover(function(){c(this).addClass("over")}).mouseout(function(){c(this).removeClass("over")})}if(c(".button_mehr_infos").length>0){c(".button_mehr_infos").click(function(){c(".mehr_infos").toggle();c(".button_mehr_infos").text(!c(".mehr_infos").is(":visible")?"[Weiterleisten]":"[Ausblenden]")})}var d=document.documentElement;var b=self.innerWidth||(d&&d.clientWidth)||document.body.clientWidth;if(b<=1024){window.scroll(35,0);c("#bg").width(1045)}});
