Commit 5077a0ec5c3185fcdb7f6fd39b685a5fe9b0bf2c

Authored by Yarik
1 parent df799956

test

common/models/User.php
@@ -17,44 +17,44 @@ @@ -17,44 +17,44 @@
17 17
18 /** 18 /**
19 * User model 19 * User model
20 - * @property integer $id  
21 - * @property string $username  
22 - * @property string $password_hash  
23 - * @property string $password_reset_token  
24 - * @property string $email  
25 - * @property string $auth_key  
26 - * @property integer $status  
27 - * @property integer $created_at  
28 - * @property integer $updated_at  
29 - * @property string $password write-only password  
30 - * @property string $type  
31 - * @property UserInfo $userInfo  
32 - * @property string $userName  
33 - * @property array[] $roles  
34 - * @property CompanyInfo $companyInfo  
35 - * @property array[] $phones  
36 - * @property array[] $site  
37 - * @property string $address  
38 - * @property string $liveTime  
39 - * @property Payment[] $payments  
40 - * @property integer[] $paymentInput  
41 - * @property Specialization[] $specializations  
42 - * @property integer[] $specializationInput  
43 - * @property Blog[] $blog  
44 - * @property Job[] $jobs  
45 - * @property Job $currentJob  
46 - * @property Portfolio[] $portfolios  
47 - * @property Project[] $projects  
48 - * @property Team[] $teams  
49 - * @property Vacancy[] $vacancies  
50 - * @property Gallery[] $galleries 20 + * @property integer $id
  21 + * @property string $username
  22 + * @property string $password_hash
  23 + * @property string $password_reset_token
  24 + * @property string $email
  25 + * @property string $auth_key
  26 + * @property integer $status
  27 + * @property integer $created_at
  28 + * @property integer $updated_at
  29 + * @property string $password write-only password
  30 + * @property string $type
  31 + * @property UserInfo $userInfo
  32 + * @property string $userName
  33 + * @property array[] $roles
  34 + * @property CompanyInfo $companyInfo
  35 + * @property array[] $phones
  36 + * @property array[] $site
  37 + * @property string $address
  38 + * @property string $liveTime
  39 + * @property Payment[] $payments
  40 + * @property integer[] $paymentInput
  41 + * @property Specialization[] $specializations
  42 + * @property integer[] $specializationInput
  43 + * @property Blog[] $blog
  44 + * @property Job[] $jobs
  45 + * @property Job $currentJob
  46 + * @property Portfolio[] $portfolios
  47 + * @property Project[] $projects
  48 + * @property Team[] $teams
  49 + * @property Vacancy[] $vacancies
  50 + * @property Gallery[] $galleries
51 * @property UserInfo|CompanyInfo $owner 51 * @property UserInfo|CompanyInfo $owner
52 - * @property string $name  
53 - * @property Comment[] $comments  
54 - * @property Rating[] $commentRating  
55 - * @property int $ratingPG  
56 - * @property string $lastVisit  
57 - * @property string $link 52 + * @property string $name
  53 + * @property Comment[] $comments
  54 + * @property Rating[] $commentRating
  55 + * @property int $ratingPG
  56 + * @property string $lastVisit
  57 + * @property string $link
58 */ 58 */
59 class User extends ActiveRecord implements IdentityInterface, UserRbacInterface 59 class User extends ActiveRecord implements IdentityInterface, UserRbacInterface
60 { 60 {
@@ -587,7 +587,6 @@ @@ -587,7 +587,6 @@
587 587
588 /** 588 /**
589 * Return all user's galleries 589 * Return all user's galleries
590 - *  
591 * @return ActiveQuery 590 * @return ActiveQuery
592 */ 591 */
593 public function getGalleries() 592 public function getGalleries()
@@ -597,7 +596,6 @@ @@ -597,7 +596,6 @@
597 596
598 /** 597 /**
599 * Return company info or user info according to user type 598 * Return company info or user info according to user type
600 - *  
601 * @return ActiveQuery 599 * @return ActiveQuery
602 */ 600 */
603 public function getOwner() 601 public function getOwner()
@@ -611,7 +609,6 @@ @@ -611,7 +609,6 @@
611 609
612 /** 610 /**
613 * Return company name or user firstname and lastname according to user type 611 * Return company name or user firstname and lastname according to user type
614 - *  
615 * @return string 612 * @return string
616 */ 613 */
617 public function getName() 614 public function getName()
@@ -625,7 +622,6 @@ @@ -625,7 +622,6 @@
625 622
626 /** 623 /**
627 * Return all comments to user 624 * Return all comments to user
628 - *  
629 * @return ActiveQuery 625 * @return ActiveQuery
630 */ 626 */
631 public function getComments() 627 public function getComments()
@@ -640,7 +636,6 @@ @@ -640,7 +636,6 @@
640 636
641 /** 637 /**
642 * Return all ratings to user 638 * Return all ratings to user
643 - *  
644 * @return ActiveQuery 639 * @return ActiveQuery
645 */ 640 */
646 public function getCommentRating() 641 public function getCommentRating()
@@ -655,7 +650,6 @@ @@ -655,7 +650,6 @@
655 /** 650 /**
656 * Return user's rating<br> 651 * Return user's rating<br>
657 * <b>Available only for PostgreSQL</b> 652 * <b>Available only for PostgreSQL</b>
658 - *  
659 * @return int 653 * @return int
660 * @throws InvalidConfigException 654 * @throws InvalidConfigException
661 */ 655 */
@@ -665,7 +659,7 @@ @@ -665,7 +659,7 @@
665 throw new InvalidConfigException('This method is available only in PostgreSQL'); 659 throw new InvalidConfigException('This method is available only in PostgreSQL');
666 } 660 }
667 return $this->getCommentRating() 661 return $this->getCommentRating()
668 - ->select(['rating' => 'ROUND(SUM("rating"."value")/COUNT("rating"."rating_id")::numeric, 2)']) 662 + ->select([ 'rating' => 'ROUND(SUM("rating"."value")/COUNT("rating"."rating_id")::numeric, 2)' ])
669 ->andWhere([ 663 ->andWhere([
670 'not', 664 'not',
671 [ 'rating.value' => NULL ], 665 [ 'rating.value' => NULL ],
@@ -675,11 +669,8 @@ @@ -675,11 +669,8 @@
675 669
676 /** 670 /**
677 * Recalculate rating and write it to db. 671 * Recalculate rating and write it to db.
678 - *  
679 * <b>Only for PostgreSQL</b> 672 * <b>Only for PostgreSQL</b>
680 - *  
681 * @see \common\models\User::getRatingPG() 673 * @see \common\models\User::getRatingPG()
682 - *  
683 * @throws InvalidConfigException 674 * @throws InvalidConfigException
684 */ 675 */
685 public function updateRating() 676 public function updateRating()
@@ -697,15 +688,40 @@ @@ -697,15 +688,40 @@
697 688
698 /** 689 /**
699 * Return link to user personal page according to user type 690 * Return link to user personal page according to user type
700 - *  
701 * @return string 691 * @return string
702 */ 692 */
703 public function getLink($page = 'common') 693 public function getLink($page = 'common')
704 { 694 {
705 if($this->type == 2) { 695 if($this->type == 2) {
706 - return Url::to(['company/'.$page, 'company_id' => $this->id]); 696 + return Url::to([
  697 + 'company/' . $page,
  698 + 'company_id' => $this->id,
  699 + ]);
707 } else { 700 } else {
708 - return Url::to(['performer/'.$page, 'performer_id' => $this->id]); 701 + return Url::to([
  702 + 'performer/' . $page,
  703 + 'performer_id' => $this->id,
  704 + ]);
  705 + }
  706 + }
  707 +
  708 + public function getIsBookmarked($type = Bookmark::TYPE_PERFORMER)
  709 + {
  710 + if(!empty( \Yii::$app->user->identity )) {
  711 + if(!empty( $this->hasOne(Bookmark::className(), [ 'model_id' => 'id' ])
  712 + ->andWhere([
  713 + 'model' => $this->className(),
  714 + 'user_id' => \Yii::$app->user->getId(),
  715 + 'type' => $type,
  716 + ])
  717 + ->one() )
  718 + ) {
  719 + return true;
  720 + } else {
  721 + return false;
  722 + }
  723 + } else {
  724 + return false;
709 } 725 }
710 } 726 }
711 727
frontend/controllers/BookmarksController.php
1 <?php 1 <?php
2 namespace frontend\controllers; 2 namespace frontend\controllers;
3 3
  4 + use common\models\Bookmark;
  5 + use common\models\User;
4 use yii\filters\AccessControl; 6 use yii\filters\AccessControl;
  7 + use yii\filters\VerbFilter;
5 use yii\web\Controller; 8 use yii\web\Controller;
  9 + use yii\web\Response;
6 10
7 /** 11 /**
8 * Site controller 12 * Site controller
@@ -17,12 +21,24 @@ @@ -17,12 +21,24 @@
17 'class' => AccessControl::className(), 21 'class' => AccessControl::className(),
18 'rules' => [ 22 'rules' => [
19 [ 23 [
20 - //'actions' => ['cabinet','change-password', 'bookmarks', 'projects'],  
21 'allow' => true, 24 'allow' => true,
22 'roles' => [ '@' ], 25 'roles' => [ '@' ],
23 ], 26 ],
24 ], 27 ],
25 ], 28 ],
  29 + 'verbs' => [
  30 + 'class' => VerbFilter::className(),
  31 + 'actions' => [
  32 + 'add-performer' => [ 'post' ],
  33 + 'add-customer' => [ 'post' ],
  34 + 'add-project' => [ 'post' ],
  35 + 'add-vacancy' => [ 'post' ],
  36 + 'remove-performer' => [ 'post' ],
  37 + 'remove-customer' => [ 'post' ],
  38 + 'remove-project' => [ 'post' ],
  39 + 'remove-vacancy' => [ 'post' ],
  40 + ],
  41 + ],
26 ]; 42 ];
27 } 43 }
28 44
@@ -31,4 +47,96 @@ @@ -31,4 +47,96 @@
31 return $this->render('bookmarks'); 47 return $this->render('bookmarks');
32 } 48 }
33 49
  50 + public function actionAddPerformer()
  51 + {
  52 + $response = \Yii::$app->response;
  53 + $response->format = Response::FORMAT_JSON;
  54 + $model_id = \Yii::$app->request->post('id');
  55 + if(empty( $model_id )) {
  56 + return [ 'error' => 'ะžัˆะธะฑะบะฐ ะดะพะฑะฐะฒะปะตะฝะธั. ะžั‚ััƒั‚ัั‚ะฒัƒะตั‚ id ะธัะฟะพะปะฝะธั‚ะตะปั' ];
  57 + }
  58 + $user = User::findOne($model_id);
  59 + if(empty( $user )) {
  60 + return [ 'error' => 'ะžัˆะธะฑะบะฐ ะดะพะฑะฐะฒะปะตะฝะธั. ะ˜ัะฟะพะปะฝะธั‚ะตะปัŒ ะฝะต ะฝะฐะนะดะตะฝ.' ];
  61 + }
  62 + $model = $user->className();
  63 + $user_id = \Yii::$app->user->getId();
  64 + $type = Bookmark::TYPE_PERFORMER;
  65 + if(Bookmark::findOne([
  66 + 'model' => $model,
  67 + 'model_id' => $model_id,
  68 + 'user_id' => $user_id,
  69 + 'type' => $type,
  70 + ])
  71 + ) {
  72 + return [ 'error' => 'ะžัˆะธะฑะบะฐ ะดะพะฑะฐะฒะปะตะฝะธั. ะ˜ัะฟะพะปะฝะธั‚ะตะปัŒ ัƒะถะต ะดะพะฑะฐะฒะปะตะฝ.' ];
  73 + }
  74 + $bookmark = new Bookmark([
  75 + 'model' => $model,
  76 + 'model_id' => $model_id,
  77 + 'user_id' => $user_id,
  78 + 'type' => $type,
  79 + ]);
  80 + if($bookmark->save()) {
  81 + $result = $this->renderAjax('//site/forms-modal-fav', [
  82 + 'message' => 'ะ”ะพะฑะฐะฒะปะตะฝะพ ะฒ ะทะฐะบะปะฐะดะบะธ.',
  83 + 'image' => $user->userInfo->image,
  84 + 'name' => $user->name,
  85 + ]);
  86 + return [ 'result' => $result ];
  87 + } else {
  88 + return [ 'error' => 'ะžัˆะธะฑะบะฐ ะดะพะฑะฐะฒะปะตะฝะธั.' ];
  89 + }
  90 + }
  91 +
  92 + public function actionAddCustomer($id)
  93 + {
  94 +
  95 + }
  96 +
  97 + public function actionAddProject($id)
  98 + {
  99 +
  100 + }
  101 +
  102 + public function actionAddVacancy($id)
  103 + {
  104 +
  105 + }
  106 +
  107 + public function actionRemovePerformer()
  108 + {
  109 + $response = \Yii::$app->response;
  110 + $response->format = Response::FORMAT_JSON;
  111 + $model_id = \Yii::$app->request->post('id');
  112 + if(empty( $model_id )) {
  113 + return [ 'error' => 'ะžัˆะธะฑะบะฐ ัƒะดะฐะปะตะฝะธั. ะžั‚ััƒั‚ัั‚ะฒัƒะตั‚ id ะธัะฟะพะปะฝะธั‚ะตะปั' ];
  114 + }
  115 + $user = User::findOne($model_id);
  116 + if(empty( $user )) {
  117 + return [ 'error' => 'ะžัˆะธะฑะบะฐ ะดะพะฑะฐะฒะปะตะฝะธั. ะ˜ัะฟะพะปะฝะธั‚ะตะปัŒ ะฝะต ะฝะฐะนะดะตะฝ.' ];
  118 + }
  119 + $model = $user->className();
  120 + $user_id = \Yii::$app->user->getId();
  121 + $type = Bookmark::TYPE_PERFORMER;
  122 + /**
  123 + * @var Bookmark $bookmark
  124 + */
  125 + $bookmark = Bookmark::findOne([
  126 + 'model' => $model,
  127 + 'model_id' => $model_id,
  128 + 'user_id' => $user_id,
  129 + 'type' => $type,
  130 + ]);
  131 + if(!empty($bookmark)) {
  132 + if($bookmark->delete()) {
  133 + return ['message' => 'ะ—ะฐะบะปะฐะดะบะฐ ัƒัะฟะตัˆะฝะพ ัƒะดะฐะปะตะฝะฐ'];
  134 + } else {
  135 + return ['error' => 'ะžัˆะธะฑะบะฐ ะฟั€ะธ ัƒะดะฐะปะตะฝะธะธ'];
  136 + }
  137 + } else {
  138 + return ['error' => 'ะ—ะฐะบะปะฐะดะบะฐ ะฝะต ะฝะฐะนะดะตะฝะฐ'];
  139 + }
  140 + }
  141 +
34 } 142 }
frontend/views/layouts/company.php
@@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
11 11
12 $this->beginContent('@app/views/layouts/main.php'); 12 $this->beginContent('@app/views/layouts/main.php');
13 ?> 13 ?>
14 -  
15 <div class="section-box content"> 14 <div class="section-box content">
16 <div class="section-box-14" style="background: url(<?= $this->params[ 'company' ]->userInfo->poster; ?>) 50% no-repeat ;"> 15 <div class="section-box-14" style="background: url(<?= $this->params[ 'company' ]->userInfo->poster; ?>) 50% no-repeat ;">
17 <div class="box-wr"> 16 <div class="box-wr">
@@ -35,7 +34,27 @@ @@ -35,7 +34,27 @@
35 </form> 34 </form>
36 <div class="performance-vacancy-call-back-conf">ะ“ะฐั€ะฐะฝั‚ะธั€ัƒะตะผ ะบะพะฝั„ะธะดะตั†ะธะฐะปัŒะฝะพัั‚ัŒ</div> 35 <div class="performance-vacancy-call-back-conf">ะ“ะฐั€ะฐะฝั‚ะธั€ัƒะตะผ ะบะพะฝั„ะธะดะตั†ะธะฐะปัŒะฝะพัั‚ัŒ</div>
37 </div> 36 </div>
38 - <div class="performance-vacancy-add-favorite"><a href="#"></a></div> 37 + <?php
  38 + if(!empty( \Yii::$app->user->identity )) {
  39 + ?>
  40 + <div class="performance-vacancy-add-favorite">
  41 + <?php
  42 + if($this->params[ 'company' ]->isBookmarked) {
  43 + echo Html::a('', [ '#' ], [
  44 + 'class' => 'artbox_bookmark_remove_performer',
  45 + 'data-id' => $this->params[ 'company' ]->id,
  46 + ]);
  47 + } else {
  48 + echo Html::a('', [ '#' ], [
  49 + 'class' => 'artbox_bookmark_add_performer',
  50 + 'data-id' => $this->params[ 'company' ]->id,
  51 + ]);
  52 + }
  53 + ?>
  54 + </div>
  55 + <?php
  56 + }
  57 + ?>
39 </div> 58 </div>
40 </div> 59 </div>
41 </div> 60 </div>
@@ -110,7 +129,7 @@ @@ -110,7 +129,7 @@
110 <div class="performer-vacancy-sidebar-left-wr"> 129 <div class="performer-vacancy-sidebar-left-wr">
111 <div class="performer-vacancy-sidebar-left"> 130 <div class="performer-vacancy-sidebar-left">
112 <div class="performance-vacancy-sidebar-company-wr"> 131 <div class="performance-vacancy-sidebar-company-wr">
113 - <div class="performance-vacancy-sidebar-company-title style">ะŸะพะทะฝัะบะธะถะธะปัั‚ั€ะพะน</div> 132 + <div class="performance-vacancy-sidebar-company-title style"><?= $this->params[ 'company' ]->name ?></div>
114 <div class="performance-vacancy-sidebar-company-job style"> 133 <div class="performance-vacancy-sidebar-company-job style">
115 <ul> 134 <ul>
116 <li class="activejob"> 135 <li class="activejob">
frontend/views/site/forms-modal-fav.php
1 <?php 1 <?php
2 -use yii\helpers\Html; 2 + /**
  3 + * @var string $message
  4 + * @var string $image
  5 + * @var string $name
  6 + */
  7 + use yii\helpers\Html;
  8 +
3 ?> 9 ?>
4 <div id="modal_form_favorite"> 10 <div id="modal_form_favorite">
5 <div class="closed-form"></div> 11 <div class="closed-form"></div>
6 <div class="form-resume-wr"> 12 <div class="form-resume-wr">
7 - <div class="form-resume-sub style">ะ”ะพะฑะฐะฒะปะตะฝะพ ะฒ ะทะฐะบะปะฐะดะบะธ</div> 13 + <div class="form-resume-sub style"><?= $message ?></div>
8 <div class="favorite-user-wr"> 14 <div class="favorite-user-wr">
9 - <img src="/images/ded-ico.png" alt=""/>  
10 - <div class="favorite-user-profile">ะŸะตั‚ะตั€ ะฆัƒะผั‚ะพั€ัŒ</div>  
11 - <div class="favorite-user-profile-add"><img src="/images/sidebar-ico/ico-16.png" alt=""/><span>ะ”ะพะฑะฐะฒะปะตะฝ</span></div> 15 + <?= Html::img($image) ?>
  16 + <div class="favorite-user-profile"><?= $name ?></div>
  17 + <div class="favorite-user-profile-add">
  18 + <img src="/images/sidebar-ico/ico-16.png" alt=""/><span>ะ”ะพะฑะฐะฒะปะตะฝ</span></div>
12 </div> 19 </div>
13 <div class="res_form_line"></div> 20 <div class="res_form_line"></div>
14 - <div class="page-favorite"><?= Html::a('ะŸะตั€ะตะนั‚ะธ ะฝะฐ ัั‚ั€ะฐะฝะธั†ัƒ ะทะฐะบะปะฐะดะพะบ',['/accounts/bookmarks'])?></div> 21 + <div class="page-favorite"><?= Html::a('ะŸะตั€ะตะนั‚ะธ ะฝะฐ ัั‚ั€ะฐะฝะธั†ัƒ ะทะฐะบะปะฐะดะพะบ', [ '/accounts/bookmarks' ]) ?></div>
15 </div> 22 </div>
16 </div> 23 </div>
17 \ No newline at end of file 24 \ No newline at end of file
frontend/web/css/style.css
@@ -1568,6 +1568,9 @@ input[type=file]::-webkit-file-upload-button { @@ -1568,6 +1568,9 @@ input[type=file]::-webkit-file-upload-button {
1568 display: block; 1568 display: block;
1569 transition: 0.3s; 1569 transition: 0.3s;
1570 } 1570 }
  1571 +.performance-vacancy-add-favorite a.artbox_bookmark_remove_performer{
  1572 + background: url("/images/button_add_fav_01.png") no-repeat;
  1573 +}
1571 .performance-vacancy-add-favorite a:hover{opacity: 0.95} 1574 .performance-vacancy-add-favorite a:hover{opacity: 0.95}
1572 .menu-content-wr { 1575 .menu-content-wr {
1573 height: 43px; 1576 height: 43px;
frontend/web/js/forms.js
1 -$(document).ready(function(){  
2 - function addRemoveBlocks(){  
3 - $('#overlay, .forms-modal-hide').remove();  
4 - $('body').append('<div id="overlay"></div>').append('<div class="forms-modal-hide"></div>');  
5 - } 1 +$(document).ready(
  2 + function()
  3 + {
  4 + function addRemoveBlocks()
  5 + {
  6 + $('#overlay, .forms-modal-hide').remove();
  7 + $('body').append('<div id="overlay"></div>').append('<div class="forms-modal-hide"></div>');
  8 + }
6 9
7 - function addToLogin(){  
8 - $.post("/site/forms-modal-login", function (data) {  
9 - $('.forms-modal-hide').append(data)  
10 - })  
11 - .fail(function(){  
12 - $('#overlay, .forms-modal-hide').remove();  
13 - alert(txtErrorModal)  
14 - })  
15 - .done(function() {  
16 - var newMarg = $(window).scrollTop();  
17 - $('#overlay').fadeIn(400,  
18 - function(){  
19 - $('.forms-modal-hide>div')  
20 - .css({display:'block', marginTop:-230+newMarg})  
21 - .animate({opacity: 1, top: '50%'}, 200);  
22 - });  
23 - })  
24 - } 10 + function addToLogin()
  11 + {
  12 + $.post(
  13 + "/site/forms-modal-login", function(data)
  14 + {
  15 + $('.forms-modal-hide').append(data)
  16 + }
  17 + )
  18 + .fail(
  19 + function()
  20 + {
  21 + $('#overlay, .forms-modal-hide').remove();
  22 + alert(txtErrorModal)
  23 + }
  24 + )
  25 + .done(
  26 + function()
  27 + {
  28 + var newMarg = $(window).scrollTop();
  29 + $('#overlay').fadeIn(
  30 + 400, function()
  31 + {
  32 + $('.forms-modal-hide>div')
  33 + .css({display : 'block', marginTop : -230 + newMarg})
  34 + .animate({opacity : 1, top : '50%'}, 200);
  35 + }
  36 + );
  37 + }
  38 + )
  39 + }
25 40
26 - function addToFavorites(){  
27 - $.post("/site/forms-modal-fav", function (data) {  
28 - $('.forms-modal-hide').append(data)  
29 - })  
30 - .fail(function(){  
31 - $('#overlay, .forms-modal-hide').remove();  
32 - alert(txtErrorModal)  
33 - })  
34 - .done(function() {  
35 - var newMarg = $(window).scrollTop();  
36 - $('#overlay').fadeIn(400,  
37 - function(){  
38 - $('.forms-modal-hide>div')  
39 - .css({display:'block', marginTop:-230+newMarg})  
40 - .animate({opacity: 1, top: '50%'}, 200);  
41 - });  
42 - })  
43 - } 41 + function addToFavorites()
  42 + {
  43 + $.post(
  44 + "/site/forms-modal-fav", function(data)
  45 + {
  46 + $('.forms-modal-hide').append(data)
  47 + }
  48 + )
  49 + .fail(
  50 + function()
  51 + {
  52 + $('#overlay, .forms-modal-hide').remove();
  53 + alert(txtErrorModal)
  54 + }
  55 + )
  56 + .done(
  57 + function()
  58 + {
  59 + var newMarg = $(window).scrollTop();
  60 + $('#overlay').fadeIn(
  61 + 400, function()
  62 + {
  63 + $('.forms-modal-hide>div')
  64 + .css({display : 'block', marginTop : -230 + newMarg})
  65 + .animate({opacity : 1, top : '50%'}, 200);
  66 + }
  67 + );
  68 + }
  69 + )
  70 + }
44 71
45 - function addToOffer(){  
46 - $.post("/site/forms-modal-offer", function (data) {  
47 - $('.forms-modal-hide').append(data)  
48 - })  
49 - .fail(function(){  
50 - $('#overlay, .forms-modal-hide').remove();  
51 - alert(txtErrorModal)  
52 - })  
53 - .done(function() {  
54 - var newMarg = $(window).scrollTop();  
55 - $('#overlay').fadeIn(400,  
56 - function(){  
57 - $('body').css({overflowY:'hidden'})  
58 - $('.forms-modal-hide>div')  
59 - .css({display:'block', marginTop:-230+newMarg})  
60 - .animate({opacity: 1, top: '50%'}, 200);  
61 - });  
62 - })  
63 - } 72 + function addToOffer()
  73 + {
  74 + $.post(
  75 + "/site/forms-modal-offer", function(data)
  76 + {
  77 + $('.forms-modal-hide').append(data)
  78 + }
  79 + )
  80 + .fail(
  81 + function()
  82 + {
  83 + $('#overlay, .forms-modal-hide').remove();
  84 + alert(txtErrorModal)
  85 + }
  86 + )
  87 + .done(
  88 + function()
  89 + {
  90 + var newMarg = $(window).scrollTop();
  91 + $('#overlay').fadeIn(
  92 + 400, function()
  93 + {
  94 + $('body').css({overflowY : 'hidden'})
  95 + $('.forms-modal-hide>div')
  96 + .css({display : 'block', marginTop : -230 + newMarg})
  97 + .animate({opacity : 1, top : '50%'}, 200);
  98 + }
  99 + );
  100 + }
  101 + )
  102 + }
64 103
65 - function addContacts() {  
66 - $.post("/site/forms-modal-contacts", function (data) {  
67 - $('.forms-modal-hide').append(data)  
68 - })  
69 - .fail(function(){  
70 - $('#overlay, .forms-modal-hide').remove();  
71 - alert(txtErrorModal)  
72 - })  
73 - .done(function() {  
74 - var newMarg = $(window).scrollTop();  
75 - $('#overlay').fadeIn(400,  
76 - function(){  
77 - $('.forms-modal-hide>div')  
78 - .css({display:'block', marginTop:-230+newMarg})  
79 - .animate({opacity: 1, top: '50%'}, 200);  
80 - });  
81 - })  
82 - } 104 + function addContacts()
  105 + {
  106 + $.post(
  107 + "/site/forms-modal-contacts", function(data)
  108 + {
  109 + $('.forms-modal-hide').append(data)
  110 + }
  111 + )
  112 + .fail(
  113 + function()
  114 + {
  115 + $('#overlay, .forms-modal-hide').remove();
  116 + alert(txtErrorModal)
  117 + }
  118 + )
  119 + .done(
  120 + function()
  121 + {
  122 + var newMarg = $(window).scrollTop();
  123 + $('#overlay').fadeIn(
  124 + 400, function()
  125 + {
  126 + $('.forms-modal-hide>div')
  127 + .css({display : 'block', marginTop : -230 + newMarg})
  128 + .animate({opacity : 1, top : '50%'}, 200);
  129 + }
  130 + );
  131 + }
  132 + )
  133 + }
  134 +
  135 + //login
  136 + $('a.loginLinkModal').click(
  137 + function(e)
  138 + {
  139 + e.preventDefault()
  140 + addRemoveBlocks()
  141 + addToLogin()
  142 + }
  143 + )
  144 + //contacts
  145 + $('a.contactsLinkModalFirst').click(
  146 + function(e)
  147 + {
  148 + e.preventDefault()
  149 + addRemoveBlocks()
  150 + addContacts()
  151 + }
  152 + )
  153 + //bookmarks
83 154
84 - //login  
85 - $('a.loginLinkModal').click(function(e){  
86 - e.preventDefault()  
87 - addRemoveBlocks()  
88 - addToLogin()  
89 - })  
90 - //contacts  
91 - $('a.contactsLinkModalFirst').click(function(e){  
92 - e.preventDefault()  
93 - addRemoveBlocks()  
94 - addContacts()  
95 - })  
96 - //bookmarks  
97 - $('.get-list, .performance-vacancy-add-favorite a, .blog-buttons-add-favorite').click(function(e){  
98 - e.preventDefault()  
99 - addRemoveBlocks()  
100 - addToFavorites()  
101 - })  
102 - //offer  
103 - $('a.get-project, .blog-buttons-offer').click(function(e){  
104 - e.preventDefault()  
105 - addRemoveBlocks()  
106 - addToOffer()  
107 - }) 155 + //Performer bookmark add
  156 + $(document).on('click', '.artbox_bookmark_add_performer', function(e) {
  157 + e.preventDefault();
  158 + var id = $(this).data('id');
  159 + addRemoveBlocks();
  160 + $.post('/bookmarks/add-performer', {id: id}, function(data) {
  161 + if(data.error) {
  162 + $('#overlay, .forms-modal-hide').remove();
  163 + alert(data.error);
  164 + } else {
  165 + $('.artbox_bookmark_add_performer').removeClass('artbox_bookmark_add_performer').addClass('artbox_bookmark_remove_performer');
  166 + $('.forms-modal-hide').append(data.result);
  167 + }
  168 + }, 'json').fail(
  169 + function()
  170 + {
  171 + $('#overlay, .forms-modal-hide').remove();
  172 + alert(txtErrorModal);
  173 + }
  174 + )
  175 + .done(
  176 + function()
  177 + {
  178 + var newMarg = $(window).scrollTop();
  179 + $('#overlay').fadeIn(
  180 + 400, function()
  181 + {
  182 + $('.forms-modal-hide>div')
  183 + .css({display : 'block', marginTop : -230 + newMarg})
  184 + .animate({opacity : 1, top : '50%'}, 200);
  185 + }
  186 + );
  187 + }
  188 + )
  189 + });
  190 + //Performer bookmark remove
  191 + $(document).on('click', '.artbox_bookmark_remove_performer', function(e) {
  192 + e.preventDefault();
  193 + var id = $(this).data('id');
  194 + var link = $(this);
  195 + addRemoveBlocks();
  196 + $.post('/bookmarks/remove-performer', {id: id}, function(data) {
  197 + if(data.error) {
  198 + $('#overlay, .forms-modal-hide').remove();
  199 + alert(data.error);
  200 + } else {
  201 + $('.artbox_bookmark_remove_performer').removeClass('artbox_bookmark_remove_performer').addClass('artbox_bookmark_add_performer');
  202 + $('#overlay, .forms-modal-hide').remove();
  203 + alert(data.message);
  204 + }
  205 + }, 'json').fail(
  206 + function()
  207 + {
  208 + $('#overlay, .forms-modal-hide').remove();
  209 + alert(txtErrorModal);
  210 + }
  211 + )
  212 + .done(
  213 + function()
  214 + {
  215 + var newMarg = $(window).scrollTop();
  216 + $('#overlay').fadeIn(
  217 + 400, function()
  218 + {
  219 + $('.forms-modal-hide>div')
  220 + .css({display : 'block', marginTop : -230 + newMarg})
  221 + .animate({opacity : 1, top : '50%'}, 200);
  222 + }
  223 + );
  224 + }
  225 + )
  226 + });
  227 +
  228 + $('.get-list, .performance-vacancy-add-favorite a, .blog-buttons-add-favorite').click(
  229 + function(e)
  230 + {
  231 + e.preventDefault()
  232 +// addRemoveBlocks()
  233 +// addToFavorites()
  234 + }
  235 + )
  236 + //offer
  237 + $('a.get-project, .blog-buttons-offer').click(
  238 + function(e)
  239 + {
  240 + e.preventDefault()
  241 + addRemoveBlocks()
  242 + addToOffer()
  243 + }
  244 + )
  245 +
  246 + var txtErrorModal = 'ะ’ะžะ—ะะ˜ะšะ›ะ ะžะจะ˜ะ‘ะšะ, ะŸะžะŸะ ะžะ‘ะฃะ™ะขะ• ะ•ะฉะ• ะ ะะ— ะŸะžะ—ะ–ะ•!';
108 247
109 - var txtErrorModal = 'ะ’ะžะ—ะะ˜ะšะ›ะ ะžะจะ˜ะ‘ะšะ, ะŸะžะŸะ ะžะ‘ะฃะ™ะขะ• ะ•ะฉะ• ะ ะะ— ะŸะžะ—ะ–ะ•!'; 248 + clocseModalForms()
  249 + function clocseModalForms()
  250 + {
  251 + $('body').on(
  252 + 'click', '.closed-form, #overlay', function()
  253 + {
  254 + $('body').css({overflowY : 'visible'})
  255 + $('.forms-modal-hide>div')
  256 + .animate(
  257 + {opacity : 0, top : '30%'}, 200, function()
  258 + {
  259 + $(this).css('display', 'none')
  260 + $('#overlay').fadeOut(
  261 + 400, function()
  262 + {
  263 + $('#overlay, .forms-modal-hide').remove()
  264 + }
  265 + )
  266 + }
  267 + )
110 268
111 - clocseModalForms()  
112 - function clocseModalForms(){  
113 - $('body').on('click','.closed-form, #overlay', function(){  
114 - $('body').css({overflowY:'visible'})  
115 - $('.forms-modal-hide>div')  
116 - .animate({opacity: 0, top: '30%'}, 200,  
117 - function(){  
118 - $(this).css('display', 'none')  
119 - $('#overlay').fadeOut(400,function(){$('#overlay, .forms-modal-hide').remove()})  
120 } 269 }
121 - ) 270 + );
  271 + }
122 272
123 - });  
124 } 273 }
125 -  
126 -})  
127 \ No newline at end of file 274 \ No newline at end of file
  275 +)
128 \ No newline at end of file 276 \ No newline at end of file
frontend/web/js/script.js
1 -$(document).ready(function(){  
2 - var checkscroll = [];  
3 - for(var ch=0;ch<2;ch++) {  
4 - checkscroll[checkscroll.length] = false;  
5 - }  
6 - contentHeight();  
7 - resizeWindow();  
8 - scrolling();  
9 - menuBg();  
10 - projectAllMenu();  
11 - mapLoad();  
12 - federationHome();  
13 - //validationForms();  
14 - //menuContent();  
15 - jobClick();  
16 - box15Height();  
17 - formRezume();  
18 - fileVal();  
19 - newMenuMap();  
20 - seeAllComm();  
21 - gallerPage();  
22 - selectAfter();  
23 - tagPortfolio();  
24 - seeAllProfile();  
25 - featuresTags();  
26 - inputNumber();  
27 - videoFull();  
28 - function resizeWindow(){  
29 - $(window).resize(function(){  
30 - contentHeight();  
31 - });  
32 - }  
33 - function contentHeight(){  
34 - //ะฟั€ะธะถะธะผะฐะตะผ ั„ัƒั‚ะตั€  
35 - var headerHeight = document.getElementsByClassName('section-box header');  
36 - var menuHeight = document.getElementsByClassName('section-box menu-header-all');  
37 - var contentHeight = document.getElementsByClassName('section-box content');  
38 - var footerHeight = document.getElementsByClassName('section-box footer');  
39 - $(contentHeight).css({minHeight:($(window).height())-($(footerHeight).height())-($(headerHeight).height())-($(menuHeight).height())});  
40 - }  
41 - function scrolling(){  
42 - //ะฟั€ะพะฒะตั€ะบะฐ ะฑั€ะฐัƒะทะตั€ะฐ  
43 - var sUsrAg = navigator.userAgent;  
44 - if(sUsrAg.indexOf("Chrome") > -1) {  
45 - } else if (sUsrAg.indexOf("Safari") > -1) {  
46 - $('body').css({fontFamily:'arial'}); 1 +$(document).ready(
  2 + function()
  3 + {
  4 + var checkscroll = [];
  5 + for(var ch = 0; ch < 2; ch++)
  6 + {
  7 + checkscroll[checkscroll.length] = false;
47 } 8 }
48 - var _browser = navigator.userAgent;  
49 - _browser = _browser.indexOf("WebKit");  
50 - //scroll  
51 - var tempScrollTop = 0;  
52 - var currentScrollTop = 0;  
53 -  
54 - $(window).scroll(function(){  
55 - if (_browser>=0) {  
56 - currentScrollTop = $('body').scrollTop();  
57 - } else {  
58 - currentScrollTop = $('html').scrollTop();  
59 - }  
60 - if (tempScrollTop < currentScrollTop ){  
61 - if (currentScrollTop>=114) {  
62 - $('.menu-header-all').css({position:'fixed', zIndex:9990});  
63 - $('.section-box.content').css({marginTop:41}); 9 + contentHeight();
  10 + resizeWindow();
  11 + scrolling();
  12 + menuBg();
  13 + projectAllMenu();
  14 + mapLoad();
  15 + federationHome();
  16 + //validationForms();
  17 + //menuContent();
  18 + jobClick();
  19 + box15Height();
  20 + formRezume();
  21 + fileVal();
  22 + newMenuMap();
  23 + seeAllComm();
  24 + gallerPage();
  25 + selectAfter();
  26 + tagPortfolio();
  27 + seeAllProfile();
  28 + featuresTags();
  29 + inputNumber();
  30 + videoFull();
  31 + function resizeWindow()
  32 + {
  33 + $(window).resize(
  34 + function()
  35 + {
  36 + contentHeight();
64 } 37 }
  38 + );
  39 + }
65 40
66 - if($('.section-box-6').hasClass('section-box-6')) {  
67 - if (currentScrollTop>offsetSect6 && !checkscroll[0]) {  
68 - checkscroll[0]=true;  
69 - landingAnimation(); 41 + function contentHeight()
  42 + {
  43 + //ะฟั€ะธะถะธะผะฐะตะผ ั„ัƒั‚ะตั€
  44 + var headerHeight = document.getElementsByClassName('section-box header');
  45 + var menuHeight = document.getElementsByClassName('section-box menu-header-all');
  46 + var contentHeight = document.getElementsByClassName('section-box content');
  47 + var footerHeight = document.getElementsByClassName('section-box footer');
  48 + $(contentHeight).css({minHeight : ($(window).height()) - ($(footerHeight).height()) - ($(headerHeight).height()) - ($(menuHeight).height())});
  49 + }
  50 +
  51 + function scrolling()
  52 + {
  53 + //ะฟั€ะพะฒะตั€ะบะฐ ะฑั€ะฐัƒะทะตั€ะฐ
  54 + var sUsrAg = navigator.userAgent;
  55 + if(sUsrAg.indexOf("Chrome") > -1)
  56 + {
  57 + } else if(sUsrAg.indexOf("Safari") > -1)
  58 + {
  59 + $('body').css({fontFamily : 'arial'});
  60 + }
  61 + var _browser = navigator.userAgent;
  62 + _browser = _browser.indexOf("WebKit");
  63 + //scroll
  64 + var tempScrollTop = 0;
  65 + var currentScrollTop = 0;
  66 +
  67 + $(window).scroll(
  68 + function()
  69 + {
  70 + if(_browser >= 0)
  71 + {
  72 + currentScrollTop = $('body').scrollTop();
  73 + } else
  74 + {
  75 + currentScrollTop = $('html').scrollTop();
70 } 76 }
71 - } 77 + if(tempScrollTop < currentScrollTop)
  78 + {
  79 + if(currentScrollTop >= 114)
  80 + {
  81 + $('.menu-header-all').css({position : 'fixed', zIndex : 9990});
  82 + $('.section-box.content').css({marginTop : 41});
  83 + }
  84 +
  85 + if($('.section-box-6').hasClass('section-box-6'))
  86 + {
  87 + if(currentScrollTop > offsetSect6 && !checkscroll[0])
  88 + {
  89 + checkscroll[0] = true;
  90 + landingAnimation();
  91 + }
  92 + }
72 93
73 - if($('.section-box-8').hasClass('section-box-8')) {  
74 - if (currentScrollTop>offsetSect8 && !checkscroll[1]) {  
75 - checkscroll[1]=true;  
76 - landingAnimationWhyWork(); 94 + if($('.section-box-8').hasClass('section-box-8'))
  95 + {
  96 + if(currentScrollTop > offsetSect8 && !checkscroll[1])
  97 + {
  98 + checkscroll[1] = true;
  99 + landingAnimationWhyWork();
  100 + }
  101 + if(currentScrollTop > (offsetSect8 + 300) && !checkscroll[2])
  102 + {
  103 + checkscroll[2] = true;
  104 + landingAnimationWhyWorkTwo();
  105 +
  106 + }
  107 + }
77 } 108 }
78 - if (currentScrollTop>(offsetSect8+300) && !checkscroll[2]) {  
79 - checkscroll[2]=true;  
80 - landingAnimationWhyWorkTwo(); 109 +
  110 + else if(tempScrollTop > currentScrollTop)
  111 + {
  112 + //console.log('ะฒะฒะตั€ั…');
  113 + if(currentScrollTop <= 114)
  114 + {
  115 + $('.menu-header-all').css({position : 'relative'});
  116 + $('.section-box.content').css({marginTop : 0});
  117 + }
81 118
82 } 119 }
  120 + tempScrollTop = currentScrollTop;
83 } 121 }
84 - } 122 + );
  123 + }
85 124
86 - else if (tempScrollTop > currentScrollTop ){  
87 - //console.log('ะฒะฒะตั€ั…');  
88 - if (currentScrollTop<=114) {  
89 - $('.menu-header-all').css({position:'relative'});  
90 - $('.section-box.content').css({marginTop:0}); 125 + function menuBg()
  126 + {
  127 +
  128 + var heightUlTwoMenu = $('ul.content-menu-first').height();
  129 + $('.menu-two-wrapp').css({height : heightUlTwoMenu - 1});
  130 +
  131 + $('ul.content-menu-first').hover(
  132 + function()
  133 + {
  134 +
  135 + }, function()
  136 + {
  137 + $('.content-menu-first li').css({backgroundColor : '#fff'});
91 } 138 }
  139 + );
  140 + $('.content-menu-first li').hover(
  141 + function()
  142 + {
  143 + var dataMenuBg = $(this).find('span').attr('data-menu-bg');
  144 +
  145 + $('.content-menu-first li').css({backgroundColor : '#fff'});
  146 + $('.content-menu-first li a').css({color : '#333333'});
  147 +
  148 + $(this).css({backgroundColor : dataMenuBg}).find('ul li').css({backgroundColor : dataMenuBg});
  149 + $('.content-menu-first li >ul li').mouseover(
  150 + function()
  151 + {
  152 + $(this).parent().parent().css({backgroundColor : dataMenuBg});
  153 + $('.content-menu-first li >ul li').css({backgroundColor : dataMenuBg});
  154 + $('.content-menu-first li >ul li').removeClass('hov-arrow');
  155 + $(this).addClass('hov-arrow');
  156 + }
  157 + )
92 158
  159 + }, function()
  160 + {
  161 + $('.hov-arrow').removeClass('hov-arrow');
  162 + }
  163 + );
  164 + var thirdUlMenu = $('ul.content-menu-first li ul li ul');
  165 + thirdUlMenu.addClass('third-ul-menu');
  166 + if(thirdUlMenu.hasClass('third-ul-menu'))
  167 + {
  168 + thirdUlMenu.parent().find('a').addClass('remove-link');
  169 + $('.third-ul-menu li a').removeClass('remove-link');
  170 + $('.remove-link').parent().addClass('yes-after');
  171 +
  172 + var remLink = $('.remove-link');
  173 + for(var ixx = 0; ixx < remLink.length; ixx++)
  174 + {
  175 + $(remLink[ixx]).html($(remLink[ixx]).text() + '<div class="hack-arrow"></div>')
  176 + }
93 } 177 }
94 - tempScrollTop = currentScrollTop;  
95 - });  
96 - }  
97 178
98 - function menuBg(){  
99 -  
100 - var heightUlTwoMenu = $('ul.content-menu-first').height();  
101 - $('.menu-two-wrapp').css({height:heightUlTwoMenu-1});  
102 -  
103 - $('ul.content-menu-first').hover(function(){  
104 -  
105 - },function(){  
106 - $('.content-menu-first li').css({backgroundColor:'#fff'});  
107 - });  
108 - $('.content-menu-first li').hover(function(){  
109 - var dataMenuBg = $(this).find('span').attr('data-menu-bg');  
110 -  
111 - $('.content-menu-first li').css({backgroundColor:'#fff'});  
112 - $('.content-menu-first li a').css({color:'#333333'});  
113 -  
114 - $(this).css({backgroundColor:dataMenuBg}).find('ul li').css({backgroundColor:dataMenuBg});  
115 - $('.content-menu-first li >ul li').mouseover(function(){  
116 - $(this).parent().parent().css({backgroundColor:dataMenuBg});  
117 - $('.content-menu-first li >ul li').css({backgroundColor:dataMenuBg});  
118 - $('.content-menu-first li >ul li').removeClass('hov-arrow');  
119 - $(this).addClass('hov-arrow');  
120 - })  
121 -  
122 - },function(){  
123 - $('.hov-arrow').removeClass('hov-arrow');  
124 - });  
125 - var thirdUlMenu = $('ul.content-menu-first li ul li ul');  
126 - thirdUlMenu.addClass('third-ul-menu');  
127 - if( thirdUlMenu.hasClass('third-ul-menu') ) {  
128 - thirdUlMenu.parent().find('a').addClass('remove-link');  
129 - $('.third-ul-menu li a').removeClass('remove-link');  
130 - $('.remove-link').parent().addClass('yes-after');  
131 -  
132 - var remLink = $('.remove-link');  
133 - for (var ixx=0;ixx<remLink.length;ixx++) {  
134 - $(remLink[ixx]).html($(remLink[ixx]).text()+'<div class="hack-arrow"></div>') 179 + $('ul.content-menu-first li ul li ul li ul').removeClass('third-ul-menu').addClass('last-ul-menu');
  180 + var lastUlMenu = $('ul.content-menu-first li ul li ul li ul');
  181 + if(lastUlMenu.hasClass('last-ul-menu'))
  182 + {
  183 + lastUlMenu.parent().find('a').addClass('remove-link-two');
  184 + $('.remove-link-two').parent().addClass('yes-after yes-after-two');
  185 +
  186 + var remLastLink = $('ul.content-menu-first li ul li ul li.yes-after-two ul');
  187 + remLastLink.find('li').removeClass('yes-after yes-after-two');
  188 + remLastLink.find('a').removeClass('.remove-link-two');
  189 +
  190 + var remLinkT = $('.remove-link-two');
  191 + $('.last-ul-menu .remove-link-two').removeClass('remove-link-two')
  192 + for(var ixx = 0; ixx < remLinkT.length; ixx++)
  193 + {
  194 + $(remLinkT[ixx]).html($(remLinkT[ixx]).text() + '<div class="hack-arrow"></div>')
  195 + $('.last-ul-menu .hack-arrow').removeClass('hack-arrow')
  196 + }
135 } 197 }
  198 +
  199 + $('ul.last-ul-menu').find('a').removeClass('remove-link-two');
  200 + $('.remove-link, .remove-link-two').click(
  201 + function(e)
  202 + {
  203 + e.preventDefault();
  204 + }
  205 + );
  206 +
  207 + $('ul.content-menu-first > li').hover(
  208 + function()
  209 + {
  210 + var dataImgThis = $(this).attr('data-img');
  211 + $('.menu-two-wrapp').css({backgroundImage : 'url(' + dataImgThis + ')'})
  212 + }
  213 + );
136 } 214 }
137 215
138 - $('ul.content-menu-first li ul li ul li ul').removeClass('third-ul-menu').addClass('last-ul-menu');  
139 - var lastUlMenu = $('ul.content-menu-first li ul li ul li ul');  
140 - if( lastUlMenu.hasClass('last-ul-menu') ) {  
141 - lastUlMenu.parent().find('a').addClass('remove-link-two');  
142 - $('.remove-link-two').parent().addClass('yes-after yes-after-two');  
143 -  
144 - var remLastLink = $('ul.content-menu-first li ul li ul li.yes-after-two ul');  
145 - remLastLink.find('li').removeClass('yes-after yes-after-two');  
146 - remLastLink.find('a').removeClass('.remove-link-two');  
147 -  
148 - var remLinkT = $('.remove-link-two');  
149 - $('.last-ul-menu .remove-link-two').removeClass('remove-link-two')  
150 - for (var ixx=0;ixx<remLinkT.length;ixx++) {  
151 - $(remLinkT[ixx]).html($(remLinkT[ixx]).text()+'<div class="hack-arrow"></div>')  
152 - $('.last-ul-menu .hack-arrow').removeClass('hack-arrow')  
153 - } 216 + function newMenuMap()
  217 + {
  218 + $('.company-performer-map-menu .content-menu-first>li>ul').addClass('content-menu-map-first');
  219 + $('.company-performer-map-menu .content-menu-first>li>ul>li').addClass('content-menu-map-second');
  220 + $('.company-performer-map-menu .content-menu-first>li').addClass('old-content-menu-map-zero');
  221 + $('.company-performer-map-menu .content-menu-map-first').parent().removeClass('old-content-menu-map-zero').addClass('content-menu-map-zero');
  222 + $('.company-performer-map-menu .content-menu-map-zero').click(
  223 + function(e)
  224 + {
  225 + e.preventDefault();
  226 + }
  227 + );
  228 + $('.company-performer-map-menu .content-menu-map-second, .company-performer-map-menu .old-content-menu-map-zero').click(
  229 + function(e)
  230 + {
  231 + e.preventDefault()
  232 + $.post(
  233 + "maps/maps.php", function(data)
  234 + {
  235 + $("#map_cloud").empty();
  236 + $("#map_cloud").append(data);
  237 + initialize();
  238 + }
  239 + );
  240 + }
  241 + );
154 } 242 }
155 243
  244 + function projectAllMenu()
  245 + {
  246 + $('.all-project-home-title_menu li').click(
  247 + function()
  248 + {
  249 + $('.all-project-home-title_menu li').removeClass('project-home-active')
  250 + $(this).addClass('project-home-active')
  251 + }
  252 + )
  253 + }
156 254
157 - $('ul.last-ul-menu').find('a').removeClass('remove-link-two');  
158 - $('.remove-link, .remove-link-two').click(function(e){  
159 - e.preventDefault();  
160 - }); 255 + function mapLoad()
  256 + {
  257 + $('.settings-map-ul ul li a').click(
  258 + function(e)
  259 + {
  260 + e.preventDefault();
  261 + $('.settings-map-ul ul li a').removeClass('active')
  262 + $(this).addClass('active')
  263 + $.post(
  264 + "maps/maps.php", function(data)
  265 + {
  266 + $("#map_cloud").empty();
  267 + $("#map_cloud").append(data);
  268 + initialize();
  269 + }
  270 + );
  271 + }
  272 + );
  273 + }
161 274
162 - $('ul.content-menu-first > li').hover(function(){  
163 - var dataImgThis = $(this).attr('data-img');  
164 - $('.menu-two-wrapp').css({backgroundImage:'url('+dataImgThis+')'})  
165 - });  
166 - } 275 + mapLoadNewMenus()
  276 + function mapLoadNewMenus()
  277 + {
  278 + $('.all-project-home-title_menu ul li').click(
  279 + function()
  280 + {
  281 + $.post(
  282 + "maps/maps.php", function(data)
  283 + {
  284 + $("#map_cloud").empty();
  285 + $("#map_cloud").append(data);
  286 + initialize();
  287 + }
  288 + );
  289 + }
  290 + );
  291 + }
167 292
168 - function newMenuMap(){  
169 - $('.company-performer-map-menu .content-menu-first>li>ul').addClass('content-menu-map-first');  
170 - $('.company-performer-map-menu .content-menu-first>li>ul>li').addClass('content-menu-map-second');  
171 - $('.company-performer-map-menu .content-menu-first>li').addClass('old-content-menu-map-zero');  
172 - $('.company-performer-map-menu .content-menu-map-first').parent().removeClass('old-content-menu-map-zero').addClass('content-menu-map-zero');  
173 - $('.company-performer-map-menu .content-menu-map-zero').click(function(e){  
174 - e.preventDefault();  
175 - });  
176 - $('.company-performer-map-menu .content-menu-map-second, .company-performer-map-menu .old-content-menu-map-zero').click(function(e){  
177 - e.preventDefault()  
178 - $.post("maps/maps.php", function (data) {  
179 - $("#map_cloud").empty();  
180 - $("#map_cloud").append(data);  
181 - initialize();  
182 - });  
183 - });  
184 - } 293 + function federationHome()
  294 + {
  295 + var menu_width = 0;
  296 + $('.federation-home-list li').each(
  297 + function()
  298 + {
  299 + menu_width = menu_width + $(this).outerWidth() + 9
  300 + }
  301 + );
  302 + $('.federation-home-list').css({width : menu_width});
  303 +
  304 + $('.federation-home-list li').click(
  305 + function()
  306 + {
  307 + $('.federation-home-list li').removeClass('federation-home-list-active')
  308 + $(this).addClass('federation-home-list-active')
  309 + var fedTisIndex = $(this).index()
  310 + var fedBlocks = $('.federation-home-blocks-wr-blocks')
  311 + $(fedBlocks).css({display : 'none'})
  312 + $(fedBlocks[fedTisIndex]).css({display : 'block'})
  313 + }
  314 + );
  315 + }
185 316
186 - function projectAllMenu() {  
187 - $('.all-project-home-title_menu li').click(function(){  
188 - $('.all-project-home-title_menu li').removeClass('project-home-active')  
189 - $(this).addClass('project-home-active')  
190 - })  
191 - } 317 + if($('.section-box-6').hasClass('section-box-6'))
  318 + {
  319 + var offsetSect6 = $('.section-box-6').offset().top;
  320 + offsetSect6 = offsetSect6 - ($(window).height() / 2);
  321 + }
  322 + $('.lan_yo_buis_txt, .lan_yo_buis_img, .lan_yo_buis_arr').css({opacity : 0})
  323 + function landingAnimation()
  324 + {
  325 +
  326 + var animBlockLand = $('.landing-your-buisnes-blocks');
  327 + var animBlockLandArrow = $('.lan_yo_buis_arr');
  328 + $(animBlockLand[0]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
  329 + $(animBlockLand[0]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
  330 + setTimeout(
  331 + function()
  332 + {
  333 + $(animBlockLand[1]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
  334 + $(animBlockLand[1]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
  335 + }, 500
  336 + )
  337 + setTimeout(
  338 + function()
  339 + {
  340 + $(animBlockLand[2]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
  341 + $(animBlockLand[2]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
  342 + }, 1000
  343 + )
  344 + setTimeout(
  345 + function()
  346 + {
  347 + $(animBlockLand[5]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
  348 + $(animBlockLand[5]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
  349 + }, 1500
  350 + )
  351 + setTimeout(
  352 + function()
  353 + {
  354 + $(animBlockLand[4]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
  355 + $(animBlockLand[4]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
  356 + }, 2000
  357 + )
  358 + setTimeout(
  359 + function()
  360 + {
  361 + $(animBlockLand[3]).css({transform : 'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition : '2s', opacity : 1});
  362 + $(animBlockLand[3]).find('.lan_yo_buis_txt').css({transition : '2s', opacity : 1});
  363 + }, 2500
  364 + )
  365 + setTimeout(
  366 + function()
  367 + {
  368 + $(animBlockLandArrow[0]).css({transition : '1s', opacity : 1});
  369 + }, 300
  370 + );
  371 + setTimeout(
  372 + function()
  373 + {
  374 + $(animBlockLandArrow[1]).css({transition : '1s', opacity : 1});
  375 + }, 650
  376 + );
  377 + setTimeout(
  378 + function()
  379 + {
  380 + $(animBlockLandArrow[4]).css({transition : '1s', opacity : 1});
  381 + }, 1300
  382 + );
  383 + setTimeout(
  384 + function()
  385 + {
  386 + $(animBlockLandArrow[2]).css({transition : '1s', opacity : 1});
  387 + }, 1950
  388 + );
  389 + setTimeout(
  390 + function()
  391 + {
  392 + $(animBlockLandArrow[3]).css({transition : '1s', opacity : 1});
  393 + }, 2600
  394 + );
  395 + }
192 396
193 - function mapLoad(){  
194 - $('.settings-map-ul ul li a').click(function (e) {  
195 - e.preventDefault();  
196 - $('.settings-map-ul ul li a').removeClass('active')  
197 - $(this).addClass('active')  
198 - $.post("maps/maps.php", function (data) {  
199 - $("#map_cloud").empty();  
200 - $("#map_cloud").append(data);  
201 - initialize();  
202 - });  
203 - });  
204 - }  
205 - mapLoadNewMenus()  
206 - function mapLoadNewMenus(){  
207 - $('.all-project-home-title_menu ul li').click(function () {  
208 - $.post("maps/maps.php", function (data) {  
209 - $("#map_cloud").empty();  
210 - $("#map_cloud").append(data);  
211 - initialize();  
212 - });  
213 - });  
214 - } 397 + if($('.section-box-8').hasClass('section-box-8'))
  398 + {
  399 + var offsetSect8 = $('.section-box-8').offset().top;
  400 + offsetSect8 = offsetSect8 - (($(window).height()) - 264);
  401 + }
  402 + var whyWorkImg = $('.landing-work-our-img-text');
  403 + var whyWorkText = $('.landing-work-our-img p');
  404 + whyWorkImg.css({marginTop : 155, opacity : 0});
  405 + whyWorkText.css({display : 'none'});
  406 +
  407 + function landingAnimationWhyWork()
  408 + {
  409 + whyWorkImg.css({transition : '0.8s'});
  410 +
  411 + $(whyWorkImg[0]).css({marginTop : 0, opacity : 1});
  412 + $(whyWorkText[0]).delay(600).fadeIn(350);
  413 +
  414 + setTimeout(
  415 + function()
  416 + {
  417 + $(whyWorkImg[1]).css({marginTop : 0, opacity : 1});
  418 + $(whyWorkText[1]).delay(600).fadeIn(350)
  419 + }, 250
  420 + );
215 421
216 - function federationHome(){  
217 - var menu_width = 0;  
218 - $('.federation-home-list li').each(function(){ menu_width = menu_width + $(this).outerWidth()+9 });  
219 - $('.federation-home-list').css({width:menu_width});  
220 -  
221 - $('.federation-home-list li').click(function(){  
222 - $('.federation-home-list li').removeClass('federation-home-list-active')  
223 - $(this).addClass('federation-home-list-active')  
224 - var fedTisIndex = $(this).index()  
225 - var fedBlocks = $('.federation-home-blocks-wr-blocks')  
226 - $(fedBlocks).css({display:'none'})  
227 - $(fedBlocks[fedTisIndex]).css({display:'block'})  
228 - });  
229 - } 422 + setTimeout(
  423 + function()
  424 + {
  425 + $(whyWorkImg[2]).css({marginTop : 0, opacity : 1});
  426 + $(whyWorkText[2]).delay(600).fadeIn(350)
  427 + }, 500
  428 + );
  429 + }
230 430
231 - if($('.section-box-6').hasClass('section-box-6')) {  
232 - var offsetSect6 = $('.section-box-6').offset().top;  
233 - offsetSect6 = offsetSect6-($(window).height()/2);  
234 - }  
235 - $('.lan_yo_buis_txt, .lan_yo_buis_img, .lan_yo_buis_arr').css({opacity:0})  
236 - function landingAnimation(){  
237 -  
238 - var animBlockLand = $('.landing-your-buisnes-blocks');  
239 - var animBlockLandArrow = $('.lan_yo_buis_arr');  
240 - $(animBlockLand[0]).css({transform:'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition:'2s', opacity:1});  
241 - $(animBlockLand[0]).find('.lan_yo_buis_txt').css({transition:'2s', opacity:1});  
242 - setTimeout(function(){  
243 - $(animBlockLand[1]).css({transform:'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition:'2s', opacity:1});  
244 - $(animBlockLand[1]).find('.lan_yo_buis_txt').css({transition:'2s', opacity:1});  
245 - },500)  
246 - setTimeout(function(){  
247 - $(animBlockLand[2]).css({transform:'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition:'2s', opacity:1});  
248 - $(animBlockLand[2]).find('.lan_yo_buis_txt').css({transition:'2s', opacity:1});  
249 - },1000)  
250 - setTimeout(function(){  
251 - $(animBlockLand[5]).css({transform:'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition:'2s', opacity:1});  
252 - $(animBlockLand[5]).find('.lan_yo_buis_txt').css({transition:'2s', opacity:1});  
253 - },1500)  
254 - setTimeout(function(){  
255 - $(animBlockLand[4]).css({transform:'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition:'2s', opacity:1});  
256 - $(animBlockLand[4]).find('.lan_yo_buis_txt').css({transition:'2s', opacity:1});  
257 - },2000)  
258 - setTimeout(function(){  
259 - $(animBlockLand[3]).css({transform:'rotateY(0deg)'}).find('.lan_yo_buis_img ').css({transition:'2s', opacity:1});  
260 - $(animBlockLand[3]).find('.lan_yo_buis_txt').css({transition:'2s', opacity:1});  
261 - },2500)  
262 - setTimeout(function(){  
263 - $(animBlockLandArrow[0]).css({transition:'1s', opacity:1});  
264 - },300);  
265 - setTimeout(function(){  
266 - $(animBlockLandArrow[1]).css({transition:'1s', opacity:1});  
267 - },650);  
268 - setTimeout(function(){  
269 - $(animBlockLandArrow[4]).css({transition:'1s', opacity:1});  
270 - },1300);  
271 - setTimeout(function(){  
272 - $(animBlockLandArrow[2]).css({transition:'1s', opacity:1});  
273 - },1950);  
274 - setTimeout(function(){  
275 - $(animBlockLandArrow[3]).css({transition:'1s', opacity:1});  
276 - },2600);  
277 - } 431 + function landingAnimationWhyWorkTwo()
  432 + {
  433 + $(whyWorkImg[3]).css({marginTop : 0, opacity : 1});
  434 + $(whyWorkText[3]).delay(600).fadeIn(350);
  435 +
  436 + setTimeout(
  437 + function()
  438 + {
  439 + $(whyWorkImg[4]).css({marginTop : 0, opacity : 1});
  440 + $(whyWorkText[4]).delay(600).fadeIn(350)
  441 + }, 250
  442 + );
278 443
279 - if($('.section-box-8').hasClass('section-box-8')) {  
280 - var offsetSect8 = $('.section-box-8').offset().top;  
281 - offsetSect8 = offsetSect8-(($(window).height())-264);  
282 - }  
283 - var whyWorkImg = $('.landing-work-our-img-text');  
284 - var whyWorkText = $('.landing-work-our-img p');  
285 - whyWorkImg.css({marginTop:155, opacity:0});  
286 - whyWorkText.css({display:'none'});  
287 -  
288 - function landingAnimationWhyWork(){  
289 - whyWorkImg.css({transition:'0.8s'});  
290 -  
291 - $(whyWorkImg[0]).css({marginTop:0, opacity:1});  
292 - $(whyWorkText[0]).delay(600).fadeIn(350);  
293 -  
294 - setTimeout(function(){  
295 - $(whyWorkImg[1]).css({marginTop:0, opacity:1});  
296 - $(whyWorkText[1]).delay(600).fadeIn(350)  
297 - },250);  
298 -  
299 - setTimeout(function(){  
300 - $(whyWorkImg[2]).css({marginTop:0, opacity:1});  
301 - $(whyWorkText[2]).delay(600).fadeIn(350)  
302 - },500);  
303 - } 444 + setTimeout(
  445 + function()
  446 + {
  447 + $(whyWorkImg[5]).css({marginTop : 0, opacity : 1});
  448 + $(whyWorkText[5]).delay(600).fadeIn(350)
  449 + }, 500
  450 + );
  451 + }
304 452
305 - function landingAnimationWhyWorkTwo(){  
306 - $(whyWorkImg[3]).css({marginTop:0, opacity:1});  
307 - $(whyWorkText[3]).delay(600).fadeIn(350); 453 + // function validationForms(){
  454 + // var jVal_two = {
  455 + //
  456 + // 'comments' : function() {
  457 + // var ele = $('#comments_two');
  458 + // if(ele.val().length < 6) {
  459 + // jVal_two.errors = true;
  460 + // ele.removeClass('normal').addClass('wrong');
  461 + // } else {
  462 + // ele.removeClass('wrong').addClass('normal');
  463 + // }
  464 + // },
  465 + // 'phone' : function (){
  466 + // var ele = $('#phone_two');
  467 + // var patt = /[0-9]/g;
  468 + // if(!patt.test(ele.val())) {
  469 + // jVal_two.errors = true;
  470 + // ele.removeClass('normal').addClass('wrong');
  471 + // } else {
  472 + // ele.removeClass('wrong').addClass('normal');
  473 + // }
  474 + // },
  475 + //
  476 + // 'email' : function() {
  477 + // var ele = $('#email_two');
  478 + // var patt = /^.+@.+[.].{2,}$/i;
  479 + // if(!patt.test(ele.val())) {
  480 + // jVal_two.errors = true;
  481 + // ele.removeClass('normal').addClass('wrong');
  482 + // } else {
  483 + // ele.removeClass('wrong').addClass('normal');
  484 + // }
  485 + // },
  486 + //
  487 + // 'sendIt' : function (){
  488 + // if(!jVal_two.errors) {
  489 + // $('.form-questions').submit();
  490 + // }
  491 + // }
  492 + // };
  493 + //// ====================================================== //
  494 + // $('#send_two').click(function (){
  495 + // var obj = $('body, html');
  496 + // obj.animate({ scrollTop: $('.form-questions').offset().top-151 }, 750, function (){
  497 + // jVal_two.errors = false;
  498 + // jVal_two.comments();
  499 + // jVal_two.phone();
  500 + // jVal_two.email();
  501 + // jVal_two.sendIt();
  502 + // });
  503 + // return false;
  504 + // });
  505 + //
  506 + // $('#comments_two').focusout(function(){
  507 + // jVal_two.comments();
  508 + // });
  509 + // $('#phone_two').focusout(function(){
  510 + // jVal_two.phone();
  511 + // });
  512 + // $('#email_two').focusout(function(){
  513 + // jVal_two.email();
  514 + // });
  515 + //
  516 + // var jVal_cb = {
  517 + //
  518 + // 'cbName' : function() {
  519 + // var ele = $('#callbac_name');
  520 + // if(ele.val().length < 2) {
  521 + // jVal_cb.errors = true;
  522 + // ele.removeClass('normal').addClass('wrong');
  523 + // } else {
  524 + // ele.removeClass('wrong').addClass('normal');
  525 + // }
  526 + // },
  527 + // 'cbPhone' : function (){
  528 + // var ele = $('#callbac_phone');
  529 + // var patt = /[0-9]/g;
  530 + // if(!patt.test(ele.val())) {
  531 + // jVal_cb.errors = true;
  532 + // ele.removeClass('normal').addClass('wrong');
  533 + // } else {
  534 + // ele.removeClass('wrong').addClass('normal');
  535 + // }
  536 + // },
  537 + // 'cbSendIt' : function (){
  538 + // if(!jVal_cb.errors) {
  539 + // $('.callback').submit();
  540 + // }
  541 + // }
  542 + // };
  543 + //// ====================================================== //
  544 + // $('#callbac_submit').click(function (){
  545 + // var obj = $('body, html');
  546 + // obj.animate({ scrollTop: $('.callback').offset().top-151 }, 750, function (){
  547 + // jVal_cb.errors = false;
  548 + // jVal_cb.cbName();
  549 + // jVal_cb.cbPhone();
  550 + // jVal_cb.cbSendIt();
  551 + // });
  552 + // return false;
  553 + // });
  554 + // $('#callbac_name').focusout(function(){
  555 + // jVal_cb.cbName();
  556 + // });
  557 + // $('#callbac_phone').focusout(function(){
  558 + // jVal_cb.cbPhone();
  559 + // });
  560 + //
  561 + // var jVal_res = {
  562 + // 'resNsme' : function() {
  563 + // var ele = $('#res_name');
  564 + // if(ele.val().length < 2) {
  565 + // jVal_res.errors = true;
  566 + // ele.removeClass('normal').addClass('wrong');
  567 + // } else {
  568 + // ele.removeClass('wrong').addClass('normal');
  569 + // }
  570 + // },
  571 + // 'resPhone' : function (){
  572 + // var ele = $('#res_phone');
  573 + // var patt = /[0-9]/g;
  574 + // if(!patt.test(ele.val())) {
  575 + // jVal_res.errors = true;
  576 + // ele.removeClass('normal').addClass('wrong');
  577 + // } else {
  578 + // ele.removeClass('wrong').addClass('normal');
  579 + // }
  580 + // },
  581 + // 'resComm' : function() {
  582 + // var ele = $('#res_text');
  583 + // if(ele.val().length < 6) {
  584 + // jVal_res.errors = true;
  585 + // ele.removeClass('normal').addClass('wrong');
  586 + // } else {
  587 + // ele.removeClass('wrong').addClass('normal');
  588 + // }
  589 + // },
  590 + // 'resSendIt' : function (){
  591 + // if(!jVal_res.errors) {
  592 + // $('.resforms').submit();
  593 + // }
  594 + // }
  595 + // };
  596 + //// ====================================================== //
  597 + // $('#res_submit').click(function (){
  598 + // jVal_res.errors = false;
  599 + // jVal_res.resNsme();
  600 + // jVal_res.resPhone();
  601 + // jVal_res.resComm();
  602 + // jVal_res.resSendIt();
  603 + // return false;
  604 + // });
  605 + //
  606 + // $('#res_name').focusout(function(){
  607 + // jVal_res.resNsme();
  608 + // });
  609 + // $('#res_phone').focusout(function(){
  610 + // jVal_res.resPhone();
  611 + // });
  612 + // $('#res_text').focusout(function(){
  613 + // jVal_res.resComm();
  614 + // });
  615 + // }
  616 +
  617 + //function menuContent(){
  618 + // $('.menu-content li a').click(function(e){
  619 + // e.preventDefault()
  620 + // $('.menu-content li').removeClass('active-menu-content')
  621 + // $(this).parent().addClass('active-menu-content')
  622 + // });
  623 + //}
  624 +
  625 + function jobClick()
  626 + {
  627 +
  628 + var container = $('.search-worker-sort-wr');
  629 + var sort = $(container).find('.activejob a[data-sort-name]').data('sort-name');
  630 + var active = $(container).find('ul.sorter a[data-sort=' + sort + ']').clone();
  631 + $(container).find('.activejob a[data-sort-name]').replaceWith(active);
  632 +
  633 + $('.activejob>a').click(
  634 + function(e)
  635 + {
  636 + e.preventDefault();
  637 + }
  638 + );
308 639
309 - setTimeout(function(){  
310 - $(whyWorkImg[4]).css({marginTop:0, opacity:1});  
311 - $(whyWorkText[4]).delay(600).fadeIn(350)  
312 - },250); 640 + $('.activejob a').click(
  641 + function(e)
  642 + {
  643 + $('.sidebar-droped-wr').toggleClass('act')
  644 + $('.performance-vacancy-sidebar-company-job>ul').addClass('active-dropped-ul')
  645 + if(!($('.sidebar-droped-wr').hasClass('act')))
  646 + {
  647 + $('.performance-vacancy-sidebar-company-job>ul').removeClass('active-dropped-ul')
  648 + }
  649 + }
  650 + );
313 651
314 - setTimeout(function(){  
315 - $(whyWorkImg[5]).css({marginTop:0, opacity:1});  
316 - $(whyWorkText[5]).delay(600).fadeIn(350)  
317 - },500);  
318 - } 652 + $('.sidebar-droped-wr li').click(
  653 + function()
  654 + {
  655 + if($('.sidebar-droped-wr').hasClass('act'))
  656 + {
  657 + $('.sidebar-droped-wr').removeClass('act')
  658 + }
  659 + $('.performance-vacancy-sidebar-company-job>ul').removeClass('active-dropped-ul')
  660 + $('.sidebar-droped-wr li').css({display : 'block'})
  661 + $(this).css({display : 'none'})
  662 + var thisTxtSidebar = $(this).text()
  663 + $('.activejob>a').text(thisTxtSidebar);
  664 + }
  665 + );
  666 + }
319 667
320 -// function validationForms(){  
321 -// var jVal_two = {  
322 -//  
323 -// 'comments' : function() {  
324 -// var ele = $('#comments_two');  
325 -// if(ele.val().length < 6) {  
326 -// jVal_two.errors = true;  
327 -// ele.removeClass('normal').addClass('wrong');  
328 -// } else {  
329 -// ele.removeClass('wrong').addClass('normal');  
330 -// }  
331 -// },  
332 -// 'phone' : function (){  
333 -// var ele = $('#phone_two');  
334 -// var patt = /[0-9]/g;  
335 -// if(!patt.test(ele.val())) {  
336 -// jVal_two.errors = true;  
337 -// ele.removeClass('normal').addClass('wrong');  
338 -// } else {  
339 -// ele.removeClass('wrong').addClass('normal');  
340 -// }  
341 -// },  
342 -//  
343 -// 'email' : function() {  
344 -// var ele = $('#email_two');  
345 -// var patt = /^.+@.+[.].{2,}$/i;  
346 -// if(!patt.test(ele.val())) {  
347 -// jVal_two.errors = true;  
348 -// ele.removeClass('normal').addClass('wrong');  
349 -// } else {  
350 -// ele.removeClass('wrong').addClass('normal');  
351 -// }  
352 -// },  
353 -//  
354 -// 'sendIt' : function (){  
355 -// if(!jVal_two.errors) {  
356 -// $('.form-questions').submit();  
357 -// }  
358 -// }  
359 -// };  
360 -//// ====================================================== //  
361 -// $('#send_two').click(function (){  
362 -// var obj = $('body, html');  
363 -// obj.animate({ scrollTop: $('.form-questions').offset().top-151 }, 750, function (){  
364 -// jVal_two.errors = false;  
365 -// jVal_two.comments();  
366 -// jVal_two.phone();  
367 -// jVal_two.email();  
368 -// jVal_two.sendIt();  
369 -// });  
370 -// return false;  
371 -// });  
372 -//  
373 -// $('#comments_two').focusout(function(){  
374 -// jVal_two.comments();  
375 -// });  
376 -// $('#phone_two').focusout(function(){  
377 -// jVal_two.phone();  
378 -// });  
379 -// $('#email_two').focusout(function(){  
380 -// jVal_two.email();  
381 -// });  
382 -//  
383 -// var jVal_cb = {  
384 -//  
385 -// 'cbName' : function() {  
386 -// var ele = $('#callbac_name');  
387 -// if(ele.val().length < 2) {  
388 -// jVal_cb.errors = true;  
389 -// ele.removeClass('normal').addClass('wrong');  
390 -// } else {  
391 -// ele.removeClass('wrong').addClass('normal');  
392 -// }  
393 -// },  
394 -// 'cbPhone' : function (){  
395 -// var ele = $('#callbac_phone');  
396 -// var patt = /[0-9]/g;  
397 -// if(!patt.test(ele.val())) {  
398 -// jVal_cb.errors = true;  
399 -// ele.removeClass('normal').addClass('wrong');  
400 -// } else {  
401 -// ele.removeClass('wrong').addClass('normal');  
402 -// }  
403 -// },  
404 -// 'cbSendIt' : function (){  
405 -// if(!jVal_cb.errors) {  
406 -// $('.callback').submit();  
407 -// }  
408 -// }  
409 -// };  
410 -//// ====================================================== //  
411 -// $('#callbac_submit').click(function (){  
412 -// var obj = $('body, html');  
413 -// obj.animate({ scrollTop: $('.callback').offset().top-151 }, 750, function (){  
414 -// jVal_cb.errors = false;  
415 -// jVal_cb.cbName();  
416 -// jVal_cb.cbPhone();  
417 -// jVal_cb.cbSendIt();  
418 -// });  
419 -// return false;  
420 -// });  
421 -// $('#callbac_name').focusout(function(){  
422 -// jVal_cb.cbName();  
423 -// });  
424 -// $('#callbac_phone').focusout(function(){  
425 -// jVal_cb.cbPhone();  
426 -// });  
427 -//  
428 -// var jVal_res = {  
429 -// 'resNsme' : function() {  
430 -// var ele = $('#res_name');  
431 -// if(ele.val().length < 2) {  
432 -// jVal_res.errors = true;  
433 -// ele.removeClass('normal').addClass('wrong');  
434 -// } else {  
435 -// ele.removeClass('wrong').addClass('normal');  
436 -// }  
437 -// },  
438 -// 'resPhone' : function (){  
439 -// var ele = $('#res_phone');  
440 -// var patt = /[0-9]/g;  
441 -// if(!patt.test(ele.val())) {  
442 -// jVal_res.errors = true;  
443 -// ele.removeClass('normal').addClass('wrong');  
444 -// } else {  
445 -// ele.removeClass('wrong').addClass('normal');  
446 -// }  
447 -// },  
448 -// 'resComm' : function() {  
449 -// var ele = $('#res_text');  
450 -// if(ele.val().length < 6) {  
451 -// jVal_res.errors = true;  
452 -// ele.removeClass('normal').addClass('wrong');  
453 -// } else {  
454 -// ele.removeClass('wrong').addClass('normal');  
455 -// }  
456 -// },  
457 -// 'resSendIt' : function (){  
458 -// if(!jVal_res.errors) {  
459 -// $('.resforms').submit();  
460 -// }  
461 -// }  
462 -// };  
463 -//// ====================================================== //  
464 -// $('#res_submit').click(function (){  
465 -// jVal_res.errors = false;  
466 -// jVal_res.resNsme();  
467 -// jVal_res.resPhone();  
468 -// jVal_res.resComm();  
469 -// jVal_res.resSendIt();  
470 -// return false;  
471 -// });  
472 -//  
473 -// $('#res_name').focusout(function(){  
474 -// jVal_res.resNsme();  
475 -// });  
476 -// $('#res_phone').focusout(function(){  
477 -// jVal_res.resPhone();  
478 -// });  
479 -// $('#res_text').focusout(function(){  
480 -// jVal_res.resComm();  
481 -// });  
482 -// }  
483 -  
484 - //function menuContent(){  
485 - // $('.menu-content li a').click(function(e){  
486 - // e.preventDefault()  
487 - // $('.menu-content li').removeClass('active-menu-content')  
488 - // $(this).parent().addClass('active-menu-content')  
489 - // });  
490 - //}  
491 -  
492 - function jobClick(){  
493 -  
494 - var container = $('.search-worker-sort-wr');  
495 - var sort = $(container).find('.activejob a[data-sort-name]').data('sort-name');  
496 - var active = $(container).find('ul.sorter a[data-sort='+sort+']').clone();  
497 - $(container).find('.activejob a[data-sort-name]').replaceWith(active);  
498 -  
499 - $('.activejob>a').click(function(e) {  
500 - e.preventDefault();  
501 - });  
502 -  
503 - $('.activejob a').click(function(e){  
504 - $('.sidebar-droped-wr').toggleClass('act')  
505 - $('.performance-vacancy-sidebar-company-job>ul').addClass('active-dropped-ul')  
506 - if( !($('.sidebar-droped-wr').hasClass('act')) ) {  
507 - $('.performance-vacancy-sidebar-company-job>ul').removeClass('active-dropped-ul')  
508 - }  
509 - }); 668 + function box15Height()
  669 + {
  670 + $('.section-box-15').css({minHeight : ($('.performer-vacancy-sidebar-views ul').height() - 50)})
  671 + $('.section-box-17').css({minHeight : ($('.performer-vacancy-sidebar-left').height()) - 164})
  672 + }
510 673
511 - $('.sidebar-droped-wr li').click(function(){  
512 - if( $('.sidebar-droped-wr').hasClass('act') ) {  
513 - $('.sidebar-droped-wr').removeClass('act')  
514 - }  
515 - $('.performance-vacancy-sidebar-company-job>ul').removeClass('active-dropped-ul')  
516 - $('.sidebar-droped-wr li').css({display:'block'})  
517 - $(this).css({display:'none'})  
518 - var thisTxtSidebar = $(this).text()  
519 - $('.activejob>a').text(thisTxtSidebar);  
520 - });  
521 - }  
522 - function box15Height(){  
523 - $('.section-box-15').css({minHeight:($('.performer-vacancy-sidebar-views ul').height()-50) })  
524 - $('.section-box-17').css({minHeight:($('.performer-vacancy-sidebar-left').height())-164 })  
525 - } 674 + function formRezume()
  675 + {
  676 + $('.performance-vacancy-desc-form a').click(
  677 + function(e)
  678 + {
  679 + e.preventDefault();
  680 + $('#overlay').fadeIn(
  681 + 400, function()
  682 + {
  683 + $('#modal_form')
  684 + .css('display', 'block')
  685 + .animate({opacity : 1, top : '50%'}, 200);
  686 + }
  687 + );
  688 + }
  689 + );
526 690
527 - function formRezume(){  
528 - $('.performance-vacancy-desc-form a').click(function(e){  
529 - e.preventDefault();  
530 - $('#overlay').fadeIn(400,  
531 - function(){ 691 + $('.closed-form, #overlay').on(
  692 + 'click', function()
  693 + {
532 $('#modal_form') 694 $('#modal_form')
533 - .css('display', 'block')  
534 - .animate({opacity: 1, top: '50%'}, 200);  
535 - });  
536 - });  
537 -  
538 - $('.closed-form, #overlay').on('click', function(){  
539 - $('#modal_form')  
540 - .animate({opacity: 0, top: '30%'}, 200,  
541 - function(){  
542 - $(this).css('display', 'none');  
543 - $('#overlay').fadeOut(400); 695 + .animate(
  696 + {opacity : 0, top : '30%'}, 200, function()
  697 + {
  698 + $(this).css('display', 'none');
  699 + $('#overlay').fadeOut(400);
  700 + }
  701 + );
544 } 702 }
545 ); 703 );
546 - });  
547 704
548 - }  
549 - function fileVal(){  
550 - $('#res_file').change(function(){  
551 - var fileVal = $(this).val();  
552 - if(fileVal.indexOf('C:\\fakepath\\')+1)  
553 - fileVal = fileVal.substr(12);  
554 - var e = $(this).next().find('.fake_file_input');  
555 - e.val(t);  
556 - $('.res-wrapper-mb p').text(fileVal)  
557 - });  
558 - $('.label-file a').click(function(e){  
559 - e.preventDefault()  
560 - })  
561 - }  
562 - fileValMulti();  
563 - function fileValMulti(){  
564 - $('.tender-file-wr input[type="file"]').change(function(){  
565 - $('.max-size').css({marginTop:20})  
566 - })  
567 - if($('.tender-file-wr input[type="file"]').val==0) {  
568 - alert('fdg')  
569 - }  
570 - var txtMulti = $('.MultiFile-title').text()  
571 - $('.tender-file-wr a').click(function(e){  
572 - e.preventDefault()  
573 - })  
574 - }  
575 - $('.tender-form-buttons-wr a').click(function(e){  
576 - e.preventDefault()  
577 - window.location.reload()  
578 - })  
579 -  
580 -  
581 - function seeAllComm(){  
582 - var comNum = $('.company-performer-comments-bl').length;  
583 - var strComm = document.getElementsByClassName('company-performer-comments-txt');  
584 - for(var azz=0; azz<comNum; azz++) {  
585 - var comLenght = ($(strComm[azz]).text().length);  
586 - if (comLenght<220) {  
587 - $(strComm[azz]).next().css({display:'none'})  
588 - }  
589 } 705 }
590 706
591 - $('.company-comm-see-all').click(function(e){  
592 - e.preventDefault();  
593 - var expandFirst = $(this).prev();  
594 - expandFirst.toggleClass('auto-height-blog-post');  
595 - $(this).toggleClass('company-comm-expand');  
596 - var expand = 'ะ ะฐะทะฒะตั€ะฝัƒั‚ัŒ';  
597 - var rolUp = 'ะกะฒะตั€ะฝัƒั‚ัŒ';  
598 - var seeAllBlogSpan = $(this).find('span');  
599 - if(expandFirst.hasClass('auto-height-blog-post')) {  
600 - seeAllBlogSpan.text(rolUp);  
601 - } else {seeAllBlogSpan.text(expand)}  
602 - })  
603 - } 707 + function fileVal()
  708 + {
  709 + $('#res_file').change(
  710 + function()
  711 + {
  712 + var fileVal = $(this).val();
  713 + if(fileVal.indexOf('C:\\fakepath\\') + 1)
  714 + {
  715 + fileVal = fileVal.substr(12);
  716 + }
  717 + var e = $(this).next().find('.fake_file_input');
  718 + e.val(t);
  719 + $('.res-wrapper-mb p').text(fileVal)
  720 + }
  721 + );
  722 + $('.label-file a').click(
  723 + function(e)
  724 + {
  725 + e.preventDefault()
  726 + }
  727 + )
  728 + }
604 729
605 - function gallerPage() {  
606 - var galBlocks = $('.gallery-box');  
607 - for (var i = 1; i < galBlocks.length; i++) {  
608 - if (!(i % 4)) {  
609 - $(galBlocks[i - 1]).css({marginLeft: 34}) 730 + fileValMulti();
  731 + function fileValMulti()
  732 + {
  733 + $('.tender-file-wr input[type="file"]').change(
  734 + function()
  735 + {
  736 + $('.max-size').css({marginTop : 20})
  737 + }
  738 + )
  739 + if($('.tender-file-wr input[type="file"]').val == 0)
  740 + {
  741 + alert('fdg')
610 } 742 }
  743 + var txtMulti = $('.MultiFile-title').text()
  744 + $('.tender-file-wr a').click(
  745 + function(e)
  746 + {
  747 + e.preventDefault()
  748 + }
  749 + )
611 } 750 }
612 - }  
613 - function selectAfter() {  
614 - $('.search-work-form select').after('<div class="select-after"></div>')  
615 - }  
616 -  
617 - function tagPortfolio(){  
618 - $('.portfolio-project-tags a').click(function(){  
619 - $('.portfolio-project-tags a').removeClass('active-tag')  
620 - $(this).addClass('active-tag')  
621 - })  
622 751
623 - $('.portfolio-project-tags a.active-tag').click(function(e){  
624 - e.preventDefault();  
625 - })  
626 - }  
627 - function seeAllProfile() {  
628 - $('.proektant-profile-hidden-txt').css({height:306});  
629 - var txtLenght = $('.proektant-profile-hidden-txt p').text().length;  
630 -  
631 - var profileSee = $('.profile-see-all');  
632 - var expand = 'ะ ะฐะทะฒะตั€ะฝัƒั‚ัŒ';  
633 - var rolUp = 'ะกะฒะตั€ะฝัƒั‚ัŒ';  
634 - if(txtLenght>=1000) {  
635 - profileSee.text(expand).css({display:'block'})  
636 - profileSee.click(function(e){ 752 + $('.tender-form-buttons-wr a').click(
  753 + function(e)
  754 + {
637 e.preventDefault() 755 e.preventDefault()
638 - $(this).toggleClass('profile-txt-big');  
639 - if($(this).hasClass('profile-txt-big')) {  
640 - $(this).text(rolUp)  
641 - $('.proektant-profile-hidden-txt').css({height:'auto'})  
642 - } else {  
643 - $(this).text(expand);  
644 - $('.proektant-profile-hidden-txt').css({height:306})  
645 - }  
646 - })  
647 - }  
648 - }  
649 -  
650 - function featuresTags(){  
651 -  
652 - if($('.features-tags-profile').hasClass('features-tags-profile')) {  
653 - var replaceLast = $('.features-tags span:last-child').html()  
654 - var newReplaceLast = replaceLast.replace(/,(?![^,]*,)/m, '')  
655 - $('.features-tags span:last-child').empty().html(newReplaceLast)  
656 -  
657 - var featuresTags = $('.features-tags span')  
658 - var featuresTagsLangth = featuresTags.length  
659 - var featuresTagsLeft = featuresTagsLangth-6  
660 - featuresTagsDisplay()  
661 - function featuresTagsDisplay(){  
662 - for(var i = 6; i<=featuresTagsLangth+1; i++) {  
663 - $(featuresTags[i]).addClass('features-tags-display') 756 + window.location.reload()
  757 + }
  758 + )
  759 +
  760 + function seeAllComm()
  761 + {
  762 + var comNum = $('.company-performer-comments-bl').length;
  763 + var strComm = document.getElementsByClassName('company-performer-comments-txt');
  764 + for(var azz = 0; azz < comNum; azz++)
  765 + {
  766 + var comLenght = ($(strComm[azz]).text().length);
  767 + if(comLenght < 220)
  768 + {
  769 + $(strComm[azz]).next().css({display : 'none'})
664 } 770 }
665 } 771 }
666 - $(featuresTags[6]).after('<a href="#" class="features-tags-left">ะตั‰ะต '+ featuresTagsLeft +'</a>')  
667 772
668 - $('.features-tags-left').click(function(e){  
669 - e.preventDefault()  
670 - featuresTags.removeClass('features-tags-display')  
671 - $('.features-tags-left').remove()  
672 - }) 773 + $('.company-comm-see-all').click(
  774 + function(e)
  775 + {
  776 + e.preventDefault();
  777 + var expandFirst = $(this).prev();
  778 + expandFirst.toggleClass('auto-height-blog-post');
  779 + $(this).toggleClass('company-comm-expand');
  780 + var expand = 'ะ ะฐะทะฒะตั€ะฝัƒั‚ัŒ';
  781 + var rolUp = 'ะกะฒะตั€ะฝัƒั‚ัŒ';
  782 + var seeAllBlogSpan = $(this).find('span');
  783 + if(expandFirst.hasClass('auto-height-blog-post'))
  784 + {
  785 + seeAllBlogSpan.text(rolUp);
  786 + } else
  787 + {
  788 + seeAllBlogSpan.text(expand)
  789 + }
  790 + }
  791 + )
673 } 792 }
674 - if($('.features-tags-company').hasClass('features-tags-company')) {  
675 - var replaceLastTwo = $('.features-tags-company');  
676 -  
677 - for(var i=0; i<replaceLastTwo.length; i++) {  
678 - var repTwo = $(replaceLastTwo[i]).find('span:last-child').html()  
679 - $(replaceLastTwo[i]).find('span:last-child').empty().html(repTwo.replace(/,(?![^,]*,)/m, ''))  
680 - var repLenghtTwo = $(replaceLastTwo[i]).find('span')  
681 - var repLenghtLenTwo = repLenghtTwo.length  
682 - var repLenghtLeftTwo = repLenghtLenTwo-6  
683 -  
684 - $(repLenghtTwo[6-1]).after('<a href="#" class="features-tags-left">ะตั‰ะต '+ repLenghtLeftTwo +'</a>')  
685 793
686 - for(var iq = 6; iq<=repLenghtLenTwo+1; iq++) {  
687 - $(repLenghtTwo[iq]).addClass('features-tags-display') 794 + function gallerPage()
  795 + {
  796 + var galBlocks = $('.gallery-box');
  797 + for(var i = 1; i < galBlocks.length; i++)
  798 + {
  799 + if(!(i % 4))
  800 + {
  801 + $(galBlocks[i - 1]).css({marginLeft : 34})
688 } 802 }
689 -  
690 } 803 }
  804 + }
691 805
692 - $('.features-tags-left').click(function(e){  
693 - e.preventDefault()  
694 - var newClickTags = $(this).parent().parent().parent().parent();  
695 - newClickTags.find('.features-tags-left').remove();  
696 - newClickTags.find('.features-tags-display').removeClass('features-tags-display')  
697 - }) 806 + function selectAfter()
  807 + {
  808 + $('.search-work-form select').after('<div class="select-after"></div>')
698 } 809 }
699 - }  
700 810
701 - function include(url) {  
702 - var script = document.createElement('script');  
703 - script.src = url;  
704 - document.getElementsByTagName('head')[0].appendChild(script);  
705 - }  
706 - include("/js/forms.js");  
707 - include("/js/jmousewhell.js");  
708 - include("/js/jscroll.js");  
709 -  
710 - function inputNumber(){  
711 - $('.form-price-wr input').keypress(function(e) {  
712 - if (!(e.which==8 ||(e.which>47 && e.which<58))) return false;  
713 - });  
714 - } 811 + function tagPortfolio()
  812 + {
  813 + $('.portfolio-project-tags a').click(
  814 + function()
  815 + {
  816 + $('.portfolio-project-tags a').removeClass('active-tag')
  817 + $(this).addClass('active-tag')
  818 + }
  819 + )
715 820
716 - $('.min_markers li').click(function(){  
717 - $('.min_markers li').removeClass('active_m');  
718 - $(this).addClass('active_m');  
719 - $('.min_markers_two li').removeClass('active_m');  
720 - });  
721 - $('.min_markers_two li').click(function(){  
722 - $('.min_markers li').removeClass('active_m');  
723 - $('.min_markers_two li').removeClass('active_m');  
724 - $(this).addClass('active_m');  
725 - })  
726 -//ะฟะพะดะณั€ัƒะทะบะฐ ะบะฐั€ั‚ั‹  
727 - $('.min_markers li, .min_markers_two li').click(function () {  
728 - $.post("maps/maps-all-markers.php", function (data) {  
729 - $("#map_cloud").empty();  
730 - $("#map_cloud").append(data);  
731 - initialize();  
732 - $('#demo5 ul').empty();  
733 - var slider_append = $('.slider_for_maps').children();  
734 - $('#demo5 ul').append(slider_append)  
735 - });  
736 - });  
737 - messagePage();  
738 - function messagePage(){  
739 - $(".input_file").change(function(){  
740 - var filename = $(".input_file").val().replace(/.+[\\\/]/, "");  
741 - if (filename == ""){var filename = "ะœะฐะบัะธะผะฐะปัŒะฝั‹ะน ั€ะฐะทะผะตั€ ั„ะฐะนะปะฐ 5 ะœะ‘";}  
742 - $(".input_file_text").text(filename);  
743 - });  
744 - if($('.comments_block').hasClass('comments_block')) {  
745 - $(function(){  
746 - $('.comments_block').jScrollPane({showArrows: true, scrollbarWidth: 20, arrowSize: 20});  
747 - }); 821 + $('.portfolio-project-tags a.active-tag').click(
  822 + function(e)
  823 + {
  824 + e.preventDefault();
  825 + }
  826 + )
748 } 827 }
749 - }  
750 828
751 - $('.main-menu').hover(function(){  
752 - $('select').blur()  
753 - }) 829 + function seeAllProfile()
  830 + {
  831 + $('.proektant-profile-hidden-txt').css({height : 306});
  832 + var txtLenght = $('.proektant-profile-hidden-txt p').text().length;
754 833
755 - if($('.section-box-tender-tags-wr').hasClass('section-box-tender-tags-wr')) {  
756 - var lastTagTender = $('.section-box-tender-tags span')  
757 - var lastTagTenderLenght = lastTagTender.length  
758 - var lastTagTenderHtml = $(lastTagTender[lastTagTenderLenght-1]).html()  
759 - $(lastTagTender[lastTagTenderLenght-1]).empty().html(lastTagTenderHtml.replace(/,(?![^,]*,)/m, '.'))  
760 - } 834 + var profileSee = $('.profile-see-all');
  835 + var expand = 'ะ ะฐะทะฒะตั€ะฝัƒั‚ัŒ';
  836 + var rolUp = 'ะกะฒะตั€ะฝัƒั‚ัŒ';
  837 + if(txtLenght >= 1000)
  838 + {
  839 + profileSee.text(expand).css({display : 'block'})
  840 + profileSee.click(
  841 + function(e)
  842 + {
  843 + e.preventDefault()
  844 + $(this).toggleClass('profile-txt-big');
  845 + if($(this).hasClass('profile-txt-big'))
  846 + {
  847 + $(this).text(rolUp)
  848 + $('.proektant-profile-hidden-txt').css({height : 'auto'})
  849 + } else
  850 + {
  851 + $(this).text(expand);
  852 + $('.proektant-profile-hidden-txt').css({height : 306})
  853 + }
  854 + }
  855 + )
  856 + }
  857 + }
  858 +
  859 + function featuresTags()
  860 + {
  861 +
  862 + if($('.features-tags-profile').hasClass('features-tags-profile'))
  863 + {
  864 + var replaceLast = $('.features-tags span:last-child').html()
  865 + var newReplaceLast = replaceLast.replace(/,(?![^,]*,)/m, '')
  866 + $('.features-tags span:last-child').empty().html(newReplaceLast)
  867 +
  868 + var featuresTags = $('.features-tags span')
  869 + var featuresTagsLangth = featuresTags.length
  870 + var featuresTagsLeft = featuresTagsLangth - 6
  871 + featuresTagsDisplay()
  872 + function featuresTagsDisplay()
  873 + {
  874 + for(var i = 6; i <= featuresTagsLangth + 1; i++)
  875 + {
  876 + $(featuresTags[i]).addClass('features-tags-display')
  877 + }
  878 + }
761 879
762 - var jVal_res_f = { 880 + $(featuresTags[6]).after('<a href="#" class="features-tags-left">ะตั‰ะต ' + featuresTagsLeft + '</a>')
763 881
764 - 'resComm' : function() {  
765 - var ele = $('#res_f_text');  
766 - if(ele.val().length < 2) {  
767 - jVal_res_f.errors = true;  
768 - ele.removeClass('normal').addClass('wrong');  
769 - } else {  
770 - ele.removeClass('wrong').addClass('normal'); 882 + $('.features-tags-left').click(
  883 + function(e)
  884 + {
  885 + e.preventDefault()
  886 + featuresTags.removeClass('features-tags-display')
  887 + $('.features-tags-left').remove()
  888 + }
  889 + )
771 } 890 }
772 - },  
773 - 'resSendItF' : function (){  
774 - if(!jVal_res_f.errors) {  
775 - $('.resformsfile').submit(); 891 + if($('.features-tags-company').hasClass('features-tags-company'))
  892 + {
  893 + var replaceLastTwo = $('.features-tags-company');
  894 +
  895 + for(var i = 0; i < replaceLastTwo.length; i++)
  896 + {
  897 + var repTwo = $(replaceLastTwo[i]).find('span:last-child').html()
  898 + $(replaceLastTwo[i]).find('span:last-child').empty().html(repTwo.replace(/,(?![^,]*,)/m, ''))
  899 + var repLenghtTwo = $(replaceLastTwo[i]).find('span')
  900 + var repLenghtLenTwo = repLenghtTwo.length
  901 + var repLenghtLeftTwo = repLenghtLenTwo - 6
  902 +
  903 + $(repLenghtTwo[6 - 1]).after('<a href="#" class="features-tags-left">ะตั‰ะต ' + repLenghtLeftTwo + '</a>')
  904 +
  905 + for(var iq = 6; iq <= repLenghtLenTwo + 1; iq++)
  906 + {
  907 + $(repLenghtTwo[iq]).addClass('features-tags-display')
  908 + }
  909 +
  910 + }
  911 +
  912 + $('.features-tags-left').click(
  913 + function(e)
  914 + {
  915 + e.preventDefault()
  916 + var newClickTags = $(this).parent().parent().parent().parent();
  917 + newClickTags.find('.features-tags-left').remove();
  918 + newClickTags.find('.features-tags-display').removeClass('features-tags-display')
  919 + }
  920 + )
776 } 921 }
777 } 922 }
778 - };  
779 -// ====================================================== //  
780 - $('#res_f_submit').click(function (){  
781 - jVal_res_f.errors = false;  
782 - jVal_res_f.resComm();  
783 - jVal_res_f.resSendItF();  
784 - return false;  
785 - });  
786 - $('#res_f_submit2').click(function (){  
787 - jVal_res_f.errors = false;  
788 - jVal_res_f.resComm();  
789 - jVal_res_f.resSendItF();  
790 - return false;  
791 - });  
792 -  
793 - $('#res_f_text').focusout(function(){  
794 - jVal_res_f.resComm();  
795 - });  
796 -  
797 - var video_slider = $('.video-slider li').length;  
798 - $('.video-slider ul').css({width:(video_slider*220)-20})  
799 -  
800 - function videoFull(){  
801 - if($('.scroll-img').hasClass('video-slider')) {  
802 - $("body").append('<div class="video-full"></div>');  
803 - $('.video-slider ul li').click(function(e){  
804 - $('.video-full').append('<div class="closed-form"></div>')  
805 - e.preventDefault()  
806 - $('#overlay').fadeIn(400,  
807 - function(){  
808 - $('.video-full')  
809 - .css('display', 'block')  
810 - .animate({opacity: 1, top: '50%'}, 200);  
811 - });  
812 -  
813 - var thisIframe = $(this).find('.iframe-video').html();  
814 -  
815 - $('.video-full').append('<div class="video-full-iframe"></div>')  
816 - $('.video-full-iframe').append(thisIframe)  
817 - var iframeSrc = $('.video-full-iframe iframe').attr('src')  
818 - iframeSrc = iframeSrc.replace('showinfo=0','showinfo=1')  
819 - $('.video-full-iframe').empty()  
820 - $('.video-full-iframe').append('<iframe width="100%" height="100%" src="'+iframeSrc+'" frameborder="0" allowfullscreen></iframe>')  
821 -  
822 - $('.closed-form, #overlay').on('click', function(){  
823 - $('#overlay').fadeOut(400)  
824 - $('.video-full')  
825 - .animate({opacity: 0, top: '30%'}, 200,  
826 - function(){  
827 - $(this).css('display', 'none');  
828 - $(this).empty();  
829 - }  
830 - );  
831 - });  
832 - })  
833 - }  
834 - }  
835 923
  924 + function include(url)
  925 + {
  926 + var script = document.createElement('script');
  927 + script.src = url;
  928 + document.getElementsByTagName('head')[0].appendChild(script);
  929 + }
836 930
  931 + include("/js/forms.js");
  932 + include("/js/jmousewhell.js");
  933 + include("/js/jscroll.js");
  934 +
  935 + function inputNumber()
  936 + {
  937 + $('.form-price-wr input').keypress(
  938 + function(e)
  939 + {
  940 + if(!(e.which == 8 || (e.which > 47 && e.which < 58)))
  941 + {
  942 + return false;
  943 + }
  944 + }
  945 + );
  946 + }
837 947
838 - $('.search-list span').click(function(){  
839 - if($('.search-ul').hasClass('active')) {  
840 - $('.search-list ul').removeClass('active');  
841 - $('.search-main-menu form input').focus()  
842 - } else {  
843 - $('.search-list ul').addClass('active'); 948 + $('.min_markers li').click(
  949 + function()
  950 + {
  951 + $('.min_markers li').removeClass('active_m');
  952 + $(this).addClass('active_m');
  953 + $('.min_markers_two li').removeClass('active_m');
  954 + }
  955 + );
  956 + $('.min_markers_two li').click(
  957 + function()
  958 + {
  959 + $('.min_markers li').removeClass('active_m');
  960 + $('.min_markers_two li').removeClass('active_m');
  961 + $(this).addClass('active_m');
  962 + }
  963 + )
  964 + //ะฟะพะดะณั€ัƒะทะบะฐ ะบะฐั€ั‚ั‹
  965 + $('.min_markers li, .min_markers_two li').click(
  966 + function()
  967 + {
  968 + $.post(
  969 + "maps/maps-all-markers.php", function(data)
  970 + {
  971 + $("#map_cloud").empty();
  972 + $("#map_cloud").append(data);
  973 + initialize();
  974 + $('#demo5 ul').empty();
  975 + var slider_append = $('.slider_for_maps').children();
  976 + $('#demo5 ul').append(slider_append)
  977 + }
  978 + );
  979 + }
  980 + );
  981 + messagePage();
  982 + function messagePage()
  983 + {
  984 + $(".input_file").change(
  985 + function()
  986 + {
  987 + var filename = $(".input_file").val().replace(/.+[\\\/]/, "");
  988 + if(filename == "")
  989 + {
  990 + var filename = "ะœะฐะบัะธะผะฐะปัŒะฝั‹ะน ั€ะฐะทะผะตั€ ั„ะฐะนะปะฐ 5 ะœะ‘";
  991 + }
  992 + $(".input_file_text").text(filename);
  993 + }
  994 + );
  995 + if($('.comments_block').hasClass('comments_block'))
  996 + {
  997 + $(
  998 + function()
  999 + {
  1000 + $('.comments_block').jScrollPane({showArrows : true, scrollbarWidth : 20, arrowSize : 20});
  1001 + }
  1002 + );
  1003 + }
  1004 + }
844 1005
  1006 + $('.main-menu').hover(
  1007 + function()
  1008 + {
  1009 + $('select').blur()
845 } 1010 }
846 - $('.search-list ul.active li').click(function(){  
847 - $('.search-list ul').removeClass('active');  
848 - $('.search-list span').html($(this).text())  
849 - var searchListIndex = $(this).index()  
850 - searchListIndex = searchListIndex+1  
851 - $('.search-main-menu form input[type="hidden"]').val(searchListIndex)  
852 - $('.search-main-menu form input').focus()  
853 - }) 1011 + )
  1012 +
  1013 + if($('.section-box-tender-tags-wr').hasClass('section-box-tender-tags-wr'))
  1014 + {
  1015 + var lastTagTender = $('.section-box-tender-tags span')
  1016 + var lastTagTenderLenght = lastTagTender.length
  1017 + var lastTagTenderHtml = $(lastTagTender[lastTagTenderLenght - 1]).html()
  1018 + $(lastTagTender[lastTagTenderLenght - 1]).empty().html(lastTagTenderHtml.replace(/,(?![^,]*,)/m, '.'))
  1019 + }
854 1020
  1021 + var jVal_res_f = {
  1022 +
  1023 + 'resComm' : function()
  1024 + {
  1025 + var ele = $('#res_f_text');
  1026 + if(ele.val().length < 2)
  1027 + {
  1028 + jVal_res_f.errors = true;
  1029 + ele.removeClass('normal').addClass('wrong');
  1030 + } else
  1031 + {
  1032 + ele.removeClass('wrong').addClass('normal');
  1033 + }
  1034 + }, 'resSendItF' : function()
  1035 + {
  1036 + if(!jVal_res_f.errors)
  1037 + {
  1038 + $('.resformsfile').submit();
  1039 + }
  1040 + }
  1041 + };
  1042 + // ====================================================== //
  1043 + $('#res_f_submit').click(
  1044 + function()
  1045 + {
  1046 + jVal_res_f.errors = false;
  1047 + jVal_res_f.resComm();
  1048 + jVal_res_f.resSendItF();
  1049 + return false;
  1050 + }
  1051 + );
  1052 + $('#res_f_submit2').click(
  1053 + function()
  1054 + {
  1055 + jVal_res_f.errors = false;
  1056 + jVal_res_f.resComm();
  1057 + jVal_res_f.resSendItF();
  1058 + return false;
  1059 + }
  1060 + );
855 1061
  1062 + $('#res_f_text').focusout(
  1063 + function()
  1064 + {
  1065 + jVal_res_f.resComm();
  1066 + }
  1067 + );
  1068 +
  1069 + var video_slider = $('.video-slider li').length;
  1070 + $('.video-slider ul').css({width : (video_slider * 220) - 20})
  1071 +
  1072 + function videoFull()
  1073 + {
  1074 + if($('.scroll-img').hasClass('video-slider'))
  1075 + {
  1076 + $("body").append('<div class="video-full"></div>');
  1077 + $('.video-slider ul li').click(
  1078 + function(e)
  1079 + {
  1080 + $('.video-full').append('<div class="closed-form"></div>')
  1081 + e.preventDefault()
  1082 + $('#overlay').fadeIn(
  1083 + 400, function()
  1084 + {
  1085 + $('.video-full')
  1086 + .css('display', 'block')
  1087 + .animate({opacity : 1, top : '50%'}, 200);
  1088 + }
  1089 + );
  1090 +
  1091 + var thisIframe = $(this).find('.iframe-video').html();
  1092 +
  1093 + $('.video-full').append('<div class="video-full-iframe"></div>')
  1094 + $('.video-full-iframe').append(thisIframe)
  1095 + var iframeSrc = $('.video-full-iframe iframe').attr('src')
  1096 + iframeSrc = iframeSrc.replace('showinfo=0', 'showinfo=1')
  1097 + $('.video-full-iframe').empty()
  1098 + $('.video-full-iframe').append('<iframe width="100%" height="100%" src="' + iframeSrc + '" frameborder="0" allowfullscreen></iframe>')
  1099 +
  1100 + $('.closed-form, #overlay').on(
  1101 + 'click', function()
  1102 + {
  1103 + $('#overlay').fadeOut(400)
  1104 + $('.video-full')
  1105 + .animate(
  1106 + {opacity : 0, top : '30%'}, 200, function()
  1107 + {
  1108 + $(this).css('display', 'none');
  1109 + $(this).empty();
  1110 + }
  1111 + );
  1112 + }
  1113 + );
  1114 + }
  1115 + )
  1116 + }
  1117 + }
856 1118
857 - }) 1119 + $('.search-list span').click(
  1120 + function()
  1121 + {
  1122 + if($('.search-ul').hasClass('active'))
  1123 + {
  1124 + $('.search-list ul').removeClass('active');
  1125 + $('.search-main-menu form input').focus()
  1126 + } else
  1127 + {
  1128 + $('.search-list ul').addClass('active');
858 1129
  1130 + }
  1131 + $('.search-list ul.active li').click(
  1132 + function()
  1133 + {
  1134 + $('.search-list ul').removeClass('active');
  1135 + $('.search-list span').html($(this).text())
  1136 + var searchListIndex = $(this).index()
  1137 + searchListIndex = searchListIndex + 1
  1138 + $('.search-main-menu form input[type="hidden"]').val(searchListIndex)
  1139 + $('.search-main-menu form input').focus()
  1140 + }
  1141 + )
859 1142
  1143 + }
  1144 + )
860 1145
861 -});  
862 \ No newline at end of file 1146 \ No newline at end of file
  1147 + }
  1148 +);
863 \ No newline at end of file 1149 \ No newline at end of file