<!DOCTYPE html>
<?php 
   if(get_cookie('lang'))
   { 
      $lang = get_cookie('lang'); 
   } 
   else 
   { 
      $lang = 2; 
   } 
   $langKey = getValue('sys_languages',array('id'=>$lang));
   $langPrefix = 'en';
   if(count($langKey)>0)
   {
      $langPrefix = $langKey['key'];
   }
?>
<html lang="<?php echo $langPrefix; ?>">
  <base href="<?php echo base_url();?>assets/">
   <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	   
      <!-- Twitter Card data -->
      <meta name="twitter:card" content="summary">
      <meta name="twitter:site" content="@publisher_handle">
      <meta name="twitter:title" content="<?php if($meta_title!=''){ echo $meta_title; } else { echo 'Castleevents'; } ?>">
      <meta name="twitter:description" content="<?php if($meta_description!=''){ echo $meta_description; } else { echo 'Castleevents'; } ?>">
      <meta name="twitter:creator" content="@author_handle">
      <!-- Twitter Summary card images must be at least 120x120px -->
      <meta name="twitter:image" content="<?php echo base_url().'newsletter_image/logocastle.svg'; ?>">
      
      <!-- Open Graph data -->
      <meta name="title" property="og:title" content="<?php if($meta_title!=''){ echo $meta_title; } else { echo 'Castleevents'; } ?>">
	   <meta name="description" property="og:description" content="<?php if($meta_description!=''){ echo $meta_description; } else { echo 'Castleevents'; } ?>">
      <meta property="og:image" content="<?php echo base_url().'newsletter_image/logocastle.svg'; ?>">
      <meta property="og:url" content="<?php echo base_url(); ?>">
      <title><?php if(!empty($title)){ echo $title; } else { ?><?php echo getLang('Start__The_Worlds_Leading_Eyes_Wide_Shut_Parties_and_Erotic_Social_Network'); ?><?php } ?></title>
      <link rel="shortcut icon" href="images/favicon.ico">
      <link rel="stylesheet" href="css/import.css">
      <link href='https://fonts.googleapis.com/css?family=Lato:400,100,300,700' rel='stylesheet'>
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
      <link rel="stylesheet" href="fonts/fonts.css">
      
	   <script type="text/javascript">
      window.NREUM||(NREUM={}),__nr_require=function(t,n,e){function r(e){if(!n[e]){var o=n[e]={exports:{}};t[e][0].call(o.exports,function(n){var o=t[e][1][n];return r(o||n)},o,o.exports)}return n[e].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<e.length;o++)r(e[o]);return r}({1:[function(t,n,e){function r(t){try{s.console&&console.log(t)}catch(n){}}var o,i=t("ee"),a=t(15),s={};try{o=localStorage.getItem("__nr_flags").split(","),console&&"function"==typeof console.log&&(s.console=!0,o.indexOf("dev")!==-1&&(s.dev=!0),o.indexOf("nr_dev")!==-1&&(s.nrDev=!0))}catch(c){}s.nrDev&&i.on("internal-error",function(t){r(t.stack)}),s.dev&&i.on("fn-err",function(t,n,e){r(e.stack)}),s.dev&&(r("NR AGENT IN DEVELOPMENT MODE"),r("flags: "+a(s,function(t,n){return t}).join(", ")))},{}],2:[function(t,n,e){function r(t,n,e,r,o){try{d?d-=1:i("err",[o||new UncaughtException(t,n,e)])}catch(s){try{i("ierr",[s,c.now(),!0])}catch(u){}}return"function"==typeof f&&f.apply(this,a(arguments))}function UncaughtException(t,n,e){this.message=t||"Uncaught error with no additional information",this.sourceURL=n,this.line=e}function o(t){i("err",[t,c.now()])}var i=t("handle"),a=t(16),s=t("ee"),c=t("loader"),f=window.onerror,u=!1,d=0;c.features.err=!0,t(1),window.onerror=r;try{throw new Error}catch(l){"stack"in l&&(t(8),t(7),"addEventListener"in window&&t(5),c.xhrWrappable&&t(9),u=!0)}s.on("fn-start",function(t,n,e){u&&(d+=1)}),s.on("fn-err",function(t,n,e){u&&(this.thrown=!0,o(e))}),s.on("fn-end",function(){u&&!this.thrown&&d>0&&(d-=1)}),s.on("internal-error",function(t){i("ierr",[t,c.now(),!0])})},{}],3:[function(t,n,e){t("loader").features.ins=!0},{}],4:[function(t,n,e){function r(t){}if(window.performance&&window.performance.timing&&window.performance.getEntriesByType){var o=t("ee"),i=t("handle"),a=t(8),s=t(7),c="learResourceTimings",f="addEventListener",u="resourcetimingbufferfull",d="bstResource",l="resource",p="-start",h="-end",m="fn"+p,w="fn"+h,v="bstTimer",y="pushState",g=t("loader");g.features.stn=!0,t(6);var b=NREUM.o.EV;o.on(m,function(t,n){var e=t[0];e instanceof b&&(this.bstStart=g.now())}),o.on(w,function(t,n){var e=t[0];e instanceof b&&i("bst",[e,n,this.bstStart,g.now()])}),a.on(m,function(t,n,e){this.bstStart=g.now(),this.bstType=e}),a.on(w,function(t,n){i(v,[n,this.bstStart,g.now(),this.bstType])}),s.on(m,function(){this.bstStart=g.now()}),s.on(w,function(t,n){i(v,[n,this.bstStart,g.now(),"requestAnimationFrame"])}),o.on(y+p,function(t){this.time=g.now(),this.startPath=location.pathname+location.hash}),o.on(y+h,function(t){i("bstHist",[location.pathname+location.hash,this.startPath,this.time])}),f in window.performance&&(window.performance["c"+c]?window.performance[f](u,function(t){i(d,[window.performance.getEntriesByType(l)]),window.performance["c"+c]()},!1):window.performance[f]("webkit"+u,function(t){i(d,[window.performance.getEntriesByType(l)]),window.performance["webkitC"+c]()},!1)),document[f]("scroll",r,{passive:!0}),document[f]("keypress",r,!1),document[f]("click",r,!1)}},{}],5:[function(t,n,e){function r(t){for(var n=t;n&&!n.hasOwnProperty(u);)n=Object.getPrototypeOf(n);n&&o(n)}function o(t){s.inPlace(t,[u,d],"-",i)}function i(t,n){return t[1]}var a=t("ee").get("events"),s=t(18)(a,!0),c=t("gos"),f=XMLHttpRequest,u="addEventListener",d="removeEventListener";n.exports=a,"getPrototypeOf"in Object?(r(document),r(window),r(f.prototype)):f.prototype.hasOwnProperty(u)&&(o(window),o(f.prototype)),a.on(u+"-start",function(t,n){var e=t[1],r=c(e,"nr@wrapped",function(){function t(){if("function"==typeof e.handleEvent)return e.handleEvent.apply(e,arguments)}var n={object:t,"function":e}[typeof e];return n?s(n,"fn-",null,n.name||"anonymous"):e});this.wrapped=t[1]=r}),a.on(d+"-start",function(t){t[1]=this.wrapped||t[1]})},{}],6:[function(t,n,e){var r=t("ee").get("history"),o=t(18)(r);n.exports=r,o.inPlace(window.history,["pushState","replaceState"],"-")},{}],7:[function(t,n,e){var r=t("ee").get("raf"),o=t(18)(r),i="equestAnimationFrame";n.exports=r,o.inPlace(window,["r"+i,"mozR"+i,"webkitR"+i,"msR"+i],"raf-"),r.on("raf-start",function(t){t[0]=o(t[0],"fn-")})},{}],8:[function(t,n,e){function r(t,n,e){t[0]=a(t[0],"fn-",null,e)}function o(t,n,e){this.method=e,this.timerDuration=isNaN(t[1])?0:+t[1],t[0]=a(t[0],"fn-",this,e)}var i=t("ee").get("timer"),a=t(18)(i),s="setTimeout",c="setInterval",f="clearTimeout",u="-start",d="-";n.exports=i,a.inPlace(window,[s,"setImmediate"],s+d),a.inPlace(window,[c],c+d),a.inPlace(window,[f,"clearImmediate"],f+d),i.on(c+u,r),i.on(s+u,o)},{}],9:[function(t,n,e){function r(t,n){d.inPlace(n,["onreadystatechange"],"fn-",s)}function o(){var t=this,n=u.context(t);t.readyState>3&&!n.resolved&&(n.resolved=!0,u.emit("xhr-resolved",[],t)),d.inPlace(t,y,"fn-",s)}function i(t){g.push(t),h&&(x?x.then(a):w?w(a):(E=-E,O.data=E))}function a(){for(var t=0;t<g.length;t++)r([],g[t]);g.length&&(g=[])}function s(t,n){return n}function c(t,n){for(var e in t)n[e]=t[e];return n}t(5);var f=t("ee"),u=f.get("xhr"),d=t(18)(u),l=NREUM.o,p=l.XHR,h=l.MO,m=l.PR,w=l.SI,v="readystatechange",y=["onload","onerror","onabort","onloadstart","onloadend","onprogress","ontimeout"],g=[];n.exports=u;var b=window.XMLHttpRequest=function(t){var n=new p(t);try{u.emit("new-xhr",[n],n),n.addEventListener(v,o,!1)}catch(e){try{u.emit("internal-error",[e])}catch(r){}}return n};if(c(p,b),b.prototype=p.prototype,d.inPlace(b.prototype,["open","send"],"-xhr-",s),u.on("send-xhr-start",function(t,n){r(t,n),i(n)}),u.on("open-xhr-start",r),h){var x=m&&m.resolve();if(!w&&!m){var E=1,O=document.createTextNode(E);new h(a).observe(O,{characterData:!0})}}else f.on("fn-end",function(t){t[0]&&t[0].type===v||a()})},{}],10:[function(t,n,e){function r(t){var n=this.params,e=this.metrics;if(!this.ended){this.ended=!0;for(var r=0;r<d;r++)t.removeEventListener(u[r],this.listener,!1);if(!n.aborted){if(e.duration=a.now()-this.startTime,4===t.readyState){n.status=t.status;var i=o(t,this.lastSize);if(i&&(e.rxSize=i),this.sameOrigin){var c=t.getResponseHeader("X-NewRelic-App-Data");c&&(n.cat=c.split(", ").pop())}}else n.status=0;e.cbTime=this.cbTime,f.emit("xhr-done",[t],t),s("xhr",[n,e,this.startTime])}}}function o(t,n){var e=t.responseType;if("json"===e&&null!==n)return n;var r="arraybuffer"===e||"blob"===e||"json"===e?t.response:t.responseText;return h(r)}function i(t,n){var e=c(n),r=t.params;r.host=e.hostname+":"+e.port,r.pathname=e.pathname,t.sameOrigin=e.sameOrigin}var a=t("loader");if(a.xhrWrappable){var s=t("handle"),c=t(11),f=t("ee"),u=["load","error","abort","timeout"],d=u.length,l=t("id"),p=t(14),h=t(13),m=window.XMLHttpRequest;a.features.xhr=!0,t(9),f.on("new-xhr",function(t){var n=this;n.totalCbs=0,n.called=0,n.cbTime=0,n.end=r,n.ended=!1,n.xhrGuids={},n.lastSize=null,p&&(p>34||p<10)||window.opera||t.addEventListener("progress",function(t){n.lastSize=t.loaded},!1)}),f.on("open-xhr-start",function(t){this.params={method:t[0]},i(this,t[1]),this.metrics={}}),f.on("open-xhr-end",function(t,n){"loader_config"in NREUM&&"xpid"in NREUM.loader_config&&this.sameOrigin&&n.setRequestHeader("X-NewRelic-ID",NREUM.loader_config.xpid)}),f.on("send-xhr-start",function(t,n){var e=this.metrics,r=t[0],o=this;if(e&&r){var i=h(r);i&&(e.txSize=i)}this.startTime=a.now(),this.listener=function(t){try{"abort"===t.type&&(o.params.aborted=!0),("load"!==t.type||o.called===o.totalCbs&&(o.onloadCalled||"function"!=typeof n.onload))&&o.end(n)}catch(e){try{f.emit("internal-error",[e])}catch(r){}}};for(var s=0;s<d;s++)n.addEventListener(u[s],this.listener,!1)}),f.on("xhr-cb-time",function(t,n,e){this.cbTime+=t,n?this.onloadCalled=!0:this.called+=1,this.called!==this.totalCbs||!this.onloadCalled&&"function"==typeof e.onload||this.end(e)}),f.on("xhr-load-added",function(t,n){var e=""+l(t)+!!n;this.xhrGuids&&!this.xhrGuids[e]&&(this.xhrGuids[e]=!0,this.totalCbs+=1)}),f.on("xhr-load-removed",function(t,n){var e=""+l(t)+!!n;this.xhrGuids&&this.xhrGuids[e]&&(delete this.xhrGuids[e],this.totalCbs-=1)}),f.on("addEventListener-end",function(t,n){n instanceof m&&"load"===t[0]&&f.emit("xhr-load-added",[t[1],t[2]],n)}),f.on("removeEventListener-end",function(t,n){n instanceof m&&"load"===t[0]&&f.emit("xhr-load-removed",[t[1],t[2]],n)}),f.on("fn-start",function(t,n,e){n instanceof m&&("onload"===e&&(this.onload=!0),("load"===(t[0]&&t[0].type)||this.onload)&&(this.xhrCbStart=a.now()))}),f.on("fn-end",function(t,n){this.xhrCbStart&&f.emit("xhr-cb-time",[a.now()-this.xhrCbStart,this.onload,n],n)})}},{}],11:[function(t,n,e){n.exports=function(t){var n=document.createElement("a"),e=window.location,r={};n.href=t,r.port=n.port;var o=n.href.split("://");!r.port&&o[1]&&(r.port=o[1].split("/")[0].split("@").pop().split(":")[1]),r.port&&"0"!==r.port||(r.port="https"===o[0]?"443":"80"),r.hostname=n.hostname||e.hostname,r.pathname=n.pathname,r.protocol=o[0],"/"!==r.pathname.charAt(0)&&(r.pathname="/"+r.pathname);var i=!n.protocol||":"===n.protocol||n.protocol===e.protocol,a=n.hostname===document.domain&&n.port===e.port;return r.sameOrigin=i&&(!n.hostname||a),r}},{}],12:[function(t,n,e){function r(){}function o(t,n,e){return function(){return i(t,[f.now()].concat(s(arguments)),n?null:this,e),n?void 0:this}}var i=t("handle"),a=t(15),s=t(16),c=t("ee").get("tracer"),f=t("loader"),u=NREUM;"undefined"==typeof window.newrelic&&(newrelic=u);var d=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit","addRelease"],l="api-",p=l+"ixn-";a(d,function(t,n){u[n]=o(l+n,!0,"api")}),u.addPageAction=o(l+"addPageAction",!0),u.setCurrentRouteName=o(l+"routeName",!0),n.exports=newrelic,u.interaction=function(){return(new r).get()};var h=r.prototype={createTracer:function(t,n){var e={},r=this,o="function"==typeof n;return i(p+"tracer",[f.now(),t,e],r),function(){if(c.emit((o?"":"no-")+"fn-start",[f.now(),r,o],e),o)try{return n.apply(this,arguments)}finally{c.emit("fn-end",[f.now()],e)}}}};a("setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(t,n){h[n]=o(p+n)}),newrelic.noticeError=function(t){"string"==typeof t&&(t=new Error(t)),i("err",[t,f.now()])}},{}],13:[function(t,n,e){n.exports=function(t){if("string"==typeof t&&t.length)return t.length;if("object"==typeof t){if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer&&t.byteLength)return t.byteLength;if("undefined"!=typeof Blob&&t instanceof Blob&&t.size)return t.size;if(!("undefined"!=typeof FormData&&t instanceof FormData))try{return JSON.stringify(t).length}catch(n){return}}}},{}],14:[function(t,n,e){var r=0,o=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);o&&(r=+o[1]),n.exports=r},{}],15:[function(t,n,e){function r(t,n){var e=[],r="",i=0;for(r in t)o.call(t,r)&&(e[i]=n(r,t[r]),i+=1);return e}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],16:[function(t,n,e){function r(t,n,e){n||(n=0),"undefined"==typeof e&&(e=t?t.length:0);for(var r=-1,o=e-n||0,i=Array(o<0?0:o);++r<o;)i[r]=t[n+r];return i}n.exports=r},{}],17:[function(t,n,e){n.exports={exists:"undefined"!=typeof window.performance&&window.performance.timing&&"undefined"!=typeof window.performance.timing.navigationStart}},{}],18:[function(t,n,e){function r(t){return!(t&&t instanceof Function&&t.apply&&!t[a])}var o=t("ee"),i=t(16),a="nr@original",s=Object.prototype.hasOwnProperty,c=!1;n.exports=function(t,n){function e(t,n,e,o){function nrWrapper(){var r,a,s,c;try{a=this,r=i(arguments),s="function"==typeof e?e(r,a):e||{}}catch(f){l([f,"",[r,a,o],s])}u(n+"start",[r,a,o],s);try{return c=t.apply(a,r)}catch(d){throw u(n+"err",[r,a,d],s),d}finally{u(n+"end",[r,a,c],s)}}return r(t)?t:(n||(n=""),nrWrapper[a]=t,d(t,nrWrapper),nrWrapper)}function f(t,n,o,i){o||(o="");var a,s,c,f="-"===o.charAt(0);for(c=0;c<n.length;c++)s=n[c],a=t[s],r(a)||(t[s]=e(a,f?s+o:o,i,s))}function u(e,r,o){if(!c||n){var i=c;c=!0;try{t.emit(e,r,o,n)}catch(a){l([a,e,r,o])}c=i}}function d(t,n){if(Object.defineProperty&&Object.keys)try{var e=Object.keys(t);return e.forEach(function(e){Object.defineProperty(n,e,{get:function(){return t[e]},set:function(n){return t[e]=n,n}})}),n}catch(r){l([r])}for(var o in t)s.call(t,o)&&(n[o]=t[o]);return n}function l(n){try{t.emit("internal-error",n)}catch(e){}}return t||(t=o),e.inPlace=f,e.flag=a,e}},{}],ee:[function(t,n,e){function r(){}function o(t){function n(t){return t&&t instanceof r?t:t?c(t,s,i):i()}function e(e,r,o,i){if(!l.aborted||i){t&&t(e,r,o);for(var a=n(o),s=h(e),c=s.length,f=0;f<c;f++)s[f].apply(a,r);var d=u[y[e]];return d&&d.push([g,e,r,a]),a}}function p(t,n){v[t]=h(t).concat(n)}function h(t){return v[t]||[]}function m(t){return d[t]=d[t]||o(e)}function w(t,n){f(t,function(t,e){n=n||"feature",y[e]=n,n in u||(u[n]=[])})}var v={},y={},g={on:p,emit:e,get:m,listeners:h,context:n,buffer:w,abort:a,aborted:!1};return g}function i(){return new r}function a(){(u.api||u.feature)&&(l.aborted=!0,u=l.backlog={})}var s="nr@context",c=t("gos"),f=t(15),u={},d={},l=n.exports=o();l.backlog=u},{}],gos:[function(t,n,e){function r(t,n,e){if(o.call(t,n))return t[n];var r=e();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(t,n,{value:r,writable:!0,enumerable:!1}),r}catch(i){}return t[n]=r,r}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],handle:[function(t,n,e){function r(t,n,e,r){o.buffer([t],r),o.emit(t,n,e)}var o=t("ee").get("handle");n.exports=r,r.ee=o},{}],id:[function(t,n,e){function r(t){var n=typeof t;return!t||"object"!==n&&"function"!==n?-1:t===window?0:a(t,i,function(){return o++})}var o=1,i="nr@id",a=t("gos");n.exports=r},{}],loader:[function(t,n,e){function r(){if(!x++){var t=b.info=NREUM.info,n=l.getElementsByTagName("script")[0];if(setTimeout(u.abort,3e4),!(t&&t.licenseKey&&t.applicationID&&n))return u.abort();f(y,function(n,e){t[n]||(t[n]=e)}),c("mark",["onload",a()+b.offset],null,"api");var e=l.createElement("script");e.src="https://"+t.agent,n.parentNode.insertBefore(e,n)}}function o(){"complete"===l.readyState&&i()}function i(){c("mark",["domContent",a()+b.offset],null,"api")}function a(){return E.exists&&performance.now?Math.round(performance.now()):(s=Math.max((new Date).getTime(),s))-b.offset}var s=(new Date).getTime(),c=t("handle"),f=t(15),u=t("ee"),d=window,l=d.document,p="addEventListener",h="attachEvent",m=d.XMLHttpRequest,w=m&&m.prototype;NREUM.o={ST:setTimeout,SI:d.setImmediate,CT:clearTimeout,XHR:m,REQ:d.Request,EV:d.Event,PR:d.Promise,MO:d.MutationObserver};var v=""+location,y={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-1044.min.js"},g=m&&w&&w[p]&&!/CriOS/.test(navigator.userAgent),b=n.exports={offset:s,now:a,origin:v,features:{},xhrWrappable:g};t(12),l[p]?(l[p]("DOMContentLoaded",i,!1),d[p]("load",r,!1)):(l[h]("onreadystatechange",o),d[h]("onload",r)),c("mark",["firstbyte",s],null,"api");var x=0,E=t(17)},{}]},{},["loader",2,10,4,3]);
      ;NREUM.info={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",licenseKey:"15c2237549",applicationID:"86213551",sa:1}
      </script>
      <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

          ga('create', 'UA-75471177-1', 'auto');
          ga('send', 'pageview');

      </script>
      <script type="application/ld+json">
         { 
            "@context": "http://schema.org", 
            "@type": "<?php if($meta_genre!=''){ echo $meta_genre; } else { echo 'Castleevents'; } ?>",
            "headline": "<?php if($meta_title!=''){ echo $meta_title; } else { echo 'Castleevents'; } ?>",
            "alternativeHeadline": "<?php if($meta_title!=''){ echo $meta_title; } else { echo 'Castleevents'; } ?>",
            "image": "<?php echo base_url().'images/logocastle.svg'; ?>", 
            "genre": "<?php if($meta_genre!=''){ echo $meta_genre; } else { echo 'Castleevents'; } ?>", 
            "keywords": "<?php if($meta_keywords!=''){ echo $meta_keywords; } else { echo 'Castleevents'; } ?>", 
            "wordcount": "<?php if($meta_description!=''){ echo str_word_count($meta_description); } else { echo 1; } ?>",
            "publisher": {
               "@type": "Organization",
               "name": "Castleevents",
               "logo": {
                  "@type": "ImageObject",
                  "url": "<?php echo base_url().'images/logocastle.svg'; ?>",
                  "width": "542",
                  "height": "67"
               }
            },
            "url": "<?php echo base_url(); ?>",
            "datePublished": "2017-09-06",
            "dateCreated": "2017-09-06",
            "dateModified": "2017-09-06",
            "description": "<?php if($meta_description!=''){ echo $meta_description; } else { echo 'Castleevents'; } ?>"
         }
      </script> 
      <script src="//code.tidio.co/vrh5gv2sqkgcjfaafqqagm2he0t22brf.js"></script>
      <script src='https://www.google.com/recaptcha/api.js'></script>
      <style type="text/css">
        body{ top: 0px !important; }
      </style>
   </head>
   <body oncontextmenu="return false;" class="<?php if($this->uri->segment(1)=='home' || $this->uri->segment(1)==''){ echo ''; } else { echo 'inner_pages'; }?> <?php if(!empty($steps)){ echo 'popheight'; }?>">
      <!--<input type="hidden" id="test" value="0">-->
      <input type="hidden" id="base_url" value="<?php echo base_url();?>">
      <div class="ajax-loader" style="display:none;">
        <img src="images/2.svg" class="img-responsive" alt="" />
      </div>
      <div class="outer_wrapper">
         <div class="main_outer">
            <header id="stickyHeader">
               <div class="header_inner">
                  <div class="button_container" id="menuToggle">
                     <span class="top"></span><span class="middle"></span><span class="bottom"></span>
                     <p><?php echo getLang('Menu'); ?></p>
                  </div>

                  <div class="language" id="language">
                  <?php //if($device != '' && ($device=='computer' || $device=='tablet')){ ?>
                    <!--<div class="heigh" id="google_translate_element"></div>-->
                  <?php //} ?>  
                     <button class="language_btn"><?php if(get_cookie('lang')){ $lang = getValue('sys_languages',array('id'=>get_cookie('lang'))); echo $lang['name']; } else { echo 'English'; } ?> <i class="fa  fa-angle-down"></i></button>
                     <ul>
                        <?php if(!empty($languages)){
                           foreach ($languages as $lang) {
                        ?>
                        <li data-id="<?php echo $lang['id']; ?>" class="langCls"><a href="javascript:void(0)"><?php echo $lang['name']; ?></a></li>
                        <?php } } ?>
                        <form class="langFrm" action="<?php echo base_url(); ?>home/changelanguage" method="post">
                           <input type="hidden" class="lang" name="lang" value="">
                           <input type="hidden" id="requestURL" name="requestURL" value="<?php echo $this->uri->uri_string(); ?>">
                        </form>
                     </ul>
                  </div>
                  <?php if(!$this->session->userdata('user_id')){ ?>
                  <div class="login_box">
                     <a href="javascript:void(0)" class="allcaps log_butt_box"><img src="images/mask.png" alt=""><br> <?php echo getLang('Login'); ?></a>
                     <div class="login_popbox">
                        <form action="<?php echo  base_url(); ?>home/login" class="login_form" method="post">
                           <!--<i class="fa fa-close" id="closeLogin"></i>-->
                           <h4 class="text_gold"><?php echo getLang('Login'); ?></h4>
                           <div class="form_group">
                              <label for="#err" class="login_err" style="color:red;"><?php echo $this->utility->showFrontMsg(); ?></label>
                           </div>
                           <div class="form_group">
                              <label for="#email"><?php echo getLang('E_Mail_Adresse'); ?>/<?php echo getLang('Username'); ?></label>
                              <input type="text" id="email" name="email">
                           </div>
                           <div class="form_group">
                              <label for="#password"><?php echo getLang('Your_Password'); ?> </label>
                              <input type="password" id="password" name="password">
                           </div>
                           <div class="form_group text_center">
                              <div class="g-recaptcha" data-sitekey="<?php echo RECAPTCHA_SITE_KEY; ?>" data-action="login" style="display: inline-block;"></div>
                           </div>
                           <div class="form_group half">
                              <label><a href="javascript:void(0)" class="text_gold modal_popup" data-id="forget"><?php echo getLang('Forgot_your_password'); ?>?</a></label>               
                              <button type="submit" class="btn_gold"><?php echo getLang('Login'); ?></button>
                           </div>
                           <div class="devider_secondary"></div>
                           <a href="javascript:void(0)" class="btn_line modal_popup allcaps regPops" data-id="register"><?php echo getLang('Create_an_account'); ?></a>
                        </form>
                     </div>
                  </div>
                  <?php } else { ?>
                  <div class="innerHeaderMenu">

                     <div class="profileButton">
                       <a href="javascript:void(0)" class="avatar_exsmall">
                          <img src="<?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo base_url().'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; }?>" alt="" srcset="<?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo base_url().'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 1x, <?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo base_url().'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 2x" alt="">
                       </a>
                       <div class="profileDropdown">
                         <div class="dropdownInnercont">

                           <div class="profileAvatar clearfix">
                              <a href="<?php echo base_url();?>profile" class="avatar_profile"><img src="<?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo base_url().'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; }?>" alt="" srcset="<?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo base_url().'assets/userfiles/'.$userDetials['path'].'/80/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 1x, <?php if(!empty($userDetials['filename']) && file_exists(FCPATH.'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension'])){ echo base_url().'assets/userfiles/'.$userDetials['path'].'/160/'.$userDetials['filename'].'.'.$userDetials['extension']; } else { echo base_url().'assets/images/default-avatar.jpg'; } ?> 2x" alt=""></a>
                              <h3><?php if(!empty($userDetials)){ echo $userDetials['username']; } ?></h3>
                              <?php $percent = profile_percent($this->session->userdata('user_id')); ?>
                              <?php if($percent<100){ ?>
                              <p><span id="profileParcent"><?php echo $percent.'%'; ?></span> <?php echo getLang('complete'); ?> <a href="<?php echo base_url().'setting';?>"><?php echo getLang('edit_your_profile'); ?></a></p>
                              <?php } else { ?>
                              <p class="user_verify_icon"><span class="user-auth-ico" data-tooltip="<?php echo getLang('User_is_verified'); ?>!"></span>  <?php echo strtoupper($userDetials['accounttype']); ?></p>
                              <?php } ?>
                           </div>
                            <div id="progressbarOuter"><span class="progressbar" style="width:<?php echo $percent.'%'; ?>;"></span></div>
                            <div class="devider_secondary"></div>
                            <a href="<?php echo base_url().'all-parties'; ?>"><h4><i class="fa fa-ticket"></i><?php echo getLang('Party_booking'); ?></h4></a>

                            <?php $checkMobileVerified = checkMobileVerified($this->session->userdata('user_id'));?>
                            <?php if(!empty($checkinEvents)){ 
                                  foreach ($checkinEvents as $checkins) { 
                                    if($checkins['created'] > time()) { ?>
                                    <p class="text_gold"><?php echo getLang('Booked'); ?></p>
                                    <p class="bookingInfo check_<?php echo $checkins['cart_id'];?>"><?php echo $checkins['title']; ?><span class="date"><?php echo date('d.m.Y',$checkins['created']); ?></span> <span class="badgeOrange">
                              <?php $checkinOrderData = getValue('shop_booking_details',array('cart_id'=>$checkins['cart_id']));
                                 if($checkMobileVerified==1){ 
                                    $chckin_url = base_url().'checkin/'.$checkins['alias'].'/'.base64_encode($checkins['cart_id']); 
                                 }else{ 
                                    $chckin_url = base_url().'setting'; 
                                 }
                                 $chckin_btn = getLang('Check_in');
                                 if($checkinOrderData){
                                    $checkinEventData = getValue('evt_events',array('id'=>$checkinOrderData['event_id']));
                                    if($checkinEventData){
                                       if($checkinEventData['is_postponed'] == 1){
                                          $chckin_url = 'javascript:void(0)';
                                          $chckin_btn = getLang('postponed');
                                       }
                                    }
                                 }
                              ?>
									<a href="<?php echo $$chckin_url; ?>" style="text-decoration:none"><?php echo $chckin_btn; ?></a>
									</span></p> 
                            <?php } } } ?>
                            <div class="devider_secondary"></div>


                              <a href="<?php echo base_url().'pictures'; ?>"><h4><i class="fa fa-camera"></i><?php echo getLang('Pictures'); ?></h4></a>
                              <div class="devider_secondary"></div>
                              <?php $partyDetails = partyDetails($this->session->userdata('user_id'));?>
                              <a href="<?php if($checkMobileVerified==1){ echo base_url().'invoice'; } else{ echo base_url().'setting'; } ?>" class="invoice"><h4><i class="fa fa-file-text-o"></i><?php echo getLang('Invoice'); ?> <?php if($partyDetails>0){ ?><span class="badgeOrange"><?php echo getLang('Party_Details'); ?></span><?php } elseif(!empty($unfinishedPayment)){ ?><span class="badgeRed"><?php echo count($unfinishedPayment).' '.getLang('Unfinished_payment'); ?></span><?php } ?></h4></a>
                              <div class="devider_secondary"></div>
                              <?php $newMembers = newMembers($this->session->userdata('user_id'));?>
                              <?php $Online = getAllValue('feu_userdetails',array('online_status'=>1));?>
                              <a href="<?php echo base_url().'members'; ?>"><h4><i class="fa fa-users"></i><?php echo getLang('Members'); ?> <?php if($newMembers>0){ ?><span class="badgeGreen"><?php echo $newMembers; ?></span><?php } ?> </h4></a>
                            

                            
                             
                             

                             <div class="devider_secondary"></div>
                             <?php $newContacts = newContacts($this->session->userdata('user_id'));?>
                             <a href="<?php echo base_url().'contacts'; ?>"><h4><i class="fa fa-phone"></i><?php echo getLang('Contacts'); ?><?php if($newContacts>0){ ?><span class="badgeGreen"><?php echo $newContacts; ?></span><?php } ?></h4></a>
                             <div class="devider_secondary"></div>
                             <?php $newMessage = newMessage($this->session->userdata('user_id'));?>
                             <a href="<?php echo base_url().'messages'; ?>"><h4><i class="fa fa-envelope"></i><?php echo getLang('Messages'); ?><?php if($newMessage>0){ ?><span class="badgeGreen"><?php echo $newMessage; ?></span><?php } ?></h4></a>
                             <div class="devider_secondary"></div>
                             <a href="<?php echo base_url().'setting'; ?>"><h4><i class="fa fa-gear"></i><?php echo getLang('Settings'); ?></h4></a>
                             <div class="devider_secondary"></div>
                             <a href="<?php echo base_url();?>profile/logout"><h4><i class="fa fa-power-off"></i><?php echo getLang('Logout'); ?></h4></a>
                        </div>
                       </div>
                     </div>

                     

                     <div class="menuBox">
                       <a href="javascript:void(0)">
                         <i class="fa fa-bell"></i>
                         <span class="indicator notify" style="display:none;"></span>
                       </a>
                       <ul class="messageBoxOuter">
                          <li class="msgbody mCustomScrollbar light" data-mcs-theme="minimal-dark">
                            <ul class="see_notification">

                            </ul>
                          </li>
                         

                       </ul>
                     </div>

                  </div>
                  <?php } ?>
                  <a href="<?php echo base_url();?>" class="logo"><img src="images/logocastle.svg" alt="" width="390"></a>
                  <a href="<?php echo base_url();?>" class="logo_mobile"><img src="images/castlecrown.svg" alt="" width="120"></a>
                  <nav class="nav-menu">
                     <ul>
                        <li class="menuli">
                           <a href="javascript:void(0)"><?php echo getLang('PARTYS'); ?></a>
                           <div class="submenu partymenu">
                              <ul>
                                  <?php if(!empty($upcomingEvents)){ 
                                       foreach ($upcomingEvents as $upcoming) {
                                       $file=getFiles($upcoming['file_id']);
                              //echo "assets/userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension'];
                                       //echo file_exists(FCPATH."assets/userfiles/".$file['path'].'/'.$file['filename'].'.'.$file['extension']);
                                       if(file_exists(FCPATH."assets/userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension']))
                                       {
                                          $filename = "userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension'];
                                       }
                                       else
                                       {
                                          $filename = "userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension'];
                                       }
                                       
                                   ?>
                                    <li>
                                    <?php 
                                    $postponed = 0;
                                    $url = base_url().'parties/'.$upcoming['alias'];
                                    $btn = getLang('Book_Now');
                                    $btnClass = 'bookpartybtn';
                                    if(isset($upcoming['is_postponed'])){ 
                                       if($upcoming['is_postponed'] == 1){
                                          $postponed = 1;
                                          $url = 'javascript:void(0)';
                                          $btn = getLang('postponed');
                                          $btnClass = 'reviewBtn';
                                       }
                                    }
                                    ?>
                                    <a href="<?php echo $url; ?>">
                                       <img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension'])){
                                       echo  base_url().'assets/userfiles/'.$file['path'].'/250/'.$file['filename'].'.'.$file['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$file['path'].'/500/'.$file['filename'].'.'.$file['extension'])){
                                       echo  base_url().'assets/userfiles/'.$file['path'].'/500/'.$file['filename'].'.'.$file['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$file['path'].'/750/'.$file['filename'].'.'.$file['extension'])){
                                       echo  base_url().'assets/userfiles/'.$file['path'].'/750/'.$file['filename'].'.'.$file['extension']; }  ?> 3x">
                                       
                                        <div class="navpartycont">
                                           <span class="partyTitle"><?php echo $upcoming['title']; ?></span>
                                           <span class="bookingDate"><?php echo date('d, M Y',$upcoming['time_from']); ?> </span>
                                           <span class="bookingLocation"><?php echo eventDetails($upcoming['id']); ?></span>
                                           <div class="btnarea">
                                           <?php 
                                           $upcomingdiscount = 0;
                                            if($upcoming['discount_end_date'])
                                            {
                                              if($upcoming['discount_end_date'] >= date('Y-m-d'))
                                              {
                                                $upcomingdiscount = $upcoming['discount']; 
                                              }
                                            }
                                            else
                                            {
                                              $upcomingdiscount = $upcoming['discount']; 
                                            }
                                           if($upcomingdiscount){ ?>
                                             <p class="entries"><span><?php echo getLang('Now'); ?> <?php echo $upcoming['discount']; ?>% <?php echo getLang('Discount'); ?></span><?php if($upcoming['discount_end_date']){ ?><span class="validDate"><?php echo getLang('Early_bird_price'); ?> <?php //echo date('d M Y',strtotime($upcoming['discount_end_date'])); ?></span><?php } ?></p>
                                           <?php } ?>  
                                           <?php if($upcoming['is_sold']==0){ ?>
                                             <button class="<?php echo $btnClass; ?>" ><?php echo $btn; ?></button>
                                           <?php } else{ ?>
                                             <button class="reviewBtn" ><?php echo getLang('Sold_Out'); ?></button>
                                           <?php } ?>  
                                           </div>
                                        </div> 
                                    </a>

                                        
                                        
                                        
                                      
                                    </li>
                                   <?php } } ?> 

                                    <?php if(!empty($lastEvents)){ 
                                       for($i=0;$i<(count($lastEvents)-count($upcomingEvents));$i++) {
                                       $files=getFiles($lastEvents[$i]['file_id']);
                                       if(file_exists(FCPATH."assets/userfiles/".$files['path'].'/250/'.$files['filename'].'.'.$files['extension']))
                                       {
                                          $filenames = "userfiles/".$files['path'].'/250/'.$files['filename'].'.'.$files['extension'];
                                       }
                                       else
                                       {
                                          $filenames = "userfiles/".$files['path'].'/250/'.$files['filename'].'.'.$files['extension'];
                                       }
                                      ?>
                                      <li>
                                     
                                    <?php 
                                    $postponed = 0;
                                    $url = base_url().'reviews/'.$lastEvents[$i]['alias'];
                                    $btn = getLang('Review');
                                    if(isset($lastEvents[$i]['is_postponed'])){ 
                                       if($lastEvents[$i]['is_postponed'] == 1){
                                          $postponed = 1;
                                          $url = 'javascript:void(0)';
                                          $btn = getLang('postponed');
                                       }
                                    }
                                    ?>
                                    <a href="<?php echo $url; ?>">
                                     <img src="<?php echo base_url().'assets/'.$filenames; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$files['path'].'/250/'.$files['filename'].'.'.$files['extension'])){
                                       echo  base_url().'assets/userfiles/'.$files['path'].'/250/'.$files['filename'].'.'.$files['extension']; } else { echo base_url().'assets/userfiles/img/parties/250/d6270806b4574d6bb1bea57386d4647b.jpg';} ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$files['path'].'/500/'.$files['filename'].'.'.$files['extension'])){
                                       echo  base_url().'assets/userfiles/'.$files['path'].'/500/'.$files['filename'].'.'.$files['extension']; } else { echo base_url().'assets/userfiles/img/parties/250/d6270806b4574d6bb1bea57386d4647b.jpg';}   ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$files['path'].'/750/'.$files['filename'].'.'.$files['extension'])){
                                       echo  base_url().'assets/userfiles/'.$files['path'].'/750/'.$files['filename'].'.'.$files['extension']; }else { echo base_url().'assets/userfiles/img/parties/250/d6270806b4574d6bb1bea57386d4647b.jpg';}   ?> 3x">
                                       <div class="navpartycont">
                                          <span class="partyTitle"><?php echo $lastEvents[$i]['title']; ?></span>
                                          <span class="bookingDate"><?php echo date('d, M Y',$lastEvents[$i]['time_from']); ?></span>
                                          <span class="bookingLocation"><?php echo eventDetails($lastEvents[$i]['id']); ?></span>
                                          
                                           <div class="btnarea">
                                           <button class="reviewBtn" href="<?php echo $url; ?>"><?php echo $btn; ?></button> 
                                          </div> 
                                       </div>
                                       

                                       </a>

                                                                       
                                     </li>
                                    <?php } } ?>
                              </ul>
                           </div>
                        </li>
                        <li class="menuli">
                           <a href="javascript:void(0)"><?php echo getLang('Insights'); ?></a>
                           <div class="submenu cmsSubmenu">
                              <ul>
                                <?php if(!empty($cms_pages_1)){ 
                                        foreach ($cms_pages_1 as $cms_1) {
                                         if(file_exists(FCPATH."assets/userfiles/".$cms_1['path'].'/250/'.$cms_1['filename'].'.'.$cms_1['extension']))
                                         {
                                            $filename = "userfiles/".$cms_1['path'].'/250/'.$cms_1['filename'].'.'.$cms_1['extension'];
                                         }
                                         else
                                         {
                                            $filename = "userfiles/img/menu/introduction-thumbnail.jpg";
                                         }
                                        ?>
                                          <li><a href="<?php echo base_url(); ?>events/<?php echo $cms_1['alias']; ?>"><img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$cms_1['path'].'/250/'.$cms_1['filename'].'.'.$cms_1['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_1['path'].'/250/'.$cms_1['filename'].'.'.$cms_1['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_1['path'].'/500/'.$cms_1['filename'].'.'.$cms_1['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_1['path'].'/500/'.$cms_1['filename'].'.'.$cms_1['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_1['path'].'/750/'.$cms_1['filename'].'.'.$cms_1['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_1['path'].'/750/'.$cms_1['filename'].'.'.$cms_1['extension']; }  ?> 3x"><div class="navpartycont"><span><?php echo $cms_1['title']; ?></span></div></a></li>
                                <?php } } ?>          
                              </ul>
                           </div>
                        </li>
                        <li class="menuli">
                           <a href="javascript:void(0)"><?php echo getLang('Community'); ?></a>
                           <div class="submenu cmsSubmenu">
                              <ul>
                                 <?php if(!empty($cms_pages_2)){ 
                                        foreach ($cms_pages_2 as $key=>$cms_2) {
                                         if(file_exists(FCPATH."assets/userfiles/".$cms_2['path'].'/250/'.$cms_2['filename'].'.'.$cms_2['extension']))
                                         {
                                            $filename = "userfiles/".$cms_2['path'].'/250/'.$cms_2['filename'].'.'.$cms_2['extension'];
                                         }
                                         else
                                         {
                                            $filename = "userfiles/img/menu/all-parties-thumbnail.jpg";
                                         }
                                         if($key<3)
                                         {
                                        ?>
                                        <li>
										<?php if($cms_2['alias']=='testimonial'){ ?>
										<a href="<?php echo base_url().'testimonials'; ?>">
										<?php } else { ?>
										<a href="<?php echo base_url(); ?>events/<?php echo $cms_2['alias']; ?>">
										<?php } ?>
										<img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$cms_2['path'].'/250/'.$cms_2['filename'].'.'.$cms_2['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_2['path'].'/250/'.$cms_2['filename'].'.'.$cms_2['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_2['path'].'/500/'.$cms_2['filename'].'.'.$cms_2['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_2['path'].'/500/'.$cms_2['filename'].'.'.$cms_2['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_2['path'].'/750/'.$cms_2['filename'].'.'.$cms_2['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_2['path'].'/750/'.$cms_2['filename'].'.'.$cms_2['extension']; }  ?> 3x"><div class="navpartycont"><span><?php echo $cms_2['title']; ?></span></div></a></li>  
                                <?php } } } ?> 
                              <li><a href="<?php echo base_url(); ?>testimonials"><img src="images/testimonials.jpg" alt=""><div class="navpartycont"><span><?php echo getLang('Feedbacks'); ?></span></div></a></li>
                              </ul>
                           </div>
                        </li>
                        <li class="menuli">
                           <a href="javascript:void(0)"><?php echo getLang('Shop'); ?></a>
                           <div class="submenu cmsSubmenu">
                              <ul>
                                  <?php if(!empty($cms_pages_3)){ 
                                        foreach ($cms_pages_3 as $cms_3) {
                                         if(file_exists(FCPATH."assets/userfiles/".$cms_3['path'].'/250/'.$cms_3['filename'].'.'.$cms_3['extension']))
                                         {
                                            $filename = "userfiles/".$cms_3['path'].'/250/'.$cms_3['filename'].'.'.$cms_3['extension'];
                                         }
                                         else
                                         {
                                            $filename = "userfiles/img/menu/map-of-parties-thumbnail.jpg";
                                         }
                                        ?>
                                        <li><a href="<?php echo base_url(); ?>events/<?php echo $cms_3['alias']; ?>"><img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$cms_3['path'].'/250/'.$cms_3['filename'].'.'.$cms_3['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_3['path'].'/250/'.$cms_3['filename'].'.'.$cms_3['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_3['path'].'/500/'.$cms_3['filename'].'.'.$cms_3['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_3['path'].'/500/'.$cms_3['filename'].'.'.$cms_3['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_3['path'].'/750/'.$cms_3['filename'].'.'.$cms_3['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_3['path'].'/750/'.$cms_3['filename'].'.'.$cms_3['extension']; }  ?> 3x"><div class="navpartycont"><span><?php echo $cms_3['title']; ?></span></div></a></li>  
                                <?php } } ?>
                                 <li><a href="<?php echo base_url(); ?>shops"><img src="userfiles/img/menu/book.jpg" alt=""><div class="navpartycont"><span><?php echo getLang('Book'); ?></span></div></a></li>
                              </ul>
                           </div>
                        </li>
                        
                        <li class="menuli">
                           <a href="javascript:void(0)"><?php echo getLang('About_Us'); ?></a>
                           <div class="submenu cmsSubmenu">
                              <ul>
                                 <?php if(!empty($cms_pages_4)){ 
                                        foreach ($cms_pages_4 as $cms_4) {
                                         if(file_exists(FCPATH."assets/userfiles/".$cms_4['path'].'/250/'.$cms_4['filename'].'.'.$cms_4['extension']))
                                         {
                                            $filename = "userfiles/".$cms_4['path'].'/250/'.$cms_4['filename'].'.'.$cms_4['extension'];
                                         }
                                         else
                                         {
                                            $filename = "userfiles/img/menu/history-thumbnail.jpg";
                                         }
                                        ?>
                                        <li><a href="<?php echo base_url(); ?>events/<?php echo $cms_4['alias']; ?>"><img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$cms_4['path'].'/250/'.$cms_4['filename'].'.'.$cms_4['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_4['path'].'/250/'.$cms_4['filename'].'.'.$cms_4['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_4['path'].'/500/'.$cms_4['filename'].'.'.$cms_4['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_4['path'].'/500/'.$cms_4['filename'].'.'.$cms_4['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_4['path'].'/750/'.$cms_4['filename'].'.'.$cms_4['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_4['path'].'/750/'.$cms_4['filename'].'.'.$cms_4['extension']; }  ?> 3x"><div class="navpartycont"><span><?php echo $cms_4['title']; ?></span></div></a></li>  
                                <?php } } ?>
                                      <li><a href="<?php echo base_url(); ?>newss"><img src="userfiles/img/menu/prices-thumbnail.jpg" alt=""><div class="navpartycont"><span><?php echo getLang('News'); ?></span></div></a></li>
                              </ul>
                           </div>
                        </li>
                     </ul>
                  </nav>
               </div>
            </header>
            <?php if(!empty($content)){ echo $content; } ?>
            
         </div>
         <div id="sideNav" class="side_nav">
            <h4>Menu <i class="fa fa-times-circle" id="closeSidenav"></i></h4>
            <ul class='maninMenu'>
               <li class="language has_submenu">
                  <a href="javascript:void(0)"><?php if(get_cookie('lang')){ $lang = getValue('sys_languages',array('id'=>get_cookie('lang'))); echo $lang['name']; } else { echo 'English'; } ?></a><i class="fa fa-angle-right"></i>
                  <div class="submenu">
                     <ul>
                        <?php if(!empty($languages)){
                           foreach ($languages as $lang) {
                        ?>
                        <li data-id="<?php echo $lang['id']; ?>" class="langCls"><a href="javascript:void(0)"><?php echo $lang['name']; ?></a></li>
                        <?php } } ?>
                        <form class="langFrm" action="<?php echo base_url(); ?>home/changelanguage" method="post">
                           <input type="hidden" class="lang" name="lang" value="">
                           <input type="hidden" id="requestURL" name="requestURL" value="<?php echo $this->uri->uri_string(); ?>">
                        </form>
                     </ul>
                  </div>

                   
               </li>
               <li class="has_submenu">
                  <a href="javascript:void(0)"><?php echo getLang('PARTYS'); ?></a> <i class="fa fa-angle-right"></i>
                  <div class="submenu">
                     <ul>
                        <?php if(!empty($upcomingEvents)){ 
                             foreach ($upcomingEvents as $upcoming) {
                             $file=getFiles($upcoming['file_id']);
                             //echo file_exists(FCPATH."assets/userfiles/".$file['path'].'/'.$file['filename'].'_thumb.'.$file['extension']);
                             if(file_exists(FCPATH."assets/userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension']))
                                       {
                                          $filename = "userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension'];
                                       }
                                       else
                                       {
                                          $filename = "userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension'];
                                       }
                             
                         ?>
                          <li>
                          <?php 
                           $postponed = 0;
                           $url = base_url().'parties/'.$upcoming['alias'];
                           $btn = getLang('Book_Now');
                           $btnClass = 'bookpartybtn';
                           if(isset($upcoming['is_postponed'])){ 
                              if($upcoming['is_postponed'] == 1){
                                 $postponed = 1;
                                 $url = 'javascript:void(0)';
                                 $btn = getLang('postponed');
                                 $btnClass = 'reviewBtn';
                              }
                           }
                           ?>
                              <a href="<?php echo $url; ?>"><img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$file['path'].'/250/'.$file['filename'].'.'.$file['extension'])){
                                       echo  base_url().'assets/userfiles/'.$file['path'].'/250/'.$file['filename'].'.'.$file['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$file['path'].'/500/'.$file['filename'].'.'.$file['extension'])){
                                       echo  base_url().'assets/userfiles/'.$file['path'].'/500/'.$file['filename'].'.'.$file['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$file['path'].'/750/'.$file['filename'].'.'.$file['extension'])){
                                       echo  base_url().'assets/userfiles/'.$file['path'].'/750/'.$file['filename'].'.'.$file['extension']; }  ?> 3x"><span><?php echo $upcoming['title']; ?></span></a>

                              <span class="bookingDate"><?php echo date('d, M Y',$upcoming['time_from']); ?></span>
                             <?php if($upcoming['is_sold']==0){ ?>
                                    <a class="<?php echo $btnClass; ?>" href="<?php echo $url; ?>"><?php echo $btn; ?></a>
                                 <?php } else{ ?>
                                    <a class="bookpartybtn" href="<?php echo base_url();?>parties/<?php echo $upcoming['alias']; ?>"><?php echo getLang('Sold_Out'); ?></a>
                                 <?php } ?>
                              <?php 
                                  $upcomingdiscount = 0;
                                   if($upcoming['discount_end_date'])
                                   {
                                     if($upcoming['discount_end_date'] >= date('Y-m-d'))
                                     {
                                       $upcomingdiscount = $upcoming['discount']; 
                                     }
                                   }
                                   else
                                   {
                                     $upcomingdiscount = $upcoming['discount']; 
                                   }
                                  if($upcomingdiscount){ ?>
                                    <p class="entries"><span><?php echo getLang('Now'); ?> <?php echo $upcoming['discount']; ?>% <?php echo getLang('Discount'); ?></span><?php if($upcoming['discount_end_date']){ ?><span class="validDate"><?php echo getLang('Early_bird_price'); ?> <?php //echo date('d M Y',strtotime($upcoming['discount_end_date'])); ?></span><?php } ?></p>
                              <?php } ?> 
                          </li>
                         <?php } } ?> 

                          <?php if(!empty($lastEvents)){ 
                             for($i=0;$i<(count($lastEvents)-count($upcomingEvents));$i++) {
                             $files=getFiles($lastEvents[$i]['file_id']);
                             if(file_exists(FCPATH."assets/userfiles/".$files['path'].'/250/'.$files['filename'].'.'.$files['extension']))
                                       {
                                          $filenames = "userfiles/".$files['path'].'/250/'.$files['filename'].'.'.$files['extension'];
                                       }
                                       else
                                       {
                                          $filenames = "userfiles/".$files['path'].'/250/'.$files['filename'].'.'.$files['extension'];
                                       }
                            ?>
                            <li>
                            <?php 
                              $postponed = 0;
                              $url = base_url().'reviews/'.$lastEvents[$i]['alias'];
                              $btn = getLang('Review');
                              if(isset($lastEvents[$i]['is_postponed'])){ 
                                 if($lastEvents[$i]['is_postponed'] == 1){
                                    $postponed = 1;
                                    $url = 'javascript:void(0)';
                                    $btn = getLang('postponed');
                                 }
                              }
                              ?>
                           <a href="<?php echo $url; ?>"><img src="<?php echo base_url().'assets/'.$filenames; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$files['path'].'/250/'.$files['filename'].'.'.$files['extension'])){
                                       echo  base_url().'assets/userfiles/'.$files['path'].'/250/'.$files['filename'].'.'.$files['extension']; }else { echo base_url().'assets/userfiles/img/parties/250/d6270806b4574d6bb1bea57386d4647b.jpg';}  ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$files['path'].'/500/'.$files['filename'].'.'.$files['extension'])){
                                       echo  base_url().'assets/userfiles/'.$files['path'].'/500/'.$files['filename'].'.'.$files['extension']; }else { echo base_url().'assets/userfiles/img/parties/250/d6270806b4574d6bb1bea57386d4647b.jpg';}   ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$files['path'].'/750/'.$files['filename'].'.'.$files['extension'])){
                                       echo  base_url().'assets/userfiles/'.$files['path'].'/750/'.$files['filename'].'.'.$files['extension']; } else { echo base_url().'assets/userfiles/img/parties/250/d6270806b4574d6bb1bea57386d4647b.jpg';}  ?> 3x"><span><?php echo $lastEvents[$i]['title']; ?></span></a>
                            <span class="bookingDate"><?php echo date('d, M Y',$lastEvents[$i]['time_from']); ?></span>
                           <a class="<?php echo $btnClass; ?>" href="<?php echo $url; ?>"><?php echo $btn; ?></a>   
                           </li>
                          <?php } } ?>
                      </ul>
                  </div>
               </li>
               <li class="has_submenu">
                  <a href="javascript:void(0)"><?php echo getLang('Insights'); ?></a><i class="fa fa-angle-right"></i>
                  <div class="submenu">
                      <ul>
                        <?php if(!empty($cms_pages_1)){ 
                                  foreach ($cms_pages_1 as $cms_1) {
                                   if(file_exists(FCPATH."assets/userfiles/".$cms_1['path'].'/250/'.$cms_1['filename'].'.'.$cms_1['extension']))
                                   {
                                      $filename = "userfiles/".$cms_1['path'].'/250/'.$cms_1['filename'].'.'.$cms_1['extension'];
                                   }
                                   else
                                   {
                                      $filename = "userfiles/img/menu/introduction-thumbnail.jpg";
                                   }
                                  ?>
                                    <li><a href="<?php echo base_url(); ?>events/<?php echo $cms_1['alias']; ?>"><img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$cms_1['path'].'/250/'.$cms_1['filename'].'.'.$cms_1['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_1['path'].'/250/'.$cms_1['filename'].'.'.$cms_1['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_1['path'].'/500/'.$cms_1['filename'].'.'.$cms_1['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_1['path'].'/500/'.$cms_1['filename'].'.'.$cms_1['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_1['path'].'/750/'.$cms_1['filename'].'.'.$cms_1['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_1['path'].'/750/'.$cms_1['filename'].'.'.$cms_1['extension']; }  ?> 3x"><span><?php echo $cms_1['title']; ?></span></a></li>
                        <?php } } ?>
                     </ul>
                  </div>
               </li>
               <li class="has_submenu">
                  <a href="javascript:void(0)"><?php echo getLang('Community'); ?></a><i class="fa fa-angle-right"></i>
                  <div class="submenu">
                     <ul>
                        <?php if(!empty($cms_pages_2)){ 
                                        foreach ($cms_pages_2 as $key=>$cms_2) {
                                         if(file_exists(FCPATH."assets/userfiles/".$cms_2['path'].'/250/'.$cms_2['filename'].'.'.$cms_2['extension']))
                                         {
                                            $filename = "userfiles/".$cms_2['path'].'/250/'.$cms_2['filename'].'.'.$cms_2['extension'];
                                         }
                                         else
                                         {
                                            $filename = "userfiles/img/menu/all-parties-thumbnail.jpg";
                                         }
                                         if($key<3)
                                         {
                                        ?>
                                        <li>
										<?php if($cms_2['alias']=='testimonial'){ ?>
										<a href="<?php echo base_url().'testimonials'; ?>">
										<?php } else { ?>
										<a href="<?php echo base_url(); ?>events/<?php echo $cms_2['alias']; ?>">
										<?php } ?>
										<img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$cms_2['path'].'/250/'.$cms_2['filename'].'.'.$cms_2['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_2['path'].'/250/'.$cms_2['filename'].'.'.$cms_2['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_2['path'].'/500/'.$cms_2['filename'].'.'.$cms_2['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_2['path'].'/500/'.$cms_2['filename'].'.'.$cms_2['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_2['path'].'/750/'.$cms_2['filename'].'.'.$cms_2['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_2['path'].'/750/'.$cms_2['filename'].'.'.$cms_2['extension']; }  ?> 3x"><span><?php echo $cms_2['title']; ?></span></a></li>  
                                <?php } } } ?>
                              <li><a href="<?php echo base_url(); ?>testimonials"><img src="images/testimonials.jpg" alt=""><div class="navpartycont"><span><?php echo getLang('Feedbacks'); ?></span></div></a></li>
                     </ul>
                  </div>
               </li>
               <li class="has_submenu">
                  <a href="javascript:void(0)"><?php echo getLang('Shop'); ?></a><i class="fa fa-angle-right"></i>
                  <div class="submenu">
                     <ul>
                        <?php if(!empty($cms_pages_3)){ 
                                        foreach ($cms_pages_3 as $cms_3) {
                                         if(file_exists(FCPATH."assets/userfiles/".$cms_3['path'].'/250/'.$cms_3['filename'].'.'.$cms_3['extension']))
                                         {
                                            $filename = "userfiles/".$cms_3['path'].'/250/'.$cms_3['filename'].'.'.$cms_3['extension'];
                                         }
                                         else
                                         {
                                            $filename = "userfiles/img/menu/map-of-parties-thumbnail.jpg";
                                         }
                                        ?>
                                        <li><a href="<?php echo base_url(); ?>events/<?php echo $cms_3['alias']; ?>"><img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$cms_3['path'].'/250/'.$cms_3['filename'].'.'.$cms_3['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_3['path'].'/250/'.$cms_3['filename'].'.'.$cms_3['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_3['path'].'/500/'.$cms_3['filename'].'.'.$cms_3['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_3['path'].'/500/'.$cms_3['filename'].'.'.$cms_3['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_3['path'].'/750/'.$cms_3['filename'].'.'.$cms_3['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_3['path'].'/750/'.$cms_3['filename'].'.'.$cms_3['extension']; }  ?> 3x"><span><?php echo $cms_3['title']; ?></span></a></li>  
                                <?php } } ?>
                                <li><a href="<?php echo base_url(); ?>shops"><img src="userfiles/img/menu/book.jpg" alt=""><span><?php echo getLang('Book'); ?></span></a></li>
                                
                     </ul>
                  </div>
               </li>
               <li class="has_submenu">
                  <a href="javascript:void(0)"><?php echo getLang('About_Us'); ?></a><i class="fa fa-angle-right"></i>
                  <div class="submenu">
                     <ul>
                        <?php if(!empty($cms_pages_4)){ 
                                        foreach ($cms_pages_4 as $cms_4) {
                                         if(file_exists(FCPATH."assets/userfiles/".$cms_4['path'].'/250/'.$cms_4['filename'].'.'.$cms_4['extension']))
                                         {
                                            $filename = "userfiles/".$cms_4['path'].'/250/'.$cms_4['filename'].'.'.$cms_4['extension'];
                                         }
                                         else
                                         {
                                            $filename = "userfiles/img/menu/history-thumbnail.jpg";
                                         }
                                        ?>
                                        <li><a href="<?php echo base_url(); ?>events/<?php echo $cms_4['alias']; ?>"><img src="<?php echo base_url().'assets/'.$filename; ?>" alt="" srcset="<?php if(file_exists(FCPATH."assets/userfiles/".$cms_4['path'].'/250/'.$cms_4['filename'].'.'.$cms_4['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_4['path'].'/250/'.$cms_4['filename'].'.'.$cms_4['extension']; } ?> 1x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_4['path'].'/500/'.$cms_4['filename'].'.'.$cms_4['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_4['path'].'/500/'.$cms_4['filename'].'.'.$cms_4['extension']; }  ?> 2x, <?php if(file_exists(FCPATH."assets/userfiles/".$cms_4['path'].'/750/'.$cms_4['filename'].'.'.$cms_4['extension'])){
                                       echo  base_url().'assets/userfiles/'.$cms_4['path'].'/750/'.$cms_4['filename'].'.'.$cms_4['extension']; }  ?> 3x"><span><?php echo $cms_4['title']; ?></span></a></li>  
                                <?php } } ?>
                                      <li><a href="<?php echo base_url(); ?>newss"><img src="userfiles/img/menu/prices-thumbnail.jpg" alt=""><span><?php echo getLang('News'); ?></span></a></li>
                     </ul>
                  </div>
               </li>
               <li class="has_submenu">
                  <a href="<?php echo base_url('terms'); ?>"><?php echo getLang('Imprint'); ?></a>
                  <!-- <a href="javascript:void(0)" class="modal_popup" data-id="contact"><?php echo getLang('Imprint'); ?></a> -->
               </li>
            </ul>
         </div>
      </div>
      <?php if(($this->uri->segment(1)=='home' && $this->uri->segment(2)=='index') || $this->uri->segment(1)=='' ) { ?>
      <!-- <section class="support_box">
         <a href="javascript:void(0)" class="modal_popup" data-id="contact">
         <img src="images/support-box-ico.png" alt="">
         <span><?php //echo getLang('How_can_I_help_you'); ?></span>
         </a>
      </section> -->

      <?php } ?>
      <input id="baseUrl" name="baseUrl" type="hidden" value="<?php echo base_url(); ?>">
      <!--Cookie Modal-->
      <div class="cookiemask" style="display:none">
         <div class="cookie_container" id="cookie_modal" style="display:none;">
            <span class="cookie_close"><img src="<?php echo base_url().'assets/images/cancel.png'?>"></span> 
            <div>
            <?php
               $langId = 2;
               if(get_cookie('lang'))
               {
                  $langId = get_cookie('lang');
               }
               $privacy = getValue('privacy_policy',array('lang_id'=>$langId));
               if($privacy['content']=='')
               {
                  $privacy = getValue('privacy_policy',array('lang_id'=>2));
               }
            ?>   
               <h2><?php echo getLang('Privat_Policy'); ?></h2>
               <p><?php echo $privacy['content']; ?></p>
            </div>
         </div>
      </div>
      <!--Cookie Modal-->
      <!--Terms Modal -->
         <?php if($this->session->userdata('user_id')){ 
               $userDATA = getValue('feu_userdetails',array('user_id'=>$this->session->userdata('user_id')));
         ?>

         <div class="modal_container big" <?php if($userDATA['accept_terms']==1){ echo 'style="display:none"'; }else{ echo 'style="display:block"'; }?>>
            <div>   
               <span class="terms-modal"  id="terms_content" >
                  <h2><?php echo getLang('terms_and_conditions'); ?></h2>
                  <div class="center" style="max-height: 350px; overflow-y: auto; display: block; ">
                     <?php
                        $langId = 2;
                        if(get_cookie('lang'))
                        {
                           $langId = get_cookie('lang');
                        }
                        $terms = getValue('std_contents',array('lang_id'=>$langId));
                     ?>
                       <p><?php echo $terms['text']; ?></p>
                  </div>
               </span>
               <span class="terms-modal" id="privacy_content" style="display:none;">
                  <h2><?php echo getLang('Privat_Policy'); ?></h2>
                  <div class="center" style="max-height: 350px; overflow-y: auto; display: block; ">
                     <?php
                        $langId = 2;
                        if(get_cookie('lang'))
                        {
                           $langId = get_cookie('lang');
                        }
                        $privacy = getValue('privacy_policy',array('lang_id'=>$langId));
                        if($privacy['content']=='')
                        {
                           $privacy = getValue('privacy_policy',array('lang_id'=>2));
                        }
                        
                     ?>
                       <p><?php echo $privacy['content']; ?></p>
                  </div>
               </span>
               <div class="form_group text_center" style="padding: 25px 0px 15px; text-align: center;">
                  <label><input type="checkbox" id="checkboxTermsPops" checked> 
                  <?php if(get_cookie('lang')==1){ ?>
                  Ich habe gelesen, verstehe und akzeptiere die <a style="text-decoration: underline;" href="javascript:void(0);" class="terms_link">allgemeinen Geschäftsbedingungen</a> sowie den <a style="text-decoration: underline;" href="javascript:void(0);" class="privacy_link">Datenschutz.</a>
                  <?php } ?>
                  <?php if(get_cookie('lang')==2 || get_cookie('lang')==''){ ?>
                   I read, understand and accept the <a style="text-decoration: underline;" href="javascript:void(0);" class="terms_link">terms and conditions</a> <a style="text-decoration: underline;" href="javascript:void(0);" class="privacy_link">privacy policy.</a>
                  <?php } ?>
                  <?php if(get_cookie('lang')==3){ ?>
                  He leido, entiendo y acepto los <a style="text-decoration: underline;" href="javascript:void(0);" class="terms_link">términos y condiciones</a> <a style="text-decoration: underline;" href="javascript:void(0);" class="privacy_link">política de privacidad.</a>
                  <?php } ?>
                  </label>                 
               </div>
               <div class="text_center" style="">
                  <button type="button" class="btn_gold accept_terms_policy"><?php echo getLang('Accept'); ?></button>
               </div>
            </div>
         </div>
         
         <div class="modalmaskTerms" <?php if($userDATA['accept_terms']==1){ echo 'style="display:none"'; }else{ echo 'style="display:block"'; }?>></div>
         <?php } ?>
   <!--Terms Modal -->
      <!--Contact Modal -->
         <div class="modal_container" id="contact_modal">
            <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            
            <form id="contactFrm">
               <h2><?php echo getLang('Contact'); ?><span><a href="<?php echo  base_url().'terms'?>" target="_blank"><?php echo getLang('Imprint_Terms'); ?></a></span></h2>
               <!--<p>CONTACT US, WE WILL REPLY AS SOON AS POSSIBLE</p>-->
               <div class="form_group">
                  <label for="#err" class="contact_err" style="color:red;"></label>
               </div>
               <div class="form_group" <?php if($this->session->userdata('user_id')){ echo 'style="display:none;"'; } ?>>
                  <label for="emailId"><?php echo getLang('Your_E_Mail'); ?>  </label>
                  <input type="text" id="contactEmail" name="contactEmail" value="<?php if($this->session->userdata('user_id') && !empty($loginDetails)){ echo $loginDetails[0]['email']; } ?>" placeholder="<?php echo getLang('EMAIL'); ?>">
               </div>
               <div class="form_group">
                  <label for="Password"><?php echo getLang('Message'); ?> </label>
                  <textarea id="message" name="message" placeholder="<?php echo getLang('Type_your_message'); ?>"></textarea>
               </div>
               <div class="contactusTeam">
                 <p class="allcaps text_gold"><?php echo getLang('One_of_our_team_will_reply_as_soon_as_possible'); ?></p>
                  <div class="avatar_profile"><img src="images/profile_roxanne.jpg" alt=""><span>Roxanne</span></div>
                  <div class="avatar_profile"><img src="images/profile_vale.jpg" alt=""><span>Sophie</span></div>
                  <button type="button" class="btn_gold contactSend"><?php echo getLang('Send'); ?></button>                  
               </div>               
                
               
            </form>
            <span id="contactSuccess" style="display:none;">
               <h2><?php echo getLang('Contact_Successful'); ?></h2>
               <div class="center">
                    <p><?php echo getLang('Thanks_you_for_contacted_us'); ?>. <br/><?php echo getLang('Your_message_successfully_send_to_Castleevents'); ?>.<br><?php echo getLang('We_will_contact_you_soon'); ?>.</p>
               </div>
            </span>
         </div>


		<!-------------------------------Feedback---------------------------------->
		<?php if($this->session->userdata('user_id')){?>
		 <div class="modal_container" id="feedback_modal">
            <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            
            <form id="feedbackFrm" enctype="multipart/form-data">
               <h2><?php echo getLang('POST_YOUR_FEEDBACK'); ?></h2>
               <!--<p>CONTACT US, WE WILL REPLY AS SOON AS POSSIBLE</p>-->
               <div class="form_group">
                  <label for="#err" class="feedback_err" style="color:red;"></label>
               </div>
               <div class="form_group">
                  <label for="emailId"><?php echo getLang('USERNAME'); ?>  </label>
                  <input type="text" id="feedbackUsername" name="feedbackUsername" value="" placeholder="<?php echo getLang('USERNAME'); ?>">
               </div>
               <div class="form_group">
                  <label for="Password"><?php echo getLang('Feedback'); ?> </label>
                  <textarea id="feedback" name="feedback" placeholder="<?php echo getLang('Feedback'); ?>"></textarea>
               </div>
			   <div class=" margin_top30">
			     <div class="uplod">
                     <input type="file" id="feedbackPic" name="feedbackPic">
                     <label type="button" class="btn_upload" for="feedbackPic">Upload Picture </label>
				</div>
				 <button type="submit" class="btn_gold feedbackSend"><?php echo getLang('Send'); ?></button> 
                  </div>
                           
                
               
            </form>
            <span id="feedbackSuccess" style="display:none;">
               <h2><?php echo getLang('Feedback_Successful'); ?></h2>
               <div class="center">
                    <p><?php echo getLang('Your_feedback_successfully_send_to_Castleevents'); ?>.</p>
               </div>
            </span>
         </div>


         <!--Bounced modal section-->
        <?php if($userDetials['email_status']=='bounced' && $userDetials['accept_terms']==1){ ?>
         <a href="javascript:void(0)" style="display:none;" class="bounced_button text_gold modal_popup" data-id="bounced">bounced</a>
         <!--Unsubscribe Success Modal -->
         <div class="modal_container" id="bounced_modal">
            <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            
            <form id="bouncedFrm">
               <h2><?php echo getLang('Newsletter_Email'); ?></h2>
               <div class="form_group">
                  <label for="#err" class="bounced_err" style="color:red;"></label>
               </div>
               <div class="form_group" >
                  <label for="emailId"><?php echo getLang('Your_E_Mail'); ?>  </label>
                  <input type="text" id="bouncedEmail" name="bouncedEmail"  placeholder="<?php echo getLang('EMAIL'); ?>">
               </div>
               <button type="button" class="btn_gold bouncedSend"><?php echo getLang('Send'); ?></button>
            </form>
            <span id="bouncedSuccess" style="display:none;">
               <h2><?php echo getLang('Newletter_email_register_successful'); ?></h2>
               <div class="center">
                    <p><?php echo getLang('Thanks_you'); ?> <br/><?php echo getLang('Your_new_email_has_been_registered_with_newsletter'); ?>.</p>
               </div>
            </span>
         </div>
         <?php } ?>

         

		 <?php } ?>
		<!-------------------------------Feedback---------------------------------->

	<div class="modalmask"></div>



      <?php if(!$this->session->userdata('user_id')){ ?>
      <section class="all_popups">
         <div class="modal_container register" id="register_modal" >
            <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            <form id="registrationFrm">
              <div id="Step_01" class="dismissPopup" >
               <h2><?php echo getLang('Register'); ?> <span>1/2</span></h2>
                <div class="center">
                 <p><?php echo getLang('Please_choose_your_wished_account_type'); ?></p>
                  <ul class="account_type">

                     <li data-id="couple">
                       <a href="javascript:void(0)">
                         <img src="images/registration-couple.jpg" alt="">
                           <div class="contentHolder">
                              <span><?php echo getLang('Couple'); ?></span>
                           </div>
                        </a>
                     </li>

                     <li data-id="lady">
                       <a href="javascript:void(0)">
                          <img src="images/registration-lady.jpg" alt="">
                            <div class="contentHolder">
                                <span><?php echo getLang('Lady'); ?></span>                                 
                             </div>
                        </a>
                     </li>

                     <li data-id="gentleman">
                       <a href="javascript:void(0)">
                         <img src="images/registration-gentleman.jpg" alt="">
                           <div class="contentHolder">
                             <span><?php echo getLang('Gentleman'); ?></span>
                           </div>
                        </a>
                     </li>

                  </ul>
                  </div>
              </div>

              <div id="Step_02" class="dismissPopup" style="display:none;">
                 <h2><?php echo getLang('Register'); ?> <span>1/2</span></h2>
                 <div class="center">
                 </div>
                 
                  <div class="form_group">
                       <label for="username"><?php echo getLang('Please_choose_a_username_as_identification_for_your'); ?> <span class="accountType"><?php echo getLang('Lady'); ?></span> <?php echo getLang('account'); ?> </label>
                       <input id="regusername" name="regusername" placeholder="<?php echo getLang('USERNAME'); ?>" type="text">
                  </div>
                  <p class="regError"></p>
                 <button type="button" class="btn_gold" id="checkAvailability"><?php echo getLang('Check_availability'); ?></button>
                 <button type="button" class="btn_gold" id="continueStep" style="display:none;"><?php echo getLang('Continue'); ?></button>
              </div>

              <div id="Step_03" class="dismissPopup" style="display:none">
                 <h2><?php echo getLang('Register'); ?> <span>2/2</span></h2>                 
                  <div class="center">
                  <p class="regError" style="color:red;"></p>
                    
                    <div class="form_group">
                       <label for="username"><?php echo getLang('Your_E_Mail__you_will_receive_a_verification_mail'); ?></label>
                       <input id="accounttype" name="accounttype" type="hidden">
                       <input id="existEmail" name="existEmail" type="hidden" value="0">
                       
                       <input id="existUsername" name="existUsername" type="hidden" value="0">
                       <input id="regemail" name="regemail" placeholder="<?php echo getLang('EMAIL'); ?>" type="email">
                    </div>
                    <div class="form_group">
                       <label for="username"><?php echo getLang('your_wished_Password__min_6_letters'); ?></label>
                       <input id="regpassword" name="regpassword" placeholder="<?php echo getLang('PASSWORD'); ?>" type="password">
                    </div>
                    <div class="form_group text_center">
                     <label><input type="checkbox" id="checkbox"> <?php echo getLang('I_read__understand_and_accept_the'); ?> <a href="<?php echo base_url().'terms'; ?>" target="_blank"><?php echo getLang('terms_and_conditions'); ?></a> <a href="<?php echo base_url().'privacy'; ?>" target="_blank"><?php echo strtolower(getLang('Privat_Policy')); ?>.</a></label>                 
                     </div>
                     <div class="form_group text_center">
                        <div class="g-recaptcha" data-sitekey="<?php echo RECAPTCHA_SITE_KEY; ?>" data-action="register" style="display: inline-block;"></div>
                     </div>
                  <div class="text_center">
                  <button type="button" class="btn_gold" id="register"><?php echo getLang('Register'); ?></button>
                  </div>
                 </div>
              </div>

              <div id="Step_04" class="dismissPopup" style="display:none;">
                 <h2><?php echo getLang('Register'); ?> <span>2/2</span></h2>
                 <div class="center">
                 <p><?php echo getLang('Dear'); ?></p>
                 </div>
                 <h3 class="setUsername"></h3>
                 <div class="center">
                 <p class="allcaps setEmail"></p>
                 <p class="text_white allcaps"><?php echo getLang('if_you_cant_find_any_mail__please_check_in_your_trash_folder_or_contact_us'); ?></p>
                 </div>                
              </div>
            </form>
         </div>

         <!--Registation Success Modal -->
         <div class="modal_container" id="success_modal">
         <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            <h2><?php echo getLang('Registration_Successful'); ?></h2>
            <div class="center">
               <p class="text_gold"><?php echo getLang('Dear'); ?></p>
            </div>
            <h3><?php if($this->session->userdata('success_pop')) { echo $this->session->userdata('success_pop'); } ?></h3>
            <div class="center"> 
                 <p class="text_white allcaps"><?php echo getLang('Your_e_mail_address_has_been_successfully_validated'); ?></p>
            </div>
         </div>

         

         <!--Forget Password Modal -->
         <div class="modal_container" id="forget_modal">
            <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            
            <form id="forgetFrm">
               <h2><?php echo getLang('Forget_Password'); ?></h2>
               <div class="form_group">
                  <label for="#err" class="forget_err" style="color:red;"></label>
               </div>
               <div class="form_group" >
                  <label for="emailId"><?php echo getLang('Your_E_Mail'); ?>  </label>
                  <input type="text" id="forgetEmail" name="forgetEmail"  placeholder="<?php echo getLang('EMAIL'); ?>">
               </div>
               <div class="form_group text_center">
                  <div class="g-recaptcha" data-sitekey="<?php echo RECAPTCHA_SITE_KEY; ?>" data-action="forget" style="display: inline-block;"></div>
               </div>
               <button type="button" class="btn_gold forgetSend"><?php echo getLang('Send'); ?></button>
            </form>
            <span id="forgetSuccess" style="display:none;">
               <h2>Forget Password Successful</h2>
               <div class="center">
                    <p><?php echo getLang('Thanks_you'); ?> <br/><?php echo getLang('Your_new_password_has_been_send_to_your_registered_email'); ?>.</p>
               </div>
            </span>
         </div>

         <!--Newsletter modal section-->
        
         <a href="javascript:void(0)" style="display:none;" class="unsubscribe_button text_gold modal_popup" data-id="unsubscribe">unsubscribe</a>
         <!--Unsubscribe Success Modal -->
         <div class="modal_container" id="unsubscribe_modal">
         <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            <?php if($this->session->userdata('unsubscribe')){ ?>
            <form id="unsubFrm">
               <h2><?php echo getLang('Unsubscribe'); ?></h2>
               <div class="form_group">
                  <label for="#err" class="unsub_err" style="color:red;"></label>
               </div>
               <div class="form_group" >
                  <label for="emailId"><?php echo getLang('Your_E_Mail'); ?>  </label>
                  <input type="text" id="unsubEmail" name="unsubEmail"  placeholder="<?php echo getLang('EMAIL'); ?>">
                  <input type="hidden" id="list_id" name="list_id"  value="<?php echo $this->session->userdata('unsubscribe'); ?>">
               </div>
               <div class="form_group" >
                  <label for="emailId"><?php echo getLang('Your_Password'); ?>  </label>
                  <input type="password" id="unsubPassword" name="unsubPassword"  placeholder="<?php echo getLang('PASSWORD'); ?>">
               </div>
               <button type="button" class="btn_gold unsubSend"><?php echo getLang('Send'); ?></button>
            </form>
            <div class="unsub_succ" style="display:none;">
            <h2><?php echo getLang('Unsubscribe_Successful'); ?></h2>
               <div class="center">
                  <p class="text_gold"><?php echo getLang('Dear'); ?></p>
               </div>
               <h3></h3>
               <div class="center"> 
                    <p class="text_white allcaps"><?php echo getLang('Your_e_mail_address_has_been_successfully_unsubscribe'); ?></p>
               </div>
            </div>
            <?php } ?>
         </div>


         <!--Newsletter language modal section-->
        
         <a href="javascript:void(0)" style="display:none;" class="lang_button text_gold modal_popup" data-id="lang">lang</a>
         <!--Unsubscribe Success Modal -->
         <div class="modal_container" id="lang_modal">
         <span class="modal_close"><i class="fa  fa-times-circle-o"></i></span>
            <?php if($this->session->userdata('lang_pop')){ ?>
            <h2>Languages</h2>
               <div class="form_group">
                  <label for="#err" class="unsub_err" style="color:red;"></label>
               </div>
               <div class="form_group" >
               <form id="langPopFrm">
                  <label for="emailId"><?php echo getLang('Your_preffered_language'); ?>  </label>
                  <ul>
                  <?php if(!empty($languages)){
                           foreach ($languages as $lang) {
                        ?>
                        <li class=""><input type="radio" name="langPop" <?php if($lang['id']==2){ echo 'checked'; } ?> value="<?php echo $lang['id']; ?>"><?php echo $lang['name']; ?></li>
                        <?php } } ?>
                        </ul>
               </form>
               </div>
               <button type="button" class="btn_gold langSend"><?php echo getLang('Send'); ?></button>
            
            <?php } ?>
         </div>


         

         

         
         <button class="modal_popup success" data-id="success" style="display:none"></button>
      </section>
      <?php } ?>

      <?php if(($this->uri->segment(1)=='home' && $this->uri->segment(2)=='index') || $this->uri->segment(1)=='' ) { ?>
         <!--no html-->
      <?php } else { ?>
         <ul class="footerLinks">
            <li><a href="<?php echo base_url().'terms'; ?>"><?php echo getLang('Imprint_Terms'); ?></a></li>
            <li><a href="<?php echo base_url().'privacypolicy'; ?>"><?php echo getLang('Privat_Policy'); ?></a></li>
            <li><a href="<?php echo base_url().'job'; ?>"><?php echo getLang('Jobs'); ?></a></li>
            <li><a href="<?php echo base_url().'sitemaps'; ?>"><?php echo getLang('Sitemap'); ?></a></li>
         </ul>
      <?php } ?>
      <?php if(!$this->session->userdata('user_id') && get_cookie('site_cookie')==''){ ?>
         <div class="cookieFooter">
           We use cookies, as explained in our <a href="javascript:void()" class="cookie_popup cookie_anchor" data-id="cookie">cookie notice</a>. By visiting our site you consent to our use of cookies.
           <a href="javascript: void()" class="cookie_accept">
           <button class="btnDark">ok</button>
         </div>
      <?php } ?>
      <div class="notifi btn down" style="display:none;">fadeInDown</div><div class="notifi btn up"  style="display:none;">fadeOutUp</div>          
      <script src="js/jquery.min.js"></script>
      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script> 
      <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css">
      <script src="js/scripts.js"></script>
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.4/croppie.min.css" integrity="sha256-/n6IXDwJAYIh7aLVfRBdduQfdrab96XZR+YjG42V398=" crossorigin="anonymous" />
   </body>
</html>

<script type="text/javascript">
	window.onload = function () {
		var wookmark1 = new Wookmark('#wookmark1', {
		outerOffset: 5 // Optional, the distance to the containers border
		//itemWidth: 210 // Optional, the width of a grid item
		});
		
    };
    /*********New Notification****************/ 
     (function () {

          'use strict';
          $(document).find('.notification').remove();
          var position = 3;
           var title = '';
         <?php if($this->session->userdata('Freemessage')){ ?>
            title = "<?php echo getLang('Please_continue_and_complete_your_profile_settings');?>";
         <?php } ?>
          $('.shownotify').click(function(){
            title = "<?php echo getLang('Please_upgrade_membership');?>";
            $('.down').click();
         })
          
          $('.notifi').click(function (event) {
              Notification.create(
                  title,
                  "",
                  "",
                  $(event.target).text(),
                  position
              );
          });
          <?php if($this->session->userdata('Freemessage')){ ?>
            $('.down').click();
         <?php $this->session->unset_userdata('Freemessage'); } ?>
          $(function () {
              $('.position').click(function (event) {
                  var el = $(event.target);
                  $('.position').removeClass('selected');
                  el.addClass('selected');
                  position = el.attr('data-position');
              });
          });
          $('body').on('click','.dismiss',function (event) {
               $(document).find('.notification-' + $(this).data('id')).addClass('animated fadeOutUp').appendTo('body');
               setTimeout(function(){
                  $(document).find('.notification-' + $(this).data('id')).remove();
               },1000);
          });


          

      }());
    /*********New Notification****************/
    $(document).ready(function(){
      $('.cookie_accept').click(function(){
         $.ajax({
            url: "<?php echo base_url().'home/acceptcookie'; ?>",
            type: 'POST',
            success: function(res)
            {
               window.location.reload();
            }
         })
      })
      $('.accept_terms_policy').click(function(){
         if($('#checkboxTermsPops').is(':checked'))
         {
            window.location.href="<?php echo base_url(); ?>home/acceptterms";
         }
      })
      
      $('.terms_link').click(function(){
         $('#terms_content').show();
         $('#privacy_content').hide();
      })
      $('.privacy_link').click(function(){
         $('#terms_content').hide();
         $('#privacy_content').show();
      })
      

      $("#moblist").mCustomScrollbar({
            scrollButtons:{
                     enable:true
                  },
            callbacks:{
               onTotalScroll:function(){ 
                  var data = $('.more_user').data('id');
                  $('.more_user').parent().remove();
                  $('.ajax-loader_msg').show();
                  $('.ajax-loader_msg').css('visibility','visible');
                  if(data>0)
                  {
                     $.ajax({
                       url: '<?php echo base_url();?>profile/getmorefriend',
                       type: 'POST',
                       data: 'data='+data,
                       success: function(res)
                       {
                         $('.ajax-loader_msg').css('visibility','hidden');
                         $('.ajax-loader_msg').hide();
                         $('#moblist .mCSB_container').append(res);
                         $("#moblist").mCustomScrollbar("update");
                         $("#moblist").mCustomScrollbar({
                             scrollButtons:{
                                 enable:true
                             }
                         });
                       } 
                     })
                  }
                  
               }
            }
       });
      $('#bookPartyNewButton').click(function(){
         $('#bookParty_Step01').click();
      })
      $('.entryBox').click(function(){
         $('#sticky').remove();
      })

      /*$('.menuli').click(function(e){
         if($(e.target).parent().hasClass('active')) {
            $(e.target).parent().removeClass('active');
         }
         else
         {
            $('.menuli').removeClass('active');
            $(e.target).parent().addClass('active');
         }
      })*/


      /*----Owl Carousel----*/
   $("#campnBox-one, #campnBox-two").owlCarousel({
      loop:true,
      navigation:true,
      singleItem:true,
      autoPlay:false,
      items : 1,
   });

   var user_id = "<?php echo $this->session->userdata('user_id'); ?>";
   var currentUserMembers = $('#currentUserMembers').val();
   var count1=0;
   $('body').on('click','#campnBox-one .owl-next',function(){
      count1=count1+1;
      if(count1>5){
         if(user_id<=0)
         {
            $(this).hide();
            $('.login_popbox').show();
            $("html, body").animate({ scrollTop: 0 }, "slow");
            //$('#errorid').html('Please register or login first');
            return false;
         }
         else if(currentUserMembers!=4)
         {
            $(this).hide();
            $('#errorid').html('<a href="<?php echo base_url();?>settings" style="color:red;">'+Upgrade_to_premium_membership+'</a>');
            return false;
         }
      }
   })
   var count2=0;
   $('body').on('click','#campnBox-two .owl-next',function(){
      count2=count2+1;
      if(count2>5){
         if(user_id<=0)
         {
            $(this).hide();
            $('.login_popbox').show();
            $("html, body").animate({ scrollTop: 0 }, "slow");
            //$('#errorid').html('Please register or login first');
            return false;
         }
         else if(currentUserMembers!=4)
         {
            $(this).hide();
            $('#errorid').html('<a href="<?php echo base_url();?>settings" style="color:red;">'+Upgrade_to_premium_membership+'</a>');
            return false;
         }
      }
   })
   var count3=0;
   $('body').on('click','#campnBox-one .owl-prev',function(){
      count3=count3+1;
      if(count3>5){
         if(user_id<=0)
         {
            $(this).hide();
            $('.login_popbox').show();
            $("html, body").animate({ scrollTop: 0 }, "slow");
            //$('#errorid').html('Please register or login first');
            return false;
         }
         else if(currentUserMembers!=4)
         {
            $(this).hide();
            $('#errorid').html('<a href="<?php echo base_url();?>settings" style="color:red;">'+Upgrade_to_premium_membership+'</a>');
            return false;
         }
      }
   })
   var count4=0;
   $('body').on('click','#campnBox-two .owl-prev',function(){
      count4=count4+1;
      if(count4>5){
         if(user_id<=0)
         {
            $(this).hide();
            $('.login_popbox').show();
            $("html, body").animate({ scrollTop: 0 }, "slow");
            //$('#errorid').html('Please register or login first');
            return false;
         }
         else if(currentUserMembers!=4)
         {
            $(this).hide();
            $('#errorid').html('<a href="<?php echo base_url();?>settings" style="color:red;">'+Upgrade_to_premium_membership+'</a>');
            return false;
         }
      }
   })
   $('body').on('click','.usrProfil',function(){
      var id = $(this).data('id');
      var type = $(this).data('type');
      var membership = $(this).data('membership');
      if(user_id>0)
      {
         /*if(type=='gentleman' && membership==5)
         {
            $('#errorid').html('Upgrade to Premium membership');
            return false;
         }
         else
         {*/
            window.location.href=id;
         //}
      }
      else
      {
         $('.login_popbox').show();
         $("html, body").animate({ scrollTop: 0 }, "slow");
         //$('#errorid').html('Please register or login first');
         return false;
      }
   })
   $('body').on('click','.usrProfil1',function(){
      var id = $(this).data('id');
      var type = $(this).data('type');
      var membership = $(this).data('membership');
      if(user_id>0)
      {
         /*if(type=='lady')
         {
            $('#errorid').html('Please reality check first');
            return false;
         }
         else
         {*/
            window.location.href=id;
         //}
      }
      else
      {
         $('.login_popbox').show();
         $("html, body").animate({ scrollTop: 0 }, "slow");
         //$('#errorid').html('Please register or login first');
         return false;
      }
   })

   $('.addCardbtn').click(function(){
      $('.addCard').hide();
      $('#update-form').show();
   })
   $('.entryBox').click(function(){
      //alert('dfg');
   })
   /*******************Mobile Verification*******************/
   $("#mobile_number").intlTelInput();
   
   $('body').on('click','ul.country-list li',function(){
      $('#mobile_number').val($(this).children('.dial-code').html());
   })
   
   $("#validate").on("click", function(e){
      var baseUrl = $('#baseUrl').val();
      var mobNum = $('#mobile_number').val();
      var filter = /^\+?\d+$/;
      if (filter.test(mobNum)) {
         if(mobNum.length>10){
            e.preventDefault();
            $.ajax({
                url:baseUrl+'home/sendOTP',
                type:'POST',
                data:'mobile_number='+mobNum,
                async:false,
                success:function(res){
                  if(res==1)
                  {
                     $('.msg_otp').css('color','green');
                     $('.msg_otp').html(Please_enter_the_validation_code);
                     $('.otpDiv').show();
                     $('.numberDiv').hide();
                  }
                  else
                  {
                     $('.msg_otp').css('color','red');
                     $('.msg_otp').html(Invalid_number);
                     $('.otpDiv').hide();
                     $('.numberDiv').show();
                     return false;
                  }
                }
            })
         } else {
            $('.msg_otp').css('color','red');
            $('.msg_otp').html(Invalid_number);
            $('#mobile_number').css('border','1px solid #f00');
            return false;
         }
      }
      else 
      {
         $('.msg_otp').css('color','red');
         $('.msg_otp').html(Invalid_number);
         $('#mobile_number').css('border','1px solid #f00');
         return false;
      }
   });
   $("#otp_send").on("click", function(e){
      var baseUrl = $('#baseUrl').val();
      if($('#otp').val()!='')
      {
         e.preventDefault();
         $.ajax({
             url:baseUrl+'home/verifyOTP',
             type:'POST',
             data:'mobile_number='+$('#mobile_number').val()+'&otp='+$('#otp').val(),
             async:false,
             success:function(res){
               if(res==1)
               {
                  $('.msg_otp').css('color','green');
                  $('.msg_otp').html(Thanks_you_for_verifying_mobile);
                  $('.otpDiv').hide();
                  $('.numberDiv').hide();
               }
               else
               {
                  $('.msg_otp').css('color','red');
                  $('.msg_otp').html(Invalid_verification_code);
                  return false;
               }
             }
         })
      }
   });
   /*******************Mobile Verification*******************/
   <?php if($this->session->userdata('upgradeSet')){ ?>
      $('.upgradePremium').click();
    <?php $this->session->unset_userdata('upgradeSet'); } ?>
   
    <?php if($this->session->userdata('unsubscribe')){ ?>
      $('.unsubscribe_button').click();
    <?php $this->session->unset_userdata('unsubscribe'); } ?> 

    //Newsletter Form Validation
    $('.unsubSend').click(function(){
      var baseUrl = $('#baseUrl').val();
      $('.unsub_err').html('');
      if($('#unsubEmail').val()=="")
      {
        $('.unsub_err').html(Please_enter_email_and_password);
        return false;
      }
      else if(!isValidEmailAddress($('#unsubEmail').val())){
        $('.unsub_err').html(Please_enter_proper_email);
        return false;
      }
      else if($('#unsubPassword').val()==""){
        $('.unsub_err').html(Please_enter_email_and_password);
        return false;
      }
      else
      {
        $.ajax({
          url:baseUrl+'home/unsubscribe',
          type:'POST',
          data:$('#unsubFrm').serialize(),
          async:false,
          success:function(res){
            if(res==1)
            {
               $('.unsub_succ').show();
               $('#unsubFrm').hide();
            }
            else
            {
               $('.unsub_err').html(res);
            }
          }
        })
      }
    }) 

    <?php if($userDetials['email_status']=='bounced'){ ?>
      $('.bounced_button').click();
    <?php } ?> 

    //Newsletter Form Validation
    $('.bouncedSend').click(function(){
      var baseUrl = $('#baseUrl').val();
      $('.bounced_err').html('');
      if($('#bouncedEmail').val()=="")
      {
        $('.bounced_err').html(Please_enter_email);
        return false;
      }
      else if(!isValidEmailAddress($('#bouncedEmail').val()))
      {
        $('.bounced_err').html(Please_enter_proper_email);
        return false;
      }
      else
      {
        $.ajax({
          url:baseUrl+'home/bounced',
          type:'POST',
          data:$('#bouncedFrm').serialize(),
          async:false,
          success:function(res){
            if(res==1)
            {
               $('#bouncedSuccess').show();
               $('#bouncedFrm').hide();
            }
            else
            {
               $('.bounced_err').html(res);
            }
          }
        })
      }
    }) 

    $('.modal_close').click(function(){
      $('.modalmaskFix').hide();
    })



   <?php if($this->session->userdata('lang_pop')){ ?>
      $('.lang_button').click();
   <?php $this->session->unset_userdata('lang_pop'); } ?>
   $('.langSend').click(function(){
       var langId = $('input[name=langPop]:checked', '#langPopFrm').val();
       $('#lang').val(langId);
       $('#langFrm').submit();
   })


	  
	 $('.ffedback').click(function(){
		 $('#feedbackUsername').val('');
		 $('#feedback').val('');
		 $('#feedbackPic').val('');
		 $('#feedbackFrm').show();
         $('#feedbackSuccess').hide();
		$('html, body').animate({
            scrollTop: 0
        }, 800);
	 })
	$('#feedbackFrm').submit(function(e){
		 e.preventDefault(); 
      if($('#feedbackPic').val() !='' && $('#feedbackUsername').val()!='' && $('#feedback').val()!='')
      {
        var baseUrl = $('#baseUrl').val();
        $('.ajax-loader').show();
        $('.ajax-loader').css('visibility','visible');
        var file_data = $("#feedbackPic").prop("files")[0];   
        var form_data = new FormData(this);                 
        form_data.append("file", file_data) 
			form_data.append("name", file_data)
			form_data.append("file", file_data)
        $.ajax({
          url:baseUrl+'home/feedback',
          type:'POST',
          data:form_data,
          async:false,
          contentType: false,
          processData: false,
          success:function(res){//alert(res);
            $('.ajax-loader').css('visibility','hidden');
            $('.ajax-loader').hide();
            if(res==1)
            {
              $('#feedbackFrm').hide();
              $('#feedbackSuccess').show();
            }
          }
        })
      }
		else
		 {
			$('.feedback_err').html(Please_fill_all);
		 }

    })

      if($(window).width()<769)
      {
        $('.heigh').remove();
      }
      <?php if($this->session->userdata('success_pop')){ ?>
         $('.success').click();
         $('body').addClass('popheight');
      <?php $this->session->unset_userdata('success_pop'); } ?> 

	$('#lightgallery').lightGallery();

  /***********************NOTIFICATION**************************/
  <?php if($this->session->userdata('user_id')){ ?>
    setInterval(function(){
      var user_id = "<?php echo $this->session->userdata('user_id') ?>";
      $.ajax({
              url: '<?php echo base_url(); ?>profile/getRequest',
              data: 'user_id='+user_id,
              type: 'POST',
              success: function(res)
              {
                if(res!='')
                {
                  var split = res.split('|');
                  //$('.see_notification').html(split[0]);
                  if(split[1]>0)
                  {
                    $('.notify').show();
                    $('.notify').html(split[1]);
                  }
                  else
                  {
                  	$('.notify').hide();
                  }
                }
              }
            })
    }, 5000);
    
   var user_id = "<?php echo $this->session->userdata('user_id') ?>";
   $.ajax({
           url: '<?php echo base_url(); ?>profile/getRequest',
           data: 'user_id='+user_id,
           type: 'POST',
           success: function(res)
           {
             if(res!='')
             {
               var split = res.split('|');
               $('.see_notification').html(split[0]);
               
             }
           }
         })

    $('body').on('click','.load_more_msg',function(){
      var user_id = "<?php echo $this->session->userdata('user_id') ?>";
      var limit = $(this).data('id');
      var this1 = $(this);
      $(this).hide();
      $('.ajax-loader_msg').show();
      $('.ajax-loader_msg').css('visibility','visible');
      $.ajax({
              url: '<?php echo base_url(); ?>profile/getRequestNext',
              data: 'user_id='+user_id+'&limit='+limit,
              type: 'POST',
              success: function(res)
              {
                if(res!='')
                {//alert($(this).parent().html());
                  var split = res.split('|');
                  $('.see_notification').append(split[0]);
                  this1.parent().remove();
                  $('.ajax-loader_msg').hide();
                  $('.ajax-loader_msg').css('visibility','hidden');
                  
                }
              }
            })
    })
   <?php } ?> 

   
  /***********************NOTIFICATION**************************/

  /****************MEMBERS***************************/
  
  $('.acc_type').click(function(e){
  	//e.preventDefault();
  	$('#member-search-frm').attr('action','<?php echo base_url(uri_string()); ?>');
   $('.memberSearchButt').click();
  	//$('#member-search-frm').submit();
  })
      $('body').on('click',".memberSearchButt",function(e) {
         e.preventDefault();
         $('.ajax-loader').show();
         $('.ajax-loader').css('visibility','visible');
         var href="<?php echo base_url().'members'; ?>"
         $.ajax({
                  type: "POST",
                  url: href,
                  data:$('#member-search-frm').serialize(),
                  success: function(result)
                  {
                     //alert(result);
                     $('.ajax-loader').hide();
                     $('.ajax-loader').css('visibility','hidden');
                     $('.showMemresult').html(result);
                     return false;
                  }
               });
         return false;     
      });
      $('body').on('click',".pagination a",function(e) {
         e.preventDefault();
         $('.ajax-loader').show();
         $('.ajax-loader').css('visibility','visible');
         var href=$(this).attr('href');
         $.ajax({
                  type: "POST",
                  url: href,
                  data:$('#member-search-frm').serialize(),
                  success: function(result)
                  {
                     //alert(result);
                     $('.ajax-loader').hide();
                     $('.ajax-loader').css('visibility','hidden');
                     $('.showMemresult').html(result);
                     return false;
                  }
               });
         return false;     
      });
      $('body').on('click',".contactpaginationouter a",function() {
         $('#contact-search-frm').attr('action',$(this).attr('href'));
         $('#contact-search-frm').submit(); 
      });
  /****************MEMBERS***************************/
   //$.fancybox({ content: '<button type="button">Hotshot</button>' });
   var ceremony = "<?php if($userDetials['interested_in_private_meeting']==1){ echo 1; }else { echo 0; }?>";
    if(ceremony==1)
    {
      $('.seduce').click();
      $('#seduction').val(1);
    }

	$('.demo').gallerybox();
	<?php if($this->uri->segment(1)=='' || $this->uri->segment(1)=='home'){?>
	  $('[data-countdown]').each(function() {
         var $this = $(this), finalDate = $(this).data('countdown');
         $this.countdown(finalDate, function(event) {//alert(event.strftime('%D:%H'));
           $this.html(event.strftime('<span class="count">%D <label>days</label></span>:<span class="count">%H <label>hours</label></span>:<span class="count">%M <label>min</label></span>:<span class="count">%S <label>sec</label><span>'));
         });
      });
      var owl = $("#latestPartyevents"); 
         owl.owlCarousel({         
         itemsCustom : [
           [0, 1],
           [450, 1],
           [600, 1],
           [700, 1]       
         ],
         navigation: false,
         autoPlay:true,      
         pagination: true
        
       });
      var owl = $("#videoslider"); 
         owl.owlCarousel({         
         itemsCustom : [
           [0, 1],
           [450, 1],
           [600, 1],
           [700, 1]       
         ],
         navigation: true,
         autoPlay:false,
         navigationText: ["&#xf104;", "&#xf105;"],
         pagination: true

        
       });    

      /*$(document).ready(function(){
         console.log("document.ready has been loaded");
         $("iframe").on('click',function(){
            console.log("Iframe has been loaded");
            $(this).contents().on("mousedown, mouseup, click", function(){
               console.log("Click detected inside iframe.");
            });
         });
      });*/
      var iframe = $('#iFrame1').contents();
      iframe.find("src").click(function(){
         alert("test");
      });
	<?php } ?>
   var owl = $("#profilePicsCarousel");
         owl.owlCarousel({
         itemsCustom : [
           [0, 1],
           [450, 1],
           [600, 1],
           [700, 1]
         ],
         navigation: false,
         autoPlay:false,
         pagination: false

       }); 
	   
	 var owl = $("#newsletter-carousel");
      owl.owlCarousel({
         navigation : false,
         pagination: false,
         singleItem : true,
         autoPlay:true,
         transitionStyle : "fade"
      });

      <?php if(get_cookie('lang')){ ?> 
         
      <?php }else{ 
         $setlanguages = getLocationInfoByIp();
         //$setlanguages = ip_info("Visitor", "Country Code");
         if($setlanguages=='DE')
         {
            $langId = 1;
         }
         elseif($setlanguages=='ES')
         {
            $langId = 3;
         }
         else
         {
            $langId = 2;
         }
      ?>
      var a = '<?php echo $langId; ?>';
         $('#lang').val('<?php echo $langId; ?>');
         $('#langFrm').submit();
      <?php } ?>   
})
</script>



<style type="text/css">
 .ajax-loader {
   /* visibility: hidden;*/
    background-color: rgba(0,0,0,0.7);
    position: fixed;
    z-index: 999999 !important;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.ajax-loader img {
  position: relative;
  top:50%;
  left:50%;
}
.goog-te-banner-frame,.goog-tooltip{
  display: none !important;
}
</style>
<script language="JavaScript">

//////////F12 disable code////////////////////////
    document.onkeypress = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
           //alert('No F-12');
            return false;
        }
    }
    document.onmousedown = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
            //alert('No F-keys');
            return false;
        }
    }
document.onkeydown = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
            //alert('No F-keys');
            return false;
        }
    }
/////////////////////end///////////////////////
</script>
<script type="text/javascript"> 
<!-- 
//Disable right click script 
//visit http://www.rainbow.arch.scriptmania.com/scripts/ 
var message="Sorry, right-click has been disabled"; 
/////////////////////////////////// 
function clickIE() {if (document.all) {(message);return false;}} 
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) { 
if (e.which==2||e.which==3) {(message);return false;}}} 
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} 
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} 
document.oncontextmenu=new Function("return false")
// --> 
var Please_enter_username_email_password  = "<?php echo getLang('Please_enter_username_email_password'); ?>";
var Please_enter_the_validation_code  = "<?php echo getLang('Please_enter_the_validation_code'); ?>";
var Invalid_number  = "<?php echo getLang('Invalid_number'); ?>";
var Thanks_you_for_verifying_mobile  = "<?php echo getLang('Thanks_you_for_verifying_mobile'); ?>";
var Invalid_verification_code  = "<?php echo getLang('Invalid_verification_code'); ?>";
var Upgrade_to_premium_membership  = "<?php echo getLang('Upgrade_to_premium_membership'); ?>";
var Please_enter_email_and_password  = "<?php echo getLang('Please_enter_email_and_password'); ?>";
var Please_enter_proper_email  = "<?php echo getLang('Please_enter_proper_email'); ?>";
var Further_you_have_the_possibility = "<?php echo getLang('Further_you_have_the_possibility'); ?>";
var single_gentleman_or_in_conmany_of_a_lady = "<?php echo getLang('single_gentleman_or_in_conmany_of_a_lady'); ?>";
var Email_already_exist = "<?php echo getLang('Email_already_exist'); ?>";
var We_have_sent_you_an_e_mail = "<?php echo getLang('We_have_sent_you_an_e_mail'); ?>";
var important_verification_code = "<?php echo getLang('important_verification_code'); ?>";
var Password_must_be_6 = "<?php echo getLang('Password_must_be_6'); ?>";
var This_username_is_already_occupied = "<?php echo getLang('This_username_is_already_occupied'); ?>";
var Please_enter_username = "<?php echo getLang('Please_enter_username'); ?>";
var Your_wished_username = "<?php echo getLang('Your_wished_username'); ?>";
var is_available__please_confirm = "<?php echo getLang('is_available__please_confirm'); ?>";
var Please_enter_email = "<?php echo getLang('Please_enter_email'); ?>";
var Please_enter_message = "<?php echo getLang('Please_enter_message'); ?>";
var Some_error_occured = "<?php echo getLang('Some_error_occured'); ?>";
var month_Membership = "<?php echo getLang('month_Membership'); ?>";
var Transaction_fee_Total = "<?php echo getLang('Transaction_fee_Total'); ?>";
var will_be_charged = "<?php echo getLang('will_be_charged'); ?>";
var year_Membership = "<?php echo getLang('year_Membership'); ?>";
var Please_login_to_book = "<?php echo getLang('Please_login_to_book'); ?>";
var User_Discount_on_Entry = "<?php echo getLang('User_Discount_on_Entry'); ?>";
var Partynight = "<?php echo getLang('Partynight'); ?>";
var Extra_Nights = "<?php echo getLang('Extra_Nights'); ?>";
var Please_check_the_terms_and_conditions = "<?php echo getLang('Please_check_the_terms_and_conditions'); ?>";
var cancel = "<?php echo getLang('cancel'); ?>";
var Premium = "<?php echo getLang('Premium'); ?>";
var Membership = "<?php echo getLang('Membership'); ?>";
var Premium_Membership_Benefit = "<?php echo getLang('Premium_Membership_Benefit'); ?>";
var Deposit_fees_of_the_cape_rental_in_cash = "<?php echo getLang('Deposit_fees_of_the_cape_rental_in_cash'); ?>";
var Deposit_fees_of_the_cape_rental = "<?php echo getLang('Deposit_fees_of_the_cape_rental'); ?>";
var Cape_Rental_with_Security = "<?php echo getLang('Cape_Rental_with_Security'); ?>";
var Capes = "<?php echo getLang('Capes'); ?>";
var Deposit_of_the_cape_is = "<?php echo getLang('Deposit_of_the_cape_is'); ?>";
var Cape = "<?php echo getLang('Cape'); ?>";
var Cape_rental = "<?php echo getLang('Cape_rental'); ?>";
var Security_fee_per_cape = "<?php echo getLang('Security_fee_per_cape'); ?>";
var Payment_is_made_on_the_spot = "<?php echo getLang('Payment_is_made_on_the_spot'); ?>";
var Are_you_sure_you_want = "<?php echo getLang('Are_you_sure_you_want'); ?>";
var Please_upgrade_membership = "<?php echo getLang('Please_upgrade_membership'); ?>";
var Are_you_sure = "<?php echo getLang('Are_you_sure'); ?>";
var Connected__please_wait = "<?php echo getLang('Connected__please_wait'); ?>";
var Please_connect_first = "<?php echo getLang('Please_connect_first'); ?>";
var Please_fill_all = "<?php echo getLang('Please_fill_all'); ?>";
var Please_wait_for_connect_rquest_acceptance = "<?php echo getLang('Please_wait_for_connect_rquest_acceptance'); ?>";
var Premium = "<?php echo getLang('Premium'); ?>";
var Continue_Booking = "<?php echo getLang('Continue_Booking'); ?>";
var Booking_Complete = "<?php echo getLang('Booking_Complete'); ?>";
var You_cant_send_message_as_he_dont_interested_in_your_account_type = "<?php echo getLang('You_cant_send_message_as_he_dont_interested_in_your_account_type'); ?>";
var You_cant_send_hotshot_as_he_dont_interested_in_your_account_type = "<?php echo getLang('You_cant_send_hotshot_as_he_dont_interested_in_your_account_type'); ?>";
var Please_enter_proper_username = "<?php echo getLang('Please_enter_proper_username'); ?>";
var Please_upload_required_picture = "<?php echo getLang('Please_upload_required_picture'); ?>";
var months = "<?php echo getLang('months'); ?>";
var Add_a_comment = "<?php echo getLang('Add_a_comment');?>";
var Thank_you_for_your_feedback = "<?php echo getLang('Thank_you_for_your_feedback'); ?>";
var More_information = "<?php echo getLang('More_information'); ?>";
var Close = "<?php echo getLang('Close'); ?>";
var Are_you_sure_to_accept = "<?php echo getLang('Are_you_sure_to_accept'); ?>";
var Are_you_sure_to_reject = "<?php echo getLang('Are_you_sure_to_reject'); ?>";
var Are_you_sure_to_delete = "<?php echo getLang('Are_you_sure_to_delete'); ?>";
var Accept = "<?php echo getLang('Accept'); ?>";
var Reject = "<?php echo getLang('Reject'); ?>";
var Remove = "<?php echo getLang('Cancel'); ?>";
var basic_half_price = "<?php echo getMembershipPrice('basic_half_price'); ?>";
var basic_full_price = "<?php echo getMembershipPrice('basic_full_price'); ?>";
var premium_half_price = "<?php echo getMembershipPrice('premium_half_price'); ?>";
var premium_full_price = "<?php echo getMembershipPrice('premium_full_price'); ?>";
var platinum_full_price = "<?php echo getMembershipPrice('platinum_full_price'); ?>";
var Person = "<?php echo getLang('Person'); ?>";
var This_user_will_not_be_able_to_see_my_profile = "<?php echo getLang('This_user_will_not_be_able_to_see_my_profile'); ?>";
<?php $setting = getValue('sys_settings', array('key'=>'reservation_fee')); ?>
var reservation_fee = '';
var Please_complete_CAPTCHA_authentication = "<?php echo getLang('Please_complete_CAPTCHA_authentication'); ?>";
<?php if($this->session->userdata('user_id')){ 
   if($this->session->userdata('user_id') == '25267' || $this->session->userdata('user_id') == '11330'){
?>
reservation_fee = <?php echo $setting ? $setting['value'] : ''; ?>
<?php } } ?>
</script> 